DownloadDetail.uvue 4.2 KB

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