Просмотр исходного кода

添加样张静态图片,修改部分页面样式

zhangxike 3 дней назад
Родитель
Сommit
866cddb73a

+ 21 - 12
pages/work/download/DownloadDetail.uvue

@@ -1,9 +1,9 @@
 <template>
 	<scroll-view scroll-y class="container">
 		<!-- 标题Banner -->
-		<view class="banner">
+		<!-- <view class="banner">
 			<text class="banner-title">数据下载详情</text>
-		</view>
+		</view> -->
 
 		<!-- 报告基础信息 -->
 		<view class="section">
@@ -27,16 +27,11 @@
 				<uni-tr class="section-title" v-for="(taskProcess : TaskProcess,index2 : number) in taskProcessList" :key="index2"
 					@click="enterProcess(taskProcess.id)">
 					<uni-td class="grid-text">{{taskProcess.name}}</uni-td>
-					<uni-td class="grid-text">{{taskProcess.step}}/{{taskProcess.num}}</uni-td>
-					<uni-td></uni-td>
+					<uni-td class="grid-text my-radius" :class="{ 'complete': taskProcess.state === 'complete', 'error': taskProcess.state === 'error' }">{{taskProcess.step}}/{{taskProcess.num}}</uni-td>
+					<uni-td class="grid-text"></uni-td>
 				</uni-tr>
 			</uni-table>
 		</view>
-
-		<!-- 按钮 -->
-		<view class="footer-btn">
-			<button class="main-btn" @click="goBack">返回上一页</button>
-		</view>
 	</scroll-view>
 </template>
 
@@ -68,12 +63,13 @@
 		name: string
 		num: number
 		step: number
+		state: string
 	}
 
 	const taskProcessList: Array<TaskProcess> = [
-		{ id: 1, name: "前底-外侧", num: 5, step: 5 }, 
-		{ id: 2, name: "后底-外侧", num: 3, step: 3 }, 
-		{ id: 3, name: "简段-外侧", num: 5, step: 2 }
+		{ id: 1, name: "前底-外侧", num: 5, step: 5, state: "complete"}, 
+		{ id: 2, name: "后底-外侧", num: 3, step: 3, state: "error" }, 
+		{ id: 3, name: "简段-外侧", num: 5, step: 2, state: "non-done" }
 	];
 
 	onLoad((options) => {
@@ -193,4 +189,17 @@
 		overflow: hidden;
 		margin-left: 30rpx;
 	}
+	
+	.my-radius {
+		border-radius: 10rpx;
+	}
+	
+	.complete {
+		background-color: seagreen;
+	}
+	
+	.error {
+		background-color: orangered;
+	}
+	
 </style>

+ 70 - 18
pages/work/download/DownloadList.uvue

@@ -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>

+ 1 - 1
pages/work/index.uvue

@@ -17,7 +17,7 @@
 		<view class=" uni-section-header">
 		<view class=" uni-section-header__decoration line"/>	
 			<view class=" uni-section-header__content">
-			  <text style="font-size:14px;color:#333" class="distraction">系统管理</text>
+			  <text style="font-size:14px;color:#333" class="distraction">工作台</text>
 			</view>
 		</view>
 	</view>

+ 15 - 5
pages/work/record/RecordList.uvue

@@ -62,6 +62,9 @@
 					</swiper-item>
 				</swiper>
 				<image :src="item.urlspl" mode="widthFix" v-if="item.urlpdt.length == 0"></image>
+				<view class="demo-view">
+					<text class="demo-view-label">样张</text>
+				</view>
 			</view>
 
 		</view>
@@ -102,9 +105,9 @@
 		partno: 'TD10-01',
 		num: 2,
 		status: '未执行',
-		urlspl: '/static/images/banner/banner01.jpg',
+		urlspl: '/static/images/demo.png',
 		imgname: ['1.jpg', '2.jpg'],
-		urlpdt: ['/static/images/banner/banner02.jpg', '/static/images/banner/banner03.jpg']
+		urlpdt: ['/static/images/demo.png', '/static/images/demo.png']
 	},
 	{
 		sxid: 2,
@@ -117,7 +120,7 @@
 		partno: 'TD10-02',
 		num: 3,
 		status: '未执行',
-		urlspl: '/static/images/banner/banner01.jpg',
+		urlspl: '/static/images/demo.png',
 		imgname: ['1.jpg', '2.jpg', '3.jpg'],
 		urlpdt: []
 	}] as Record[];
@@ -259,7 +262,7 @@
 	}
 
 	.swiper-box {
-		height: 150px;
+		height: 500rpx;
 	}
 
 	.swiper-item {
@@ -270,7 +273,7 @@
 		justify-content: center;
 		align-items: center;
 		color: #fff;
-		height: 300rpx;
+		height: 500rpx;
 		line-height: 300rpx;
 	}
 
@@ -293,4 +296,11 @@
 		width: 40rpx;
 		margin: 0 10rpx;
 	}
+	
+	.demo-view-label {
+		text-align: center;
+		color: #102a43;
+		line-height: 1.5;
+		margin-top: 5rpx;
+	}
 </style>

BIN
static/images/demo.png