infoDialog.vue 40 KB

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