Bladeren bron

界面样式修改

zhangxike 2 dagen geleden
bovenliggende
commit
04872ddb78
3 gewijzigde bestanden met toevoegingen van 227 en 220 verwijderingen
  1. 112 102
      pages/work/download/DownloadList.uvue
  2. 112 116
      pages/work/record/RecordList.uvue
  3. 3 2
      pages/work/report/InspectionList.uvue

+ 112 - 102
pages/work/download/DownloadList.uvue

@@ -2,20 +2,20 @@
 	<!-- #ifdef APP -->
 	<scroll-view style="flex:1" scroll-y class="container">
 	<!-- #endif -->
-	    <view class="info-row" >
-			<button class="btn" @click="download">
+		<view class="info-row btn-panel" >
+			<button class="btn btn-first" @click="download">
 				下载数据
 			</button>
-			<button class="btn" @click="upload">
+			<button class="btn btn-second" @click="upload">
 				上传数据
 			</button>
-		</view>	 
-	
+		</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>
-		    	<text class="value">{{ item.workorder }}</text>
-		    </view>
+			<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>
@@ -59,117 +59,127 @@
 		ref
 	} from 'vue'
 	type Download = {
-		pdid: number,
-		workorder: string,
-		invname: string,
-		productno: string,
-		graphid: string,
-		cardno: string,
-		processno: string,
-		ver: string,
-		updatetime: string,
-		progress: string
+		pdid : number,
+		workorder : string,
+		invname : string,
+		productno : string,
+		graphid : string,
+		cardno : string,
+		processno : string,
+		ver : string,
+		updatetime : string,
+		progress : string
 	}
-	
+
 	const downloads = [{
-		pdid:1,
-		workorder:"632-P-01",
-		invname:"箱间段",
-		productno:"1CFA1040-00#S",
-		graphid:"HBJ0100-00",
+		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"
-		
-	},{
-		pdid:2,
-		workorder:"712-SY-10-6",
-		invname:"级间架",
-		productno:"1XA1020-00A",
-		graphid:"1XC002-00",
+
+	}, {
+		pdid: 2,
+		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"		
+		progress: "0/4"
 	}] as Download[];
-	
-	const download = (e: any) => {
+
+	const download = (e : any) => {
 		console.log("开始下载...")
-	}  
-	const upload = (e: any) => {
+	}
+	const upload = (e : any) => {
 		console.log("开始上传...")
-	} 
-	const enterItem = (id:number) => {
+	}
+	const enterItem = (id : number) => {
 		uni.navigateTo({
 			url: `/pages/work/download/DownloadDetail?id=${id}`
 		});
 	}
-	
 </script>
 
 <style>
-  .container {
-  	padding: 40rpx;
-  	background-color: #f5f7fa;
-  	flex: 1;
-  	box-sizing: border-box;
-  }
-  .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;
-  }
-  
-  .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: #0000ff;
-  	color: #fff;
-  	border: none;
-  	border-radius: 32rpx;
-  	padding: 5rpx 30rpx;
-  	font-size: 24rpx;
-  	font-weight: bold;
-	 /* #ifndef APP-ANDROID */
-  	transition: background-color 0.3s ease;
-	/* #endif */
-	margin-top:30rpx;
-  }
-</style>
+	.container {
+		padding: 40rpx;
+		background-color: #f5f7fa;
+		flex: 1;
+		box-sizing: border-box;
+	}
+
+	.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;
+	}
+
+	.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;
+	}
+</style>

+ 112 - 116
pages/work/record/RecordList.uvue

@@ -1,22 +1,16 @@
-<template>	
+<template>
 	<scroll-view scroll-y class="container">
 		<view class="banner">
 			<text class="banner-title">拍照点</text>
 		</view>
-		<view class="record-card" style="flex-direction: row;">			
-			<uni-tag
-			      v-for="(tag,index) in 6" :key="index"
-									:text="tag+''"	
-									 size="medium"
-									 type="primary"
-									circle								
-									@click="tabsClick(tag)"
-									style="width:40rpx;margin: 0 10rpx;"	  
-								></uni-tag>
+		<view class="record-card flex-row">
+			<uni-tag class="tag-circle" v-for="(tag,index) in 6" :key="index" :text="tag+''" size="medium" type="primary" circle
+				@click="tabsClick(tag)"></uni-tag>
 		</view>
 		<view class="record-card" v-for="(item, index) in records" :key="index" v-show="current == item.sxid as number">
 			<view class="header-row">
