rectifyDetails.vue 34 KB

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