examineList.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  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">
  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.subjectName}}-{{item.roomNumber}}</view>
  36. <view class="list_three_li_t_c2" v-if="item.isOverdue==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="blue_color" v-if="item.manageStatus==0">待检查</text>
  43. <text class="red_color" v-if="item.manageStatus==1">检查中</text>
  44. <text class="green_color" v-if="item.manageStatus==2">已检查</text>
  45. <text>{{item.checkType==1?'校院巡查':'实验室自查'}}</text>
  46. <text>{{item.collegeName}}</text>
  47. </view>
  48. </view>
  49. <!-- 开始检查 -->
  50. <view v-if="item.manageStatus==0 && item.notStarted" class="list_three_li_b" @click="handleClick(item,'add')">开始检查</view>
  51. <view v-if="item.manageStatus==1" class="list_three_li_b" @click="handleClick(item,'edit')">编辑</view>
  52. <view v-if="!item.notStarted" class="list_three_li_b_tow"><img src="@/images/Version3.3.3/icon_xyxcgl_jhwks.png"/>计划未开始</view>
  53. <view v-if="item.manageStatus==2" class="list_three_li_b_three">
  54. <img src="@/images/Version3.3.3/icon_djcsys.png"/>
  55. <text>整改进度:</text>
  56. <text>{{item.rectifySchedule}}</text>
  57. <text class="report">整改报告</text>
  58. </view>
  59. </view>
  60. </view>
  61. </scroll-view>
  62. <view class="bottom_btn" @click="handleClick('startInspect')">开始检查</view>
  63. </view>
  64. </template>
  65. <script>
  66. import { config } from '@/api/request/config.js'
  67. import {checkManageList,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. checkType:'',//检查类型(0全部1校院巡查2实验室自查)
  80. manageStatus:'',//管理状态(-1全部 0待检查,1检查中,2已检查)
  81. searchValue:'',
  82. },
  83. tabTextTow:['全部','待检查','检查中','已检查'],
  84. curTabTow:0,
  85. form:{
  86. name:'',
  87. type:'校院巡查',
  88. startTime:'',
  89. endTime:'',
  90. inspectScope:[],
  91. tiemQuickList:[],
  92. scopeIndex:'',
  93. seleteListLab:[],
  94. patrolIndex:'',
  95. seleteListMember:[],
  96. },
  97. collegeList:[],
  98. collegeIndex :0,
  99. collegeArray:[],
  100. dataList:[],
  101. currentDate:'',
  102. }
  103. },
  104. onLoad(option) {
  105. if(option.pageType==1){
  106. this.getData.checkType=option.pageType
  107. uni.setNavigationBarTitle({
  108. title:'校院巡查'
  109. })
  110. }else if(option.pageType==2){
  111. this.getData.checkType=option.pageType
  112. uni.setNavigationBarTitle({
  113. title:'实验室自查'
  114. })
  115. }
  116. },
  117. onShow() {
  118. //获取当前日期
  119. this.currentDate=this.getNowFormatDate()
  120. },
  121. mounted(){
  122. this.getList();
  123. this.conditionCollegeInfo();
  124. },
  125. methods: {
  126. //顶部tab点击
  127. tabClickTow(index) {
  128. this.curTabTow = index;
  129. this.getData.pageNum=1;
  130. this.dataList=[];
  131. if(index==0){
  132. this.getData.manageStatus=-1;
  133. }else if(index==1){
  134. this.getData.manageStatus=0;
  135. }else if(index==2){
  136. this.getData.manageStatus=1;
  137. }else if(index==3){
  138. this.getData.manageStatus=2;
  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(this.pageType==1){//当页面切换到检查管理列表里的时候
  169. if(self.total/self.getData.pageSize<=self.getData.pageNum){
  170. console.log('没有更多数据!')
  171. }else{
  172. setTimeout(function(){
  173. self.getData.pageNum += 1;
  174. self.getList();
  175. },1000)
  176. }
  177. }
  178. },
  179. //查询学院列表
  180. async conditionCollegeInfo(){
  181. let _this = this;
  182. const {data} = await conditionCollegeInfo();
  183. if(data.code == 200){
  184. data.data.forEach(function(item){
  185. item.type=false;
  186. })
  187. _this.collegeList=data.data;
  188. //检查管理
  189. for(let i=0;i<data.data.length;i++){
  190. _this.collegeArray.push(data.data[i].deptName)
  191. }
  192. }
  193. },
  194. handleClick(row,doType){
  195. let self=this;
  196. if( doType=='add'){//开始检查
  197. uni.navigateTo({
  198. url: '/pages/pages_safetyExamine/examineManage/examineAdd?id='+row.id
  199. });
  200. }else if(doType=='edit'){
  201. uni.navigateTo({
  202. url: '/pages/pages_safetyExamine/examineManage/examineAdd?id='+row.id
  203. });
  204. }
  205. },
  206. //获取当前日期函数
  207. getNowFormatDate() {
  208. let date = new Date(),
  209. year = date.getFullYear(), //获取完整的年份(4位)
  210. month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
  211. strDate = date.getDate() // 获取当前日(1-31)
  212. if (month < 10) month = `0${month}` // 如果月份是个位数,在前面补0
  213. if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数,在前面补0
  214. return `${year}-${month}-${strDate}`
  215. },
  216. //是否可以开始检查
  217. compareTime(date1){
  218. if(!date1){
  219. return false
  220. } else {
  221. const oDate1 = new Date(date1);
  222. const oDate2 = new Date(this.currentDate)
  223. if(oDate1.getTime() <= oDate2.getTime()){
  224. return true; //可以开始
  225. } else {
  226. return false; //不能开始
  227. }
  228. }
  229. },
  230. async getList(){
  231. let self = this;
  232. const {data} = await checkManageList(this.getData);
  233. if(data.code==200){
  234. //判断计划是否开始
  235. data.data.records.forEach(function(item){
  236. item.notStarted=self.compareTime(item.cycleStartTime)
  237. })
  238. this.dataList=[...this.dataList,...data.data.records]
  239. this.total=data.data.total;
  240. }
  241. },
  242. }
  243. }
  244. </script>
  245. <style lang="stylus" scoped>
  246. .examine{
  247. height:100%;
  248. display flex;
  249. // padding: 0 30rpx;
  250. // box-sizing: border-box;
  251. padding-bottom: 126rpx;
  252. box-sizing: border-box;
  253. .blue_color{
  254. color: #0183FA;
  255. border: 1rpx solid #0183FA;
  256. }
  257. .red_color{
  258. color: #FF4545;
  259. border: 1rpx solid #FF4545;
  260. }
  261. .green_color{
  262. color: #1FA50D;
  263. border: 1rpx solid #1FA50D;
  264. }
  265. .info-max-box{
  266. flex: 1;
  267. overflow: scroll;
  268. padding: 220rpx 0rpx 0;
  269. box-sizing: border-box;
  270. }
  271. /* 切换按钮 */
  272. .header{
  273. width:100%;
  274. position: fixed;
  275. top: 0rpx;
  276. z-index: 100;
  277. .tabTitle_tow{
  278. width:100%;
  279. height: 100rpx;
  280. background: #fff;
  281. display flex;
  282. justify-content: flex-start;
  283. align-items: center;
  284. border-bottom: 1rpx solid #E0E0E0;
  285. .tabTitle_tow_li{
  286. position: relative;
  287. width:146rpx;
  288. text-align center;
  289. .tabTitle_tow_text{
  290. display: inline-block;
  291. font-size: 30rpx;
  292. font-family: PingFang SC;
  293. font-weight: 500;
  294. color: #333333;
  295. line-height: 46rpx;
  296. position: relative;
  297. &.on{
  298. color:#0183FA;
  299. }
  300. }
  301. .tabTitle_tow_across{
  302. width: 50rpx;
  303. height: 4rpx;
  304. background: #0183FA;
  305. border-radius: 2rpx;
  306. margin-left: 46rpx;
  307. display none;
  308. &.on{
  309. display block;
  310. }
  311. }
  312. }
  313. }
  314. .lab_title{
  315. width: 750rpx;
  316. height: 100rpx;
  317. background: #FFFFFF;
  318. padding: 20rpx 30rpx;
  319. box-sizing: border-box;
  320. display: flex;
  321. justify-content: flex-start;
  322. .lab_title_l{
  323. width: 250rpx;
  324. height: 60rpx;
  325. margin-right: 20rpx;
  326. .lab_title_l_n{
  327. width: 250rpx;
  328. height: 60rpx;
  329. border-radius: 10rpx;
  330. border: 1rpx solid #E0E0E0;
  331. display: flex;
  332. justify-content: flex-start;
  333. align-items: center;
  334. >view{
  335. flex:1;
  336. line-height:60rpx;
  337. margin-left:20rpx;
  338. color: #999999;
  339. font-size:28rpx;
  340. white-space: nowrap;
  341. overflow: hidden;
  342. text-overflow: ellipsis;
  343. }
  344. >img{
  345. width: 14rpx;
  346. height: 8rpx;
  347. margin-right: 30rpx;
  348. }
  349. }
  350. }
  351. .lab_title_r{
  352. width: 420rpx;
  353. height: 60rpx;
  354. position:relative;
  355. border-radius: 10rpx;
  356. border: 1rpx solid #E0E0E0;
  357. .lab_title_r_btn{
  358. width: 60rpx;
  359. height: 60rpx
  360. position: absolute;
  361. top: 0rpx;
  362. left:0rpx;
  363. z-index: 100;
  364. >img{
  365. width: 20rpx;
  366. height: 20rpx;
  367. position: absolute;
  368. top: 20rpx;
  369. left: 24rpx;
  370. }
  371. }
  372. >input{
  373. width: 274rpx;
  374. height: 60rpx;
  375. position: absolute;
  376. top: 0rpx;
  377. left: 60rpx;
  378. }
  379. .clear{
  380. width: 60rpx;
  381. height: 60rpx;
  382. position: absolute;
  383. top: 0rpx;
  384. right:20rpx;
  385. font-size: 30rpx;
  386. font-family: PingFang SC-Medium, PingFang SC;
  387. font-weight: 400;
  388. color: #0183FA;
  389. line-height: 60rpx;
  390. }
  391. }
  392. }
  393. }
  394. .list_three{
  395. padding: 0 30rpx;
  396. box-sizing: border-box;
  397. .list_three_li{
  398. position: relative;
  399. width: 690rpx;
  400. height: 360rpx;
  401. background: #fff;
  402. border-radius: 10rpx;
  403. overflow: hidden;
  404. margin-bottom: 20rpx;
  405. .list_three_li_t{
  406. width: 100%;
  407. position: absolute;
  408. left: 0;
  409. top: 0;
  410. .list_three_li_t_l{
  411. >img{
  412. width: 70rpx;
  413. height: 70rpx;
  414. }
  415. >text{
  416. position: absolute;
  417. left: -15rpx;
  418. top: 76rpx;
  419. display: inline-block;
  420. width: 30rpx;
  421. height: 30rpx;
  422. background: #F5F5F5;
  423. border-radius: 15rpx;
  424. }
  425. }
  426. .list_three_li_t_c{
  427. width: 630rpx;
  428. height: 110rpx;
  429. position: absolute;
  430. left: 30rpx;
  431. top: 0;
  432. font-size: 30rpx;
  433. font-family: PingFang SC-Medium, PingFang SC;
  434. font-weight: 400;
  435. color: #333333;
  436. line-height: 110rpx;
  437. border-bottom: 1rpx dashed #D8D8D8;
  438. overflow: hidden;
  439. text-overflow:ellipsis;
  440. white-space: nowrap;
  441. padding-right: 120rpx;
  442. box-sizing: border-box;
  443. }
  444. .list_three_li_t_c2{
  445. position: absolute;
  446. right: 20rpx;
  447. top: 38rpx;
  448. width: 120rpx;
  449. height: 40rpx;
  450. font-size: 28rpx;
  451. font-family: PingFang SC-Medium, PingFang SC;
  452. font-weight: 400;
  453. color: #FF5757;
  454. line-height: 40rpx;
  455. border: 1rpx solid #FF5757;
  456. border-radius: 6rpx;
  457. text-align: center;
  458. }
  459. .list_three_li_t_r{
  460. position: absolute;
  461. right:-15rpx;
  462. top: 76rpx;
  463. width: 30rpx;
  464. height: 30rpx;
  465. background:#F5F5F5;
  466. border-radius: 15rpx;
  467. }
  468. }
  469. .list_three_li_m{
  470. position: absolute;
  471. top: 110rpx;
  472. left: 0;
  473. width: 690rpx;
  474. height: 158rpx;
  475. padding-left: 30rpx;
  476. box-sizing: border-box;
  477. .list_three_li_m_t{
  478. font-size: 28rpx;
  479. font-family: PingFang SC-Medium, PingFang SC;
  480. font-weight: 400;
  481. color: #666666;
  482. line-height: 40rpx;
  483. margin-top:22rpx;
  484. }
  485. .list_three_li_m_b{
  486. margin-top:26rpx;
  487. >text:nth-of-type(1){
  488. font-size: 26rpx;
  489. font-family: PingFang SC-Medium, PingFang SC;
  490. font-weight: 400;
  491. line-height: 40rpx;
  492. border-radius: 6rpx;
  493. padding: 0 20rpx;
  494. margin-right: 14rpx;
  495. }
  496. >text:nth-of-type(2){
  497. font-size: 26rpx;
  498. font-family: PingFang SC-Medium, PingFang SC;
  499. font-weight: 400;
  500. color: #0183FA;
  501. line-height: 40rpx;
  502. padding: 0 8rpx;
  503. border-radius: 6rpx;
  504. background: rgba(1,131,250,0.1);
  505. margin-right: 24rpx;
  506. }
  507. >text:nth-of-type(3){
  508. display: inline-block;
  509. width: 350rpx;
  510. font-size: 26rpx;
  511. font-family: PingFang SC-Medium, PingFang SC;
  512. font-weight: 400;
  513. color: #333333;
  514. line-height: 26rpx;
  515. overflow: hidden;
  516. text-overflow:ellipsis;
  517. white-space: nowrap;
  518. }
  519. }
  520. }
  521. .list_three_li_b{
  522. height: 80rpx;
  523. width: 100%;
  524. position: absolute;
  525. top: 278rpx;
  526. left: 0;
  527. border-top: 1rpx solid #E0E0E0;
  528. font-size: 28rpx;
  529. font-family: PingFang SC-Medium, PingFang SC;
  530. font-weight: 400;
  531. color: #0183FA;
  532. line-height: 80rpx;
  533. text-align: center;
  534. }
  535. .list_three_li_b_tow{
  536. height: 80rpx;
  537. width: 100%;
  538. position: absolute;
  539. top: 278rpx;
  540. left: 0;
  541. border-top: 1rpx solid #E0E0E0;
  542. font-size: 28rpx;
  543. font-family: PingFang SC-Medium, PingFang SC;
  544. font-weight: 400;
  545. color: #0183FA;
  546. line-height: 80rpx;
  547. display: flex;
  548. justify-content: center;
  549. align-items: center;
  550. >img{
  551. width: 28rpx;
  552. height: 30rpx;
  553. margin-right: 12rpx;
  554. }
  555. }
  556. .list_three_li_b_three{
  557. height: 80rpx;
  558. position: absolute;
  559. top: 278rpx;
  560. left: 0;
  561. display: flex;
  562. justify-content: flex-start;
  563. align-items: center;
  564. width: 100%;
  565. border-top: 1rpx solid #E0E0E0;
  566. >img{
  567. width: 24rpx;
  568. height: 30rpx;
  569. margin-right: 26rpx;
  570. margin-left: 30rpx;
  571. }
  572. >text:nth-of-type(1){
  573. font-size: 28rpx;
  574. font-family: PingFang SC-Medium, PingFang SC;
  575. font-weight: 400;
  576. color: #333333;
  577. line-height: 28rpx;
  578. }
  579. >text:nth-of-type(2){
  580. flex:1;
  581. font-size: 28rpx;
  582. font-family: PingFang SC-Medium, PingFang SC;
  583. font-weight: 400;
  584. color: #0183FA;
  585. line-height: 28rpx;
  586. white-space: nowrap;
  587. overflow: hidden;
  588. text-overflow: ellipsis;
  589. }
  590. .report{
  591. font-size: 28rpx;
  592. font-family: PingFang SC-Medium, PingFang SC;
  593. font-weight: 400;
  594. color: #0183FA;
  595. line-height: 28rpx;
  596. margin-right: 40rpx;
  597. }
  598. }
  599. }
  600. }
  601. .bottom_btn{
  602. position: fixed;
  603. bottom: 26rpx;
  604. left: 30rpx;
  605. font-size: 30rpx;
  606. font-family: PingFang SC-Medium, PingFang SC;
  607. font-weight: 400;
  608. color: #FFFFFF;
  609. line-height: 90rpx;
  610. width: 690rpx;
  611. height: 90rpx;
  612. background: #0183FA;
  613. border-radius: 20rpx;
  614. text-align: center;
  615. }
  616. /* 指纹采集 */
  617. .shade {
  618. height: 100%;
  619. width: 100%;
  620. position: fixed;
  621. display: flex;
  622. flex-direction: column;
  623. z-index: 10;
  624. background: rgba(0, 0, 0, 0.2);
  625. .null-box {
  626. flex: 1;
  627. }
  628. .shade_n {
  629. position: absolute;
  630. bottom: 0;
  631. left: 0;
  632. width: 750rpx;
  633. height: 560rpx;
  634. background: #FFFFFF;
  635. border-radius: 20rpx 20rpx 0rpx 0rpx;
  636. .shade_n_title{
  637. height: 100rpx;
  638. padding: 0 30rpx;
  639. box-sizing: border-box;
  640. display: flex;
  641. justify-content:space-between;
  642. border-bottom: 1rpx solid #E0E0E0;
  643. >text:nth-of-type(1){
  644. font-size: 30rpx;
  645. font-family: PingFang SC-Medium, PingFang SC;
  646. font-weight: 400;
  647. color: #333333;
  648. line-height: 100rpx;
  649. }
  650. >text:nth-of-type(2){
  651. font-size: 30rpx;
  652. font-family: PingFang SC-Medium, PingFang SC;
  653. font-weight: 400;
  654. color: #0183FA;
  655. line-height: 100rpx;
  656. }
  657. }
  658. .shade_n_b{
  659. height: 460rpx;
  660. padding: 0 30rpx;
  661. box-sizing: border-box;
  662. overflow-y: auto;
  663. .shade_n_b_li{
  664. display: flex;
  665. justify-content:space-between;
  666. align-items: center;
  667. height: 80rpx;
  668. border-bottom: 1rpx solid #E0E0E0;
  669. >text{
  670. font-size: 28rpx;
  671. font-family: PingFang SC-Medium, PingFang SC;
  672. font-weight: 400;
  673. line-height: 80rpx;
  674. overflow: hidden;
  675. text-overflow:ellipsis;
  676. white-space: nowrap;
  677. }
  678. >img{
  679. width: 24rpx;
  680. height: 16rpx;
  681. margin-right: 14rpx;
  682. }
  683. }
  684. .color_A{
  685. color: #333333;
  686. }
  687. .color_B{
  688. color: #0183FA;
  689. }
  690. }
  691. }
  692. }
  693. }
  694. </style>