examineDetail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. <!-- 安全检查-检查详情 -->
  2. <template>
  3. <view class="examine">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="basics">
  6. <view class="basics_li">
  7. <text>学院:</text>
  8. <text>{{infoData.collegeName}}</text>
  9. </view>
  10. <view class="basics_li">
  11. <text>实验室:</text>
  12. <text>{{infoData.subjectName}}-{{infoData.roomNumber}}</text>
  13. </view>
  14. <view class="basics_li">
  15. <text>楼栋:</text>
  16. <text>{{infoData.buildName}}</text>
  17. </view>
  18. <view class="basics_li">
  19. <text>检查类型:</text>
  20. <text>{{infoData.checkType==1?'校园巡查':(infoData.checkType==2?'实验室自查':'')}}</text>
  21. </view>
  22. <view class="basics_li">
  23. <text>检查范围:</text>
  24. <text>{{infoData.checkRange==1?'全校':(infoData.checkRange==2?'学院':'实验室')}}</text>
  25. </view>
  26. <view class="basics_li" style="border:none;">
  27. <text>检查计划:</text>
  28. <text>{{infoData.title}}</text>
  29. </view>
  30. </view>
  31. <!-- <view class="attachment">
  32. <view class="attachment_t">
  33. <text>材料附件</text>
  34. <text>点击文件标题查看</text>
  35. </view>
  36. <view class="attachment_li">
  37. <img src="@/images/Version3.3.3/icon_djc_wj.png"/>
  38. <text>文件标题文件标题</text>
  39. <img class="attachment_li_del" src="@/images/Version3.3.3/icon_fjgk_sc.png"/>
  40. </view>
  41. </view> -->
  42. <view class="basics" v-if="manageStatus==2">
  43. <view class="basics_li">
  44. <text>检查结果:</text>
  45. <text>{{infoData.checkResult==0?'不符合':(infoData.checkResult==1?'符合':'')}}</text>
  46. </view>
  47. <view class="basics_li">
  48. <text>整改期限:</text>
  49. <text>{{infoData.rectifyDeadline}}</text>
  50. </view>
  51. <view class="basics_li">
  52. <text>整改通知:</text>
  53. <text style="color: #0183FA;" @click="rectifyInform">{{infoData.rectifyNotice == 1?'整改告知书':(infoData.rectifyNotice == 2?'整改通知书':'')}}</text>
  54. </view>
  55. <view class="basics_li">
  56. <text>检查者:</text>
  57. <text>{{infoData.checkUser}}</text>
  58. </view>
  59. <view class="basics_li" style="border:none;">
  60. <text>检查时间:</text>
  61. <text>{{infoData.checkTime}}</text>
  62. </view>
  63. </view>
  64. <view class="inconformity" @click="inconformityFun()" v-if="manageStatus==2">不符合项<img v-if="inconformityStatus" src="@/images/Version3.3.3/icon_bfhx_xq.png"/><img v-if="!inconformityStatus" src="@/images/Version3.3.3/icon_bfhx_sq.png"/></view>
  65. <view v-for="(item,index) in infoData.checkHazardDtoList" v-if="manageStatus==2">
  66. <view class="danger">
  67. <view class="sort">{{item.sort}}</view>
  68. <view class="grade" :style="item.switch?'border-bottom: 1rpx solid #D8D8D8;':'border:none;'">
  69. <text>第{{index+1}}项隐患</text>
  70. <text style="color: #0183FA;" @click="dangerItem(item)">{{item.rectifyStatus==1?'已完成':(item.rectifyStatus==2?'待整改':(item.rectifyStatus==3?'待复核':(item.rectifyStatus==4?'暂无法整改':'')))}} >></text>
  71. </view>
  72. <view v-if="item.switch">
  73. <view class="grade">
  74. <text>隐患等级:</text>
  75. <text>{{item.hazardLevel==2?'一般隐患':(item.hazardLevel==1?'重大隐患':(item.hazardLevel==3?'管理问题':''))}}</text>
  76. </view>
  77. <view class="project">
  78. <view class="project_t">检查项目:</view>
  79. <view class="project_b">{{item.hazardCheckProStr}}</view>
  80. <view class="project_b2" v-if="item.hazardCheckCount>0">此检查项在当前实验室累计出现{{item.hazardCheckCount}}次隐患</view>
  81. </view>
  82. <view class="project">
  83. <view class="project_t">检查要点:</view>
  84. <view class="project_b">{{item.hazardCheckPoint}}</view>
  85. </view>
  86. <view class="project">
  87. <view class="project_t">隐患描述:</view>
  88. <view class="project_b">{{item.hazardDescribe}}</view>
  89. </view>
  90. <view class="picture">
  91. <view class="picture_t">隐患照片</view>
  92. <view class="picture_b" @click="lockImg(item.uploadDtoList)">
  93. <img :src="baseUrl+imgItem.fileUrl" v-for="(imgItem,imgIndex) in item.uploadDtoList"/>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. <view class="pack_up" @click="switchFun(item)">{{item.switch?'收起':'展开'}}<img v-if="item.switch" src="@/images/Version3.3.3/icon_06_1.png"/><img v-if="!item.switch" src="@/images/Version3.3.3/icon_06.png"/></view>
  99. </view>
  100. </scroll-view>
  101. <view class="report" @change="rectifyReport" v-if="manageStatus==2">整改报告</view>
  102. <view class="bottom_btn" v-if="manageStatus==0" @click="handleClick('','startInspect')">开始检查</view>
  103. </view>
  104. </template>
  105. <script>
  106. import { config } from '@/api/request/config.js'
  107. import {checkSign,queryDeptSignByUserId,findCheckManage} from '@/api/index.js'
  108. export default {
  109. name: "rectifyList",
  110. components: {
  111. },
  112. data() {
  113. return {
  114. baseUrl:config.base_url,
  115. manageStatus:0,//0 待检查 1 检查中 2已检查
  116. pageType:0,
  117. inconformityStatus:false,
  118. infoData:{},
  119. }
  120. },
  121. onLoad(option) {
  122. if(option.id){
  123. this.id=option.id
  124. this.findCheckManage()
  125. }
  126. if(option.manageStatus){//检查状态
  127. this.manageStatus=option.manageStatus;
  128. }
  129. if(option.manageStatus==0 || option.manageStatus==1){
  130. uni.setNavigationBarTitle({
  131. title:'待检查'
  132. })
  133. }else if(option.manageStatus==2){
  134. uni.setNavigationBarTitle({
  135. title:'已检查'
  136. })
  137. }
  138. },
  139. onShow() {
  140. },
  141. mounted(){
  142. },
  143. methods: {
  144. //滚动事件
  145. scrollGet(){
  146. },
  147. //开展检查
  148. handleClick(row,doType){
  149. if(doType=='startInspect'){
  150. uni.navigateTo({
  151. url: '/pages/pages_safetyExamine/examineManage/examineAdd?id='+this.id
  152. });
  153. }
  154. },
  155. //详情
  156. async findCheckManage(){
  157. let _this = this;
  158. const {data} = await findCheckManage({id:this.id});
  159. if(data.code == 200){
  160. data.data.checkHazardDtoList.forEach(function(item){
  161. item.switch=false;
  162. })
  163. this.infoData=data.data;
  164. }
  165. },
  166. //查看图片
  167. lockImg(list){
  168. console.log(list)
  169. if(!list[0]){
  170. return
  171. }
  172. let urlList=[];
  173. for(let i=0;i<list.length;i++){
  174. urlList.push(this.baseUrl+list[i].fileUrl)
  175. }
  176. wx.previewImage({
  177. urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  178. current: '', // 当前显示图片的http链接,默认是第一个
  179. success: function(res) {},
  180. fail: function(res) {},
  181. complete: function(res) {},
  182. })
  183. },
  184. //隐患项跳转详情
  185. dangerItem(row){
  186. uni.navigateTo({
  187. url: '/pages/pages_safetyExamine/dangerManage/dangerDetail?item='+encodeURIComponent(JSON.stringify(row))
  188. })
  189. },
  190. //隐患项收起展开
  191. inconformityFun(){
  192. this.inconformityStatus=!this.inconformityStatus;
  193. if(this.inconformityStatus){
  194. this.infoData.checkHazardDtoList.forEach(function(item){
  195. item.switch=true;
  196. })
  197. }else{
  198. this.infoData.checkHazardDtoList.forEach(function(item){
  199. item.switch=false;
  200. })
  201. }
  202. },
  203. //隐患小项收起展开
  204. switchFun(item){
  205. item.switch=!item.switch
  206. },
  207. //整改通知
  208. rectifyInform(){//rectifyNotice 整改通知(1整改告知书 2整改通知书)
  209. if(this.infoData.rectifyNotice==1){//1整改告知书
  210. this.genReport(this.infoData.id)
  211. }else if(this.infoData.rectifyNotice==2){//2整改通知书
  212. this.genNotice(this.infoData.id)
  213. }
  214. },
  215. //整改报告
  216. rectifyReport(){
  217. uni.showLoading({
  218. title: '下载中'
  219. });
  220. wx.downloadFile({
  221. url: config.base_url+'/zd-security/checkRectify/genReport/' + this.infoData.id,
  222. header: {
  223. Authorization: uni.getStorageSync('token')
  224. },
  225. success: function (res) {
  226. const fileManager = wx.getFileSystemManager()
  227. const filePath = wx.env.USER_DATA_PATH + '/(整改报告).docx'
  228. fileManager.saveFile({
  229. tempFilePath: res.tempFilePath,
  230. filePath,
  231. success: () => {
  232. uni.hideLoading();
  233. wx.openDocument({
  234. filePath: filePath,
  235. showMenu: true,
  236. fileType: 'docx'
  237. })
  238. },
  239. fail: function (res){
  240. uni.hideLoading();
  241. uni.showToast({
  242. title: '下载失败',
  243. icon:"none",
  244. mask:true,
  245. duration: 2000
  246. });
  247. }
  248. })
  249. },
  250. fail: function (res){
  251. uni.hideLoading();
  252. uni.showToast({
  253. title: '下载失败',
  254. icon:"none",
  255. mask:true,
  256. duration: 2000
  257. });
  258. }
  259. })
  260. },
  261. //整改通知书
  262. genNotice(id){
  263. uni.showLoading({
  264. title: '下载中'
  265. });
  266. wx.downloadFile({
  267. url: config.base_url+'/zd-security/checkManage/getRectifyAdviceNote/' + id,
  268. header: {
  269. Authorization: uni.getStorageSync('token')
  270. },
  271. success: function (res) {
  272. const fileManager = wx.getFileSystemManager()
  273. const filePath = wx.env.USER_DATA_PATH + '/(整改通知书).docx'
  274. fileManager.saveFile({
  275. tempFilePath: res.tempFilePath,
  276. filePath,
  277. success: () => {
  278. uni.hideLoading();
  279. wx.openDocument({
  280. filePath: filePath,
  281. showMenu: true,
  282. fileType: 'docx'
  283. })
  284. },
  285. fail: function (res){
  286. uni.hideLoading();
  287. uni.showToast({
  288. title: '下载失败',
  289. icon:"none",
  290. mask:true,
  291. duration: 2000
  292. });
  293. }
  294. })
  295. },
  296. fail: function (res){
  297. uni.hideLoading();
  298. uni.showToast({
  299. title: '下载失败',
  300. icon:"none",
  301. mask:true,
  302. duration: 2000
  303. });
  304. }
  305. })
  306. },
  307. //整改告知书
  308. genReport(id){
  309. uni.showLoading({
  310. title: '下载中'
  311. });
  312. wx.downloadFile({
  313. url: config.base_url+'/zd-security/checkManage/getRectifyNotification/' + id,
  314. header: {
  315. Authorization: uni.getStorageSync('token')
  316. },
  317. success: function (res) {
  318. const fileManager = wx.getFileSystemManager()
  319. const filePath = wx.env.USER_DATA_PATH + '/整改报告.docx'
  320. fileManager.saveFile({
  321. tempFilePath: res.tempFilePath,
  322. filePath,
  323. success: () => {
  324. uni.hideLoading();
  325. wx.openDocument({
  326. filePath: filePath,
  327. showMenu: true,
  328. fileType: 'docx'
  329. })
  330. },
  331. fail: function (res){
  332. uni.hideLoading();
  333. uni.showToast({
  334. title: '下载失败',
  335. icon:"none",
  336. mask:true,
  337. duration: 2000
  338. });
  339. }
  340. })
  341. },
  342. fail: function (res){
  343. uni.hideLoading();
  344. uni.showToast({
  345. title: '下载失败',
  346. icon:"none",
  347. mask:true,
  348. duration: 2000
  349. });
  350. }
  351. })
  352. },
  353. }
  354. }
  355. </script>
  356. <style lang="stylus" scoped>
  357. .examine{
  358. height:100%;
  359. display flex;
  360. .info-max-box{
  361. flex: 1;
  362. overflow: scroll;
  363. }
  364. .basics{
  365. width: 690rpx;
  366. background: #FFFFFF;
  367. border-radius: 20rpx;
  368. padding: 30rpx 30rpx 32rpx;
  369. box-sizing: border-box;
  370. margin: 20rpx 30rpx ;
  371. .basics_li{
  372. height: 80rpx;
  373. display: flex;
  374. justify-content: space-between;
  375. border-bottom: 1rpx solid #D8D8D8;
  376. >text:nth-of-type(1){
  377. font-size: 28rpx;
  378. font-family: PingFang SC-Medium, PingFang SC;
  379. font-weight: 400;
  380. color: #666666;
  381. line-height: 80rpx;
  382. width: 140rpx;
  383. }
  384. >text:nth-of-type(2){
  385. flex: 1;
  386. font-size: 28rpx;
  387. font-family: PingFang SC-Medium, PingFang SC;
  388. font-weight: 400;
  389. color: #333333;
  390. line-height: 80rpx;
  391. text-align: right;
  392. white-space: nowrap;
  393. overflow: hidden;
  394. text-overflow: ellipsis;
  395. }
  396. }
  397. }
  398. .attachment{
  399. width: 690rpx;
  400. background: #FFFFFF;
  401. border-radius: 20rpx;
  402. margin: 20rpx 30rpx 0;
  403. padding-bottom: 32rpx;
  404. box-sizing: border-box;
  405. .attachment_t{
  406. border-bottom: 1rpx solid #D8D8D8;
  407. >text:nth-of-type(1){
  408. font-size: 30rpx;
  409. font-family: PingFang SC-Medium, PingFang SC;
  410. font-weight: 400;
  411. color: #333333;
  412. line-height: 110rpx;
  413. margin-left: 28rpx;
  414. }
  415. >text:nth-of-type(2){
  416. font-size: 30rpx;
  417. font-family: PingFang SC-Medium, PingFang SC;
  418. font-weight: 400;
  419. color: #999999;
  420. line-height: 110rpx;
  421. margin-left: 24rpx;
  422. }
  423. }
  424. .attachment_li{
  425. height: 40rpx;
  426. display: flex;
  427. justify-content: flex-start;
  428. align-items: center;
  429. margin-top: 32rpx;
  430. >img{
  431. width: 30rpx;
  432. height: 26rpx;
  433. margin-right: 20rpx;
  434. margin-left: 50rpx;
  435. }
  436. >text{
  437. flex: 1;
  438. font-size: 28rpx;
  439. font-family: PingFang SC-Medium, PingFang SC;
  440. font-weight: 400;
  441. color: #0183FA;
  442. line-height: 40rpx;
  443. white-space: nowrap;
  444. overflow: hidden;
  445. text-overflow: ellipsis;
  446. }
  447. .attachment_li_del{
  448. width: 30rpx;
  449. height: 30rpx;
  450. }
  451. }
  452. }
  453. .inconformity{
  454. width: 690rpx;
  455. height: 100rpx;
  456. background: #FFFFFF;
  457. border-radius: 20rpx 20rpx 20rpx 20rpx;
  458. margin: 20rpx 30rpx;
  459. font-size: 30rpx;
  460. font-family: PingFang SC-Medium, PingFang SC;
  461. font-weight: 400;
  462. color: #333333;
  463. line-height: 100rpx;
  464. text-align: center;
  465. display: flex;
  466. justify-content: center;
  467. align-items: center;
  468. >img{
  469. width: 30rpx;
  470. height: 26rpx;
  471. margin-left: 20rpx;
  472. }
  473. }
  474. .danger{
  475. width: 690rpx;
  476. background: #FFFFFF;
  477. border-radius: 20rpx;
  478. padding: 15rpx 30rpx 15rpx;
  479. box-sizing: border-box;
  480. margin: 20rpx 30rpx ;
  481. position: relative;
  482. .sort{
  483. width: 40rpx;
  484. height: 40rpx;
  485. background: #0183FA;
  486. border-radius: 20rpx 0rpx 10rpx 0rpx;
  487. font-size: 30rpx;
  488. font-family: PingFang SC-Medium, PingFang SC;
  489. font-weight: 400;
  490. color: #FFFFFF;
  491. line-height: 40rpx;
  492. text-align: center;
  493. position: absolute;
  494. left: 0;
  495. top: 0;
  496. }
  497. .danger_title{
  498. font-size: 30rpx;
  499. font-family: PingFang SC-Medium, PingFang SC;
  500. font-weight: 400;
  501. color: #333333;
  502. line-height:80rpx;
  503. border-bottom: 1rpx solid #D8D8D8;
  504. }
  505. .grade{
  506. height: 80rpx;
  507. display: flex;
  508. justify-content: space-between;
  509. border-bottom: 1rpx solid #D8D8D8;
  510. >text:nth-of-type(1){
  511. font-size: 28rpx;
  512. font-family: PingFang SC-Medium, PingFang SC;
  513. font-weight: 400;
  514. color: #666666;
  515. line-height: 80rpx;
  516. width: 140rpx;
  517. }
  518. >text:nth-of-type(2){
  519. flex: 1;
  520. font-size: 28rpx;
  521. font-family: PingFang SC-Medium, PingFang SC;
  522. font-weight: 400;
  523. color: #333333;
  524. line-height: 80rpx;
  525. text-align: right;
  526. }
  527. }
  528. .project{
  529. .project_t{
  530. font-size: 30rpx;
  531. font-family: PingFang SC-Medium, PingFang SC;
  532. font-weight: 400;
  533. color: #333333;
  534. line-height: 80rpx;
  535. }
  536. .project_b{
  537. min-height: 158rpx;
  538. font-size: 28rpx;
  539. font-family: PingFang SC-Medium, PingFang SC;
  540. font-weight: 400;
  541. color: #333333;
  542. line-height: 40rpx;
  543. padding: 20rpx 14rpx;
  544. box-sizing: border-box;
  545. background: #F5F5F5;
  546. border-radius: 20rpx 20rpx 20rpx 20rpx;
  547. }
  548. .project_b2{
  549. font-size: 26rpx;
  550. font-family: PingFang SC-Medium, PingFang SC;
  551. font-weight: 400;
  552. color: #666666;
  553. line-height: 26rpx;
  554. margin-top: 14rpx;
  555. text-align: right;
  556. }
  557. }
  558. .picture{
  559. .picture_t{
  560. font-size: 30rpx;
  561. font-family: PingFang SC-Medium, PingFang SC;
  562. font-weight: 400;
  563. color: #333333;
  564. line-height: 80rpx;
  565. }
  566. .picture_b{
  567. display: flex;
  568. justify-content: flex-start;
  569. flex-wrap: wrap;
  570. >img{
  571. width: 200rpx;
  572. height: 200rpx;
  573. border-radius: 10rpx 10rpx 10rpx 10rpx;
  574. margin-right: 14rpx;
  575. margin-bottom: 10rpx;
  576. }
  577. >img:nth-of-type(3n+3){
  578. margin-right: 0rpx;
  579. }
  580. }
  581. }
  582. }
  583. .pack_up{
  584. font-size: 30rpx;
  585. font-family: PingFang SC-Medium, PingFang SC;
  586. font-weight: 400;
  587. color: #666666;
  588. line-height: 140rpx;
  589. display: flex;
  590. justify-content: center;
  591. align-items: center;
  592. >img{
  593. width: 14rpx;
  594. height: 8rpx;
  595. margin-left: 22rpx;
  596. }
  597. }
  598. .report{
  599. width: 153rpx;
  600. height: 50rpx;
  601. background: #0183FA;
  602. border-radius: 25rpx 0rpx 0rpx 25rpx;
  603. font-size: 26rpx;
  604. font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  605. font-weight: 400;
  606. color: #FFFFFF;
  607. line-height: 50rpx;
  608. position: fixed;
  609. top: 180rpx;
  610. right: 0;
  611. text-align: center;
  612. }
  613. .bottom_btn{
  614. position: fixed;
  615. bottom: 26rpx;
  616. left: 30rpx;
  617. font-size: 30rpx;
  618. font-family: PingFang SC-Medium, PingFang SC;
  619. font-weight: 400;
  620. color: #FFFFFF;
  621. line-height: 90rpx;
  622. width: 690rpx;
  623. height: 90rpx;
  624. background: #0183FA;
  625. border-radius: 20rpx;
  626. text-align: center;
  627. }
  628. }
  629. </style>