rectifyDetails.vue 40 KB

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