-				<text class="department">{{ item.photoitem }}</text>
+				<text class="label">序号:</text>
+				<text class="value">{{ item.photoitem }}</text>
 				<text class="status" :class="{'status-cancelled': item.status === '已取消'}">{{ item.status }}</text>
 			</view>
 
@@ -48,38 +42,28 @@
 			<button class="cancel-btn" v-if="item.status === '未执行'" @click="cancel(item.sxid)">
 				拍照
 			</button>
-						
-			<view class="info-row" style="margin: 10px 0;" >
-				  <view v-for="(tag,index) in item.imgname" :key="index" >	
-					<uni-badge text="x" absolute="rightTop" :offset="[-3,-3]" size="small" >
-					   <view>
-						<uni-tag
-						:text="tag"					
-						size="medium"
-						type="primary"
-						circle
-						v-if="closeTags[index]"
-						@click="closeTag(index)"	
-						></uni-tag>
-						</view>	
-					</uni-badge>  
-				</view> 
-			</view>	
+
+			<view class="info-row" style="margin: 10px 0;">
+				<view v-for="(tag,index) in item.imgname" :key="index">
+					<uni-badge text="x" absolute="rightTop" :offset="[-3,-3]" size="small">
+						<view>
+							<uni-tag :text="tag" size="medium" type="primary" circle v-if="closeTags[index]"
+								@click="closeTag(index)"></uni-tag>
+						</view>
+					</uni-badge>
+				</view>
+			</view>
 			<view class="my-page">
-				  <swiper class="swiper-box my-swiper" :current="0" :indicator-dots="true" v-if="item.urlpdt.length>0">
-				    <swiper-item v-for="(url, index) in item.urlpdt" :key="index">
-				      <view class="swiper-item ">
-				        <image class="my-image" :src="url" mode="aspectFill" />
-				      </view>
-				    </swiper-item>
-				  </swiper>  
-				  <image    
-				      :src="item.urlspl"  	  
-				      mode="widthFix" 
-				      v-if="item.urlpdt.length == 0"
-				    ></image>
+				<swiper class="swiper-box my-swiper" :current="0" :indicator-dots="true" v-if="item.urlpdt.length>0">
+					<swiper-item v-for="(url, index) in item.urlpdt" :key="index">
+						<view class="swiper-item ">
+							<image class="my-image" :src="url" mode="aspectFill" />
+						</view>
+					</swiper-item>
+				</swiper>
+				<image :src="item.urlspl" mode="widthFix" v-if="item.urlpdt.length == 0"></image>
 			</view>
-			
+
 		</view>
 	</scroll-view>
 </template>
@@ -89,69 +73,69 @@
 		ref
 	} from 'vue'
 	type Record = {
-		sxid: number,
-		senum: string,
-		photoitem: number,
-		productNo: string,			
-		part: string,
-		descb: string,
-		date: string,
-		partno: string,
-		num: number,
-		status: string,
-		urlspl: string
-		imgname: string[],
-		urlpdt: string[]
+		sxid : number,
+		senum : string,
+		photoitem : number,
+		productNo : string,
+		part : string,
+		descb : string,
+		date : string,
+		partno : string,
+		num : number,
+		status : string,
+		urlspl : string
+		imgname : string[],
+		urlpdt : string[]
 	}
-	
+
 	var current = ref(1)
 	var records = ref<Record[]>([]);
