CheckRecordInfo.vue 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301
  1. <!--问题整改详情-->
  2. <template>
  3. <div class="CheckRecordInfo">
  4. <div class="CheckRecordInfoPage scrollbar-box" v-if="pageType">
  5. <!--标题部分-->
  6. <div class="top-title-box">
  7. <p class="title-p">问题整改</p>
  8. <p class="button-p reset-button-one" @click="backPage">返回</p>
  9. </div>
  10. <!--步骤条-->
  11. <div class="top-steps-box">
  12. <div class="top-steps-left-box">
  13. <img src="@/assets/ZDimages/secuityCheck/icon_zg_yzg.png">
  14. <p>待整改</p>
  15. </div>
  16. <div class="top-steps-border" :class="stepsType == 0?'top-steps-border-false':'top-steps-border-true'"></div>
  17. <div class="top-steps-center-box">
  18. <img src="@/assets/ZDimages/secuityCheck/icon_zg_zgwwc.png" v-if="stepsType == 0">
  19. <img src="@/assets/ZDimages/secuityCheck/icon_zg_fh.png" v-if="stepsType == 1 || stepsType == 4">
  20. <img src="@/assets/ZDimages/secuityCheck/icon_zg_btg.png" v-if="stepsType == 2">
  21. <p :class="stepsType==0?'color999':''">{{stepsType == 0||stepsType == 1?'整改待复核':(stepsType == 2?'复核未通过':(stepsType == 4?'整改已通过':''))}}</p>
  22. </div>
  23. <div class="top-steps-border" :class="stepsType != 4?'top-steps-border-false':'top-steps-border-true'"></div>
  24. <div class="top-steps-right-box">
  25. <img src="@/assets/ZDimages/secuityCheck/icon_zg_wwc.png" v-if="stepsType != 4">
  26. <img src="@/assets/ZDimages/secuityCheck/icon_zg_ywc.png" v-if="stepsType == 4">
  27. <p :class="stepsType!=4?'color999':''">{{newData.isZgStatus == 1?'暂时无法整改':'已整改'}}</p>
  28. </div>
  29. </div>
  30. <!--步骤信息-->
  31. <div class="top-steps-text-box">
  32. <div class="top-steps-text-left-box">
  33. <p>检查时间:{{newData.createTime}}</p>
  34. <p v-if="newData.firstTime">首次查看时间:{{newData.firstTime}}</p>
  35. </div>
  36. <div class="top-steps-text-center-box">
  37. <p v-if="newData.zgqrTime">整改时间:{{newData.zgqrTime}}</p>
  38. <p v-if="newData.zgbhTime">驳回时间:{{newData.zgbhTime}}</p>
  39. </div>
  40. <div class="top-steps-text-right-box">
  41. <p :class="stepsTimeType?'stepsTimeTypeTrue':''">整改截止时间:{{newData.zgjzTime}}</p>
  42. </div>
  43. </div>
  44. <!--整改单位/人员信息-->
  45. <div class="center-info-top-box">
  46. <div class="center-left-box">
  47. <img src="@/assets/newImages/icon_7.png">
  48. <div>
  49. <p>{{newData.zgType == 0?'一般整改':(newData.zgType == 1?'重大整改':'')}}</p>
  50. <p>{{newData.jcDwName}}</p>
  51. </div>
  52. </div>
  53. <div class="center-center-box">
  54. <img src="@/assets/newImages/icon_8.png">
  55. <div>
  56. <p>{{newData.laboratoryName}}</p>
  57. <p>{{newData.buildingName}}{{newData.fjNumber}}</p>
  58. </div>
  59. </div>
  60. <div class="center-right-box">
  61. <img src="@/assets/newImages/icon_9.png">
  62. <div>
  63. <p>{{newData.fzrName}}</p>
  64. <p>{{newData.fzrLxfs}}</p>
  65. </div>
  66. </div>
  67. </div>
  68. <!--整改信息部分-->
  69. <div class="center-info-box ">
  70. <div class="center-info-for-max-box">
  71. <p class="center-info-for-max-title">{{newData.isZgStatus == 1?'暂时无法整改':(stepsType == 0 ?'整改信息':'已整改信息')}}</p>
  72. <!--检查项循环-->
  73. <div class="center-info-for-box">
  74. <div class="center-info-for-title-box">
  75. <p class="title-left">{{newData.detailsList.jcxSstkNum}}</p>
  76. <div class="title-right">
  77. <p>{{newData.detailsList.jcxName}}</p>
  78. </div>
  79. </div>
  80. <div class="center-info-for-big-box" :class="allDataType?'center-info-for-big-box-all':(!newData.detailsList.detailslogList[1]?'center-info-for-big-box-all':'')">
  81. <div class="center-info-for-big-title-box">
  82. <p>条款:</p>
  83. <p>{{newData.detailsList.jcxSstkMs}}</p>
  84. </div>
  85. <div class="center-info-for-big-flex-box">
  86. <div class="center-info-for-big-flex-left-box">
  87. <p class="center-info-for-big-flex-left-title">隐患照片:</p>
  88. <div class="center-info-for-big-flex-left-img-box" v-if="newData.detailsList.yhImg[0]">
  89. <img :src="item" v-for="(item,index) in newData.detailsList.yhImg" :key="index" @click="lockImg(item)">
  90. </div>
  91. <p v-if="!newData.detailsList.yhImg[0]">未上传照片</p>
  92. </div>
  93. <div class="center-info-for-big-flex-right-box">
  94. <div class="center-info-for-big-flex-right-text-box">
  95. <p>检查时间:</p>
  96. <p>{{newData.createTime}}</p>
  97. </div>
  98. <div class="center-info-for-big-flex-right-text-box">
  99. <p>检查人:</p>
  100. <p>{{newData.jcRyxm}}</p>
  101. </div>
  102. <div class="center-info-for-big-flex-right-text-box">
  103. <p>隐患描述:</p>
  104. <p>{{newData.detailsList.yhMs}}</p>
  105. </div>
  106. </div>
  107. </div>
  108. <!--整改信息填写栏-->
  109. <div class="center-info-for-min-box" style="margin-bottom:20px;" v-if="stepsType == 0 || stepsType == 2" v-hasPermi="['laboratory:checkRecordDetails:rectification']">
  110. <!--整改循环-->
  111. <div class="center-info-for-min">
  112. <div class="center-info-for-min-left-box">
  113. <div class="for-min-title-box">
  114. <p></p>
  115. <p>整改信息</p>
  116. </div>
  117. <el-form ref="form" :model="form" :rules="rules">
  118. <div class="for-min-img-box" style="margin-top:25px;">
  119. <p class="for-min-img-box-left-title" style="color:#333;">整改材料:</p>
  120. <div class="for-min-img-box-left-img-box">
  121. <div v-for="(imgItem,index) in form.yhZghImg" :key="index" class="up-img-for-box">
  122. <img :src="imgItem">
  123. <i class="el-icon-close del-i" @click="imgDel(index)"></i>
  124. </div>
  125. <!--<img :src="imgItem" v-for="(imgItem,index) in form.yhZghImg" :key="index">-->
  126. <el-upload
  127. v-if="form.yhZghImg.length<5"
  128. class="position-button"
  129. :action="uploadImgUrlTwo"
  130. :show-file-list="false"
  131. accept="image/jpeg,image/gif,image/png"
  132. :on-success="(res)=>handleAvatarSuccessTwo(res,2)"
  133. :headers="headers"
  134. :before-upload="beforeAvatarUpload">
  135. <div class="up-data-button">
  136. <p>+</p>
  137. <p>上传</p>
  138. <el-form-item label="" prop="yhZghImg" style="height:150px;margin:10px 0 0 18px;" >
  139. </el-form-item>
  140. </div>
  141. </el-upload>
  142. </div>
  143. </div>
  144. <div class="for-min-input-box" style="width:715px;margin-top:0;margin-bottom:20px;">
  145. <p style="color:#333;">整改描述:</p>
  146. <el-form-item label="" prop="zgMs">
  147. <el-input
  148. class="min-input-textarea"
  149. type="textarea"
  150. resize="none"
  151. style="color:red;width:640px;"
  152. maxlength="50"
  153. :autosize="{ minRows: 4, maxRows: 4}"
  154. placeholder="请输入内容"
  155. v-model="form.zgMs">
  156. </el-input>
  157. </el-form-item>
  158. </div>
  159. </el-form>
  160. </div>
  161. <div class="center-info-for-min-right-box">
  162. <div class="for-min-title-box">
  163. <p></p>
  164. <p>复核信息</p>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <div class="center-info-for-min-box" v-if="newData.detailsList.detailslogList[0]">
  170. <!--整改循环-->
  171. <div class="center-info-for-min" v-for="(item,index) in newData.detailsList.detailslogList" :key="index" v-if="index == 0 || allDataType">
  172. <div class="center-info-for-min-left-box">
  173. <div class="for-min-title-box">
  174. <p></p>
  175. <p>整改信息</p>
  176. </div>
  177. <div class="for-min-text-box">
  178. <p>整改时间:</p>
  179. <p>{{item.createTime}}</p>
  180. </div>
  181. <div class="for-min-text-box">
  182. <p>整改人:</p>
  183. <p>{{item.zgUserName}}</p>
  184. </div>
  185. <div class="for-min-text-box">
  186. <p>整改描述:</p>
  187. <p>{{item.zgMs}}</p>
  188. </div>
  189. <div class="for-min-img-box">
  190. <p class="for-min-img-box-left-title">整改照片:</p>
  191. <div class="for-min-img-box-left-img-box" v-if="item.yhZghImg[0]">
  192. <img :src="minItem" v-for="(minItem,minIndex) in item.yhZghImg" :key="minIndex" @click="lockImg(minItem)">
  193. </div>
  194. <p v-if="!item.yhZghImg[0]">未上传照片</p>
  195. </div>
  196. </div>
  197. <div class="center-info-for-min-right-box">
  198. <div class="for-min-title-box">
  199. <p></p>
  200. <p>复核信息</p>
  201. </div>
  202. <div class="for-min-text-box" v-if="item.spTime">
  203. <p>复核时间:</p>
  204. <p>{{item.spTime}}</p>
  205. </div>
  206. <div class="for-min-text-box" v-if="item.spTime">
  207. <p>复核人:</p>
  208. <p>{{item.spUserName}}</p>
  209. </div>
  210. <div class="for-min-text-box" v-if="item.spTime">
  211. <p>复核结果:</p>
  212. <p :class="item.spStatus == 1?'spStatusColorA':'spStatusColorB'">{{item.spStatus == 1 ? '复核通过':'复核驳回'}}</p>
  213. </div>
  214. <div class="for-min-text-box" v-if="item.spTime">
  215. <p>复核备注:</p>
  216. <p>{{item.spSm}}</p>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. <!--查看更多复核信息-->
  222. <div class="all-button-box" v-if="newData.detailsList.detailslogList[1] && !allDataType" @click="lookAllData">
  223. <p>查看更多复核记录</p>
  224. <img src="@/assets/ZDimages/secuityCheck/icon_wtzg_jcjlxl.png">
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. <div class="bottom-button-box" v-hasPermi="['laboratory:checkRecordDetails:rectification']">
  231. <p class="null-p"></p>
  232. <p class="button-p inquire-button-two" @click="auditButton(1)" v-if="stepsType == 0 || stepsType == 2">暂时无法整改</p>
  233. <p class="button-p inquire-button-one" @click="auditButton(2)" v-if="stepsType == 0 || stepsType == 2">完成整改</p>
  234. <!--<p class="button-p reset-button-one" @click="downloadGenNotice" v-if="newData.zgType == 1">整改通知书</p>-->
  235. <!--<p class="button-p reset-button-one" @click="downloadGenReport" v-if="newData.zgType == 1 && stepsType == 4">整改报告</p>-->
  236. <p class="null-p"></p>
  237. </div>
  238. </div>
  239. <!--<check-record-info-up v-if="pageType == 2" :newData="newData"></check-record-info-up>-->
  240. <!--查看图片-->
  241. <el-dialog :title="imgTitle" :visible.sync="imgOpen" width="1200px" append-to-body>
  242. <div class="scrollbar-box" style="width:1160px;margin:0 auto;max-height:700px;overflow-y: scroll">
  243. <img :src="imgUrl" style="display:block;max-width:1160px;margin:0 auto">
  244. </div>
  245. </el-dialog>
  246. <el-dialog class="up-img-box" title="上传电子签名" :visible.sync="upImgOpen" width="600px" append-to-body>
  247. <p>示例</p>
  248. <img class="img-one" src="@/assets/ZDimages/icon_scdzqm_sl.png">
  249. <p>正楷签名</p>
  250. <div class="cropper-box">
  251. <vueCropper
  252. ref="cropper"
  253. :img="option.img"
  254. :outputSize="option.outputSize"
  255. :outputType="option.outputType"
  256. :info="option.info"
  257. :canScale="option.canScale"
  258. :autoCrop="option.autoCrop"
  259. :autoCropWidth="option.autoCropWidth"
  260. :autoCropHeight="option.autoCropHeight"
  261. :fixed="option.fixed"
  262. :fixedNumber="option.fixedNumber"
  263. :full="option.full"
  264. :fixedBox="option.fixedBox"
  265. :canMove="option.canMove"
  266. :canMoveBox="option.canMoveBox"
  267. :original="option.original"
  268. :centerBox="option.centerBox"
  269. :height="option.height"
  270. :infoTrue="option.infoTrue"
  271. :maxImgSize="option.maxImgSize"
  272. :enlarge="option.enlarge"
  273. :mode="option.mode"
  274. @realTime="realTime"
  275. ></vueCropper>
  276. <p class="cropper-button" @click="upImgButton">保存查看</p>
  277. <el-upload
  278. class="position-button"
  279. :action="uploadImgUrl"
  280. :show-file-list="false"
  281. :auto-upload="false"
  282. :on-change="signatureChange"
  283. accept="image/jpeg,image/gif,image/png"
  284. :headers="headers"
  285. :before-upload="beforeAvatarUpload">
  286. <p style="position: absolute;right:100px;top:10px;z-index:1;color:#fff;background:#14AE10;cursor: pointer;padding:5px 10px;margin:0;border-radius:6px;">选择签名</p>
  287. </el-upload>
  288. </div>
  289. <p style="color:#999;">请将签名置于选择框内以便提高识别度</p>
  290. <img class="cropper-img" v-if="signatureData" :src="signatureData">
  291. <div slot="footer" class="dialog-footer">
  292. <el-button @click="upImgOpenClick(1)">取 消</el-button>
  293. <el-button type="primary" @click="upSignatureData">确 定</el-button>
  294. </div>
  295. </el-dialog>
  296. </div>
  297. </template>
  298. <script>
  299. import { getDettailsListInfo,rectification,getCheckSign,queryDeptSignByUserId } from "@/api/laboratory/checkRecord";
  300. import { genSign,updateSignature } from "@/api/system/user";
  301. // import checkRecordInfoUp from "./CheckRecordInfoUp.vue";
  302. import { getToken } from "@/utils/auth";
  303. export default {
  304. name: 'verifyCheckInfo',
  305. // components: {
  306. // checkRecordInfoUp,
  307. // },
  308. props:{
  309. infoId:{},
  310. },
  311. data() {
  312. return {
  313. uploadImgUrl: window.location.href.split('://')[0]+'://' + process.env.VUE_APP_BASE_API + "/laboratory/studentinfo/commit/face", // 上传的图片服务器地址
  314. uploadImgUrlTwo: window.location.href.split('://')[0]+'://' + process.env.VUE_APP_BASE_API + "/file/upload", // 上传的图片服务器地址
  315. headers: {
  316. Authorization: "Bearer " + getToken(),
  317. },
  318. //整改状态
  319. stepsType:1,
  320. //逾期状态
  321. stepsTimeType:false,
  322. newData:{},
  323. active:0,
  324. textOne:"",
  325. textTwo:"",
  326. textTree:"",
  327. //页面状态
  328. pageType:false,
  329. //查看图片
  330. imgOpen:false,
  331. imgTitle:"",
  332. imgUrl:"",
  333. //传参数据
  334. infoData:[],
  335. //是否展示所有数据
  336. allDataType:false,
  337. //提交数据
  338. form:{
  339. zgMs:"",
  340. yhZghImg:[],
  341. },
  342. rules:{
  343. zgMs: [
  344. { required: true, message: "请输入整改描述", trigger: "blur" },
  345. { required: true, message: "请输入整改描述", validator: this.spaceJudgment, trigger: "blur" }
  346. ],
  347. yhZghImg: [
  348. { required: true, message: "请上传整改材料", trigger: "blur" }
  349. ],
  350. },
  351. //上传签名开关
  352. upImgOpen:false,
  353. option:{
  354. img: '', // 裁剪图片的地址
  355. outputSize: 1, //裁剪生成图片的质量(可选0.1 - 1)
  356. outputType: 'png', //裁剪生成图片的格式(jpeg || png || webp)
  357. info: true, //图片大小信息
  358. canScale: true, //图片是否允许滚轮缩放
  359. autoCrop: true, //是否默认生成截图框
  360. autoCropWidth: 240, //默认生成截图框宽度
  361. autoCropHeight: 80, //默认生成截图框高度
  362. fixed: true, //是否开启截图框宽高固定比例
  363. fixedNumber: [3, 1], //截图框的宽高比例
  364. full: false, //false按原比例裁切图片,不失真
  365. fixedBox: true, //固定截图框大小,不允许改变
  366. canMove: false, //上传图片是否可以移动
  367. canMoveBox: true, //截图框能否拖动
  368. original: false, //上传图片按照原始比例渲染
  369. centerBox: false, //截图框是否被限制在图片里面
  370. height: true, //是否按照设备的dpr 输出等比例图片
  371. infoTrue: false, //true为展示真实输出图片宽高,false展示看到的截图框宽高
  372. maxImgSize: 3000, //限制图片最大宽度和高度
  373. enlarge: 1, //图片根据截图框输出比例倍数
  374. mode: '560px 400px' //图片默认渲染方式
  375. },
  376. previews:{},
  377. //临时签名数据
  378. signatureData:"",
  379. }
  380. },
  381. created() {
  382. this.getInfo();
  383. },
  384. methods: {
  385. //删除整改图片
  386. imgDel(index){
  387. this.form.yhZghImg.splice(index,1);
  388. },
  389. // 实时预览函数
  390. realTime(data) {
  391. this.previews = data;
  392. },
  393. //上传签名
  394. upSignatureData(){
  395. if(!this.signatureData){
  396. this.msgError('请先选择签名上传并保存查看')
  397. }
  398. var blob = this.dataURLtoBlob(this.signatureData);
  399. var file = this.blobToFile(blob, 'dx.jpg');
  400. let formData = new FormData();
  401. formData.append('file',file,"DX.jpg")
  402. console.log("formData",formData);
  403. updateSignature(formData).then(response => {
  404. if(response.code == 200){
  405. this.msgSuccess("操作成功");
  406. this.upImgOpen = false;
  407. }
  408. });
  409. },
  410. //签名页面开关
  411. upImgOpenClick(type){
  412. if(type == 1){
  413. this.upImgOpen = false;
  414. }else if (type == 2){
  415. this.option.img = this.user.signature;
  416. this.signatureData = this.user.signature;
  417. this.upImgOpen = true;
  418. }
  419. },
  420. //确定签名
  421. upImgButton(){
  422. let self = this;
  423. if(!this.option.img){
  424. this.msgError('请先上传签名')
  425. return
  426. }
  427. this.$refs.cropper.getCropBlob(async (data) => {
  428. let formData = new FormData();
  429. formData.append('file',data,"DX.jpg")
  430. genSign(formData).then(response => {
  431. if(response.code == 200){
  432. this.signatureData = 'data:image/png;base64,'+response.data;
  433. } else {
  434. this.msgError(response.msg)
  435. }
  436. });
  437. })
  438. },
  439. //签名选择
  440. signatureChange(val){
  441. const windowURL = window.URL || window.webkitURL;
  442. this.option.img = windowURL.createObjectURL(val.raw)
  443. this.signatureData = "";
  444. this.upImgOpen = true;
  445. },
  446. //查看所有
  447. lookAllData(){
  448. this.allDataType = true;
  449. },
  450. //上传
  451. handleAvatarSuccessTwo(res, type) {
  452. this.form.yhZghImg.push(res.data.url);
  453. // console.log("res",res.data.url);
  454. // console.log("type",type);
  455. this.$refs["form"].validate(valid => {})
  456. this.$forceUpdate()
  457. },
  458. beforeAvatarUpload(file) {
  459. let type = false;
  460. console.log('file',file);
  461. if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/gif') {
  462. type = true;
  463. }else{
  464. this.$message.error('只能上传png/jpeg/gif格式图片');
  465. type = false;
  466. }
  467. return type;
  468. },
  469. getInfo(){
  470. console.log("this.infoId",this.infoId)
  471. let obj = {
  472. id:this.infoId,
  473. };
  474. getDettailsListInfo(obj).then( response => {
  475. let obj = JSON.parse(JSON.stringify(response.data));
  476. if(obj.details.yhImg){
  477. obj.details.yhImg = obj.details.yhImg.split(",");
  478. }
  479. if(obj.details.zmClImg){
  480. obj.details.zmClImg = obj.details.zmClImg.split(",");
  481. }
  482. if(obj.details.yhZghImg){
  483. obj.details.yhZghImg = obj.details.yhZghImg.split(",");
  484. }
  485. let newOjb = obj.record;
  486. newOjb.detailsList = obj.details;
  487. // spStatus检查项状态 0待整改 1整改待复核 2复核未通过 4完成
  488. // zgStatus 检查逾期 5逾期' 其他未逾期
  489. if(newOjb.detailsList.spStatus == 0){
  490. this.stepsType = 0;
  491. }else if (newOjb.detailsList.spStatus == 1){
  492. this.stepsType = 1;
  493. }else if (newOjb.detailsList.spStatus == 2){
  494. this.stepsType = 2;
  495. }else if (newOjb.detailsList.spStatus == 4){
  496. this.stepsType = 4;
  497. }
  498. if(newOjb.zgStatus == 5 && newOjb.detailsList.spStatus != 4){
  499. this.stepsTimeType = true
  500. }else{
  501. this.stepsTimeType = false
  502. }
  503. for(let i=0;i<newOjb.detailsList.detailslogList.length;i++){
  504. if(newOjb.detailsList.detailslogList[i].yhZghImg){
  505. newOjb.detailsList.detailslogList[i].yhZghImg = newOjb.detailsList.detailslogList[i].yhZghImg.split(",");
  506. }else{
  507. newOjb.detailsList.detailslogList[i].yhZghImg = [];
  508. }
  509. }
  510. this.$set(this,'newData',newOjb);
  511. this.pageType = true;
  512. });
  513. },
  514. //返回
  515. backPage(){
  516. this.$parent.goPageType(1);
  517. },
  518. //查看图片
  519. lockImg(url){
  520. this.imgTitle = "照片查看";
  521. this.imgUrl = url;
  522. this.imgOpen = true;
  523. },
  524. //整改
  525. auditButton(type){
  526. if(type == 1){
  527. this.$refs["form"].validateField("zgMs",valid=>{
  528. if (!valid) {
  529. if(this.newData.zgType == 1){
  530. getCheckSign().then( response => {
  531. if(response.data){
  532. this.putEditList(3);
  533. }else{
  534. this.upImgOpen = true;
  535. }
  536. })
  537. }else{
  538. this.putEditList(3);
  539. }
  540. }
  541. })
  542. }else if(type == 2){
  543. this.$refs["form"].validate(valid => {
  544. if (valid) {
  545. if(this.newData.zgType == 1){
  546. getCheckSign().then( response => {
  547. if(response.data){
  548. this.putEditList(1);
  549. }else{
  550. this.upImgOpen = true;
  551. }
  552. })
  553. }else{
  554. this.putEditList(1);
  555. }
  556. }
  557. })
  558. }
  559. },
  560. //整改
  561. putEditList(type){
  562. let obj = {
  563. checkId:this.newData.id,//检查单
  564. id:this.newData.detailsList.id,//隐患项
  565. spStatus:type,
  566. zgMs:this.form.zgMs,
  567. yhZghImg:this.form.yhZghImg+'',
  568. }
  569. rectification(obj).then( response => {
  570. this.msgSuccess(response.msg);
  571. this.backPage();
  572. })
  573. },
  574. //整改通知书
  575. downloadGenNotice(){
  576. if(this.newData.zgType == 1){
  577. getCheckSign().then( response => {
  578. if (response.data) {
  579. queryDeptSignByUserId().then(response =>{
  580. if(response.data.isUpload){
  581. this.download('/laboratory/checkOption/genNotice/'+this.newData.id, {}, `整改通知书.docx`)
  582. }else{
  583. this.$alert('请稍后联系管理员上传电子签章!否则整改通知书无法自动生成签章', '提示', {
  584. confirmButtonText: '确定',
  585. callback: action => {
  586. this.download('/laboratory/checkOption/genNotice/'+this.newData.id, {}, `整改通知书.docx`)
  587. }
  588. });
  589. }
  590. })
  591. }else{
  592. this.upImgOpen = true;
  593. }
  594. })
  595. }else{
  596. this.download('/laboratory/checkOption/genNotice/'+this.newData.id, {
  597. }, `整改通知书.docx`)
  598. }
  599. },
  600. //整改报告
  601. downloadGenReport(){
  602. if(this.newData.zgType == 1){
  603. getCheckSign().then( response => {
  604. if (response.data) {
  605. queryDeptSignByUserId().then(response =>{
  606. if(response.data.isUpload){
  607. this.download('/laboratory/checkOption/genReport/'+this.newData.id, {}, `整改报告.docx`)
  608. }else{
  609. this.$alert('请稍后联系管理员上传电子签章!否则整改报告无法自动生成签章', '提示', {
  610. confirmButtonText: '确定',
  611. callback: action => {
  612. this.download('/laboratory/checkOption/genReport/'+this.newData.id, {}, `整改报告.docx`)
  613. }
  614. });
  615. }
  616. })
  617. }else{
  618. this.upImgOpen = true;
  619. }
  620. })
  621. }else{
  622. this.download('/laboratory/checkOption/genReport/'+this.newData.id, {}, `整改报告.docx`)
  623. }
  624. },
  625. //将base64转换为blob
  626. dataURLtoBlob: function(dataurl) {
  627. var arr = dataurl.split(',')
  628. var mime = arr[0].match(/:(.*?);/)[1]
  629. var bstr = atob(arr[1])
  630. var n = bstr.length
  631. var u8arr = new Uint8Array(n)
  632. while (n--) {
  633. u8arr[n] = bstr.charCodeAt(n);
  634. }
  635. return new Blob([u8arr], { type: mime });
  636. },
  637. //将blob转换为file
  638. blobToFile: function(theBlob, fileName){
  639. theBlob.lastModifiedDate = new Date();
  640. theBlob.name = fileName;
  641. return theBlob;
  642. },
  643. }
  644. }
  645. </script>
  646. <style scoped lang="scss">
  647. .CheckRecordInfo{
  648. flex:1;
  649. display: flex;
  650. flex-direction: column;
  651. overflow: hidden;
  652. *{
  653. margin:0;
  654. }
  655. .CheckRecordInfoPage{
  656. flex:1;
  657. display: flex;
  658. flex-direction: column;
  659. overflow: hidden;
  660. overflow-y: scroll;
  661. /*标题部分*/
  662. .top-title-box{
  663. display: flex;
  664. height:80px;
  665. border-bottom:1px solid #e0e0e0;
  666. .title-p{
  667. margin-left:20px;
  668. flex:1;
  669. line-height:80px;
  670. font-size:18px;
  671. color:#0045AF;
  672. }
  673. .button-p{
  674. margin:20px;
  675. }
  676. }
  677. /*步骤条*/
  678. .top-steps-box{
  679. display: flex;
  680. width:870px;
  681. margin:30px auto 0;
  682. .top-steps-left-box{
  683. width:100px;
  684. display: flex;
  685. img{
  686. width:30px;
  687. height:30px;
  688. }
  689. p{
  690. flex:1;
  691. text-align:center;
  692. font-size:16px;
  693. line-height:30px;
  694. height:30px;
  695. }
  696. }
  697. .top-steps-border{
  698. width:260px;
  699. height:0;
  700. margin:14px 10px 0 0;
  701. }
  702. .color999{
  703. color:#999!important;
  704. }
  705. .top-steps-border-true{
  706. border:1px dashed #0183FA;
  707. }
  708. .top-steps-border-false{
  709. border:1px dashed #999;
  710. }
  711. .top-steps-center-box{
  712. width:130px;
  713. display: flex;
  714. img{
  715. width:30px;
  716. height:30px;
  717. }
  718. p{
  719. flex:1;
  720. text-align:center;
  721. font-size:16px;
  722. line-height:30px;
  723. height:30px;
  724. }
  725. }
  726. .top-steps-right-box{
  727. width:140px;
  728. display: flex;
  729. img{
  730. width:30px;
  731. height:30px;
  732. }
  733. p{
  734. flex:1;
  735. text-align:left;
  736. margin-left:5px;
  737. font-size:16px;
  738. line-height:30px;
  739. height:30px;
  740. }
  741. }
  742. }
  743. /*步骤信息*/
  744. .top-steps-text-box{
  745. display: flex;
  746. width:1000px;
  747. margin:10px auto 0;
  748. p{
  749. line-height:28px;
  750. font-size:14px;
  751. color:#999999;
  752. font-weight:500;
  753. }
  754. .top-steps-text-left-box{
  755. width:230px;
  756. p{
  757. text-align: left;
  758. }
  759. }
  760. .top-steps-text-center-box{
  761. flex:1;
  762. p{
  763. text-align: center;
  764. }
  765. }
  766. .top-steps-text-right-box{
  767. width:240px;
  768. p{
  769. text-align: left;
  770. }
  771. .stepsTimeTypeTrue{
  772. color:#FF4343;
  773. }
  774. }
  775. }
  776. /*整改单位/人员信息*/
  777. .center-info-top-box{
  778. border-top:1px solid #e0e0e0;
  779. margin:20px 20px 0;
  780. display: flex;
  781. p{
  782. margin:0;
  783. font-weight:500;
  784. }
  785. .center-left-box{
  786. margin-right:100px;
  787. display: flex;
  788. margin-top:20px;
  789. margin-left:20px;
  790. img{
  791. width:40px;
  792. height:40px;
  793. margin:10px 20px;
  794. }
  795. div{
  796. line-height:30px;
  797. font-size:16px;
  798. }
  799. }
  800. .center-center-box{
  801. margin-right:100px;
  802. display: flex;
  803. margin-top:20px;
  804. img{
  805. width:40px;
  806. height:40px;
  807. margin:10px 20px;
  808. }
  809. div{
  810. line-height:30px;
  811. font-size:16px;
  812. }
  813. }
  814. .center-right-box{
  815. display: flex;
  816. margin-top:20px;
  817. img{
  818. width:40px;
  819. height:40px;
  820. margin:10px 20px;
  821. }
  822. div{
  823. line-height:30px;
  824. font-size:16px;
  825. }
  826. }
  827. }
  828. /*整改信息部分*/
  829. .center-info-box{
  830. flex:1;
  831. .center-info-for-max-box{
  832. .center-info-for-max-title{
  833. padding-left:20px;
  834. border-bottom:1px solid #e0e0e0;
  835. flex:1;
  836. height:68px;
  837. line-height:68px;
  838. font-size:18px;
  839. color:#0045AF;
  840. }
  841. .center-info-for-box{
  842. margin: 20px 20px 0;
  843. .center-info-for-title-box{
  844. display: flex;
  845. overflow: hidden;
  846. .title-left{
  847. background: #0183FA;
  848. padding:0 10px;
  849. color:#fff;
  850. line-height:50px;
  851. }
  852. .title-right{
  853. background: #CCE6FE;
  854. flex:1;
  855. padding:15px 18px;
  856. color:#333;
  857. p{
  858. display: inline-block;
  859. line-height:20px;
  860. }
  861. }
  862. }
  863. .center-info-for-big-box{
  864. border-left:1px solid #e0e0e0;
  865. border-right:1px solid #e0e0e0;
  866. border-bottom:1px solid #e0e0e0;
  867. font-weight:500;
  868. overflow: hidden;
  869. .center-info-for-big-title-box{
  870. display: flex;
  871. font-size:14px;
  872. margin:23px 0 27px 0;
  873. p:nth-child(1){
  874. width:116px;
  875. text-align: right;
  876. color:#999;
  877. }
  878. p:nth-child(2){
  879. flex:1;
  880. color:#333;
  881. margin-right:20px;
  882. }
  883. }
  884. .center-info-for-big-flex-box{
  885. display: flex;
  886. .center-info-for-big-flex-left-box{
  887. width:790px;
  888. overflow: hidden;
  889. font-size:14px;
  890. display: flex;
  891. .center-info-for-big-flex-left-title{
  892. width:116px;
  893. text-align: right;
  894. color:#999;
  895. }
  896. .center-info-for-big-flex-left-img-box{
  897. img{
  898. margin:0 10px 10px 0;
  899. width:120px;
  900. height:120px;
  901. }
  902. }
  903. }
  904. .center-info-for-big-flex-right-box{
  905. flex:1;
  906. .center-info-for-big-flex-right-text-box{
  907. display: flex;
  908. margin:0 40px 25px 0;
  909. p{
  910. line-height:14px;
  911. font-size:14px;
  912. }
  913. p:nth-child(1){
  914. width:100px;
  915. color: #999;
  916. text-align: right;
  917. }
  918. p:nth-child(2){
  919. flex: 1;
  920. color:#333;
  921. }
  922. }
  923. }
  924. }
  925. .center-info-for-min-box{
  926. border:1px solid #e0e0e0;
  927. margin:0 40px;
  928. .center-info-for-min:nth-child(1){
  929. border:none;
  930. }
  931. .center-info-for-min{
  932. display: flex;
  933. padding:15px 17px;
  934. border-top:1px dashed #e0e0e0;
  935. .for-min-title-box{
  936. display: flex;
  937. p:nth-child(1){
  938. height:20px;
  939. width:4px;
  940. background:#0183FA;
  941. margin-right:10px;
  942. }
  943. p:nth-child(2){
  944. font-size:16px;
  945. line-height:20px;
  946. color:#333;
  947. }
  948. }
  949. .center-info-for-min-left-box{
  950. width:760px;
  951. .for-min-text-box{
  952. display: flex;
  953. margin-top:20px;
  954. p{
  955. font-size:14px;
  956. line-height:14px;
  957. }
  958. p:nth-child(1){
  959. width:75px;
  960. text-align: right;
  961. color:#999;
  962. }
  963. p:nth-child(2){
  964. flex:1;
  965. color:#333;
  966. margin-right:90px;
  967. }
  968. .spStatusColorA{
  969. color:#21CC1D!important;
  970. }
  971. .spStatusColorB{
  972. color:#FF0000!important;
  973. }
  974. }
  975. .for-min-img-box{
  976. width:790px;
  977. overflow: hidden;
  978. font-size:14px;
  979. line-height:14px;
  980. display: flex;
  981. margin-top:20px;
  982. .for-min-img-box-left-title{
  983. width:75px;
  984. text-align: right;
  985. color:#999;
  986. }
  987. .for-min-img-box-left-img-box{
  988. img{
  989. display: inline-block;
  990. overflow: hidden;
  991. width:120px;
  992. height:120px;
  993. }
  994. .up-img-for-box{
  995. display: inline-block;
  996. overflow: hidden;
  997. margin:0 10px 10px 0;
  998. width:120px;
  999. height:120px;
  1000. position: relative;
  1001. img{
  1002. display: block;
  1003. overflow: hidden;
  1004. width:120px;
  1005. height:120px;
  1006. }
  1007. .del-i{
  1008. position: absolute;
  1009. top:0;
  1010. right:0;
  1011. width:20px;
  1012. height:20px;
  1013. line-height:20px;
  1014. background: rgba(0,0,0,0.4);
  1015. color:#fff;
  1016. font-size:14px;
  1017. text-align: center;
  1018. cursor:pointer;
  1019. }
  1020. }
  1021. .position-button{
  1022. display: inline-block;
  1023. overflow: hidden;
  1024. margin:0 10px 10px 0;
  1025. width:120px;
  1026. height:120px;
  1027. .up-data-button{
  1028. display: inline-block;
  1029. overflow: hidden;
  1030. width:120px;
  1031. height:120px;
  1032. border: 1px dashed #E0E0E0;
  1033. cursor: pointer;
  1034. p{
  1035. text-align: center;
  1036. color:#999;
  1037. font-weight:500;
  1038. }
  1039. p:nth-child(1){
  1040. font-size: 20px;
  1041. line-height:40px;
  1042. margin-top:20px;
  1043. }
  1044. p:nth-child(2){
  1045. font-size: 16px;
  1046. }
  1047. }
  1048. }
  1049. }
  1050. }
  1051. .for-min-input-box{
  1052. display: flex;
  1053. margin-top:20px;
  1054. p{
  1055. font-size:14px;
  1056. line-height:14px;
  1057. }
  1058. p:nth-child(1){
  1059. width:75px;
  1060. text-align: right;
  1061. color:#999;
  1062. }
  1063. .min-input-textarea{
  1064. flex:1;
  1065. color:#333;
  1066. font-size:14px;
  1067. line-height:16px;
  1068. }
  1069. }
  1070. }
  1071. .center-info-for-min-right-box{
  1072. flex:1;
  1073. .for-min-text-box{
  1074. display: flex;
  1075. margin-top:20px;
  1076. p{
  1077. font-size:14px;
  1078. line-height:14px;
  1079. }
  1080. p:nth-child(1){
  1081. width:75px;
  1082. text-align: right;
  1083. color:#999;
  1084. }
  1085. p:nth-child(2){
  1086. flex:1;
  1087. color:#333;
  1088. }
  1089. .spStatusColorA{
  1090. color:#21CC1D!important;
  1091. }
  1092. .spStatusColorB{
  1093. color:#FF0000!important;
  1094. }
  1095. }
  1096. }
  1097. }
  1098. }
  1099. .all-button-box{
  1100. display: flex;
  1101. height:50px;
  1102. width:140px;
  1103. margin:0 auto;
  1104. cursor: pointer;
  1105. p{
  1106. line-height:50px;
  1107. text-align: center;
  1108. font-size:14px;
  1109. color:#0183FA;
  1110. }
  1111. img{
  1112. width:12px;
  1113. height:10px;
  1114. margin:20px 0 20px 10px;
  1115. }
  1116. }
  1117. }
  1118. .center-info-for-big-box-all{
  1119. padding-bottom:20px;
  1120. }
  1121. }
  1122. }
  1123. .text-box{
  1124. display: flex;
  1125. margin-top:10px;
  1126. p{
  1127. font-weight:500;
  1128. }
  1129. p:nth-child(1){
  1130. width:80px;
  1131. line-height:30px;
  1132. }
  1133. p:nth-child(2){
  1134. flex:1;
  1135. padding-top:5px;
  1136. line-height:20px;
  1137. }
  1138. }
  1139. .center-info-top-box{
  1140. display: flex;
  1141. p{
  1142. margin:0;
  1143. font-weight:500;
  1144. }
  1145. .center-left-box{
  1146. width:360px;
  1147. display: flex;
  1148. margin-top:20px;
  1149. img{
  1150. width:40px;
  1151. height:40px;
  1152. margin:10px 20px;
  1153. }
  1154. div{
  1155. line-height:30px;
  1156. font-size:18px;
  1157. }
  1158. }
  1159. .center-center-box{
  1160. width:360px;
  1161. display: flex;
  1162. margin-top:20px;
  1163. img{
  1164. width:40px;
  1165. height:40px;
  1166. margin:10px 20px;
  1167. }
  1168. div{
  1169. line-height:30px;
  1170. font-size:18px;
  1171. }
  1172. }
  1173. .center-right-box{
  1174. width:360px;
  1175. display: flex;
  1176. margin-top:20px;
  1177. img{
  1178. width:40px;
  1179. height:40px;
  1180. margin:10px 20px;
  1181. }
  1182. div{
  1183. line-height:30px;
  1184. font-size:18px;
  1185. }
  1186. }
  1187. }
  1188. .center-info-title{
  1189. font-size:18px;
  1190. margin-top:10px;
  1191. line-height:40px;
  1192. }
  1193. .center-for-box{
  1194. margin-top:20px;
  1195. border:1px solid #dedede;
  1196. padding:20px;
  1197. display: flex;
  1198. p{
  1199. margin:0;
  1200. font-weight:500;
  1201. }
  1202. .center-for-left-box{
  1203. width:500px;
  1204. .for-title-p{
  1205. line-height:20px;
  1206. font-size:16px;
  1207. margin-bottom:10px;
  1208. }
  1209. .for-text-box{
  1210. display: flex;
  1211. font-size:14px;
  1212. p:nth-child(1){
  1213. width:80px;
  1214. line-height:30px;
  1215. }
  1216. p:nth-child(2){
  1217. flex:1;
  1218. padding-top:5px;
  1219. line-height:20px;
  1220. }
  1221. }
  1222. }
  1223. .center-for-right-box{
  1224. margin-left:40px;
  1225. flex:1;
  1226. .for-img-max-box{
  1227. display: flex;
  1228. .for-img-max-title-p{
  1229. line-height:80px;
  1230. width:120px;
  1231. }
  1232. .for-img-box{
  1233. flex:1;
  1234. img{
  1235. cursor: pointer;
  1236. height:80px;
  1237. width:80px;
  1238. margin:0 10px 10px 0;
  1239. }
  1240. }
  1241. }
  1242. }
  1243. }
  1244. }
  1245. .bottom-button-box{
  1246. display: flex;
  1247. padding:20px 0;
  1248. .null-p{
  1249. flex:1;
  1250. }
  1251. .button-p{
  1252. width:120px;
  1253. margin-right:20px;
  1254. }
  1255. }
  1256. }
  1257. }
  1258. </style>
  1259. <style lang="scss">
  1260. .up-img-box{
  1261. .el-dialog__body{
  1262. padding-top:0;
  1263. }
  1264. .img-one{
  1265. width:560px;
  1266. height:150px;
  1267. }
  1268. .cropper-img{
  1269. display: block;
  1270. border:1px solid #e0e0e0;
  1271. width:360px;
  1272. height:120px;
  1273. margin:0 auto;
  1274. }
  1275. .cropper-box{
  1276. width:560px;
  1277. height:270px;
  1278. position: relative;
  1279. .cropper-button{
  1280. position: absolute;
  1281. right:10px;top:10px;
  1282. z-index:1;
  1283. background: #0183FA;
  1284. color:#fff;
  1285. cursor: pointer;
  1286. padding:5px 10px;
  1287. margin:0;
  1288. border-radius:6px;
  1289. }
  1290. }
  1291. }
  1292. </style>