dangerManage.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. <!-- 安全检查-安全隐患 -->
  2. <template>
  3. <view class="examine">
  4. <view class="header">
  5. <view class="tabTitle" v-if="pageType==0 && !collegeGentle">
  6. <view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
  7. <view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
  8. <view :class="{on:curTab==index}" class="tabTitle_across"></view>
  9. </view>
  10. </view>
  11. <view class="tabTitle_tow">
  12. <view class="tabTitle_tow_li" @tap="tabClickTow(index)" :key="index" v-for="(item,index) in tabTextTow">
  13. <view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item}}</view>
  14. <view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
  15. </view>
  16. </view><strong></strong>
  17. <view class="lab_title">
  18. <picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="lab_title_l">
  19. <view class="lab_title_l_n">
  20. <view>{{getData.deptName?getData.deptName:'选择学院'}}</view>
  21. <img src="@/pages_safetyExamine/images/icon_06.png">
  22. </view>
  23. </picker>
  24. <view class="lab_title_r">
  25. <input type="text" v-model="getData.searchValue" placeholder="实验室/房间号" name="search" @confirm='searchBtn' confirm-type='search' maxlength="50" placeholder-style="color: #CCCCCC;font-size:22rpx;">
  26. <view v-if="getData.searchValue>0" class="lab_title_r_btn" @click="clearBtn">
  27. <img src="@/pages_safetyExamine/images/clear.png"/>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  33. <view class="list_three">
  34. <view class="list_three_li" v-for="(item,index) in dataList" :key="index" @click="handleClick(item,'detail')">
  35. <view class="list_three_li_t">
  36. <view class="list_three_li_t_l">
  37. <img v-if="item.checkRange==1" src="@/pages_safetyExamine/images/icon_xyxc_qx.png"/>
  38. <img v-if="item.checkRange==2" src="@/pages_safetyExamine/images/icon_xyxc_xy.png"/>
  39. <img v-if="item.checkRange==3" src="@/pages_safetyExamine/images/icon_xyxc_sys.png"/>
  40. <text></text>
  41. </view>
  42. <view class="list_three_li_t_c">{{item.subRoom}}</view>
  43. <view class="list_three_li_t_c2" v-if="item.overdueStatus==1">已逾期</view>
  44. <view class="list_three_li_t_r"></view>
  45. </view>
  46. <view class="list_three_li_m">
  47. <view class="list_three_li_m_t">{{item.title}}</view>
  48. <view class="list_three_li_m_b">
  49. <text class="green_color" v-if="item.rectifyStatus==1">已完成</text>
  50. <text class="blue_color" v-if="item.rectifyStatus==2">待整改</text>
  51. <text class="orange_color" v-if="item.rectifyStatus==3">待复核</text>
  52. <text class="gray_color" v-if="item.rectifyStatus==4">暂无法整改</text>
  53. <text>{{item.hazardType==1?'校院巡查':'实验室自查'}}-{{item.checkCategory==1?'综合检查':'专项检查'}}</text>
  54. <text>{{item.collegeName}}</text>
  55. </view>
  56. </view>
  57. <view class="list_three_li_b">整改期限:{{item.rectifyDeadline?item.rectifyDeadline:''}}</view>
  58. </view>
  59. </view>
  60. <img class="null-img" v-if="!dataList[0]" src="@/pages_safetyExamine/images/null-data-1.png">
  61. </scroll-view>
  62. </view>
  63. </template>
  64. <script>
  65. import { config } from '@/api/request/config.js'
  66. import {checkHazardAppList,conditionCollegeInfo} from '@/api/apiDemo/index.js'
  67. export default {
  68. name: "rectifyList",
  69. components: {
  70. },
  71. data() {
  72. return {
  73. pageType:0,
  74. //列表请求参数
  75. getData:{
  76. pageNum:1,
  77. pageSize:20,
  78. hazardType:'1',//1是院校巡查,2是实验室自查
  79. rectifyStatus:'',//1已完成 2待整改 3待复核 4 暂无法整改
  80. searchValue:'',
  81. },
  82. tabText:['校院巡查隐患','实验室自查隐患'],
  83. curTab:0,
  84. tabTextTow:['全部','待整改','待复核','已完成','暂无法整改'],
  85. curTabTow:0,
  86. form:{
  87. name:'',
  88. type:'校院巡查',
  89. startTime:'',
  90. endTime:'',
  91. inspectScope:[],
  92. tiemQuickList:[],
  93. scopeIndex:'',
  94. seleteListLab:[],
  95. patrolIndex:'',
  96. seleteListMember:[],
  97. },
  98. collegeList:[{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},],
  99. collegeIndex :0,
  100. collegeArray:[],
  101. dataList:[],
  102. collegeGentle:'',//院级管理员身份 如果是院级管理员隐藏校院巡查
  103. }
  104. },
  105. onLoad(option) {
  106. this.collegeGentle=uni.getStorageSync('gentleIdentifierData').collegeGentle
  107. if(option.form){
  108. this.form=JSON.parse(decodeURIComponent(option.form));
  109. console.log(this.form)
  110. }
  111. if(option.pageType==1){
  112. if(this.collegeGentle){
  113. uni.setNavigationBarTitle({
  114. title:'实验室自查隐患'
  115. })
  116. }else{
  117. uni.setNavigationBarTitle({
  118. title:'校院巡查隐患'
  119. })
  120. }
  121. }else if(option.pageType==2){
  122. uni.setNavigationBarTitle({
  123. title:'实验室自查隐患'
  124. })
  125. }
  126. },
  127. onShow() {
  128. },
  129. mounted(){
  130. this.dataList=[];
  131. this.getList();
  132. this.conditionCollegeInfo();
  133. },
  134. methods: {
  135. tabClick(index) {
  136. this.curTab = index;
  137. this.getData.pageNum=1;
  138. this.getData.searchValue='';
  139. this.getData.deptId='';
  140. this.getData.deptName='';
  141. this.getData.rectifyStatus='';
  142. this.curTabTow=0;
  143. this.dataList=[];
  144. if(index==0){//校院
  145. this.getData.hazardType=1;
  146. }else if(index==1){//实验室
  147. this.getData.hazardType=2;
  148. }
  149. this.getList()
  150. },
  151. //顶部tab点击
  152. tabClickTow(index) {
  153. this.curTabTow = index;
  154. this.getData.pageNum=1;
  155. this.getData.searchValue='';
  156. this.getData.deptId='';
  157. this.getData.deptName='';
  158. this.dataList=[];
  159. if(index==0){
  160. this.getData.rectifyStatus='';
  161. }else if(index==1){//待整改
  162. this.getData.rectifyStatus=2;
  163. }else if(index==2){//待复核
  164. this.getData.rectifyStatus=3;
  165. }else if(index==3){//已完成
  166. this.getData.rectifyStatus=1;
  167. }else if(index==4){//暂无法整改
  168. this.getData.rectifyStatus=4;
  169. }
  170. this.getList()
  171. },
  172. //选择学院
  173. collegeChange(e){
  174. this.collegeIndex = e.target.value;
  175. this.getData.deptId=this.collegeList[e.target.value].deptId
  176. this.getData.deptName=this.collegeList[e.target.value].deptName
  177. this.dataList=[];
  178. this.getList();
  179. },
  180. //实验室搜索
  181. searchBtn(){
  182. this.dataList=[];
  183. this.getList();
  184. },
  185. //清除
  186. clearBtn(){
  187. this.getData.pageNum=1;
  188. this.collegeIndex=0;
  189. this.getData.deptId='';
  190. this.getData.deptName='';
  191. this.getData.searchValue='';
  192. this.dataList=[];
  193. this.getList();
  194. },
  195. //滚动事件
  196. scrollGet(){
  197. let self=this;
  198. if(self.total/self.getData.pageSize<=self.getData.pageNum){
  199. console.log('没有更多数据!')
  200. }else{
  201. setTimeout(function(){
  202. self.getData.pageNum += 1;
  203. self.getList();
  204. },1000)
  205. }
  206. },
  207. //查询学院列表
  208. async conditionCollegeInfo(){
  209. let _this = this;
  210. const {data} = await conditionCollegeInfo();
  211. if(data.code == 200){
  212. data.data.forEach(function(item){
  213. item.type=false;
  214. })
  215. _this.collegeList=data.data;
  216. //检查管理
  217. for(let i=0;i<data.data.length;i++){
  218. _this.collegeArray.push(data.data[i].deptName)
  219. }
  220. }
  221. },
  222. handleClick(row,doType){
  223. let self=this;
  224. if( doType=='subBtn'){//
  225. }else if(doType=='detail'){//详情
  226. uni.navigateTo({
  227. url: '/pages_safetyExamine/views/dangerManage/dangerDetail?item='+encodeURIComponent(JSON.stringify(row))
  228. })
  229. }
  230. },
  231. async getList(){
  232. let self = this;
  233. const {data} = await checkHazardAppList(this.getData);
  234. if(data.code==200){
  235. this.dataList=[...this.dataList,...data.data.records]
  236. this.total=data.data.total;
  237. }
  238. },
  239. }
  240. }
  241. </script>
  242. <style lang="stylus" scoped>
  243. .examine{
  244. height:100%;
  245. display flex;
  246. // padding: 0 30rpx;
  247. // box-sizing: border-box;
  248. padding-bottom: 20rpx;
  249. box-sizing: border-box;
  250. .null-img{
  251. display block
  252. width:276rpx;
  253. height:321rpx;
  254. margin:100rpx 0 0 274rpx;
  255. }
  256. .blue_color{
  257. color: #0183FA;
  258. border: 1rpx solid #0183FA;
  259. }
  260. .red_color{
  261. color: #FF4545;
  262. border: 1rpx solid #FF4545;
  263. }
  264. .green_color{
  265. color: #1FA50D;
  266. border: 1rpx solid #1FA50D;
  267. }
  268. .orange_color{
  269. color: #FA8E1B;
  270. border: 1rpx solid #FA8E1B;
  271. }
  272. .gray_color{
  273. color: #A2A2A2;
  274. border: 1rpx solid #A2A2A2;
  275. }
  276. .info-max-box{
  277. flex: 1;
  278. overflow: scroll;
  279. padding: 220rpx 0rpx 0;
  280. box-sizing: border-box;
  281. }
  282. .info-max-box{
  283. flex: 1;
  284. overflow: scroll;
  285. padding: 210rpx 0rpx 0;
  286. box-sizing: border-box;
  287. }
  288. /* 切换按钮 */
  289. .header{
  290. width:100%;
  291. position: fixed;
  292. top: 0rpx;
  293. z-index: 100;
  294. .tabTitle{
  295. width:100%;
  296. height: 100rpx;
  297. background: #fff;
  298. display flex;
  299. justify-content: center;
  300. align-items: center;
  301. margin-bottom:20rpx;
  302. .tabTitle_li{
  303. position: relative;
  304. width:372rpx;
  305. text-align center;
  306. .tabTitle_text{
  307. display: inline-block;
  308. font-size: 30rpx;
  309. font-family: PingFang SC;
  310. font-weight: 500;
  311. color: #333333;
  312. line-height: 46rpx;
  313. position: relative;
  314. >text{
  315. position:absolute;
  316. min-width: 30rpx;
  317. min-height: 30rpx;
  318. border-radius:54%;
  319. background: #E80000;
  320. font-size: 18rpx;
  321. font-family: PingFang SC-Medium, PingFang SC;
  322. font-weight: 400;
  323. color: #FFFFFF;
  324. text-align: center;
  325. line-height: 30rpx;
  326. margin-left: 6rpx;
  327. padding:2rpx;
  328. box-sizing: border-box;
  329. }
  330. &.on{
  331. color:#0183FA;
  332. }
  333. }
  334. .tabTitle_across{
  335. width: 50rpx;
  336. height: 4rpx;
  337. background: #0183FA;
  338. border-radius: 2rpx;
  339. margin-left 162rpx;
  340. display none;
  341. &.on{
  342. display block;
  343. }
  344. }
  345. }
  346. .tabTitle_li:nth-of-type(1)::after{
  347. content: '';
  348. position: absolute;
  349. top: 0rpx;
  350. right: 0rpx;
  351. width: 1rpx;
  352. height: 50rpx;
  353. background: #E0E0E0;
  354. }
  355. }
  356. .tabTitle_tow{
  357. width:100%;
  358. height: 100rpx;
  359. background: #fff;
  360. display flex;
  361. justify-content: flex-start;
  362. align-items: center;
  363. border-bottom: 1rpx solid #E0E0E0;
  364. .tabTitle_tow_li{
  365. position: relative;
  366. width:152rpx;
  367. text-align center;
  368. .tabTitle_tow_text{
  369. display: inline-block;
  370. font-size: 30rpx;
  371. font-family: PingFang SC;
  372. font-weight: 500;
  373. color: #333333;
  374. line-height: 46rpx;
  375. position: relative;
  376. &.on{
  377. color:#0183FA;
  378. }
  379. }
  380. .tabTitle_tow_across{
  381. width: 50rpx;
  382. height: 4rpx;
  383. background: #0183FA;
  384. border-radius: 2rpx;
  385. margin-left: 50rpx;
  386. display none;
  387. &.on{
  388. display block;
  389. }
  390. }
  391. }
  392. }
  393. .lab_title{
  394. width: 750rpx;
  395. height: 100rpx;
  396. background: #FFFFFF;
  397. padding: 20rpx 30rpx;
  398. box-sizing: border-box;
  399. display: flex;
  400. justify-content: flex-start;
  401. .lab_title_l{
  402. width: 250rpx;
  403. height: 60rpx;
  404. margin-right: 20rpx;
  405. .lab_title_l_n{
  406. width: 250rpx;
  407. height: 60rpx;
  408. border-radius: 10rpx;
  409. border: 1rpx solid #E0E0E0;
  410. display: flex;
  411. justify-content: flex-start;
  412. align-items: center;
  413. >view{
  414. flex:1;
  415. line-height:60rpx;
  416. margin-left:20rpx;
  417. color: #999999;
  418. font-size:28rpx;
  419. white-space: nowrap;
  420. overflow: hidden;
  421. text-overflow: ellipsis;
  422. }
  423. >img{
  424. width: 14rpx;
  425. height: 8rpx;
  426. margin-right: 30rpx;
  427. }
  428. }
  429. }
  430. .lab_title_r{
  431. width: 420rpx;
  432. height: 60rpx;
  433. position:relative;
  434. border-radius: 10rpx;
  435. border: 1rpx solid #E0E0E0;
  436. .lab_title_r_btn{
  437. width: 60rpx;
  438. height: 60rpx
  439. position: absolute;
  440. top: 0rpx;
  441. right:0rpx;
  442. z-index: 100;
  443. >img{
  444. width: 20rpx;
  445. height: 20rpx;
  446. position: absolute;
  447. top: 20rpx;
  448. left: 24rpx;
  449. }
  450. }
  451. >input{
  452. width: 274rpx;
  453. height: 60rpx;
  454. position: absolute;
  455. top: 0rpx;
  456. left: 60rpx;
  457. }
  458. .clear{
  459. width: 60rpx;
  460. height: 60rpx;
  461. position: absolute;
  462. top: 0rpx;
  463. right:20rpx;
  464. font-size: 30rpx;
  465. font-family: PingFang SC-Medium, PingFang SC;
  466. font-weight: 400;
  467. color: #0183FA;
  468. line-height: 60rpx;
  469. }
  470. }
  471. }
  472. }
  473. .list_three{
  474. padding: 0 30rpx;
  475. box-sizing: border-box;
  476. .list_three_li{
  477. position: relative;
  478. width: 690rpx;
  479. height: 320rpx;
  480. background: #fff;
  481. border-radius: 10rpx;
  482. overflow: hidden;
  483. margin-bottom: 20rpx;
  484. .list_three_li_t{
  485. width: 100%;
  486. position: absolute;
  487. left: 0;
  488. top: 0;
  489. .list_three_li_t_l{
  490. >img{
  491. width: 70rpx;
  492. height: 70rpx;
  493. }
  494. >text{
  495. position: absolute;
  496. left: -15rpx;
  497. top: 76rpx;
  498. display: inline-block;
  499. width: 30rpx;
  500. height: 30rpx;
  501. background: #F5F5F5;
  502. border-radius: 15rpx;
  503. }
  504. }
  505. .list_three_li_t_c{
  506. width: 630rpx;
  507. height: 110rpx;
  508. position: absolute;
  509. left: 30rpx;
  510. top: 0;
  511. font-size: 30rpx;
  512. font-family: PingFang SC-Medium, PingFang SC;
  513. font-weight: 400;
  514. color: #333333;
  515. line-height: 110rpx;
  516. border-bottom: 1rpx dashed #D8D8D8;
  517. overflow: hidden;
  518. text-overflow:ellipsis;
  519. white-space: nowrap;
  520. padding-right: 60rpx;
  521. box-sizing: border-box;
  522. }
  523. .list_three_li_t_c2{
  524. position: absolute;
  525. right: 20rpx;
  526. top: 38rpx;
  527. width: 120rpx;
  528. height: 40rpx;
  529. font-size: 28rpx;
  530. font-family: PingFang SC-Medium, PingFang SC;
  531. font-weight: 400;
  532. color: #FF5757;
  533. line-height: 40rpx;
  534. border: 1rpx solid #FF5757;
  535. border-radius: 6rpx;
  536. text-align: center;
  537. }
  538. .list_three_li_t_r{
  539. position: absolute;
  540. right:-15rpx;
  541. top: 76rpx;
  542. width: 30rpx;
  543. height: 30rpx;
  544. background:#F5F5F5;
  545. border-radius: 15rpx;
  546. }
  547. }
  548. .list_three_li_m{
  549. position: absolute;
  550. top: 110rpx;
  551. left: 0;
  552. width: 690rpx;
  553. height: 158rpx;
  554. padding-left: 30rpx;
  555. box-sizing: border-box;
  556. .list_three_li_m_t{
  557. font-size: 28rpx;
  558. font-family: PingFang SC-Medium, PingFang SC;
  559. font-weight: 400;
  560. color: #666666;
  561. line-height: 40rpx;
  562. margin-top:22rpx;
  563. overflow: hidden;
  564. text-overflow:ellipsis;
  565. white-space: nowrap;
  566. }
  567. .list_three_li_m_b{
  568. margin-top:26rpx;
  569. >text:nth-of-type(1){
  570. font-size: 26rpx;
  571. font-family: PingFang SC-Medium, PingFang SC;
  572. font-weight: 400;
  573. line-height: 40rpx;
  574. border-radius: 6rpx;
  575. padding: 0 20rpx;
  576. margin-right: 14rpx;
  577. }
  578. >text:nth-of-type(2){
  579. font-size: 26rpx;
  580. font-family: PingFang SC-Medium, PingFang SC;
  581. font-weight: 400;
  582. color: #0183FA;
  583. line-height: 40rpx;
  584. padding: 0 8rpx;
  585. border-radius: 6rpx;
  586. background: rgba(1,131,250,0.1);
  587. margin-right: 24rpx;
  588. }
  589. >text:nth-of-type(3){
  590. display: inline-block;
  591. width: 180rpx;
  592. font-size: 26rpx;
  593. font-family: PingFang SC-Medium, PingFang SC;
  594. font-weight: 400;
  595. color: #333333;
  596. line-height: 26rpx;
  597. overflow: hidden;
  598. text-overflow:ellipsis;
  599. white-space: nowrap;
  600. }
  601. }
  602. }
  603. .list_three_li_b{
  604. height: 60rpx;
  605. width: 100%;
  606. position: absolute;
  607. top: 258rpx;
  608. left: 0;
  609. font-size: 28rpx;
  610. font-family: PingFang SC-Medium, PingFang SC;
  611. font-weight: 400;
  612. color: #666666;
  613. line-height: 60rpx;
  614. padding-left: 28rpx;
  615. box-sizing: border-box;
  616. }
  617. }
  618. }
  619. }
  620. </style>