dangerManage.vue 15 KB

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