Pārlūkot izejas kodu

1.kwh全部改为kWh; 2.看板人员增加其他人员

Bella 2 gadi atpakaļ
vecāks
revīzija
930ce7419b

+ 8 - 8
src/components/business/analysis/all/businessEnergyChart.vue

@@ -8,11 +8,11 @@ export default {
       option: {
         legend: {
           data: [
-            '用电(kwh)',
+            '用电(kWh)',
             '用水(m³)',
-            '用热(kwh)',
-            '用冷(kwh)',
-            '光伏(kwh)',
+            '用热(kWh)',
+            '用冷(kWh)',
+            '光伏(kWh)',
           ]
         },
         grid: {
@@ -55,7 +55,7 @@ export default {
         },
         series: [
           {
-            name: '用电(kwh)',
+            name: '用电(kWh)',
             data: [],
             type: 'line',
             stack: 'a',
@@ -93,7 +93,7 @@ export default {
             },
           },
           {
-            name: '用热(kwh)',
+            name: '用热(kWh)',
             data: [],
             type: 'line',
             stack: 'a',
@@ -112,7 +112,7 @@ export default {
             },
           },
           {
-            name: '用冷(kwh)',
+            name: '用冷(kWh)',
             data: [],
             type: 'line',
             stack: 'a',
@@ -131,7 +131,7 @@ export default {
             },
           },
           {
-            name: '光伏(kwh)',
+            name: '光伏(kWh)',
             data: [],
             type: 'line',
             stack: 'a',

+ 10 - 10
src/components/business/analysis/analysis.vue

@@ -46,7 +46,7 @@ export default {
       oriCoreData: [],
       coreData: [
         {
-          title: "总用量(kwh)",
+          title: "总用量(kWh)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,
@@ -97,27 +97,27 @@ export default {
       this.coreData = JSON.parse(JSON.stringify(this.oriCoreData));
       if ("electric" == type) {
         // 用电
-        this.coreData[0].title = "总用电量(kwh)";
-        this.coreData[1].title = "人均用电量(kwh/人)";
+        this.coreData[0].title = "总用电量(kWh)";
+        this.coreData[1].title = "人均用电量(kWh/人)";
       } else if ("water" == type) {
         // 用水
         this.coreData[0].title = "总用水量(m³)";
         this.coreData[1].title = "人均用水量(m³/人)";
       } else if ("hot" == type) {
         // 用热
-        this.coreData[0].title = "总用热量(kwh)";
-        this.coreData[1].title = "人均用热量(kwh/人)";
+        this.coreData[0].title = "总用热量(kWh)";
+        this.coreData[1].title = "人均用热量(kWh/人)";
       } else if ("cold" == type) {
         // 用冷
-        this.coreData[0].title = "总用冷量(kwh)";
-        this.coreData[1].title = "人均用冷量(kwh/人)";
+        this.coreData[0].title = "总用冷量(kWh)";
+        this.coreData[1].title = "人均用冷量(kWh/人)";
       } else if ("pv" == type) {
         // 光伏
-        this.coreData[0].title = "总发电量(kwh)";
-        this.coreData[1].title = "平均发电量量(kwh/台)";
+        this.coreData[0].title = "总发电量(kWh)";
+        this.coreData[1].title = "平均发电量量(kWh/台)";
       } else {
         // 全部
-        this.coreData[0].title = "总用量(kwh)";
+        this.coreData[0].title = "总用量(kWh)";
         this.coreData[1].title = "总用量m³)";
       }
       this.getCoreData();

+ 1 - 1
src/components/business/analysis/cold/BusinessColdChart.vue

@@ -33,7 +33,7 @@ export default {
         dataZoom: this.$constant.ECHARTS_OPTION_DATAZOOM,
         yAxis: [
           {
-            name: 'kwh',
+            name: 'kWh',
             type: 'value',
             nameTextStyle: {
               padding: [10, 0, 10, -20]

+ 1 - 1
src/components/business/analysis/cold/BusinessColdDetail.vue

@@ -16,7 +16,7 @@ export default {
           icon: 'business/energy/cold.png',
           title: '总用冷量',
           num: 0,
-          unit: 'kwh'
+          unit: 'kWh'
         },{
           icon: 'business/energy/cold.png',
           title: '人均成本',

+ 1 - 1
src/components/business/analysis/electric/BusinessElectricChart.vue

@@ -53,7 +53,7 @@ export default {
         },
         yAxis: [
           {
-            name: 'kwh',
+            name: 'kWh',
             type: 'value',
             nameTextStyle: {
               padding: [10, 0, 10, -20]

+ 1 - 1
src/components/business/analysis/hot/BusinessHotChart.vue

@@ -31,7 +31,7 @@ export default {
         },
         yAxis: [
           {
-            name: 'kwh',
+            name: 'kWh',
             type: 'value',
             nameTextStyle: {
               padding: [10, 0, 10, -20]

+ 1 - 1
src/components/business/analysis/pv/BusinessPvChart.vue

@@ -32,7 +32,7 @@ export default {
         },
         yAxis: [
           {
-            name: 'kwh',
+            name: 'kWh',
             type: 'value',
             nameTextStyle: {
               padding: [10, 0, 10, -20]

+ 1 - 1
src/components/business/analysis/pv/BusinessPvDetail.vue

@@ -19,7 +19,7 @@ export default {
           icon: 'business/energy/pv.png',
           title: '总发电量',
           num: 0,
-          unit: 'kwh'
+          unit: 'kWh'
         },{
           icon: 'business/energy/pv.png',
           title: '发电时间',

+ 38 - 34
src/components/dashboard/more/pv/pvPowerProfitChart.vue

@@ -4,70 +4,74 @@ import apiDashboard from "@/api/dashboard/apiDashboard";
 export default {
   data() {
     return {
-      dataIndexes: ['saving', 'amountSubsidy'],
+      dataIndexes: ["saving", "amountSubsidy"],
       option: {
-        color: ['#80D4FF', '#FFDF80'],
+        color: ["#80D4FF", "#FFDF80"],
         tooltip: {
-          trigger: 'item'
+          trigger: "item",
         },
         legend: {
-          bottom: '8%',
-          left: 'center',
-          icon: 'circle'
+          bottom: "8%",
+          left: "center",
+          icon: "circle",
         },
         series: [
           {
-            name: '金额',
-            type: 'pie',
-            center: ['50%','40%'],
+            name: "金额",
+            type: "pie",
+            center: ["50%", "40%"],
             data: [
-              { value: 0, name: '盈利金额' },
-              { value: 0, name: '节约金额' },
+              { value: 0, name: "补贴金额" },
+              { value: 0, name: "节约金额" },
+              { value: 0, name: "并网收入" },
             ],
             emphasis: {
               itemStyle: {
                 shadowBlur: 10,
                 shadowOffsetX: 0,
-                shadowColor: 'rgba(0, 0, 0, 0.5)'
-              }
-            }
-          }
-        ]
-      }
-    }
+                shadowColor: "rgba(0, 0, 0, 0.5)",
+              },
+            },
+          },
+        ],
+      },
+    };
   },
   props: {
     height: Number,
-    queryData: Object
+    queryData: Object,
   },
   mounted() {
-    this.$nextTick(()=>{
+    this.$nextTick(() => {
       this.initChart();
       this.getData();
-    })
+    });
   },
   methods: {
     initChart() {
-      let chart = this.$echarts.init(this.$refs.myChart)
+      let chart = this.$echarts.init(this.$refs.myChart);
       this.chart = chart;
       this.$util.chartsResize(this.chart);
-      chart.setOption(this.option)
+      chart.setOption(this.option);
     },
     getData() {
-      return apiDashboard.getPvProfitOverview(this.queryData).then(res=>{
-        this.option.series[0].data[0].value = res.saving;
-        this.option.series[0].data[1].value = res.amountSubsidy;
+      return apiDashboard.getPvProfitOverview(this.queryData).then((res) => {
+        this.option.series[0].data[0].value = res.subsidy;
+        this.option.series[0].data[1].value = res.saving;
+        this.option.series[0].data[2].value = res.earning;
         this.chart.setOption(this.option);
-      })
-    }
-  }
-}
+      });
+    },
+  },
+};
 </script>
 
 <template>
-  <div style="width: 100%" :style="{height: height+'px'}" ref="myChart"></div>
+  <div
+    style="width: 100%"
+    :style="{ height: height + 'px' }"
+    ref="myChart"
+  ></div>
 </template>
 
-<style lang="less" scoped>
-
-</style>
+<style lang="less" scoped></style>

+ 1 - 1
src/components/dashboard/more/pv/pvPowerSummaryChart.vue

@@ -8,7 +8,7 @@ export default {
       option: {
         legend: {
           data: [
-            '发电',
+            '实时发电',
           ]
         },
         grid: {

+ 18 - 12
src/components/dashboard/more/pvPowerChart.vue

@@ -5,35 +5,41 @@ import PvPowerProfitChart from "@/components/dashboard/more/pv/pvPowerProfitChar
 
 export default {
   data() {
-    return {}
+    return {
+      queryData: {},
+    };
   },
   components: {
     Card,
     PvPowerSummaryChart,
     PvPowerProfitChart,
-  }
-}
+  },
+};
 </script>
 
 <template>
   <div class="dashboard-pvPower">
-    <Card title="光伏发电量" >
+    <Card title="光伏发电量">
       <div style="height: 200px">
-        <PvPowerSummaryChart :height="220"></PvPowerSummaryChart>
+        <PvPowerSummaryChart
+          :height="220"
+          :queryData="queryData"
+        ></PvPowerSummaryChart>
       </div>
-      <div style="width: 90%;margin: 0 auto;">
-        <a-divider style="margin: 10px 0 0;padding: 0;"></a-divider>
+      <div style="width: 90%; margin: 0 auto">
+        <a-divider style="margin: 10px 0 0; padding: 0"></a-divider>
       </div>
     </Card>
 
     <Card title="光伏盈利">
-      <div style="width: 90%;margin: 0 auto;padding: 15px">
-        <PvPowerProfitChart :height="200"></PvPowerProfitChart>
+      <div style="width: 90%; margin: 0 auto; padding: 15px">
+        <PvPowerProfitChart
+          :height="200"
+          :queryData="queryData"
+        ></PvPowerProfitChart>
       </div>
     </Card>
   </div>
 </template>
 
-<style lang="less" scoped>
-
-</style>
+<style lang="less" scoped></style>

+ 6 - 1
src/components/dashboard/portrait/money/investDistributeChart.vue

@@ -19,7 +19,12 @@ export default {
             '投资3',
             '投资4',
             '投资回报率',
-          ]
+          ],
+          selected:{
+            '投资2':false,
+            '投资3':false,
+            '投资4':false,
+          }
         },
         grid: {
           left: '2%', //默认10%

+ 87 - 61
src/components/dashboard/portrait/person/personTrendChart.vue

@@ -9,57 +9,56 @@ export default {
       show: false,
       option: {
         legend: {
-          data: [
-            '自有员工',
-            '外协员工',
-            '访客人员',
-          ],
+          data: ["自有员工", "外协员工", "访客人员", "其他人员"],
           selected: {
-            '访客人员': false
-          }
+            访客人员: false,
+            其他人员: false,
+          },
         },
         grid: {
-          left: '1%', //默认10%
-          right: '1%', //默认10%
-          bottom: '20px', //默认60
-          top: '60px',
-          containLabel: true
+          left: "1%", //默认10%
+          right: "1%", //默认10%
+          bottom: "20px", //默认60
+          top: "60px",
+          containLabel: true,
           //grid区域是否包含坐标轴的刻度标签
         },
         xAxis: {
-          data: []
+          data: [],
         },
         yAxis: [
           {
-            name: '人数(人)',
-            type: 'value',
+            name: "人数(人)",
+            type: "value",
           },
         ],
         dataZoom: this.$constant.ECHARTS_OPTION_DATAZOOM,
         tooltip: {
-          trigger: 'axis',
+          trigger: "axis",
           axisPointer: {
-            type: 'shadow'
+            type: "shadow",
           },
           textStyle: {
-            color: '#fff',
-            align: 'left',
-            fontSize: 14
+            color: "#fff",
+            align: "left",
+            fontSize: 14,
           },
-          axisLine: {//x坐标轴轴线
+          axisLine: {
+            //x坐标轴轴线
             show: true,
-            lineStyle: {//x坐标轴轴线样式
-              color: '#000',//'#ccc' | 'rgb(128, 128, 128)' | 'rgba(128, 128, 128, 0.5)',设置标签颜色
-            }
+            lineStyle: {
+              //x坐标轴轴线样式
+              color: "#000", //'#ccc' | 'rgb(128, 128, 128)' | 'rgba(128, 128, 128, 0.5)',设置标签颜色
+            },
           },
-          backgroundColor: 'rgba(0,0,0,0.8)',
+          backgroundColor: "rgba(0,0,0,0.8)",
         },
         series: [
           {
-            name: '自有员工',
+            name: "自有员工",
             data: [],
-            type: 'line',
-            stack: 'x',
+            type: "line",
+            stack: "x",
             smooth: true,
             showSymbol: false,
             areaStyle: {},
@@ -67,14 +66,14 @@ export default {
               width: 1,
             },
             emphasis: {
-              scale: 1.5
-            }
+              scale: 1.5,
+            },
           },
           {
-            name: '外协员工',
+            name: "外协员工",
             data: [],
-            type: 'line',
-            stack: 'x',
+            type: "line",
+            stack: "x",
             smooth: true,
             showSymbol: false,
             areaStyle: {},
@@ -82,14 +81,14 @@ export default {
               width: 1,
             },
             emphasis: {
-              scale: 1.5
+              scale: 1.5,
             },
           },
           {
-            name: '访客人员',
+            name: "访客人员",
             data: [],
-            type: 'line',
-            stack: 'x',
+            type: "line",
+            stack: "x",
             smooth: true,
             showSymbol: false,
             areaStyle: {},
@@ -97,13 +96,27 @@ export default {
               width: 1,
             },
             emphasis: {
-              scale: 1.5
+              scale: 1.5,
             },
           },
-
-        ]
+          {
+            name: "其他人员",
+            data: [],
+            type: "line",
+            stack: "x",
+            smooth: true,
+            showSymbol: false,
+            areaStyle: {},
+            lineStyle: {
+              width: 1,
+            },
+            emphasis: {
+              scale: 1.5,
+            },
+          },
+        ],
       },
-    }
+    };
   },
   props: {
     height: Number,
@@ -113,41 +126,54 @@ export default {
   mounted() {
     this.$nextTick(() => {
       this.initChart();
-    })
+    });
   },
   methods: {
     initChart() {
-      let chart = this.$echarts.init(this.$refs.myChart, null, {renderer: 'svg'})
+      let chart = this.$echarts.init(this.$refs.myChart, null, {
+        renderer: "svg",
+      });
       this.chart = chart;
       this.$util.chartsResize(this.chart);
-      chart.setOption(this.option)
+      chart.setOption(this.option);
       for (let i = 0; i < 5; i++) {
         setTimeout(function () {
-          chart.resize()
-        }, 500 * i)
+          chart.resize();
+        }, 500 * i);
       }
-      this.getData()
+      this.getData();
     },
     getData() {
       this.loading = true;
-      return apiDashboard.getPersonEnterSummary(this.queryData).then(res => {
-        let data = this.$util.dataUtil.covertDataToEcharts(res, [ 'ownEmployees', 'outsourcingStaff', 'visitors',])
-        this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
-        this.loading = false;
-      }).catch(err=>{
-        this.loading = false;
-      })
-    }
-  }
-}
+      return apiDashboard
+        .getPersonEnterSummary(this.queryData)
+        .then((res) => {
+          let data = this.$util.dataUtil.covertDataToEcharts(res, [
+            "ownEmployees",
+            "outsourcingStaff",
+            "visitors",
+            "others"
+          ]);
+          this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data);
+          this.loading = false;
+        })
+        .catch((err) => {
+          this.loading = false;
+        });
+    },
+  },
+};
 </script>
 
 <template>
   <a-spin :spinning="loading">
-    <div id="personTrendChart" style="width: 100%" :style="{height: height+'px'}" ref="myChart"></div>
+    <div
+      id="personTrendChart"
+      style="width: 100%"
+      :style="{ height: height + 'px' }"
+      ref="myChart"
+    ></div>
   </a-spin>
 </template>
 
-<style lang="less" scoped>
-
-</style>
+<style lang="less" scoped></style>

+ 1 - 1
src/components/doubleCarbon/PV/doubleCarbonPv.vue

@@ -29,7 +29,7 @@ export default {
           historyNum: 0,
         },
         {
-          title: "光伏发电量(kwh/天)",
+          title: "光伏发电量(kWh/天)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,