|
@@ -1,16 +1,15 @@
|
|
|
<template>
|
|
|
+ <view class="info-row btn-panel">
|
|
|
+ <button class="btn btn-first" @click="download">
|
|
|
+ 下载数据
|
|
|
+ </button>
|
|
|
+ <button class="btn btn-second" @click="upload">
|
|
|
+ 上传数据
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
<!-- #ifdef APP -->
|
|
|
- <scroll-view style="flex:1" scroll-y class="container">
|
|
|
+ <scroll-view style="flex:1">
|
|
|
<!-- #endif -->
|
|
|
- <view class="info-row btn-panel" >
|
|
|
- <button class="btn btn-first" @click="download">
|
|
|
- 下载数据
|
|
|
- </button>
|
|
|
- <button class="btn btn-second" @click="upload">
|
|
|
- 上传数据
|
|
|
- </button>
|
|
|
- </view>
|
|
|
-
|
|
|
<view class="download-card" v-for="(item, index) in downloads" :key="index" @click="enterItem(item.pdid)">
|
|
|
<view class="info-row">
|
|
|
<text class="label">工作令:</text>
|
|
@@ -46,7 +45,11 @@
|
|
|
</view>
|
|
|
<view class="info-row">
|
|
|
<text class="label">进度:</text>
|
|
|
- <text class="value">{{ item.progress }}</text>
|
|
|
+ <text class="process-value" :class="{
|
|
|
+ 'bg-green': item.state === 'done',
|
|
|
+ 'bg-yellow': item.state === 'doing',
|
|
|
+ 'bg-black': item.state === 'waiting'
|
|
|
+ }">{{ item.progress }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- #ifdef APP -->
|
|
@@ -68,7 +71,8 @@
|
|
|
processno : string,
|
|
|
ver : string,
|
|
|
updatetime : string,
|
|
|
- progress : string
|
|
|
+ progress : string,
|
|
|
+ state : string
|
|
|
}
|
|
|
|
|
|
const downloads = [{
|
|
@@ -81,7 +85,8 @@
|
|
|
processno: "Pb/XXX-E11",
|
|
|
ver: "A.1",
|
|
|
updatetime: "2025-06-23",
|
|
|
- progress: "1/3"
|
|
|
+ progress: "3/3",
|
|
|
+ state: "done"
|
|
|
|
|
|
}, {
|
|
|
pdid: 2,
|
|
@@ -93,7 +98,20 @@
|
|
|
processno: "Pb/XXX-E11",
|
|
|
ver: "B.1",
|
|
|
updatetime: "2025-08-25",
|
|
|
- progress: "0/4"
|
|
|
+ progress: "2/4",
|
|
|
+ state: "doing"
|
|
|
+ }, {
|
|
|
+ pdid: 3,
|
|
|
+ workorder: "712-SY-10-6",
|
|
|
+ invname: "级间架",
|
|
|
+ productno: "1XA1020-00A",
|
|
|
+ graphid: "1XC002-00",
|
|
|
+ cardno: "LK20250215003",
|
|
|
+ processno: "Pb/XXX-E11",
|
|
|
+ ver: "B.1",
|
|
|
+ updatetime: "2025-08-25",
|
|
|
+ progress: "0/4",
|
|
|
+ state: "waiting"
|
|
|
}] as Download[];
|
|
|
|
|
|
const download = (e : any) => {
|
|
@@ -109,12 +127,18 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style scope>
|
|
|
.container {
|
|
|
- padding: 40rpx;
|
|
|
- background-color: #f5f7fa;
|
|
|
+ padding: 24rpx;
|
|
|
+ background-color: #f0f4f8;
|
|
|
flex: 1;
|
|
|
- box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ font-family: "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
|
+ /* #ifndef APP-ANDROID */
|
|
|
+ min-height: 100vh;
|
|
|
+ /* #endif */
|
|
|
+ height: 120rpx;
|
|
|
}
|
|
|
|
|
|
.download-card {
|
|
@@ -153,6 +177,8 @@
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
+ margin-left: 5rpx;
|
|
|
+ margin-right: 5rpx;
|
|
|
}
|
|
|
|
|
|
.label {
|
|
@@ -182,4 +208,30 @@
|
|
|
/* #endif */
|
|
|
margin-top: 30rpx;
|
|
|
}
|
|
|
+
|
|
|
+ .process-value {
|
|
|
+ width: 120rpx;
|
|
|
+ min-width: 100rpx;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bg-green {
|
|
|
+ background-color: seagreen;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bg-yellow {
|
|
|
+ background-color: yellow;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bg-black {
|
|
|
+ background-color: #102a43;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn-first {
|
|
|
+ margin-left: 5rpx;
|
|
|
+ }
|
|
|
+ .btn-second {
|
|
|
+ margin-right: 5rpx;
|
|
|
+ }
|
|
|
</style>
|