Forráskód Böngészése

新增下载任务详情页面

oyq28 1 hete
szülő
commit
776f0c49b2

+ 7 - 0
pages.json

@@ -136,6 +136,13 @@
 		"navigationBarTitleText" : "数据下载"
 	}
 },
+{
+	"path" : "pages/work/download/DownloadDetail",
+	"style" : 
+	{
+		"navigationBarTitleText" : "数据下载详情"
+	}
+},
 {
 	"path" : "pages/work/task/TaskList",
 	"style" : 

+ 197 - 0
pages/work/download/DownloadDetail.uvue

@@ -0,0 +1,197 @@
+<template>
+	<scroll-view scroll-y class="container">
+		<!-- 标题Banner -->
+		<view class="banner">
+			<text class="banner-title">数据下载详情</text>
+		</view>
+
+		<!-- 报告基础信息 -->
+		<view class="section">			
+			<view class="info-item">
+				<text class="label">声像记录任务</text>
+				<text class="value">{{ download.workorder }}</text>
+			</view>
+			<view class="info-item">
+				<text class="label">{{ download.productno }}</text>
+				<text class="value">{{ download.invname }}</text>
+			</view>
+		</view>
+		
+		<view class="section">
+			<u-grid :border="true">
+				<u-grid-item  v-for="(item,index) in titleList"
+				                    :key="index"
+				    >
+				  <text class="grid-text">{{item.title}}</text>	
+				</u-grid-item>
+			</u-grid>
+			
+			<u-table  v-for="(taskProcess,index2) in taskProcessList" :key="index2">
+				<u-tr>
+					<u-td class="grid-text">{{taskProcess.name}}</u-td>
+					<u-td class="grid-text">{{taskProcess.step}}/{{taskProcess.num}}</u-td>
+					<u-td></u-td>
+				</u-tr>
+			</u-table>
+		</view>
+
+		<!-- 按钮 -->
+		<view class="footer-btn">
+			<button class="main-btn" @click="goBack">返回上一页</button>
+		</view>
+	</scroll-view>
+</template>
+
+<script setup>
+	import {
+		ref,
+		onMounted
+	} from 'vue'
+	import {
+		onLoad
+	} from '@dcloudio/uni-app'
+
+    const titleList = ref([
+		{title:"部位"},{title:"进度"},{title:"状态"}
+	]);
+
+	const download = ref({
+		pdid:1,
+		workorder:"",
+		productno:"",
+		invname:"",
+		graphid:"",
+		cardno: "",
+		processno: "",
+		ver: "",
+		updatetime: "",
+		progress: ""
+	})
+	
+	const taskProcess= ref({
+		id:1,
+		name:"",
+		num:1,
+		step:1
+	})
+	const taskProcessList = ref([
+		{id:1,name:"前底-外侧",num:5,step:5},{id:1,name:"后底-外侧",num:3,step:3},{id:1,name:"简段-外侧",num:5,step:2}
+	])
+
+	onLoad((options) => {
+		const downloadId = options.id
+		// 模拟数据加载,建议替换为后端接口请求
+		download.value = {
+			pdid:1,
+			workorder:"632-P-01",
+			invname:"箱间段",
+			productno:"1CFA1040-00#S",
+			graphid:"HBJ0100-00",
+			cardno: "LK20230707070012",
+			processno: "Pb/XXX-E11",
+			ver: "A.1",
+			updatetime: "2025-06-23",
+			progress: "1/3"
+		}
+	})
+
+	const goBack = () => {
+		uni.navigateBack()
+	}
+</script>
+
+<style scoped>
+	.container {
+		padding: 40rpx;
+		background-color: #f5f7fa;
+		min-height: 100vh;
+		box-sizing: border-box;
+	}
+
+	.banner {
+		background: linear-gradient(135deg, #2193b0, #6dd5ed);
+		border-radius: 24rpx;
+		padding: 40rpx 30rpx;
+		margin-bottom: 40rpx;
+		box-shadow: 0 8rpx 16rpx rgba(33, 147, 176, 0.3);
+	}
+
+	.banner-title {
+		color: white;
+		font-size: 36rpx;
+		font-weight: bold;
+		text-align: center;
+	}
+
+	.section {
+		background-color: #fff;
+		border-radius: 20rpx;
+		padding: 30rpx;
+		margin-bottom: 30rpx;
+		box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.05);
+	}
+
+	.section-title {
+		font-size: 32rpx;
+		color: #333;
+		font-weight: bold;
+		margin-bottom: 20rpx;
+		display: block;
+	}
+
+	.info-item {
+		display: flex;
+		justify-content: space-between;
+		font-size: 28rpx;
+		color: #666;
+		margin-bottom: 18rpx;
+		flex-direction: row;
+	}
+
+	.section-content {
+		font-size: 28rpx;
+		color: #444;
+		line-height: 1.8;
+		white-space: pre-line;
+	}
+	
+	.grid-text {
+	    font-size: 24rpx;
+	    color: #000;
+	    padding: 10rpx 0 20rpx 0rpx;
+	    box-sizing: border-box;
+	}
+
+	.footer-btn {
+		margin-top: 40rpx;
+		display: flex;
+		justify-content: center;
+	}
+
+	.main-btn {
+		width: 80%;
+		padding: 28rpx 0;
+		font-size: 30rpx;
+		color: #fff;
+		border: none;
+		border-radius: 100rpx;
+		background: linear-gradient(to right, #36d1dc, #5b86e5);
+		box-shadow: 0 10rpx 24rpx rgba(91, 134, 229, 0.3);
+	}
+	
+	.label {
+		font-weight: 600;
+		color: #102a43;
+		min-width: 150rpx;
+		margin-right:30rpx;
+	}
+	
+	.value {
+		flex: 1;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		margin-left: 30rpx;
+	}
+	
+</style>

+ 16 - 2
pages/work/download/DownloadList.uvue

@@ -11,19 +11,23 @@
 			</button>
 		</view>	 
 	
-		<view class="download-card" v-for="item in downloads" :key="item.pdid">
+		<view class="download-card" v-for="item in downloads" :key="item.pdid" @click="enterItem(item)">
 		    <view class="info-row">
 		    	<text class="label">工作令:</text>
 		    	<text class="value">{{ item.workorder }}</text>
 		    </view>
 			<view class="info-row">
 				<text class="label">产品名称:</text>
-				<text class="value">{{ item.productNo }}</text>
+				<text class="value">{{ item.invname }}</text>
 			</view>
 			<view class="info-row">
 				<text class="label">图号:</text>
 				<text class="value">{{ item.graphid }}</text>
 			</view>
+			<view class="info-row">
+				<text class="label">产品编码:</text>
+				<text class="value">{{ item.productno }}</text>
+			</view>
 			<view class="info-row">
 				<text class="label">路卡号:</text>
 				<text class="value">{{ item.cardno }}</text>
@@ -58,6 +62,8 @@
 	const downloads = ref([{
 		pdid:1,
 		workorder:"632-P-01",
+		invname:"箱间段",
+		productNo:"1CFA1040-00#S",
 		graphid:"HBJ0100-00",
 		cardno: "LK20230707070012",
 		processno: "Pb/XXX-E11",
@@ -68,6 +74,8 @@
 	},{
 		pdid:2,
 		workorder:"712-SY-10-6",
+		invname:"级间架",
+		productNo:"1XA1020-00A",
 		graphid:"1XC002-00",
 		cardno: "LK20250215003",
 		processno: "Pb/XXX-E11",
@@ -81,6 +89,12 @@
 	const upload = () => {
 		
 	} 
+	const enterItem = (e) => {
+		console.log(e)
+		uni.navigateTo({
+			url: `/pages/work/download/DownloadDetail?id=${e.pdid}`
+		});
+	}
 	
 </script>