patrolPlanList.vue 9.1 KB

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