瀏覽代碼

添加前一项和下一项和序列号的联动,添加选中序列号样式

zhangxike 2 天之前
父節點
當前提交
546926ee68

+ 1 - 1
pages/login.uvue

@@ -209,7 +209,7 @@
           font-size: 38rpx;
           color: #999;
 		/* #endif */
-		  margin-left: 10px;
+		  // margin-left: 10px;
         }
 
         .input {

+ 23 - 15
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>
@@ -24,13 +24,16 @@
 				<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="{
+							'bg-green bg-text': taskProcess.state === 'done',
+							'bg-yellow bg-text': taskProcess.state === 'doing',
+							'bg-black bg-text': taskProcess.state === 'waiting',
+							'bg-red bg-text': taskProcess.state === 'error'
+						  }">
+							{{taskProcess.step}}/{{taskProcess.num}}
+						</text>
+					</uni-td>
 					<uni-td class="grid-text">
 						<text :class="{
 							'ft-red': taskProcess.state === 'error'
@@ -39,7 +42,7 @@
 				</uni-tr>
 			</uni-table>
 		</view>
-		
+
 	<!-- #ifdef APP -->
 	</scroll-view>
 	<!-- #endif -->
@@ -208,28 +211,33 @@
 		border-radius: 10rpx;
 	}
 
+	.bg-text {
+		width: 100rpx;
+		min-width: 80rpx;
+		border-radius: 10rpx;
+		text-align: center;
+	}
+
 	.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>

+ 19 - 4
pages/work/process/ProcessList.uvue

@@ -2,7 +2,8 @@
 	<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 class="tag-circle" v-for="(tag,index) in maxcount" :key="index" @click="tabsClick(tag)">
+		<view class="tag-circle" v-for="(tag,index) in maxcount" :key="index" @click="tabsClick(tag)"
+		:class="{'checked-tag' : tag === current}">
 			<text class="circle" :class="{
 							'bg-green': tag<=2,
 							'bg-yellow': tag%3 === 0,
@@ -345,11 +346,14 @@
 	}
 
 	.tag-circle {
-		width: 50rpx;
+		width: 60rpx;
+		height: 60rpx;
 		margin: 0 10rpx;
-		border-radius: 50rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
 	}
-
+	
 	.circle {
 		height: 50rpx;
 		width: 50rpx;
@@ -357,6 +361,17 @@
 		text-align: center;
 		color: #fff;
 		line-height: 50rpx;
+		border-radius: 50rpx;
+	}
+	
+	.checked-tag {
+		height: 60rpx;
+		width: 60rpx;
+		line-height: 60rpx;
+		border: 2rpx solid #ffffff;
+		box-shadow: 0 0 0 2rpx #007aff;
+		position: relative;
+		z-index: 10;
 	}
 
 	.bg-green {

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

@@ -2,7 +2,8 @@
 	<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 class="tag-circle" v-for="(tag,index) in maxcount" :key="index" @click="tabsClick(tag)">
+		<view class="tag-circle" v-for="(tag,index) in maxcount" :key="index" @click="tabsClick(tag)"
+			:class="{'checked-tag' : tag === current}">
 			<text class="circle" :class="{
 							'bg-green': tag<=2,
 							'bg-yellow': tag%3 === 0,
@@ -69,7 +70,7 @@
 					</swiper-item>
 				</swiper>
 				<image :src="item.urlspl" mode="widthFix" v-if="item.urlpdt.length == 0"></image>
-				<view class="demo-view">
+				<view>
 					<text class="demo-view-label">样张</text>
 				</view>
 			</view>
@@ -142,7 +143,7 @@
 		status: '未执行',
 		urlspl: '/static/images/demo.png',
 		imgname: ['1.jpg', '2.jpg', '3.jpg'],
-		urlpdt: []
+		urlpdt: ['/static/images/demo.png', '/static/images/demo.png', '/static/images/demo.png']
 	}] as Record[];
 
 	records.value = initRecords.filter(item => item['photoitem'] == current.value)
@@ -320,9 +321,12 @@
 	}
 
 	.tag-circle {
-		width: 50rpx;
+		width: 60rpx;
+		height: 60rpx;
 		margin: 0 10rpx;
-		border-radius: 50rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
 	}
 
 	.circle {
@@ -332,6 +336,17 @@
 		text-align: center;
 		color: #fff;
 		line-height: 50rpx;
+		border-radius: 50rpx;
+	}
+
+	.checked-tag {
+		height: 60rpx;
+		width: 60rpx;
+		line-height: 60rpx;
+		border: 2rpx solid #ffffff;
+		box-shadow: 0 0 0 2rpx #007aff;
+		position: relative;
+		z-index: 10;
 	}
 
 	.bg-green {

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

@@ -2,7 +2,8 @@
 	<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 class="tag-circle" v-for="(tag,index) in maxcount" :key="index" @click="tabsClick(tag)">
+		<view class="tag-circle" v-for="(tag,index) in maxcount" :key="index" @click="tabsClick(tag)"
+		:class="{'checked-tag' : tag === current}">
 			<text class="circle" :class="{
 							'bg-green': tag<=2,
 							'bg-yellow': tag%3 === 0,
@@ -343,9 +344,12 @@
 	}
 	
 	.tag-circle {
-		width: 50rpx;
+		width: 60rpx;
+		height: 60rpx;
 		margin: 0 10rpx;
-		border-radius: 50rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
 	}
 	
 	.circle {
@@ -355,6 +359,17 @@
 		text-align: center;
 		color: #fff;
 		line-height: 50rpx;
+		border-radius: 50rpx;
+	}
+	
+	.checked-tag {
+		height: 60rpx;
+		width: 60rpx;
+		line-height: 60rpx;
+		border: 2rpx solid #ffffff;
+		box-shadow: 0 0 0 2rpx #007aff;
+		position: relative;
+		z-index: 10;
 	}
 	
 	.bg-green {