DownloadList.uvue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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 in downloads" :key="item.pdid" @click="enterItem(item)">
  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. const downloads = ref([{
  60. pdid:1,
  61. workorder:"632-P-01",
  62. invname:"箱间段",
  63. productNo:"1CFA1040-00#S",
  64. graphid:"HBJ0100-00",
  65. cardno: "LK20230707070012",
  66. processno: "Pb/XXX-E11",
  67. ver: "A.1",
  68. updatetime: "2025-06-23",
  69. progress: "1/3"
  70. },{
  71. pdid:2,
  72. workorder:"712-SY-10-6",
  73. invname:"级间架",
  74. productNo:"1XA1020-00A",
  75. graphid:"1XC002-00",
  76. cardno: "LK20250215003",
  77. processno: "Pb/XXX-E11",
  78. ver: "B.1",
  79. updatetime: "2025-08-25",
  80. progress: "0/4"
  81. }]);
  82. const download = () => {
  83. }
  84. const upload = () => {
  85. }
  86. const enterItem = (e) => {
  87. console.log(e)
  88. uni.navigateTo({
  89. url: `/pages/work/download/DownloadDetail?id=${e.pdid}`
  90. });
  91. }
  92. </script>
  93. <style>
  94. .container {
  95. padding: 40rpx;
  96. background-color: #f5f7fa;
  97. min-height: 100vh;
  98. box-sizing: border-box;
  99. }
  100. .download-card {
  101. background: #ffffff;
  102. border-radius: 20rpx;
  103. padding: 24rpx 32rpx;
  104. box-shadow: 0 8rpx 15rpx rgba(0, 43, 92, 0.1);
  105. display: flex;
  106. flex-direction: column;
  107. gap: 16rpx;
  108. margin-bottom: 20rpx;
  109. margin-top: 40rpx;
  110. }
  111. /* 信息行 */
  112. .info-row {
  113. display: flex;
  114. flex-direction: row;
  115. gap: 10rpx;
  116. font-size: 28rpx;
  117. color: #33475b;
  118. align-items: center;
  119. }
  120. .label {
  121. font-weight: 600;
  122. color: #102a43;
  123. min-width: 100rpx;
  124. }
  125. .value {
  126. flex: 1;
  127. white-space: nowrap;
  128. overflow: hidden;
  129. text-overflow: ellipsis;
  130. }
  131. .btn {
  132. align-self: flex-end;
  133. background-color: #0000ff;
  134. color: #fff;
  135. border: none;
  136. border-radius: 32rpx;
  137. padding: 5rpx 30rpx;
  138. font-size: 24rpx;
  139. font-weight: 700;
  140. cursor: pointer;
  141. transition: background-color 0.3s ease;
  142. margin-top:30rpx;
  143. }
  144. </style>