Selaa lähdekoodia

fix-风险等级修改

LAPTOP-U5GOA5HA\zz 1 vuosi sitten
vanhempi
commit
ace998bc27

+ 7 - 9
app/src/views/Detail/components/Risklevel.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="level">
-    <div class="fxdj" :style="'background-color: ' + color">{{ detail.fxdj }}</div>
+    <div class="fxdj" :style="'background-color: ' + color">{{ detail.fxdj&&detail.fxdjYs!='低风险(蓝色)'?detail.fxdj:'较低风险' }}</div>
     <!-- 风险等级 -->
     <div class="row" style="padding-right: 150px;">
       <div
@@ -181,7 +181,6 @@ export default {
         yhzt: '已整改',
       };
       getFxdj(param).then((res) => {
-        console.log('-----fengx ',res);
         if (res.data.rows) {
           this.fxd = res.data.rows.map((p) => p.yhxmmc);
         }
@@ -208,16 +207,15 @@ export default {
         }
         this.hzs = list;
       });
-
-      console.log(this.detail.fxdj.indexOf("重大风险"));
       if (this.detail.fxdj) {
+        console.log('-----详情',this.detail);
         let color = "";
         let bgColor = "";
-        if (this.detail.fxdj.indexOf("低风险") >= 0) {
-          color = "#00A3FF";
-          bgColor = "#00A3FF";
+        if (this.detail.fxdj.indexOf("低风险") >= 0&&this.detail.fxdjYs.indexOf("绿色") >= 0) {
+          color = "#2DD25D";
+          bgColor = "#2DD25D";
         } else if (this.detail.fxdj.indexOf("一般风险") >= 0) {
-          color = "#fbff3d";
+          color = "#FFE600";
         } else if (
           this.detail.fxdj.indexOf("较大风险") >= 0 ||
           this.detail.fxdj.indexOf("较高风险") >= 0
@@ -227,7 +225,7 @@ export default {
         } else if (this.detail.fxdj.indexOf("重大风险") >= 0) {
           color = "#ff0b0b";
           bgColor = "#ff0b0b";
-        } else {
+        } else if(this.detail.fxdjYs.indexOf("蓝色")>=0) {
           color = "#35c2ff";
           bgColor = "#35c2ff";
         }

+ 21 - 3
app/src/views/Home/components/RiskWarning.vue

@@ -233,11 +233,22 @@ export default {
   },
   methods: {
     showValue(label) {
+      console.log('---------lable',label);
       if (label === '低风险') {
-        return 40697
+        // return 40740
+        label='低风险(绿色)'
       }
       if (label === '较低风险') {
-        label = '低风险'
+        label = '低风险(蓝色)'
+      }
+      if (label === '一般风险') {
+        label = '一般风险(黄色)'
+      }
+      if (label === '较大风险') {
+        label = '较大风险(橙色)'
+      }
+      if (label === '重大风险') {
+        label = '重大风险(红色)'
       }
       const item = this.riskList.find((item) => item.fxdj === label);
       return item ? item.sl : 0;
@@ -458,7 +469,14 @@ export default {
       return dataArr;
     },
     showStice(val) {
-      this.$emit("showFxyj", val);
+      let str=val
+      if(val=='低风险'){
+        str='低风险(绿色)'
+      }
+      if(val=='较低风险'){
+        str='低风险(蓝色)'
+      }
+      this.$emit("showFxyj", str);
     },
     addClass(v) {
       return this.idx == v ? " tab active" : "tab";

+ 1 - 0
app/src/views/Home/index.vue

@@ -291,6 +291,7 @@ export default {
     getList() {
       totaldata({ ...this.params, qy: this.qy === "重庆市" ? "" : this.qy })
         .then((res) => {
+          console.log('-------预警预测',res);
           if (res.data.code == 200) {
             this.riskList = res.data.rows;
           }