safetyCheck.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. <!-- 计划详情 -->
  2. <template>
  3. <view class="planDetail">
  4. <view class="header">
  5. <img class="header-bg" src="@/pages_safetyCheck/images/img_banner@1x.png">
  6. <view class="tabTitle">
  7. <view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
  8. <view class="tabTitle_text">
  9. <img :src="item.img">
  10. <view :id="curTab==index && curTab==0?'fontColor-A':(curTab==index && curTab==1?'fontColor-B':'')">
  11. {{item.name}}
  12. </view>
  13. <view>{{item.title}}</view>
  14. </view>
  15. <view class="line"></view>
  16. <view :class="{on:curTab==index}" class="tabTitle_across">
  17. <img src="@/pages_safetyCheck/images/img_xyzc_bg@1x.png">
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <scroll-view scroll-y @scrolltolower="scrollGet" class="for-max-box">
  23. <view class="list">
  24. <view class="list-li" @click="planClick(item)" v-for="(item,index) in dataList">
  25. <view :id="item.status==0?'bgColor-A':'bgColor-B'">{{item.status==0?'全部检查':'专项检查'}}</view>
  26. <view>{{item.title}}</view>
  27. <img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
  28. </view>
  29. </view>
  30. <view class="get-data-p" v-if="!getDataType">
  31. <img class="get-data-img" src="@/pages_safetyCheck/images/icon_aqjc_sl.png">
  32. <view class="get-data-text">上拉加载</view>
  33. </view>
  34. <view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
  35. </scroll-view>
  36. <view class="shade" v-if="dialogVisible">
  37. <view class="null-box" @click="dialogClose()"></view>
  38. <view class="shade_n">
  39. <view class="title">
  40. <view>检查批次</view>
  41. <img src="@/pages_safetyCheck/images/icon_06.png">
  42. </view>
  43. <view class="batch">
  44. <view class="batch-li" @click="batchClick(item)" v-for="(item,index) in batchList">
  45. <view class="batch-li-l">
  46. <text>{{item.title}}</text>
  47. <text>开始检查日期:{{item.time}}</text>
  48. </view>
  49. <view class="batch-li-r">检查进度{{item.schedule}}
  50. <img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. import {
  60. config
  61. } from '@/api/request/config.js'
  62. import {} from '@/pages/api/index.js'
  63. export default {
  64. name: "planDetail",
  65. components: {
  66. },
  67. data() {
  68. return {
  69. baseUrl: config.base_url,
  70. pageType: 0,
  71. tabText: [{
  72. name: '校级检查',
  73. title: '学校检查计划',
  74. img: require('@/pages_safetyCheck/images/icon_aqjc_xjjc@1x.png'),
  75. },
  76. {
  77. name: '学院自查',
  78. title: '学院自查计划',
  79. img: require('@/pages_safetyCheck/images/icon_aqjc_xxzc@1x.png'),
  80. },
  81. // {
  82. // name: '现场检查',
  83. // title: '检查隐患草稿',
  84. // img: require('@/pages_safetyCheck/images/icon_aqjc_xcjc@1x.png'),
  85. // },
  86. {
  87. name: '随手拍',
  88. title: '隐患上报整改',
  89. img: require('@/pages_safetyCheck/images/icon_aqjc_ssp@1x.png'),
  90. },
  91. ],
  92. curTab: 0,
  93. queryParams:{
  94. page:1,
  95. pageSize:20,
  96. },
  97. total:0,
  98. dataList: [
  99. {
  100. status: 0,
  101. title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
  102. },
  103. {
  104. status: 1,
  105. title: '计划标题计划标题计划标题计划标题',
  106. },
  107. {
  108. status: 0,
  109. title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
  110. },
  111. {
  112. status: 1,
  113. title: '计划标题计划标题计划标题计划标题',
  114. },
  115. {
  116. status: 0,
  117. title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
  118. },
  119. {
  120. status: 1,
  121. title: '计划标题计划标题计划标题计划标题',
  122. },
  123. {
  124. status: 0,
  125. title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
  126. },
  127. {
  128. status: 1,
  129. title: '计划标题计划标题计划标题计划标题',
  130. },
  131. {
  132. status: 0,
  133. title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
  134. },
  135. {
  136. status: 1,
  137. title: '计划标题计划标题计划标题计划标题',
  138. },
  139. {
  140. status: 0,
  141. title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
  142. },
  143. {
  144. status: 1,
  145. title: '计划标题计划标题计划标题计划标题',
  146. },
  147. ],
  148. getDataType: false,
  149. dialogVisible: false,
  150. batchList: [{
  151. title: '第3次检查',
  152. time: '2024-04-01',
  153. schedule: '0%',
  154. },
  155. {
  156. title: '第3次检查',
  157. time: '2024-04-01',
  158. schedule: '0%',
  159. },
  160. {
  161. title: '第3次检查',
  162. time: '2024-04-01',
  163. schedule: '0%',
  164. },
  165. {
  166. title: '第3次检查',
  167. time: '2024-04-01',
  168. schedule: '0%',
  169. },
  170. {
  171. title: '第3次检查',
  172. time: '2024-04-01',
  173. schedule: '0%',
  174. },
  175. ],
  176. }
  177. },
  178. onLoad(option) {
  179. },
  180. onShow() {
  181. },
  182. mounted() {
  183. },
  184. methods: {
  185. //滚动加载事件
  186. scrollGet() {
  187. let self = this;
  188. if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
  189. this.$set(this, 'getDataType', true);
  190. } else {
  191. console.log('滚动加载触发')
  192. // this.queryParams.page += 1;
  193. // this.$nextTick(() => {
  194. // this.getList();
  195. // })
  196. }
  197. },
  198. //顶部tab点击
  199. tabClick(index) {
  200. if(this.curTab != index){
  201. if (index == 0) {
  202. //校级检查
  203. this.$set(this,'curTab',index);
  204. } else if (index == 1) {
  205. //学院自查
  206. this.$set(this,'curTab',index);
  207. }else if (index == 2) {
  208. //随手拍
  209. uni.navigateTo({
  210. url: "/pages_safetyCheck/views/snapshotManage/snapshotList",
  211. });
  212. }
  213. }
  214. },
  215. //检查批次点击
  216. batchClick(row) {
  217. let infoData = row;
  218. infoData.pageType = this.curTab;
  219. uni.navigateTo({
  220. url: '/pages_safetyCheck/views/inspectManage/inspectList?infoData=' + encodeURIComponent(JSON.stringify(
  221. infoData))
  222. });
  223. },
  224. planClick(row) {
  225. //如果只有1个检查批次不弹窗
  226. this.dialogVisible = true;
  227. },
  228. dialogClose() {
  229. this.dialogVisible = false;
  230. },
  231. }
  232. }
  233. </script>
  234. <style lang="stylus" scoped>
  235. .planDetail {
  236. height: 100%;
  237. display:flex;
  238. flex-direction: column;
  239. .header {
  240. width: 100%;
  241. height:235px;
  242. // position: fixed;
  243. // top: 0rpx;
  244. // z-index: 100;
  245. .header-bg {
  246. width: 750rpx;
  247. height: 336rpx;
  248. position: absolute;
  249. }
  250. .tabTitle {
  251. width: 690rpx;
  252. height: 250rpx;
  253. background: #FFFFFF;
  254. border-radius: 20rpx 20rpx 20rpx 20rpx;
  255. display flex;
  256. justify-content: flex-start;
  257. align-items: center;
  258. position: absolute;
  259. left: 30rpx;
  260. top: 208rpx;
  261. .tabTitle_li {
  262. height: 250rpx;
  263. flex: 1;
  264. position: relative;
  265. text-align center;
  266. .line {
  267. width: 2rpx;
  268. height: 30rpx;
  269. background: #D8D8D8;
  270. border-radius: 0rpx 0rpx 0rpx 0rpx;
  271. position: absolute;
  272. top: 40%;
  273. }
  274. .tabTitle_text {
  275. display: flex;
  276. justify-content: center;
  277. flex-direction: column;
  278. align-items: center;
  279. >img {
  280. width: 80rpx;
  281. height: 80rpx;
  282. margin-top: 48rpx;
  283. }
  284. >view:nth-of-type(1) {
  285. font-size: 28rpx;
  286. color: #333333;
  287. line-height: 40rpx;
  288. text-align: left;
  289. margin-top: 8rpx;
  290. }
  291. >view:nth-of-type(2) {
  292. font-size: 22rpx;
  293. color: #666666;
  294. line-height: 30rpx;
  295. text-align: left;
  296. margin-top: 6rpx;
  297. }
  298. position: relative;
  299. &.on {}
  300. }
  301. .tabTitle_across {
  302. /* width: 50rpx;
  303. height: 4rpx;
  304. background: #0183FA;
  305. border-radius: 2rpx; */
  306. margin-left: 38%;
  307. margin-top: 37rpx;
  308. display none;
  309. >img {
  310. width: 40rpx;
  311. height: 26rpx;
  312. }
  313. &.on {
  314. display block;
  315. }
  316. }
  317. }
  318. }
  319. }
  320. .for-max-box{
  321. flex: 1;
  322. overflow-y scroll;
  323. .list {
  324. width: 690rpx;
  325. margin-left: 30rpx;
  326. background: #FFFFFF;
  327. border-radius: 20rpx 20rpx 20rpx 20rpx;
  328. .list-li:nth-child(1){
  329. border-top:none;
  330. }
  331. .list-li {
  332. border-top: 1rpx dashed #E0E0E0;
  333. height: 80rpx;
  334. display: flex;
  335. justify-content: flex-start;
  336. align-items: center;
  337. padding: 0 30rpx;
  338. box-sizing: border-box;
  339. >view:nth-of-type(1) {
  340. width: 120rpx;
  341. height: 40rpx;
  342. background: rgba(1, 131, 250, 0.2);
  343. border-radius: 10rpx 10rpx 10rpx 10rpx;
  344. font-size: 24rpx;
  345. color: #0183FA;
  346. line-height: 40rpx;
  347. text-align: center;
  348. }
  349. >view:nth-of-type(2) {
  350. flex: 1;
  351. font-size: 28rpx;
  352. color: #333333;
  353. line-height: 39rpx;
  354. text-align: left;
  355. margin: 0 52rpx 0 20rpx;
  356. overflow: hidden;
  357. text-overflow: ellipsis;
  358. white-space: nowrap;
  359. }
  360. >img {
  361. width: 24rpx;
  362. height: 24rpx;
  363. }
  364. }
  365. }
  366. .get-data-p{
  367. height:100rpx;
  368. text-align: center;
  369. .get-data-img{
  370. width:30rpx;
  371. height:30rpx;
  372. margin:0 auto;
  373. margin-top:15rpx;
  374. }
  375. .get-data-text{
  376. text-align: center;
  377. }
  378. }
  379. .get-data-null-p{
  380. height:100rpx;
  381. line-height:100rpx;
  382. text-align: center;
  383. }
  384. }
  385. .shade {
  386. height: 100%;
  387. width: 100%;
  388. position: fixed;
  389. display: flex;
  390. flex-direction: column;
  391. z-index: 200;
  392. background: rgba(0, 0, 0, 0.2);
  393. .null-box {
  394. flex: 1;
  395. }
  396. .shade_n {
  397. position: absolute;
  398. bottom: 0;
  399. left: 0;
  400. width: 750rpx;
  401. height: 466rpx;
  402. background: #FFFFFF;
  403. border-radius: 20rpx 20rpx 0rpx 0rpx;
  404. overflow-y: auto;
  405. .title {
  406. display: flex;
  407. justify-content: space-between;
  408. align-items: center;
  409. padding: 0 50rpx 0 284rpx;
  410. box-sizing: border-box;
  411. border-bottom: 1rpx solid #E0E0E0;
  412. >view {
  413. font-size: 30rpx;
  414. color: #3D3D3D;
  415. line-height: 90rpx;
  416. text-align: left;
  417. }
  418. >img {
  419. width: 24rpx;
  420. height: 12rpx;
  421. }
  422. }
  423. .batch {
  424. padding: 0 30rpx;
  425. box-sizing: border-box;
  426. .batch-li {
  427. display: flex;
  428. justify-content: space-between;
  429. align-items: center;
  430. border-bottom: 1rpx solid #E0E0E0;
  431. padding: 20rpx 0 16rpx 0rpx;
  432. box-sizing: border-box;
  433. .batch-li-l {
  434. >text:nth-of-type(1) {
  435. display: block;
  436. font-size: 30rpx;
  437. color: #333333;
  438. line-height: 42rpx;
  439. text-align: left;
  440. }
  441. >text:nth-of-type(2) {
  442. display: block;
  443. font-size: 28rpx;
  444. color: #666666;
  445. line-height: 39rpx;
  446. text-align: left;
  447. margin-top: 6rpx;
  448. }
  449. }
  450. .batch-li-r {
  451. font-size: 28rpx;
  452. color: #666666;
  453. line-height: 39rpx;
  454. text-align: left;
  455. display: flex;
  456. justify-content: flex-start;
  457. align-items: center;
  458. >img {
  459. width: 24rpx;
  460. height: 24rpx;
  461. margin-left: 9rpx;
  462. }
  463. }
  464. }
  465. }
  466. }
  467. }
  468. #fontColor-A {
  469. color: #0040C1;
  470. }
  471. #fontColor-B {
  472. color: #009519;
  473. }
  474. #bgColor-A {
  475. color: #0183FA;
  476. background: rgba(1, 131, 250, 0.2);
  477. }
  478. #bgColor-B {
  479. color: #16B531;
  480. background: rgba(22, 181, 49, 0.2);
  481. }
  482. }
  483. </style>