patrolPlanList.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. <!-- 安全检查-发起巡查计划 -->
  2. <template>
  3. <view class="examine">
  4. <view class="tabTitle">
  5. <view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
  6. <view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
  7. <view :class="{on:curTab==index}" class="tabTitle_across"></view>
  8. </view>
  9. </view>
  10. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  11. <view>
  12. <view class="search">
  13. <input type="text" v-model="getData.searchValue" placeholder="计划标题" name="search" @confirm='searchBtn' confirm-type='search' maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
  14. <view class="search_btn" v-if="getData.searchValue>0" @click="clearBtn">
  15. <img src="@/pages_safetyExamine/images/clear.png"/>
  16. </view>
  17. </view>
  18. <view class="list">
  19. <view class="list_li" v-for="(item,index) in dataList" :key="index" @click="handleClick(item,'edit')">
  20. <view class="list_li_t">
  21. <view class="list_li_t_l">
  22. <img v-if="item.checkRange==1" src="@/pages_safetyExamine/images/icon_xyxc_qx.png"/>
  23. <img v-if="item.checkRange==2" src="@/pages_safetyExamine/images/icon_xyxc_xy.png"/>
  24. <img v-if="item.checkRange==3" src="@/pages_safetyExamine/images/icon_xyxc_sys.png"/>
  25. <text></text>
  26. </view>
  27. <view class="list_li_t_c">{{item.title}}</view>
  28. <view class="list_li_t_c2" v-if="item.isOverdue==1">已逾期</view>
  29. <view class="list_li_t_r"></view>
  30. </view>
  31. <view class="list_li_m">
  32. <view class="list_li_m_t">计划周期:{{item.cycleStartTime}}至{{item.cycleEndTime}}</view>
  33. <view class="list_li_m_b">
  34. <text class="blue_color" v-if="item.checkStatus==1">未开始</text>
  35. <text class="red_color" v-if="item.checkStatus==2">进行中</text>
  36. <text class="green_color" v-if="item.checkStatus==3">已结束</text>
  37. <text>{{item.checkType==1?'校院巡查':'实验室自查'}}-专项检查</text>
  38. </view>
  39. </view>
  40. <view class="list_li_b">
  41. <img src="@/pages_safetyExamine/images/icon_djcsys.png"/>
  42. <text v-if="item.checkStatus==1">待检查实验室:</text>
  43. <text v-if="item.checkStatus==1">{{item.subjectNum}}间</text>
  44. <text v-if="item.checkStatus==2 || item.checkStatus==3">检查进度:</text>
  45. <text v-if="item.checkStatus==2 || item.checkStatus==3">{{item.checkSchedule}}间</text>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <img class="null-img" v-if="!dataList[0]" src="@/images/basicsModules/null-data-1.png">
  51. </scroll-view>
  52. <view class="bottom_btn" @click="handleClick('','subBtn')">{{subBtnTitle}}</view>
  53. </view>
  54. </template>
  55. <script>
  56. import { config } from '@/api/request/config.js'
  57. import {checkPlanList} from '@/api/apiDemo/index.js'
  58. export default {
  59. name: "rectifyList",
  60. components: {
  61. },
  62. data() {
  63. return {
  64. pageType:0,
  65. //列表请求参数
  66. getData:{
  67. pageNum:1,
  68. pageSize:20,
  69. searchValue:'',
  70. checkType:'',
  71. },
  72. total:0,
  73. tabText:['全部','未开始','进行中','已结束'],
  74. curTab:0,
  75. dataList:[],
  76. subBtnTitle:'发起巡查计划',
  77. }
  78. },
  79. onLoad(option) {
  80. console.log(option.pageType)
  81. if(option.pageType==1){
  82. this.getData.checkType=option.pageType
  83. uni.setNavigationBarTitle({
  84. title:'校院巡查计划'
  85. })
  86. this.subBtnTitle='发起巡查计划';
  87. }else if(option.pageType==2){
  88. this.getData.checkType=option.pageType
  89. uni.setNavigationBarTitle({
  90. title:'实验室自查计划'
  91. })
  92. this.subBtnTitle='发起自查计划';
  93. }
  94. },
  95. onShow() {
  96. this.dataList=[];
  97. this.getList();
  98. },
  99. mounted(){
  100. },
  101. methods: {
  102. //实验室搜索
  103. searchBtn(){
  104. this.dataList=[];
  105. this.getList();
  106. },
  107. //清除按钮
  108. clearBtn(){
  109. this.getData.pageNum=1;
  110. this.getData.searchValue= '';
  111. this.dataList=[];
  112. this.getList();
  113. },
  114. //滚动事件
  115. scrollGet(){
  116. let self=this;
  117. if(self.total/self.getData.pageSize<=self.getData.pageNum){
  118. console.log('没有更多数据!')
  119. }else{
  120. setTimeout(function(){
  121. self.getData.pageNum += 1;
  122. self.getList();
  123. },1000)
  124. }
  125. },
  126. //顶部tab点击
  127. tabClick(index) {
  128. this.curTab = index;
  129. this.getData.pageNum=1;
  130. this.dataList=[];
  131. this.getData.checkStatus=index;
  132. this.getList()
  133. },
  134. handleClick(row,doType){
  135. let self=this;
  136. if( doType=='subBtn'){//发起巡查计划
  137. uni.navigateTo({
  138. url: '/pages_safetyExamine/patrolPlan/patrolPlanAdd?pageType='+this.getData.checkType
  139. });
  140. }else if(doType=='edit'){//编辑
  141. uni.navigateTo({
  142. url: '/pages_safetyExamine/patrolPlan/patrolPlanEdit?pageType='+row.checkType+'&id='+row.id
  143. });
  144. }
  145. },
  146. async getList(){
  147. let self = this;
  148. const {data} = await checkPlanList(this.getData);
  149. if(data.code==200){
  150. this.dataList=[...this.dataList,...data.data.records]
  151. this.total=data.data.total;
  152. }
  153. }
  154. }
  155. }
  156. </script>
  157. <style lang="stylus" scoped>
  158. .examine{
  159. height:100%;
  160. display flex;
  161. .null-img{
  162. display block
  163. width:276rpx;
  164. height:321rpx;
  165. margin:100rpx 0 0 274rpx;
  166. }
  167. .info-max-box{
  168. flex: 1;
  169. overflow: scroll;
  170. padding-bottom: 128rpx;
  171. padding-top: 100rpx;
  172. }
  173. .blue_color{
  174. color: #0183FA;
  175. border: 1rpx solid #0183FA;
  176. }
  177. .red_color{
  178. color: #FF4545;
  179. border: 1rpx solid #FF4545;
  180. }
  181. .green_color{
  182. color: #1FA50D;
  183. border: 1rpx solid #1FA50D;
  184. }
  185. /* 切换按钮 */
  186. .tabTitle{
  187. width:100%;
  188. height: 100rpx;
  189. background: #fff;
  190. display flex;
  191. justify-content: flex-start;
  192. align-items: center;
  193. position: fixed;
  194. top: 0;
  195. z-index: 100;
  196. .tabTitle_li{
  197. position: relative;
  198. width:146rpx;
  199. text-align center;
  200. .tabTitle_text{
  201. display: inline-block;
  202. font-size: 30rpx;
  203. font-family: PingFang SC;
  204. font-weight: 500;
  205. color: #333333;
  206. line-height: 46rpx;
  207. position: relative;
  208. &.on{
  209. color:#0183FA;
  210. }
  211. }
  212. .tabTitle_across{
  213. width: 50rpx;
  214. height: 4rpx;
  215. background: #0183FA;
  216. border-radius: 2rpx;
  217. margin-left: 46rpx;
  218. display none;
  219. &.on{
  220. display block;
  221. }
  222. }
  223. }
  224. }
  225. .search{
  226. width: 750rpx;
  227. height: 100rpx;
  228. background: #FFFFFF;
  229. padding: 20rpx 30rpx;
  230. box-sizing: border-box;
  231. position: relative;
  232. margin-top: 20rpx;
  233. >input{
  234. position: absolute;
  235. top: 20rpx;
  236. left: 30rpx;
  237. width: 690rpx;
  238. height: 60rpx;
  239. border-radius: 50rpx;
  240. opacity: 1;
  241. border: 1rpx solid #E0E0E0;
  242. padding:0 74rpx 0 30rpx;
  243. box-sizing: border-box;
  244. }
  245. .search_btn{
  246. width: 70rpx;
  247. height: 60rpx;
  248. position: absolute;
  249. top: 20rpx;
  250. right: 30rpx;
  251. z-index: 200;
  252. >img{
  253. width: 20rpx;
  254. height: 20rpx;
  255. position: absolute;
  256. top: 20rpx;
  257. left: 24rpx;
  258. }
  259. }
  260. }
  261. .list{
  262. padding: 0 30rpx;
  263. box-sizing: border-box;
  264. margin-top: 20rpx;
  265. .list_li{
  266. position: relative;
  267. width: 690rpx;
  268. height: 360rpx;
  269. background: #fff;
  270. border-radius: 10rpx;
  271. overflow: hidden;
  272. margin-bottom: 20rpx;
  273. .list_li_t{
  274. width: 100%;
  275. position: absolute;
  276. left: 0;
  277. top: 0;
  278. .list_li_t_l{
  279. >img{
  280. width: 70rpx;
  281. height: 70rpx;
  282. }
  283. >text{
  284. position: absolute;
  285. left: -15rpx;
  286. top: 76rpx;
  287. display: inline-block;
  288. width: 30rpx;
  289. height: 30rpx;
  290. background: #F5F5F5;
  291. border-radius: 15rpx;
  292. }
  293. }
  294. .list_li_t_c{
  295. width: 570rpx;
  296. height: 110rpx;
  297. position: absolute;
  298. left: 30rpx;
  299. top: 0;
  300. font-size: 30rpx;
  301. font-family: PingFang SC-Medium, PingFang SC;
  302. font-weight: 400;
  303. color: #333333;
  304. line-height: 110rpx;
  305. border-bottom: 1rpx dashed #D8D8D8;
  306. overflow: hidden;
  307. text-overflow:ellipsis;
  308. white-space: nowrap;
  309. padding-right: 60rpx;
  310. box-sizing: border-box;
  311. }
  312. .list_li_t_c2{
  313. position: absolute;
  314. right: 20rpx;
  315. top: 38rpx;
  316. width: 120rpx;
  317. height: 40rpx;
  318. font-size: 28rpx;
  319. font-family: PingFang SC-Medium, PingFang SC;
  320. font-weight: 400;
  321. color: #FF5757;
  322. line-height: 40rpx;
  323. border: 1rpx solid #FF5757;
  324. border-radius: 6rpx;
  325. text-align: center;
  326. }
  327. .list_li_t_r{
  328. position: absolute;
  329. right:-15rpx;
  330. top: 76rpx;
  331. width: 30rpx;
  332. height: 30rpx;
  333. background:#F5F5F5;
  334. border-radius: 15rpx;
  335. }
  336. }
  337. .list_li_m{
  338. position: absolute;
  339. top: 110rpx;
  340. left: 0;
  341. width: 690rpx;
  342. height: 168rpx;
  343. border-bottom: 1rpx solid #E0E0E0;
  344. padding-left: 30rpx;
  345. box-sizing: border-box;
  346. .list_li_m_t{
  347. font-size: 28rpx;
  348. font-family: PingFang SC-Medium, PingFang SC;
  349. font-weight: 400;
  350. color: #666666;
  351. line-height: 40rpx;
  352. margin-top:22rpx;
  353. }
  354. .list_li_m_b{
  355. margin-top:26rpx;
  356. >text:nth-of-type(1){
  357. font-size: 26rpx;
  358. font-family: PingFang SC-Medium, PingFang SC;
  359. font-weight: 400;
  360. line-height: 40rpx;
  361. border-radius: 6rpx;
  362. padding: 0 20rpx;
  363. margin-right: 14rpx;
  364. }
  365. >text:nth-of-type(2){
  366. font-size: 26rpx;
  367. font-family: PingFang SC-Medium, PingFang SC;
  368. font-weight: 400;
  369. color: #0183FA;
  370. line-height: 40rpx;
  371. padding: 0 8rpx;
  372. border-radius: 6rpx;
  373. background: rgba(1,131,250,0.1);
  374. }
  375. }
  376. }
  377. .list_li_b{
  378. height: 80rpx;
  379. position: absolute;
  380. top: 278rpx;
  381. left: 0;
  382. display: flex;
  383. justify-content: flex-start;
  384. align-items: center;
  385. >img{
  386. width: 24rpx;
  387. height: 30rpx;
  388. margin-right: 26rpx;
  389. margin-left: 30rpx;
  390. }
  391. >text:nth-of-type(1){
  392. font-size: 28rpx;
  393. font-family: PingFang SC-Medium, PingFang SC;
  394. font-weight: 400;
  395. color: #333333;
  396. line-height: 28rpx;
  397. }
  398. >text:nth-of-type(2){
  399. font-size: 28rpx;
  400. font-family: PingFang SC-Medium, PingFang SC;
  401. font-weight: 400;
  402. color: #0183FA;
  403. line-height: 28rpx;
  404. }
  405. }
  406. }
  407. }
  408. .bottom_btn{
  409. position: fixed;
  410. bottom: 26rpx;
  411. left: 30rpx;
  412. font-size: 30rpx;
  413. font-family: PingFang SC-Medium, PingFang SC;
  414. font-weight: 400;
  415. color: #FFFFFF;
  416. line-height: 90rpx;
  417. width: 690rpx;
  418. height: 90rpx;
  419. background: #0183FA;
  420. border-radius: 20rpx;
  421. text-align: center;
  422. }
  423. }
  424. </style>