dangerDetail.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225
  1. <!-- 安全检查-安全隐患 -->
  2. <template>
  3. <view class="examine">
  4. <scroll-view scroll-x @scrolltolower="scrollGet" class="header">
  5. <view class="tabTitle_tow">
  6. <view class="tabTitle_tow_li" @tap="tabClickTow(item,index)" :key="index" v-for="(item,index) in tabTextTow">
  7. <view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item.name}}</view>
  8. <view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
  9. </view>
  10. </view>
  11. </scroll-view>
  12. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  13. <!-- 隐患检查 -->
  14. <view v-if="curTabIndex=='detail'">
  15. <view class="basics">
  16. <view class="basics_li">
  17. <text>学院:</text>
  18. <text>{{infoData.collegeName}}</text>
  19. </view>
  20. <view class="basics_li">
  21. <text>实验室:</text>
  22. <text>{{infoData.subjectName}}-{{infoData.roomNumber}}</text>
  23. </view>
  24. <view class="basics_li">
  25. <text>楼栋:</text>
  26. <text>{{infoData.buildName}}</text>
  27. </view>
  28. <view class="basics_li">
  29. <text>检查类型:</text>
  30. <text>{{infoData.checkType==1?'校园巡查':(infoData.checkType==2?'实验室自查':'')}}</text>
  31. </view>
  32. <view class="basics_li">
  33. <text>检查范围:</text>
  34. <text>{{infoData.checkRange==1?'全校':(infoData.checkRange==2?'学院':'实验室')}}</text>
  35. </view>
  36. <view class="basics_li" style="border:none;">
  37. <text>计划标题:</text>
  38. <text>{{infoData.title}}</text>
  39. </view>
  40. </view>
  41. <view class="basics">
  42. <view class="basics_li">
  43. <text>检查结果:</text>
  44. <text>{{infoData.checkResult==0?'不符合':(infoData.checkResult==1?'符合':'')}}</text>
  45. </view>
  46. <view class="basics_li">
  47. <text>整改期限:</text>
  48. <text>{{infoData.rectifyDeadline}}</text>
  49. </view>
  50. <view class="basics_li">
  51. <text>整改通知:</text>
  52. <text style="color: #0183FA;" @click="rectifyInform">{{infoData.rectifyNotice == 1?'整改告知书':(infoData.rectifyNotice == 2?'整改通知书':'')}}</text>
  53. </view>
  54. <view class="basics_li">
  55. <text>检查者:</text>
  56. <text>{{infoData.checkUser}}</text>
  57. </view>
  58. <view class="basics_li" style="border:none;">
  59. <text>检查时间:</text>
  60. <text>{{infoData.checkTime}}</text>
  61. </view>
  62. </view>
  63. <view class="danger">
  64. <view class="danger_title">不符合项</view>
  65. <view class="grade">
  66. <text>隐患等级:</text>
  67. <text>{{infoData.checkHazardApplyDto.hazardLevel==2?'一般隐患':(infoData.checkHazardApplyDto.hazardLevel==1?'重大隐患':(infoData.checkHazardApplyDto.hazardLevel==3?'管理问题':''))}}</text>
  68. </view>
  69. <view class="project">
  70. <view class="project_t">检查项目:</view>
  71. <view class="project_b">{{infoData.checkHazardApplyDto.hazardCheckProStr}}</view>
  72. <view class="project_b2" v-if="infoData.checkHazardApplyDto.hazardCheckCount>0">此检查项在当前实验室累计出现{{infoData.checkHazardApplyDto.hazardCheckCount}}次隐患</view>
  73. </view>
  74. <view class="project">
  75. <view class="project_t">检查要点:</view>
  76. <view class="project_b">{{infoData.checkHazardApplyDto.hazardCheckPoint}}</view>
  77. </view>
  78. <view class="project">
  79. <view class="project_t">隐患描述:</view>
  80. <view class="project_b">{{infoData.checkHazardApplyDto.hazardDescribe}}</view>
  81. </view>
  82. <view class="picture">
  83. <view class="picture_t">隐患照片</view>
  84. <view class="picture_b" @click="lockImg(infoData.checkHazardApplyDto.uploadDtoList)">
  85. <img :src="baseUrl+imgItem.fileUrl" v-for="(imgItem,index) in infoData.checkHazardApplyDto.uploadDtoList" :key="index" />
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <view v-for="(item,index) in infoData.checkRectifyApplyList" :key="index" v-if="curTabIndex== index">
  91. <!-- 整改结果 -->
  92. <view v-if="item.applyFlag == 1" class="abarbeitung_result danger">
  93. <view class="grade">
  94. <text>整改结果:</text>
  95. <text style="color: #0183FA;">{{item.rectifyResult == 1?'已整改':(item.rectifyResult == 0?'暂无法整改':'')}}</text>
  96. </view>
  97. <view class="project">
  98. <view class="project_t">整改措施:</view>
  99. <view class="project_b">{{item.rectifyMeasure}}</view>
  100. </view>
  101. <view class="picture">
  102. <view class="picture_t">整改照片:</view>
  103. <view class="picture_b" @click="lockImg(item.uploadDtoList)">
  104. <img :src="baseUrl+imgItem.fileUrl" v-for="(imgItem,imgIndex) in item.uploadDtoList" :key="imgIndex">
  105. </view>
  106. </view>
  107. <view class="grade">
  108. <text>整改人:</text>
  109. <text>{{item.createName}}</text>
  110. </view>
  111. <view class="grade" style="border:none;">
  112. <text>整改时间:</text>
  113. <text >{{item.createTime}}</text>
  114. </view>
  115. </view>
  116. <!-- 复核结果 -->
  117. <view v-if="item.applyFlag == 2" class="review_result danger">
  118. <view class="audit">
  119. <text>审核结果:</text>
  120. <img v-if="item.examineResult == 0" src="@/pages_safetyExamine/images/icon_ywc.png"/>
  121. <img v-if="item.examineResult == 1" src="@/pages_safetyExamine/images/icon_cg.png"/>
  122. </view>
  123. <view class="project">
  124. <view class="project_t">审核意见:</view>
  125. <view class="project_b">{{item.examineOpinion}}</view>
  126. </view>
  127. <view class="grade">
  128. <text>审核人:</text>
  129. <text>{{item.reviewedName}}</text>
  130. </view>
  131. <view class="grade" style="border:none;">
  132. <text>审核时间:</text>
  133. <text >{{item.reviewedTime}}</text>
  134. </view>
  135. </view>
  136. </view>
  137. <!-- 待整改 -->
  138. <view v-if="rectifyStatus==2 && curTabIndex=='add'">
  139. <view class="await">
  140. <view class="result">
  141. <view class="result_l">整改结果</view>
  142. <view class="result_r">
  143. <view v-for="(item,index) in resultArray" :key="index" @click="tabClick(index)">
  144. <text :class="resultIndex==index?'checked':'result_r_l' "></text>
  145. <text class="result_r_r">{{item}}</text>
  146. </view>
  147. </view>
  148. </view>
  149. <view class="describe">
  150. <view class="describe_l">{{form.rectifyResult==1?'整改措施:':'原因描述:'}}</view>
  151. <textarea class="describe_r" type="text" v-model="form.rectifyMeasure" maxlength="50" :placeholder="form.rectifyResult==1?'请输入整改描述:':'请输入原因描述:'" placeholder-style="font-size:28rpx;color:#999;"></textarea>
  152. </view>
  153. <view class="check-for-img-max-box">
  154. <view class="left-title-p">隐患照片(最多上传5张):</view>
  155. <view class="right-img-box">
  156. <view class="img-box" v-for="(imgUrl,imgIndex) in form.uploadDtoList" :key="imgIndex">
  157. <img class="img-data" :src="baseUrl+imgUrl.fileUrl">
  158. <img class="position-img" src="@/pages_manage/images/icon_ssp_closure.png" @click="delImg(imgIndex)">
  159. </view>
  160. <img class="add-button" src="@/pages_manage/images/icon_07.png" @click="selectImage()" v-if="form.uploadDtoList.length<5">
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. <!-- 待复核 -->
  166. <view v-if="rectifyStatus==3 && curTabIndex=='check'" class="review">
  167. <view class="describe">
  168. <view class="describe_l">审核意见:</view>
  169. <textarea class="describe_r" type="text" v-model="form.examineOpinion" maxlength="50" placeholder="请输入审核意见" placeholder-style="font-size:28rpx;color:#999;"></textarea>
  170. </view>
  171. <view class="quick">
  172. <view class="quick_l">审核意见快捷输入</view>
  173. <view class="quick_r">
  174. <text @click="quickSelect(index)" :class="item.type?'quick_B':'quick_A'" v-for="(item,index) in quickArray">{{item.name}}</text>
  175. </view>
  176. </view>
  177. </view>
  178. <!-- 暂无法整改 -->
  179. <!-- <view v-if="rectifyStatus==4" class="incapable danger">
  180. <view class="grade">
  181. <text>整改结果:</text>
  182. <text style="color: #0183FA;">暂无法整改</text>
  183. </view>
  184. <view class="project">
  185. <view class="project_t">原因描述:</view>
  186. <view class="project_b">实验室施工</view>
  187. </view>
  188. <view class="picture">
  189. <view class="picture_t">上传照片:</view>
  190. <view class="picture_b">
  191. <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
  192. <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
  193. <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
  194. <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
  195. </view>
  196. </view>
  197. <view class="grade">
  198. <text>整改人:</text>
  199. <text>褚朝朝</text>
  200. </view>
  201. <view class="grade" style="border:none;">
  202. <text>整改时间:</text>
  203. <text >2023-04-0114:00</text>
  204. </view>
  205. </view> -->
  206. </scroll-view>
  207. <view class="bottom_btn" @click="submitForm('rectify')" v-if="rectifyStatus==2 && rectifyGentle">提交</view>
  208. <view class="bottom_btn_tow" v-if="rectifyStatus==3 && applyGentle">
  209. <text @click="submitForm('reject')">驳回</text>
  210. <text @click="submitForm('pass')">通过</text>
  211. </view>
  212. </view>
  213. </template>
  214. <script>
  215. import { config } from '@/api/request/config.js'
  216. import {getHazardById,checkHazardAdd} from '@/api/index.js'
  217. export default {
  218. name: "rectifyList",
  219. components: {
  220. },
  221. data() {
  222. return {
  223. baseUrl:config.base_url,
  224. id:'',
  225. pageType:0,
  226. //列表请求参数
  227. getData:{
  228. pageNum:1,
  229. pageSize:20,
  230. },
  231. tabTextTow:[],
  232. curTabTow:0,
  233. curTabIndex:'detail',//随顶部按钮点击变化索引
  234. resultIndex:0,
  235. resultArray:['已整改','暂无法整改'],
  236. form:{
  237. checkHazardId:'',// 隐患id
  238. rectifyType:'',// 整改类型:1是院校巡查,2是自查
  239. rectifyResult:'1',//1是已整改,0是暂无法整改
  240. rectifyMeasure:'',//整改措施
  241. uploadDtoList:[],
  242. //复核---------------
  243. id:'',
  244. examineResult:'',//审核结果1是通过,0是驳回
  245. examineOpinion:'',
  246. },
  247. quickIndex:0,
  248. quickArray:[{name:'复核驳回',type:false},{name:'驳回再整改',type:false},{name:'请补充材料',type:false},{name:'请补充描述',type:false},{name:'未解决',type:false}],
  249. infoData:{},
  250. item:{},
  251. rectifyStatus:'',//1已完成 2待整改 3待复核 4 暂无法整改
  252. checkType:null,
  253. applyGentle:false,//待复核-有没有审核权限
  254. rectifyGentle:false,//待整改-有没有整改权限
  255. }
  256. },
  257. onLoad(option) {
  258. console.log(option.item)
  259. if(option.item){
  260. this.item=JSON.parse(decodeURIComponent(option.item));
  261. this.id=this.item.id
  262. this.rectifyStatus=this.item.rectifyStatus;
  263. this.getHazardById()
  264. }
  265. },
  266. onShow() {
  267. },
  268. mounted(){
  269. },
  270. methods: {
  271. //整改结果
  272. tabClick(index) {
  273. this.resultIndex = index;
  274. if(index==0){
  275. this.form.rectifyResult=1
  276. }else if(index==1){
  277. this.form.rectifyResult=0
  278. }
  279. },
  280. //顶部tab点击
  281. tabClickTow(item,index) {
  282. this.curTabTow = index;
  283. this.pageType=index;
  284. if(item.type=='detail' || item.type=='add' || item.type=='check'){
  285. this.curTabIndex=item.type
  286. }else{
  287. this.curTabIndex=index-1;
  288. }
  289. console.log(this.curTabIndex)
  290. },
  291. //详情
  292. async getHazardById(){
  293. let _this = this;
  294. const {data} = await getHazardById({id:this.id});
  295. if(data.code == 200){
  296. this.infoData=data.data
  297. this.form.checkHazardId=data.data.checkHazardApplyDto.id;
  298. this.form.rectifyType=data.data.checkType;
  299. if(data.data.checkType==1){
  300. uni.setNavigationBarTitle({
  301. title:'校院巡查隐患'
  302. })
  303. }else if(data.data.checkType==2){
  304. uni.setNavigationBarTitle({
  305. title:'实验室自查隐患'
  306. })
  307. }
  308. this.applyGentle=data.data.checkHazardApplyDto.applyGentle
  309. this.rectifyGentle=data.data.checkHazardApplyDto.rectifyGentle
  310. if(data.data.checkRectifyApplyList.length>0){
  311. for(let i=0;i<data.data.checkRectifyApplyList.length;i++){
  312. this.form.id=data.data.checkRectifyApplyList[i].id;
  313. }
  314. }
  315. this.checkType=data.data.checkType;//检查类型 1校院巡查 2实验室自查
  316. if(data.data.checkRectifyApplyList[0]){
  317. this.tabTextTow.push({'type':'detail','name':'隐患检查'})
  318. for(let i=0;i<data.data.checkRectifyApplyList.length;i++){
  319. if(i == 0){
  320. this.tabTextTow.push({'type':'item','name':'隐患整改'})
  321. }else if(i == 1){
  322. this.tabTextTow.push({'type':'item','name':'整改复核'})
  323. }else{
  324. let nameLeft = this.frequencyCalculation(i,data.data.checkRectifyApplyList[i].applyFlag);
  325. let nameRight = data.data.checkRectifyApplyList[i].applyFlag == 1?'整改':'复核';
  326. this.tabTextTow.push({'type':'item','name':nameLeft+nameRight})
  327. }
  328. }
  329. if(this.rectifyStatus==3 && this.applyGentle){
  330. this.tabTextTow.push({'type':'check','name':'整改复核'})
  331. }else if(this.rectifyStatus==2 && this.rectifyGentle){
  332. this.tabTextTow.push({'type':'add','name':'隐患整改'})
  333. }
  334. }else{
  335. if(this.rectifyStatus==2 && this.rectifyGentle){//有整改权限
  336. this.tabTextTow=[{'type':'detail','name':'隐患检查'},{'type':'add','name':'隐患整改'}]
  337. }else{
  338. this.tabTextTow=[{'type':'detail','name':'隐患检查'}]
  339. }
  340. }
  341. }
  342. },
  343. //多次名称匹配
  344. frequencyCalculation(length,type){
  345. console.log(length)
  346. console.log(type)
  347. let textList = [
  348. {value:'二次',key:'2'},{value:'三次',key:'3'},{value:'四次',key:'4'},{value:'五次',key:'5'}, {value:'六次',key:'6'}, {value:'七次',key:'7'},
  349. {value:'八次',key:'8'},{value:'九次',key:'9'},{value:'十次',key:'10'}
  350. ]
  351. let num = type === 2?Math.ceil(length/2):Math.floor(length/2)
  352. if(type == 1){
  353. num++
  354. }
  355. if (num > 10){
  356. return '再次'
  357. } else{
  358. for(let i=0;i<textList.length;i++){
  359. if(num == textList[i].key){
  360. return textList[i].value
  361. console.log(textList[i].value)
  362. }
  363. }
  364. }
  365. },
  366. //滚动事件
  367. scrollGet(){},
  368. handleClick(doType){
  369. let self=this;
  370. if( doType=='subBtn'){//
  371. console.log(11)
  372. }
  373. },
  374. //查看图片
  375. lockImg(list){
  376. console.log(list)
  377. if(!list[0]){
  378. return
  379. }
  380. let urlList=[];
  381. for(let i=0;i<list.length;i++){
  382. urlList.push(this.baseUrl+list[i].fileUrl)
  383. }
  384. console.log(urlList)
  385. wx.previewImage({
  386. urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  387. current: '', // 当前显示图片的http链接,默认是第一个
  388. success: function(res) {},
  389. fail: function(res) {},
  390. complete: function(res) {},
  391. })
  392. },
  393. //快捷选择
  394. quickSelect(index) {
  395. this.quickArray[index].type = !this.quickArray[index].type
  396. this.form.examineOpinion=this.quickArray[index].name
  397. let _this = this;
  398. if (_this.quickArray[index].type == true) {
  399. _this.quickArray.forEach(function(item2) {
  400. if (item2.name == _this.quickArray[index].name) {
  401. item2.type = true
  402. } else {
  403. item2.type = false
  404. }
  405. })
  406. }else{
  407. this.form.examineOpinion='';
  408. }
  409. },
  410. // 图片上传
  411. selectImage(item) {
  412. let self = this;
  413. if(this.form.uploadDtoList.length>4){
  414. uni.showToast({
  415. title: '最多上传5张图片',
  416. icon:"none",
  417. mask:true,
  418. duration: 2000
  419. });
  420. return
  421. }
  422. wx.chooseImage({
  423. count: 1,
  424. sizeType: ["original", "compressed"],
  425. sourceType: ["album", "camera"],
  426. success: function(res) {
  427. let tempFilePaths = res.tempFilePaths[0];
  428. self.uploadImg(tempFilePaths);
  429. }
  430. });
  431. },
  432. async uploadImg(tempFilePaths){
  433. var self = this;
  434. uni.showLoading({
  435. title: '上传中',
  436. mask: true
  437. });
  438. uni.uploadFile({
  439. url: config.base_url+'/base/file/upload', //仅为示例,非真实的接口地址
  440. header:{'Authorization':uni.getStorageSync('token')},
  441. filePath: tempFilePaths,
  442. name: 'file',
  443. formData: {
  444. 'user': 'test'
  445. },
  446. success: (uploadFileRes) => {
  447. let res = JSON.parse(uploadFileRes.data);
  448. if(res.code == 200){
  449. self.form.uploadDtoList.push({'fileUrl':res.data.url,'fileName':res.data.name});
  450. }else{
  451. uni.showToast({
  452. title: res.msg,
  453. icon:"none",
  454. mask:true,
  455. duration: 2000
  456. });
  457. }
  458. },
  459. fail: err => {},
  460. complete: () => {
  461. uni.hideLoading()
  462. }
  463. });
  464. },
  465. //删除图片
  466. delImg(minIndex){
  467. this.form.uploadDtoList.splice(minIndex,1);
  468. this.$forceUpdate();
  469. },
  470. //整改通知
  471. rectifyInform(){//rectifyNotice 整改通知(1整改告知书 2整改通知书)
  472. if(this.infoData.rectifyNotice==1){//1整改告知书
  473. this.genReport(this.infoData.id)
  474. }else if(this.infoData.rectifyNotice==2){//2整改通知书
  475. this.genNotice(this.infoData.id)
  476. }
  477. },
  478. //整改报告
  479. rectifyReport(){
  480. uni.showLoading({
  481. title: '下载中'
  482. });
  483. wx.downloadFile({
  484. url: config.base_url+'/zd-security/checkRectify/genReport/' + this.infoData.id,
  485. header: {
  486. Authorization: uni.getStorageSync('token')
  487. },
  488. success: function (res) {
  489. const fileManager = wx.getFileSystemManager()
  490. const filePath = wx.env.USER_DATA_PATH + '/(整改报告).docx'
  491. fileManager.saveFile({
  492. tempFilePath: res.tempFilePath,
  493. filePath,
  494. success: () => {
  495. uni.hideLoading();
  496. wx.openDocument({
  497. filePath: filePath,
  498. showMenu: true,
  499. fileType: 'docx'
  500. })
  501. },
  502. fail: function (res){
  503. uni.hideLoading();
  504. uni.showToast({
  505. title: '下载失败',
  506. icon:"none",
  507. mask:true,
  508. duration: 2000
  509. });
  510. }
  511. })
  512. },
  513. fail: function (res){
  514. uni.hideLoading();
  515. uni.showToast({
  516. title: '下载失败',
  517. icon:"none",
  518. mask:true,
  519. duration: 2000
  520. });
  521. }
  522. })
  523. },
  524. //整改通知书
  525. genNotice(id){
  526. uni.showLoading({
  527. title: '下载中'
  528. });
  529. wx.downloadFile({
  530. url: config.base_url+'/zd-security/checkManage/getRectifyAdviceNote/' + id,
  531. header: {
  532. Authorization: uni.getStorageSync('token')
  533. },
  534. success: function (res) {
  535. const fileManager = wx.getFileSystemManager()
  536. const filePath = wx.env.USER_DATA_PATH + '/(整改通知书).docx'
  537. fileManager.saveFile({
  538. tempFilePath: res.tempFilePath,
  539. filePath,
  540. success: () => {
  541. uni.hideLoading();
  542. wx.openDocument({
  543. filePath: filePath,
  544. showMenu: true,
  545. fileType: 'docx'
  546. })
  547. },
  548. fail: function (res){
  549. uni.hideLoading();
  550. uni.showToast({
  551. title: '下载失败',
  552. icon:"none",
  553. mask:true,
  554. duration: 2000
  555. });
  556. }
  557. })
  558. },
  559. fail: function (res){
  560. uni.hideLoading();
  561. uni.showToast({
  562. title: '下载失败',
  563. icon:"none",
  564. mask:true,
  565. duration: 2000
  566. });
  567. }
  568. })
  569. },
  570. //整改告知书
  571. genReport(id){
  572. uni.showLoading({
  573. title: '下载中'
  574. });
  575. wx.downloadFile({
  576. url: config.base_url+'/zd-security/checkManage/getRectifyNotification/' + id,
  577. header: {
  578. Authorization: uni.getStorageSync('token')
  579. },
  580. success: function (res) {
  581. const fileManager = wx.getFileSystemManager()
  582. const filePath = wx.env.USER_DATA_PATH + '/整改报告.docx'
  583. fileManager.saveFile({
  584. tempFilePath: res.tempFilePath,
  585. filePath,
  586. success: () => {
  587. uni.hideLoading();
  588. wx.openDocument({
  589. filePath: filePath,
  590. showMenu: true,
  591. fileType: 'docx'
  592. })
  593. },
  594. fail: function (res){
  595. uni.hideLoading();
  596. uni.showToast({
  597. title: '下载失败',
  598. icon:"none",
  599. mask:true,
  600. duration: 2000
  601. });
  602. }
  603. })
  604. },
  605. fail: function (res){
  606. uni.hideLoading();
  607. uni.showToast({
  608. title: '下载失败',
  609. icon:"none",
  610. mask:true,
  611. duration: 2000
  612. });
  613. }
  614. })
  615. },
  616. async submitForm(doType){
  617. let _this = this;
  618. let obj={};
  619. if(doType=='rectify'){//整改
  620. obj.checkHazardId=this.form.checkHazardId;
  621. obj.rectifyType=this.form.rectifyType;
  622. obj.rectifyResult=this.form.rectifyResult;
  623. obj.rectifyMeasure=this.form.rectifyMeasure;
  624. obj.uploadDtoList=this.form.uploadDtoList;
  625. }else if(doType=='reject' ){//复核 驳回
  626. obj.id=this.form.id;
  627. obj.examineResult=0;
  628. obj.examineOpinion=this.form.examineOpinion;
  629. }else if(doType=='pass'){//复核 通过
  630. obj.id=this.form.id;
  631. obj.examineResult=1;
  632. obj.examineOpinion=this.form.examineOpinion;
  633. }
  634. const {data} = await checkHazardAdd(obj);
  635. if(data.code == 200){
  636. uni.redirectTo({
  637. url: '/pages_safetyExamine/examineManage/examineList?pageType='+this.checkType
  638. });
  639. uni.showToast({
  640. title: '提交成功',
  641. icon:"none",
  642. mask:true,
  643. duration: 2000
  644. });
  645. }
  646. },
  647. }
  648. }
  649. </script>
  650. <style lang="stylus" scoped>
  651. .examine{
  652. height:100%;
  653. display flex;
  654. // padding: 0 30rpx;
  655. // box-sizing: border-box;
  656. padding-bottom: 120rpx;
  657. box-sizing: border-box;
  658. .info-max-box{
  659. flex: 1;
  660. overflow: scroll;
  661. padding: 120rpx 0rpx 0;
  662. box-sizing: border-box;
  663. }
  664. /* 隐患检查 */
  665. .header{
  666. width:750rpx;
  667. height: 100rpx;
  668. position: fixed;
  669. top: 0rpx;
  670. z-index: 100;
  671. background: #fff;
  672. .tabTitle_tow{
  673. height: 100rpx;
  674. white-space: nowrap;
  675. display: inline-flex;
  676. .tabTitle_tow_li{
  677. position: relative;
  678. width:152rpx;
  679. height: 100rpx;
  680. text-align center;
  681. padding-top: 26rpx;
  682. box-sizing: border-box;
  683. .tabTitle_tow_text{
  684. display: inline-block;
  685. font-size: 30rpx;
  686. font-family: PingFang SC;
  687. font-weight: 500;
  688. color: #333333;
  689. line-height: 46rpx;
  690. position: relative;
  691. &.on{
  692. color:#0183FA;
  693. }
  694. }
  695. .tabTitle_tow_across{
  696. width: 50rpx;
  697. height: 4rpx;
  698. background: #0183FA;
  699. border-radius: 2rpx;
  700. margin-left: 33%;
  701. display none;
  702. &.on{
  703. display block;
  704. }
  705. }
  706. }
  707. }
  708. }
  709. .basics{
  710. width: 690rpx;
  711. background: #FFFFFF;
  712. border-radius: 20rpx;
  713. padding: 30rpx 30rpx 32rpx;
  714. box-sizing: border-box;
  715. margin: 20rpx 30rpx ;
  716. .basics_li{
  717. height: 80rpx;
  718. display: flex;
  719. justify-content: space-between;
  720. border-bottom: 1rpx solid #D8D8D8;
  721. >text:nth-of-type(1){
  722. font-size: 28rpx;
  723. font-family: PingFang SC-Medium, PingFang SC;
  724. font-weight: 400;
  725. color: #666666;
  726. line-height: 80rpx;
  727. width: 140rpx;
  728. }
  729. >text:nth-of-type(2){
  730. flex: 1;
  731. font-size: 28rpx;
  732. font-family: PingFang SC-Medium, PingFang SC;
  733. font-weight: 400;
  734. color: #333333;
  735. line-height: 80rpx;
  736. text-align: right;
  737. white-space: nowrap;
  738. overflow: hidden;
  739. text-overflow: ellipsis;
  740. }
  741. }
  742. }
  743. .attachment{
  744. width: 690rpx;
  745. background: #FFFFFF;
  746. border-radius: 20rpx;
  747. margin: 20rpx 30rpx 0;
  748. padding-bottom: 32rpx;
  749. box-sizing: border-box;
  750. .attachment_t{
  751. border-bottom: 1rpx solid #D8D8D8;
  752. >text:nth-of-type(1){
  753. font-size: 30rpx;
  754. font-family: PingFang SC-Medium, PingFang SC;
  755. font-weight: 400;
  756. color: #333333;
  757. line-height: 110rpx;
  758. margin-left: 28rpx;
  759. }
  760. >text:nth-of-type(2){
  761. font-size: 30rpx;
  762. font-family: PingFang SC-Medium, PingFang SC;
  763. font-weight: 400;
  764. color: #999999;
  765. line-height: 110rpx;
  766. margin-left: 24rpx;
  767. }
  768. }
  769. .attachment_li{
  770. height: 40rpx;
  771. display: flex;
  772. justify-content: flex-start;
  773. align-items: center;
  774. margin-top: 32rpx;
  775. >img{
  776. width: 30rpx;
  777. height: 26rpx;
  778. margin-right: 20rpx;
  779. margin-left: 50rpx;
  780. }
  781. >text{
  782. flex: 1;
  783. font-size: 28rpx;
  784. font-family: PingFang SC-Medium, PingFang SC;
  785. font-weight: 400;
  786. color: #0183FA;
  787. line-height: 40rpx;
  788. white-space: nowrap;
  789. overflow: hidden;
  790. text-overflow: ellipsis;
  791. }
  792. .attachment_li_del{
  793. width: 30rpx;
  794. height: 30rpx;
  795. }
  796. }
  797. }
  798. .danger{
  799. width: 690rpx;
  800. background: #FFFFFF;
  801. border-radius: 20rpx;
  802. padding: 30rpx 30rpx 32rpx;
  803. box-sizing: border-box;
  804. margin: 20rpx 30rpx ;
  805. .danger_title{
  806. font-size: 30rpx;
  807. font-family: PingFang SC-Medium, PingFang SC;
  808. font-weight: 400;
  809. color: #333333;
  810. line-height:80rpx;
  811. border-bottom: 1rpx solid #D8D8D8;
  812. }
  813. .grade{
  814. height: 80rpx;
  815. display: flex;
  816. justify-content: space-between;
  817. border-bottom: 1rpx solid #D8D8D8;
  818. >text:nth-of-type(1){
  819. font-size: 28rpx;
  820. font-family: PingFang SC-Medium, PingFang SC;
  821. font-weight: 400;
  822. color: #666666;
  823. line-height: 80rpx;
  824. width: 140rpx;
  825. }
  826. >text:nth-of-type(2){
  827. flex: 1;
  828. font-size: 28rpx;
  829. font-family: PingFang SC-Medium, PingFang SC;
  830. font-weight: 400;
  831. color: #333333;
  832. line-height: 80rpx;
  833. text-align: right;
  834. }
  835. }
  836. .project{
  837. .project_t{
  838. font-size: 30rpx;
  839. font-family: PingFang SC-Medium, PingFang SC;
  840. font-weight: 400;
  841. color: #333333;
  842. line-height: 80rpx;
  843. }
  844. .project_b{
  845. min-height: 158rpx;
  846. font-size: 28rpx;
  847. font-family: PingFang SC-Medium, PingFang SC;
  848. font-weight: 400;
  849. color: #333333;
  850. line-height: 40rpx;
  851. padding: 20rpx 14rpx;
  852. box-sizing: border-box;
  853. background: #F5F5F5;
  854. border-radius: 20rpx 20rpx 20rpx 20rpx;
  855. }
  856. .project_b2{
  857. font-size: 26rpx;
  858. font-family: PingFang SC-Medium, PingFang SC;
  859. font-weight: 400;
  860. color: #666666;
  861. line-height: 26rpx;
  862. margin-top: 14rpx;
  863. text-align: right;
  864. }
  865. }
  866. .picture{
  867. .picture_t{
  868. font-size: 30rpx;
  869. font-family: PingFang SC-Medium, PingFang SC;
  870. font-weight: 400;
  871. color: #333333;
  872. line-height: 80rpx;
  873. }
  874. .picture_b{
  875. display: flex;
  876. justify-content: flex-start;
  877. flex-wrap: wrap;
  878. >img{
  879. width: 200rpx;
  880. height: 200rpx;
  881. border-radius: 10rpx 10rpx 10rpx 10rpx;
  882. margin-right: 14rpx;
  883. margin-bottom: 10rpx;
  884. }
  885. >img:nth-of-type(3n+3){
  886. margin-right: 0rpx;
  887. }
  888. }
  889. }
  890. }
  891. /* 待整改 */
  892. .await{
  893. width: 690rpx;
  894. background: #FFFFFF;
  895. border-radius: 20rpx;
  896. padding: 30rpx 30rpx 32rpx;
  897. box-sizing: border-box;
  898. margin: 20rpx 30rpx ;
  899. /* 整改结果 */
  900. .result{
  901. display: flex;
  902. justify-content: flex-start;
  903. border-bottom: 1rpx solid #D8D8D8;
  904. .result_l{
  905. width: 146rpx;
  906. text-align: left;
  907. font-size: 30rpx;
  908. font-family: PingFang SC-Medium, PingFang SC;
  909. font-weight: 400;
  910. color: #333333;
  911. line-height: 80rpx;
  912. }
  913. .result_r{
  914. width: 486rpx;
  915. height: 80rpx;
  916. padding-left: 20rpx;
  917. box-sizing: border-box;
  918. display: flex;
  919. justify-content: flex-end;
  920. align-items: center;
  921. >view{
  922. display: flex;
  923. justify-content: flex-start;
  924. align-items: center;
  925. margin-right: 24rpx;
  926. .result_r_l{
  927. display: inline-block;
  928. width: 30rpx;
  929. height: 30rpx;
  930. border-radius: 50%;
  931. border: 1rpx solid #E0E0E0;
  932. margin-right: 14rpx;
  933. }
  934. .result_r_r{
  935. font-size: 30rpx;
  936. font-family: PingFang SC-Medium, PingFang SC;
  937. font-weight: 400;
  938. color: #333333;
  939. line-height: 80rpx;
  940. }
  941. .checked{
  942. display: inline-block;
  943. width: 30rpx;
  944. height: 30rpx;
  945. border-radius: 50%;
  946. border: 1rpx solid #0183FA;
  947. margin-right: 14rpx;
  948. position: relative;
  949. }
  950. .checked::after{
  951. content: '';
  952. position: absolute;
  953. top: 5rpx;
  954. left:5rpx;
  955. width: 20rpx;
  956. height: 20rpx;
  957. border-radius: 50%;
  958. background: #0183FA;
  959. }
  960. }
  961. }
  962. }
  963. /* 原因描述 */
  964. .describe{
  965. .describe_l{
  966. width: 158rpx;
  967. text-align: left;
  968. font-size: 30rpx;
  969. font-family: PingFang SC-Medium, PingFang SC;
  970. font-weight: 400;
  971. color: #333333;
  972. line-height: 80rpx;
  973. }
  974. .describe_r{
  975. width: 630rpx;
  976. height: 158rpx;
  977. border-radius: 20rpx 20rpx 20rpx 20rpx;
  978. opacity: 1;
  979. border: 1rpx solid #E0E0E0;
  980. padding: 20rpx 14rpx;
  981. box-sizing: border-box;
  982. font-size: 30rpx;
  983. font-family: PingFang SC-Medium, PingFang SC;
  984. font-weight: 400;
  985. color: #333333;
  986. line-height: 34rpx;
  987. }
  988. }
  989. /* 上传照片 */
  990. .check-for-img-max-box{
  991. .left-title-p{
  992. width: 100%;
  993. text-align: left;
  994. font-size: 30rpx;
  995. font-family: PingFang SC-Medium, PingFang SC;
  996. font-weight: 400;
  997. color: #333333;
  998. line-height: 80rpx;
  999. }
  1000. .right-img-box{
  1001. .img-box{
  1002. display inline-block;
  1003. height:200rpx;
  1004. width:200rpx;
  1005. position relative
  1006. margin:0 14rpx 20rpx 0;
  1007. border-radius 10rpx;
  1008. overflow hidden;
  1009. .img-data{
  1010. height:200rpx;
  1011. width:200rpx;
  1012. }
  1013. .position-img{
  1014. position absolute
  1015. right:0;
  1016. top:0;
  1017. width:36rpx;
  1018. height:36rpx;
  1019. }
  1020. }
  1021. .img-box:nth-of-type(3n+3){
  1022. margin-right: 0rpx;
  1023. }
  1024. .add-button{
  1025. margin:0 0rpx 20rpx 0;
  1026. border-radius 10rpx;
  1027. overflow hidden;
  1028. display inline-block
  1029. height:200rpx;
  1030. width:200rpx;
  1031. }
  1032. }
  1033. }
  1034. }
  1035. /* 待复核 */
  1036. .review{
  1037. width: 690rpx;
  1038. background: #FFFFFF;
  1039. border-radius: 20rpx;
  1040. padding: 30rpx 30rpx 32rpx;
  1041. box-sizing: border-box;
  1042. margin: 20rpx 30rpx ;
  1043. /* 审核意见 */
  1044. .describe{
  1045. .describe_l{
  1046. width: 158rpx;
  1047. text-align: left;
  1048. font-size: 30rpx;
  1049. font-family: PingFang SC-Medium, PingFang SC;
  1050. font-weight: 400;
  1051. color: #666;
  1052. line-height: 80rpx;
  1053. }
  1054. .describe_r{
  1055. width: 630rpx;
  1056. height: 158rpx;
  1057. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1058. opacity: 1;
  1059. border: 1rpx solid #E0E0E0;
  1060. padding: 20rpx 14rpx;
  1061. box-sizing: border-box;
  1062. font-size: 30rpx;
  1063. font-family: PingFang SC-Medium, PingFang SC;
  1064. font-weight: 400;
  1065. color: #333333;
  1066. line-height: 34rpx;
  1067. }
  1068. }
  1069. /* 快捷输入 */
  1070. .quick{
  1071. .quick_l{
  1072. font-size: 30rpx;
  1073. font-family: PingFang SC-Medium, PingFang SC;
  1074. font-weight: 400;
  1075. color: #666666;
  1076. line-height: 80rpx;
  1077. }
  1078. .quick_r{
  1079. >text{
  1080. display: inline-block;
  1081. font-size: 30rpx;
  1082. font-family: PingFang SC-Medium, PingFang SC;
  1083. font-weight: 400;
  1084. line-height: 60rpx;
  1085. padding: 0 24rpx;
  1086. box-sizing: border-box;
  1087. border-radius: 10rpx 10rpx 10rpx 10rpx;
  1088. margin-right: 20rpx;
  1089. margin-bottom: 30rpx;
  1090. }
  1091. .quick_A{
  1092. color: #666666;
  1093. background: #F5F5F5;
  1094. }
  1095. .quick_B{
  1096. color: #0183FA;
  1097. background: rgba(1,131,250,0.2);
  1098. }
  1099. }
  1100. }
  1101. }
  1102. /* 暂无法整改 */
  1103. .incapable{
  1104. width: 690rpx;
  1105. background: #FFFFFF;
  1106. border-radius: 20rpx;
  1107. padding: 30rpx 30rpx 32rpx;
  1108. box-sizing: border-box;
  1109. margin: 20rpx 30rpx ;
  1110. }
  1111. /* 整改结果 */
  1112. .abarbeitung_result{
  1113. width: 690rpx;
  1114. background: #FFFFFF;
  1115. border-radius: 20rpx;
  1116. padding: 30rpx 30rpx 32rpx;
  1117. box-sizing: border-box;
  1118. margin: 20rpx 30rpx ;
  1119. }
  1120. /* 审核结果 */
  1121. .review_result{
  1122. width: 690rpx;
  1123. background: #FFFFFF;
  1124. border-radius: 20rpx;
  1125. padding: 30rpx 30rpx 32rpx;
  1126. box-sizing: border-box;
  1127. margin: 20rpx 30rpx ;
  1128. .audit{
  1129. height: 80rpx;
  1130. display: flex;
  1131. justify-content: space-between;
  1132. border-bottom: 1rpx solid #D8D8D8;
  1133. >text:nth-of-type(1){
  1134. font-size: 28rpx;
  1135. font-family: PingFang SC-Medium, PingFang SC;
  1136. font-weight: 400;
  1137. color: #666666;
  1138. line-height: 80rpx;
  1139. width: 140rpx;
  1140. }
  1141. >img{
  1142. width: 80rpx;
  1143. height: 70rpx;
  1144. }
  1145. }
  1146. }
  1147. .bottom_btn{
  1148. position: fixed;
  1149. bottom: 26rpx;
  1150. left: 30rpx;
  1151. font-size: 30rpx;
  1152. font-family: PingFang SC-Medium, PingFang SC;
  1153. font-weight: 400;
  1154. color: #FFFFFF;
  1155. line-height: 90rpx;
  1156. width: 690rpx;
  1157. height: 90rpx;
  1158. background: #0183FA;
  1159. border-radius: 20rpx;
  1160. text-align: center;
  1161. }
  1162. .bottom_btn_tow{
  1163. display: flex;
  1164. justify-content: center;
  1165. position: fixed;
  1166. bottom: 26rpx;
  1167. left: 30rpx;
  1168. width: 690rpx;
  1169. height: 90rpx;
  1170. >text{
  1171. flex: 1;
  1172. display: inline-block;
  1173. font-size: 30rpx;
  1174. font-family: PingFang SC-Medium, PingFang SC;
  1175. font-weight: 400;
  1176. color: #FFFFFF;
  1177. line-height: 90rpx;
  1178. text-align: center
  1179. }
  1180. >text:nth-of-type(1){
  1181. background: #FA8201;
  1182. border-radius: 45rpx 0rpx 0rpx 45rpx;
  1183. }
  1184. >text:nth-of-type(2){
  1185. background: #0183FA;
  1186. border-radius: 0rpx 45rpx 45rpx 0rpx;
  1187. }
  1188. }
  1189. }
  1190. </style>