فهرست منبع

新加声像记录跳转主页,添加声像记录任务详情页,修改工作台banner(数量从3改成1)

zhangxike 3 روز پیش
والد
کامیت
8530135b4c

+ 12 - 6
pages.json

@@ -31,6 +31,18 @@
                 "navigationBarTitleText" : "声像记录"
             }
         },
+		{
+		    "path" : "pages/work/record/InfoList",
+		    "style" : {
+		        "navigationBarTitleText" : "产品声像信息界面"
+		    }
+		},
+		{
+		    "path" : "pages/work/record/InfoDetail",
+		    "style" : {
+		        "navigationBarTitleText" : "产像记录任务详情"
+		    }
+		},
         {
             "path" : "pages/work/record/PhotoList",
             "style" : {
@@ -128,12 +140,6 @@
         "borderStyle" : "white",
         "backgroundColor" : "#ffffff",
         "list" : [
-            {
-                "pagePath" : "pages/index",
-                "iconPath" : "static/images/tabbar/home.png",
-                "selectedIconPath" : "static/images/tabbar/home_.png",
-                "text" : "首页"
-            },
             {
                 "pagePath" : "pages/work/index",
                 "iconPath" : "static/images/tabbar/work.png",

+ 15 - 5
pages/work/download/DownloadDetail.uvue

@@ -15,7 +15,7 @@
 		</view>
 
 		<view class="section">
-			<uni-table>
+			<uni-table >
 				<uni-tr class="section-title" v-for="(item,index) in titleList" :key="index">
 					<uni-td class="grid-text">{{item.title1}}</uni-td>
 					<uni-td class="grid-text">{{item.title2}}</uni-td>
@@ -39,6 +39,7 @@
 				</uni-tr>
 			</uni-table>
 		</view>
+		
 	<!-- #ifdef APP -->
 	</scroll-view>
 	<!-- #endif -->
@@ -78,7 +79,11 @@
 	const taskProcessList : Array<TaskProcess> = [
 		{ id: 1, name: "前底-外侧", num: 5, step: 5, state: "done" },
 		{ id: 2, name: "后底-外侧", num: 3, step: 3, state: "error" },
-		{ id: 3, name: "简段-外侧", num: 5, step: 2, state: "doing" }
+		{ id: 3, name: "简段-外侧", num: 12, step: 2, state: "doing" },
+		{ id: 4, name: "前底-内侧", num: 5, step: 0, state: "waiting" },
+		{ id: 5, name: "后底-内侧", num: 6, step: 0, state: "waiting" },
+		{ id: 6, name: "简段-内侧", num: 3, step: 0, state: "waiting" },
+		{ id: 7, name: "隧道管", num: 5, step: 0, state: "waiting" },
 	];
 
 	onLoad((options) => {
@@ -159,10 +164,10 @@
 		font-size: 24rpx;
 		color: #000;
 		/* #endif */
-		padding: 10rpx 0 20rpx 0rpx;
+		padding: 10rpx 0 10rpx 0rpx;
 		box-sizing: border-box;
-		margin: 10rpx 20rpx;
-		min-width: 150rpx;
+		margin: 10rpx 10rpx;
+		min-width: 180rpx;
 	}
 
 	.footer-btn {
@@ -205,6 +210,7 @@
 
 	.bg-green {
 		background-color: seagreen;
+		color: #fff;
 	}
 	
 	.bg-yellow {
@@ -213,13 +219,17 @@
 	
 	.bg-black {
 		background-color: #102a43;
+		color: #fff;
 	}
 	
 	.bg-red {
 		background-color: red;
+		color: #fff;
 	}
 	
 	.ft-red {
 		color: red;
 	}
+
+	
 </style>

+ 1 - 4
pages/work/index.uvue

@@ -54,7 +54,7 @@
 		      {colorClass: 'blue', iconType: "person-filled", text: "用户管理",path:"" },
 			  {colorClass: 'blue', iconType: "download", text: "数据下载",path:"/pages/work/download/DownloadList" },
 			  {colorClass: 'blue', iconType: "list", text: "任务管理",path:"/pages/work/task/TaskList" },
-			  {colorClass: 'orange', iconType: "mic", text: "声像记录", path:"/pages/work/record/RecordList"},
+			  {colorClass: 'orange', iconType: "mic", text: "声像记录", path:"/pages/work/record/InfoList"},
 			  {colorClass: 'orange', iconType: "calendar", text: "检验记录",path:"/pages/work/report/InspectionList" },
 			  {colorClass: 'orange', iconType: "gear-filled", text: "关键工序",path:"/pages/work/process/ProcessList" },
 			  {colorClass: 'green', iconType: "folder-add-filled", text: "文档查阅",path:"" },
@@ -66,9 +66,6 @@
         data: [{
             image: '/static/images/banner/banner01.png'
           },
-          {
-            image: '/static/images/banner/banner02.png'
-          }
         ] as ImageItem[]
       }
     },

+ 235 - 0
pages/work/record/InfoDetail.uvue

@@ -0,0 +1,235 @@
+<template>
+	<!-- #ifdef APP -->
+	<scroll-view style="flex:1">
+	<!-- #endif -->
+		<!-- 报告基础信息 -->
+		<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">
+			<uni-table >
+				<uni-tr class="section-title" v-for="(item,index) in titleList" :key="index">
+					<uni-td class="grid-text">{{item.title1}}</uni-td>
+					<uni-td class="grid-text">{{item.title2}}</uni-td>
+					<uni-td class="grid-text">{{item.title3}}</uni-td>
+				</uni-tr>
+				<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 my-radius"
+						:class="{
+							'bg-green': taskProcess.state === 'done',
+							'bg-yellow': taskProcess.state === 'doing',
+							'bg-black': taskProcess.state === 'waiting',
+							'bg-red': taskProcess.state === 'error'
+						  }">{{taskProcess.step}}/{{taskProcess.num}}</uni-td>
+					<uni-td class="grid-text">
+						<text :class="{
+							'ft-red': taskProcess.state === 'error'
+						  }">{{ taskProcess.state === 'error' ? "检验失败" : "" }}</text>
+					</uni-td>
+				</uni-tr>
+			</uni-table>
+		</view>
+		
+	<!-- #ifdef APP -->
+	</scroll-view>
+	<!-- #endif -->
+</template>
+
+<script setup>
+	import {
+		ref,
+		onMounted
+	} from 'vue'
+
+	const titleList = [{
+		title1: "部位", title2: "进度", title3: "状态"
+	}];
+
+	const download = {
+		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"
+	}
+
+	type TaskProcess = {
+		id : number
+		name : string
+		num : number
+		step : number
+		state : string
+	}
+
+	const taskProcessList : Array<TaskProcess> = [
+		{ id: 1, name: "前底-外侧", num: 5, step: 5, state: "done" },
+		{ id: 2, name: "后底-外侧", num: 3, step: 3, state: "error" },
+		{ id: 3, name: "简段-外侧", num: 12, step: 2, state: "doing" },
+		{ id: 4, name: "前底-内侧", num: 5, step: 0, state: "waiting" },
+		{ id: 5, name: "后底-内侧", num: 6, step: 0, state: "waiting" },
+		{ id: 6, name: "简段-内侧", num: 3, step: 0, state: "waiting" },
+		{ id: 7, name: "隧道管", num: 5, step: 0, state: "waiting" },
+	];
+
+	onLoad((options) => {
+		//const downloadId = options?.id ?? ""
+		// 模拟数据加载,建议替换为后端接口请求
+
+	})
+
+	const goBack = () => {
+		uni.navigateBack()
+	}
+
+	const enterProcess = (id : number) => {
+		console.log(id);
+		uni.navigateTo({
+			url: `/pages/work/record/RecordList?id=${id}`
+		});
+	}
+</script>
+
+<style scoped>
+	.container {
+		padding: 40rpx;
+		background-color: #f5f7fa;
+		flex: 1;
+		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 {
+		display: flex;
+		flex-direction: row;
+		flex: 1;
+	}
+
+	.info-item {
+		display: flex;
+		justify-content: space-between;
+		/* #ifdef APP-NVUE */
+		font-size: 28rpx;
+		color: #666;
+		/* #endif */
+		margin-bottom: 18rpx;
+		flex-direction: row;
+	}
+
+	.section-content {
+		font-size: 28rpx;
+		color: #444;
+		line-height: 1.8;
+		white-space: normal;
+	}
+
+	.grid-text {
+		/* #ifdef APP-NVUE */
+		font-size: 24rpx;
+		color: #000;
+		/* #endif */
+		padding: 10rpx 0 10rpx 0rpx;
+		box-sizing: border-box;
+		margin: 10rpx 10rpx;
+		min-width: 180rpx;
+	}
+
+	.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: bold;
+		color: #102a43;
+		min-width: 150rpx;
+		margin-right: 30rpx;
+	}
+
+	.value {
+		flex: 1;
+		/* #ifdef APP-NVUE */
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		/* #endif */
+		overflow: hidden;
+		margin-left: 30rpx;
+	}
+
+	.my-radius {
+		border-radius: 10rpx;
+	}
+
+	.bg-green {
+		background-color: seagreen;
+		color: #fff;
+	}
+	
+	.bg-yellow {
+		background-color: yellow;
+	}
+	
+	.bg-black {
+		background-color: #102a43;
+		color: #fff;
+	}
+	
+	.bg-red {
+		background-color: red;
+		color: #fff;
+	}
+	
+	.ft-red {
+		color: red;
+	}
+
+	
+</style>

+ 221 - 0
pages/work/record/InfoList.uvue

@@ -0,0 +1,221 @@
+<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">
+	<!-- #endif -->
+		<view class="download-card" v-for="(item, index) in downloads" :key="index" @click="enterItem(item.pdid)">
+			<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.invname }}</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>
+			</view>
+			<view class="info-row">
+				<text class="label">产品码:</text>
+				<text class="value">{{ item.processno }}</text>
+			</view>
+			<view class="info-row">
+				<text class="label">最近更新时间:</text>
+				<text class="value">{{ item.updatetime }}</text>
+			</view>
+			<view class="info-row">
+				<text class="label">进度:</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 -->
+	</scroll-view>
+	<!-- #endif -->
+</template>
+
+<script setup>
+	import {
+		ref
+	} from 'vue'
+	type Download = {
+		pdid : number,
+		workorder : string,
+		invname : string,
+		productno : string,
+		cardno : string,
+		processno : string,
+		updatetime : string,
+		progress : string,
+		state : string
+	}
+
+	const downloads = [{
+		pdid: 1,
+		workorder: "632-P-01",
+		invname: "箱间段",
+		productno: "1CFA1040-00#S",
+		cardno: "LK20230707070012",
+		processno: "Pb/XXX-E11",
+		updatetime: "2025-06-23",
+		progress: "3/3",
+		state: "done"
+
+	}, {
+		pdid: 2,
+		workorder: "712-SY-10-6",
+		invname: "级间架",
+		productno: "1XA1020-00A",
+		cardno: "LK20250215003",
+		processno: "Pb/XXX-E11",
+		updatetime: "2025-08-25",
+		progress: "2/4",
+		state: "doing"
+	}, {
+		pdid: 3,
+		workorder: "712-SY-10-6",
+		invname: "级间架",
+		productno: "1XA1020-00A",
+		cardno: "LK20250215003",
+		processno: "Pb/XXX-E11",
+		updatetime: "2025-08-25",
+		progress: "0/4",
+		state: "waiting"
+	}] as Download[];
+
+	const download = (e : any) => {
+		console.log("开始下载...")
+	}
+	const upload = (e : any) => {
+		console.log("开始上传...")
+	}
+	const enterItem = (id : number) => {
+		uni.navigateTo({
+			url: `/pages/work/record/InfoDetail?id=${id}`
+		});
+	}
+</script>
+
+<style scope>
+	.container {
+		padding: 24rpx;
+		background-color: #f0f4f8;
+		flex: 1;
+		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 {
+		background: #ffffff;
+		border-radius: 20rpx;
+		padding: 24rpx 32rpx;
+		box-shadow: 0 8rpx 15rpx rgba(0, 43, 92, 0.1);
+		display: flex;
+		flex-direction: column;
+		margin-bottom: 20rpx;
+		margin-top: 40rpx;
+	}
+
+	.download-card .view {
+		margin-bottom: 16rpx;
+	}
+
+	/* 信息行 */
+	.info-row {
+		display: flex;
+		flex-direction: row;
+		font-size: 28rpx;
+		color: #33475b;
+		align-items: center;
+	}
+
+	.info-row>.label {
+		margin-left: 10rpx;
+	}
+
+	.info-row>.value {
+		margin-left: 10rpx;
+	}
+
+	.btn-panel {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-left: 5rpx;
+		margin-right: 5rpx;
+	}
+
+	.label {
+		font-weight: bold;
+		color: #102a43;
+		min-width: 100rpx;
+	}
+
+	.value {
+		flex: 1;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+	}
+
+	.btn {
+		align-self: flex-end;
+		background-color: #00aaff;
+		color: #fff;
+		border: none;
+		border-radius: 32rpx;
+		padding: 2rpx 30rpx;
+		font-size: 24rpx;
+		font-weight: bold;
+		/* #ifndef APP-ANDROID */
+		transition: background-color 0.3s ease;
+		/* #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>

BIN
static/images/banner/banner01.png


BIN
static/images/banner/banner02.png