dangerManage.vue 15 KB

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