dangerList.vue 13 KB

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