DownloadList.uvue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <!-- #ifdef APP -->
  3. <scroll-view style="flex:1" scroll-y class="container">
  4. <!-- #endif -->
  5. <view class="info-row" >
  6. <button class="btn" @click="download">
  7. 下载数据
  8. </button>
  9. <button class="btn" @click="upload">
  10. 上传数据
  11. </button>
  12. </view>
  13. <view class="download-card" v-for="(item, index) in downloads" :key="index" @click="enterItem(item.pdid)">
  14. <view class="info-row">
  15. <text class="label">工作令:</text>
  16. <text class="value">{{ item.workorder }}</text>
  17. </view>
  18. <view class="info-row">
  19. <text class="label">产品名称:</text>
  20. <text class="value">{{ item.invname }}</text>
  21. </view>
  22. <view class="info-row">
  23. <text class="label">图号:</text>
  24. <text class="value">{{ item.graphid }}</text>
  25. </view>
  26. <view class="info-row">
  27. <text class="label">产品编码:</text>
  28. <text class="value">{{ item.productno }}</text>
  29. </view>
  30. <view class="info-row">
  31. <text class="label">路卡号:</text>
  32. <text class="value">{{ item.cardno }}</text>
  33. </view>
  34. <view class="info-row">
  35. <text class="label">工艺编号:</text>
  36. <text class="value">{{ item.processno }}</text>
  37. </view>
  38. <view class="info-row">
  39. <text class="label">版本号:</text>
  40. <text class="value">{{ item.ver }}</text>
  41. </view>
  42. <view class="info-row">
  43. <text class="label">最近更新时间:</text>
  44. <text class="value">{{ item.updatetime }}</text>
  45. </view>
  46. <view class="info-row">
  47. <text class="label">进度:</text>
  48. <text class="value">{{ item.progress }}</text>
  49. </view>
  50. </view>
  51. <!-- #ifdef APP -->
  52. </scroll-view>
  53. <!-- #endif -->
  54. </template>
  55. <script setup>
  56. import {
  57. ref
  58. } from 'vue'
  59. type Download = {
  60. pdid: number,
  61. workorder: string,
  62. invname: string,
  63. productno: string,
  64. graphid: string,
  65. cardno: string,
  66. processno: string,
  67. ver: string,
  68. updatetime: string,
  69. progress: string
  70. }
  71. const downloads = [{
  72. pdid:1,
  73. workorder:"632-P-01",
  74. invname:"箱间段",
  75. productno:"1CFA1040-00#S",
  76. graphid:"HBJ0100-00",
  77. cardno: "LK20230707070012",
  78. processno: "Pb/XXX-E11",
  79. ver: "A.1",
  80. updatetime: "2025-06-23",
  81. progress: "1/3"
  82. },{
  83. pdid:2,
  84. workorder:"712-SY-10-6",
  85. invname:"级间架",
  86. productno:"1XA1020-00A",
  87. graphid:"1XC002-00",
  88. cardno: "LK20250215003",
  89. processno: "Pb/XXX-E11",
  90. ver: "B.1",
  91. updatetime: "2025-08-25",
  92. progress: "0/4"
  93. }] as Download[];
  94. const download = (e: any) => {
  95. console.log("开始下载...")
  96. }
  97. const upload = (e: any) => {
  98. console.log("开始上传...")
  99. }
  100. const enterItem = (id:number) => {
  101. uni.navigateTo({
  102. url: `/pages/work/download/DownloadDetail?id=${id}`
  103. });
  104. }
  105. </script>
  106. <style>
  107. .container {
  108. padding: 40rpx;
  109. background-color: #f5f7fa;
  110. flex: 1;
  111. box-sizing: border-box;
  112. }
  113. .download-card {
  114. background: #ffffff;
  115. border-radius: 20rpx;
  116. padding: 24rpx 32rpx;
  117. box-shadow: 0 8rpx 15rpx rgba(0, 43, 92, 0.1);
  118. display: flex;
  119. flex-direction: column;
  120. margin-bottom: 20rpx;
  121. margin-top: 40rpx;
  122. }
  123. .download-card .view {
  124. margin-bottom: 16rpx;
  125. }
  126. /* 信息行 */
  127. .info-row {
  128. display: flex;
  129. flex-direction: row;
  130. font-size: 28rpx;
  131. color: #33475b;
  132. align-items: center;
  133. }
  134. .info-row > .label {
  135. margin-left: 10rpx;
  136. }
  137. .info-row > .value {
  138. margin-left: 10rpx;
  139. }
  140. .label {
  141. font-weight: bold;
  142. color: #102a43;
  143. min-width: 100rpx;
  144. }
  145. .value {
  146. flex: 1;
  147. white-space: nowrap;
  148. overflow: hidden;
  149. text-overflow: ellipsis;
  150. }
  151. .btn {
  152. align-self: flex-end;
  153. background-color: #0000ff;
  154. color: #fff;
  155. border: none;
  156. border-radius: 32rpx;
  157. padding: 5rpx 30rpx;
  158. font-size: 24rpx;
  159. font-weight: bold;
  160. /* #ifndef APP-ANDROID */
  161. transition: background-color 0.3s ease;
  162. /* #endif */
  163. margin-top:30rpx;
  164. }
  165. </style>