Browse Source

+ 大屏网接口对接

chen.cheng 1 month ago
parent
commit
52050540c4

+ 15 - 0
ems-ui-cloud/src/api/screen/index.js

@@ -18,6 +18,21 @@ export function pgSupplyDayTotalPv(query) {
   });
 }
 
+export function pgSupplyMonthTotalPv(query) {
+  return request({
+    url: '/ems/pg/supply/hour/month/pv',
+    method: 'get',
+    params: query,
+  });
+}
+
+export function pgSupplyMonthTotalPg(query) {
+  return request({
+    url: '/ems/pg/supply/hour/month/pg',
+    method: 'get',
+    params: query,
+  });
+}
 
 export function pgSupplyHourTotalPv(query) {
   return request({

+ 105 - 102
ems-ui-cloud/src/utils/DateTool.js

@@ -3,107 +3,110 @@ import dayjs from 'dayjs';
 const isSameOrBefore = require('dayjs/plugin/isSameOrBefore');
 dayjs.extend(isSameOrBefore);
 export const DateTool = {
-    DateFormat: {
-        YYYY: 'YYYY',
-        YYYY_MM: 'YYYY-MM',
-        YYYY_MM_DD: 'YYYY-MM-DD',
-        YYYY_MM_DD_HH_mm: 'YYYY-MM-DD HH:mm',
-        YYYY_MM_DD_HH_mm_ss: 'YYYY-MM-DD HH:mm:ss',
-        YYYY_MM_DD_HH_mm_ss_SSS: 'YYYY-MM-DD HH:mm:ss.SSS',
-        YYYYMMDD: 'YYYYMMDD',
-        YYYYMMDDHHmmss: 'YYYYMMDDHHmmss',
-        YYYY_MM_DD_00_00_00: 'YYYY-MM-DD 00:00:00',
-        YYYY_MM_DD_23_59_59: 'YYYY-MM-DD 23:59:59',
-        MM_DD: 'MM-DD',
-    },
-    /**
-     * 获取当天时间刻度
-     * @param timeSplit 单位分钟
-     */
-    getTime: function (timeSplit = 5) {
-        const now = dayjs();
-        let zero = dayjs().startOf('date').add(1, 'hour');
-        const result = [];
-        while (zero.isSameOrBefore(now)) {
-            result.push(zero.format('HH:mm'));
-            zero = zero.add(timeSplit, 'minute');
-        }
-        return result;
-    },
-    now: (format = DateTool.DateFormat.YYYY_MM_DD) => {
-        return dayjs().format(format);
-    },
-    addDays: function (date, days, format = this.DateFormat.YYYY_MM_DD) {
-        return dayjs(date).add(days, 'day').format(format);
-    },
-    /**
-     * 获取一段时间的日期
-     * @param start 开始时间
-     * @param end 结束时间
-     * @param format
-     */
-    getDayOfRange: function (start, end, format = this.DateFormat.YYYY_MM_DD) {
-        const dates = [];
-        let current = dayjs(start);
-        while (current.isSameOrBefore(end)) {
-            dates.push(current.format(format));
-            current = current.add(1, 'day');
-        }
-        return dates;
-    },
+  DateFormat: {
+    YYYY: 'YYYY',
+    YYYY_MM: 'YYYY-MM',
+    YYYY_MM_DD: 'YYYY-MM-DD',
+    YYYY_MM_DD_HH_mm: 'YYYY-MM-DD HH:mm',
+    YYYY_MM_DD_HH_mm_ss: 'YYYY-MM-DD HH:mm:ss',
+    YYYY_MM_DD_HH_mm_ss_SSS: 'YYYY-MM-DD HH:mm:ss.SSS',
+    YYYYMMDD: 'YYYYMMDD',
+    YYYYMMDDHHmmss: 'YYYYMMDDHHmmss',
+    YYYY_MM_DD_00_00_00: 'YYYY-MM-DD 00:00:00',
+    YYYY_MM_DD_23_59_59: 'YYYY-MM-DD 23:59:59',
+    MM_DD: 'MM-DD',
+  },
+  /**
+   * 获取当天时间刻度
+   * @param timeSplit 单位分钟
+   */
+  getTime: function (timeSplit = 5) {
+    const now = dayjs();
+    let zero = dayjs().startOf('date').add(1, 'hour');
+    const result = [];
+    while (zero.isSameOrBefore(now)) {
+      result.push(zero.format('HH:mm'));
+      zero = zero.add(timeSplit, 'minute');
+    }
+    return result;
+  },
+  now: (format = DateTool.DateFormat.YYYY_MM_DD) => {
+    return dayjs().format(format);
+  },
+  addDays: function (date, days, format = this.DateFormat.YYYY_MM_DD) {
+    return dayjs(date).add(days, 'day').format(format);
+  },
+  /**
+   * 获取一段时间的日期
+   * @param start 开始时间
+   * @param end 结束时间
+   * @param format
+   */
+  getDayOfRange: function (start, end, format = this.DateFormat.YYYY_MM_DD) {
+    const dates = [];
+    let current = dayjs(start);
+    while (current.isSameOrBefore(end)) {
+      dates.push(current.format(format));
+      current = current.add(1, 'day');
+    }
+    return dates;
+  },
 
-    getMonthOfRange: function (start, end, format = this.DateFormat.YYYY_MM) {
-        const dates = [];
-        let current = dayjs(start);
-        while (current.isSameOrBefore(end)) {
-            dates.push(current.format(format));
-            current = current.add(1, 'month');
-        }
-        return dates;
-    },
-    get24Time: function (timeSplit = 5) {
-        const now = dayjs();
-        let zero = dayjs().subtract(1, 'day').startOf('hour').add(1, 'hour');
-        const result = [];
-        while (zero.isSameOrBefore(now)) {
-            result.push(zero.format('MM-DD HH:mm'));
-            zero = zero.add(timeSplit, 'minute');
-        }
-        return result;
-    },
-    getMonthsOfYearAgo: () => {
-        const month = [];
-        const currentDate = dayjs();
-        const oneYearAgo = currentDate.subtract(1, 'year');
-        let currentMonth = oneYearAgo.startOf('month');
-        while (currentMonth.isBefore(currentDate.endOf('month'))) {
-            month.push(currentMonth.format(DateTool.DateFormat.YYYY_MM));
-            currentMonth = currentMonth.add(1, 'month').startOf('month');
-        }
-        return month;
-    },
-    timeIndex: (date = dayjs()) => {
-        return date.format('HH');
-    },
-    lastDay: (format = DateTool.DateFormat.YYYY_MM_DD) => {
-        return dayjs().subtract(1, 'day').format(format);
-    },
-    lastMonth: (format = DateTool.DateFormat.YYYY_MM) => {
-        return dayjs().subtract(1, 'month').format(format);
-    },
-    thisMonthLastDay: (format = DateTool.DateFormat.YYYY_MM_DD) => {
-        return dayjs().endOf('month').format(format);
-    },
-    lastYear: (format = DateTool.DateFormat.YYYY) => {
-        return dayjs().subtract(1, 'year').format(format);
-    },
-    lastYearMonthStart: () => {
-        return dayjs().subtract(1, 'year').format(`${DateTool.DateFormat.YYYY_MM}-01`);
-    },
-    thisYear: (format = DateTool.DateFormat.YYYY) => {
-        return dayjs().format(format);
-    },
-    thisMonth: (format = DateTool.DateFormat.YYYY_MM) => {
-        return dayjs().format(format);
-    },
+  getMonthOfRange: function (start, end, format = this.DateFormat.YYYY_MM) {
+    const dates = [];
+    let current = dayjs(start);
+    while (current.isSameOrBefore(end)) {
+      dates.push(current.format(format));
+      current = current.add(1, 'month');
+    }
+    return dates;
+  },
+  get24Time: function (timeSplit = 5) {
+    const now = dayjs();
+    let zero = dayjs().subtract(1, 'day').startOf('hour').add(1, 'hour');
+    const result = [];
+    while (zero.isSameOrBefore(now)) {
+      result.push(zero.format('MM-DD HH:mm'));
+      zero = zero.add(timeSplit, 'minute');
+    }
+    return result;
+  },
+  getMonthsOfYearAgo: () => {
+    const month = [];
+    const currentDate = dayjs();
+    const oneYearAgo = currentDate.subtract(1, 'year');
+    let currentMonth = oneYearAgo.startOf('month');
+    while (currentMonth.isBefore(currentDate.endOf('month'))) {
+      month.push(currentMonth.format(DateTool.DateFormat.YYYY_MM));
+      currentMonth = currentMonth.add(1, 'month').startOf('month');
+    }
+    return month;
+  },
+  timeIndex: (date = dayjs()) => {
+    return date.format('HH');
+  },
+  lastDay: (format = DateTool.DateFormat.YYYY_MM_DD) => {
+    return dayjs().subtract(1, 'day').format(format);
+  },
+  lastMonth: (format = DateTool.DateFormat.YYYY_MM) => {
+    return dayjs().subtract(1, 'month').format(format);
+  },
+  thisMonthLastDay: (format = DateTool.DateFormat.YYYY_MM_DD) => {
+    return dayjs().endOf('month').format(format);
+  },
+  lastYear: (format = DateTool.DateFormat.YYYY) => {
+    return dayjs().subtract(1, 'year').format(format);
+  },
+  lastYearMonthStart: () => {
+    return dayjs().subtract(1, 'year').format(`${DateTool.DateFormat.YYYY_MM}-01`);
+  },
+  thisYear: (format = DateTool.DateFormat.YYYY) => {
+    return dayjs().format(format);
+  },
+  thisMonth: (format = DateTool.DateFormat.YYYY_MM) => {
+    return dayjs().format(format);
+  },
+  nearYearStartDay: (format = DateTool.DateFormat.YYYY_MM_DD) => {
+    return dayjs().subtract(1, 'year').startOf('month').format(format);
+  },
 };

+ 125 - 62
ems-ui-cloud/src/views/largeScreen/net/left.vue

@@ -16,7 +16,7 @@
       <BaseChart style="margin-top: 20px" width="100%" height="300px" :option="lineOptions"></BaseChart>
     </CusModule>
     <CusModule class="module-top" title="上网电量预测">
-      <BaseChart height="300px" width="100%" :option="netlineOptions" />
+      <BaseChart height="300px" width="100%" :option="netlineOptions"/>
     </CusModule>
   </div>
 </template>
@@ -24,31 +24,34 @@
 import CusModule from '../components/CusModule.vue';
 import BaseChart from '@/components/BaseChart/index.vue'
 import * as echarts from 'echarts'
-import {dateFormat} from '@/utils'
+import {array2Map, dateFormat, numToStr} from '@/utils'
 import {mapState} from 'vuex';
+import {pgSupplyDayTotalPv, pgSupplyTotalPv, predictionProdDateRange} from "@/api/screen";
+import {DateTool} from "@/utils/DateTool";
+
 export default {
   name: 'NetLeft',
-  data () {
+  data() {
     return {
       energyList: [
         {
           name: "今日上网电量",
-          value: 321,
+          value: 0,
           unit: "kW·h",
         },
         {
           name: "本月上网电量",
-          value: 9521,
+          value: 0,
           unit: "kW·h",
         },
         {
           name: "今年上网电量",
-          value: 12342,
+          value: 0,
           unit: "kW·h",
         },
       ],
       lineData: [],
-      netlineData:[],
+      netlineData: [],
     };
   },
   components: {
@@ -57,11 +60,11 @@ export default {
   },
   computed: {
     ...mapState('userState', ['areaType']),
-    lineOptions () {
+    lineOptions() {
       return {
         grid: {
           top: "10%",
-          right:'12%',
+          right: '12%',
           bottom: "10%",//也可设置left和right设置距离来控制图表的大小
           contain: true
         },
@@ -103,38 +106,37 @@ export default {
             }
           },
         },
-        {
-          type: "value",
-          name: "%",
-          position: "right",
-          splitLine: {
-            show: false
+          {
+            type: "value",
+            name: "%",
+            position: "right",
+            splitLine: {
+              show: false
+            },
+            axisLabel: {
+              show: true,
+              formatter: "{value} %", //右侧Y轴文字显示
+            }
           },
-          axisLabel: {
-            show: true,
-            formatter: "{value} %", //右侧Y轴文字显示
-          }
-        },
         ],
         series: [
           {
             name: "光伏上网电量",
             type: "bar",
-            barWidth: 15,
             itemStyle: {
               normal: {
                 color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                   offset: 0,
                   color: "#21C3E8"
                 },
-                {
-                  offset: 0.7,
-                  color: "#1484A1"
-                },
-                {
-                  offset: 1,
-                  color: "#0B2B38"
-                }
+                  {
+                    offset: 0.7,
+                    color: "#1484A1"
+                  },
+                  {
+                    offset: 1,
+                    color: "#0B2B38"
+                  }
                 ])
               }
             },
@@ -146,36 +148,29 @@ export default {
             yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
             smooth: true, //平滑曲线显示
             itemStyle: {
-              color: "#F5D6AD",
+              color: (params) => {
+                return params.value > 0 ? '#F44336' : '#4CAF50'; // 绿色表示增长,红色表示下降
+              },
               borderColor: "#fff",
               borderWidth: 3
             },
             lineStyle: {
-              color: "#F5D6AD"
-            },
-            areaStyle: {
-              color:new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
-                  offset: 0,
-                  color: "#A18C74"
-                },
-                {
-                  offset: 1,
-                  color: "transparent"
-                }
-                ])
+              color: (params) => {
+                return params.value > 0 ? '#F44336' : '#4CAF50';
+              }
             },
             data: this.lineData.map(item => item.yData2)
           },
         ]
       }
     },
-    netlineOptions () {
+    netlineOptions() {
       return {
         legend: {
           show: false,
         },
         grid: {
-          top:'10%'
+          top: '10%'
         },
         tooltip: {
           trigger: "axis",
@@ -193,7 +188,7 @@ export default {
           splitLine: {
             show: false,
           },
-          data: this.netlineData.map(item=>item.xData),
+          data: this.netlineData.map(item => item.xData),
         },
         series: [
           {
@@ -217,31 +212,31 @@ export default {
                   offset: 0,
                   color: "rgba(81, 139, 152,0.8)"
                 },
-                {
-                  offset: 1,
-                  color: "rgba(81, 139, 152, 0)"
-                }
+                  {
+                    offset: 1,
+                    color: "rgba(81, 139, 152, 0)"
+                  }
                 ], false),
                 shadowColor: 'rgba(81, 139, 152, 0.5)', //阴影颜色
                 shadowBlur: 20 //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
               }
             },
-            data: this.netlineData.map(item=>item.yData),
+            data: this.netlineData.map(item => item.yData),
           },
         ],
       }
     }
   },
   watch: {
-    areaType () {
+    areaType() {
       this.getNetData()
     }
   },
-  mounted () {
+  mounted() {
     this.getNetData()
-   },
+  },
   methods: {
-    getDatesOfLastTenDays () {
+    getDatesOfLastTenDays() {
       var dates = [];
       var today = new Date();
       for (var i = 1; i < 11; i++) {
@@ -256,7 +251,7 @@ export default {
         yData2: parseFloat(((Math.random() * 100)).toFixed(1))
       }));
     },
-    getLatestDays () {
+    getLatestDays() {
       var dates = [];
       var today = new Date();
       for (var i = 1; i < 11; i++) {
@@ -270,14 +265,81 @@ export default {
         yData: parseFloat(((Math.random() * 100 + 100)).toFixed(1))
       }));
     },
-    getNetData () {
-      this.lineData = this.getDatesOfLastTenDays()
-      this.netlineData = this.getLatestDays()
-      this.energyList = this.energyList.map((item,index) => ({
-        ...item,
-        value:Math.floor(Math.random() * 100+(index+2)*100)
+    getNetData() {
+      this.getPgSupplyDayTotalPv()
+      this.getNext5Days()
+      this.getPgSupply()
+    },
+
+    async getNext5Days() {
+      const next5Day = DateTool.addDays(DateTool.now(), 4);
+      const {data} = await predictionProdDateRange({
+        areaCode: this.areaType,
+        startRecTime: DateTool.now(),
+        endRecTime: next5Day,
+      })
+
+      const dates = DateTool.getDayOfRange(DateTool.now(), next5Day);
+      const mapIndex = array2Map(data, "date");
+      this.netlineData = dates.map(item => ({
+        xData: item,
+        yData: mapIndex[item] ? mapIndex[item].upElecQuantity : 0
       }))
-    }
+    },
+
+    async getPgSupply() {
+      const {data: pgPvSupplyTotalPv} = await pgSupplyTotalPv({
+        areaCode: this.areaType
+      })
+      if (!pgPvSupplyTotalPv) {
+        return
+      }
+      const {
+        thisDay,
+        thisMonth,
+        thisYear,
+        total
+      } = pgPvSupplyTotalPv
+      const [day, monthPv, yearPv] = this.energyList
+      monthPv.value = numToStr(thisMonth.upElecQuantity)
+      yearPv.value = numToStr(thisYear.upElecQuantity)
+      day.value = numToStr(thisDay.upElecQuantity)
+    },
+
+    async getPgSupplyDayTotalPv() {
+      const {data: pgPvSupplyThisMonthTotalPv} = await pgSupplyDayTotalPv({
+        areaCode: this.areaType,
+        date: DateTool.now(DateTool.DateFormat.YYYY_MM)
+      })
+      if (!pgPvSupplyThisMonthTotalPv) {
+        return
+      }
+      const {data: pgPvSupplyLastMonthTotalPv} = await pgSupplyDayTotalPv({
+        areaCode: this.areaType,
+        date: DateTool.lastMonth(DateTool.DateFormat.YYYY_MM)
+      })
+      const days = DateTool.getDayOfRange(DateTool.now(`${DateTool.DateFormat.YYYY_MM}-01`), DateTool.now())
+      const lastMonthDays = DateTool.getDayOfRange(DateTool.lastMonth(`${DateTool.DateFormat.YYYY_MM}-01`), DateTool.now())
+      const thisMonthData = array2Map(pgPvSupplyThisMonthTotalPv)
+      const lastMonthData = array2Map(pgPvSupplyLastMonthTotalPv)
+      this.lineData = days.map((item, index) => {
+        const thisMonthDataItem = thisMonthData[item] && thisMonthData[item].upElecQuantity
+        let lastMonthDataItem = 0;
+        const lastDate = lastMonthDays[index]
+        if (lastMonthData[lastDate]) {
+          lastMonthDataItem = lastMonthData[lastDate].upElecQuantity
+        }
+        let ratio = 0;
+        if (lastMonthDataItem) {
+          ratio = ((thisMonthDataItem - lastMonthDataItem) / lastMonthDataItem * 100).toFixed(1)
+        }
+        return {
+          xData: item,
+          yData1: thisMonthDataItem,
+          yData2: ratio
+        }
+      })
+    },
   }
 }
 </script>
@@ -288,6 +350,7 @@ export default {
   display: flex;
   justify-content: space-between;
   margin-top: 20px;
+
   .net-item {
     position: relative;
     width: 104px;

+ 88 - 57
ems-ui-cloud/src/views/largeScreen/net/right.vue

@@ -15,10 +15,10 @@
       </div>
     </CusModule>
     <CusModule class="module-top" title="上网收益">
-      <BaseChart height="300px" width="100%" :option="barOptions" />
+      <BaseChart height="300px" width="100%" :option="barOptions"/>
     </CusModule>
     <CusModule class="module-top" title="今年购电费用">
-      <BaseChart height="300px" width="100%" :option="lineOptions" />
+      <BaseChart height="300px" width="100%" :option="lineOptions"/>
     </CusModule>
   </div>
 </template>
@@ -26,32 +26,32 @@
 import CusModule from '../components/CusModule.vue';
 import BaseChart from '@/components/BaseChart/index.vue'
 import vueSeamlessScroll from 'vue-seamless-scroll'
-import {dateFormat} from '@/utils';
+import {array2Map} from '@/utils';
 import * as echarts from 'echarts'
 import {mapState} from 'vuex';
+import {getPvPriceConfig} from "@/api/basecfg/elecPvPrice";
+import {pgSupplyMonthTotalPg, pgSupplyMonthTotalPv} from "@/api/screen";
+import {DateTool} from "@/utils/DateTool";
+
 export default {
   name: 'NetRight',
-  data () {
+  data() {
     return {
       priceList: [
         {
           name: "余电上网电价",
-          value: 0.92,
           unit: "元/度",
         },
         {
           name: "脱硫煤电价",
-          value: 0.378,
           unit: "元/度",
         },
         {
           name: "国家补贴",
-          value: 0.42,
           unit: "元/度",
         },
         {
           name: "地方补贴",
-          value: 0.12,
           unit: "元/度",
         },
       ],
@@ -66,7 +66,7 @@ export default {
   },
   computed: {
     ...mapState('userState', ['areaType']),
-    barOptions () {
+    barOptions() {
       const xData = this.barData.map(item => item.xData)
       const line = this.barData.map(item => item.yData);
       return {
@@ -86,7 +86,6 @@ export default {
         xAxis: {
           data: xData,
           axisLabel: {
-            interval: 0,
             margin: 10, //刻度标签与轴线之间的距离。
           },
           axisLine: {
@@ -133,16 +132,15 @@ export default {
                   offset: 0,
                   color: "rgba(89,211,255,1)"
                 },
-                {
-                  offset: 1,
-                  color: "rgba(23,237,194,1)"
-                }
+                  {
+                    offset: 1,
+                    color: "rgba(23,237,194,1)"
+                  }
                 ])
               }
             },
             data: line
           },
-
           //柱体
           {
             name: '',
@@ -182,16 +180,16 @@ export default {
             itemStyle: {
               normal: {
                 color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
-                  [{
-                    offset: 0,
-                    color: "rgba(89,211,255,1)"
-                  },
-                  {
-                    offset: 1,
-                    color: "rgba(23,237,194,1)"
-                  }
-                  ],
-                  false
+                    [{
+                      offset: 0,
+                      color: "rgba(89,211,255,1)"
+                    },
+                      {
+                        offset: 1,
+                        color: "rgba(23,237,194,1)"
+                      }
+                    ],
+                    false
                 ),
               }
             },
@@ -200,7 +198,7 @@ export default {
         ]
       };
     },
-    lineOptions () {
+    lineOptions() {
       return {
         legend: {
           show: false,
@@ -221,9 +219,6 @@ export default {
           },
         },
         xAxis: {
-          axisLabel: {
-            interval: 0,
-          },
           splitLine: {
             show: false,
           },
@@ -251,10 +246,10 @@ export default {
                   offset: 0,
                   color: "rgba(81, 139, 152,0.8)"
                 },
-                {
-                  offset: 1,
-                  color: "rgba(81, 139, 152, 0)"
-                }
+                  {
+                    offset: 1,
+                    color: "rgba(81, 139, 152, 0)"
+                  }
                 ], false),
                 shadowColor: 'rgba(81, 139, 152, 0.5)', //阴影颜色
                 shadowBlur: 20 //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
@@ -268,31 +263,67 @@ export default {
     }
   },
   watch: {
-    areaType () {
+    areaType() {
       this.getNetData()
     }
   },
-  mounted () {
+  mounted() {
     this.getNetData()
   },
   methods: {
-    getMonthsOfLastTenMonths () {
-      var months = [];
-      var today = new Date();
-      for (var i = 0; i < 10; i++) {
-        var pastMonth = new Date(today);
-        pastMonth.setMonth(today.getMonth() - i); // 减去i个月
-        var formattedMonth = `${dateFormat(pastMonth, 'M')}月`;
-        months.push(formattedMonth);
+    getNetData() {
+      this.pgSupplyMonthTotalPv()
+      this.pgSupplyMonthTotalPg()
+      this.qryGwPriceConfig()
+    },
+    async qryGwPriceConfig() {
+      const {data} = await getPvPriceConfig(1)
+      if (!data) {
+        return;
       }
-      return months.reverse().map(item => ({
-        xData: item,
-        yData: parseFloat(((Math.random() * 100)).toFixed(1)),
-      }));
+      const [lessPrice, oriPrice, state, local] = this.priceList
+      lessPrice.value = data.objPrice + data.stateSubsidy + data.localSubsidy
+      oriPrice.value = data.objPrice
+      state.value = data.stateSubsidy
+      local.value = data.localSubsidy
+      this.priceList = [lessPrice, oriPrice, state, local]
     },
-    getNetData () {
-      this.barData = this.getMonthsOfLastTenMonths()
-      this.lineData = this.getMonthsOfLastTenMonths()
+    async pgSupplyMonthTotalPv() {
+      const {data} = await pgSupplyMonthTotalPv({
+        startRecTime: DateTool.nearYearStartDay(),
+        endRecTime: DateTool.now(),
+        areaCode: this.areaType,
+      })
+      if (!data) {
+        return;
+      }
+      const month = DateTool.getMonthsOfYearAgo()
+      const indexMap = array2Map(data, "startRecTime")
+      this.barData = month.map(item => (
+          {
+            xData: item.substring(2),
+            yData: indexMap[item] ? (indexMap[item].upElecEarn / 10000).toFixed(1) : 0
+          }
+      ))
+    },
+    async pgSupplyMonthTotalPg() {
+      const thisThisYearStart = `${DateTool.now(DateTool.DateFormat.YYYY)}-01-01`
+      const {data} = await pgSupplyMonthTotalPg({
+        startRecTime: thisThisYearStart,
+        endRecTime: DateTool.now(),
+        areaCode: this.areaType,
+      })
+      if (!data) {
+        return;
+      }
+      const month = DateTool.getMonthsOfYearAgo()
+      const indexMap = array2Map(data, "startRecTime")
+      this.lineData = month.map(item => (
+          {
+            xData: item.substring(2),
+            yData: indexMap[item] ? (indexMap[item].useElecCost / 10000).toFixed(1) : 0
+          }
+      ))
     }
   }
 }
@@ -359,7 +390,7 @@ export default {
     padding: 5px 13px;
     font-size: 14px;
 
-    >div:first-of-type {
+    > div:first-of-type {
       span:first-of-type {
         font-size: 18px;
         font-weight: bold;
@@ -385,12 +416,12 @@ export default {
   background: #1B4A64;
   font-size: 16px;
 
-  >div:first-of-type,
-  >div:last-of-type {
+  > div:first-of-type,
+  > div:last-of-type {
     flex-basis: 35%;
   }
 
-  >div {
+  > div {
     text-align: center;
   }
 }
@@ -409,12 +440,12 @@ export default {
       background: #000;
     }
 
-    >div:first-of-type,
-    >div:last-of-type {
+    > div:first-of-type,
+    > div:last-of-type {
       flex-basis: 38%;
     }
 
-    >div {
+    > div {
       text-align: center;
       font-size: 13px;
     }

+ 3 - 4
ems-ui-cloud/src/views/largeScreen/soc/right.vue

@@ -176,14 +176,13 @@ export default {
       })
     },
     async getDatesOfLastTenDays() {
-      const next7Day = DateTool.addDays(DateTool.now(), 7);
+      const next5Day = DateTool.addDays(DateTool.now(), 4);
       const {data} = await listForecastConsumeDateRange({
-        startTime: DateTool.now(DateTool.DateFormat.YYYY_MM_DD_00_00_00),
         areaCode: this.areaType,
         startRecTime: DateTool.now(),
-        endRecTime: next7Day,
+        endRecTime: next5Day,
       })
-      const dates = DateTool.getDayOfRange(DateTool.now(), next7Day);
+      const dates = DateTool.getDayOfRange(DateTool.now(), next5Day);
       const mapIndex = array2Map(data, "date");
 
       this.lineData = dates.map(item => ({

+ 3 - 3
ems-ui-cloud/src/views/largeScreen/source/left.vue

@@ -72,19 +72,19 @@ export default {
       elecList: [
         {
           name: "本月发电量",
-          value: 9431,
+          value: 0,
           unit: "kW·h",
           image: require("@/assets/images/source/l1-item1.png"),
         },
         {
           name: "今年发电量",
-          value: 12034,
+          value: 0,
           unit: "kW·h",
           image: require("@/assets/images/source/l1-item2.png"),
         },
         {
           name: "累计发电量",
-          value: 95312,
+          value: 0,
           unit: "kW·h",
           image: require("@/assets/images/source/l1-item3.png"),
         },

+ 3 - 3
ems-ui-cloud/src/views/largeScreen/source/right.vue

@@ -188,14 +188,14 @@ export default {
       this.getDatesOfLastTenDays()
     },
     async getDatesOfLastTenDays() {
-      const next7Day = DateTool.addDays(DateTool.now(), 7);
+      const next5Day = DateTool.addDays(DateTool.now(), 4);
       const {data} = await predictionProdDateRange({
         areaCode: this.areaType,
         startRecTime: DateTool.now(),
-        endRecTime: next7Day,
+        endRecTime: next5Day,
       })
 
-      const dates = DateTool.getDayOfRange(DateTool.now(), next7Day);
+      const dates = DateTool.getDayOfRange(DateTool.now(), next5Day);
       const mapIndex = array2Map(data, "date");
       this.lineData = dates.map(item => ({
         xData: item,

+ 1 - 1
ems-ui-cloud/src/views/largeScreen/three/renderModel.js

@@ -308,7 +308,7 @@ class renderModel {
       //     console.log(`Clicked at: (${point.x}, ${point.y}, ${point.z})`);
       //   }
       // });
-      this.initGUI();
+      // this.initGUI();
       this.createGuangfuLabel();
       this.createFuheLabel();
       this.createStorageLabel();