infoDialog.vue 39 KB

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