examineDetail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  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>环测学院</text>
  9. </view>
  10. <view class="basics_li">
  11. <text>实验室:</text>
  12. <text>实验室名称-房间号</text>
  13. </view>
  14. <view class="basics_li">
  15. <text>楼栋:</text>
  16. <text>楼栋名称</text>
  17. </view>
  18. <view class="basics_li">
  19. <text>检查类型:</text>
  20. <text>校级巡查</text>
  21. </view>
  22. <view class="basics_li">
  23. <text>检查范围:</text>
  24. <text>全校</text>
  25. </view>
  26. <view class="basics_li" style="border:none;">
  27. <text>检查计划:</text>
  28. <text>2023年3月份校级督导检查</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">
  43. <view class="basics_li">
  44. <text>检查结果:</text>
  45. <text>不符合</text>
  46. </view>
  47. <view class="basics_li">
  48. <text>整改期限:</text>
  49. <text>2023-04-06</text>
  50. </view>
  51. <view class="basics_li">
  52. <text>整改通知:</text>
  53. <text style="color: #0183FA;">整改告知书</text>
  54. </view>
  55. <view class="basics_li">
  56. <text>检查者:</text>
  57. <text>管理员</text>
  58. </view>
  59. <view class="basics_li" style="border: none;">
  60. <text>检查时间:</text>
  61. <text>2023-04-06</text>
  62. </view>
  63. </view>
  64. <view class="inconformity" @click="inconformityFun()">不符合项<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 dangerList">
  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>第一项隐患</text>
  70. <text style="color: #0183FA;">待整改 >></text>
  71. </view>
  72. <view v-if="item.switch">
  73. <view class="grade">
  74. <text>隐患等级:</text>
  75. <text>一般隐患</text>
  76. </view>
  77. <view class="project">
  78. <view class="project_t">检查项目:</view>
  79. <view class="project_b">1检查项目名称—1.1检查项目名称名称名称名称—1.1.1检查项目名称名称名称名称名称名称名称名称</view>
  80. <view class="project_b2">此检查项在当前实验室累计出现9次隐患</view>
  81. </view>
  82. <view class="project">
  83. <view class="project_t">检查要点:</view>
  84. <view class="project_b">检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点</view>
  85. </view>
  86. <view class="project">
  87. <view class="project_t">隐患描述:</view>
  88. <view class="project_b">检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点</view>
  89. </view>
  90. <view class="picture">
  91. <view class="picture_t">隐患照片</view>
  92. <view class="picture_b">
  93. <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
  94. <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
  95. <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
  96. <img src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. <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>
  102. </view>
  103. </scroll-view>
  104. <view class="report" @change="buttonChange">整改报告</view>
  105. </view>
  106. </template>
  107. <script>
  108. import { config } from '@/api/request/config.js'
  109. import {checkSign,queryDeptSignByUserId} from '@/api/index.js'
  110. export default {
  111. name: "rectifyList",
  112. components: {
  113. },
  114. data() {
  115. return {
  116. pageType:0,
  117. dangerList:[{sort:1,switch:false,},{sort:2,switch:false,},{sort:3,switch:false,},{sort:4,switch:false,}],
  118. inconformityStatus:false,
  119. }
  120. },
  121. onLoad(option) {
  122. if(option.form){
  123. this.form=JSON.parse(decodeURIComponent(option.form));
  124. console.log(this.form)
  125. }
  126. if(option.pageType==1){
  127. uni.setNavigationBarTitle({
  128. title:'校院巡查管理'
  129. })
  130. }else if(option.pageType==2){
  131. uni.setNavigationBarTitle({
  132. title:'实验室自查管理'
  133. })
  134. }
  135. },
  136. onShow() {
  137. },
  138. mounted(){
  139. },
  140. methods: {
  141. //滚动事件
  142. scrollGet(){
  143. },
  144. //隐患项收起展开
  145. inconformityFun(){
  146. this.inconformityStatus=!this.inconformityStatus;
  147. if(this.inconformityStatus){
  148. this.dangerList.forEach(function(item){
  149. item.switch=true;
  150. })
  151. }else{
  152. this.dangerList.forEach(function(item){
  153. item.switch=false;
  154. })
  155. }
  156. },
  157. //隐患小项收起展开
  158. switchFun(item){
  159. item.switch=!item.switch
  160. },
  161. //查看报告按钮
  162. async buttonChange(e){
  163. let namestatus;
  164. let sealstatus;
  165. //判断有没有电子签名
  166. const {data} = await checkSign();
  167. if(data.code==200){
  168. namestatus=data.data
  169. if(data.data==false){//true有电子签名false没有电子签名
  170. uni.showModal({
  171. title: '',
  172. cancelColor:'#999999',
  173. confirmColor:'#FF6E6E',
  174. cancelText: "取消", // 取消按钮的文字
  175. confirmText: "去上传", // 确认按钮文字
  176. content: '您未上传电子签名,无法生成整改通知书/整改报告!',
  177. success (res) {
  178. if (res.confirm) {
  179. console.log('用户点击确定')
  180. uni.navigateTo({
  181. url: '/pages_manage/workbench/signature/signature'
  182. });
  183. } else if (res.cancel) {
  184. console.log('用户点击取消')
  185. }
  186. }
  187. })
  188. }else{
  189. }
  190. }
  191. //如果有电子签名判断有没有电子签章
  192. if(namestatus){
  193. const {data} = await queryDeptSignByUserId();
  194. if(data.code==200){
  195. console.log(data.data.data.isUpload)
  196. sealstatus=data.data.data.isUpload
  197. if(data.data.data.isUpload==false){
  198. uni.showToast({
  199. title: '学院未上传电子签章,无法生成整改通知书/整改报告',
  200. icon:"none",
  201. mask:true,
  202. duration: 2000
  203. });
  204. }
  205. };
  206. }
  207. //如果有电子签名和电气签章开始下载
  208. if(namestatus==true && sealstatus==true){
  209. if(this.buttonArrayType == 1){
  210. if(e.target.value == 0){
  211. this.genNotice();
  212. }else if(e.target.value == 1){
  213. this.genReport();
  214. }
  215. }else if(this.buttonArrayType == 2){
  216. this.genNotice();
  217. }
  218. }
  219. },
  220. genNotice(){
  221. uni.showLoading({
  222. title: '下载中'
  223. });
  224. wx.downloadFile({
  225. url: config.base_url+'/laboratory/checkOption/genNotice/' + this.newData.id,
  226. header: {
  227. Authorization: uni.getStorageSync('token')
  228. },
  229. success: function (res) {
  230. const fileManager = wx.getFileSystemManager()
  231. const filePath = wx.env.USER_DATA_PATH + '/整改通知书.docx'
  232. fileManager.saveFile({
  233. tempFilePath: res.tempFilePath,
  234. filePath,
  235. success: () => {
  236. uni.hideLoading();
  237. wx.openDocument({
  238. filePath: filePath,
  239. showMenu: true,
  240. fileType: 'docx'
  241. })
  242. },
  243. fail: function (res){
  244. uni.hideLoading();
  245. uni.showToast({
  246. title: '下载失败',
  247. icon:"none",
  248. mask:true,
  249. duration: 2000
  250. });
  251. }
  252. })
  253. },
  254. fail: function (res){
  255. uni.hideLoading();
  256. uni.showToast({
  257. title: '下载失败',
  258. icon:"none",
  259. mask:true,
  260. duration: 2000
  261. });
  262. }
  263. })
  264. },
  265. genReport(){
  266. uni.showLoading({
  267. title: '下载中'
  268. });
  269. wx.downloadFile({
  270. url: config.base_url+'/laboratory/checkOption/genReport/' + this.newData.id,
  271. header: {
  272. Authorization: uni.getStorageSync('token')
  273. },
  274. success: function (res) {
  275. const fileManager = wx.getFileSystemManager()
  276. const filePath = wx.env.USER_DATA_PATH + '/整改报告.docx'
  277. fileManager.saveFile({
  278. tempFilePath: res.tempFilePath,
  279. filePath,
  280. success: () => {
  281. uni.hideLoading();
  282. wx.openDocument({
  283. filePath: filePath,
  284. showMenu: true,
  285. fileType: 'docx'
  286. })
  287. },
  288. fail: function (res){
  289. uni.hideLoading();
  290. uni.showToast({
  291. title: '下载失败',
  292. icon:"none",
  293. mask:true,
  294. duration: 2000
  295. });
  296. }
  297. })
  298. },
  299. fail: function (res){
  300. uni.hideLoading();
  301. uni.showToast({
  302. title: '下载失败',
  303. icon:"none",
  304. mask:true,
  305. duration: 2000
  306. });
  307. }
  308. })
  309. },
  310. }
  311. }
  312. </script>
  313. <style lang="stylus" scoped>
  314. .examine{
  315. height:100%;
  316. display flex;
  317. .info-max-box{
  318. flex: 1;
  319. overflow: scroll;
  320. }
  321. .basics{
  322. width: 690rpx;
  323. background: #FFFFFF;
  324. border-radius: 20rpx;
  325. padding: 30rpx 30rpx 32rpx;
  326. box-sizing: border-box;
  327. margin: 20rpx 30rpx ;
  328. .basics_li{
  329. height: 80rpx;
  330. display: flex;
  331. justify-content: space-between;
  332. border-bottom: 1rpx solid #D8D8D8;
  333. >text:nth-of-type(1){
  334. font-size: 28rpx;
  335. font-family: PingFang SC-Medium, PingFang SC;
  336. font-weight: 400;
  337. color: #666666;
  338. line-height: 80rpx;
  339. width: 140rpx;
  340. }
  341. >text:nth-of-type(2){
  342. flex: 1;
  343. font-size: 28rpx;
  344. font-family: PingFang SC-Medium, PingFang SC;
  345. font-weight: 400;
  346. color: #333333;
  347. line-height: 80rpx;
  348. text-align: right;
  349. }
  350. }
  351. }
  352. .attachment{
  353. width: 690rpx;
  354. background: #FFFFFF;
  355. border-radius: 20rpx;
  356. margin: 20rpx 30rpx 0;
  357. padding-bottom: 32rpx;
  358. box-sizing: border-box;
  359. .attachment_t{
  360. border-bottom: 1rpx solid #D8D8D8;
  361. >text:nth-of-type(1){
  362. font-size: 30rpx;
  363. font-family: PingFang SC-Medium, PingFang SC;
  364. font-weight: 400;
  365. color: #333333;
  366. line-height: 110rpx;
  367. margin-left: 28rpx;
  368. }
  369. >text:nth-of-type(2){
  370. font-size: 30rpx;
  371. font-family: PingFang SC-Medium, PingFang SC;
  372. font-weight: 400;
  373. color: #999999;
  374. line-height: 110rpx;
  375. margin-left: 24rpx;
  376. }
  377. }
  378. .attachment_li{
  379. height: 40rpx;
  380. display: flex;
  381. justify-content: flex-start;
  382. align-items: center;
  383. margin-top: 32rpx;
  384. >img{
  385. width: 30rpx;
  386. height: 26rpx;
  387. margin-right: 20rpx;
  388. margin-left: 50rpx;
  389. }
  390. >text{
  391. flex: 1;
  392. font-size: 28rpx;
  393. font-family: PingFang SC-Medium, PingFang SC;
  394. font-weight: 400;
  395. color: #0183FA;
  396. line-height: 40rpx;
  397. white-space: nowrap;
  398. overflow: hidden;
  399. text-overflow: ellipsis;
  400. }
  401. .attachment_li_del{
  402. width: 30rpx;
  403. height: 30rpx;
  404. }
  405. }
  406. }
  407. .inconformity{
  408. width: 690rpx;
  409. height: 100rpx;
  410. background: #FFFFFF;
  411. border-radius: 20rpx 20rpx 20rpx 20rpx;
  412. margin: 20rpx 30rpx;
  413. font-size: 30rpx;
  414. font-family: PingFang SC-Medium, PingFang SC;
  415. font-weight: 400;
  416. color: #333333;
  417. line-height: 100rpx;
  418. text-align: center;
  419. display: flex;
  420. justify-content: center;
  421. align-items: center;
  422. >img{
  423. width: 30rpx;
  424. height: 26rpx;
  425. margin-left: 20rpx;
  426. }
  427. }
  428. .danger{
  429. width: 690rpx;
  430. background: #FFFFFF;
  431. border-radius: 20rpx;
  432. padding: 15rpx 30rpx 15rpx;
  433. box-sizing: border-box;
  434. margin: 20rpx 30rpx ;
  435. position: relative;
  436. .sort{
  437. width: 40rpx;
  438. height: 40rpx;
  439. background: #0183FA;
  440. border-radius: 20rpx 0rpx 10rpx 0rpx;
  441. font-size: 30rpx;
  442. font-family: PingFang SC-Medium, PingFang SC;
  443. font-weight: 400;
  444. color: #FFFFFF;
  445. line-height: 40rpx;
  446. text-align: center;
  447. position: absolute;
  448. left: 0;
  449. top: 0;
  450. }
  451. .danger_title{
  452. font-size: 30rpx;
  453. font-family: PingFang SC-Medium, PingFang SC;
  454. font-weight: 400;
  455. color: #333333;
  456. line-height:80rpx;
  457. border-bottom: 1rpx solid #D8D8D8;
  458. }
  459. .grade{
  460. height: 80rpx;
  461. display: flex;
  462. justify-content: space-between;
  463. border-bottom: 1rpx solid #D8D8D8;
  464. >text:nth-of-type(1){
  465. font-size: 28rpx;
  466. font-family: PingFang SC-Medium, PingFang SC;
  467. font-weight: 400;
  468. color: #666666;
  469. line-height: 80rpx;
  470. width: 140rpx;
  471. }
  472. >text:nth-of-type(2){
  473. flex: 1;
  474. font-size: 28rpx;
  475. font-family: PingFang SC-Medium, PingFang SC;
  476. font-weight: 400;
  477. color: #333333;
  478. line-height: 80rpx;
  479. text-align: right;
  480. }
  481. }
  482. .project{
  483. .project_t{
  484. font-size: 30rpx;
  485. font-family: PingFang SC-Medium, PingFang SC;
  486. font-weight: 400;
  487. color: #333333;
  488. line-height: 80rpx;
  489. }
  490. .project_b{
  491. min-height: 158rpx;
  492. font-size: 28rpx;
  493. font-family: PingFang SC-Medium, PingFang SC;
  494. font-weight: 400;
  495. color: #333333;
  496. line-height: 40rpx;
  497. padding: 20rpx 14rpx;
  498. box-sizing: border-box;
  499. background: #F5F5F5;
  500. border-radius: 20rpx 20rpx 20rpx 20rpx;
  501. }
  502. .project_b2{
  503. font-size: 26rpx;
  504. font-family: PingFang SC-Medium, PingFang SC;
  505. font-weight: 400;
  506. color: #666666;
  507. line-height: 26rpx;
  508. margin-top: 14rpx;
  509. text-align: right;
  510. }
  511. }
  512. .picture{
  513. .picture_t{
  514. font-size: 30rpx;
  515. font-family: PingFang SC-Medium, PingFang SC;
  516. font-weight: 400;
  517. color: #333333;
  518. line-height: 80rpx;
  519. }
  520. .picture_b{
  521. display: flex;
  522. justify-content: flex-start;
  523. flex-wrap: wrap;
  524. >img{
  525. width: 200rpx;
  526. height: 200rpx;
  527. border-radius: 10rpx 10rpx 10rpx 10rpx;
  528. margin-right: 14rpx;
  529. margin-bottom: 10rpx;
  530. }
  531. >img:nth-of-type(3n+3){
  532. margin-right: 0rpx;
  533. }
  534. }
  535. }
  536. }
  537. .pack_up{
  538. font-size: 30rpx;
  539. font-family: PingFang SC-Medium, PingFang SC;
  540. font-weight: 400;
  541. color: #666666;
  542. line-height: 140rpx;
  543. display: flex;
  544. justify-content: center;
  545. align-items: center;
  546. >img{
  547. width: 14rpx;
  548. height: 8rpx;
  549. margin-left: 22rpx;
  550. }
  551. }
  552. .report{
  553. width: 153rpx;
  554. height: 50rpx;
  555. background: #0183FA;
  556. border-radius: 25rpx 0rpx 0rpx 25rpx;
  557. font-size: 26rpx;
  558. font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  559. font-weight: 400;
  560. color: #FFFFFF;
  561. line-height: 50rpx;
  562. position: fixed;
  563. top: 180rpx;
  564. right: 0;
  565. text-align: center;
  566. }
  567. }
  568. </style>