dangerManage.vue 15 KB

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