dangerList.vue 12 KB

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