hiddenDangerItemsDetail.vue 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066
  1. <!-- 检查详情 -->
  2. <template>
  3. <view class="snapshotDetail">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="list">
  6. <view class="list-li srearch">
  7. <view class="srearch-l">{{newData.subName?newData.subName:'实验室名称'}}</view>
  8. </view>
  9. <view class="list-li" style="margin-bottom: 20rpx;border:none;">
  10. <view>
  11. {{newData.roomNum?newData.roomNum:''}}房间&{{newData.buildName?newData.buildName:'楼栋'}}&{{newData.deptName?newData.deptName:'学院单位'}}
  12. </view>
  13. </view>
  14. <view v-if="newData.checkCollapse">
  15. <view class="list-li">
  16. <view>现场照片</view>
  17. </view>
  18. <view v-if="pageType==0" class="photo" @click="lockImg(newData.photoList)">
  19. <img v-for="(item,index) in newData.photoList" :src="baseUrl+item.fileUrl">
  20. </view>
  21. <view class="list-li" style="border-bottom: none;">
  22. <view> {{newData.hazardCheckCode?newData.hazardCheckCode:''}}
  23. {{newData.hazardCheckName?newData.hazardCheckName:'检查项'}}
  24. </view>
  25. </view>
  26. <view class="hazardCheckNum" @click="hiddenDangerClick()">
  27. <img class="hazardCheckNum-l" :src="imagesUrl('safetyCheck/icon_aqjc_yinhuan.png')">
  28. <view class="hazardCheckNum-r">{{'已连续出现'+hazardCheckNum+'次隐患'}} </view>
  29. </view>
  30. <view class="list-li">
  31. <view>隐患描述</view>
  32. <view></view>
  33. </view>
  34. <view class="hidden" v-if="!newData.checkFlag">
  35. <view class="hidden-content">{{newData.hazardDescribe}}</view>
  36. </view>
  37. <view v-if="pageType==1 || pageType==2" class="photo" @click="lockImg(newData.yhDtoList)">
  38. <img v-for="(item,index) in newData.yhDtoList" :src="baseUrl+item.fileUrl">
  39. </view>
  40. <!-- <view class="list-li">
  41. <view>检查人:</view>
  42. <view>{{newData.checkUserName}}</view>
  43. </view> -->
  44. <view class="list-li">
  45. <view>检查时间</view>
  46. <view>{{newData.checkTime}}</view>
  47. </view>
  48. </view>
  49. <view v-if="pageType==1 || pageType==2" v-for="(item,index) in newData.checkRectifyVoList" :key="index">
  50. <view class="list-li" v-if="item.rectifyTime" @click="rectifyCollapse(item)">
  51. <view>隐患整改</view>
  52. <view :id="item.rectifyResult?'fontColor-B':(item.rectifyResult?'fontColor-C':'')">
  53. {{item.rectifyResult?'已整改':(item.rectifyResult?'暂无法整改':'')}}
  54. <img v-if="!item.rectifyCollapse" :src="imagesUrl('commonality/icon_06.png')">
  55. <img v-if="item.rectifyCollapse" :src="imagesUrl('commonality/icon_06_1.png')">
  56. </view>
  57. </view>
  58. <view v-if="item.rectifyCollapse && item.rectifyTime">
  59. <view v-if="item.rectifyMeasure" class="hidden">
  60. <view class="hidden-content">{{item.rectifyMeasure}}</view>
  61. </view>
  62. <view class="photo" @click="lockImg(item.rectifyUploadList)">
  63. <img v-for="(item2,index2) in item.rectifyUploadList" :src="baseUrl+item2.fileUrl">
  64. </view>
  65. <view class="list-li">
  66. <view>整改者:</view>
  67. <view>{{item.rectifyName}}</view>
  68. </view>
  69. <view class="list-li">
  70. <view>整改时间</view>
  71. <view>{{item.rectifyTime}}</view>
  72. </view>
  73. </view>
  74. <!----复查相关暂时注释----开始---->
  75. <!-- <view class="list-li" v-if="item.reviewTime" @click="reviewCollapse(item)">
  76. <view>复查验证</view>
  77. <view :id="item.examineResult?'fontColor-B':'fontColor-C'">
  78. {{item.examineResult?'复查完毕':'退回整改'}}
  79. <img v-if="!item.reviewCollapse" :src="imagesUrl('commonality/icon_06.png')">
  80. <img v-if="item.reviewCollapse" :src="imagesUrl('commonality/icon_06_1.png')">
  81. </view>
  82. </view>
  83. <view v-if="item.reviewCollapse && item.reviewTime">
  84. <view v-if="item.examineOpinion" class="hidden">
  85. <view class="hidden">
  86. <view class="hidden-content">{{item.examineOpinion}}</view>
  87. </view>
  88. </view>
  89. <view class="photo" v-if="item.examineUploadList[0]" @click="lockImg(item.examineUploadList)">
  90. <img v-for="(item3,index3) in item.examineUploadList" :src="baseUrl+item3.fileUrl">
  91. </view>
  92. <view class="list-li">
  93. <view>复查时间</view>
  94. <view>{{item.reviewTime}}</view>
  95. </view>
  96. </view> -->
  97. <!----复查相关暂时注释----结束---->
  98. </view>
  99. <view class="voice" v-if="newData.voiceList[0] && !newData.rectifyStatus">
  100. <view class="voice_t">
  101. <view class="voice_t_t" v-if="!newData.voiceList[0]"><text>语音备注:</text><text></text></view>
  102. <view class="voice_t_b" v-if="newData.voiceList[0]">语音备注:({{newData.voiceList.length}})
  103. </view>
  104. </view>
  105. <view class="voice_b" v-if="newData.voiceList[0]"
  106. v-for="(voiceItem,voiceIndex) in newData.voiceList" :key="voiceIndex">
  107. <view class="voice_b_l" @tap="voicePlay(voiceItem.fileUrl)">
  108. <img class="add-button" :src="imagesUrl('safetyCheck/icon_yybz_yy.png')" />
  109. {{voiceItem.fileLength}}″
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </scroll-view>
  115. <view class="subBtn">
  116. <!-- 检查 -->
  117. <!-- <img @click="saoCode()" v-if="pageType==0" :src="imagesUrl('safetyCheck/icon_aqjc_saoma.png')"> -->
  118. <img @click="submitBtn(1)" v-if="pageType==0 && newData.checkSetProgress !=100 && !hiddenDangerRecordStatus && optionData.manageStatus !=2"
  119. :src="imagesUrl('safetyCheck/icon_aqjc_bianji.png')" />
  120. <img @click="submitBtn(2)" v-if="pageType==0 && newData.checkSetProgress !=100 && optionData.manageStatus !=2" style="margin-left: 60rpx;"
  121. :src="imagesUrl('safetyCheck/icon_aqjc_jiancha.png')" />
  122. <!-- 整改 -->
  123. <img @click="submitBtn(1)" v-if="pageType==2 && !hiddenDangerRecordStatus && !newData.finishRectify"
  124. :src="imagesUrl('safetyCheck/icon_aqjc_bianji.png')" />
  125. <img @click="submitBtn(2)" v-if="pageType==2 && !hiddenDangerRecordStatus && !newData.finishRectify"
  126. :src="imagesUrl('safetyCheck/icon_aqjc_zhenggai.png')" />
  127. <!-- 复查 -->
  128. <img @click="submitBtn(2)" v-if="pageType==1 && !hiddenDangerRecordStatus"
  129. :src="imagesUrl('safetyCheck/icon_aqjc_fucha.png')" />
  130. </view>
  131. <view v-if="pageType==0" class="inspectRecord" @click="inspectRecordClick()">检查记录</view>
  132. </view>
  133. </template>
  134. <script>
  135. const myaudio = uni.createInnerAudioContext();
  136. import {
  137. config
  138. } from '@/api/request/config.js'
  139. import {
  140. parseTime
  141. } from '@/component/public.js'
  142. import {
  143. securityAppCheckPlanCheckInfo,
  144. securityAppCheckPhotoGetCheckNumBySub,
  145. securityAppCheckDangerGetCheckProDetail,
  146. securityAppCheckSetOptionList,
  147. securityAppCheckDangerReviewSubList,
  148. securityAppCheckDangerGetCheckDangerSubList,
  149. securityAppCheckManageList,
  150. securityAppCheckPlanSetGetOptionList,
  151. securityCheckOptionSelAllList,
  152. } from '@/pages_safetyCheck/api/index.js'
  153. export default {
  154. name: "snapshotDetail",
  155. components: {
  156. },
  157. data() {
  158. return {
  159. baseUrl: config.base_url,
  160. inspectionItems: 0, //0有检查项 1无检查项
  161. newData: {
  162. voiceList:[],
  163. },
  164. setOptionId: '',
  165. manageId: '',
  166. subId: '',
  167. hazardCheckPro: '',
  168. hazardCheckNum: 0,
  169. pageType: 0, //0检查 1复查 2整改
  170. itemsStatus: '',
  171. optionData: null,
  172. lotName: null,
  173. hiddenDangerRecordStatus: null, //判断是否是从隐患列表页面跳转过来
  174. checkPlanList:[],
  175. }
  176. },
  177. onLoad(option) {
  178. let optionData = JSON.parse(decodeURIComponent(option.infoData));
  179. this.$set(this, 'pageType', optionData.pageType);
  180. this.$set(this, 'itemsStatus', optionData.itemsStatus);
  181. this.$set(this, 'setOptionId', optionData.setOptionId);
  182. this.$set(this, 'manageId', optionData.manageId);
  183. this.$set(this, 'subId', optionData.subId);
  184. this.$set(this, 'hazardCheckPro', optionData.hazardCheckPro);
  185. this.$set(this, 'hiddenDangerRecordStatus', optionData.hiddenDangerRecordStatus);
  186. this.$set(this, 'optionData', optionData);
  187. this.$set(this, 'lotName',
  188. optionData.pageType == 0 ? optionData.checkPlanSetVoList.checkName : (
  189. optionData.checkPlanSetVoList.overdueUnrectify ? '整改期限' + optionData.checkPlanSetVoList
  190. .rectifyDeadline +
  191. '(逾期未完成整改关闭实验室)' : '整改期限' + optionData.checkPlanSetVoList.rectifyDeadline));
  192. },
  193. onShow() {
  194. },
  195. mounted() {
  196. if (this.pageType == 0) {
  197. this.securityCheckOptionSelAllList();
  198. this.securityAppCheckPlanCheckInfo();
  199. } else if (this.pageType == 1 || this.pageType == 2) {
  200. //复查-整改
  201. this.securityAppCheckDangerGetCheckProDetail();
  202. }
  203. this.securityAppCheckPhotoGetCheckNumBySub();
  204. },
  205. methods: {
  206. //滚动事件
  207. scrollGet() {},
  208. //检查记录
  209. inspectRecordClick() {
  210. let infoData = this.optionData;
  211. infoData.curTabTow = 1; //已检查
  212. uni.navigateTo({
  213. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  214. encodeURIComponent(JSON
  215. .stringify(infoData))
  216. });
  217. },
  218. /******调用摄像头******/
  219. saoCode() {
  220. let self = this;
  221. uni.scanCode({
  222. onlyFromCamera: true,
  223. success: function(res) {
  224. let list = res.result.split("?")[1].split("&");
  225. let codeData = {};
  226. list.forEach((item) => {
  227. codeData[item.split("=")[0]] = item.split("=")[1];
  228. })
  229. if (codeData.code) {
  230. self.saoList(codeData.subId);
  231. } else {
  232. uni.showToast({
  233. title: '请扫描正确的二维码',
  234. icon: "none",
  235. mask: true,
  236. duration: 2000
  237. });
  238. }
  239. }
  240. });
  241. },
  242. //扫一扫查询数据
  243. async saoList(subId) {
  244. let obj = {
  245. planSetId: this.optionData.checkPlanSetVoList.planSetId,
  246. subId: subId,
  247. }
  248. if (this.pageType == 0) {
  249. //检查计划
  250. const {
  251. data
  252. } = await securityAppCheckManageList(obj);
  253. if (data.code == 200) {
  254. if (data.data.records[0]) {
  255. this.securityAppCheckSetOptionList(data.data.records[0], 0)
  256. //跳转检查项列表页面
  257. /* let infoData = data.data.records[0];
  258. infoData.pageType = this.tabIndexTow;
  259. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  260. uni.navigateTo({
  261. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  262. encodeURIComponent(
  263. JSON.stringify(infoData))
  264. }); */
  265. } else {
  266. //未找到数据提示
  267. uni.showToast({
  268. title: '未找到该实验室与本计划批次关联的数据',
  269. icon: "none",
  270. mask: true,
  271. duration: 2000
  272. });
  273. }
  274. }
  275. } else if (this.pageType == 1) {
  276. //复查计划
  277. obj.planId = this.optionData.checkPlanSetVoList.planId;
  278. obj.userId = uni.getStorageSync('userId');
  279. const {
  280. data
  281. } = await securityAppCheckDangerReviewSubList(obj);
  282. if (data.code == 200) {
  283. if (data.data[0] && data.data[0].stayExamineCheckNum != 0) {
  284. //跳转检查项列表页面
  285. let infoData = data.data[0];
  286. infoData.pageType = this.pageType;
  287. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  288. uni.navigateTo({
  289. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  290. encodeURIComponent(
  291. JSON.stringify(infoData))
  292. });
  293. } else {
  294. //未找到数据提示
  295. uni.showToast({
  296. title: '未找到该实验室与本计划批次关联的数据',
  297. icon: "none",
  298. mask: true,
  299. duration: 2000
  300. });
  301. }
  302. }
  303. } else if (this.pageType == 2) {
  304. //整改计划
  305. obj.planId = this.optionData.checkPlanSetVoList.planId;
  306. obj.userId = uni.getStorageSync('userId');
  307. const {
  308. data
  309. } = await securityAppCheckDangerGetCheckDangerSubList(obj);
  310. if (data.code == 200) {
  311. if (data.data[0]) {
  312. //跳转检查项列表页面
  313. let infoData = data.data[0];
  314. infoData.pageType = this.pageType;
  315. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  316. uni.navigateTo({
  317. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  318. encodeURIComponent(
  319. JSON.stringify(infoData))
  320. });
  321. } else {
  322. //未找到数据提示
  323. uni.showToast({
  324. title: '未找到该实验室与本计划批次关联的数据',
  325. icon: "none",
  326. mask: true,
  327. duration: 2000
  328. });
  329. }
  330. }
  331. }
  332. },
  333. //获取检查提交详情
  334. async securityAppCheckPlanCheckInfo() {
  335. let obj = {
  336. setOptionId: this.setOptionId,
  337. manageId: this.manageId,
  338. }
  339. const {
  340. data
  341. } = await securityAppCheckPlanCheckInfo(obj);
  342. if (data.code == 200) {
  343. uni.setNavigationBarTitle({
  344. title: data.data.subName + '(' + (this.pageType == 0 ? data.data.roomNum ? data.data
  345. .roomNum : '-' : data.data
  346. .subRoom ? data.data.subRoom : '-') + ')'
  347. })
  348. data.data.checkCollapse = true;
  349. data.data.inspectDot = false;
  350. this.$set(this, 'newData', data.data);
  351. this.$set(this.newData, 'checkTime', parseTime(data.data.checkTime, "{y}-{m}-{d}"));
  352. this.$set(this.newData, 'voiceList', data.data.voiceList ? data.data.voiceList : []);
  353. }
  354. },
  355. //整改详情
  356. async securityAppCheckDangerGetCheckProDetail() {
  357. let obj = {
  358. planId: this.optionData.checkPlanSetVoList.planId,
  359. planSetId: this.optionData.checkPlanSetVoList.planSetId,
  360. checkCategory: this.optionData.checkCategory,
  361. hazardCheckPro: this.optionData.hazardCheckPro,
  362. setOptionId: this.optionData.setOptionId?this.optionData.setOptionId:'',
  363. subId: this.optionData.subId,
  364. }
  365. const {
  366. data
  367. } = await securityAppCheckDangerGetCheckProDetail(obj);
  368. if (data.code == 200) {
  369. uni.setNavigationBarTitle({
  370. title: data.data.subName + '(' + data.data.roomNum + ')'
  371. })
  372. data.data.checkCollapse = true;
  373. // data.data.checkCollapse = false;
  374. data.data.inspectDot = false;
  375. data.data.checkTime = parseTime(data.data.checkTime, "{y}-{m}-{d}");
  376. data.data.checkRectifyVoList.forEach(function(item, index) {
  377. item.rectifyTime = parseTime(item.rectifyTime, "{y}-{m}-{d}");
  378. item.reviewTime = parseTime(item.reviewTime, "{y}-{m}-{d}");
  379. item.rectifyCollapse = false;
  380. item.reviewCollapse = false;
  381. if (index == data.data.checkRectifyVoList.length - 1) {
  382. item.rectifyCollapse = true;
  383. item.reviewCollapse = true;
  384. }
  385. })
  386. this.$set(this, 'newData', data.data);
  387. this.$set(this.newData, 'voiceList', data.data.voiceList ? data.data.voiceList : []);
  388. }
  389. },
  390. async securityAppCheckSetOptionList(item, checkStatus) {
  391. let self = this;
  392. let upData = item;
  393. let obj = {
  394. page: 1,
  395. pageSize: 20,
  396. checkStatus: checkStatus,
  397. manageId: upData.manageId,
  398. }
  399. this.inspectRemporaryList = [];
  400. const {
  401. data
  402. } = await securityAppCheckSetOptionList(obj);
  403. if (data.code == 200 && checkStatus == 0) { //先查询待检查数据
  404. if (data.data.records[0]) {
  405. let infoData = self.optionData;
  406. infoData.pageType = 0;
  407. infoData.subName = upData.subName;
  408. infoData.roomNum = upData.roomNum;
  409. infoData.subId = data.data.records[0].subId;
  410. infoData.manageId = data.data.records[0].manageId;
  411. infoData.setOptionId = data.data.records[0].setOptionId;
  412. infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
  413. infoData.checkCategory = data.data.records[0].checkCategory;
  414. uni.navigateTo({
  415. url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
  416. encodeURIComponent(
  417. JSON
  418. .stringify(infoData))
  419. });
  420. } else {
  421. uni.showToast({
  422. title: '该实验室暂无检查工作!',
  423. icon: "none",
  424. mask: true,
  425. duration: 2000
  426. });
  427. }
  428. }
  429. },
  430. //语音备忘播放
  431. async voicePlay(item) {
  432. myaudio.src = config.base_url + item;
  433. myaudio.play();
  434. },
  435. //获取检查项在当前实验室出现的次数
  436. async securityAppCheckPhotoGetCheckNumBySub() {
  437. let obj = {
  438. subId: this.subId,
  439. hazardCheckPro: this.hazardCheckPro,
  440. }
  441. const {
  442. data
  443. } = await securityAppCheckPhotoGetCheckNumBySub(obj);
  444. if (data.code == 200) {
  445. this.$set(this, 'hazardCheckNum', data.data);
  446. }
  447. },
  448. hiddenDangerClick(row) {
  449. if (!this.hiddenDangerRecordStatus) {
  450. let infoData = this.optionData;
  451. infoData.subName = this.newData.subName;
  452. infoData.roomNum = this.newData.roomNum;
  453. infoData.hiddenDangerRecordStatus = true; //判断是否跳转隐患列表
  454. uni.navigateTo({
  455. url: '/pages_safetyCheck/views/inspectManage/hiddenDangerRecord?infoData=' +
  456. encodeURIComponent(JSON.stringify(infoData))
  457. });
  458. }
  459. },
  460. //检查-按钮
  461. submitBtn(status) {
  462. if (status == 1) {
  463. //编辑
  464. if (this.pageType == 0) {
  465. //检查
  466. let infoData = this.optionData;
  467. infoData.hazardCheckPro = this.newData.hazardCheckPro;
  468. infoData.hazardCheckCode = this.newData.hazardCheckCode;
  469. infoData.hazardCheckName = this.newData.hazardCheckName;
  470. infoData.hazardCheckPro2 = this.newData.hazardCheckPro2;
  471. infoData.hazardCheckCode2 = this.newData.hazardCheckCode2;
  472. infoData.hazardCheckName2 = this.newData.hazardCheckName2;
  473. infoData.hazardCheckPro1 = this.newData.hazardCheckPro1;
  474. infoData.hazardCheckCode1 = this.newData.hazardCheckCode1;
  475. infoData.hazardCheckName1 = this.newData.hazardCheckName1;
  476. infoData.hazardCheckPoint = this.newData.hazardCheckPoint;
  477. infoData.editStatus = true;
  478. uni.redirectTo({
  479. url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
  480. encodeURIComponent(
  481. JSON
  482. .stringify(infoData))
  483. });
  484. } else if (this.pageType == 1) {
  485. //复核
  486. let infoData = this.optionData
  487. infoData.editStatus = true;
  488. uni.redirectTo({
  489. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
  490. encodeURIComponent(
  491. JSON
  492. .stringify(infoData))
  493. });
  494. } else if (this.pageType == 2) {
  495. //整改
  496. let infoData = this.optionData
  497. infoData.editStatus = true;
  498. uni.redirectTo({
  499. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
  500. encodeURIComponent(
  501. JSON
  502. .stringify(infoData))
  503. });
  504. }
  505. } else if (status == 2) {
  506. //继续检查
  507. if (this.pageType == 0) {
  508. //开展检查
  509. let infoData = this.checkPlanList[0];
  510. console.log('infoData',infoData)
  511. console.log('optionData',this.optionData)
  512. infoData.manageId = this.optionData.manageId;
  513. infoData.manageStatus = this.optionData.manageStatus;
  514. infoData.planSetId = this.optionData.planSetId;
  515. infoData.hazardCheckPro = this.checkPlanList[0].hazardCheckPro;
  516. infoData.pageType = this.pageType;
  517. infoData.itemsStatus = this.curTabTow;
  518. infoData.checkCategory = this.optionData.checkCategory;
  519. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  520. infoData.subId = this.optionData.subId;
  521. infoData.subName = this.optionData.subName;
  522. infoData.roomNum = this.optionData.roomNum;
  523. infoData.subRoom = this.optionData.subRoom;
  524. uni.redirectTo({
  525. url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
  526. encodeURIComponent(
  527. JSON
  528. .stringify(infoData))
  529. });
  530. } else {
  531. let infoData = this.optionData;
  532. uni.redirectTo({
  533. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  534. encodeURIComponent(JSON
  535. .stringify(infoData))
  536. });
  537. }
  538. }
  539. },
  540. //图片预览
  541. lockImg(list) {
  542. if (!list[0]) {
  543. return
  544. }
  545. let urlList = [];
  546. for (let i = 0; i < list.length; i++) {
  547. urlList.push(config.base_url + list[i].fileUrl)
  548. }
  549. wx.previewImage({
  550. urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  551. current: '', // 当前显示图片的http链接,默认是第一个
  552. success: function(res) {},
  553. fail: function(res) {},
  554. complete: function(res) {},
  555. })
  556. },
  557. //折叠展开
  558. inspectDot() {
  559. this.newData.inspectDot = !this.newData.inspectDot
  560. },
  561. checkCollapse(row) {
  562. this.newData.checkCollapse = !this.newData.checkCollapse
  563. },
  564. rectifyCollapse(row) {
  565. row.rectifyCollapse = !row.rectifyCollapse
  566. },
  567. reviewCollapse(row) {
  568. row.reviewCollapse = !row.reviewCollapse
  569. },
  570. //基础检查项检查
  571. async securityCheckOptionSelAllList() {
  572. let self = this;
  573. const {
  574. data
  575. } = await securityCheckOptionSelAllList({});
  576. if (data.code == 200) {
  577. let maxList = this.getCascaderData(JSON.parse(JSON.stringify(data.data)), 2)
  578. this.$nextTick(() => {
  579. this.securityAppCheckPlanSetGetOptionList(maxList);
  580. })
  581. }
  582. },
  583. //查询批次下-检查项
  584. async securityAppCheckPlanSetGetOptionList(maxList){
  585. let self = this;
  586. const {
  587. data
  588. } = await securityAppCheckPlanSetGetOptionList({
  589. planSetId:this.optionData.planSetId,
  590. searchValue: this.searchValue
  591. });
  592. if (data.code == 200) {
  593. if (data.data[0]) {
  594. let minList = JSON.parse(JSON.stringify(data.data))
  595. this.newCascadeData(maxList, minList);
  596. }
  597. }
  598. },
  599. newCascadeData(maxList, minList) {
  600. let list = [];
  601. for (let i = 0; i < maxList.length; i++) {
  602. for (let o = 0; o < maxList[i].children.length; o++) {
  603. for (let x = 0; x < minList.length; x++) {
  604. if (maxList[i].children[o].id == minList[x].parentId) {
  605. // //三级
  606. minList[x].level = 3;
  607. minList[x].hazardCheckPro = minList[x].id
  608. minList[x].hazardCheckCode = minList[x].code
  609. minList[x].hazardCheckName = minList[x].name
  610. minList[x].hazardCheckPro2 = maxList[i].children[o].id
  611. minList[x].hazardCheckCode2 = maxList[i].children[o].code
  612. minList[x].hazardCheckName2 = maxList[i].children[o].name
  613. minList[x].hazardCheckPro1 = maxList[i].id
  614. minList[x].hazardCheckCode1 = maxList[i].code
  615. minList[x].hazardCheckName1 = maxList[i].name
  616. minList[x].hazardCheckPoint = minList[x].mainPoint.split('#')[0]
  617. list.push(minList[x])
  618. }
  619. }
  620. }
  621. }
  622. this.$set(this, 'checkPlanList', JSON.parse(JSON.stringify(list)));
  623. },
  624. getCascaderData(list, type) {
  625. let self = this
  626. for (let i = 0; i < list.length; i++) {
  627. if (list[i].level == type) {
  628. delete list[i].children
  629. } else if (list[i].children) {
  630. if (list[i].children[0]) {
  631. list[i].children = self.getCascaderData(list[i].children, type)
  632. } else {
  633. list.splice(i, 1)
  634. i--
  635. }
  636. } else {
  637. list.splice(i, 1)
  638. i--
  639. }
  640. }
  641. for (let i = 0; i < list.length; i++) {
  642. if (list[i].level == type) {
  643. delete list[i].children
  644. } else if (list[i].children) {
  645. if (list[i].children[0]) {
  646. list[i].children = self.getCascaderData(list[i].children, type)
  647. } else {
  648. list.splice(i, 1)
  649. i--
  650. }
  651. } else {
  652. list.splice(i, 1)
  653. i--
  654. }
  655. }
  656. for (let i = 0; i < list.length; i++) {
  657. if (list[i].level == type) {
  658. delete list[i].children
  659. } else if (list[i].children) {
  660. if (list[i].children[0]) {
  661. list[i].children = self.getCascaderData(list[i].children, type)
  662. } else {
  663. list.splice(i, 1)
  664. i--
  665. }
  666. } else {
  667. list.splice(i, 1)
  668. i--
  669. }
  670. }
  671. return list
  672. },
  673. }
  674. }
  675. </script>
  676. <style lang="stylus" scoped>
  677. .snapshotDetail {
  678. height: 100%;
  679. display flex;
  680. box-sizing: border-box;
  681. padding-bottom: 160rpx;
  682. box-sizing: border-box;
  683. .tip {
  684. width: 750rpx;
  685. height: 80rpx;
  686. background: rgba(1, 131, 250, 0.2);
  687. border-radius: 0rpx 0rpx 0rpx 0rpx;
  688. font-size: 30rpx;
  689. color: #0183FA;
  690. line-height: 80rpx;
  691. text-align: center;
  692. }
  693. .tip-tow {
  694. width: 750rpx;
  695. height: 80rpx;
  696. background: rgba(255, 140, 0, 0.2);
  697. border-radius: 0rpx 0rpx 0rpx 0rpx;
  698. font-size: 30rpx;
  699. color: #FF8C00;
  700. line-height: 80rpx;
  701. text-align: center;
  702. }
  703. .list {
  704. width: 750rpx;
  705. .list-li {
  706. display: flex;
  707. justify-content: space-between;
  708. align-items: center;
  709. border-bottom: 1rpx solid #E0E0E0;
  710. background: #FFFFFF;
  711. padding: 0 30rpx;
  712. box-sizing: border-box;
  713. >view:nth-of-type(1) {
  714. font-size: 30rpx;
  715. color: #333333;
  716. line-height: 100rpx;
  717. text-align: left;
  718. }
  719. >view:nth-of-type(2) {
  720. font-size: 28rpx;
  721. color: #666666;
  722. line-height: 100rpx;
  723. text-align: left;
  724. display: flex;
  725. justify-content: space-between;
  726. align-items: center;
  727. >img {
  728. width: 24rpx;
  729. height: 12rpx;
  730. margin-left: 10rpx;
  731. }
  732. }
  733. }
  734. .file-li {
  735. display: flex;
  736. justify-content: space-between;
  737. align-items: center;
  738. padding: 0 30rpx;
  739. box-sizing: border-box;
  740. >img:nth-of-type(1) {
  741. width: 30rpx;
  742. height: 30rpx;
  743. }
  744. >view {
  745. flex: 1;
  746. font-size: 28rpx;
  747. color: #333333;
  748. line-height: 80rpx;
  749. text-align: left;
  750. margin: 0 92rpx 0 16rpx;
  751. overflow: hidden;
  752. text-overflow: ellipsis;
  753. white-space: nowrap;
  754. }
  755. >img:nth-of-type(2) {
  756. width: 30rpx;
  757. height: 30rpx;
  758. }
  759. }
  760. .hidden {
  761. width: 750rpx;
  762. background: #fff;
  763. overflow: hidden;
  764. border-bottom: 2rpx solid #E0E0E0;
  765. .hidden-content {
  766. border-radius: 20rpx 20rpx 20rpx 20rpx;
  767. width: 690rpx;
  768. min-height: 180rpx;
  769. background: #F5F5F5;
  770. margin: 40rpx 30rpx;
  771. padding: 20rpx;
  772. box-sizing: border-box;
  773. font-size: 28rpx;
  774. color: #666666;
  775. line-height: 44rpx;
  776. text-align: left;
  777. }
  778. }
  779. .photo {
  780. display: flex;
  781. justify-content: flex-start;
  782. flex-wrap: wrap;
  783. padding: 20rpx 30rpx 0;
  784. box-sizing: border-box;
  785. background: #fff;
  786. border-bottom: 2rpx solid #E0E0E0;
  787. >img {
  788. width: 150rpx;
  789. height: 150rpx;
  790. border-radius: 10rpx 10rpx 10rpx 10rpx;
  791. margin: 0 10rpx 10rpx 0;
  792. }
  793. >img:nth-of-type(4) {
  794. margin-right: 0;
  795. }
  796. }
  797. /* .list-li:last-of-type {
  798. border: none;
  799. } */
  800. .hazardCheckNum {
  801. border-bottom: 2rpx solid #E0E0E0;
  802. padding: 30rpx 40rpx 34rpx 40rpx;
  803. box-sizing: border-box;
  804. background: #fff;
  805. display: flex;
  806. justify-content: flex-end;
  807. align-items: center;
  808. .hazardCheckNum-l {
  809. width: 30rpx;
  810. height: 30rpx;
  811. margin-right: 18rpx;
  812. }
  813. .hazardCheckNum-r {
  814. font-size: 28rpx;
  815. color: #FF5900;
  816. line-height: 40rpx;
  817. text-align: left;
  818. }
  819. }
  820. }
  821. .srearch {
  822. display: flex;
  823. justify-content: space-between;
  824. align-items: center;
  825. .srearch-l {
  826. font-size: 30rpx;
  827. color: #333333;
  828. line-height: 100rpx;
  829. text-align: left;
  830. }
  831. .srearch-r {
  832. width: 30rpx;
  833. height: 30rpx;
  834. margin-right: 0rpx;
  835. }
  836. }
  837. }
  838. /* 语音备注 */
  839. .voice {
  840. width: 750rpx;
  841. min-height: 100rpx;
  842. background: #FFFFFF;
  843. border-radius: 20rpx 20rpx 20rpx 20rpx;
  844. overflow: hidden;
  845. .voice_t {
  846. height: 100rpx;
  847. display: flex;
  848. justify-content: space-between;
  849. align-items: center;
  850. padding: 0 30rpx;
  851. box-sizing: border-box;
  852. border-bottom: 2rpx solid #E0E0E0;
  853. margin-bottom: 40rpx;
  854. .voice_t_t {
  855. width: 100%;
  856. display: flex;
  857. justify-content: space-between;
  858. >text:nth-of-type(1) {
  859. font-size: 30rpx;
  860. color: #333333;
  861. line-height: 100rpx;
  862. }
  863. >text:nth-of-type(2) {
  864. font-size: 28rpx;
  865. color: #999999;
  866. line-height: 100rpx;
  867. }
  868. }
  869. .voice_t_b {
  870. width: 100%;
  871. font-size: 30rpx;
  872. font-family: PingFang SC-Medium, PingFang SC;
  873. font-weight: 400;
  874. color: #333333;
  875. line-height: 100rpx;
  876. text-align: left;
  877. }
  878. }
  879. .voice_b {
  880. display flex;
  881. justify-content flex-start;
  882. align-items center;
  883. margin-bottom: 20rpx;
  884. padding: 0 30rpx;
  885. box-sizing: border-box;
  886. .voice_b_l {
  887. width: 400rpx;
  888. height: 40rpx;
  889. background: #0183FA;
  890. border-radius: 10rpx;
  891. display flex;
  892. justify-content flex-start;
  893. align-items center;
  894. font-size: 24rpx;
  895. color: #FFFFFF;
  896. line-height: 30rpx;
  897. text-align: left;
  898. >img {
  899. width: 20rpx;
  900. height: 20rpx;
  901. margin-left: 16rpx;
  902. margin-right: 20rpx;
  903. }
  904. }
  905. .voice_b_r {
  906. width: 28rpx;
  907. height: 28rpx;
  908. margin-left: 20rpx;
  909. }
  910. }
  911. .voice-btn {
  912. width: 150rpx;
  913. height: 150rpx;
  914. position: fixed;
  915. right: 24rpx;
  916. bottom: 176rpx;
  917. >img {
  918. width: 150rpx;
  919. height: 150rpx;
  920. position: absolute;
  921. }
  922. >text {
  923. font-size: 24rpx;
  924. color: #999999;
  925. line-height: 30rpx;
  926. text-align: center;
  927. position: absolute;
  928. top: 84rpx;
  929. left: 26rpx;
  930. }
  931. }
  932. }
  933. .subBtn {
  934. display: flex;
  935. justify-content: center;
  936. position: fixed;
  937. bottom: 30rpx;
  938. width: 750rpx;
  939. padding: 0 46rpx;
  940. box-sizing: border-box;
  941. >img {
  942. width: 160rpx;
  943. height: 160rpx;
  944. }
  945. }
  946. .sub-btn {
  947. display: flex;
  948. justify-content: center;
  949. position: fixed;
  950. left: 30rpx;
  951. bottom: 30rpx;
  952. >view:nth-of-type(1) {
  953. width: 345rpx;
  954. height: 100rpx;
  955. background: #FF8C00;
  956. border-radius: 50rpx 0rpx 0rpx 50rpx;
  957. font-size: 30rpx;
  958. color: #FFFFFF;
  959. line-height: 100rpx;
  960. text-align: center;
  961. }
  962. >view:nth-of-type(2) {
  963. width: 345rpx;
  964. height: 100rpx;
  965. background: #0183FA;
  966. border-radius: 0rpx 50rpx 50rpx 0rpx;
  967. font-size: 30rpx;
  968. color: #FFFFFF;
  969. line-height: 100rpx;
  970. text-align: center;
  971. }
  972. }
  973. .sub-btn-tow {
  974. width: 686rpx;
  975. height: 100rpx;
  976. background: #0183FA;
  977. border-radius: 50rpx 50rpx 50rpx 50rpx;
  978. position: fixed;
  979. left: 30rpx;
  980. bottom: 30rpx;
  981. font-weight: 400;
  982. font-size: 30rpx;
  983. color: #FFFFFF;
  984. line-height: 100rpx;
  985. text-align: center;
  986. }
  987. .inspectRecord {
  988. position: fixed;
  989. top: 118rpx;
  990. right: 0;
  991. z-index: 200;
  992. width: 160rpx;
  993. height: 60rpx;
  994. background: #0183FA;
  995. border-radius: 50rpx 0rpx 0rpx 50rpx;
  996. font-size: 30rpx;
  997. color: #FFFFFF;
  998. line-height: 60rpx;
  999. text-align: center;
  1000. }
  1001. </style>