CheckRecordInfo.vue 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302
  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]+'://' + this.judgmentNetworkReturnAddress() + "/laboratory/studentinfo/commit/face", // 上传的图片服务器地址
  314. uploadImgUrlTwo: this.uploadUrl(), // 上传的图片服务器地址
  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. const file = new File([data], 'userImg.jpg', { type: 'image/jpeg', lastModified: Date.now() });
  429. let formData = new FormData();
  430. formData.append('file',file,"DX.jpg")
  431. genSign(formData).then(response => {
  432. if(response.code == 200){
  433. this.signatureData = 'data:image/png;base64,'+response.data;
  434. } else {
  435. this.msgError(response.msg)
  436. }
  437. });
  438. })
  439. },
  440. //签名选择
  441. signatureChange(val){
  442. const windowURL = window.URL || window.webkitURL;
  443. this.option.img = windowURL.createObjectURL(val.raw)
  444. this.signatureData = "";
  445. this.upImgOpen = true;
  446. },
  447. //查看所有
  448. lookAllData(){
  449. this.allDataType = true;
  450. },
  451. //上传
  452. handleAvatarSuccessTwo(res, type) {
  453. this.form.yhZghImg.push(res.data.url);
  454. // console.log("res",res.data.url);
  455. // console.log("type",type);
  456. this.$refs["form"].validate(valid => {})
  457. this.$forceUpdate()
  458. },
  459. beforeAvatarUpload(file) {
  460. let type = false;
  461. console.log('file',file);
  462. if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/gif') {
  463. type = true;
  464. }else{
  465. this.$message.error('只能上传png/jpeg/gif格式图片');
  466. type = false;
  467. }
  468. return type;
  469. },
  470. getInfo(){
  471. console.log("this.infoId",this.infoId)
  472. let obj = {
  473. id:this.infoId,
  474. };
  475. getDettailsListInfo(obj).then( response => {
  476. let obj = JSON.parse(JSON.stringify(response.data));
  477. if(obj.details.yhImg){
  478. obj.details.yhImg = obj.details.yhImg.split(",");
  479. }
  480. if(obj.details.zmClImg){
  481. obj.details.zmClImg = obj.details.zmClImg.split(",");
  482. }
  483. if(obj.details.yhZghImg){
  484. obj.details.yhZghImg = obj.details.yhZghImg.split(",");
  485. }
  486. let newOjb = obj.record;
  487. newOjb.detailsList = obj.details;
  488. // spStatus检查项状态 0待整改 1整改待复核 2复核未通过 4完成
  489. // zgStatus 检查逾期 5逾期' 其他未逾期
  490. if(newOjb.detailsList.spStatus == 0){
  491. this.stepsType = 0;
  492. }else if (newOjb.detailsList.spStatus == 1){
  493. this.stepsType = 1;
  494. }else if (newOjb.detailsList.spStatus == 2){
  495. this.stepsType = 2;
  496. }else if (newOjb.detailsList.spStatus == 4){
  497. this.stepsType = 4;
  498. }
  499. if(newOjb.zgStatus == 5 && newOjb.detailsList.spStatus != 4){
  500. this.stepsTimeType = true
  501. }else{
  502. this.stepsTimeType = false
  503. }
  504. for(let i=0;i<newOjb.detailsList.detailslogList.length;i++){
  505. if(newOjb.detailsList.detailslogList[i].yhZghImg){
  506. newOjb.detailsList.detailslogList[i].yhZghImg = newOjb.detailsList.detailslogList[i].yhZghImg.split(",");
  507. }else{
  508. newOjb.detailsList.detailslogList[i].yhZghImg = [];
  509. }
  510. }
  511. this.$set(this,'newData',newOjb);
  512. this.pageType = true;
  513. });
  514. },
  515. //返回
  516. backPage(){
  517. this.$parent.goPageType(1);
  518. },
  519. //查看图片
  520. lockImg(url){
  521. this.imgTitle = "照片查看";
  522. this.imgUrl = url;
  523. this.imgOpen = true;
  524. },
  525. //整改
  526. auditButton(type){
  527. if(type == 1){
  528. this.$refs["form"].validateField("zgMs",valid=>{
  529. if (!valid) {
  530. if(this.newData.zgType == 1){
  531. getCheckSign().then( response => {
  532. if(response.data){
  533. this.putEditList(3);
  534. }else{
  535. this.upImgOpen = true;
  536. }
  537. })
  538. }else{
  539. this.putEditList(3);
  540. }
  541. }
  542. })
  543. }else if(type == 2){
  544. this.$refs["form"].validate(valid => {
  545. if (valid) {
  546. if(this.newData.zgType == 1){
  547. getCheckSign().then( response => {
  548. if(response.data){
  549. this.putEditList(1);
  550. }else{
  551. this.upImgOpen = true;
  552. }
  553. })
  554. }else{
  555. this.putEditList(1);
  556. }
  557. }
  558. })
  559. }
  560. },
  561. //整改
  562. putEditList(type){
  563. let obj = {
  564. checkId:this.newData.id,//检查单
  565. id:this.newData.detailsList.id,//隐患项
  566. spStatus:type,
  567. zgMs:this.form.zgMs,
  568. yhZghImg:this.form.yhZghImg+'',
  569. }
  570. rectification(obj).then( response => {
  571. this.msgSuccess(response.msg);
  572. this.backPage();
  573. })
  574. },
  575. //整改通知书
  576. downloadGenNotice(){
  577. if(this.newData.zgType == 1){
  578. getCheckSign().then( response => {
  579. if (response.data) {
  580. queryDeptSignByUserId().then(response =>{
  581. if(response.data.isUpload){
  582. this.download('/laboratory/checkOption/genNotice/'+this.newData.id, {}, `整改通知书.docx`)
  583. }else{
  584. this.$alert('请稍后联系管理员上传电子签章!否则整改通知书无法自动生成签章', '提示', {
  585. confirmButtonText: '确定',
  586. callback: action => {
  587. this.download('/laboratory/checkOption/genNotice/'+this.newData.id, {}, `整改通知书.docx`)
  588. }
  589. });
  590. }
  591. })
  592. }else{
  593. this.upImgOpen = true;
  594. }
  595. })
  596. }else{
  597. this.download('/laboratory/checkOption/genNotice/'+this.newData.id, {
  598. }, `整改通知书.docx`)
  599. }
  600. },
  601. //整改报告
  602. downloadGenReport(){
  603. if(this.newData.zgType == 1){
  604. getCheckSign().then( response => {
  605. if (response.data) {
  606. queryDeptSignByUserId().then(response =>{
  607. if(response.data.isUpload){
  608. this.download('/laboratory/checkOption/genReport/'+this.newData.id, {}, `整改报告.docx`)
  609. }else{
  610. this.$alert('请稍后联系管理员上传电子签章!否则整改报告无法自动生成签章', '提示', {
  611. confirmButtonText: '确定',
  612. callback: action => {
  613. this.download('/laboratory/checkOption/genReport/'+this.newData.id, {}, `整改报告.docx`)
  614. }
  615. });
  616. }
  617. })
  618. }else{
  619. this.upImgOpen = true;
  620. }
  621. })
  622. }else{
  623. this.download('/laboratory/checkOption/genReport/'+this.newData.id, {}, `整改报告.docx`)
  624. }
  625. },
  626. //将base64转换为blob
  627. dataURLtoBlob: function(dataurl) {
  628. var arr = dataurl.split(',')
  629. var mime = arr[0].match(/:(.*?);/)[1]
  630. var bstr = atob(arr[1])
  631. var n = bstr.length
  632. var u8arr = new Uint8Array(n)
  633. while (n--) {
  634. u8arr[n] = bstr.charCodeAt(n);
  635. }
  636. return new Blob([u8arr], { type: mime });
  637. },
  638. //将blob转换为file
  639. blobToFile: function(theBlob, fileName){
  640. theBlob.lastModifiedDate = new Date();
  641. theBlob.name = fileName;
  642. return theBlob;
  643. },
  644. }
  645. }
  646. </script>
  647. <style scoped lang="scss">
  648. .CheckRecordInfo{
  649. flex:1;
  650. display: flex;
  651. flex-direction: column;
  652. overflow: hidden;
  653. *{
  654. margin:0;
  655. }
  656. .CheckRecordInfoPage{
  657. flex:1;
  658. display: flex;
  659. flex-direction: column;
  660. overflow: hidden;
  661. overflow-y: scroll;
  662. /*标题部分*/
  663. .top-title-box{
  664. display: flex;
  665. height:80px;
  666. border-bottom:1px solid #e0e0e0;
  667. .title-p{
  668. margin-left:20px;
  669. flex:1;
  670. line-height:80px;
  671. font-size:18px;
  672. color:#0045AF;
  673. }
  674. .button-p{
  675. margin:20px;
  676. }
  677. }
  678. /*步骤条*/
  679. .top-steps-box{
  680. display: flex;
  681. width:870px;
  682. margin:30px auto 0;
  683. .top-steps-left-box{
  684. width:100px;
  685. display: flex;
  686. img{
  687. width:30px;
  688. height:30px;
  689. }
  690. p{
  691. flex:1;
  692. text-align:center;
  693. font-size:16px;
  694. line-height:30px;
  695. height:30px;
  696. }
  697. }
  698. .top-steps-border{
  699. width:260px;
  700. height:0;
  701. margin:14px 10px 0 0;
  702. }
  703. .color999{
  704. color:#999!important;
  705. }
  706. .top-steps-border-true{
  707. border:1px dashed #0183FA;
  708. }
  709. .top-steps-border-false{
  710. border:1px dashed #999;
  711. }
  712. .top-steps-center-box{
  713. width:130px;
  714. display: flex;
  715. img{
  716. width:30px;
  717. height:30px;
  718. }
  719. p{
  720. flex:1;
  721. text-align:center;
  722. font-size:16px;
  723. line-height:30px;
  724. height:30px;
  725. }
  726. }
  727. .top-steps-right-box{
  728. width:140px;
  729. display: flex;
  730. img{
  731. width:30px;
  732. height:30px;
  733. }
  734. p{
  735. flex:1;
  736. text-align:left;
  737. margin-left:5px;
  738. font-size:16px;
  739. line-height:30px;
  740. height:30px;
  741. }
  742. }
  743. }
  744. /*步骤信息*/
  745. .top-steps-text-box{
  746. display: flex;
  747. width:1000px;
  748. margin:10px auto 0;
  749. p{
  750. line-height:28px;
  751. font-size:14px;
  752. color:#999999;
  753. font-weight:500;
  754. }
  755. .top-steps-text-left-box{
  756. width:230px;
  757. p{
  758. text-align: left;
  759. }
  760. }
  761. .top-steps-text-center-box{
  762. flex:1;
  763. p{
  764. text-align: center;
  765. }
  766. }
  767. .top-steps-text-right-box{
  768. width:240px;
  769. p{
  770. text-align: left;
  771. }
  772. .stepsTimeTypeTrue{
  773. color:#FF4343;
  774. }
  775. }
  776. }
  777. /*整改单位/人员信息*/
  778. .center-info-top-box{
  779. border-top:1px solid #e0e0e0;
  780. margin:20px 20px 0;
  781. display: flex;
  782. p{
  783. margin:0;
  784. font-weight:500;
  785. }
  786. .center-left-box{
  787. margin-right:100px;
  788. display: flex;
  789. margin-top:20px;
  790. margin-left:20px;
  791. img{
  792. width:40px;
  793. height:40px;
  794. margin:10px 20px;
  795. }
  796. div{
  797. line-height:30px;
  798. font-size:16px;
  799. }
  800. }
  801. .center-center-box{
  802. margin-right:100px;
  803. display: flex;
  804. margin-top:20px;
  805. img{
  806. width:40px;
  807. height:40px;
  808. margin:10px 20px;
  809. }
  810. div{
  811. line-height:30px;
  812. font-size:16px;
  813. }
  814. }
  815. .center-right-box{
  816. display: flex;
  817. margin-top:20px;
  818. img{
  819. width:40px;
  820. height:40px;
  821. margin:10px 20px;
  822. }
  823. div{
  824. line-height:30px;
  825. font-size:16px;
  826. }
  827. }
  828. }
  829. /*整改信息部分*/
  830. .center-info-box{
  831. flex:1;
  832. .center-info-for-max-box{
  833. .center-info-for-max-title{
  834. padding-left:20px;
  835. border-bottom:1px solid #e0e0e0;
  836. flex:1;
  837. height:68px;
  838. line-height:68px;
  839. font-size:18px;
  840. color:#0045AF;
  841. }
  842. .center-info-for-box{
  843. margin: 20px 20px 0;
  844. .center-info-for-title-box{
  845. display: flex;
  846. overflow: hidden;
  847. .title-left{
  848. background: #0183FA;
  849. padding:0 10px;
  850. color:#fff;
  851. line-height:50px;
  852. }
  853. .title-right{
  854. background: #CCE6FE;
  855. flex:1;
  856. padding:15px 18px;
  857. color:#333;
  858. p{
  859. display: inline-block;
  860. line-height:20px;
  861. }
  862. }
  863. }
  864. .center-info-for-big-box{
  865. border-left:1px solid #e0e0e0;
  866. border-right:1px solid #e0e0e0;
  867. border-bottom:1px solid #e0e0e0;
  868. font-weight:500;
  869. overflow: hidden;
  870. .center-info-for-big-title-box{
  871. display: flex;
  872. font-size:14px;
  873. margin:23px 0 27px 0;
  874. p:nth-child(1){
  875. width:116px;
  876. text-align: right;
  877. color:#999;
  878. }
  879. p:nth-child(2){
  880. flex:1;
  881. color:#333;
  882. margin-right:20px;
  883. }
  884. }
  885. .center-info-for-big-flex-box{
  886. display: flex;
  887. .center-info-for-big-flex-left-box{
  888. width:790px;
  889. overflow: hidden;
  890. font-size:14px;
  891. display: flex;
  892. .center-info-for-big-flex-left-title{
  893. width:116px;
  894. text-align: right;
  895. color:#999;
  896. }
  897. .center-info-for-big-flex-left-img-box{
  898. img{
  899. margin:0 10px 10px 0;
  900. width:120px;
  901. height:120px;
  902. }
  903. }
  904. }
  905. .center-info-for-big-flex-right-box{
  906. flex:1;
  907. .center-info-for-big-flex-right-text-box{
  908. display: flex;
  909. margin:0 40px 25px 0;
  910. p{
  911. line-height:14px;
  912. font-size:14px;
  913. }
  914. p:nth-child(1){
  915. width:100px;
  916. color: #999;
  917. text-align: right;
  918. }
  919. p:nth-child(2){
  920. flex: 1;
  921. color:#333;
  922. }
  923. }
  924. }
  925. }
  926. .center-info-for-min-box{
  927. border:1px solid #e0e0e0;
  928. margin:0 40px;
  929. .center-info-for-min:nth-child(1){
  930. border:none;
  931. }
  932. .center-info-for-min{
  933. display: flex;
  934. padding:15px 17px;
  935. border-top:1px dashed #e0e0e0;
  936. .for-min-title-box{
  937. display: flex;
  938. p:nth-child(1){
  939. height:20px;
  940. width:4px;
  941. background:#0183FA;
  942. margin-right:10px;
  943. }
  944. p:nth-child(2){
  945. font-size:16px;
  946. line-height:20px;
  947. color:#333;
  948. }
  949. }
  950. .center-info-for-min-left-box{
  951. width:760px;
  952. .for-min-text-box{
  953. display: flex;
  954. margin-top:20px;
  955. p{
  956. font-size:14px;
  957. line-height:14px;
  958. }
  959. p:nth-child(1){
  960. width:75px;
  961. text-align: right;
  962. color:#999;
  963. }
  964. p:nth-child(2){
  965. flex:1;
  966. color:#333;
  967. margin-right:90px;
  968. }
  969. .spStatusColorA{
  970. color:#21CC1D!important;
  971. }
  972. .spStatusColorB{
  973. color:#FF0000!important;
  974. }
  975. }
  976. .for-min-img-box{
  977. width:790px;
  978. overflow: hidden;
  979. font-size:14px;
  980. line-height:14px;
  981. display: flex;
  982. margin-top:20px;
  983. .for-min-img-box-left-title{
  984. width:75px;
  985. text-align: right;
  986. color:#999;
  987. }
  988. .for-min-img-box-left-img-box{
  989. img{
  990. display: inline-block;
  991. overflow: hidden;
  992. width:120px;
  993. height:120px;
  994. }
  995. .up-img-for-box{
  996. display: inline-block;
  997. overflow: hidden;
  998. margin:0 10px 10px 0;
  999. width:120px;
  1000. height:120px;
  1001. position: relative;
  1002. img{
  1003. display: block;
  1004. overflow: hidden;
  1005. width:120px;
  1006. height:120px;
  1007. }
  1008. .del-i{
  1009. position: absolute;
  1010. top:0;
  1011. right:0;
  1012. width:20px;
  1013. height:20px;
  1014. line-height:20px;
  1015. background: rgba(0,0,0,0.4);
  1016. color:#fff;
  1017. font-size:14px;
  1018. text-align: center;
  1019. cursor:pointer;
  1020. }
  1021. }
  1022. .position-button{
  1023. display: inline-block;
  1024. overflow: hidden;
  1025. margin:0 10px 10px 0;
  1026. width:120px;
  1027. height:120px;
  1028. .up-data-button{
  1029. display: inline-block;
  1030. overflow: hidden;
  1031. width:120px;
  1032. height:120px;
  1033. border: 1px dashed #E0E0E0;
  1034. cursor: pointer;
  1035. p{
  1036. text-align: center;
  1037. color:#999;
  1038. font-weight:500;
  1039. }
  1040. p:nth-child(1){
  1041. font-size: 20px;
  1042. line-height:40px;
  1043. margin-top:20px;
  1044. }
  1045. p:nth-child(2){
  1046. font-size: 16px;
  1047. }
  1048. }
  1049. }
  1050. }
  1051. }
  1052. .for-min-input-box{
  1053. display: flex;
  1054. margin-top:20px;
  1055. p{
  1056. font-size:14px;
  1057. line-height:14px;
  1058. }
  1059. p:nth-child(1){
  1060. width:75px;
  1061. text-align: right;
  1062. color:#999;
  1063. }
  1064. .min-input-textarea{
  1065. flex:1;
  1066. color:#333;
  1067. font-size:14px;
  1068. line-height:16px;
  1069. }
  1070. }
  1071. }
  1072. .center-info-for-min-right-box{
  1073. flex:1;
  1074. .for-min-text-box{
  1075. display: flex;
  1076. margin-top:20px;
  1077. p{
  1078. font-size:14px;
  1079. line-height:14px;
  1080. }
  1081. p:nth-child(1){
  1082. width:75px;
  1083. text-align: right;
  1084. color:#999;
  1085. }
  1086. p:nth-child(2){
  1087. flex:1;
  1088. color:#333;
  1089. }
  1090. .spStatusColorA{
  1091. color:#21CC1D!important;
  1092. }
  1093. .spStatusColorB{
  1094. color:#FF0000!important;
  1095. }
  1096. }
  1097. }
  1098. }
  1099. }
  1100. .all-button-box{
  1101. display: flex;
  1102. height:50px;
  1103. width:140px;
  1104. margin:0 auto;
  1105. cursor: pointer;
  1106. p{
  1107. line-height:50px;
  1108. text-align: center;
  1109. font-size:14px;
  1110. color:#0183FA;
  1111. }
  1112. img{
  1113. width:12px;
  1114. height:10px;
  1115. margin:20px 0 20px 10px;
  1116. }
  1117. }
  1118. }
  1119. .center-info-for-big-box-all{
  1120. padding-bottom:20px;
  1121. }
  1122. }
  1123. }
  1124. .text-box{
  1125. display: flex;
  1126. margin-top:10px;
  1127. p{
  1128. font-weight:500;
  1129. }
  1130. p:nth-child(1){
  1131. width:80px;
  1132. line-height:30px;
  1133. }
  1134. p:nth-child(2){
  1135. flex:1;
  1136. padding-top:5px;
  1137. line-height:20px;
  1138. }
  1139. }
  1140. .center-info-top-box{
  1141. display: flex;
  1142. p{
  1143. margin:0;
  1144. font-weight:500;
  1145. }
  1146. .center-left-box{
  1147. width:360px;
  1148. display: flex;
  1149. margin-top:20px;
  1150. img{
  1151. width:40px;
  1152. height:40px;
  1153. margin:10px 20px;
  1154. }
  1155. div{
  1156. line-height:30px;
  1157. font-size:18px;
  1158. }
  1159. }
  1160. .center-center-box{
  1161. width:360px;
  1162. display: flex;
  1163. margin-top:20px;
  1164. img{
  1165. width:40px;
  1166. height:40px;
  1167. margin:10px 20px;
  1168. }
  1169. div{
  1170. line-height:30px;
  1171. font-size:18px;
  1172. }
  1173. }
  1174. .center-right-box{
  1175. width:360px;
  1176. display: flex;
  1177. margin-top:20px;
  1178. img{
  1179. width:40px;
  1180. height:40px;
  1181. margin:10px 20px;
  1182. }
  1183. div{
  1184. line-height:30px;
  1185. font-size:18px;
  1186. }
  1187. }
  1188. }
  1189. .center-info-title{
  1190. font-size:18px;
  1191. margin-top:10px;
  1192. line-height:40px;
  1193. }
  1194. .center-for-box{
  1195. margin-top:20px;
  1196. border:1px solid #dedede;
  1197. padding:20px;
  1198. display: flex;
  1199. p{
  1200. margin:0;
  1201. font-weight:500;
  1202. }
  1203. .center-for-left-box{
  1204. width:500px;
  1205. .for-title-p{
  1206. line-height:20px;
  1207. font-size:16px;
  1208. margin-bottom:10px;
  1209. }
  1210. .for-text-box{
  1211. display: flex;
  1212. font-size:14px;
  1213. p:nth-child(1){
  1214. width:80px;
  1215. line-height:30px;
  1216. }
  1217. p:nth-child(2){
  1218. flex:1;
  1219. padding-top:5px;
  1220. line-height:20px;
  1221. }
  1222. }
  1223. }
  1224. .center-for-right-box{
  1225. margin-left:40px;
  1226. flex:1;
  1227. .for-img-max-box{
  1228. display: flex;
  1229. .for-img-max-title-p{
  1230. line-height:80px;
  1231. width:120px;
  1232. }
  1233. .for-img-box{
  1234. flex:1;
  1235. img{
  1236. cursor: pointer;
  1237. height:80px;
  1238. width:80px;
  1239. margin:0 10px 10px 0;
  1240. }
  1241. }
  1242. }
  1243. }
  1244. }
  1245. }
  1246. .bottom-button-box{
  1247. display: flex;
  1248. padding:20px 0;
  1249. .null-p{
  1250. flex:1;
  1251. }
  1252. .button-p{
  1253. width:120px;
  1254. margin-right:20px;
  1255. }
  1256. }
  1257. }
  1258. }
  1259. </style>
  1260. <style lang="scss">
  1261. .up-img-box{
  1262. .el-dialog__body{
  1263. padding-top:0;
  1264. }
  1265. .img-one{
  1266. width:560px;
  1267. height:150px;
  1268. }
  1269. .cropper-img{
  1270. display: block;
  1271. border:1px solid #e0e0e0;
  1272. width:360px;
  1273. height:120px;
  1274. margin:0 auto;
  1275. }
  1276. .cropper-box{
  1277. width:560px;
  1278. height:270px;
  1279. position: relative;
  1280. .cropper-button{
  1281. position: absolute;
  1282. right:10px;top:10px;
  1283. z-index:1;
  1284. background: #0183FA;
  1285. color:#fff;
  1286. cursor: pointer;
  1287. padding:5px 10px;
  1288. margin:0;
  1289. border-radius:6px;
  1290. }
  1291. }
  1292. }
  1293. </style>