index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. <template>
  2. <view class="content">
  3. <view class="content-left">
  4. <view class="d-flex a-center j-center w-100 flex-column u-m-t-80 u-m-b-38">
  5. <image src="../../static/userimg.png" style="width:62rpx;height:62rpx;" mode=""></image>
  6. <view class="u-m-t-2 f-w-900">{{ $store.state.userinfo.name }}</view>
  7. </view>
  8. <view v-for="(item,index) in leftData" :key="index" class="d-flex a-center u-m-l-20 u-m-r-15 u-m-b-10" style="height:38rpx"
  9. :style="{'borderRight': ( index === changeStatus ? '5px #18B566 solid' : '5px #1A6CD6 solid')}" @click="changeLeft(index)">
  10. <image :src="item.img" style="width:25rpx;height:25rpx;" mode=""></image>
  11. <view style="font-size:6rpx;width:60rpx" class="u-m-l-2 f-w-900">{{ item.text }}</view>
  12. </view>
  13. <view class="d-flex a-center u-m-l-20" style="margin-top:100rpx" @click="quit">
  14. <image src="../../static/quit.png" style="width:25rpx;height:25rpx;" mode=""></image>
  15. <view style="font-size:6rpx;" class="u-m-l-8 f-w-900">退出</view>
  16. </view>
  17. </view>
  18. <view class="content-right" style="color: #1F2C6B;" v-if="infoStatus">
  19. <view class="d-flex a-center u-m-t-42 u-m-b-28 f-w">
  20. <view style="font-size: 16rpx;">
  21. <view class="u-m-r-48">{{ sjOrFx === 0 ? '首件检验放行记录表' : '首件检验防错记录表' }}</view>
  22. <view>共{{ sjOrFx === 0 ? recordNum + '张记录' : recordNum + '张防错' }}表待响应处理</view>
  23. </view>
  24. <image src="../../static/menu.png" class="u-p-t-4" style="width:17rpx;height:10rpx;display: flex;align-self: flex-start;"
  25. mode=""></image>
  26. </view>
  27. <view class="d-flex a-center j-sb f-w-900" style="height:100%">
  28. <view v-for="(item,index) in rightData" :key="index" style="height:100%">
  29. <view class="d-flex a-center" style="font-size: 8rpx;">
  30. <image :src="recordList(item.type)[1]" style="width:29rpx;height:24rpx;" mode=""></image>
  31. <view class="u-m-l-8 u-m-r-40">{{ recordList(item.type)[0] }}</view>
  32. <image src="../../static/top.png" v-if="item.chu !== true" style="width:7rpx;height:4rpx;" mode="" @click.stop="showOrHidden(index)"></image>
  33. <image src="../../static/bottom.png" v-else style="width:7rpx;height:4rpx;" mode="" @click.stop="showOrHidden(index)"></image>
  34. </view>
  35. <view class="u-m-t-14 content-right-item" style="max-height:70%;overflow-y: auto;" v-if="item.recordList && item.recordList.length && item.chu === true">
  36. <view class="d-flex a-center u-m-b-10" style="font-size: 7rpx;" @click.stop="showInfo(iten.versionId)" v-for="(iten,indey) in item.recordList"
  37. :key="indey">
  38. <image :src="recordList(item.type)[2]" style="width:21rpx;height:30rpx;" mode=""></image>
  39. <view class="u-m-l-6">{{ iten.name }}</view>
  40. </view>
  41. </view>
  42. <view class="u-m-t-14" style="padding-left: 9rpx;width: 170rpx;padding-top: 8rpx;padding-bottom: 8rpx;" v-else></view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="content-right" v-else>
  47. <view class="d-flex a-center j-sb u-m-t-42 u-m-b-10">
  48. <view class="d-flex a-center" style="font-size: 16rpx;">
  49. <image src="../../static/return.png" style="width:19rpx;height:19rpx;" mode="" @click="returnSjList"></image>
  50. <view class="u-m-l-16 u-m-r-10 f-w-900" style="color:#1A6CD6;">记录表名称</view>
  51. <image src="../../static/menu.png" style="width:17rpx;height:10rpx;" mode=""></image>
  52. </view>
  53. <view class="d-flex f-w-900" style="font-size: 13rpx;">
  54. <view class="d-flex a-center content-right-chunk b-r-5" :style="{'background': responseClickStatus ? '#999' : '#1A6CD6'}">
  55. <image src="../../static/xy.png" style="width:15rpx;height:15rpx;" mode=""></image>
  56. <view class="u-m-l-4" @click="responseClick">{{ responseClickStatus ? '已响应' : '响应' }}</view>
  57. </view>
  58. <view v-if="changeStatus !== 0" class="content-right-chunk b-r-5 f-w-900">
  59. 保存
  60. </view>
  61. <view class="content-right-chunk b-r-5 f-w-900" :style="{'background': submitClickStatus ? '#999' : '#1A6CD6'}" @click="submitSj">
  62. {{ submitClickStatus ? '已提交' : '提交' }}
  63. </view>
  64. <view class="content-right-chunk b-r-5 f-w-900">
  65. 查看附件
  66. </view>
  67. </view>
  68. </view>
  69. <template v-if="!changeStatus">
  70. <view class="d-flex a-center u-m-b-5 sjHead" style="font-size: 9rpx;">
  71. <view class="flex-1 d-flex a-center j-center b-r-5 f-w-900" :style="{'background': index === sjIndex ? '#FAB732' : '#FADB50'}"
  72. style="height:24rpx;color:#fff;" v-for="(item,index) in sjHeadData" :key="index" @click="changeSj(index)">{{ item.name }}</view>
  73. </view>
  74. <view style="height:80%;overflow-y: auto;">
  75. <view style="background: #FAB732;color:#fff;font-size:10rpx;height:92rpx;" class="d-flex u-m-b-5 b-r-5" v-for="(item,index) in datas"
  76. :key="index">
  77. <view class="d-flex a-center j-center u-m-l-18 u-m-r-12 u-m-t-24 button-point f-w">{{ index + 1 }}</view>
  78. <view style="width:80%;">
  79. <view class="u-m-t-12 d-flex w-100">
  80. <view class="f-w" style="width:62%;">
  81. <view class="u-m-b-2">检验特性:{{ item.inspectionItem }}</view>
  82. <view class="u-m-b-2">检验方法:{{ item.floor + 'Nm-' + item.top + 'Nm' + item.method }}</view>
  83. <view class="over_style">检验工具(首选):{{ item.tool }}</view>
  84. </view>
  85. <view class="f-w">
  86. <view class="u-m-b-2">等级:{{ item.level }}</view>
  87. <view class="u-m-b-2">工作站:{{ item.workstation }}</view>
  88. <view class="d-flex a-center">
  89. <view class="u-m-r-6 flex-shrink">订单号 : </view>
  90. <input type="text" style="background: #fff;height:16rpx;width:109rpx;color:#000;border-radius: 5rpx;" v-model="item.checkSubList[0].orderId"
  91. @focus="ifResponse">
  92. </view>
  93. </view>
  94. </view>
  95. <view class="d-flex a-center u-m-t-6 f-w" v-if="!item.sightCheck">
  96. <view class="u-m-r-6 flex-shrink">{{ item.workStationFist }}-{{ item.workStationLast }} : </view>
  97. <input v-for="(iten,indey) in item.checkSubList[0].checkWorkGreadList" :key="indey" type="text" v-model="iten.greadResult"
  98. class="u-m-r-10" style="width:36rpx;height:21rpx;background: #fff;border-radius: 5rpx;color:#000;" @focus="ifResponse">
  99. </view>
  100. <view class="d-flex a-center u-m-t-6 f-w" v-else>
  101. <view :class="[ item.checkSubList[0].checkWorkGreadList[0].sightResult === true ? 'button-chunk-check' : 'button-chunk' ]"
  102. class=" u-m-r-12 b-r-5" @click="changeOK(item.id,true)">OK</view>
  103. <view :class="[ item.checkSubList[0].checkWorkGreadList[0].sightResult === false ? 'button-chunk-check' : 'button-chunk' ]"
  104. class="button-chunk b-r-5" @click="changeOK(item.id,false)">NOK</view>
  105. </view>
  106. </view>
  107. <view v-if="!item.checkSubList[0].orderId" class="u-m-t-36 button-chunk b-r-5 f-w" @click="save(index,item.sightCheck)">
  108. 保存
  109. </view>
  110. <view v-else class="u-m-t-36 button-chunk b-r-5 f-w" @click="save(index,item.sightCheck)">
  111. 编辑
  112. </view>
  113. </view>
  114. <view style="background: #FAB732;color:#fff;font-size:10rpx;height:92rpx;" class="d-flex u-m-b-5 b-r-5">
  115. <view class="d-flex a-center j-center u-m-l-18 u-m-r-12 u-m-t-24 f-w" style="width:17rpx;height:17rpx;"></view>
  116. <view style="width:80%;" class="u-p-r-20">
  117. <view class="d-flex j-sb u-m-t-24 u-m-b-8 f-w">
  118. <view style="font-size: 13rpx;">备注:是否使用前面所规定得扭矩扳手</view>
  119. <view class="d-flex a-center">
  120. <view :class="[ useSpanner === true ? 'button-chunk-check' : 'button-chunk' ]" class="u-m-r-12 b-r-5" @click="changeButton(1)">是</view>
  121. <view :class="[ useSpanner === false ? 'button-chunk-check' : 'button-chunk' ]" class="b-r-5" @click="changeButton(0)">否</view>
  122. </view>
  123. </view>
  124. <input type="text" class="f-w" style="background: #fff;height:21rpx;color:#000;border-radius: 5rpx;" v-model="spannerRemark"
  125. @focus="ifResponse">
  126. </view>
  127. <view v-if="spannerRemark" class="u-m-t-36 button-chunk b-r-5 f-w" @click="save('-1')">
  128. 保存
  129. </view>
  130. <view v-else class="u-m-t-36 button-chunk b-r-5 f-w" @click="save('-1')">
  131. 保存
  132. </view>
  133. </view>
  134. </view>
  135. </template>
  136. <template v-else>
  137. <view class="d-flex a-center u-m-b-5 sjHead" style="font-size: 9rpx;">
  138. <view class="flex-1 d-flex a-center j-center b-r-5 f-w-900" :style="{'background': index === fcIndex ? '#FAB732' : '#FADB50'}"
  139. style="color:#fff;height:24rpx;" v-for="(item,index) in fcHeadData" :key="index" @click="changeFc(index)">{{ item.name }}</view>
  140. </view>
  141. <view style="height:80%;overflow-y: auto;">
  142. <view class="u-m-b-5 d-flex a-center u-m-b-5" style="background: #FAB732;height:51rpx;border-radius: 2rpx;" v-for="(item,index) in data"
  143. :key="index">
  144. <view style="width:8%;font-size: 9rpx;font-weight: 900;" class="d-flex flex-column a-center j-center">
  145. <view style="color:#1F2C6B;">OP</view>
  146. <view class="button-point d-flex a-center j-center u-m-t-2">5</view>
  147. </view>
  148. <view style="font-size: 10rpx;color:#fff;width:70%;font-weight: bold;">
  149. 点检内容:方向机支架到副架38+-5.7Nm
  150. </view>
  151. <view class="d-flex a-center">
  152. <view class="button-chunk u-m-r-12">OK</view>
  153. <view class="button-chunk">NOK</view>
  154. </view>
  155. </view>
  156. </view>
  157. </template>
  158. </view>
  159. <u-modal v-model="questionShow" :show-title="false" :show-confirm-button="false" :show-cancel-button="false" :zoom="false"
  160. width="30%">
  161. <view slot="default" class="u-p-b-10">
  162. <u-row class="d-flex j-sb a-center w-100">
  163. <u-col span="2" offset="10" style="display: flex;justify-content: flex-end;">
  164. <view @click="questionShow = false">
  165. <u-icon name="close-circle-fill" color="#A9A3D2" size="30"></u-icon>
  166. </view>
  167. </u-col>
  168. </u-row>
  169. <u-row justify="center" class="u-m-t-10 u-m-b-10 w-100 d-flex a-center j-center" style="font-size: 16rpx;">
  170. {{ modalTitles[modalTitleStatus] }}
  171. </u-row>
  172. <view class="d-flex">
  173. <dj-button class="u-m-t-18" content="是" @click.native="affirm" />
  174. <dj-button class="u-m-t-18 u-m-b-20" content="否" @click.native="questionShow = false" />
  175. </view>
  176. </view>
  177. </u-modal>
  178. <u-toast ref="uToast" />
  179. </view>
  180. </template>
  181. <script>
  182. import sj from '../../static/leftSj.png'
  183. import fc from '../../static/leftFc.png'
  184. import bFile from '../../static/bFile.png'
  185. import bItem from '../../static/b-item.png'
  186. import gFile from '../../static/gFile.png'
  187. import gItem from '../../static/g-item.png'
  188. import yFile from '../../static/yFile.png'
  189. import yItem from '../../static/y-item.png'
  190. import djButton from '../../components/dj-button.vue'
  191. import {
  192. mapMutations
  193. } from "vuex"
  194. import {
  195. iniPlanList,
  196. getDetails,
  197. getFrequency,
  198. saveResult,
  199. versionResponse,
  200. saeSpanner,
  201. submit
  202. } from "@/common/api.js"
  203. export default {
  204. components: {
  205. djButton
  206. },
  207. data() {
  208. return {
  209. questionShow: false,
  210. changeStatus: 0,
  211. sjOrFx: 0,
  212. num: 26,
  213. // 详情状态
  214. infoStatus: 1,
  215. maskCloseAble: false,
  216. sjIndex: 0,
  217. // 当前记录表id
  218. sjRecordId: "",
  219. // 当前type
  220. sjRecordType: 1,
  221. sjHeadData: [],
  222. fcIndex: 0,
  223. fcHeadData: [{
  224. 'name': '日'
  225. },
  226. {
  227. 'name': '周'
  228. },
  229. {
  230. 'name': '月'
  231. }
  232. ],
  233. modalTitleStatus: 0,
  234. modalTitles: ['数据有误,是否提交', '是否退出'],
  235. value: "",
  236. word: "",
  237. leftData: [{
  238. img: sj,
  239. text: '首件检验放行记录表'
  240. },
  241. {
  242. img: fc,
  243. text: '放错点检表'
  244. }
  245. ],
  246. rightData: [{
  247. status: 1,
  248. show: true
  249. },
  250. {
  251. status: 2,
  252. show: true
  253. },
  254. {
  255. status: 3,
  256. show: true
  257. }
  258. ],
  259. data: [{
  260. id: 1
  261. },
  262. {
  263. id: 2,
  264. },
  265. {
  266. id: 2
  267. },
  268. {
  269. id: 2
  270. },
  271. {
  272. id: 2
  273. },
  274. {
  275. id: 2
  276. },
  277. {
  278. id: 2
  279. },
  280. {
  281. id: 2
  282. },
  283. {
  284. id: 2
  285. },
  286. {
  287. id: 2
  288. },
  289. {
  290. id: 2
  291. },
  292. ],
  293. datas: [],
  294. // 备注id(检查单id)
  295. remarkId: '',
  296. // 备注
  297. spannerRemark: "",
  298. // 备注按钮
  299. useSpanner: '',
  300. // 需要响应记录
  301. unRes: [],
  302. // 响应按钮是否能点击(是否已经响应过)
  303. responseClickStatus: false,
  304. // 需要提交记录
  305. submi: [],
  306. // 提交按钮是否能点击(是否已经提交过)
  307. submitClickStatus: false
  308. }
  309. },
  310. onLoad() {
  311. this.init()
  312. },
  313. computed: {
  314. recordList() {
  315. return function(index) {
  316. if (index === 1) {
  317. return ['待响应记录表', yFile, yItem]
  318. } else if (index === 2) {
  319. return ['处理中记录表', bFile, bItem]
  320. } else {
  321. return ['已完成记录表', gFile, gItem]
  322. }
  323. }
  324. },
  325. recordNum() {
  326. if(this.rightData[0].recordList) {
  327. return this.rightData[0].recordList.length
  328. }
  329. }
  330. },
  331. methods: {
  332. ...mapMutations(['logout']),
  333. init() {
  334. iniPlanList().then(res => {
  335. if (res.status === '20000') {
  336. this.rightData = res.data
  337. }
  338. })
  339. },
  340. changeLeft(index) {
  341. this.changeStatus = index
  342. this.sjOrFx = index
  343. this.infoStatus = 1
  344. this.returnIndex()
  345. },
  346. showInfo(id) {
  347. // 首件: 记录当前记录表id
  348. this.sjRecordId = id
  349. this.sjHeadData = []
  350. getFrequency({
  351. id: id
  352. }).then(res => {
  353. if (res.status === '20000') {
  354. this.unRes = res.data.unRes
  355. if (this.unRes && this.unRes.indexOf(1) === -1) {
  356. this.responseClickStatus = true
  357. }
  358. this.submi = res.data.submi
  359. if (this.submi && this.submi.indexOf(1) === -1) {
  360. this.submitClickStatus = true
  361. }
  362. for (let i of res.data.allCheckType) {
  363. if (i === 1) {
  364. this.sjHeadData.push({
  365. 'name': '首件'
  366. })
  367. } else if (i === 2) {
  368. this.sjHeadData.push({
  369. 'name': '200件'
  370. })
  371. } else {
  372. this.sjHeadData.push({
  373. 'name': '中断件'
  374. })
  375. }
  376. }
  377. getDetails({
  378. id: id,
  379. type: 1
  380. }).then(res => {
  381. if (res.status === '20000') {
  382. this.infoStatus = 0
  383. this.returnIndex()
  384. this.datas = res.data.versionSubList
  385. this.spannerRemark = res.data.spannerRemark
  386. this.useSpanner = res.data.useSpanner
  387. this.remarkId = res.data.id
  388. }
  389. })
  390. }
  391. })
  392. },
  393. // 首件详情页返回
  394. returnSjList() {
  395. this.infoStatus = 1
  396. this.init()
  397. },
  398. // 响应
  399. responseClick() {
  400. if (this.responseClickStatus) return
  401. let type = this.sjRecordType
  402. let id = this.sjRecordId
  403. versionResponse({
  404. 'id': id,
  405. 'type': type
  406. }).then(res => {
  407. if (res.status === '20000') {
  408. getFrequency({
  409. id: id
  410. }).then(res => {
  411. this.unRes = res.data.unRes
  412. this.sjHeadData = []
  413. if (this.unRes.indexOf(this.sjIndex + 1) === -1) {
  414. this.responseClickStatus = true
  415. }
  416. // this.submi = res.data.submi
  417. // if (this.submi.indexOf(this.sjIndex + 1)) === -1) {
  418. // this.submitClickStatus = true
  419. // }
  420. for (let i of res.data.allCheckType) {
  421. if (i === 1) {
  422. this.sjHeadData.push({
  423. 'name': '首件'
  424. })
  425. } else if (i === 2) {
  426. this.sjHeadData.push({
  427. 'name': '200件'
  428. })
  429. } else {
  430. this.sjHeadData.push({
  431. 'name': '中断件'
  432. })
  433. }
  434. }
  435. getDetails({
  436. 'id': id,
  437. 'type': type
  438. }).then(res => {
  439. if (res.status === '20000') {
  440. this.datas = res.data.versionSubList
  441. this.spannerRemark = res.data.spannerRemark
  442. this.useSpanner = res.data.useSpanner
  443. this.remarkId = res.data.id
  444. }
  445. })
  446. })
  447. }
  448. })
  449. },
  450. showOrHidden(index) {
  451. this.rightData[index].chu = !this.rightData[index].chu
  452. },
  453. // 切换右侧栏
  454. changeSj(index) {
  455. this.sjIndex = index
  456. if (this.unRes && this.unRes.indexOf(this.sjIndex + 1) === -1) {
  457. this.responseClickStatus = true
  458. } else {
  459. this.responseClickStatus = false
  460. }
  461. if (this.submi && this.submi.indexOf(this.sjIndex + 1) === -1) {
  462. this.submitClickStatus = true
  463. } else {
  464. this.submitClickStatus = false
  465. }
  466. this.sjRecordType = index + 1
  467. getDetails({
  468. 'id': this.sjRecordId,
  469. type: index + 1
  470. }).then(res => {
  471. if (res.status === '20000') {
  472. this.datas = res.data.versionSubList
  473. this.spannerRemark = res.data.spannerRemark
  474. this.useSpanner = res.data.useSpanner
  475. this.remarkId = res.data.id
  476. }
  477. })
  478. },
  479. changeFc(index) {
  480. this.fcIndex = index
  481. },
  482. // 还原索引
  483. returnIndex() {
  484. this.sjIndex = 0
  485. this.fcIndex = 0
  486. },
  487. // 提交
  488. submitSj() {
  489. if (this.submitClickStatus) return
  490. let data = {'type':this.sjRecordType,'id':this.sjRecordId,'versionSubList':this.datas}
  491. submit(data).then(res=> {
  492. if(res.status === '20000') {
  493. this.$refs.uToast.show({
  494. title: '提交成功',
  495. type: 'success'
  496. })
  497. }
  498. })
  499. },
  500. // 保存
  501. save(index,bool) {
  502. if (this.ifResponse()) {
  503. if(index === '-1'){
  504. // 保存时必填
  505. if (!this.spannerRemark) {
  506. this.$refs.uToast.show({
  507. title: '请填写备注',
  508. type: 'error'
  509. })
  510. return
  511. }
  512. if (typeof(this.useSpanner) != 'boolean') {
  513. this.$refs.uToast.show({
  514. title: '请点击按钮',
  515. type: 'error'
  516. })
  517. return
  518. }
  519. let data = {'checkResultId':this.remarkId,'spannerRemark':this.spannerRemark,'useSpanner':this.useSpanner}
  520. saeSpanner(data).then(res=> {
  521. if(res.status === '20000'){
  522. this.$refs.uToast.show({
  523. title: '保存成功',
  524. type: 'success'
  525. })
  526. }
  527. })
  528. } else {
  529. let res = this.datas[index].checkSubList[0]
  530. // 保存时必填
  531. if (!res.orderId) {
  532. this.$refs.uToast.show({
  533. title: '请填写订单号',
  534. type: 'error'
  535. })
  536. return
  537. }
  538. if(!bool){
  539. let flag = true
  540. if (res.checkWorkGreadList.length) {
  541. for (let i of res.checkWorkGreadList) {
  542. if (!i.greadResult) {
  543. flag = false
  544. this.$refs.uToast.show({
  545. title: '请将工位分数填全',
  546. type: 'error'
  547. })
  548. }
  549. }
  550. }
  551. if (flag) {
  552. saveResult(res).then(res => {
  553. if (res.status === '20000') {
  554. this.$refs.uToast.show({
  555. title: '保存成功',
  556. type: 'success'
  557. })
  558. }
  559. })
  560. }
  561. } else {
  562. if(typeof(res.checkWorkGreadList[0].sightResult) != 'boolean'){
  563. this.$refs.uToast.show({
  564. title: '请点击按钮',
  565. type: 'error'
  566. })
  567. return
  568. }
  569. saveResult(res).then(res => {
  570. if (res.status === '20000') {
  571. this.$refs.uToast.show({
  572. title: '保存成功',
  573. type: 'success'
  574. })
  575. }
  576. })
  577. }
  578. }
  579. }
  580. },
  581. changeButton(index) {
  582. if (this.ifResponse()) {
  583. this.useSpanner = index ? true :false
  584. }
  585. },
  586. changeOK(id, bool) {
  587. if (this.ifResponse()) {
  588. for (let i of this.datas) {
  589. if (id === i.id) {
  590. i.checkSubList[0].checkWorkGreadList[0].sightResult = bool
  591. return
  592. }
  593. }
  594. }
  595. },
  596. // 提交
  597. // submit() {
  598. // this.questionShow = true
  599. // this.modalTitleStatus = 0
  600. // },
  601. // 退出登录
  602. quit() {
  603. this.questionShow = true
  604. this.modalTitleStatus = 1
  605. },
  606. // 确认
  607. affirm() {
  608. this.questionShow = false
  609. // 提交
  610. if (!this.modalTitleStatus) {
  611. console.log('提交');
  612. // 退出登录
  613. } else {
  614. this.logout()
  615. }
  616. },
  617. // 是否响应
  618. ifResponse() {
  619. let responseStatus = true
  620. for (let i of this.unRes) {
  621. if (parseInt(this.sjIndex + 1) === parseInt(i)) {
  622. uni.showModal({
  623. title: '请先执行响应'
  624. })
  625. responseStatus = false
  626. }
  627. }
  628. return responseStatus
  629. }
  630. }
  631. }
  632. </script>
  633. <style lang="scss" scoped>
  634. page {
  635. width: 100%;
  636. height: 100%;
  637. }
  638. .content {
  639. height: 100%;
  640. min-height: 100vh;
  641. display: flex;
  642. background: linear-gradient(208deg, #FFFFFF 0%, #F2F7FF 100%);
  643. .content-left {
  644. width: 20%;
  645. background-color: #1A6CD6;
  646. font-size: 9rpx;
  647. color: #fff;
  648. border-top-left-radius: 30px;
  649. border-bottom-left-radius: 30px;
  650. }
  651. .content-right {
  652. width: 80%;
  653. height: 100%;
  654. padding-left: 22rpx;
  655. padding-right: 22rpx;
  656. color: #1F2C6B;
  657. overflow: hidden;
  658. .content-right-item {
  659. width: 170rpx;
  660. background: #fff;
  661. border-radius: 15rpx;
  662. box-shadow: 0px 10px 10px #E5E8F9;
  663. padding-left: 9rpx;
  664. padding-top: 8rpx;
  665. padding-bottom: 8rpx;
  666. }
  667. .content-right-chunk {
  668. padding: 5rpx 10rpx;
  669. background: #1A6CD6;
  670. color: #fff;
  671. margin-left: 11rpx;
  672. }
  673. }
  674. }
  675. .button-chunk {
  676. display: flex;
  677. justify-content: center;
  678. align-items: center;
  679. width: 48rpx;
  680. height: 19rpx;
  681. background: #FCDB99;
  682. color: #383143;
  683. font-weight: bold;
  684. font-size: 10rpx;
  685. }
  686. .button-chunk-check {
  687. display: flex;
  688. justify-content: center;
  689. align-items: center;
  690. width: 48rpx;
  691. height: 19rpx;
  692. background: #999;
  693. color: #fff;
  694. font-weight: bold;
  695. font-size: 10rpx;
  696. }
  697. .button-point {
  698. width: 17rpx;
  699. height: 17rpx;
  700. background: #fff;
  701. font-size: 9rpx;
  702. color: #000;
  703. border-radius: 50%;
  704. }
  705. .sjHead>view+view {
  706. margin-left: 5rpx;
  707. }
  708. </style>