safetyCheck.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. <!-- 计划详情 -->
  2. <template>
  3. <view class="planDetail">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="header">
  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
  11. :id="curTab==index && curTab==0?'fontColor-A':(curTab==index && curTab==1?'fontColor-B':'')">
  12. {{item.name}}
  13. </view>
  14. <view>{{item.title}}</view>
  15. </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. <view class="list">
  23. <view class="list-li" @click="planClick(item)" v-for="(item,index) in dataList">
  24. <view :id="item.status==0?'bgColor-A':'bgColor-B'">{{item.status==0?'全部检查':'专项检查'}}</view>
  25. <view>{{item.title}}</view>
  26. <img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
  27. </view>
  28. </view>
  29. </scroll-view>
  30. <view class="shade" v-if="dialogVisible">
  31. <view class="null-box" @click="dialogClose()"></view>
  32. <view class="shade_n">
  33. <view class="title">
  34. <view>检查批次</view>
  35. <img src="@/pages_safetyCheck/images/icon_06.png">
  36. </view>
  37. <view class="batch">
  38. <view class="batch-li" @click="batchClick(item)" v-for="(item,index) in batchList">
  39. <view class="batch-li-l">
  40. <text>{{item.title}}</text>
  41. <text>开始检查日期:{{item.time}}</text>
  42. </view>
  43. <view class="batch-li-r">检查进度{{item.schedule}}
  44. <img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import {
  54. config
  55. } from '@/api/request/config.js'
  56. import {} from '@/pages/api/index.js'
  57. export default {
  58. name: "planDetail",
  59. components: {
  60. },
  61. data() {
  62. return {
  63. baseUrl: config.base_url,
  64. pageType: 0,
  65. tabText: [{
  66. name: '校级检查',
  67. title: '学校检查计划',
  68. img: require('@/pages_safetyCheck/images/img_aqjc_xjjc@1x.png'),
  69. },
  70. {
  71. name: '学院自查',
  72. title: '学院自查计划',
  73. img: require('@/pages_safetyCheck/images/img_aqjc_xyzc@1x.png'),
  74. },
  75. {
  76. name: '随手拍',
  77. title: '隐患上报整改',
  78. img: require('@/pages_safetyCheck/images/img_aqjc_ssp@1x.png'),
  79. },
  80. ],
  81. curTab: 0,
  82. dataList: [{
  83. status: 0,
  84. title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
  85. },
  86. {
  87. status: 1,
  88. title: '计划标题计划标题计划标题计划标题',
  89. }
  90. ],
  91. dialogVisible: false,
  92. batchList:[
  93. {
  94. title:'第3次检查',
  95. time:'2024-04-01',
  96. schedule:'0%',
  97. },
  98. {
  99. title:'第3次检查',
  100. time:'2024-04-01',
  101. schedule:'0%',
  102. },
  103. {
  104. title:'第3次检查',
  105. time:'2024-04-01',
  106. schedule:'0%',
  107. },
  108. {
  109. title:'第3次检查',
  110. time:'2024-04-01',
  111. schedule:'0%',
  112. },
  113. {
  114. title:'第3次检查',
  115. time:'2024-04-01',
  116. schedule:'0%',
  117. },
  118. ],
  119. }
  120. },
  121. onLoad(option) {
  122. },
  123. onShow() {
  124. },
  125. mounted() {
  126. },
  127. methods: {
  128. //滚动事件
  129. scrollGet() {},
  130. //顶部tab点击
  131. tabClick(index) {
  132. this.curTab = index;
  133. if(index==0){
  134. //校级检查
  135. }else if(index==1){
  136. //学院自查
  137. }else if(index==2){
  138. //随手拍
  139. uni.navigateTo({
  140. url: "/pages_safetyCheck/views/safetyCheck",
  141. });
  142. }
  143. },
  144. //检查批次点击
  145. batchClick(row){
  146. let infoData=row;
  147. infoData.pageType=this.curTab;
  148. uni.navigateTo({
  149. url: '/pages_safetyCheck/views/inspectManage/inspectList?infoData=' + encodeURIComponent(JSON.stringify(infoData))
  150. });
  151. },
  152. planClick(row){
  153. //如果只有1个检查批次不弹窗
  154. this.dialogVisible = true;
  155. },
  156. dialogClose() {
  157. this.dialogVisible = false;
  158. },
  159. }
  160. }
  161. </script>
  162. <style lang="stylus" scoped>
  163. .planDetail {
  164. height: 100%;
  165. display flex;
  166. box-sizing: border-box;
  167. #fontColor-A {
  168. color: #00AEDE;
  169. }
  170. #fontColor-B {
  171. color: #009519;
  172. }
  173. #bgColor-A {
  174. color: #0183FA;
  175. background: rgba(1, 131, 250, 0.2);
  176. }
  177. #bgColor-B {
  178. color: #16B531;
  179. background: rgba(22, 181, 49, 0.2);
  180. }
  181. .header {
  182. width: 100%;
  183. position: fixed;
  184. top: 0rpx;
  185. z-index: 100;
  186. background: #fff;
  187. .tabTitle {
  188. width: 750rpx;
  189. height: 225rpx;
  190. display flex;
  191. justify-content: flex-start;
  192. align-items: center;
  193. border-bottom: 4rpx solid #F5F5F5;
  194. .tabTitle_li {
  195. height: 225rpx;
  196. flex: 1;
  197. position: relative;
  198. text-align center;
  199. border-right: 2rpx solid #F5F5F5;
  200. .tabTitle_text {
  201. display: flex;
  202. justify-content: center;
  203. flex-direction: column;
  204. align-items: center;
  205. >img {
  206. width: 80rpx;
  207. height: 80rpx;
  208. margin-top: 20rpx;
  209. }
  210. >view:nth-of-type(1) {
  211. font-size: 30rpx;
  212. color: #333333;
  213. line-height: 42rpx;
  214. text-align: left;
  215. margin-top: 10rpx;
  216. }
  217. >view:nth-of-type(2) {
  218. font-size: 24rpx;
  219. color: #666666;
  220. line-height: 34rpx;
  221. text-align: left;
  222. }
  223. position: relative;
  224. &.on {}
  225. }
  226. .tabTitle_across {
  227. /* width: 50rpx;
  228. height: 4rpx;
  229. background: #0183FA;
  230. border-radius: 2rpx; */
  231. margin-left: 38%;
  232. margin-top: 12rpx;
  233. display none;
  234. >img {
  235. width: 40rpx;
  236. height: 26rpx;
  237. }
  238. &.on {
  239. display block;
  240. }
  241. }
  242. }
  243. }
  244. }
  245. .list {
  246. background: #fff;
  247. margin-top: 225rpx;
  248. .list-li {
  249. border-bottom: 1rpx dashed #E0E0E0;
  250. height: 80rpx;
  251. display: flex;
  252. justify-content: flex-start;
  253. align-items: center;
  254. padding: 0 30rpx;
  255. box-sizing: border-box;
  256. >view:nth-of-type(1) {
  257. width: 120rpx;
  258. height: 40rpx;
  259. background: rgba(1, 131, 250, 0.2);
  260. border-radius: 10rpx 10rpx 10rpx 10rpx;
  261. font-size: 24rpx;
  262. color: #0183FA;
  263. line-height: 40rpx;
  264. text-align: center;
  265. }
  266. >view:nth-of-type(2) {
  267. flex: 1;
  268. font-size: 28rpx;
  269. color: #333333;
  270. line-height: 39rpx;
  271. text-align: left;
  272. margin: 0 52rpx 0 20rpx;
  273. overflow: hidden;
  274. text-overflow: ellipsis;
  275. white-space: nowrap;
  276. }
  277. >img {
  278. width: 24rpx;
  279. height: 24rpx;
  280. }
  281. }
  282. }
  283. .shade {
  284. height: 100%;
  285. width: 100%;
  286. position: fixed;
  287. display: flex;
  288. flex-direction: column;
  289. z-index: 200;
  290. background: rgba(0, 0, 0, 0.2);
  291. .null-box {
  292. flex: 1;
  293. }
  294. .shade_n {
  295. position: absolute;
  296. bottom: 0;
  297. left: 0;
  298. width: 750rpx;
  299. height: 466rpx;
  300. background: #FFFFFF;
  301. border-radius: 20rpx 20rpx 0rpx 0rpx;
  302. overflow-y: auto;
  303. .title {
  304. display: flex;
  305. justify-content: space-between;
  306. align-items: center;
  307. padding: 0 50rpx 0 284rpx;
  308. box-sizing: border-box;
  309. border-bottom: 1rpx solid #E0E0E0;
  310. >view {
  311. font-size: 30rpx;
  312. color: #3D3D3D;
  313. line-height: 90rpx;
  314. text-align: left;
  315. }
  316. >img {
  317. width: 24rpx;
  318. height: 12rpx;
  319. }
  320. }
  321. .batch{
  322. padding: 0 30rpx;
  323. box-sizing: border-box;
  324. .batch-li{
  325. display: flex;
  326. justify-content: space-between;
  327. align-items: center;
  328. border-bottom: 1rpx solid #E0E0E0;
  329. padding: 20rpx 0 16rpx 0rpx;
  330. box-sizing: border-box;
  331. .batch-li-l{
  332. >text:nth-of-type(1){
  333. display: block;
  334. font-size: 30rpx;
  335. color: #333333;
  336. line-height: 42rpx;
  337. text-align: left;
  338. }
  339. >text:nth-of-type(2){
  340. display: block;
  341. font-size: 28rpx;
  342. color: #666666;
  343. line-height: 39rpx;
  344. text-align: left;
  345. margin-top: 6rpx;
  346. }
  347. }
  348. .batch-li-r{
  349. font-size: 28rpx;
  350. color: #666666;
  351. line-height: 39rpx;
  352. text-align: left;
  353. display: flex;
  354. justify-content: flex-start;
  355. align-items: center;
  356. >img{
  357. width: 24rpx;
  358. height: 24rpx;
  359. margin-left: 9rpx;
  360. }
  361. }
  362. }
  363. }
  364. }
  365. }
  366. }
  367. </style>