dangerDetail.vue 32 KB

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