dangerManage.vue 14 KB

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