patrolPlanList.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  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. <view class="search_btn" @click="searchBtn">
  14. <img src="@/pages_safetyExamine/images/icon_aqjc_ss.png"/>
  15. </view>
  16. <input type="text" v-model="getData.searchValue" placeholder="计划标题" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
  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/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/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.getList();
  97. },
  98. mounted(){
  99. },
  100. methods: {
  101. //滚动事件
  102. scrollGet(){
  103. let self=this;
  104. if(self.total/self.getData.pageSize<=self.getData.pageNum){
  105. console.log('没有更多数据!')
  106. }else{
  107. setTimeout(function(){
  108. self.getData.pageNum += 1;
  109. self.getList();
  110. },1000)
  111. }
  112. },
  113. //实验室搜索
  114. searchBtn(){
  115. console.log(1)
  116. this.dataList=[];
  117. this.getList();
  118. },
  119. //顶部tab点击
  120. tabClick(index) {
  121. this.curTab = index;
  122. this.getData.pageNum=1;
  123. this.dataList=[];
  124. this.getData.checkStatus=index;
  125. this.getList()
  126. },
  127. handleClick(row,doType){
  128. let self=this;
  129. if( doType=='subBtn'){//发起巡查计划
  130. uni.redirectTo({
  131. url: '/pages_safetyExamine/patrolPlan/patrolPlanAdd?pageType='+this.getData.checkType
  132. });
  133. }else if(doType=='edit'){//编辑
  134. uni.redirectTo({
  135. url: '/pages_safetyExamine/patrolPlan/patrolPlanEdit?pageType='+row.checkType+'&id='+row.id
  136. });
  137. }
  138. },
  139. async getList(){
  140. let self = this;
  141. const {data} = await checkPlanList(this.getData);
  142. if(data.code==200){
  143. this.dataList=[...this.dataList,...data.data.records]
  144. this.total=data.data.total;
  145. }
  146. }
  147. }
  148. }
  149. </script>
  150. <style lang="stylus" scoped>
  151. .examine{
  152. height:100%;
  153. display flex;
  154. .null-img{
  155. display block
  156. width:276rpx;
  157. height:321rpx;
  158. margin:100rpx 0 0 274rpx;
  159. }
  160. .info-max-box{
  161. flex: 1;
  162. overflow: scroll;
  163. padding-bottom: 128rpx;
  164. padding-top: 100rpx;
  165. }
  166. .blue_color{
  167. color: #0183FA;
  168. border: 1rpx solid #0183FA;
  169. }
  170. .red_color{
  171. color: #FF4545;
  172. border: 1rpx solid #FF4545;
  173. }
  174. .green_color{
  175. color: #1FA50D;
  176. border: 1rpx solid #1FA50D;
  177. }
  178. /* 切换按钮 */
  179. .tabTitle{
  180. width:100%;
  181. height: 100rpx;
  182. background: #fff;
  183. display flex;
  184. justify-content: flex-start;
  185. align-items: center;
  186. position: fixed;
  187. top: 0;
  188. z-index: 100;
  189. .tabTitle_li{
  190. position: relative;
  191. width:146rpx;
  192. text-align center;
  193. .tabTitle_text{
  194. display: inline-block;
  195. font-size: 30rpx;
  196. font-family: PingFang SC;
  197. font-weight: 500;
  198. color: #333333;
  199. line-height: 46rpx;
  200. position: relative;
  201. &.on{
  202. color:#0183FA;
  203. }
  204. }
  205. .tabTitle_across{
  206. width: 50rpx;
  207. height: 4rpx;
  208. background: #0183FA;
  209. border-radius: 2rpx;
  210. margin-left: 46rpx;
  211. display none;
  212. &.on{
  213. display block;
  214. }
  215. }
  216. }
  217. }
  218. .search{
  219. width: 750rpx;
  220. height: 100rpx;
  221. background: #FFFFFF;
  222. padding: 20rpx 30rpx;
  223. box-sizing: border-box;
  224. position: relative;
  225. margin-top: 20rpx;
  226. .search_btn{
  227. width: 70rpx;
  228. height: 60rpx;
  229. position: absolute;
  230. top: 20rpx;
  231. left: 30rpx;
  232. z-index: 200;
  233. >img{
  234. width: 20rpx;
  235. height: 20rpx;
  236. position: absolute;
  237. top: 20rpx;
  238. left: 24rpx;
  239. }
  240. }
  241. >input{
  242. position: absolute;
  243. top: 20rpx;
  244. left: 30rpx;
  245. width: 690rpx;
  246. height: 60rpx;
  247. border-radius: 50rpx;
  248. opacity: 1;
  249. border: 1rpx solid #E0E0E0;
  250. padding-left: 74rpx;
  251. box-sizing: border-box;
  252. }
  253. }
  254. .list{
  255. padding: 0 30rpx;
  256. box-sizing: border-box;
  257. margin-top: 20rpx;
  258. .list_li{
  259. position: relative;
  260. width: 690rpx;
  261. height: 360rpx;
  262. background: #fff;
  263. border-radius: 10rpx;
  264. overflow: hidden;
  265. margin-bottom: 20rpx;
  266. .list_li_t{
  267. width: 100%;
  268. position: absolute;
  269. left: 0;
  270. top: 0;
  271. .list_li_t_l{
  272. >img{
  273. width: 70rpx;
  274. height: 70rpx;
  275. }
  276. >text{
  277. position: absolute;
  278. left: -15rpx;
  279. top: 76rpx;
  280. display: inline-block;
  281. width: 30rpx;
  282. height: 30rpx;
  283. background: #F5F5F5;
  284. border-radius: 15rpx;
  285. }
  286. }
  287. .list_li_t_c{
  288. width: 570rpx;
  289. height: 110rpx;
  290. position: absolute;
  291. left: 30rpx;
  292. top: 0;
  293. font-size: 30rpx;
  294. font-family: PingFang SC-Medium, PingFang SC;
  295. font-weight: 400;
  296. color: #333333;
  297. line-height: 110rpx;
  298. border-bottom: 1rpx dashed #D8D8D8;
  299. overflow: hidden;
  300. text-overflow:ellipsis;
  301. white-space: nowrap;
  302. padding-right: 60rpx;
  303. box-sizing: border-box;
  304. }
  305. .list_li_t_c2{
  306. position: absolute;
  307. right: 20rpx;
  308. top: 38rpx;
  309. width: 120rpx;
  310. height: 40rpx;
  311. font-size: 28rpx;
  312. font-family: PingFang SC-Medium, PingFang SC;
  313. font-weight: 400;
  314. color: #FF5757;
  315. line-height: 40rpx;
  316. border: 1rpx solid #FF5757;
  317. border-radius: 6rpx;
  318. text-align: center;
  319. }
  320. .list_li_t_r{
  321. position: absolute;
  322. right:-15rpx;
  323. top: 76rpx;
  324. width: 30rpx;
  325. height: 30rpx;
  326. background:#F5F5F5;
  327. border-radius: 15rpx;
  328. }
  329. }
  330. .list_li_m{
  331. position: absolute;
  332. top: 110rpx;
  333. left: 0;
  334. width: 690rpx;
  335. height: 168rpx;
  336. border-bottom: 1rpx solid #E0E0E0;
  337. padding-left: 30rpx;
  338. box-sizing: border-box;
  339. .list_li_m_t{
  340. font-size: 28rpx;
  341. font-family: PingFang SC-Medium, PingFang SC;
  342. font-weight: 400;
  343. color: #666666;
  344. line-height: 40rpx;
  345. margin-top:22rpx;
  346. }
  347. .list_li_m_b{
  348. margin-top:26rpx;
  349. >text:nth-of-type(1){
  350. font-size: 26rpx;
  351. font-family: PingFang SC-Medium, PingFang SC;
  352. font-weight: 400;
  353. line-height: 40rpx;
  354. border-radius: 6rpx;
  355. padding: 0 20rpx;
  356. margin-right: 14rpx;
  357. }
  358. >text:nth-of-type(2){
  359. font-size: 26rpx;
  360. font-family: PingFang SC-Medium, PingFang SC;
  361. font-weight: 400;
  362. color: #0183FA;
  363. line-height: 40rpx;
  364. padding: 0 8rpx;
  365. border-radius: 6rpx;
  366. background: rgba(1,131,250,0.1);
  367. }
  368. }
  369. }
  370. .list_li_b{
  371. height: 80rpx;
  372. position: absolute;
  373. top: 278rpx;
  374. left: 0;
  375. display: flex;
  376. justify-content: flex-start;
  377. align-items: center;
  378. >img{
  379. width: 24rpx;
  380. height: 30rpx;
  381. margin-right: 26rpx;
  382. margin-left: 30rpx;
  383. }
  384. >text:nth-of-type(1){
  385. font-size: 28rpx;
  386. font-family: PingFang SC-Medium, PingFang SC;
  387. font-weight: 400;
  388. color: #333333;
  389. line-height: 28rpx;
  390. }
  391. >text:nth-of-type(2){
  392. font-size: 28rpx;
  393. font-family: PingFang SC-Medium, PingFang SC;
  394. font-weight: 400;
  395. color: #0183FA;
  396. line-height: 28rpx;
  397. }
  398. }
  399. }
  400. }
  401. .bottom_btn{
  402. position: fixed;
  403. bottom: 26rpx;
  404. left: 30rpx;
  405. font-size: 30rpx;
  406. font-family: PingFang SC-Medium, PingFang SC;
  407. font-weight: 400;
  408. color: #FFFFFF;
  409. line-height: 90rpx;
  410. width: 690rpx;
  411. height: 90rpx;
  412. background: #0183FA;
  413. border-radius: 20rpx;
  414. text-align: center;
  415. }
  416. }
  417. </style>