dangerDetail.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224
  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="请输入原因描述" 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.resultArray=1
  276. }else if(index==1){
  277. this.form.resultArray=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.showToast({
  637. title: '提交成功',
  638. icon:"none",
  639. mask:true,
  640. duration: 2000
  641. });
  642. uni.navigateTo({
  643. url: '/pages_safetyExamine/examineManage/examineList?pageType='+this.checkType
  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>