ly 3 yıl önce
ebeveyn
işleme
a658ef1e15

+ 8 - 3
ui/src/views/monitor/elec/bottomRight.vue

@@ -14,7 +14,7 @@
         </div>
       </div>
       <div style="display:flex;flex-direction:row">
-        <div style="flex: 3">
+        <div style="flex: 3" >
           <bottomRightChart :weekData="weekData"/>
         </div>
       <div class="naturalGasData" style="flex: 1">
@@ -46,6 +46,7 @@
 
       </div>
     </div>
+
   </div>
 </template>
 
@@ -54,14 +55,18 @@ import bottomRightChart from "./echart/bottom/bottomRightChart";
 export default {
   props:['weekData'],
   data() {
-    return {};
+    return {
+      openChart: false,
+    };
   },
   components: {
     bottomRightChart
   },
   mounted() {
   },
-  methods: {}
+  methods: {
+
+  }
 };
 </script>
 

+ 8 - 8
ui/src/views/monitor/elec/centerLeft1.vue

@@ -273,18 +273,18 @@ export default {
             data:dateNum,
             type: 'line',
             itemStyle: {
-              color: 'rgb(78,109,60)'
+              color: 'rgb(255,128,0)'
             },
             symbol: "none",
             areaStyle: {
               color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [
                 {
                   offset: 0,
-                  color: 'rgb(207,243,68)'
+                  color: 'rgb(253,222,2)'
                 },
                 {
                   offset: 1,
-                  color: 'rgb(119,189,74)'
+                  color: 'rgb(255,128,0)'
                 }
               ])
             },
@@ -519,18 +519,18 @@ export default {
             data:dateNum,
             type: 'line',
             itemStyle: {
-              color: 'rgb(142,161,131)'
+              color: 'rgb(0,128,0)'
             },
             symbol: "none",
             areaStyle: {
               color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [
                 {
                   offset: 0,
-                  color: 'rgb(229,245,171)'
+                  color: 'rgb(128,255,0)'
                 },
                 {
                   offset: 1,
-                  color: 'rgb(156,186,137)'
+                  color: 'rgb(0,128,0)'
                 }
               ])
             },
@@ -643,7 +643,7 @@ export default {
             data:dateNum,
             type: 'line',
             itemStyle: {
-              color: 'rgb(60,95,109)'
+              color: 'rgb(128,0,109)'
             },
             symbol: "none",
             areaStyle: {
@@ -654,7 +654,7 @@ export default {
                 },
                 {
                   offset: 1,
-                  color: 'rgb(74,143,189)'
+                  color: 'rgb(128,0,255)'
                 }
               ])
             },

+ 26 - 2
ui/src/views/monitor/elec/centerRight1.vue

@@ -167,7 +167,19 @@ export default {
           {
             type: 'line',
             showSymbol: false,
-            data: dateNum
+            data: dateNum,
+            areaStyle: {
+              color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                {
+                  offset: 0,
+                  color: 'rgb(255,255,0)'
+                },
+                {
+                  offset: 1,
+                  color: 'rgb(255,128,0)'
+                }
+              ])
+            }
           },
         ]
       })
@@ -291,7 +303,19 @@ export default {
           {
             type: 'line',
             showSymbol: false,
-            data: dateNum
+            data: dateNum,
+            areaStyle: {
+              color: new this.echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                {
+                  offset: 0,
+                  color: 'rgb(255,255,0)'
+                },
+                {
+                  offset: 1,
+                  color: 'rgb(255,128,0)'
+                }
+              ])
+            }
           },
         ]
       })

+ 106 - 2
ui/src/views/monitor/elec/echart/bottom/bottomRightChart.vue

@@ -1,7 +1,10 @@
 <template>
-  <div>
+  <div @click="openSteamBalance">
     <div id="bottomRightChart" style="width:100%;height:3.5rem;top: -20px"></div>
   </div>
+  <el-dialog class="my-info-dialog" :visible.sync="openChart" title="BYC用电情况" @open="open" width="1600px" destroy-on-close append-to-body>
+    <div id="BYCChart1" style="width:100%;height:600px;"></div>
+  </el-dialog>
 </template>
 
 <script>
@@ -11,7 +14,8 @@ export default {
   props:['weekData'],
   data() {
     return {
-      chart: null
+      chart: null,
+      openChart: false,
     };
   },
   mounted() {
@@ -25,6 +29,12 @@ export default {
         this.draw();
       }, 6000);
     },
+    openSteamBalance(){},
+    open(){
+      this.$nextTick(() => {
+        this.initBycChartDialog()
+      })
+    },
     draw() {
       // 基于准备好的dom,初始化echarts实例
       this.chart = this.echarts.init(document.getElementById("bottomRightChart"));
@@ -308,6 +318,100 @@ export default {
       };
 
       this.chart.setOption(option);
+    },
+    drawDialog() {
+      // 基于准备好的dom,初始化echarts实例
+      this.chart1 = this.echarts.init(document.getElementById("bottomRightChart"));
+      //  ----------------------------------------------------------------
+      // 数据
+      let dateBase = new Date();
+      let year = dateBase.getFullYear();
+      let dottedBase = +dateBase + 1000 * 3600 * 24;
+      let weekCategory = [];
+
+      let maxData = 12000;
+      let weekMaxData = [];
+      let weekLineData = [];
+
+      // 周数据
+      for (let i = 0; i < 7; i++) {
+        // 日期
+        var date = new Date((dottedBase -= 1000 * 3600 * 24));
+        weekCategory.unshift([date.getMonth() + 1, date.getDate()].join("/"));
+
+        // 折线图数据
+        weekMaxData.push(maxData);
+        var distance = Math.round(Math.random() * 11000 + 500);
+        weekLineData.push(distance);
+      };
+      const dateNum = [];
+      for (let i = 0; i < this.weekData.length; i++) {
+        dateNum[i] = this.weekData[i].evconsume;
+      }
+      let option = {
+        tooltip: {
+          trigger: "item"
+        },
+        grid: {
+          left: 90,
+          right: 80,
+          bottom: 40,
+          top: "30%"
+        },
+        xAxis: {
+          type: "category",
+          position: "bottom",
+          axisLine: true,
+          axisLabel: {
+            color: "rgba(255,255,255,.8)",
+            fontSize: 12
+          },
+          data: ['08:00' ,'11:00' ,'14:00' ,'17:00' ,'20:00' ,'23:00' ,'02:00' ,'05:00' ]
+          // data: weekCategory
+        },
+
+        yAxis: {
+          type: 'value'
+        },
+        series: [
+          {
+            data: [99, 180, 200, 310, 459, 601, 800 ,933],
+            // data:dateNum,
+            type: 'line',
+            smooth: true,
+            symbolSize: 15,
+            color:"#28f8de",
+            lineStyle: {
+              width: 6
+            },
+            markLine: {
+              silent: true,
+              data: [
+                {
+                  type: "average",
+                  name: "额定值",
+                  yAxis: 900
+                }
+              ],
+              precision: 0,
+              label: {
+                normal: {
+                  formatter: "额定值: \n {c}"
+                }
+              },
+              lineStyle: {
+                normal: {
+                  width: 3,
+                  color: "rgba(248,211,81,.7)"
+                }
+              }
+            },
+          }
+        ]
+
+      };
+
+      this.chart1.setOption(option);
     }
   },
   destroyed() {