wangtao 2 lat temu
rodzic
commit
6bb76cf9df

+ 5 - 5
src/views/business/fireInternet/deviceMonitoring/waterMonitoring/device/index.vue

@@ -234,9 +234,9 @@ export default {
           this.contain2 = true
           this.index2Data = arr
           this.index1Data = {
-            dianliang:this.index2Data[0][0][1],
-            xinhao:this.index2Data[1][0][1],
-            createTime:this.index2Data[0][0][0]
+            dianliang:this.index2Data[0][this.index2Data[0].length-1][1],
+            xinhao:this.index2Data[1][this.index2Data[1].length-1][1],
+            createTime:this.index2Data[0][this.index2Data[0].length-1][0]
           }
           this.index2Data[2] = {name:"水系统设备工况情况跟踪",color:"#00FFFF"}
           this.loading1 = false
@@ -381,14 +381,14 @@ export default {
           }
         }
         .contain2{
-          margin-top:-4rem;
+          margin-top:-3rem;
           vertical-align: top;
           width:42%;
           display: inline-block;
           p{
             text-align: center;
             font-size: 1.4rem;
-            margin:-5vh 0 0 0%;
+            margin:-2vh 0 0 0%;
           }
         }
       }

+ 1 - 1
src/views/business/fireInternet/deviceMonitoring/waterMonitoring/offLine/index.vue

@@ -232,7 +232,7 @@ export default {
       bt:false,
       zxt:false,
       img:require('@/assets/images/2.png'),
-      title:"水系统控离线处理情况",
+      title:"水系统控离线处理情况",
       index1Data:{},//饼图
       index2Data:[],//折线图
       index3Data:[],//table

+ 7 - 6
src/views/components/fireInternetInfo/index1.vue

@@ -1,6 +1,6 @@
 <template>
   <el-row>
-    <div id="index1" ref="echartD" style="width:100%;height:30vh;"></div>
+    <div id="index1" ref="echartD" style="width:100%;height:250%;"></div>
   </el-row>
 </template>
 <script>
@@ -42,6 +42,7 @@ export default {
           value:(1-this.dataMap).toFixed(2)
         }
       ]
