lihao vor 4 Jahren
Ursprung
Commit
7b26b2e5f3
2 geänderte Dateien mit 27 neuen und 27 gelöschten Zeilen
  1. 2 2
      src/components/bigData/index.vue
  2. 25 25
      src/components/fangxincha/huan2d.vue

+ 2 - 2
src/components/bigData/index.vue

@@ -130,8 +130,8 @@
     <div class="fxc_right2">
       <div class="fxc_tit">监测数量</div>
       <div class="fxc_right2_con">
-        <huan2d :id="'huan2d1'" :chipCountData="chipCountData"></huan2d>
-        <!-- <huan2d :id="'huan2d1'" :chipCountData="chipCountData" :value1="1220" :value2="1000" :value3="1200"></huan2d> -->
+        <!-- <huan2d :id="'huan2d1'" :chipCountData="chipCountData"></huan2d> -->
+        <huan2d :id="'huan2d1'" :chipCountData="chipCountData" :value1="1220" :value2="1000" :value3="1200"></huan2d>
       </div>
     </div>
     <div class="no_login" @click="goLogin" v-if="!token">

+ 25 - 25
src/components/fangxincha/huan2d.vue

@@ -12,15 +12,15 @@
         type:String,
         required:true
       },
-      // value1:{
-      //   default:1,
-      // },
-      // value2:{
-      //   default:1,
-      // },
-      // value3:{
-      //   default:1,
-      // },
+      value1:{
+        default:1,
+      },
+      value2:{
+        default:1,
+      },
+      value3:{
+        default:1,
+      },
       chipCountData:{
         default:[],
       },
@@ -34,15 +34,15 @@
       this.moreChart();
     },
     watch: {
-      // value1(){
-      //   this.updataChart()
-      // },
-      // value2(){
-      //   this.updataChart()
-      // },
-      // value3(){
-      //   this.updataChart()
-      // },
+      value1(){
+        this.updataChart()
+      },
+      value2(){
+        this.updataChart()
+      },
+      value3(){
+        this.updataChart()
+      },
       chipCountData(){
         this.updataChart()
       },
@@ -54,13 +54,13 @@
         if(token)this.chart.series[0].update({
           data:that.chipCountData
         })
-        // this.chart.series[0].update({
-        //   data:[
-        //     ['科兴',that.value1],
-        //     ['康希诺',that.value2],
-        //     ['生物',that.value3],
-        //   ]
-        // })
+        else this.chart.series[0].update({
+          data:[
+            ['科兴',that.value1],
+            ['康希诺',that.value2],
+            ['生物',that.value3],
+          ]
+        })
       },
       moreChart() {
         var chipCountData = this.chipCountData