rectifyDetails.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195
  1. <!-- 整改详情 -->
  2. <template>
  3. <view id="rectifyDetails">
  4. <view class="info-max-page" v-if="pageType == 1">
  5. <view class="top-info-box">
  6. <view class="top-min-info-box">
  7. <view>整改类型:</view>
  8. <view>{{newData.zgType == 0?'一般整改':'重大整改'}}</view>
  9. </view>
  10. <view class="top-min-info-box">
  11. <view>实验室名称:</view>
  12. <view>{{newData.laboratoryName}}</view>
  13. </view>
  14. <view class="top-min-info-box">
  15. <view>房间号:</view>
  16. <view>{{newData.fjNumber}}</view>
  17. </view>
  18. <view class="top-min-info-box">
  19. <view>所属实验楼:</view>
  20. <view>{{newData.buildingName}}</view>
  21. </view>
  22. <view class="top-min-info-box">
  23. <view>实验室负责人:</view>
  24. <view>{{newData.fzrName}}</view>
  25. </view>
  26. <view class="top-min-info-box">
  27. <view>联系方式:</view>
  28. <view>{{newData.fzrLxfs}}</view>
  29. </view>
  30. <view class="top-min-info-box">
  31. <view>检查单位:</view>
  32. <view>{{newData.jcDwName}}</view>
  33. </view>
  34. <view class="top-min-info-box">
  35. <view>检查时间:</view>
  36. <view>{{newData.createTime}}</view>
  37. </view>
  38. <view class="top-min-info-box">
  39. <view>整改截止时间: </view>
  40. <view>{{newData.zgjzTime}}</view>
  41. </view>
  42. <view class="top-min-info-box" v-if="details.spStatus != 0">
  43. <view>整改确认时间: </view>
  44. <view>{{details.zgTime}}</view>
  45. </view>
  46. <view class="top-min-info-box" v-if="details.spStatus == 2">
  47. <view>整改驳回时间: </view>
  48. <view>{{details.spTime}}</view>
  49. </view>
  50. <view class="top-min-info-box" v-if="details.spStatus == 4">
  51. <view>整改完成时间: </view>
  52. <view>{{details.zgTime}}</view>
  53. </view>
  54. <view class="top-info-button" @click="infoClickButton">
  55. <view>{{showType?"收起详情":"查看详情"}}</view>
  56. <img v-if="showType" src="@/pages_manage/images/Version2.2/icon_aqjc_sq.png">
  57. <img v-if="!showType" src="@/pages_manage/images/Version2.2/icon_aqjc_sq_two.png">
  58. </view>
  59. </view>
  60. <view class="bottom-info-box" v-show="showType">
  61. <view class="bottom-info-title-box" v-if="details.spStatus==0">
  62. <img src="@/pages_manage/images/Version2.2/icon_aqjc_czwt.png">
  63. <view>存在隐患</view>
  64. </view>
  65. <view class="bottom-info-title-box" v-if="details.spStatus != 0">
  66. <img src="@/pages_manage/images/Version2.2/icon_aqjc_zgxx.png">
  67. <view>整改信息</view>
  68. </view>
  69. <view class="bottom-info-text-box" v-if="details.spStatus==2">
  70. <view>驳回原因:</view>
  71. <view>{{details.spMs}}</view>
  72. </view>
  73. <view class="rectified-max-box">
  74. <view class="rectified-for-box" v-if="details.isZg != 1 && details.spStatus!=2">
  75. <!-- <view class="rectified-for-position-index">{{index+1}}</view> -->
  76. <img v-if="details.spStatus == 4" class="rectified-for-position-img" src="@/pages_manage/images/Version2.2/icon_bg_ywc.png">
  77. <view class="rectified-for-title">{{details.jcxName}}</view>
  78. <view class="rectified-for-name" v-if="details.isLingshi == 1">临时检查项</view>
  79. <view class="rectified-for-name" v-if="details.isLingshi == 0">{{details.jcxSstkMs}}</view>
  80. <view class="rectified-for-text-max-box">
  81. <view class="rectified-for-text-box">
  82. <view>隐患描述:</view>
  83. <view>{{details.yhMs}}</view>
  84. </view>
  85. <view class="rectified-for-text-box" v-if="details.isZg == 1">
  86. <view>证明信息:</view>
  87. <view>{{details.zmClMs}}</view>
  88. </view>
  89. </view>
  90. <view class="rectified-for-img-max-box">
  91. <view class="rectify_front">
  92. <view class="rectify_front_t">整改前照片:</view>
  93. <view class="rectify_front_b" @click="lockImg(details.yhImg)">
  94. <img :src="itemUrl" v-for="(itemUrl,indexTwo) in details.yhImg" :key="indexTwo">
  95. </view>
  96. </view>
  97. <!-- 循环复核信息 -->
  98. <view v-for="(item2,index2) in details.detailslogList" :key="index2" style="border-bottom: 1px dotted #E0E0E0;">
  99. <view class="top-info-box rectify_info">
  100. <view class="top-min-info-box">
  101. <view>整改时间:</view>
  102. <view>{{item2.createTime}}</view>
  103. </view>
  104. <view class="top-min-info-box">
  105. <view>整改人:</view>
  106. <view>{{item2.zgUserName}}</view>
  107. </view>
  108. <view class="top-min-info-box">
  109. <view>整改描述:</view>
  110. <view>{{item2.zgMs}}</view>
  111. </view>
  112. </view>
  113. <view class="rectify_later">
  114. <view class="rectify_later_t">整改后照片:</view>
  115. <view class="rectify_later_b" @click="lockImg(item2.yhZghImg)">
  116. <img :src="itemUrl" v-for="(itemUrl,indexTwo) in item2.yhZghImg" :key="indexTwo">
  117. </view>
  118. </view>
  119. <view class="top-info-box rectify_info" v-if='rejectItem.spTime'>
  120. <view class="top-min-info-box" >
  121. <view>复核时间:</view>
  122. <view v-if="item2.spTime">{{item2.spTime}}</view>
  123. </view>
  124. <view class="top-min-info-box">
  125. <view>复核人:</view>
  126. <view v-if="item2.spUserName">{{item2.spUserName}}</view>
  127. </view>
  128. <view class="top-min-info-box">
  129. <view>复核描述:</view>
  130. <view v-if="item2.spSm">{{item2.spSm}}</view>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. <!-- 驳回 -->
  137. <view class="rectified-for-box" v-if="details.isZg != 1 && details.spStatus==2">
  138. <img v-if="details.spStatus == 4" class="rectified-for-position-img" src="@/pages_manage/images/Version2.2/icon_bg_ywc.png">
  139. <view class="rectified-for-title">{{details.jcxName}}</view>
  140. <view class="rectified-for-name" v-if="details.isLingshi == 0">{{details.jcxSstkMs}}</view>
  141. <view class="rectified-for-text-max-box">
  142. <view class="rectified-for-text-box">
  143. <view>隐患描述:</view>
  144. <view>{{details.yhMs}}</view>
  145. </view>
  146. </view>
  147. <view class="rectified-for-img-max-box">
  148. <view class="rectified-for-img-box" @click="lockImg(details.yhImg)" v-if="details.yhImg" >
  149. <img :src="itemUrl" v-for="(itemUrl,indexTwo) in details.yhImg" :key="indexTwo">
  150. <view class="rectified-for-img-min-text" style="color:#999;" v-if="!details.yhImg">未上传隐患照片</view>
  151. <view class="rectified-for-img-min-text" v-if="details.yhImg[0]">隐患照片 >></view>
  152. </view>
  153. <view v-for="(rejectItem,rejectIndex) in details.detailslogList" :key="rejectIndex" style="border-bottom: 1px dotted #E0E0E0;">
  154. <view class="top-info-box rectify_info">
  155. <view class="top-min-info-box">
  156. <view>整改时间:</view>
  157. <view>{{rejectItem.zgTime}}</view>
  158. </view>
  159. <view class="top-min-info-box">
  160. <view>整改人:</view>
  161. <view>{{rejectItem.zgUserName}}</view>
  162. </view>
  163. <view class="top-min-info-box">
  164. <view>整改描述:</view>
  165. <view>{{rejectItem.zgMs}}</view>
  166. </view>
  167. </view>
  168. <view class="rectify_later" style='border-bottom: 1px solid #E0E0E0;'>
  169. <view class="rectify_later_t">整改后照片:</view>
  170. <view class="rectify_later_b" @click="lockImg(rejectItem.yhZghImg)">
  171. <img :src="itemUrl" v-for="(itemUrl,indexTwo) in rejectItem.yhZghImg" :key="indexTwo">
  172. </view>
  173. </view>
  174. <view class="top-info-box rectify_info" v-if='rejectItem.spTime'>
  175. <view class="top-min-info-box">
  176. <view>复核时间:</view>
  177. <view>{{rejectItem.spTime}}</view>
  178. </view>
  179. <view class="top-min-info-box">
  180. <view>复核人:</view>
  181. <view>{{rejectItem.spUserName}}</view>
  182. </view>
  183. <view class="top-min-info-box">
  184. <view>复核描述:</view>
  185. <view>{{rejectItem.spSm}}</view>
  186. </view>
  187. </view>
  188. </view>
  189. <view class="input-box" style="margin: 0;">
  190. <view class="text-p">整改描述</view>
  191. <view class="bj-p">*</view>
  192. <textarea class="textarea-p" maxlength="50" v-model="form.zgMs" placeholder="请输入整改描述"></textarea>
  193. </view>
  194. <view class="img-up-box" style="margin: 0;">
  195. <view class="text-p">整改照片</view>
  196. <view class="bj-p"></view>
  197. <view class="img-box">
  198. <view class="min-for-img-box" v-for="(url,index) in form.yhZghImg" :key="index">
  199. <img class="min-for-img" @click.stop="uploadLockImg(url)"
  200. :src="baseUrl+url">
  201. <img class="del-img" @click.stop="delZgImg(index)" src="@/pages_manage/images/icon_ssp_closure.png">
  202. </view>
  203. <view class="up-img" @click="selectImage">
  204. <view>上传</view>
  205. </view>
  206. </view>
  207. </view>
  208. </view>
  209. </view>
  210. </view>
  211. <view class="bottom-info-title-box" v-if="details.spStatus==3">
  212. <img src="@/pages_manage/images/Version2.2/icon_aqjc_zgxx.png">
  213. <view>未整改信息</view>
  214. </view>
  215. <view class="rectified-max-box">
  216. <view class="rectified-for-box" v-if="details.isZg == 1" >
  217. <!-- <view class="rectified-for-position-index">{{index+1}}</view> -->
  218. <view class="rectified-for-title">{{details.jcxName}}</view>
  219. <view class="rectified-for-name" v-if="details.isLingshi == 1">临时检查项</view>
  220. <view class="rectified-for-name" v-if="details.isLingshi == 0">{{details.jcxSstkMs}}</view>
  221. <view class="rectified-for-text-max-box">
  222. <view class="rectified-for-text-box">
  223. <view>隐患描述:</view>
  224. <view>{{details.yhMs}}</view>
  225. </view>
  226. <view class="rectified-for-text-box" v-if="details.isZg == 0 && newData.zgType == 0">
  227. <view>整改描述:</view>
  228. <view>{{details.zgMs}}</view>
  229. </view>
  230. <view class="rectified-for-text-box" v-if="details.isZg == 0 && newData.zgType == 1">
  231. <view>原因分析:</view>
  232. <view>{{details.zgYyfx}}</view>
  233. </view>
  234. <view class="rectified-for-text-box" v-if="details.isZg == 0 && newData.zgType == 1">
  235. <view>整改措施:</view>
  236. <view>{{details.zgCs}}</view>
  237. </view>
  238. <view class="rectified-for-text-box" v-if="details.isZg == 0">
  239. <view>证明信息:</view>
  240. <view>{{details.zmClMs}}</view>
  241. </view>
  242. </view>
  243. <view class="rectified-for-img-max-box">
  244. <view class="rectified-for-img-box" @click="lockImg(details.yhImg)" v-if="details.yhImg">
  245. <img :src="itemUrl" v-for="(itemUrl,indexTwo) in details.yhImg" :key="indexTwo">
  246. <view class="rectified-for-img-min-text" style="color:#999;" v-if="!details.yhImg">未上传隐患照片</view>
  247. <view class="rectified-for-img-min-text" v-if="details.yhImg">{{details.spStatus==0?'隐患照片':'整改前照片'}} >></view>
  248. </view>
  249. <view class="rectified-for-img-box" @click="lockImg(details.zmClImg)" v-if="details.zmClImg">
  250. <img :src="itemUrl" v-for="(itemUrl,indexTwo) in details.zmClImg" :key="indexTwo">
  251. <view class="rectified-for-img-min-text">证明材料 >></view>
  252. </view>
  253. </view>
  254. <view class="input-box" v-if="details.spStatus == 0 || details.spStatus == 2">
  255. <view class="text-p">整改描述</view>
  256. <view class="bj-p">*</view>
  257. <textarea class="textarea-p" maxlength="50" v-model="form.zgMs" placeholder="请输入整改描述"></textarea>
  258. </view>
  259. <view class="img-up-box" v-if="details.spStatus == 0 || details.spStatus == 2">
  260. <view class="text-p">整改照片</view>
  261. <view class="bj-p"></view>
  262. <view class="img-box">
  263. <view class="min-for-img-box" v-for="(url,index) in form.yhZghImg" :key="index">
  264. <img class="min-for-img" @click.stop="uploadLockImg(url)"
  265. :src="baseUrl+url">
  266. <img class="del-img" @click.stop="delZgImg(index)" src="@/pages_manage/images/icon_ssp_closure.png">
  267. </view>
  268. <view class="up-img" @click="selectImage">
  269. <view>上传</view>
  270. </view>
  271. </view>
  272. </view>
  273. </view>
  274. </view>
  275. </view>
  276. <!-- <view class="info-bottom-button-box" v-if="details.spStatus == 0 || details.spStatus == 3" @click="goUpData">完成整改</view> -->
  277. <view class="info-bottom-button-box-three" v-if="details.spStatus == 0">
  278. <view @click="goUpData(3)">暂无法整改</view>
  279. <view @click="goUpData(1)">完成整改</view>
  280. </view>
  281. <!-- <view class="info-bottom-button-box" v-if="details.spStatus == 2" @click="goUpData(1)">再次提交</view> -->
  282. <!-- <view class="info-bottom-button-box-two" v-if="details.spStatus == 1">审核中</view> -->
  283. <view class="info-bottom-button-box-three" v-if="details.spStatus == 2" >
  284. <view @click="goUpData(3)">暂无法整改</view>
  285. <view @click="goUpData(1)">再次提交</view>
  286. </view>
  287. <!-- <view class="info-bottom-button-box-three" v-if="userId==newData.createUserId && (details.spStatus == 1 || details.spStatus == 3)">
  288. <view @click="pageClick(2)">驳回</view>
  289. <view @click="pageClick(3)">审核通过</view>
  290. </view> -->
  291. <view class="info-bottom-button-box-two" v-if="details.spStatus == 4">整改完成</view>
  292. </view>
  293. <view class="input-max-box" v-if="pageType == 2">
  294. <view class="input-box">
  295. <textarea maxlength="100" v-model="text" placeholder="请输入驳回原因"></textarea>
  296. </view>
  297. <view class="input-button-box">
  298. <view class="out-button" @click="pageClick(1)">返回</view>
  299. <view class="input-button" @click="upDataClick(2)">提交</view>
  300. </view>
  301. </view>
  302. <view class="input-max-box" v-if="pageType == 3">
  303. <view class="input-box">
  304. <textarea maxlength="100" v-model="text" placeholder="请输入整改结果"></textarea>
  305. </view>
  306. <view class="input-button-box">
  307. <view class="out-button" @click="pageClick(1)">返回</view>
  308. <view class="input-button" @click="upDataClick(3)">提交</view>
  309. </view>
  310. </view>
  311. </view>
  312. </template>
  313. <script>
  314. import { config } from '@/api/request/config.js'
  315. import { RecordDettailsListNew,editListUpdate,} from '@/api/index.js'
  316. export default {
  317. name: "rectifyDetails",
  318. data() {
  319. return {
  320. userId:uni.getStorageSync('userId'),
  321. //页面状态
  322. pageType:1,
  323. id:"",
  324. text:'',
  325. baseUrl:config.base_url,
  326. //选项
  327. buttonIndex:0,
  328. buttonArray:[],
  329. buttonArrayType:"",
  330. //详情开关
  331. showType:false,
  332. //数据
  333. newData:{},
  334. details:{},
  335. form:{
  336. yhZghImg:[],
  337. },
  338. }
  339. },
  340. onLoad(option) {
  341. console.log(this.baseUrl)
  342. let item=JSON.parse(option.item)
  343. this.id = item.id;
  344. // 动态修改导航名称
  345. uni.setNavigationBarTitle({
  346. title:item.laboratoryName
  347. })
  348. },
  349. onShow() {
  350. console.log(this.baseUrl)
  351. this.getInfo();
  352. },
  353. methods: {
  354. pageClick(type){
  355. if(this.pageType != type){
  356. this.pageType = type;
  357. }
  358. },
  359. upDataClick(type){
  360. let self = this;
  361. if(!this.text){
  362. uni.showToast({
  363. title: this.pageType==2?'请输入驳回原因':(this.pageType == 3?'请输入整改结果':''),
  364. icon:"none",
  365. mask:true,
  366. duration: 2000
  367. });
  368. return
  369. }
  370. if(type == 2){
  371. let obj = {
  372. id: self.details.id,
  373. checkId: self.details.checkId,
  374. spMs: self.text,
  375. spStatus: 2,
  376. };
  377. uni.showModal({
  378. content: '确认要驳回吗?',
  379. cancelColor:"#999",
  380. confirmColor:"#0183FA",
  381. success: function (res) {
  382. if (res.confirm) {
  383. self.checkRecordUpdate(obj);
  384. console.log('用户点击确定');
  385. } else if (res.cancel) {
  386. console.log('用户点击取消');
  387. }
  388. }
  389. });
  390. }else if(type == 3){
  391. let obj = {
  392. id: self.details.id,
  393. checkId: self.details.checkId,
  394. spMs: self.text,
  395. spStatus: 4,
  396. }
  397. uni.showModal({
  398. content: '确认要审核通过吗?',
  399. cancelColor:"#999",
  400. confirmColor:"#0183FA",
  401. success: function (res) {
  402. if (res.confirm) {
  403. self.checkRecordUpdate(obj);
  404. console.log('用户点击确定');
  405. } else if (res.cancel) {
  406. console.log('用户点击取消');
  407. }
  408. }
  409. });
  410. }
  411. },
  412. async checkRecordUpdate(obj){
  413. const {data} = await editListUpdate(obj);
  414. if(data.code == 200){
  415. uni.showToast({
  416. title: '操作成功',
  417. icon:"none",
  418. mask:true,
  419. duration: 2000
  420. });
  421. setTimeout(function(){
  422. uni.navigateBack();
  423. },2000);
  424. }
  425. },
  426. // 整改上传
  427. selectImage() {
  428. let self = this;
  429. if(this.form.yhZghImg.length>4){
  430. uni.showToast({
  431. title: '最多上传5张图片',
  432. icon:"none",
  433. mask:true,
  434. duration: 2000
  435. });
  436. return
  437. }
  438. wx.chooseImage({
  439. count: 1,
  440. sizeType: ["original", "compressed"],
  441. sourceType: ["album", "camera"],
  442. success: function(res) {
  443. let tempFilePaths = res.tempFilePaths[0];
  444. self.zgUploadImg(tempFilePaths);
  445. }
  446. });
  447. },
  448. async zgUploadImg(tempFilePaths){
  449. var self = this;
  450. uni.showLoading({
  451. title: '上传中',
  452. mask: true
  453. });
  454. uni.uploadFile({
  455. url: config.base_url+'/base/file/upload', //仅为示例,非真实的接口地址
  456. header:{'Authorization':uni.getStorageSync('token')},
  457. filePath: tempFilePaths,
  458. name: 'file',
  459. formData: {
  460. 'user': 'test'
  461. },
  462. success: (uploadFileRes) => {
  463. let res = JSON.parse(uploadFileRes.data);
  464. if(res.code == 200){
  465. self.form.yhZghImg.push(res.data.url);
  466. }else{
  467. uni.showToast({
  468. title: res.msg,
  469. icon:"none",
  470. mask:true,
  471. duration: 2000
  472. });
  473. }
  474. },
  475. fail: err => {},
  476. complete: () => {
  477. uni.hideLoading()
  478. }
  479. });
  480. },
  481. //删除整改图片
  482. delZgImg(index){
  483. console.log("index",index)
  484. this.form.yhZghImg.splice(index,1);
  485. },
  486. //去整改
  487. async goUpData(type){
  488. let self = this;
  489. if(!self.form.zgMs){
  490. uni.showToast({
  491. title: '请填写整改描述!',
  492. icon:"none",
  493. mask:true,
  494. duration: 2000
  495. });
  496. return
  497. }
  498. let obj = {
  499. id: self.details.id,
  500. checkId: self.details.checkId,
  501. yhZghImg: self.form.yhZghImg.join(','),
  502. zgMs: self.form.zgMs,
  503. spStatus:type,
  504. }
  505. const {data} = await editListUpdate(obj);
  506. if(data.code == 200){
  507. uni.showToast({
  508. title: '提交成功',
  509. icon:"none",
  510. mask:true,
  511. duration: 2000
  512. });
  513. setTimeout(function(){
  514. uni.navigateBack();
  515. },2000);
  516. }
  517. /* uni.navigateTo({
  518. url: '/pages_manage/workbench/problemRectification/rectifyInfo?newData='+encodeURIComponent(JSON.stringify(this.newData)),//未提交列表
  519. }); */
  520. },
  521. //查看报告按钮
  522. buttonChange(e){
  523. if(this.buttonArrayType == 1){
  524. if(e.target.value == 0){
  525. this.genNotice();
  526. }else if(e.target.value == 1){
  527. this.genReport();
  528. }
  529. }else if(this.buttonArrayType == 2){
  530. this.genNotice();
  531. }
  532. },
  533. genNotice(){
  534. uni.showLoading({
  535. title: '下载中'
  536. });
  537. wx.downloadFile({
  538. url: config.base_url+'/laboratory/checkOption/genNotice/' + this.newData.id,
  539. header: {
  540. Authorization: uni.getStorageSync('token')
  541. },
  542. success: function (res) {
  543. const fileManager = wx.getFileSystemManager()
  544. const filePath = wx.env.USER_DATA_PATH + '/整改通知书.docx'
  545. fileManager.saveFile({
  546. tempFilePath: res.tempFilePath,
  547. filePath,
  548. success: () => {
  549. uni.hideLoading();
  550. wx.openDocument({
  551. filePath: filePath,
  552. showMenu: true,
  553. fileType: 'docx'
  554. })
  555. },
  556. fail: function (res){
  557. uni.hideLoading();
  558. uni.showToast({
  559. title: '下载失败',
  560. icon:"none",
  561. mask:true,
  562. duration: 2000
  563. });
  564. }
  565. })
  566. },
  567. fail: function (res){
  568. uni.hideLoading();
  569. uni.showToast({
  570. title: '下载失败',
  571. icon:"none",
  572. mask:true,
  573. duration: 2000
  574. });
  575. }
  576. })
  577. },
  578. genReport(){
  579. uni.showLoading({
  580. title: '下载中'
  581. });
  582. wx.downloadFile({
  583. url: config.base_url+'/laboratory/checkOption/genReport/' + this.newData.id,
  584. header: {
  585. Authorization: uni.getStorageSync('token')
  586. },
  587. success: function (res) {
  588. const fileManager = wx.getFileSystemManager()
  589. const filePath = wx.env.USER_DATA_PATH + '/整改报告.docx'
  590. fileManager.saveFile({
  591. tempFilePath: res.tempFilePath,
  592. filePath,
  593. success: () => {
  594. uni.hideLoading();
  595. wx.openDocument({
  596. filePath: filePath,
  597. showMenu: true,
  598. fileType: 'docx'
  599. })
  600. },
  601. fail: function (res){
  602. uni.hideLoading();
  603. uni.showToast({
  604. title: '下载失败',
  605. icon:"none",
  606. mask:true,
  607. duration: 2000
  608. });
  609. }
  610. })
  611. },
  612. fail: function (res){
  613. uni.hideLoading();
  614. uni.showToast({
  615. title: '下载失败',
  616. icon:"none",
  617. mask:true,
  618. duration: 2000
  619. });
  620. }
  621. })
  622. },
  623. //详情开关
  624. infoClickButton(type){
  625. this.showType = !this.showType;
  626. },
  627. //查看图片
  628. lockImg(list){
  629. console.log(list)
  630. if(!list){
  631. return
  632. }
  633. /* let urlList=[];
  634. list=list.split(',')
  635. list.forEach(function(item2){
  636. urlList.push(config.base_url+item2)
  637. }) */
  638. wx.previewImage({
  639. urls:list, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  640. current: '', // 当前显示图片的http链接,默认是第一个
  641. success: function(res) {},
  642. fail: function(res) {},
  643. complete: function(res) {},
  644. })
  645. },
  646. //上传查看照片
  647. uploadLockImg(list){
  648. console.log(list)
  649. if(!list){
  650. return
  651. }
  652. let urlList=[];
  653. list=list.split(',')
  654. list.forEach(function(item2){
  655. urlList.push(config.base_url+item2)
  656. })
  657. wx.previewImage({
  658. urls:urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  659. current: '', // 当前显示图片的http链接,默认是第一个
  660. success: function(res) {},
  661. fail: function(res) {},
  662. complete: function(res) {},
  663. })
  664. },
  665. async getInfo(){
  666. let obj = {
  667. id:this.id
  668. };
  669. const {data} = await RecordDettailsListNew(obj);
  670. if(data.code==200){
  671. console.log(data.data)
  672. let obj = JSON.parse(JSON.stringify(data.data));
  673. let newOjb = obj.record;
  674. this.$set(this,'newData',newOjb);
  675. this.$set(this,'details',obj.details);
  676. let yhImg=[];
  677. let yhZghImg=[];
  678. if(obj.details.yhImg){
  679. yhImg=obj.details.yhImg.split(',');
  680. let urlList=[];
  681. yhImg.forEach(function(item2){
  682. urlList.push(config.base_url+item2)
  683. })
  684. this.details.yhImg=urlList
  685. }
  686. if(obj.details.yhZghImg){
  687. yhZghImg=obj.details.yhZghImg.split(',');
  688. let urlList=[];
  689. yhZghImg.forEach(function(item2){
  690. urlList.push(config.base_url+item2)
  691. })
  692. this.details.yhZghImg=urlList
  693. }
  694. if(this.details.detailslogList){
  695. this.details.detailslogList.forEach(function(item){
  696. if(item.yhImg){
  697. let list=[];
  698. let urlList=[];
  699. list=item.yhImg.split(',');
  700. list.forEach(function(item2){
  701. urlList.push(config.base_url+item2)
  702. })
  703. item.yhImg=urlList
  704. }
  705. if(item.yhZghImg){
  706. console.log(item.yhZghImg)
  707. let list=[];
  708. let urlList=[];
  709. list=item.yhZghImg.split(',');
  710. console.log(list)
  711. list.forEach(function(item2){
  712. console.log(item2)
  713. urlList.push(config.base_url+item2)
  714. console.log(urlList)
  715. })
  716. item.yhZghImg=urlList;
  717. }
  718. })
  719. console.log(this.details.detailslogList)
  720. }
  721. }
  722. /* if(data.code == 200){
  723. let obj = JSON.parse(JSON.stringify(data.data));
  724. for(let i=0;i<obj.yhlist.length;i++){
  725. let text = "";
  726. if(obj.yhlist[i].level1){
  727. text = text + obj.yhlist[i].level1;
  728. }
  729. if(obj.yhlist[i].level2){
  730. text = text + '/'+ obj.yhlist[i].level2;
  731. }
  732. if(obj.yhlist[i].level3){
  733. text = text + '/'+ obj.yhlist[i].level3;
  734. }
  735. if(obj.yhlist[i].level4){
  736. text = text + '/'+ obj.yhlist[i].level4;
  737. }
  738. obj.yhlist[i].level = text;
  739. if(obj.yhlist[i].yhImg){
  740. if(obj.yhlist[i].yhImg[i]){
  741. obj.yhlist[i].yhImg = obj.yhlist[i].yhImg.split(",");
  742. }
  743. }
  744. if(obj.yhlist[i].zmClImg){
  745. if(obj.yhlist[i].zmClImg[i]){
  746. obj.yhlist[i].zmClImg = obj.yhlist[i].zmClImg.split(",");
  747. }
  748. }
  749. if(obj.yhlist[i].yhZghImg){
  750. if(obj.yhlist[i].yhZghImg[i]){
  751. obj.yhlist[i].yhZghImg = obj.yhlist[i].yhZghImg.split(",");
  752. }
  753. }
  754. }
  755. let newOjb = obj.record;
  756. newOjb.detailsList = obj.yhlist;
  757. //判断悬浮按钮
  758. if(newOjb.zgType == 0){
  759. this.$set(this,'buttonArray',[])
  760. this.buttonArrayType = 4;
  761. }else if(newOjb.zgType == 1 && (newOjb.zgStatus == 1 || newOjb.zgStatus == 3 || newOjb.zgStatus == 4)){
  762. this.$set(this,'buttonArray',["整改通知书","整改报告"])
  763. this.buttonArrayType = 1;
  764. }else if(newOjb.zgType == 1 && (newOjb.zgStatus != 1 || newOjb.zgStatus != 3 || newOjb.zgStatus != 4)){
  765. this.$set(this,'buttonArray',["整改通知书"])
  766. this.buttonArrayType = 2;
  767. }
  768. this.$set(this,'newData',newOjb);
  769. }
  770. */
  771. },
  772. }
  773. }
  774. </script>
  775. <style lang="stylus" scoped>
  776. #rectifyDetails{
  777. height: 100%;
  778. width: 100%;
  779. display flex
  780. .info-max-page{
  781. flex:1;
  782. .position-button{
  783. position fixed
  784. right:0;
  785. top:214rpx;
  786. width:160rpx;
  787. height:60rpx;
  788. background #0183FA
  789. color:#fff;
  790. text-align center
  791. line-height:60rpx;
  792. font-size:26rpx;
  793. z-index:10;
  794. border-radius:50rpx 0 0 50rpx;
  795. }
  796. .top-info-box{
  797. background #fff
  798. margin:20rpx;
  799. padding:20rpx 20rpx 0;
  800. border-radius:20rpx;
  801. .top-min-info-box{
  802. line-height:66rpx;
  803. display:flex;
  804. font-size:28rpx;
  805. view:nth-child(1){
  806. width:220rpx;
  807. color:#999;
  808. }
  809. view:nth-child(2){
  810. flex:1;
  811. text-align right
  812. }
  813. }
  814. .top-info-button{
  815. border-top:1rpx solid #dedede;
  816. display:flex;
  817. line-height:98rpx;
  818. margin-top:20rpx;
  819. view{
  820. font-size:28rpx;
  821. margin-left:258rpx;
  822. color:#0183FA;
  823. }
  824. img{
  825. width:24rpx;
  826. height:12rpx;
  827. margin:45rpx 0 0 15rpx;
  828. }
  829. }
  830. }
  831. .bottom-info-box{
  832. .bottom-info-title-box{
  833. display flex;
  834. height:80rpx;
  835. margin:20rpx;
  836. img{
  837. width:32rpx;
  838. height:32rpx;
  839. margin:24rpx 15rpx 0 0;
  840. }
  841. view{
  842. line-height:80rpx;
  843. color:#333;
  844. font-size:30rpx;
  845. }
  846. }
  847. .bottom-info-text-box{
  848. display flex
  849. margin:20rpx;
  850. padding:36rpx 35rpx 36rpx 28rpx;
  851. background #fff
  852. border-radius:20rpx;
  853. view{
  854. font-size:28rpx;
  855. }
  856. view:nth-child(1){
  857. color:#999;
  858. width:140rpx;
  859. }
  860. view:nth-child(2){
  861. color:#666;
  862. flex:1;
  863. text-align left
  864. }
  865. }
  866. .rectified-max-box{
  867. .rectified-for-box{
  868. background #fff
  869. margin:20rpx;
  870. border-radius:20rpx;
  871. position relative
  872. overflow hidden
  873. .rectified-for-position-index{
  874. position absolute
  875. left:0;
  876. top:0;
  877. background #B4DBFF;
  878. color:#0183FA;
  879. width:50rpx;
  880. height:50rpx;
  881. text-align center;
  882. line-height:50rpx;
  883. font-size:34rpx;
  884. }
  885. .rectified-for-position-img{
  886. position absolute
  887. right:43rpx;
  888. top:105rpx;
  889. width:250rpx;
  890. height:220rpx;
  891. }
  892. .rectified-for-title{
  893. line-height:30rpx;
  894. font-size:30rpx;
  895. color:#333;
  896. margin:78rpx 30rpx 36rpx;
  897. }
  898. .rectified-for-name{
  899. margin:0 30rpx;
  900. line-height:40rpx;
  901. font-size:28rpx;
  902. padding-bottom:39rpx;
  903. color:#666;
  904. border-bottom:1rpx solid #E0E0E0;
  905. }
  906. .rectified-for-text-max-box{
  907. margin:38rpx 30rpx 0;
  908. .rectified-for-text-box{
  909. display flex
  910. margin-bottom :20rpx;
  911. view{
  912. font-size:28rpx;
  913. }
  914. view:nth-child(1){
  915. width:140rpx;
  916. color:#999;
  917. line-height 40rpx
  918. }
  919. view:nth-child(2){
  920. flex:1;
  921. color:#666;
  922. line-height 40rpx
  923. }
  924. }
  925. }
  926. .rectified-for-img-max-box{
  927. margin:35rpx 26rpx 40rpx;
  928. .rectified-for-img-box{
  929. margin-bottom :20rpx;
  930. display flex
  931. background #f0f0f0
  932. border-radius:10rpx;
  933. padding:10rpx 35rpx 10rpx 23rpx;
  934. img{
  935. width:80rpx;
  936. height:80rpx;
  937. margin-right:10rpx;
  938. }
  939. .rectified-for-img-min-text{
  940. flex:1;
  941. text-align right;
  942. line-height:80rpx;
  943. color:#0183FA;
  944. font-size:28rpx;
  945. }
  946. }
  947. /* 整改前照片 */
  948. .rectify_front{
  949. .rectify_front_t{
  950. width:150rpx;
  951. color:#999;
  952. line-height 40rpx
  953. font-size :28rpx;
  954. margin-bottom :24rpx;
  955. }
  956. .rectify_front_b{
  957. display :flex;
  958. justify-content :flex-start;
  959. flex-wrap: wrap;
  960. align-items :center;
  961. border-bottom: 1px solid #E0E0E0;
  962. >img{
  963. width: 200rpx;
  964. height: 200rpx;
  965. margin-right :14rpx;
  966. margin-bottom 40rpx;
  967. border-radius :10rpx;
  968. }
  969. }
  970. }
  971. .rectify_info{
  972. margin: 0;
  973. padding: 0;
  974. margin-top 40rpx;
  975. margin-bottom :10rpx;
  976. }
  977. /* 整改后照片 */
  978. .rectify_later{
  979. .rectify_later_t{
  980. width:150rpx;
  981. color:#999;
  982. line-height 40rpx
  983. font-size :28rpx;
  984. margin-bottom :24rpx;
  985. }
  986. .rectify_later_b{
  987. display :flex;
  988. justify-content :flex-start;
  989. flex-wrap: wrap;
  990. align-items :center;
  991. >img{
  992. width: 200rpx;
  993. height: 200rpx;
  994. margin-right :14rpx;
  995. margin-bottom 40rpx;
  996. border-radius :10rpx;
  997. }
  998. }
  999. }
  1000. }
  1001. }
  1002. }
  1003. }
  1004. .info-bottom-button-box{
  1005. width:650rpx;
  1006. height:100rpx;
  1007. margin:50rpx auto;
  1008. color:#fff;
  1009. background:#0183FA;
  1010. text-align center;
  1011. line-height:100rpx;
  1012. border-radius:20rpx;
  1013. }
  1014. .info-bottom-button-box-two{
  1015. width:650rpx;
  1016. height:100rpx;
  1017. margin:50rpx auto;
  1018. color:#fff;
  1019. background:#999;
  1020. text-align center;
  1021. line-height:100rpx;
  1022. border-radius:20rpx;
  1023. }
  1024. .info-bottom-button-box-three{
  1025. display flex
  1026. width:650rpx;
  1027. height:100rpx;
  1028. margin:50rpx auto;
  1029. view{
  1030. text-align center
  1031. line-height:100rpx;
  1032. font-size:30rpx;
  1033. color:#fff;
  1034. }
  1035. view:nth-child(1){
  1036. width: 325rpx;
  1037. height: 100rpx;
  1038. background: linear-gradient(-45deg, #FA9901, #F28E26);
  1039. border-radius: 50rpx 0 0 50rpx;
  1040. }
  1041. view:nth-child(2){
  1042. width: 325rpx;
  1043. height: 100rpx;
  1044. background: linear-gradient(-35deg, #309CFF, #0183FA);
  1045. border-radius: 0 50rpx 50rpx 0;
  1046. }
  1047. }
  1048. /* 整改描述 */
  1049. .input-box{
  1050. //display flex
  1051. margin:32rpx 25rpx 0;
  1052. .text-p{
  1053. display:inline-block;
  1054. font-size:30rpx;
  1055. line-height:74rpx;
  1056. }
  1057. .bj-p{
  1058. display:inline-block;
  1059. font-size:30rpx;
  1060. line-height:74rpx;
  1061. color:#FF0000;
  1062. width:30rpx;
  1063. }
  1064. .textarea-p{
  1065. //width:658rpx;
  1066. height:212rpx;
  1067. padding:20rpx;
  1068. font-size:28rpx;
  1069. border:1rpx solid #dedede;
  1070. border-radius:20rpx;
  1071. }
  1072. }
  1073. /* 整改照片 */
  1074. .img-up-box{
  1075. //display flex
  1076. margin:32rpx 25rpx 0;
  1077. .text-p{
  1078. display :inline-block;
  1079. font-size:30rpx;
  1080. line-height:74rpx;
  1081. }
  1082. .bj-p{
  1083. display :inline-block;
  1084. font-size:30rpx;
  1085. line-height:74rpx;
  1086. color:#FF0000;
  1087. width:30rpx;
  1088. }
  1089. .img-box{
  1090. flex:1;
  1091. .up-img{
  1092. display: inline-block;
  1093. background url(@/images/icon_07.png) no-repeat
  1094. background-size 100%
  1095. width:200rpx;
  1096. height:200rpx;
  1097. overflow: hidden;
  1098. margin:0 10rpx 10rpx 0;
  1099. border-radius: 10rpx;
  1100. view{
  1101. font-size:28rpx;
  1102. text-align center;
  1103. color:#999;
  1104. line-height:30rpx;
  1105. margin-top:120rpx;
  1106. }
  1107. }
  1108. .min-for-img-box{
  1109. position relative
  1110. display: inline-block;
  1111. width:200rpx;
  1112. height:200rpx;
  1113. margin:0 10rpx 10rpx 0;
  1114. overflow hidden;
  1115. border-radius: 10rpx;
  1116. .min-for-img{
  1117. width:200rpx;
  1118. height:200rpx;
  1119. }
  1120. .del-img{
  1121. position absolute;
  1122. top:0rpx;
  1123. right:0rpx;
  1124. width:40rpx;
  1125. height:40rpx;
  1126. }
  1127. }
  1128. }
  1129. }
  1130. }
  1131. .input-max-box{
  1132. flex:1;
  1133. .input-box{
  1134. margin:20rpx;
  1135. background #fff
  1136. border-radius:20rpx;
  1137. display flex
  1138. overflow hidden
  1139. textarea{
  1140. width:610rpx;
  1141. height:212rpx;
  1142. margin:36rpx auto 47rpx;
  1143. font-size:28rpx;
  1144. padding:33rpx 24rpx;
  1145. border-radius:10rpx;
  1146. border: 2rpx solid #E0E0E0;
  1147. }
  1148. }
  1149. .input-button-box{
  1150. display flex
  1151. width:700rpx;
  1152. margin:50rpx auto;
  1153. .out-button{
  1154. flex:1;
  1155. text-align center
  1156. line-height:100rpx;
  1157. font-size:28rpx;
  1158. color:#fff;
  1159. background #999;
  1160. border-radius: 50rpx 0 0 50rpx;
  1161. }
  1162. .input-button{
  1163. flex:1;
  1164. text-align center
  1165. line-height:100rpx;
  1166. font-size:28rpx;
  1167. color:#fff;
  1168. background #0183FA;
  1169. border-radius: 0 50rpx 50rpx 0;
  1170. }
  1171. }
  1172. }
  1173. }
  1174. </style>