lihao há 4 anos atrás
pai
commit
a7e1555a79

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

@@ -366,8 +366,8 @@ background-image:-webkit-linear-gradient(bottom,#53A0FF,#ffffff);-webkit-backgro
 .no_login{ position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 1; display: flex; justify-content: center; align-items: center;}
 .no_login>div{ width: auto; padding: 20px; background: #ffffff; font-size: 20px; line-height: 36px; border-radius: 5px; color: #2DC1FF;}
 
-.fxc_left_con1{ width: 23vw; height: 1.5rem; margin: auto; position: relative;}
-.fxc_left_con2{ width: 23vw; height: 1.66rem; margin: auto; position: relative;}
+.fxc_left_con1{ width: 23vw; height:24.4vh; margin: auto; position: relative;}
+.fxc_left_con2{ width: 23vw; height: 26.9vh; margin: auto; position: relative;}
 .fxc_left_ctit{ font-size: 0.7vw; line-height: 0.28rem; color:#ffffff; position: relative; z-index: 1;}
 .fxc_left_ch1{ position: absolute; top: 0; left: 0; right: 0; bottom: 0;}
 .fxc_left_ch2{ position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: stretch;}

+ 9 - 1
src/components/fangxincha/barChart.vue

@@ -8,6 +8,11 @@ export default {
   props: {
     chipStates: Array
   },
+  watch: {
+      chipStates(){
+        this.myEcharts()
+      },
+  },
   methods:{
     // getData(){
     //   getEvvmChipStatus2().then(response => {
@@ -22,7 +27,6 @@ export default {
 	  myEcharts(){
       var token = localStorage.getItem("token")
       var chipStates = this.chipStates
-      console.log(chipStates)
 		  this.myChart = this.echarts.init(document.getElementById('barchartCon'));
 		  this.option = {
         color:["#3E9DFF","#EE9C17","#E82A30"],
@@ -126,6 +130,10 @@ export default {
   },
   mounted() {
   	this.myEcharts();
+    var that = this
+    window.onresize = () => {
+        that.myChart.resize();
+    }
   }
 }
 </script>

+ 14 - 10
src/components/fangxincha/huan2.vue

@@ -32,7 +32,7 @@ export default {
       var that = this
       var token = localStorage.getItem("token")
       var list = this.list
-      // if(token)list = this.warningState
+      if(token)list = this.warningState
       list.total = list.total10 + list.total11 + list.total20
       var num1 = list.warning11
       var total1 = list.total11
@@ -68,7 +68,7 @@ export default {
 				  show:true
         },
 			  legend: {
-          data:['全程温度', '实时温控'],
+          data:['全程温度 '+num2, '实时温控 '+num1],
 				  bottom:0,
           icon:"rect",
           itemWidth:12,
@@ -89,8 +89,8 @@ export default {
       return [{
           type: 'pie',
           silent:1,
-          radius: ['60%', '62%'],
-          center: ["50%", '40%'],
+          radius: ['65%', '67%'],
+          center: ["50%", '45%'],
           label:{
             show:false,
           },
@@ -104,26 +104,26 @@ export default {
         {
           type: 'pie',
           silent:1,
-          radius: ['25%', '35%'],
-          center: ["50%", '40%'],
+          radius: ['30%', '40%'],
+          center: ["50%", '45%'],
           label:{
             show:false,
           },
           data: [
             {value:num2,name,itemStyle:{color:"#7A4AFF",}},
-            {value:(num2==0?1:(total2-num2)),name:"全程温度",itemStyle:{color:"#1C5FA5",}},
+            {value:(num2==0?1:(total2-num2)),name:"全程温度 "+num2,itemStyle:{color:"#1C5FA5",}},
           ],
         },
         {
           type: 'pie',
           silent:1,
-          radius: ['40%', '50%'],
-          center: ["50%", '40%'],
+          radius: ['45%', '55%'],
+          center: ["50%", '45%'],
           label:{
             show:false,
           },
           data: [
-            {value:num1,name:"实时温控",itemStyle:{color:"#FFAE36",},},
+            {value:num1,name:"实时温控 "+num1,itemStyle:{color:"#FFAE36",},},
             {value:(num1==0?1:(total1-num1)),name:"",itemStyle:{color:"#1C5FA5",}},
           ],
           label: {
@@ -140,6 +140,10 @@ export default {
   },
   mounted() {
   	this.myEcharts();
+    var that = this
+    window.onresize = () => {
+        that.myChart.resize();
+    }
   }
 }
 </script>

+ 3 - 0
src/components/fangxincha/huan2d.vue

@@ -87,12 +87,15 @@
             pointFormat: '{name}: <b>{point.percentage:.1f}%</b>'
           },
           legend:{
+            // enabled:false,
             layout:"horizontal",
             align: 'center',
             verticalAlign: 'top', 
+
             // layout:"vertical",
             // align: 'right',
             // verticalAlign: 'middle', 
+
             labelFormat:"{name} {y}",
             itemStyle:{
               "color": "#ffffff"

+ 6 - 2
src/components/fangxincha/huan4.vue

@@ -66,7 +66,7 @@ export default {
       return [{
           type: 'pie',
           silent:1,
-          radius: ['60%', '62%'],
+          radius: ['46%', '48%'],
           center: [pos, '60%'],
           label:{
             show:false,
@@ -81,7 +81,7 @@ export default {
         {
           type: 'pie',
           silent:1,
-          radius: ['35%', '50%'],
+          radius: ['25%', '37%'],
           center: [pos, '60%'],
           label:{
             show:false,
@@ -104,6 +104,10 @@ export default {
   },
   mounted() {
   	this.myEcharts();
+    var that = this
+    window.onresize = () => {
+        that.myChart.resize();
+    }
   }
 }
 </script>

+ 5 - 1
src/components/fangxincha/lineChart.vue

@@ -102,7 +102,7 @@ export default {
         },
 			  series: [
           {
-            name: '正常',
+            // name: '正常',
             type: 'line',
             stack: '总量',
             smooth: true,
@@ -160,6 +160,10 @@ export default {
   },
   mounted() {
   	this.myEcharts();
+    var that = this
+    window.onresize = () => {
+        that.myChart.resize();
+    }
   }
 }
 </script>