examineList.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  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 @click="handleClick(item,'detail')">{{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. mounted(){
  120. //获取当前日期
  121. this.currentDate=this.getNowFormatDate()
  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. }else if(doType=='detail'){
  205. uni.navigateTo({
  206. url: '/pages/pages_safetyExamine/examineManage/examineDetail?id='+row.id+'&manageStatus='+row.manageStatus
  207. });
  208. }else if(doType=='startInspect'){//开始检查
  209. uni.navigateTo({
  210. url: '/pages/pages_safetyExamine/examineManage/examineAdd'
  211. });
  212. }
  213. },
  214. //获取当前日期函数
  215. getNowFormatDate() {
  216. let date = new Date(),
  217. year = date.getFullYear(), //获取完整的年份(4位)
  218. month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
  219. strDate = date.getDate() // 获取当前日(1-31)
  220. if (month < 10) month = `0${month}` // 如果月份是个位数,在前面补0
  221. if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数,在前面补0
  222. return `${year}-${month}-${strDate}`
  223. },
  224. //是否可以开始检查
  225. compareTime(date1){
  226. if(!date1){
  227. return false
  228. } else {
  229. const oDate1 = new Date(date1);
  230. const oDate2 = new Date(this.currentDate)
  231. if(oDate1.getTime() <= oDate2.getTime()){
  232. return true; //可以开始
  233. } else {
  234. return false; //不能开始
  235. }
  236. }
  237. },
  238. async getList(){
  239. let self = this;
  240. const {data} = await checkManageList(this.getData);
  241. if(data.code==200){
  242. //判断计划是否开始
  243. data.data.records.forEach(function(item){
  244. item.notStarted=self.compareTime(item.cycleStartTime)
  245. })
  246. this.dataList=[...this.dataList,...data.data.records]
  247. this.total=data.data.total;
  248. console.log(this.dataList)
  249. }
  250. },
  251. }
  252. }
  253. </script>
  254. <style lang="stylus" scoped>
  255. .examine{
  256. height:100%;
  257. display flex;
  258. // padding: 0 30rpx;
  259. // box-sizing: border-box;
  260. padding-bottom: 126rpx;
  261. box-sizing: border-box;
  262. .blue_color{
  263. color: #0183FA;
  264. border: 1rpx solid #0183FA;
  265. }
  266. .red_color{
  267. color: #FF4545;
  268. border: 1rpx solid #FF4545;
  269. }
  270. .green_color{
  271. color: #1FA50D;
  272. border: 1rpx solid #1FA50D;
  273. }
  274. .info-max-box{
  275. flex: 1;
  276. overflow: scroll;
  277. padding: 220rpx 0rpx 0;
  278. box-sizing: border-box;
  279. }
  280. /* 切换按钮 */
  281. .header{
  282. width:100%;
  283. position: fixed;
  284. top: 0rpx;
  285. z-index: 100;
  286. .tabTitle_tow{
  287. width:100%;
  288. height: 100rpx;
  289. background: #fff;
  290. display flex;
  291. justify-content: flex-start;
  292. align-items: center;
  293. border-bottom: 1rpx solid #E0E0E0;
  294. .tabTitle_tow_li{
  295. position: relative;
  296. width:146rpx;
  297. text-align center;
  298. .tabTitle_tow_text{
  299. display: inline-block;
  300. font-size: 30rpx;
  301. font-family: PingFang SC;
  302. font-weight: 500;
  303. color: #333333;
  304. line-height: 46rpx;
  305. position: relative;
  306. &.on{
  307. color:#0183FA;
  308. }
  309. }
  310. .tabTitle_tow_across{
  311. width: 50rpx;
  312. height: 4rpx;
  313. background: #0183FA;
  314. border-radius: 2rpx;
  315. margin-left: 46rpx;
  316. display none;
  317. &.on{
  318. display block;
  319. }
  320. }
  321. }
  322. }
  323. .lab_title{
  324. width: 750rpx;
  325. height: 100rpx;
  326. background: #FFFFFF;
  327. padding: 20rpx 30rpx;
  328. box-sizing: border-box;
  329. display: flex;
  330. justify-content: flex-start;
  331. .lab_title_l{
  332. width: 250rpx;
  333. height: 60rpx;
  334. margin-right: 20rpx;
  335. .lab_title_l_n{
  336. width: 250rpx;
  337. height: 60rpx;
  338. border-radius: 10rpx;
  339. border: 1rpx solid #E0E0E0;
  340. display: flex;
  341. justify-content: flex-start;
  342. align-items: center;
  343. >view{
  344. flex:1;
  345. line-height:60rpx;
  346. margin-left:20rpx;
  347. color: #999999;
  348. font-size:28rpx;
  349. white-space: nowrap;
  350. overflow: hidden;
  351. text-overflow: ellipsis;
  352. }
  353. >img{
  354. width: 14rpx;
  355. height: 8rpx;
  356. margin-right: 30rpx;
  357. }
  358. }
  359. }
  360. .lab_title_r{
  361. width: 420rpx;
  362. height: 60rpx;
  363. position:relative;
  364. border-radius: 10rpx;
  365. border: 1rpx solid #E0E0E0;
  366. .lab_title_r_btn{
  367. width: 60rpx;
  368. height: 60rpx
  369. position: absolute;
  370. top: 0rpx;
  371. left:0rpx;
  372. z-index: 100;
  373. >img{
  374. width: 20rpx;
  375. height: 20rpx;
  376. position: absolute;
  377. top: 20rpx;
  378. left: 24rpx;
  379. }
  380. }
  381. >input{
  382. width: 274rpx;
  383. height: 60rpx;
  384. position: absolute;
  385. top: 0rpx;
  386. left: 60rpx;
  387. }
  388. .clear{
  389. width: 60rpx;
  390. height: 60rpx;
  391. position: absolute;
  392. top: 0rpx;
  393. right:20rpx;
  394. font-size: 30rpx;
  395. font-family: PingFang SC-Medium, PingFang SC;
  396. font-weight: 400;
  397. color: #0183FA;
  398. line-height: 60rpx;
  399. }
  400. }
  401. }
  402. }
  403. .list_three{
  404. padding: 0 30rpx;
  405. box-sizing: border-box;
  406. .list_three_li{
  407. position: relative;
  408. width: 690rpx;
  409. height: 360rpx;
  410. background: #fff;
  411. border-radius: 10rpx;
  412. overflow: hidden;
  413. margin-bottom: 20rpx;
  414. .list_three_li_t{
  415. width: 100%;
  416. position: absolute;
  417. left: 0;
  418. top: 0;
  419. .list_three_li_t_l{
  420. >img{
  421. width: 70rpx;
  422. height: 70rpx;
  423. }
  424. >text{
  425. position: absolute;
  426. left: -15rpx;
  427. top: 76rpx;
  428. display: inline-block;
  429. width: 30rpx;
  430. height: 30rpx;
  431. background: #F5F5F5;
  432. border-radius: 15rpx;
  433. }
  434. }
  435. .list_three_li_t_c{
  436. width: 630rpx;
  437. height: 110rpx;
  438. position: absolute;
  439. left: 30rpx;
  440. top: 0;
  441. font-size: 30rpx;
  442. font-family: PingFang SC-Medium, PingFang SC;
  443. font-weight: 400;
  444. color: #333333;
  445. line-height: 110rpx;
  446. border-bottom: 1rpx dashed #D8D8D8;
  447. overflow: hidden;
  448. text-overflow:ellipsis;
  449. white-space: nowrap;
  450. padding-right: 120rpx;
  451. box-sizing: border-box;
  452. }
  453. .list_three_li_t_c2{
  454. position: absolute;
  455. right: 20rpx;
  456. top: 38rpx;
  457. width: 120rpx;
  458. height: 40rpx;
  459. font-size: 28rpx;
  460. font-family: PingFang SC-Medium, PingFang SC;
  461. font-weight: 400;
  462. color: #FF5757;
  463. line-height: 40rpx;
  464. border: 1rpx solid #FF5757;
  465. border-radius: 6rpx;
  466. text-align: center;
  467. }
  468. .list_three_li_t_r{
  469. position: absolute;
  470. right:-15rpx;
  471. top: 76rpx;
  472. width: 30rpx;
  473. height: 30rpx;
  474. background:#F5F5F5;
  475. border-radius: 15rpx;
  476. }
  477. }
  478. .list_three_li_m{
  479. position: absolute;
  480. top: 110rpx;
  481. left: 0;
  482. width: 690rpx;
  483. height: 158rpx;
  484. padding-left: 30rpx;
  485. box-sizing: border-box;
  486. .list_three_li_m_t{
  487. font-size: 28rpx;
  488. font-family: PingFang SC-Medium, PingFang SC;
  489. font-weight: 400;
  490. color: #666666;
  491. line-height: 40rpx;
  492. margin-top:22rpx;
  493. }
  494. .list_three_li_m_b{
  495. margin-top:26rpx;
  496. >text:nth-of-type(1){
  497. font-size: 26rpx;
  498. font-family: PingFang SC-Medium, PingFang SC;
  499. font-weight: 400;
  500. line-height: 40rpx;
  501. border-radius: 6rpx;
  502. padding: 0 20rpx;
  503. margin-right: 14rpx;
  504. }
  505. >text:nth-of-type(2){
  506. font-size: 26rpx;
  507. font-family: PingFang SC-Medium, PingFang SC;
  508. font-weight: 400;
  509. color: #0183FA;
  510. line-height: 40rpx;
  511. padding: 0 8rpx;
  512. border-radius: 6rpx;
  513. background: rgba(1,131,250,0.1);
  514. margin-right: 24rpx;
  515. }
  516. >text:nth-of-type(3){
  517. display: inline-block;
  518. width: 350rpx;
  519. font-size: 26rpx;
  520. font-family: PingFang SC-Medium, PingFang SC;
  521. font-weight: 400;
  522. color: #333333;
  523. line-height: 26rpx;
  524. overflow: hidden;
  525. text-overflow:ellipsis;
  526. white-space: nowrap;
  527. }
  528. }
  529. }
  530. .list_three_li_b{
  531. height: 80rpx;
  532. width: 100%;
  533. position: absolute;
  534. top: 278rpx;
  535. left: 0;
  536. border-top: 1rpx solid #E0E0E0;
  537. font-size: 28rpx;
  538. font-family: PingFang SC-Medium, PingFang SC;
  539. font-weight: 400;
  540. color: #0183FA;
  541. line-height: 80rpx;
  542. text-align: center;
  543. }
  544. .list_three_li_b_tow{
  545. height: 80rpx;
  546. width: 100%;
  547. position: absolute;
  548. top: 278rpx;
  549. left: 0;
  550. border-top: 1rpx solid #E0E0E0;
  551. font-size: 28rpx;
  552. font-family: PingFang SC-Medium, PingFang SC;
  553. font-weight: 400;
  554. color: #0183FA;
  555. line-height: 80rpx;
  556. display: flex;
  557. justify-content: center;
  558. align-items: center;
  559. >img{
  560. width: 28rpx;
  561. height: 30rpx;
  562. margin-right: 12rpx;
  563. }
  564. }
  565. .list_three_li_b_three{
  566. height: 80rpx;
  567. position: absolute;
  568. top: 278rpx;
  569. left: 0;
  570. display: flex;
  571. justify-content: flex-start;
  572. align-items: center;
  573. width: 100%;
  574. border-top: 1rpx solid #E0E0E0;
  575. >img{
  576. width: 24rpx;
  577. height: 30rpx;
  578. margin-right: 26rpx;
  579. margin-left: 30rpx;
  580. }
  581. >text:nth-of-type(1){
  582. font-size: 28rpx;
  583. font-family: PingFang SC-Medium, PingFang SC;
  584. font-weight: 400;
  585. color: #333333;
  586. line-height: 28rpx;
  587. }
  588. >text:nth-of-type(2){
  589. flex:1;
  590. font-size: 28rpx;
  591. font-family: PingFang SC-Medium, PingFang SC;
  592. font-weight: 400;
  593. color: #0183FA;
  594. line-height: 28rpx;
  595. white-space: nowrap;
  596. overflow: hidden;
  597. text-overflow: ellipsis;
  598. }
  599. .report{
  600. font-size: 28rpx;
  601. font-family: PingFang SC-Medium, PingFang SC;
  602. font-weight: 400;
  603. color: #0183FA;
  604. line-height: 28rpx;
  605. margin-right: 40rpx;
  606. }
  607. }
  608. }
  609. }
  610. .bottom_btn{
  611. position: fixed;
  612. bottom: 26rpx;
  613. left: 30rpx;
  614. font-size: 30rpx;
  615. font-family: PingFang SC-Medium, PingFang SC;
  616. font-weight: 400;
  617. color: #FFFFFF;
  618. line-height: 90rpx;
  619. width: 690rpx;
  620. height: 90rpx;
  621. background: #0183FA;
  622. border-radius: 20rpx;
  623. text-align: center;
  624. }
  625. /* 指纹采集 */
  626. .shade {
  627. height: 100%;
  628. width: 100%;
  629. position: fixed;
  630. display: flex;
  631. flex-direction: column;
  632. z-index: 10;
  633. background: rgba(0, 0, 0, 0.2);
  634. .null-box {
  635. flex: 1;
  636. }
  637. .shade_n {
  638. position: absolute;
  639. bottom: 0;
  640. left: 0;
  641. width: 750rpx;
  642. height: 560rpx;
  643. background: #FFFFFF;
  644. border-radius: 20rpx 20rpx 0rpx 0rpx;
  645. .shade_n_title{
  646. height: 100rpx;
  647. padding: 0 30rpx;
  648. box-sizing: border-box;
  649. display: flex;
  650. justify-content:space-between;
  651. border-bottom: 1rpx solid #E0E0E0;
  652. >text:nth-of-type(1){
  653. font-size: 30rpx;
  654. font-family: PingFang SC-Medium, PingFang SC;
  655. font-weight: 400;
  656. color: #333333;
  657. line-height: 100rpx;
  658. }
  659. >text:nth-of-type(2){
  660. font-size: 30rpx;
  661. font-family: PingFang SC-Medium, PingFang SC;
  662. font-weight: 400;
  663. color: #0183FA;
  664. line-height: 100rpx;
  665. }
  666. }
  667. .shade_n_b{
  668. height: 460rpx;
  669. padding: 0 30rpx;
  670. box-sizing: border-box;
  671. overflow-y: auto;
  672. .shade_n_b_li{
  673. display: flex;
  674. justify-content:space-between;
  675. align-items: center;
  676. height: 80rpx;
  677. border-bottom: 1rpx solid #E0E0E0;
  678. >text{
  679. font-size: 28rpx;
  680. font-family: PingFang SC-Medium, PingFang SC;
  681. font-weight: 400;
  682. line-height: 80rpx;
  683. overflow: hidden;
  684. text-overflow:ellipsis;
  685. white-space: nowrap;
  686. }
  687. >img{
  688. width: 24rpx;
  689. height: 16rpx;
  690. margin-right: 14rpx;
  691. }
  692. }
  693. .color_A{
  694. color: #333333;
  695. }
  696. .color_B{
  697. color: #0183FA;
  698. }
  699. }
  700. }
  701. }
  702. }
  703. </style>