hiddenDangerItemsDetail.vue 30 KB

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