dangerManage.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  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. .null-img{
  243. display block
  244. width:276rpx;
  245. height:321rpx;
  246. margin:100rpx 0 0 274rpx;
  247. }
  248. .blue_color{
  249. color: #0183FA;
  250. border: 1rpx solid #0183FA;
  251. }
  252. .red_color{
  253. color: #FF4545;
  254. border: 1rpx solid #FF4545;
  255. }
  256. .green_color{
  257. color: #1FA50D;
  258. border: 1rpx solid #1FA50D;
  259. }
  260. .orange_color{
  261. color: #FA8E1B;
  262. border: 1rpx solid #FA8E1B;
  263. }
  264. .gray_color{
  265. color: #A2A2A2;
  266. border: 1rpx solid #A2A2A2;
  267. }
  268. .info-max-box{
  269. flex: 1;
  270. overflow: scroll;
  271. padding: 220rpx 0rpx 0;
  272. box-sizing: border-box;
  273. }
  274. .info-max-box{
  275. flex: 1;
  276. overflow: scroll;
  277. padding: 340rpx 0rpx 0;
  278. box-sizing: border-box;
  279. }
  280. /* 切换按钮 */
  281. .header{
  282. width:100%;
  283. position: fixed;
  284. top: 0rpx;
  285. z-index: 100;
  286. .tabTitle{
  287. width:100%;
  288. height: 100rpx;
  289. background: #fff;
  290. display flex;
  291. justify-content: center;
  292. align-items: center;
  293. margin-bottom:20rpx;
  294. .tabTitle_li{
  295. position: relative;
  296. width:372rpx;
  297. text-align center;
  298. .tabTitle_text{
  299. display: inline-block;
  300. font-size: 30rpx;
  301. font-family: PingFang SC;
  302. font-weight: 500;
  303. color: #333333;
  304. line-height: 46rpx;
  305. position: relative;
  306. >text{
  307. position:absolute;
  308. min-width: 30rpx;
  309. min-height: 30rpx;
  310. border-radius:54%;
  311. background: #E80000;
  312. font-size: 18rpx;
  313. font-family: PingFang SC-Medium, PingFang SC;
  314. font-weight: 400;
  315. color: #FFFFFF;
  316. text-align: center;
  317. line-height: 30rpx;
  318. margin-left: 6rpx;
  319. padding:2rpx;
  320. box-sizing: border-box;
  321. }
  322. &.on{
  323. color:#0183FA;
  324. }
  325. }
  326. .tabTitle_across{
  327. width: 50rpx;
  328. height: 4rpx;
  329. background: #0183FA;
  330. border-radius: 2rpx;
  331. margin-left 162rpx;
  332. display none;
  333. &.on{
  334. display block;
  335. }
  336. }
  337. }
  338. .tabTitle_li:nth-of-type(1)::after{
  339. content: '';
  340. position: absolute;
  341. top: 0rpx;
  342. right: 0rpx;
  343. width: 1rpx;
  344. height: 50rpx;
  345. background: #E0E0E0;
  346. }
  347. }
  348. .tabTitle_tow{
  349. width:100%;
  350. height: 100rpx;
  351. background: #fff;
  352. display flex;
  353. justify-content: flex-start;
  354. align-items: center;
  355. border-bottom: 1rpx solid #E0E0E0;
  356. .tabTitle_tow_li{
  357. position: relative;
  358. width:152rpx;
  359. text-align center;
  360. .tabTitle_tow_text{
  361. display: inline-block;
  362. font-size: 30rpx;
  363. font-family: PingFang SC;
  364. font-weight: 500;
  365. color: #333333;
  366. line-height: 46rpx;
  367. position: relative;
  368. &.on{
  369. color:#0183FA;
  370. }
  371. }
  372. .tabTitle_tow_across{
  373. width: 50rpx;
  374. height: 4rpx;
  375. background: #0183FA;
  376. border-radius: 2rpx;
  377. margin-left: 50rpx;
  378. display none;
  379. &.on{
  380. display block;
  381. }
  382. }
  383. }
  384. }
  385. .lab_title{
  386. width: 750rpx;
  387. height: 100rpx;
  388. background: #FFFFFF;
  389. padding: 20rpx 30rpx;
  390. box-sizing: border-box;
  391. display: flex;
  392. justify-content: flex-start;
  393. .lab_title_l{
  394. width: 250rpx;
  395. height: 60rpx;
  396. margin-right: 20rpx;
  397. .lab_title_l_n{
  398. width: 250rpx;
  399. height: 60rpx;
  400. border-radius: 10rpx;
  401. border: 1rpx solid #E0E0E0;
  402. display: flex;
  403. justify-content: flex-start;
  404. align-items: center;
  405. >view{
  406. flex:1;
  407. line-height:60rpx;
  408. margin-left:20rpx;
  409. color: #999999;
  410. font-size:28rpx;
  411. white-space: nowrap;
  412. overflow: hidden;
  413. text-overflow: ellipsis;
  414. }
  415. >img{
  416. width: 14rpx;
  417. height: 8rpx;
  418. margin-right: 30rpx;
  419. }
  420. }
  421. }
  422. .lab_title_r{
  423. width: 420rpx;
  424. height: 60rpx;
  425. position:relative;
  426. border-radius: 10rpx;
  427. border: 1rpx solid #E0E0E0;
  428. .lab_title_r_btn{
  429. width: 60rpx;
  430. height: 60rpx
  431. position: absolute;
  432. top: 0rpx;
  433. left:0rpx;
  434. z-index: 100;
  435. >img{
  436. width: 20rpx;
  437. height: 20rpx;
  438. position: absolute;
  439. top: 20rpx;
  440. left: 24rpx;
  441. }
  442. }
  443. >input{
  444. width: 274rpx;
  445. height: 60rpx;
  446. position: absolute;
  447. top: 0rpx;
  448. left: 60rpx;
  449. }
  450. .clear{
  451. width: 60rpx;
  452. height: 60rpx;
  453. position: absolute;
  454. top: 0rpx;
  455. right:20rpx;
  456. font-size: 30rpx;
  457. font-family: PingFang SC-Medium, PingFang SC;
  458. font-weight: 400;
  459. color: #0183FA;
  460. line-height: 60rpx;
  461. }
  462. }
  463. }
  464. }
  465. .list_three{
  466. padding: 0 30rpx;
  467. box-sizing: border-box;
  468. .list_three_li{
  469. position: relative;
  470. width: 690rpx;
  471. height: 320rpx;
  472. background: #fff;
  473. border-radius: 10rpx;
  474. overflow: hidden;
  475. margin-bottom: 20rpx;
  476. .list_three_li_t{
  477. width: 100%;
  478. position: absolute;
  479. left: 0;
  480. top: 0;
  481. .list_three_li_t_l{
  482. >img{
  483. width: 70rpx;
  484. height: 70rpx;
  485. }
  486. >text{
  487. position: absolute;
  488. left: -15rpx;
  489. top: 76rpx;
  490. display: inline-block;
  491. width: 30rpx;
  492. height: 30rpx;
  493. background: #F5F5F5;
  494. border-radius: 15rpx;
  495. }
  496. }
  497. .list_three_li_t_c{
  498. width: 630rpx;
  499. height: 110rpx;
  500. position: absolute;
  501. left: 30rpx;
  502. top: 0;
  503. font-size: 30rpx;
  504. font-family: PingFang SC-Medium, PingFang SC;
  505. font-weight: 400;
  506. color: #333333;
  507. line-height: 110rpx;
  508. border-bottom: 1rpx dashed #D8D8D8;
  509. overflow: hidden;
  510. text-overflow:ellipsis;
  511. white-space: nowrap;
  512. padding-right: 60rpx;
  513. box-sizing: border-box;
  514. }
  515. .list_three_li_t_c2{
  516. position: absolute;
  517. right: 20rpx;
  518. top: 38rpx;
  519. width: 120rpx;
  520. height: 40rpx;
  521. font-size: 28rpx;
  522. font-family: PingFang SC-Medium, PingFang SC;
  523. font-weight: 400;
  524. color: #FF5757;
  525. line-height: 40rpx;
  526. border: 1rpx solid #FF5757;
  527. border-radius: 6rpx;
  528. text-align: center;
  529. }
  530. .list_three_li_t_r{
  531. position: absolute;
  532. right:-15rpx;
  533. top: 76rpx;
  534. width: 30rpx;
  535. height: 30rpx;
  536. background:#F5F5F5;
  537. border-radius: 15rpx;
  538. }
  539. }
  540. .list_three_li_m{
  541. position: absolute;
  542. top: 110rpx;
  543. left: 0;
  544. width: 690rpx;
  545. height: 158rpx;
  546. padding-left: 30rpx;
  547. box-sizing: border-box;
  548. .list_three_li_m_t{
  549. font-size: 28rpx;
  550. font-family: PingFang SC-Medium, PingFang SC;
  551. font-weight: 400;
  552. color: #666666;
  553. line-height: 40rpx;
  554. margin-top:22rpx;
  555. overflow: hidden;
  556. text-overflow:ellipsis;
  557. white-space: nowrap;
  558. }
  559. .list_three_li_m_b{
  560. margin-top:26rpx;
  561. >text:nth-of-type(1){
  562. font-size: 26rpx;
  563. font-family: PingFang SC-Medium, PingFang SC;
  564. font-weight: 400;
  565. line-height: 40rpx;
  566. border-radius: 6rpx;
  567. padding: 0 20rpx;
  568. margin-right: 14rpx;
  569. }
  570. >text:nth-of-type(2){
  571. font-size: 26rpx;
  572. font-family: PingFang SC-Medium, PingFang SC;
  573. font-weight: 400;
  574. color: #0183FA;
  575. line-height: 40rpx;
  576. padding: 0 8rpx;
  577. border-radius: 6rpx;
  578. background: rgba(1,131,250,0.1);
  579. margin-right: 24rpx;
  580. }
  581. >text:nth-of-type(3){
  582. display: inline-block;
  583. width: 290rpx;
  584. font-size: 26rpx;
  585. font-family: PingFang SC-Medium, PingFang SC;
  586. font-weight: 400;
  587. color: #333333;
  588. line-height: 26rpx;
  589. overflow: hidden;
  590. text-overflow:ellipsis;
  591. white-space: nowrap;
  592. }
  593. }
  594. }
  595. .list_three_li_b{
  596. height: 60rpx;
  597. width: 100%;
  598. position: absolute;
  599. top: 258rpx;
  600. left: 0;
  601. font-size: 28rpx;
  602. font-family: PingFang SC-Medium, PingFang SC;
  603. font-weight: 400;
  604. color: #666666;
  605. line-height: 60rpx;
  606. padding-left: 28rpx;
  607. box-sizing: border-box;
  608. }
  609. }
  610. }
  611. }
  612. </style>