patrolPlanList.vue 9.5 KB

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