混凝土运输管理微信小程序、替班
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

485 lines
13 KiB

2 weeks ago
  1. <template>
  2. <view>
  3. <navbar title="进度详情" leftClick @leftClick="$utils.navigateBack" />
  4. <!-- 步骤切换头部 -->
  5. <view class="head flex-sb">
  6. <view class="items">
  7. <view class="item-tab flex">
  8. <view @click="clickTabOne">施工前</view>
  9. <view @click="clickTabTwo">施工中</view>
  10. <view @click="clickTabThr">施工后</view>
  11. </view>
  12. <view class="item-active" :style="{ '--step': step + 'rpx' }"></view>
  13. </view>
  14. </view>
  15. <!-- 内容区域 -->
  16. <view class="content">
  17. <!-- 施工前 -->
  18. <view v-if="status === 1" class="cr mt40">
  19. <view class="re-card-p32">
  20. <view class="flex-sb">
  21. <view class="re-from-label">仪表盘照片</view>
  22. </view>
  23. <image v-if="froma.a" :src="froma.a" mode="widthFix" class="step-image" />
  24. <view v-else class="no-image">暂无图片</view>
  25. </view>
  26. <view class="re-card-p32">
  27. <view class="flex-sb">
  28. <view class="re-from-label">车身前后左右</view>
  29. </view>
  30. <image v-if="froma.b" :src="froma.b" mode="widthFix" class="step-image" />
  31. <image v-if="froma.c" :src="froma.c" mode="widthFix" class="step-image" />
  32. <image v-if="froma.d" :src="froma.d" mode="widthFix" class="step-image" />
  33. <image v-if="froma.e" :src="froma.e" mode="widthFix" class="step-image" />
  34. <view v-if="!froma.b && !froma.c && !froma.d && !froma.e" class="no-image">暂无图片</view>
  35. </view>
  36. <view class="re-card-p32">
  37. <view class="flex-sb">
  38. <view class="re-from-label">当前工作环境</view>
  39. </view>
  40. <image v-if="froma.f" :src="froma.f" mode="widthFix" class="step-image" />
  41. <view v-else class="no-image">暂无图片</view>
  42. </view>
  43. <view class="re-card-p32">
  44. <view class="flex-sb">
  45. <view class="re-from-label">水槽照片</view>
  46. </view>
  47. <image v-if="froma.g" :src="froma.g" mode="widthFix" class="step-image" />
  48. <view v-else class="no-image">暂无图片</view>
  49. </view>
  50. <view class="re-card-p32">
  51. <view class="flex-sb">
  52. <view class="re-from-label">现场视频</view>
  53. </view>
  54. <video v-if="froma.h" :src="froma.h" class="step-video" controls />
  55. <view v-else class="no-image">暂无视频</view>
  56. </view>
  57. <view class="re-card-p32">
  58. <view class="re-from-label">备注</view>
  59. <textarea
  60. class="re-card-textarea"
  61. placeholder=" 请在此处备注您的疑问或者特殊情况。"
  62. v-model="froma.remark"
  63. readonly
  64. />
  65. </view>
  66. </view>
  67. <!-- 施工中 -->
  68. <view v-if="status === 2" class="cr mt40">
  69. <view class="re-card-p32">
  70. <view class="flex-sb">
  71. <view class="re-from-label">当前工作环境</view>
  72. </view>
  73. <image v-if="fromb.a" :src="fromb.a" mode="widthFix" class="step-image" />
  74. <view v-else class="no-image">暂无图片</view>
  75. </view>
  76. <view class="re-card-p32">
  77. <view class="flex-sb">
  78. <view class="re-from-label">支腿照片</view>
  79. </view>
  80. <image v-if="fromb.b" :src="fromb.b" mode="widthFix" class="step-image" />
  81. <image v-if="fromb.c" :src="fromb.c" mode="widthFix" class="step-image" />
  82. <image v-if="fromb.d" :src="fromb.d" mode="widthFix" class="step-image" />
  83. <image v-if="fromb.e" :src="fromb.e" mode="widthFix" class="step-image" />
  84. <view v-if="!fromb.b && !fromb.c && !fromb.d && !fromb.e" class="no-image">暂无图片</view>
  85. </view>
  86. <view class="re-card-p32">
  87. <view class="flex-sb">
  88. <view class="re-from-label">水槽照片</view>
  89. </view>
  90. <image v-if="fromb.f" :src="fromb.f" mode="widthFix" class="step-image" />
  91. <view v-else class="no-image">暂无图片</view>
  92. </view>
  93. <view class="re-card-p32">
  94. <view class="flex-sb">
  95. <view class="re-from-label">冷却箱</view>
  96. </view>
  97. <image v-if="fromb.g" :src="fromb.g" mode="widthFix" class="step-image" />
  98. <view v-else class="no-image">暂无图片</view>
  99. </view>
  100. <view class="re-card-p32">
  101. <view class="flex-sb">
  102. <view class="re-from-label">计时开始照片</view>
  103. </view>
  104. <image v-if="fromb.h" :src="fromb.h" mode="widthFix" class="step-image" />
  105. <view v-else class="no-image">暂无图片</view>
  106. </view>
  107. <view class="re-card-p32">
  108. <view class="re-from-label">备注</view>
  109. <textarea
  110. class="re-card-textarea"
  111. placeholder=" 请在此处备注您的疑问或者特殊情况。"
  112. v-model="fromb.remark"
  113. readonly
  114. />
  115. </view>
  116. </view>
  117. <!-- 施工后 -->
  118. <view v-if="status === 3" class="cr mt40">
  119. <view class="re-card-p32">
  120. <view class="flex-sb">
  121. <view class="re-from-label">计时结束照片</view>
  122. </view>
  123. <image v-if="fromc.a" :src="fromc.a" mode="widthFix" class="step-image" />
  124. <view v-else class="no-image">暂无图片</view>
  125. </view>
  126. <view class="re-card-p32">
  127. <view class="flex-sb">
  128. <view class="re-from-label">抖料清洗照片</view>
  129. </view>
  130. <image v-if="fromc.b" :src="fromc.b" mode="widthFix" class="step-image" />
  131. <view v-else class="no-image">暂无图片</view>
  132. </view>
  133. <view class="re-card-p32">
  134. <view class="flex-sb">
  135. <view class="re-from-label">车身照片</view>
  136. </view>
  137. <image v-if="fromc.c" :src="fromc.c" mode="widthFix" class="step-image" />
  138. <view v-else class="no-image">暂无图片</view>
  139. </view>
  140. <view class="re-card-p32">
  141. <view class="flex-sb">
  142. <view class="re-from-label">仪表盘照片</view>
  143. </view>
  144. <image v-if="fromc.d" :src="fromc.d" mode="widthFix" class="step-image" />
  145. <view v-else class="no-image">暂无图片</view>
  146. </view>
  147. <view class="re-card-p32">
  148. <view class="flex-sb">
  149. <view class="re-from-label">补方小票照片</view>
  150. </view>
  151. <image v-if="fromc.e" :src="fromc.e" mode="widthFix" class="step-image" />
  152. <view v-else class="no-image">暂无图片</view>
  153. </view>
  154. <view class="re-card-p32">
  155. <view class="flex-sb">
  156. <view class="re-from-label">车辆入库交车照片</view>
  157. </view>
  158. <image v-if="fromc.f" :src="fromc.f" mode="widthFix" class="step-image" />
  159. <view v-else class="no-image">暂无图片</view>
  160. </view>
  161. <view class="re-card-p32">
  162. <view class="re-from-label">备注</view>
  163. <textarea
  164. class="re-card-textarea"
  165. placeholder=" 请在此处备注您的疑问或者特殊情况。"
  166. v-model="fromc.remark"
  167. readonly
  168. />
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. </template>
  174. <script>
  175. import navbar from '@/components/base/navbar.vue'
  176. export default {
  177. name: 'UserSteps',
  178. components: {
  179. navbar
  180. },
  181. data() {
  182. return {
  183. orderId: '',
  184. step: 8, // 步骤指示器位置
  185. status: 1, // 当前状态:1-施工前,2-施工中,3-施工后
  186. // 施工前数据
  187. froma: {
  188. a: '', // 仪表盘照片
  189. b: '', // 车身前
  190. c: '', // 车身后
  191. d: '', // 车身左
  192. e: '', // 车身右
  193. f: '', // 当前工作环境
  194. g: '', // 水槽照片
  195. h: '', // 现场视频
  196. remark: '' // 备注
  197. },
  198. // 施工中数据
  199. fromb: {
  200. a: '', // 当前工作环境
  201. b: '', // 支腿前
  202. c: '', // 支腿后
  203. d: '', // 支腿左
  204. e: '', // 支腿右
  205. f: '', // 水槽照片
  206. g: '', // 冷却箱
  207. h: '', // 计时开始照片
  208. remark: '' // 备注
  209. },
  210. // 施工后数据
  211. fromc: {
  212. a: '', // 计时结束照片
  213. b: '', // 抖料清洗照片
  214. c: '', // 车身照片
  215. d: '', // 仪表盘照片
  216. e: '', // 补方小票照片
  217. f: '', // 车辆入库交车照片
  218. remark: '' // 备注
  219. }
  220. }
  221. },
  222. onLoad(options) {
  223. if (options.id) {
  224. this.orderId = options.id;
  225. }
  226. },
  227. onShow() {
  228. this.clickTabOne();
  229. },
  230. methods: {
  231. // 点击施工前标签
  232. clickTabOne() {
  233. this.step = 8;
  234. this.status = 1;
  235. this.loadList();
  236. },
  237. // 点击施工中标签
  238. clickTabTwo() {
  239. this.step = 221;
  240. this.status = 2;
  241. this.loadList();
  242. },
  243. // 点击施工后标签
  244. clickTabThr() {
  245. this.step = 432;
  246. this.status = 3;
  247. this.loadList();
  248. },
  249. // 加载数据
  250. loadList() {
  251. // 模拟加载数据
  252. uni.showLoading({
  253. title: '加载中...'
  254. });
  255. setTimeout(() => {
  256. uni.hideLoading();
  257. // 模拟数据
  258. if (this.status === 1) {
  259. this.froma = {
  260. a: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one01.png',
  261. b: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one02.png',
  262. c: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one03.png',
  263. d: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one04.png',
  264. e: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one05.png',
  265. f: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one06.png',
  266. g: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one07.png',
  267. h: '',
  268. remark: '施工前检查完成,设备状态良好。'
  269. };
  270. } else if (this.status === 2) {
  271. this.fromb = {
  272. a: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one08.png',
  273. b: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one11.png',
  274. c: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one12.png',
  275. d: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one13.png',
  276. e: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one14.png',
  277. f: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one05.png',
  278. g: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one07.png',
  279. h: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one15.png',
  280. remark: '施工中,设备运行正常。'
  281. };
  282. } else if (this.status === 3) {
  283. this.fromc = {
  284. a: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one19.png',
  285. b: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one17.png',
  286. c: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one19.png',
  287. d: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one01.png',
  288. e: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one16.png',
  289. f: 'https://relief.oss-cn-hangzhou.aliyuncs.com/one18.png',
  290. remark: '施工完成,设备清洗完毕,交车状态良好。'
  291. };
  292. }
  293. }, 1000);
  294. }
  295. }
  296. }
  297. </script>
  298. <style scoped lang="scss">
  299. page {
  300. background-color: #F5F5F5;
  301. }
  302. .content {
  303. min-height: 100vh;
  304. background-color: #F5F5F5;
  305. }
  306. .cr {
  307. min-height: calc(88vh);
  308. }
  309. .mt40 {
  310. margin-top: 40rpx;
  311. }
  312. // 头部样式
  313. .head {
  314. height: 68rpx;
  315. padding: 10rpx 40rpx;
  316. background-color: #fff;
  317. }
  318. .items {
  319. width: 687rpx;
  320. height: 52rpx;
  321. padding: 8rpx 8rpx;
  322. border-radius: 34rpx;
  323. background-color: #f2f4f9;
  324. position: relative;
  325. }
  326. .item-tab {
  327. line-height: 52rpx;
  328. background-color: transparent;
  329. view {
  330. width: 33%;
  331. text-align: center;
  332. font-size: 26rpx;
  333. font-weight: normal;
  334. letter-spacing: -0.16px;
  335. color: #152748;
  336. background-color: transparent;
  337. z-index: 1;
  338. position: relative;
  339. transition: color 0.3s;
  340. &:active {
  341. color: #007AFF;
  342. }
  343. }
  344. }
  345. .item-active {
  346. width: 229rpx;
  347. height: 52rpx;
  348. border-radius: 26rpx;
  349. background-color: #ffffff;
  350. position: absolute;
  351. left: var(--step);
  352. top: 8rpx;
  353. transition: .3s ease-in;
  354. z-index: 0;
  355. }
  356. // 弹性布局
  357. .flex {
  358. display: flex;
  359. }
  360. .flex-sb {
  361. display: flex;
  362. justify-content: space-between;
  363. align-items: center;
  364. margin-bottom: 24rpx;
  365. }
  366. // 卡片样式
  367. .re-card-p32 {
  368. background-color: #FFFFFF;
  369. border-radius: 20rpx;
  370. width: calc(690rpx - 64rpx);
  371. min-height: 120rpx;
  372. margin: 0 calc(50vw - 690rpx / 2);
  373. margin-bottom: 30rpx;
  374. padding: 32rpx;
  375. position: relative;
  376. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
  377. }
  378. // 标签样式
  379. .re-from-label {
  380. font-size: 28rpx;
  381. font-weight: normal;
  382. letter-spacing: 0px;
  383. color: #1c1c1c;
  384. }
  385. // 图片样式
  386. .step-image {
  387. width: 100%;
  388. max-width: 626rpx;
  389. border-radius: 16rpx;
  390. margin: 15rpx auto;
  391. display: block;
  392. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  393. }
  394. // 视频样式
  395. .step-video {
  396. width: 100%;
  397. max-width: 626rpx;
  398. height: 342rpx;
  399. border-radius: 16rpx;
  400. margin: 15rpx auto;
  401. display: block;
  402. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  403. }
  404. // 无图片提示
  405. .no-image {
  406. width: 100%;
  407. height: 200rpx;
  408. line-height: 200rpx;
  409. text-align: center;
  410. color: #999;
  411. font-size: 28rpx;
  412. background-color: #f8f9fa;
  413. border: 2rpx dashed #ddd;
  414. border-radius: 16rpx;
  415. margin: 15rpx auto;
  416. }
  417. // 文本域样式
  418. .re-card-textarea {
  419. width: 570rpx;
  420. height: 152rpx;
  421. border-radius: 8rpx;
  422. padding: 20rpx;
  423. background: #EEEEEE;
  424. font-size: 26rpx;
  425. line-height: normal;
  426. letter-spacing: 0em;
  427. color: #0d0d0d;
  428. border: none;
  429. box-sizing: border-box;
  430. resize: none;
  431. &::placeholder {
  432. color: #999;
  433. }
  434. &[readonly] {
  435. background-color: #f5f5f5;
  436. color: #666;
  437. }
  438. }
  439. </style>