hiddenDangerItemsDetail.vue 30 KB

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