infoDialog.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264
  1. <!--
  2. <infoDialog v-if="infoDialogType" :propsInfoDialogData="propsInfoDialogData"></infoDialog>
  3. import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
  4. components: {
  5. infoDialog,
  6. },
  7. infoDialogType:false,
  8. propsInfoDialogData:{},
  9. //开关详情页面
  10. addDialogOpen(type,data){
  11. if(this.infoDialogType != type){
  12. if(type){
  13. let obj = {
  14. id:data.id
  15. }
  16. this.$set(this,'propsInfoDialogData',obj);
  17. this.$set(this,'infoDialogType',type);
  18. }else{
  19. this.getList();
  20. this.$set(this,'infoDialogType',type);
  21. }
  22. }
  23. },
  24. -->
  25. <template>
  26. <el-dialog class="safetyHazard-info-dialog-box" @close="outDialog"
  27. :title="infoDialogData.checkHazardApplyDto.rectifyStatus==1?'已完成':(infoDialogData.checkHazardApplyDto.rectifyStatus==2?'待整改':(infoDialogData.checkHazardApplyDto.rectifyStatus==3?'待复核':(infoDialogData.checkHazardApplyDto.rectifyStatus==4?'暂无法整改':'')))"
  28. :visible.sync="infoDialogType" v-if="infoDialogType"
  29. width="1184px" append-to-body>
  30. <div class="info-dialog-title-box scrollbar-box">
  31. <div class="info-dialog-for-title-box" @click="checkTitleButton('info')" :class="infoDialogCheckIndex == 'info'?'info-dialog-for-check':''">
  32. <p>隐患检查</p>
  33. <p></p>
  34. </div>
  35. <div class="info-dialog-for-title-box" :class="infoDialogCheckIndex == index?'info-dialog-for-check':''"
  36. @click="checkTitleButton(index)" v-for="(item,index) in infoDialogData.checkRectifyApplyList" :key="index">
  37. <!--<p>{{item.applyFlag==1?'隐患整改':(item.applyFlag==2?'整改复核':'')}}</p>-->
  38. <p>{{item.titleName}}</p>
  39. <p></p>
  40. </div>
  41. <div class="info-dialog-for-title-box" v-if="addFormType == 1 || addFormType == 2" @click="checkTitleButton('add')" :class="infoDialogCheckIndex == 'add'?'info-dialog-for-check':''">
  42. <p>{{addFormTitle}}</p>
  43. <p></p>
  44. </div>
  45. </div>
  46. <div class="info-dialog-content-box scrollbar-box">
  47. <div class="info-dialog-content-info" v-if="infoDialogCheckIndex == 'info' && imgDocumentType == 0">
  48. <div class="text-box-box">
  49. <p>计划标题</p>
  50. <p>{{infoDialogData.title}}</p>
  51. </div>
  52. <div class="text-box-two-box">
  53. <div>
  54. <p>检查类型</p>
  55. <p>{{infoDialogData.checkType==1?'校园巡查':(infoDialogData.checkType==2?'实验室自查':'')}}</p>
  56. </div>
  57. <div>
  58. <p>{{infoDialogData.checkType==1?'计划周期':(infoDialogData.checkType==2?'任务周期':'')}}</p>
  59. <p>{{infoDialogData.cycleStartTime}} 至 {{infoDialogData.cycleEndTime}}</p>
  60. </div>
  61. </div>
  62. <div class="text-box-two-box">
  63. <div>
  64. <p>学院</p>
  65. <p>{{infoDialogData.collegeName}}</p>
  66. </div>
  67. <div>
  68. <p>实验室</p>
  69. <p>{{infoDialogData.subjectName}} - {{infoDialogData.roomNumber}}</p>
  70. </div>
  71. </div>
  72. <div class="text-box-two-box">
  73. <div>
  74. <p>楼栋</p>
  75. <p>{{infoDialogData.buildName}}</p>
  76. </div>
  77. </div>
  78. <div class="text-box-box">
  79. <p>检查要求</p>
  80. <p>{{infoDialogData.checkDemand}}</p>
  81. </div>
  82. <div class="text-box-two-box">
  83. <div>
  84. <p>检查结果</p>
  85. <p>{{infoDialogData.checkResult==0?'不符合':(infoDialogData.checkResult==1?'符合':'')}}</p>
  86. </div>
  87. <div>
  88. <p>整改期限</p>
  89. <p>{{infoDialogData.rectifyDeadline}}</p>
  90. </div>
  91. </div>
  92. <div class="button-box">
  93. <p>{{infoDialogData.rectifyNotice == 1?'整改告知书':(infoDialogData.rectifyNotice == 2?'整改通知书':'')}}</p>
  94. <p class="inquire-button-one" @click="lookDocument(1,infoDialogData.data18)">查看</p>
  95. <p class="add-button-one-90">下载</p>
  96. </div>
  97. <div class="text-box-two-box">
  98. <div>
  99. <p>检查者</p>
  100. <p>{{infoDialogData.checkUser}}</p>
  101. </div>
  102. <div>
  103. <p>检查时间</p>
  104. <p>{{infoDialogData.checkTime}}</p>
  105. </div>
  106. </div>
  107. <div class="table-box">
  108. <p class="table-title-p">隐患项</p>
  109. <div class="table-min">
  110. <div class="left-box">
  111. <p></p>
  112. <p>检查项目</p>
  113. <p></p>
  114. </div>
  115. <div class="right-box text-two-box">
  116. <p></p>
  117. <p>{{infoDialogData.checkHazardApplyDto.hazardCheckProStr}}</p>
  118. <p></p>
  119. <p v-if="infoDialogData.checkHazardApplyDto.hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{infoDialogData.checkHazardApplyDto.hazardCheckCount}}</span> 次隐患</p>
  120. <p></p>
  121. </div>
  122. </div>
  123. <div class="table-min">
  124. <div class="left-box">
  125. <p></p>
  126. <p>隐患描述</p>
  127. <p></p>
  128. </div>
  129. <div class="right-box text-box">
  130. <p></p>
  131. <p>{{infoDialogData.checkHazardApplyDto.hazardDescribe}}</p>
  132. <p></p>
  133. </div>
  134. </div>
  135. <div class="table-min">
  136. <div class="left-box">
  137. <p></p>
  138. <p>隐患等级</p>
  139. <p></p>
  140. </div>
  141. <div class="right-box text-box">
  142. <p></p>
  143. <p>{{infoDialogData.checkHazardApplyDto.hazardLevel==0?'一般隐患':(infoDialogData.checkHazardApplyDto.hazardLevel==1?'重大隐患':(infoDialogData.checkHazardApplyDto.hazardLevel==2?'管理问题':''))}}</p>
  144. <p></p>
  145. </div>
  146. </div>
  147. <div class="table-min">
  148. <div class="left-box">
  149. <p></p>
  150. <p>检查要点</p>
  151. <p></p>
  152. </div>
  153. <div class="right-box text-box">
  154. <p></p>
  155. <p>{{infoDialogData.checkHazardApplyDto.hazardCheckPoint}}</p>
  156. <p></p>
  157. </div>
  158. </div>
  159. <div class="table-min">
  160. <div class="left-box">
  161. <p></p>
  162. <p>隐患照片</p>
  163. <p></p>
  164. </div>
  165. <div class="right-box img-box">
  166. <img :src="imgItem.fileUrl" v-for="(imgItem,index) in infoDialogData.checkHazardApplyDto.uploadDtoList" :key="index" @click="lookImg(infoDialogData.data17,index)">
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. <div class="info-dialog-content-type" v-if="infoDialogCheckIndex == index && imgDocumentType == 0"
  172. v-for="(item,index) in infoDialogData.checkRectifyApplyList" :key="index">
  173. <!--已整改-->
  174. <div class="has-rectification" v-if="item.applyFlag == 1">
  175. <div class="button-box">
  176. <p>整改结果</p>
  177. <p>{{item.rectifyResult == 1?'已整改':(item.rectifyResult == 0?'暂无法整改':'')}}</p>
  178. </div>
  179. <div class="text-box">
  180. <p>整改措施</p>
  181. <p>{{item.rectifyMeasure}}</p>
  182. </div>
  183. <div class="img-box">
  184. <p>整改照片</p>
  185. <div>
  186. <img :src="imgItem.fileUrl" @click="lookImg(item.lookImgList,imgIndex)"
  187. v-for="(imgItem,imgIndex) in item.uploadDtoList" :key="imgIndex">
  188. </div>
  189. </div>
  190. <div class="text-box-two">
  191. <div>
  192. <p>整改人</p>
  193. <p>{{item.createName}}</p>
  194. </div>
  195. <div style="margin-left:26px;">
  196. <p>整改时间</p>
  197. <p>{{item.createTime}}</p>
  198. </div>
  199. </div>
  200. </div>
  201. <!--已审核-->
  202. <div class="has-inspection" v-if="item.applyFlag == 2">
  203. <div class="type-box">
  204. <p>审核结果</p>
  205. <img v-if="item.examineResult == 0" src="@/assets/ZDimages/safetyCheck/icon_zcgl_sb.png">
  206. <img v-if="item.examineResult == 1" src="@/assets/ZDimages/safetyCheck/icon_zcgl_cg.png">
  207. </div>
  208. <div class="text-box">
  209. <p>审核意见</p>
  210. <p>{{item.examineOpinion}}</p>
  211. </div>
  212. <div class="text-box-two">
  213. <div>
  214. <p>审核人</p>
  215. <p>{{item.reviewedName}}</p>
  216. </div>
  217. <div style="margin-left:26px;">
  218. <p>审核时间</p>
  219. <p>{{item.reviewedTime}}</p>
  220. </div>
  221. </div>
  222. <div class="button-box" v-if="item.examineResult == 1">
  223. <p>整改报告书</p>
  224. <p class="inquire-button-one" @click="lookDocument(2,item.dataL)">查看</p>
  225. <p class="add-button-one-90">下载</p>
  226. </div>
  227. </div>
  228. </div>
  229. <div class="info-dialog-content-add" v-if="infoDialogCheckIndex == 'add' && imgDocumentType == 0">
  230. <el-form ref="addForm" :model="addForm" :rules="rules" label-width="90px">
  231. <!--待整改-->
  232. <div class="stay-rectification" v-if="addFormType == 1">
  233. <el-form-item label="整改结果" prop="rectifyResult">
  234. <el-radio-group v-model="addForm.rectifyResult">
  235. <el-radio :label="1">已整改</el-radio>
  236. <el-radio :label="0">暂无法整改</el-radio>
  237. </el-radio-group>
  238. </el-form-item>
  239. <el-form-item :label="addForm.rectifyResult==1?'整改措施':'原因描述'" prop="rectifyMeasure">
  240. <el-input
  241. type="textarea"
  242. :autosize="{ minRows: 4, maxRows: 4}"
  243. :placeholder="addForm.rectifyResult==1?'请输入整改措施':'请输入原因描述'"
  244. resize="none"
  245. maxlength="100"
  246. show-word-limit
  247. v-model="addForm.rectifyMeasure">
  248. </el-input>
  249. </el-form-item>
  250. <el-form-item label="上传照片" prop="uploadDtoList">
  251. <div class="for-img-box" v-for="(img,imgIndex) in addForm.uploadDtoList" :key="imgIndex">
  252. <img class="for-img" :src="img.fileUrl" @click="lookImg(addForm.uploadDtoList,imgIndex)">
  253. <p class="for-del-button el-icon-circle-close" @click="delImg(imgIndex)"></p>
  254. </div>
  255. <el-upload
  256. style="display: inline-block;overflow: hidden"
  257. class="avatar-uploader"
  258. :action="uploadImgUrl"
  259. :show-file-list="false"
  260. :on-success="(res)=>handleAvatarSuccess(res,addForm)"
  261. :headers="headers"
  262. :before-upload="(res)=>beforeAvatarUpload(res,addForm)">
  263. <p class="el-icon-plus up-img-p" style="display: inline-block"></p>
  264. </el-upload>
  265. </el-form-item>
  266. <p style="margin-left:80px;">支持jpg/png/bmp/gif格式,且不超过2M,最多上传5张</p>
  267. </div>
  268. <!--待审核-->
  269. <div class="stay-inspection" v-if="addFormType == 2">
  270. <el-form-item label="审核意见" prop="examineOpinion">
  271. <el-input
  272. type="textarea"
  273. :autosize="{ minRows: 4, maxRows: 4}"
  274. placeholder="请输入审核意见"
  275. resize="none"
  276. maxlength="100"
  277. show-word-limit
  278. v-model="addForm.examineOpinion">
  279. </el-input>
  280. </el-form-item>
  281. <div class="quick-selection-box">
  282. <p class="quick-selection-title">快捷输入</p>
  283. <p class="quick-selection-for" @click="stayInspectionClick(item)"
  284. v-for="(item,index) in quickSelection" :key="index">{{item}}</p>
  285. </div>
  286. </div>
  287. </el-form>
  288. </div>
  289. <div class="info-dialog-content-img" v-if="imgDocumentType == 1">
  290. <img :src="imgList[imgIndex].fileUrl">
  291. <p class="el-icon-arrow-left left-button-p" @click="infoLeftButton"></p>
  292. <p class="el-icon-arrow-right right-button-p" @click="infoRightButton"></p>
  293. <p class="bottom-num-text">{{imgIndex+1}} / {{imgList.length}}</p>
  294. <p class="out-button" @click="outLook">返回</p>
  295. </div>
  296. <div class="info-dialog-content-document" v-if="imgDocumentType == 2">
  297. <iframe
  298. class="iframe"
  299. :src="iframeSrc" scrolling="auto" frameborder="0">
  300. </iframe>
  301. <p class="out-button" @click="outLook">返回</p>
  302. </div>
  303. <div class="info-dialog-content-document-list" v-if="imgDocumentType == 3">
  304. <div class="left-box">
  305. <div class="left-title-box">
  306. <img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">
  307. <p>材料附件</p>
  308. </div>
  309. <div class="left-for-box scrollbar-box">
  310. <p class="left-for-p" v-for="(iframeItem,iframeIndex) in iframeSrcList" :key="iframeIndex"
  311. @click="lookDocumentListCheck(iframeIndex)"
  312. :class="iframeSrcIndex == iframeIndex?'check-p':''">{{iframeItem.name}}</p>
  313. </div>
  314. </div>
  315. <div class="center-border"></div>
  316. <div class="right-box">
  317. <iframe
  318. class="iframe"
  319. :src="iframeSrc" scrolling="auto" frameborder="0">
  320. </iframe>
  321. </div>
  322. <p class="out-button" @click="outLook">返回</p>
  323. </div>
  324. </div>
  325. <div class="bottom-button-box dialog-footer-box" v-if="infoDialogCheckIndex == 'add'">
  326. <p class="dialog-footer-button-null"></p>
  327. <p class="dialog-footer-button-info" @click="outDialog">取消</p>
  328. <p class="dialog-footer-button-primary" v-if="addFormType==1" @click="upDataButton(1)">提交</p>
  329. <p class="dialog-footer-button-border" v-if="addFormType==2" @click="upDataButton(2)">驳回</p>
  330. <p class="dialog-footer-button-primary" v-if="addFormType==2" @click="upDataButton(3)">通过</p>
  331. <p class="dialog-footer-button-null"></p>
  332. </div>
  333. </el-dialog>
  334. </template>
  335. <script>
  336. import { getHazardById,addOrApprove } from '@/api/safetyCheck/index'
  337. import { getToken } from "@/utils/auth";
  338. export default {
  339. name: 'infoDialog',
  340. props:{
  341. propsInfoDialogData:{},
  342. },
  343. data(){
  344. return{
  345. upDataName:"",
  346. uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
  347. headers: {
  348. Authorization: "Bearer " + getToken(),
  349. },
  350. infoDialogType:false,
  351. //img 与 document 展示状态
  352. imgDocumentType:0,
  353. infoDialogCheckIndex:'info',
  354. infoDialogData:{},
  355. //图片
  356. imgList:[],
  357. imgIndex:0,
  358. saveIndex:0,
  359. //文档地址
  360. iframeSrc:"",
  361. iframeSrcIndex:0,
  362. iframeSrcList:[],
  363. // 提交数据
  364. addFormType:null,//1整改 2审核 默认NULL 回调数据内判定当前状态
  365. addFormTitle:null,
  366. addForm:{
  367. rectifyResult:'',
  368. rectifyMeasure:'',
  369. uploadDtoList:[],
  370. examineOpinion:'',
  371. },
  372. rules: {
  373. rectifyResult: [
  374. { required: true, message: "请选择整改结果", trigger: "change" },
  375. ],
  376. uploadDtoList: [
  377. { required: true, message: "请选择上传图片", trigger: "change" },
  378. ],
  379. rectifyMeasure: [
  380. { required: true, message: '请输入内容', trigger: "change" },
  381. { required: true, message: '请输入内容', validator: this.spaceJudgment, trigger: "change" },
  382. ],
  383. examineOpinion: [
  384. { required: true, message: "请输入内容", trigger: "change" },
  385. ],
  386. },
  387. //快速选择
  388. quickSelection:['复核驳回','未解决','驳回再整改','请补充材料','请补充描述',],
  389. }
  390. },
  391. created(){
  392. },
  393. mounted(){
  394. this.getHazardById();
  395. },
  396. methods:{
  397. //提交
  398. upDataButton(type){
  399. this.$refs["addForm"].validate(valid => {
  400. if (valid) {
  401. let obj = JSON.parse(JSON.stringify(this.addForm));
  402. if(type == 1){
  403. //整改
  404. obj.checkHazardId = this.infoDialogData.checkHazardApplyDto.id
  405. delete obj.examineOpinion
  406. }else if(type != 1){
  407. //审核
  408. obj.id = this.infoDialogData.checkRectifyApplyList[this.infoDialogData.checkRectifyApplyList.length-1].id;
  409. obj.examineResult = type==2?0:(type==3?1:'');
  410. delete obj.rectifyResult
  411. delete obj.rectifyMeasure
  412. delete obj.uploadDtoList
  413. }
  414. addOrApprove(obj).then(response => {
  415. this.msgSuccess(response.msg);
  416. this.$parent.addDialogOpen(false);
  417. })
  418. }
  419. })
  420. },
  421. //获取详情
  422. getHazardById(){
  423. getHazardById({id:this.propsInfoDialogData.id}).then(response => {
  424. console.log('response.data.checkRectifyApplyList[0]',response.data.checkRectifyApplyList)
  425. if(response.data.checkRectifyApplyList[0]){
  426. if(response.data.checkRectifyApplyList[response.data.checkRectifyApplyList.length-1].applyFlag == 1){
  427. if(response.data.checkHazardApplyDto.applyGentle){
  428. //已整改
  429. this.$set(this,'addFormType',2)
  430. if(response.data.checkRectifyApplyList.length>2){
  431. this.$set(this,'addFormTitle',this.frequencyCalculation(response.data.checkRectifyApplyList.length,2)+'复核')
  432. }else{
  433. this.$set(this,'addFormTitle','整改复核')
  434. }
  435. }
  436. }else if(response.data.checkRectifyApplyList[response.data.checkRectifyApplyList.length-1].applyFlag == 2){
  437. if(response.data.checkHazardApplyDto.rectifyGentle){
  438. //已复核
  439. if(response.data.checkRectifyApplyList[response.data.checkRectifyApplyList.length-1].examineResult == 0){
  440. //复核驳回
  441. this.$set(this,'addFormType',1)
  442. if(response.data.checkRectifyApplyList.length>1){
  443. this.$set(this,'addFormTitle',this.frequencyCalculation(response.data.checkRectifyApplyList.length,1)+'整改')
  444. }else{
  445. this.$set(this,'addFormTitle','隐患整改')
  446. }
  447. }
  448. }
  449. }
  450. }else{
  451. if(response.data.checkHazardApplyDto.rectifyGentle){
  452. //初次整改
  453. this.$set(this,'addFormType',1)
  454. this.$set(this,'addFormTitle','隐患整改')
  455. }
  456. }
  457. for(let i=0;i<response.data.checkRectifyApplyList.length;i++){
  458. console.log("i=",i);
  459. if(i == 0){
  460. response.data.checkRectifyApplyList[i].titleName = '隐患整改'
  461. }else if(i == 1){
  462. response.data.checkRectifyApplyList[i].titleName = '整改复核'
  463. }else{
  464. let nameLeft = this.frequencyCalculation(i,response.data.checkRectifyApplyList[i].applyFlag);
  465. let nameRight = response.data.checkRectifyApplyList[i].applyFlag == 1?'整改':'复核';
  466. response.data.checkRectifyApplyList[i].titleName = nameLeft+nameRight;
  467. }
  468. }
  469. this.$set(this,'infoDialogData',response.data);
  470. this.$set(this,'infoDialogType',true);
  471. });
  472. },
  473. //标签切换
  474. checkTitleButton(index){
  475. if(this.infoDialogCheckIndex != index){
  476. this.$set(this,'imgDocumentType',0);
  477. this.$set(this,'infoDialogCheckIndex',index);
  478. }
  479. },
  480. //快速选择内容
  481. stayInspectionClick(val){
  482. this.$set(this.addForm,'examineOpinion',val);
  483. },
  484. //点击查看文档
  485. lookDocument(type,data){
  486. if(type == 1){
  487. this.$set(this,'iframeSrcIndex',0);
  488. this.$set(this,'iframeSrcList',data);
  489. this.$set(this,'iframeSrc',this.urlJudge(data[0].url));
  490. this.$set(this,'imgDocumentType',3);
  491. }else if(type == 2){
  492. this.$set(this,'iframeSrc',this.urlJudge(data));
  493. this.$set(this,'imgDocumentType',2);
  494. }
  495. },
  496. lookDocumentListCheck(val){
  497. this.$set(this,'iframeSrcIndex',val);
  498. this.$set(this,'iframeSrc',this.urlJudge(this.iframeSrcList[val].url));
  499. },
  500. //点击查看图片
  501. lookImg(list,index){
  502. this.$set(this,'imgList',list)
  503. this.$set(this,'imgIndex',index)
  504. this.$set(this,'imgDocumentType',1);
  505. },
  506. outLook(){
  507. this.$set(this,'imgDocumentType',0);
  508. },
  509. //图片左右按键
  510. infoLeftButton(){
  511. if (this.imgIndex == 0){
  512. this.msgError('当前是第一张')
  513. }else{
  514. this.imgIndex--
  515. }
  516. },
  517. infoRightButton(){
  518. if (this.imgIndex == this.imgList.length-1){
  519. this.msgError('当前是最后一张')
  520. }else{
  521. this.imgIndex++
  522. }
  523. },
  524. /*==========上传相关==========*/
  525. handleAvatarSuccess(res,item) {
  526. if(item.uploadDtoList.length>4){
  527. this.msgError('最多只可上传5张')
  528. return
  529. }
  530. let suffixName= this.upDataName.split('.')[this.upDataName.split('.').length - 2]
  531. //判断文件名中是否有逗号和分号
  532. if(suffixName.indexOf(',')==-1 && suffixName.indexOf(';')==-1){
  533. }else{
  534. this.msgError('文件名里包含逗号或分号,请修改后重新上传!')
  535. return
  536. }
  537. let obj ={
  538. fileName:this.upDataName,
  539. fileUrl:res.data.url,
  540. fileType:2,
  541. };
  542. item.uploadDtoList.push(obj);
  543. this.$forceUpdate()
  544. },
  545. beforeAvatarUpload(file,item) {
  546. if(item.uploadDtoList.length>4){
  547. this.msgError('最多只可上传5张')
  548. return false
  549. }
  550. let type = false;
  551. if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/gif' || file.type == 'image/bmp') {
  552. if(file.size> 2000000){
  553. this.msgError('上传图片大小不能超过2M')
  554. return false
  555. }
  556. this.upDataName = file.name;
  557. type = true;
  558. }else{
  559. this.msgError('png/jpeg/gif格式')
  560. type = false;
  561. }
  562. return type;
  563. },
  564. // 删除图片
  565. delImg(imgIndex){
  566. this.addForm.uploadDtoList.splice(imgIndex,1);
  567. },
  568. //退出
  569. outDialog(){
  570. this.$parent.addDialogOpen(false);
  571. },
  572. //多次名称匹配
  573. frequencyCalculation(length,type){
  574. let textList = [
  575. {value:'二次',key:'2'},{value:'三次',key:'3'},{value:'四次',key:'4'},{value:'五次',key:'5'}, {value:'六次',key:'6'}, {value:'七次',key:'7'},
  576. {value:'八次',key:'8'},{value:'九次',key:'9'},{value:'十次',key:'10'}
  577. ]
  578. let num = type === 2?Math.ceil(length/2):Math.floor(length/2)
  579. if(type == 1){
  580. num++
  581. }
  582. if (num > 10){
  583. return '再次'
  584. } else{
  585. for(let i=0;i<textList.length;i++){
  586. if(num == textList[i].key){
  587. return textList[i].value
  588. }
  589. }
  590. }
  591. },
  592. },
  593. }
  594. </script>
  595. <style scoped lang="scss">
  596. .safetyHazard-info-dialog-box{
  597. ::v-deep .el-dialog__body{
  598. padding:0 0 30px 0;
  599. }
  600. ::v-deep .el-form-item__label{
  601. font-size:16px;
  602. }
  603. .info-dialog-title-box{
  604. border-bottom:1px solid #E0E0E0;
  605. padding:0 30px;
  606. overflow-x: scroll;
  607. overflow-y: hidden;
  608. height:80px;
  609. white-space: nowrap;
  610. .info-dialog-for-title-box{
  611. height:80px;
  612. width: 80px;
  613. margin-right:44px;
  614. overflow: hidden;
  615. display: inline-block;
  616. p:nth-child(1){
  617. height:44px;
  618. line-height:44px;
  619. margin-top:18px;
  620. text-align: center;
  621. color:#333;
  622. font-size:16px;
  623. cursor: pointer;
  624. }
  625. p:nth-child(2){
  626. height:4px;
  627. width:40px;
  628. margin:0 auto;
  629. border-radius:4px;
  630. }
  631. }
  632. .info-dialog-for-check{
  633. p:nth-child(1){
  634. font-size:16px;
  635. color:#0045AF;
  636. }
  637. p:nth-child(2){
  638. background-color: #0045AF;
  639. }
  640. }
  641. }
  642. .info-dialog-content-box{
  643. padding:30px 70px 0;
  644. height:600px;
  645. .info-dialog-content-info{
  646. .text-box-box{
  647. display: flex;
  648. margin-top:20px;
  649. p{
  650. font-size:16px;
  651. color:#333;
  652. line-height:40px;
  653. }
  654. p:nth-child(1){
  655. width:95px;
  656. text-align: right;
  657. margin-right:16px;
  658. font-size:16px;
  659. }
  660. p:nth-child(2){
  661. width:928px;
  662. padding:10px 20px;
  663. overflow: hidden;
  664. background: #F5F5F5;
  665. border-radius:4px;
  666. font-size:14px;
  667. line-height:20px;
  668. }
  669. }
  670. .text-box-two-box{
  671. display: flex;
  672. margin-top:20px;
  673. div{
  674. display: flex;
  675. p{
  676. font-size:16px;
  677. color:#333;
  678. line-height:40px;
  679. }
  680. p:nth-child(1){
  681. text-align: right;
  682. margin-right:16px;
  683. font-size:16px;
  684. }
  685. p:nth-child(2){
  686. padding:0 20px;
  687. overflow: hidden;
  688. background: #F5F5F5;
  689. border-radius:4px;
  690. font-size:14px;
  691. }
  692. }
  693. div:nth-child(1){
  694. p:nth-child(1){
  695. width:95px;
  696. }
  697. p:nth-child(2){
  698. width:400px;
  699. }
  700. }
  701. div:nth-child(2){
  702. p:nth-child(1){
  703. width:117px;
  704. }
  705. p:nth-child(2){
  706. width:400px;
  707. }
  708. }
  709. }
  710. .button-box{
  711. display: flex;
  712. margin-top:20px;
  713. p{
  714. font-size:16px;
  715. line-height:40px;
  716. }
  717. p:nth-child(1){
  718. color:#333;
  719. width:95px;
  720. text-align: right;
  721. margin-right:16px;
  722. }
  723. p:nth-child(2){
  724. width:70px;
  725. height:30px;
  726. line-height:30px;
  727. margin-top:5px;
  728. margin-right:12px;
  729. font-size:14px;
  730. }
  731. p:nth-child(3){
  732. width:70px;
  733. height:30px;
  734. line-height:30px;
  735. margin-top:5px;
  736. font-size:14px;
  737. }
  738. }
  739. .table-box{
  740. margin-left:16px;
  741. margin-top:20px;
  742. border:1px solid #e0e0e0;
  743. border-bottom:none;
  744. .table-title-p{
  745. background-color: #F5F5F5;
  746. line-height:50px;
  747. padding-left:30px;
  748. border-bottom:1px solid #e0e0e0;
  749. }
  750. .table-min{
  751. display: flex;
  752. overflow: hidden;
  753. border-bottom:1px solid #e0e0e0;
  754. .left-box{
  755. width:120px;
  756. display: flex;
  757. flex-direction: column;
  758. overflow: hidden;
  759. background-color: #F5F5F5;
  760. border-right:1px solid #e0e0e0;
  761. p:nth-child(1){
  762. flex:1;
  763. }
  764. p:nth-child(2){
  765. text-align: center;
  766. height:14px;
  767. line-height:14px;
  768. }
  769. p:nth-child(3){
  770. flex:1;
  771. }
  772. }
  773. .right-box{
  774. flex:1;
  775. overflow: hidden;
  776. min-height:60px;
  777. font-size:14px;
  778. padding:0 16px;
  779. line-height:20px;
  780. }
  781. .text-box{
  782. display: flex;
  783. flex-direction: column;
  784. p:nth-child(1){
  785. flex:1;
  786. min-height:12px;
  787. }
  788. p:nth-child(2){
  789. }
  790. p:nth-child(3){
  791. flex:1;
  792. min-height:12px;
  793. }
  794. }
  795. .text-two-box{
  796. p:nth-child(1){
  797. flex:1;
  798. min-height:12px;
  799. }
  800. p:nth-child(2){
  801. }
  802. p:nth-child(3){
  803. flex:1;
  804. min-height:12px;
  805. }
  806. p:nth-child(4){
  807. span{
  808. color:#FF0000;
  809. }
  810. }
  811. p:nth-child(5){
  812. flex:1;
  813. min-height:12px;
  814. }
  815. }
  816. .img-box{
  817. padding:20px;
  818. img{
  819. cursor: pointer;
  820. height:80px;
  821. width:80px;
  822. margin-right:10px;
  823. border-radius:4px;
  824. }
  825. }
  826. }
  827. }
  828. }
  829. .info-dialog-content-type{
  830. .has-rectification{
  831. .button-box{
  832. display: flex;
  833. p:nth-child(1){
  834. height:40px;
  835. line-height:40px;
  836. width:80px;
  837. font-size:16px;
  838. color:#333;
  839. text-align: right;
  840. margin-right:15px;
  841. }
  842. p:nth-child(2){
  843. text-align: center;
  844. width:80px;
  845. height:30px;
  846. margin-top:5px;
  847. line-height:30px;
  848. font-size:14px;
  849. color:#0183FA;
  850. }
  851. }
  852. .text-box{
  853. margin-top:20px;
  854. display: flex;
  855. p:nth-child(1){
  856. height:40px;
  857. line-height:40px;
  858. width:80px;
  859. font-size:16px;
  860. color:#333;
  861. text-align: right;
  862. margin-right:15px;
  863. }
  864. p:nth-child(2){
  865. font-size:14px;
  866. line-height:20px;
  867. min-height: 70px;
  868. padding:15px 20px;
  869. flex:1;
  870. background-color: #F5F5F5;
  871. border-radius:4px;
  872. }
  873. }
  874. .img-box{
  875. margin-top:20px;
  876. display: flex;
  877. p{
  878. height:40px;
  879. line-height:40px;
  880. width:80px;
  881. font-size:16px;
  882. color:#333;
  883. text-align: right;
  884. margin-right:15px;
  885. }
  886. img{
  887. cursor: pointer;
  888. width:80px;
  889. height:80px;
  890. margin-right:10px;
  891. border-radius:4px;
  892. }
  893. }
  894. .text-box-two{
  895. margin-top:20px;
  896. display: flex;
  897. div{
  898. display: flex;
  899. p:nth-child(1){
  900. height:40px;
  901. line-height:40px;
  902. width:80px;
  903. font-size:16px;
  904. color:#333;
  905. text-align: right;
  906. margin-right:15px;
  907. }
  908. p:nth-child(2){
  909. width:412px;
  910. height:40px;
  911. font-size:14px;
  912. line-height:40px;
  913. padding:0 20px;
  914. background-color: #F5F5F5;
  915. border-radius:4px;
  916. }
  917. }
  918. }
  919. }
  920. .has-inspection{
  921. .type-box{
  922. display: flex;
  923. p:nth-child(1){
  924. height:40px;
  925. line-height:40px;
  926. width:80px;
  927. font-size:16px;
  928. color:#333;
  929. text-align: right;
  930. margin-right:15px;
  931. }
  932. img{
  933. width:60px;
  934. height:52px;
  935. }
  936. }
  937. .text-box{
  938. margin-top:20px;
  939. display: flex;
  940. p:nth-child(1){
  941. height:40px;
  942. line-height:40px;
  943. width:80px;
  944. font-size:16px;
  945. color:#333;
  946. text-align: right;
  947. margin-right:15px;
  948. }
  949. p:nth-child(2){
  950. font-size:14px;
  951. line-height:20px;
  952. min-height: 70px;
  953. padding:15px 20px;
  954. flex:1;
  955. background-color: #F5F5F5;
  956. border-radius:4px;
  957. }
  958. }
  959. .text-box-two{
  960. margin-top:20px;
  961. display: flex;
  962. div{
  963. display: flex;
  964. p:nth-child(1){
  965. height:40px;
  966. line-height:40px;
  967. width:80px;
  968. font-size:16px;
  969. color:#333;
  970. text-align: right;
  971. margin-right:15px;
  972. }
  973. p:nth-child(2){
  974. width:412px;
  975. height:40px;
  976. font-size:14px;
  977. line-height:40px;
  978. padding:0 20px;
  979. background-color: #F5F5F5;
  980. border-radius:4px;
  981. overflow: hidden;
  982. }
  983. }
  984. }
  985. .button-box{
  986. margin-top:20px;
  987. display: flex;
  988. p:nth-child(1){
  989. height:40px;
  990. line-height:40px;
  991. width:80px;
  992. font-size:16px;
  993. color:#333;
  994. text-align: right;
  995. margin-right:15px;
  996. }
  997. p:nth-child(2){
  998. width:70px;
  999. height:30px;
  1000. line-height:30px;
  1001. margin-top:5px;
  1002. }
  1003. p:nth-child(3){
  1004. width:70px;
  1005. height:30px;
  1006. line-height:30px;
  1007. margin-top:5px;
  1008. }
  1009. }
  1010. }
  1011. }
  1012. .info-dialog-content-add{
  1013. .stay-rectification{
  1014. .up-img-p{
  1015. height:80px;
  1016. width:80px;
  1017. line-height:80px;
  1018. text-align: center;
  1019. font-size:16px;
  1020. border-radius:4px;
  1021. border:1px dashed #E0E0E0;
  1022. }
  1023. .for-img-box{
  1024. width:80px;
  1025. height:80px;
  1026. border-radius:4px;
  1027. display: inline-block;
  1028. overflow: hidden;
  1029. margin-right:20px;
  1030. position: relative;
  1031. .for-img{
  1032. width:80px;
  1033. height:80px;
  1034. display: inline-block;
  1035. overflow: hidden;
  1036. }
  1037. .for-del-button{
  1038. background: rgba(0,0,0,0.7);
  1039. width:20px;
  1040. height:20px;
  1041. line-height: 20px;
  1042. text-align: center;
  1043. color:#fff;
  1044. border-bottom-left-radius:4px;
  1045. cursor: pointer;
  1046. position: absolute;
  1047. top:0;
  1048. right:0;
  1049. }
  1050. }
  1051. }
  1052. .stay-inspection{
  1053. .quick-selection-box{
  1054. display: flex;
  1055. margin-top:20px;
  1056. .quick-selection-title{
  1057. margin-left:90px;
  1058. height:40px;
  1059. line-height:40px;
  1060. font-size:14px;
  1061. margin-right:23px;
  1062. }
  1063. .quick-selection-for{
  1064. width:100px;
  1065. height:40px;
  1066. font-size:14px;
  1067. text-align: center;
  1068. line-height:40px;
  1069. margin-right:10px;
  1070. color:#333;
  1071. background-color: #F5F5F5;
  1072. border-radius:4px;
  1073. cursor: pointer;
  1074. }
  1075. .quick-selection-for:hover{
  1076. background: rgba(1,131,250,0.2);
  1077. color:#0183FA ;
  1078. }
  1079. }
  1080. }
  1081. }
  1082. .info-dialog-content-img{
  1083. img{
  1084. width:1040px;
  1085. }
  1086. .left-button-p{
  1087. cursor: pointer;
  1088. text-align: center;
  1089. line-height:30px;
  1090. color:#fff;
  1091. font-size:16px;
  1092. top:440px;
  1093. left:20px;
  1094. position: absolute;
  1095. width:30px;
  1096. height:30px;
  1097. background-color: #0045AF;
  1098. border-radius:50%;
  1099. }
  1100. .right-button-p{
  1101. cursor: pointer;
  1102. text-align: center;
  1103. line-height:30px;
  1104. color:#fff;
  1105. font-size:16px;
  1106. position: absolute;
  1107. top:440px;
  1108. right:20px;
  1109. width:30px;
  1110. height:30px;
  1111. background-color: #0045AF;
  1112. border-radius:50%;
  1113. }
  1114. .left-button-p:hover{
  1115. background-color: #0183fa;
  1116. }
  1117. .right-button-p:hover{
  1118. background-color: #0183fa;
  1119. }
  1120. .bottom-num-text{
  1121. text-align: center;
  1122. line-height: 30px;
  1123. font-size:16px;
  1124. position: absolute;
  1125. bottom:0;
  1126. width:1026px;
  1127. }
  1128. .out-button{
  1129. width:60px;
  1130. line-height:30px;
  1131. color:#999;
  1132. background-color: #dedede;
  1133. border-radius:4px;
  1134. text-align: center;
  1135. cursor: pointer;
  1136. position: absolute;
  1137. top:17px;
  1138. right:17px;
  1139. z-index:99999;
  1140. }
  1141. }
  1142. .info-dialog-content-document{
  1143. display: flex;
  1144. flex:1;
  1145. height:570px;
  1146. .iframe{
  1147. flex:1;
  1148. }
  1149. .out-button{
  1150. width:60px;
  1151. line-height:30px;
  1152. color:#999;
  1153. background-color: #dedede;
  1154. border-radius:4px;
  1155. text-align: center;
  1156. cursor: pointer;
  1157. position: absolute;
  1158. top:17px;
  1159. right:17px;
  1160. z-index:99999;
  1161. }
  1162. }
  1163. .info-dialog-content-document-list{
  1164. display: flex;
  1165. flex:1;
  1166. height:570px;
  1167. overflow: hidden;
  1168. .left-box{
  1169. display: flex;
  1170. flex-direction: column;
  1171. overflow: hidden;
  1172. width:265px;
  1173. .left-title-box{
  1174. padding-bottom:20px;
  1175. display: flex;
  1176. width:230px;
  1177. border-bottom:1px dashed #D8D8D8;
  1178. img{
  1179. width:16px;
  1180. height:13px;
  1181. margin:13px 15px 13px 0;
  1182. }
  1183. p{
  1184. line-height:40px;
  1185. width:230px;
  1186. font-size:16px;
  1187. color:#0183FA;
  1188. }
  1189. }
  1190. .left-for-box{
  1191. flex:1;
  1192. .left-for-p{
  1193. padding:0 10px;
  1194. width:230px;
  1195. line-height:40px;
  1196. margin-top:10px;
  1197. font-size:16px;
  1198. color:#333;
  1199. display:block;
  1200. overflow:hidden;
  1201. text-overflow:ellipsis;
  1202. white-space:nowrap;
  1203. cursor: pointer;
  1204. }
  1205. .check-p{
  1206. background-color:rgba(1,131,250,0.2);
  1207. color:#0183FA;
  1208. }
  1209. }
  1210. }
  1211. .center-border{
  1212. border-right:1px dashed #D8D8D8;
  1213. }
  1214. .right-box{
  1215. flex:1;
  1216. display: flex;
  1217. margin-left:57px;
  1218. .iframe{
  1219. flex:1;
  1220. }
  1221. }
  1222. .out-button{
  1223. width:60px;
  1224. line-height:30px;
  1225. color:#999;
  1226. background-color: #dedede;
  1227. border-radius:4px;
  1228. text-align: center;
  1229. cursor: pointer;
  1230. position: absolute;
  1231. top:17px;
  1232. right:17px;
  1233. z-index:99999;
  1234. }
  1235. }
  1236. }
  1237. .bottom-button-box{
  1238. height:60px;
  1239. width:1184px;
  1240. position: absolute;
  1241. bottom:0;
  1242. padding-top:15px;
  1243. border-top:1px solid #D8D8D8;
  1244. display: flex;
  1245. }
  1246. }
  1247. </style>