+      let myChart = echarts.init(document.getElementById("index1"));
       echarts.init(this.$refs.echartD).setOption({
         color: [
           this.color,
@@ -62,18 +63,16 @@ export default {
           trigger: "item",
           formatter: function(params) {
             return (
+              params.name +
 
-              "占比:" +
-              (params.value * 100).toFixed(2) +
+              "<br>占比:" +
+              (params.value / 100 * 100).toFixed(2) +
               "%"
             );
           }
         },
         series: [
           {
-            name: '',
-            type: 'pie',
-            radius: ['40%', '60%'],
             emphasis: {
               label: {
                 show: true,
@@ -81,6 +80,8 @@ export default {
                 fontWeight: 'bold'
               }
             },
+            radius: ["45%", "60%"],
+            type: "pie", // 设置图表类型为饼图
             data: data
           }
         ]

+ 1 - 1
src/views/components/fireInternetInfo/index3.vue

@@ -1,6 +1,6 @@
 <template>
   <el-row>
-    <div id="index1" ref="echartD" style="width:100%;height:300px;" ></div>
+    <div id="index1" ref="echartD" style="width:100%;height:250%;" ></div>
   </el-row>
 </template>
 <script>

+ 58 - 56
src/views/components/fireInternetInfo/index4.vue

@@ -22,6 +22,7 @@ export default {
     getData() {
       let myChart = echarts.init(document.getElementById("index4"));
       let data = this.resData;
+      console.log(data)
       let option = {
         legend: {
           itemGap: 20, // 图例每项之间的间隔。
@@ -78,18 +79,18 @@ export default {
               fontSize: 14,
               padding: [0, 80, 0, 0]
             },
-            axisLine: {
-                lineStyle: {
-                    type:  'solid' ,
-                    color:  '#FF0087' , //左边线的颜色
-                    width: '1' //坐标线的宽度
-                }
-            },
-            axisLabel: {
-                textStyle: {
-                    color:  '#FF0087' , //坐标值得具体的颜色
-                }
-            },
+            // axisLine: {
+            //     lineStyle: {
+            //         type:  'solid' ,
+            //         color:  '#FF0087' , //左边线的颜色
+            //         width: '1' //坐标线的宽度
+            //     }
+            // },
+            // axisLabel: {
+            //     textStyle: {
+            //         color:  '#FF0087' , //坐标值得具体的颜色
+            //     }
+            // },
 
         }, {
             // min:0,  //取0为最小刻度
@@ -104,40 +105,42 @@ export default {
               fontSize: 14,
               padding: [0, 0, 0, 80]
             },
-            axisLine: {
-                lineStyle: {
-                    type:  'solid' ,
-                    color:  '#80FFA5' , //左边线的颜色
-                    width: '1' //坐标线的宽度
-                }
-            },
-            axisLabel: {
-                textStyle: {
-                    color:  '#80FFA5' , //坐标值得具体的颜色
-                }
-            },
+            // axisLine: {
+            //     lineStyle: {
+            //         type:  'solid' ,
+            //         color:  '#80FFA5' , //左边线的颜色
+            //         width: '1' //坐标线的宽度
+            //     }
+            // },
+            // axisLabel: {
+            //     textStyle: {
+            //         color:  '#80FFA5' , //坐标值得具体的颜色
+            //     }
+            // },
         }],
-        series: [{
+        series: [
+          {
             name: "剩余电量",
             type: 'line',
-            stack: 'Total',
-            smooth: true,
+            // stack: 'Total',
+            // smooth: true,
             axisLine: {
               lineStyle: {
-                color: 'red',
+                // color: 'red',
                 width: 0, //这里是为了突出显示加上的
               }
             },
             areaStyle: {
-              opacity: 0.8,
+              opacity: 1,
               color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+
                 {
                     offset: 0,
-                    color: 'rgb(128, 255, 165)'
+                    color: 'rgb(255, 0, 135)'
                   },
                   {
                     offset: 1,
-                    color: 'rgb(1, 191, 236)'
+                    color: 'rgb(135, 0, 157)'
                   }
               ])
             },
@@ -145,47 +148,46 @@ export default {
             emphasis: {
               focus: 'series'
             },
-            data: data[1],
             yAxisIndex: 0,  // 通过这个判断左右
+            data: data[0],
         }, {
-          name: "信号",
+          name: "无线信号",
           type: 'line',
-          stack: 'Total',
-          smooth: true,
+          // stack: 'Total',
+          // smooth: true,
           axisLine: {
             lineStyle: {
-                color: '#ccc',
+                // color: '#ccc',
                 width: 0, //这里是为了突出显示加上的
             }
           },
           areaStyle: {
-                opacity: 0.8,
-                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-
-                  {
-                      offset: 0,
-                      color: 'rgb(255, 0, 135)'
-                    },
-                    {
-                      offset: 1,
-                      color: 'rgb(135, 0, 157)'
-                    }
-                ])
-              },
+            opacity: 1,
+            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+              {
+                  offset: 0,
+                  color: 'rgb(128, 255, 165)'
+                },
+                {
+                  offset: 1,
+                  color: 'rgb(1, 191, 236)'
+                }
+            ])
+          },
           showSymbol: false,
           emphasis: {
             focus: 'series'
           },
-          data: data[0],
-          yAxisIndex: 1,
+          yAxisIndex: 1,  // 通过这个判断左右
+          data: data[1],
+
 
         }]
       };
-
-        myChart.setOption(option);
-        window.addEventListener("resize", function() {
-            myChart.resize();
-        });
+      myChart.setOption(option);
+      window.addEventListener("resize", function() {
+          myChart.resize();
+      });
     }
   }
 };

+ 1 - 2
vue.config.js

@@ -33,7 +33,6 @@ module.exports = {
         proxy: {
             // detail: https://cli.vuejs.org/config/#devserver-proxy
             [process.env.VUE_APP_BASE_API]: {
-                //target: `http://172.16.120.213:8084/`, //本地
                 //target: 'http://172.16.120.49/dmapi/', //49
                 target: 'https://smartpark.caih.com/dmapi/', //东信
                 changeOrigin: true,
@@ -126,4 +125,4 @@ module.exports = {
                 }
             )
     }
-}
+}