瀏覽代碼

样式修改

lilei 4 年之前
父節點
當前提交
99fa4a5e03
共有 2 個文件被更改,包括 20 次插入16 次删除
  1. 1 1
      pages/spotCheckCenter/spotCheckResult.vue
  2. 19 15
      pages/spotCheckCenter/spotChecking.vue

+ 1 - 1
pages/spotCheckCenter/spotCheckResult.vue

@@ -80,7 +80,7 @@
 					height: 160upx;
 					display: inline-block;
 					line-height: 160upx;
-					background: #ff5500;
+					background: #ffaa00;
 					border-radius: 100%;
 					color: #fff;
 					font-size: 60upx;

+ 19 - 15
pages/spotCheckCenter/spotChecking.vue

@@ -15,7 +15,9 @@
 						:key="item.id">
 							<view class="check-row" @click="viewRow(item)">
 								<view class="createDate">{{ item.createDate }}</view>
-								<view :class="clsStatus(item.status)">{{ item.statusDictValue }}</view>
+								<view>
+								  <u-tag class="item-c-type" :text="item.statusDictValue" :type="item.status | statusCls" />
+								</view>
 							</view>
 							<view class="check-row" @click="viewRow(item)">
 								<view>
@@ -71,6 +73,22 @@ export default {
 	onUnload() {
 		uni.$off("updatePointTaskList")
 	},
+	filters: {
+		// 状态颜色标记
+		statusCls(val){
+			let str = ''
+			if(val == 'PENDING'){
+				str = 'error'
+			}else if(val == 'RUNNING'){
+				str = 'primary'
+			}else if(val == 'FINISHED'){
+				str = 'success'
+			}else if(val == 'EXPIRED'){
+				str = 'warning'
+			}
+			return str
+		},
+	},
 	methods: {
 		message(title) {
 			uni.showToast({
@@ -191,20 +209,6 @@ export default {
 				this.toSpotCheck(item)
 			}
 		},
-		clsStatus(status){
-			if(status == 'PENDING'){  //  待处理
-				return 'dcl'
-			}
-			// if(status == '进行中'){
-			// 	return 'jxz'
-			// }
-			if(status == 'FINISHED'){  //  已完成
-				return 'ywc'
-			}
-			if(status == 'EXPIRED'){  //  已过期
-				return 'ygq'
-			}
-		}
 	}
 };
 </script>