dangerList.vue 13 KB

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