wgl 4 лет назад
Родитель
Сommit
0113e7892b
1 измененных файлов с 11 добавлено и 1 удалено
  1. 11 1
      src/projects/business/views/Common/Health/Cert.vue

+ 11 - 1
src/projects/business/views/Common/Health/Cert.vue

@@ -145,7 +145,9 @@
 						this.maxTemparture = response[0]['temperatureMax'];
 						this.detail.totalDays = response[0]['totalDays'];
 						this.detail.undetectedCount = response[0]['undetectedCount'];
-						this.getStatus()
+						//this.getStatus()
+						//只根据绿码来判断状态
+						this.getGreenCode()
 						this.echarts();
 					}
 
@@ -155,6 +157,14 @@
 					mui.toast(error);
 				})
 			},
+			//根据绿码显示颜色
+			getGreenCode() {
+				var colors = this.$refs.greenCode.getCode();
+				this.statusColor = colors.foreground;
+				this.statusTitleColor = colors.foreground;
+				this.statusName = colors.title;
+				console.log(colors);
+			},
 			//计算显示颜色
 			getStatus() {
 				if (this.chartsList.length) {