-	var closeTags = ref([true,true,true,true,true,true,true])	
+	var closeTags = ref([true, true, true, true, true, true, true])
 	const initRecords = [{
-			sxid: 1,
-			senum: '1',
-			photoitem: 1,
-			productNo: 'YH0001',			
-			part: '角焊缝',
-			descb: '角片角焊缝',
-			date: '2025-06-05',
-			partno: 'TD10-01',
-			num: 2,
-			status: '未执行',
-			urlspl: '/static/images/banner/banner01.jpg',
-			imgname: ['1.jpg','2.jpg'],
-			urlpdt: ['/static/images/banner/banner02.jpg', '/static/images/banner/banner03.jpg']
-		},
-		{
-			sxid: 2,
-			senum: '2',
-			photoitem: 2,
-			productNo: 'YH0002',
-			part: '角焊缝',
-			descb: '角片角焊缝',
-			date: '2025-06-05',
-			partno: 'TD10-02',
-			num: 3,
-			status: '未执行',
-			urlspl: '/static/images/banner/banner01.jpg',
-			imgname: ['1.jpg','2.jpg','3.jpg'],
-			urlpdt: []
-		}] as Record[];
-		
-	records.value = initRecords.filter(item=>item['photoitem'] == current.value)	
-	const tabsClick = (obj : number) =>{
+		sxid: 1,
+		senum: '1',
+		photoitem: 1,
+		productNo: 'YH0001',
+		part: '角焊缝',
+		descb: '角片角焊缝',
+		date: '2025-06-05',
+		partno: 'TD10-01',
+		num: 2,
+		status: '未执行',
+		urlspl: '/static/images/banner/banner01.jpg',
+		imgname: ['1.jpg', '2.jpg'],
+		urlpdt: ['/static/images/banner/banner02.jpg', '/static/images/banner/banner03.jpg']
+	},
+	{
+		sxid: 2,
+		senum: '2',
+		photoitem: 2,
+		productNo: 'YH0002',
+		part: '角焊缝',
+		descb: '角片角焊缝',
+		date: '2025-06-05',
+		partno: 'TD10-02',
+		num: 3,
+		status: '未执行',
+		urlspl: '/static/images/banner/banner01.jpg',
+		imgname: ['1.jpg', '2.jpg', '3.jpg'],
+		urlpdt: []
+	}] as Record[];
+
+	records.value = initRecords.filter(item => item['photoitem'] == current.value)
+	const tabsClick = (obj : number) => {
 		current.value = obj
-		records.value = initRecords.filter(item=>item['photoitem'] == current.value)		
+		records.value = initRecords.filter(item => item['photoitem'] == current.value)
 	}
-	const closeTag = (index:number) =>{		
+	const closeTag = (index : number) => {
 		closeTags.value[index] = false
 	}
 
-	const cancel = (id:number) => {
+	const cancel = (id : number) => {
 		uni.navigateTo({
 			url: `/pages/work/record/PhotoList?id=${id}`
 		})
-	}  
+	}
 </script>
 
 <style scoped>
@@ -166,7 +150,7 @@
 		min-height: 100vh;
 		/* #endif */
 	}
-	
+
 	.banner {
 		background: linear-gradient(135deg, #6dd5ed, #2193b0);
 		border-radius: 24rpx;
@@ -174,14 +158,14 @@
 		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;
 	}
-	
+
 	/* 卡片整体 */
 	.record-card {
 		background: #ffffff;
@@ -191,7 +175,7 @@
 		display: flex;
 		flex-direction: column;
 		margin-bottom: 20rpx;
-		margin-top: 40rpx;
+		margin-top: 20rpx;
 	}
 
 	/* 头部:科室 和 状态 */
@@ -233,6 +217,8 @@
 	.label {
 		color: #102a43;
 		min-width: 100rpx;
+		width: 180rpx;
+		line-height: 1.5;
 	}
 
 	.value {
@@ -266,35 +252,45 @@
 	.cancel-btn:active {
 		background-color: #a93232;
 	}
+
 	.swiper {
-	  height: 300rpx;
-	  margin: 20rpx 0;
+		height: 300rpx;
+		margin: 20rpx 0;
 	}
-	
+
 	.swiper-box {
-	  height: 150px;
+		height: 150px;
 	}
-	
+
 	.swiper-item {
-	  /* #ifndef APP-NVUE */
-	  display: flex;
-	  /* #endif */
-	  flex-direction: column;
-	  justify-content: center;
-	  align-items: center;
-	  color: #fff;
-	  height: 300rpx;
-	  line-height: 300rpx;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		color: #fff;
+		height: 300rpx;
+		line-height: 300rpx;
 	}
+
 	.my-page {
-	  display: flex;
-	  flex-direction: column;
-	  box-sizing: border-box;
-	  background-color: #fff;
+		display: flex;
+		flex-direction: column;
+		box-sizing: border-box;
+		background-color: #fff;
 		/* #ifndef APP-ANDROID */
 		min-height: 100%;
 		/* #endif */
-	  height: 100%;
+		height: 100%;
+	}
+
+	.flex-row {
+		flex-direction: row;
 	}
 
+	.tag-circle {
+		width: 40rpx;
+		margin: 0 10rpx;
+	}
 </style>

+ 3 - 2
pages/work/report/InspectionList.uvue

@@ -87,7 +87,7 @@
 					<view class="value">
 						<input
 						    v-model="item.conclusion"
-						    class="surround"
+						    class="surround uni-input"
 						  ></input>
 					</view>	
 				</view>
@@ -314,6 +314,7 @@
 		color: #999;
 	}
 	.surround {
-		border: 2px solid #999;
+		border: 1px solid silver;
+		border-radius: 10rpx;
 	}
 </style>