examineList.vue 17 KB

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