patrolPlanList.vue 9.1 KB

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