DownloadDetail.uvue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <scroll-view scroll-y class="container">
  3. <!-- 标题Banner -->
  4. <view class="banner">
  5. <text class="banner-title">数据下载详情</text>
  6. </view>
  7. <!-- 报告基础信息 -->
  8. <view class="section">
  9. <view class="info-item">
  10. <text class="label">声像记录任务</text>
  11. <text class="value">{{ download.workorder}}</text>
  12. </view>
  13. <view class="info-item">
  14. <text class="label">{{ download.productno }}</text>
  15. <text class="value">{{ download.invname }}</text>
  16. </view>
  17. </view>
  18. <view class="section">
  19. <uni-table>
  20. <uni-tr class="section-title" v-for="(item,index) in titleList" :key="index">
  21. <uni-td class="grid-text">{{item.title1}}</uni-td>
  22. <uni-td class="grid-text">{{item.title2}}</uni-td>
  23. <uni-td class="grid-text">{{item.title3}}</uni-td>
  24. </uni-tr>
  25. <uni-tr class="section-title" v-for="(taskProcess : TaskProcess,index2 : number) in taskProcessList" :key="index2"
  26. @click="enterProcess(taskProcess.id)">
  27. <uni-td class="grid-text">{{taskProcess.name}}</uni-td>
  28. <uni-td class="grid-text">{{taskProcess.step}}/{{taskProcess.num}}</uni-td>
  29. <uni-td></uni-td>
  30. </uni-tr>
  31. </uni-table>
  32. </view>
  33. <!-- 按钮 -->
  34. <view class="footer-btn">
  35. <button class="main-btn" @click="goBack">返回上一页</button>
  36. </view>
  37. </scroll-view>
  38. </template>
  39. <script setup>
  40. import {
  41. ref,
  42. onMounted
  43. } from 'vue'
  44. const titleList = [{
  45. title1: "部位", title2: "进度", title3: "状态"
  46. }];
  47. const download = {
  48. pdid: 1,
  49. workorder: "632-P-01",
  50. invname: "箱间段",
  51. productno: "1CFA1040-00#S",
  52. graphid: "HBJ0100-00",
  53. cardno: "LK20230707070012",
  54. processno: "Pb/XXX-E11",
  55. ver: "A.1",
  56. updatetime: "2025-06-23",
  57. progress: "1/3"
  58. }
  59. type TaskProcess = {
  60. id: number
  61. name: string
  62. num: number
  63. step: number
  64. }
  65. const taskProcessList: Array<TaskProcess> = [
  66. { id: 1, name: "前底-外侧", num: 5, step: 5 },
  67. { id: 2, name: "后底-外侧", num: 3, step: 3 },
  68. { id: 3, name: "简段-外侧", num: 5, step: 2 }
  69. ];
  70. onLoad((options) => {
  71. //const downloadId = options?.id ?? ""
  72. // 模拟数据加载,建议替换为后端接口请求
  73. })
  74. const goBack = () => {
  75. uni.navigateBack()
  76. }
  77. const enterProcess = (id : number) => {
  78. console.log(id);
  79. uni.navigateTo({
  80. url: `/pages/work/record/RecordList?id=${id}`
  81. });
  82. }
  83. </script>
  84. <style scoped>
  85. .container {
  86. padding: 40rpx;
  87. background-color: #f5f7fa;
  88. flex: 1;
  89. box-sizing: border-box;
  90. }
  91. .banner {
  92. background: linear-gradient(135deg, #2193b0, #6dd5ed);
  93. border-radius: 24rpx;
  94. padding: 40rpx 30rpx;
  95. margin-bottom: 40rpx;
  96. box-shadow: 0 8rpx 16rpx rgba(33, 147, 176, 0.3);
  97. }
  98. .banner-title {
  99. color: white;
  100. font-size: 36rpx;
  101. font-weight: bold;
  102. text-align: center;
  103. }
  104. .section {
  105. background-color: #fff;
  106. border-radius: 20rpx;
  107. padding: 30rpx;
  108. margin-bottom: 30rpx;
  109. box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.05);
  110. }
  111. .section-title {
  112. display: flex;
  113. flex-direction: row;
  114. flex: 1;
  115. }
  116. .info-item {
  117. display: flex;
  118. justify-content: space-between;
  119. /* #ifdef APP-NVUE */
  120. font-size: 28rpx;
  121. color: #666;
  122. /* #endif */
  123. margin-bottom: 18rpx;
  124. flex-direction: row;
  125. }
  126. .section-content {
  127. font-size: 28rpx;
  128. color: #444;
  129. line-height: 1.8;
  130. white-space: normal;
  131. }
  132. .grid-text {
  133. /* #ifdef APP-NVUE */
  134. font-size: 24rpx;
  135. color: #000;
  136. /* #endif */
  137. padding: 10rpx 0 20rpx 0rpx;
  138. box-sizing: border-box;
  139. margin: 10rpx 20rpx;
  140. min-width: 150rpx;
  141. }
  142. .footer-btn {
  143. margin-top: 40rpx;
  144. display: flex;
  145. justify-content: center;
  146. }
  147. .main-btn {
  148. width: 80%;
  149. padding: 28rpx 0;
  150. font-size: 30rpx;
  151. color: #fff;
  152. border: none;
  153. border-radius: 100rpx;
  154. background: linear-gradient(to right, #36d1dc, #5b86e5);
  155. box-shadow: 0 10rpx 24rpx rgba(91, 134, 229, 0.3);
  156. }
  157. .label {
  158. font-weight: bold;
  159. color: #102a43;
  160. min-width: 150rpx;
  161. margin-right: 30rpx;
  162. }
  163. .value {
  164. flex: 1;
  165. /* #ifdef APP-NVUE */
  166. white-space: nowrap;
  167. text-overflow: ellipsis;
  168. /* #endif */
  169. overflow: hidden;
  170. margin-left: 30rpx;
  171. }
  172. </style>