patrolPlanList.vue 9.7 KB

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