Browse Source

常规提交、BUG消缺、模拟数据创建

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 5 months ago
parent
commit
67b02214bf
83 changed files with 504736 additions and 19920 deletions
  1. 4 4
      .env.development
  2. 1 1
      .env.production
  3. 25 19
      public/index.html
  4. 8 3
      public/static/config/modeConfig.js
  5. 124 20
      src/App.vue
  6. BIN
      src/assets/images/indexCom/cChart.png
  7. 481 482
      src/components/commonHeaders.vue
  8. 2 2
      src/components/generatingCapacityComponent/excel.vue
  9. 207 169
      src/components/generatingCapacityComponent/table.vue
  10. 45 2
      src/components/generatingCapacityComponent/tree.vue
  11. 361 357
      src/components/homeComponent/echartsGauge.vue
  12. 59 54
      src/components/homeComponent/echartsGaugeComponent.vue
  13. 321 310
      src/components/homeComponent/forecastBarComponent.vue
  14. 576 449
      src/components/powerPredictionComponent/batteryDivinerDialog/dayBatterDialog.vue
  15. 527 402
      src/components/powerPredictionComponent/batteryDivinerDialog/monthAndYearBatterDialog.vue
  16. 914 681
      src/components/powerPredictionComponent/homePageAssembly/globalDialogPage.vue
  17. 564 426
      src/components/powerPredictionComponent/panoramicPowerDialog/panoramaPowerDialogPage.vue
  18. 844 620
      src/components/powerPredictionComponent/powerPredictionDialog/predictionDialogPage.vue
  19. 3 0
      src/main.js
  20. 34 1
      src/router/index.js
  21. 4 4
      src/store/index.js
  22. 914 0
      src/themeDark.less
  23. 108295 0
      src/views/generatingCapacity/dataAnalysis/agcAnalysis/components/data.json
  24. 93 80
      src/views/generatingCapacity/dataAnalysis/agcAnalysis/components/search.vue
  25. 580 408
      src/views/generatingCapacity/dataAnalysis/agcAnalysis/index.vue
  26. 33347 0
      src/views/generatingCapacity/dataAnalysis/angleAnalysis/components/data.json
  27. 121 1
      src/views/generatingCapacity/dataAnalysis/angleAnalysis/index.vue
  28. 396 0
      src/views/generatingCapacity/dataAnalysis/combine/components/barChart.json
  29. 235 0
      src/views/generatingCapacity/dataAnalysis/combine/components/barChart.vue
  30. 386 0
      src/views/generatingCapacity/dataAnalysis/combine/components/barLineChart.vue
  31. 404 350
      src/views/generatingCapacity/dataAnalysis/combine/components/current-scatter-chart.vue
  32. 70875 0
      src/views/generatingCapacity/dataAnalysis/combine/components/data.json
  33. 103 52
      src/views/generatingCapacity/dataAnalysis/combine/components/search.vue
  34. 197 1
      src/views/generatingCapacity/dataAnalysis/combine/index.vue
  35. 52150 0
      src/views/generatingCapacity/dataAnalysis/hotAnalysis/components/data.json
  36. 178 0
      src/views/generatingCapacity/dataAnalysis/hotAnalysis/index.vue
  37. 349 343
      src/views/generatingCapacity/dataAnalysis/lineAnalysis/components/current-scatter-chart.vue
  38. 32035 0
      src/views/generatingCapacity/dataAnalysis/lineAnalysis/components/data.json
  39. 383 137
      src/views/generatingCapacity/dataAnalysis/lineAnalysis/index.vue
  40. 25045 0
      src/views/generatingCapacity/dataAnalysis/posAnalysis/components/data.json
  41. 489 337
      src/views/generatingCapacity/dataAnalysis/posAnalysis/components/leafletMap.vue
  42. 2013 1328
      src/views/generatingCapacity/dataAnalysis/posAnalysis/index.vue
  43. 186 176
      src/views/generatingCapacity/dataAnalysis/rateAnalysis/components/chart.vue
  44. 46416 0
      src/views/generatingCapacity/dataAnalysis/rateAnalysis/components/data.json
  45. 222 215
      src/views/generatingCapacity/dataAnalysis/rateAnalysis/components/lineChart.vue
  46. 226 27
      src/views/generatingCapacity/dataAnalysis/rateAnalysis/index.vue
  47. 224 215
      src/views/generatingCapacity/dataAnalysis/spaceAnalysis/components/barChart.vue
  48. 17899 0
      src/views/generatingCapacity/dataAnalysis/spaceAnalysis/components/data.json
  49. 85 0
      src/views/generatingCapacity/dataAnalysis/spaceAnalysis/index.vue
  50. 16502 0
      src/views/generatingCapacity/dataAnalysis/windAnalysis/components/data.json
  51. 630 487
      src/views/generatingCapacity/dataAnalysis/windAnalysis/index.vue
  52. 23053 0
      src/views/generatingCapacity/dataFilter/prepare/component/data.json
  53. 62 1
      src/views/generatingCapacity/dataFilter/prepare/index.vue
  54. 23 2
      src/views/generatingCapacity/dataFilter/prepare/search.vue
  55. 38262 0
      src/views/generatingCapacity/dataFilter/process/component/data.json
  56. 75 3
      src/views/generatingCapacity/dataFilter/process/index.vue
  57. 92 50
      src/views/generatingCapacity/dataFilter/process/search.vue
  58. 1530 0
      src/views/generatingCapacity/jjyxReport/index.vue
  59. 6042 0
      src/views/generatingCapacity/report/component/data.json
  60. 90 0
      src/views/generatingCapacity/report/fixGetPDF copy.js
  61. 46 46
      src/views/generatingCapacity/report/fixGetPDF.js
  62. 224 203
      src/views/generatingCapacity/report/index.vue
  63. 1487 4847
      src/views/home/component/data.json
  64. BIN
      src/views/home/fc.png
  65. 16 0
      src/views/home/fc.svg
  66. BIN
      src/views/home/gf.png
  67. 16 0
      src/views/home/gf.svg
  68. 541 63
      src/views/home/index.vue
  69. 62 0
      src/views/intelligentReporting/fdlrb/index.vue
  70. 62 0
      src/views/intelligentReporting/swdlrb/index.vue
  71. 33 0
      src/views/intelligentReporting/yxdtjb/index.vue
  72. 947 690
      src/views/powerPrediction/batteryDivinerPage.vue
  73. 1077 0
      src/views/powerPrediction/component/batteryDiviner.json
  74. 1818 0
      src/views/powerPrediction/component/homePageNoMap.json
  75. 3829 0
      src/views/powerPrediction/component/panoramicPower.json
  76. 1478 0
      src/views/powerPrediction/component/power.json
  77. 333 0
      src/views/powerPrediction/component/statisticalSummary.json
  78. 106 0
      src/views/powerPrediction/component/weather.json
  79. 2251 1875
      src/views/powerPrediction/homePageNoMap.vue
  80. 741 604
      src/views/powerPrediction/panoramicPower.vue
  81. 1511 1171
      src/views/powerPrediction/powerPredictionPage.vue
  82. 895 687
      src/views/powerPrediction/statisticalSummaryPage.vue
  83. 1952 1515
      src/views/powerPrediction/weatherPage.vue

+ 4 - 4
.env.development

@@ -11,24 +11,24 @@ VUE_APP_TITLE = '页面标题'
 # 马力军
 # VUE_APP_LOGIN_URL = 'http://192.168.2.45:48080'
 # 王波
-VUE_APP_LOGIN_URL = 'http://192.168.0.101:48080'
+VUE_APP_LOGIN_URL = 'http://192.168.0.102:48080'
 
 # 发电能力分析
-VUE_APP_GENERAT_URL = 'http://192.168.0.101:9002'
+VUE_APP_GENERAT_URL = 'http://192.168.0.102:9002'
 # 马力军
 # VUE_APP_GENERAT_URL = 'http://192.168.2.45:9002'
 # 王波
 # VUE_APP_GENERAT_URL = 'http://192.168.2.232:9002'
 
 # 智能报表
-VUE_APP_REPORT_URL = 'http://192.168.0.101:9001'
+VUE_APP_REPORT_URL = 'http://192.168.0.102:9001'
 # 马力军
 # VUE_APP_REPORT_URL = 'http://192.168.2.45:9001'
 # 王波
 # VUE_APP_REPORT_URL = 'http://192.168.2.232:9001'
 
 # 功率预测
-VUE_APP_BASE_URL = 'http://192.168.0.101:8086'
+VUE_APP_BASE_URL = 'http://192.168.0.102:8086'
 # 马力军
 # VUE_APP_BASE_URL = 'http://192.168.2.45:8086'
 # 王波

+ 1 - 1
.env.production

@@ -31,7 +31,7 @@ VUE_APP_GENERAT_URL = 'http://172.16.12.101:9002'
 # 智能报表
 # VUE_APP_REPORT_URL = 'http://123.60.219.66:9001'
 # VUE_APP_REPORT_URL = 'http://192.168.0.105:9001'
-# VUE_APP_REPORT_URL = 'http://10.127.7.241:8083'
+# VUE_APP_REPORT_URL = 'http://10.127.7.241:9001'
 VUE_APP_REPORT_URL = 'http://172.16.12.101:9001'
 # VUE_APP_REPORT_URL = 'http://192.168.2.231:9001'
 # VUE_APP_REPORT_URL = 'http://127.0.0.1:9001'

+ 25 - 19
public/index.html

@@ -7,22 +7,28 @@
 -->
 <!DOCTYPE html>
 <html lang="">
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <link rel="stylesheet" href="./widgets.css">
-    <link href="https://cdn.bootcdn.net/ajax/libs/leaflet/1.7.1/leaflet.min.css" rel="stylesheet">
-    <link href="https://cdn.bootcdn.net/ajax/libs/leaflet-contextmenu/1.4.0/leaflet.contextmenu.css" rel="stylesheet">
-    <title><%= htmlWebpackPlugin.options.title %></title>
-  </head>
-  <body>
-    <noscript>
-      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
-    </noscript>
-    <div id="app"></div>
-    <!-- built files will be auto injected -->
-  </body>
-  <script src="./Cesium.js"></script>
-</html>
+
+<head>
+  <meta charset="utf-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width,initial-scale=1.0">
+  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+  <link rel="stylesheet" href="./widgets.css">
+  <link href="https://cdn.bootcdn.net/ajax/libs/leaflet/1.7.1/leaflet.min.css" rel="stylesheet">
+  <link href="https://cdn.bootcdn.net/ajax/libs/leaflet-contextmenu/1.4.0/leaflet.contextmenu.css" rel="stylesheet">
+  <title>
+    <%= htmlWebpackPlugin.options.title %>
+  </title>
+</head>
+
+<body class="nsfStyle">
+  <noscript>
+    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
+        Please enable it to continue.</strong>
+  </noscript>
+  <div id="app"></div>
+  <!-- built files will be auto injected -->
+</body>
+<script src="./Cesium.js"></script>
+
+</html>

+ 8 - 3
public/static/config/modeConfig.js

@@ -21,6 +21,9 @@ const showModuleName = 0;
 // const reportBaseUrl = "http://10.127.7.241:8083";
 const reportBaseUrl = "http://172.16.12.101:8083";
 
+// const baseReportUrl = "http://10.127.7.196"
+const baseReportUrl = "http://172.16.12.101";
+
 // if (localTest) {
 //     baseURL = "http://192.168.10.8:9002/" // 联机调试 
 // } else {
@@ -37,7 +40,8 @@ window.__MODE__ = {
     tilesUrl,
     tilesMaxLevel,
     showModuleName,
-    reportBaseUrl
+    reportBaseUrl,
+    baseReportUrl
 };
 
 export default {
@@ -47,5 +51,6 @@ export default {
     tilesUrl,
     tilesMaxLevel,
     showModuleName,
-    reportBaseUrl
-}
+    reportBaseUrl,
+    baseReportUrl
+};

File diff suppressed because it is too large
+ 124 - 20
src/App.vue


BIN
src/assets/images/indexCom/cChart.png


File diff suppressed because it is too large
+ 481 - 482
src/components/commonHeaders.vue


+ 2 - 2
src/components/generatingCapacityComponent/excel.vue

@@ -20,7 +20,7 @@
                     </svg>
                     <!-- <img :src="CSV_C" alt="" v-if="isshowC(item)"> -->
                     <!-- <img :src="CSV" alt="" v-else> -->
-                    <span class="excelName">{{ item.name }}</span>
+                    <span class="excelName">{{ item?.name?.split("_")?.[0] || item.name  }}</span>
                 </span>
             </el-checkbox>
         </el-checkbox-group>
@@ -45,7 +45,7 @@
                 </svg>
                 <!-- <img :src="CSV_C" alt="" v-if="currentId === item.id">
                 <img :src="CSV" alt="" v-else> -->
-                <span class="excelName" :style="excelSpanSty(item)">{{ item.name }}</span>
+                <span class="excelName" :style="excelSpanSty(item)">{{ item?.name?.split("_")?.[0] || item.name }}</span>
             </div>
         </div>
     </div>

File diff suppressed because it is too large
+ 207 - 169
src/components/generatingCapacityComponent/table.vue


+ 45 - 2
src/components/generatingCapacityComponent/tree.vue

@@ -24,7 +24,7 @@
       <el-tree
         :data="data"
         :props="defaultProps"
-        default-expand-all
+        :default-expanded-keys="defaultExpandedKeys"
         highlight-current
         icon="none"
         :filter-node-method="filterNode"
@@ -33,7 +33,7 @@
         :show-checkbox="showCheckbox"
         @check="funCheckChange"
         node-key="id"
-        :expand-on-click-node="false"
+        :expand-on-click-node="true"
         :current-node-key="activeNode"
         :class="showCheckbox ? 'elTreeSty' : ''"
       >
@@ -122,6 +122,7 @@ import { Search } from "@element-plus/icons-vue";
 import { saveAs } from "file-saver";
 import { apiGetExportMsg } from "@/api/gengra";
 import { DebugCameraPrimitive } from "cesium";
+import DAYJS from "dayjs";
 export default {
   components: {
     TreeNode,
@@ -178,25 +179,53 @@ export default {
         label: "label",
       },
       activeNode: "",
+      defaultExpandedKeys: [],
     };
   },
   watch: {
     filterText(val) {
       this.$refs.tree.filter(val);
     },
+
     currentNodeKey(value) {
       this.activeNode = value;
       const node = this.getTreeItem(value, this.data?.[0]) || null;
       this.$refs.tree.setChecked(node, true);
     },
+
+    data(value) {
+      this.defaultExpandedKeys = this.getDefaultExpandedKey([], value);
+    },
   },
+
+  created() {
+    this.defaultExpandedKeys = this.getDefaultExpandedKey([], this.data || []);
+  },
+
   mounted() {
     // this.treeJsonFn()
   },
+
   methods: {
+    getDefaultExpandedKey(defaultExpandedKey = [], data = []) {
+      data?.forEach((ele) => {
+        if (/(\d{1,2})月(\d{1,2})日/.test(ele.label)) {
+          const monthReg = new RegExp(`${DAYJS().format("MM")}月`);
+          if (monthReg.test(ele.label)) {
+            defaultExpandedKey.push(ele.id);
+          }
+        } else {
+          if (ele?.children?.length) {
+            return this.getDefaultExpandedKey(defaultExpandedKey, ele.children);
+          }
+        }
+      });
+      return defaultExpandedKey;
+    },
     treeJsonFn() {
       this.treeJsonArr = this.funRepeatMap(this.treeJson.data);
     },
+
     funRepeatMap(arr, type = "prepare") {
       return arr.map((o) => {
         if (o.children) {
@@ -212,6 +241,7 @@ export default {
         };
       });
     },
+
     getTreeItem(id = "", data = {}) {
       if (!id) {
         return {};
@@ -238,16 +268,20 @@ export default {
         }
       }
     },
+
     shuFn(node, data) {
       // debugger
     },
+
     filterNode(value, data) {
       if (!value) return true;
       return data.label.indexOf(value) !== -1;
     },
+
     refreshFn() {
       this.$emit("refresh");
     },
+
     funCurrentChange(current, currentNode) {
       this.activeNode = current?.id || "";
       this.$emit("currentChange", {
@@ -255,6 +289,7 @@ export default {
         currentNode,
       });
     },
+
     async funCommand({ type, data, node }) {
       switch (type) {
         case "save":
@@ -388,6 +423,7 @@ export default {
           break;
       }
     },
+
     funCheckChange(current, checkedNodes) {
       this.$emit("checkChange", {
         current,
@@ -401,6 +437,13 @@ export default {
 .treeData {
   overflow-y: auto;
 
+  .eldropdownCla {
+    .changenodeLabel {
+    }
+    .nodeLabel {
+    }
+  }
+
   .treeSeach {
     width: 100%;
     display: flex;

+ 361 - 357
src/components/homeComponent/echartsGauge.vue

@@ -1,382 +1,386 @@
 <template>
-    <div class="chart" :id="id"></div>
+  <div class="chart" :id="id"></div>
 </template>
 
 <script>
-    import util from "@/helper/util.js";
-    import partten from "@/helper/partten.js";
-    import * as echarts from "echarts";
+import util from "@/helper/util.js";
+import partten from "@/helper/partten.js";
+import * as echarts from "echarts";
 
-    export default {
-        name: "dsah-pie",
-        componentName: "dsah-pie",
-        props: {
-            theme: {
-                type: Boolean,
-                default: false,
+export default {
+  name: "dsah-pie",
+  componentName: "dsah-pie",
+  props: {
+    theme: {
+      type: Boolean,
+      default: false,
+    },
+    // 宽度 默认9.722vh
+    width: {
+      type: String,
+      default: "85%",
+    },
+    // 高度 默认9.722vh
+    height: {
+      type: String,
+      default: "7.4074vh",
+    },
+    // 标题
+    title: {
+      type: String,
+      default: "标题",
+    },
+    unit: {
+      type: String,
+      default: "",
+    },
+    // 值
+    value: {
+      type: Number,
+      default: 0,
+    },
+    // 最小值
+    min: {
+      type: Number,
+      default: 0,
+    },
+    // 最大值
+    max: {
+      type: Number,
+      default: 100,
+    },
+    // 颜色 传入 green yellow等 (partten中支持的颜色)
+    color: {
+      type: String,
+      default: "green",
+    },
+  },
+  data() {
+    return {
+      id: "",
+      chart: null,
+    };
+  },
+  computed: {
+    colorValue() {
+      return partten.getColor(this.color);
+    },
+  },
+  methods: {
+    resize() {},
+    initChart() {
+      const theme = sessionStorage.getItem("theme") === "true" ? true : false;
+      let chart = echarts.init(this.$el);
+      let option = {
+        title: {
+          show: true,
+          text: "",
+          subtext: this.title,
+          subtextStyle: {
+            fontSize: 14,
+            color: theme ? "#8B93A6" : "#fff",
+          },
+          x: "45%",
+          y: "70%",
+          z: 8,
+          textAlign: "center",
+          textStyle: {
+            color: theme? "#8B93A6" : "#fff",
+            fontSize: 12,
+            fontWeight: "normal",
+          },
+        },
+        series: [
+          // 进度条
+          {
+            z: 1,
+            name: "内部(环形)进度条",
+            type: "gauge",
+            radius: "75%",
+            splitNumber: 5,
+            axisLine: {
+              lineStyle: {
+                color: [
+                  [
+                    (this.value < 0 ? 0 : this.value) / this.max,
+                    new echarts.graphic.LinearGradient(0, 0, 1, 0, [
+                      {
+                        offset: 0,
+                        color: !this.theme
+                          ? "rgba(28, 153, 255, .1)"
+                          : "#1850B3",
+                      },
+                      {
+                        offset: 1,
+                        color: this.color,
+                      },
+                    ]),
+                  ],
+                  [1, "transparent"],
+                ],
+                width: 10,
+              },
+            },
+            axisLabel: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+            pointer: {
+              show: false,
+            },
+          },
+          // 指针
+          {
+            name: "指针",
+            type: "gauge",
+            z: 2,
+            min: this.min,
+            max: this.max,
+            radius: "80%",
+            axisLine: {
+              show: false,
+            },
+            tooltip: {
+              show: false,
             },
-            // 宽度 默认9.722vh
-            width: {
-                type: String,
-                default: "85%",
+            axisLabel: {
+              show: false,
             },
-            // 高度 默认9.722vh
-            height: {
-                type: String,
-                default: "7.4074vh",
+            axisTick: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+            detail: {
+              show: false,
             },
-            // 标题
             title: {
-                type: String,
-                default: "标题",
+              //标题
+              show: false,
             },
-            unit: {
-                type: String,
-                default: "",
+            data: [
+              {
+                value: this.value < 0 ? 0 : this.value,
+              },
+            ],
+            itemStyle: {
+              normal: {
+                color: "#fff",
+              },
             },
-            // 值
-            value: {
-                type: Number,
-                default: 0,
+            pointer: {
+              show: true,
+              length: "35%",
+              radius: "20%",
+              width: 1, //指针粗细
+              offsetCenter: ["0%", "-40%"],
             },
-            // 最小值
-            min: {
-                type: Number,
-                default: 0,
+            animationDuration: 0,
+          },
+          // 刻度
+          {
+            name: "外部刻度",
+            type: "gauge",
+            center: ["50%", "49.5%"],
+            radius: "80%",
+            min: this.min, //最小刻度
+            max: this.max, //最大刻度
+            splitNumber: 10, //刻度数量
+            startAngle: 225,
+            endAngle: -45,
+            axisLine: {
+              show: true,
+              // 仪表盘刻度线
+              lineStyle: {
+                width: 1,
+                color: [[1, this.color]],
+              },
             },
-            // 最大值
-            max: {
-                type: Number,
-                default: 100,
+            //仪表盘文字
+            axisLabel: {
+              show: false,
             },
-            // 颜色 传入 green yellow等 (partten中支持的颜色)
-            color: {
-                type: String,
-                default: "green",
+            //刻度标签。
+            axisTick: {
+              show: true,
+              distance: 6,
+              splitNumber: 2,
+              lineStyle: {
+                color: this.color, //用颜色渐变函数不起作用
+                width: 1,
+              },
+              length: 4,
+            }, //刻度样式
+            splitLine: {
+              show: false,
+            }, //分隔线样式
+            detail: {
+              show: false,
             },
-        },
-        data() {
-            return {
-                id: "",
-                chart: null,
-            };
-        },
-        computed: {
-            colorValue() {
-                return partten.getColor(this.color);
+            pointer: {
+              show: false,
             },
-        },
-        methods: {
-            resize() {},
-            initChart() {
-                let chart = echarts.init(this.$el);
-                let option = {
-                    title: {
-                        show: true,
-                        text: '',
-                        subtext: this.title,
-                        subtextStyle: {
-                            fontSize: 14,
-                            color: !this.theme ? "#8B93A6" : "#5E6269",
-                        },
-                        x: "45%",
-                        y: "70%",
-                        z: 8,
-                        textAlign: "center",
-                        textStyle: {
-                            color: !this.theme ? "#8B93A6" : "#5E6269",
-                            fontSize: 12,
-                            fontWeight: "normal",
-                        },
+          },
+          // 显示数字
+          {
+            type: "pie",
+            radius: ["0", "40%"],
+            center: ["50%", "49.5%"],
+            z: 8,
+            animation: false,
+            hoverAnimation: false,
+            data: [
+              {
+                value: this.value < 0 ? 0 : this.value,
+                itemStyle: {
+                  normal: {
+                    color: "transition",
+                  },
+                },
+                label: {
+                  normal: {
+                    formatter: function (params) {
+                      return params.value;
                     },
-                    series: [
-                        // 进度条
-                        {
-                            z: 1,
-                            name: "内部(环形)进度条",
-                            type: "gauge",
-                            radius: "75%",
-                            splitNumber: 5,
-                            axisLine: {
-                                lineStyle: {
-                                    color: [
-                                        [
-                                            (this.value < 0 ? 0 : this.value) / this.max,
-                                            new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
-                                                    offset: 0,
-                                                    color: !this.theme ?
-                                                        "rgba(28, 153, 255, .1)" : "#1850B3",
-                                                },
-                                                {
-                                                    offset: 1,
-                                                    color: this.color,
-                                                },
-                                            ]),
-                                        ],
-                                        [1, "transparent"],
-                                    ],
-                                    width: 10,
-                                },
-                            },
-                            axisLabel: {
-                                show: false,
-                            },
-                            axisTick: {
-                                show: false,
-                            },
-                            splitLine: {
-                                show: false,
-                            },
-                            pointer: {
-                                show: false,
-                            },
-                        },
-                        // 指针
-                        {
-                            name: "指针",
-                            type: "gauge",
-                            z: 2,
-                            min: this.min,
-                            max: this.max,
-                            radius: "80%",
-                            axisLine: {
-                                show: false,
-                            },
-                            tooltip: {
-                                show: false,
-                            },
-                            axisLabel: {
-                                show: false,
-                            },
-                            axisTick: {
-                                show: false,
-                            },
-                            splitLine: {
-                                show: false,
-                            },
-                            detail: {
-                                show: false,
-                            },
-                            title: {
-                                //标题
-                                show: false,
-                            },
-                            data: [{
-                                value: this.value < 0 ? 0 : this.value,
-                            }, ],
-                            itemStyle: {
-                                normal: {
-                                    color: "#fff",
-                                },
-                            },
-                            pointer: {
-                                show: true,
-                                length: "35%",
-                                radius: "20%",
-                                width: 1, //指针粗细
-                                offsetCenter: ["0%", "-40%"],
-                            },
-                            animationDuration: 0,
-                        },
-                        // 刻度
-                        {
-                            name: "外部刻度",
-                            type: "gauge",
-                            center: ["50%", "49.5%"],
-                            radius: "80%",
-                            min: this.min, //最小刻度
-                            max: this.max, //最大刻度
-                            splitNumber: 10, //刻度数量
-                            startAngle: 225,
-                            endAngle: -45,
-                            axisLine: {
-                                show: true,
-                                // 仪表盘刻度线
-                                lineStyle: {
-                                    width: 1,
-                                    color: [
-                                        [
-                                            1,
-                                            this.color
-                                        ],
-                                    ],
-                                },
-                            },
-                            //仪表盘文字
-                            axisLabel: {
-                                show: false,
-                            },
-                            //刻度标签。
-                            axisTick: {
-                                show: true,
-                                distance: 6,
-                                splitNumber: 2,
-                                lineStyle: {
-                                    color: this.color, //用颜色渐变函数不起作用
-                                    width: 1,
-                                },
-                                length: 4,
-                            }, //刻度样式
-                            splitLine: {
-                                show: false,
-                            }, //分隔线样式
-                            detail: {
-                                show: false,
-                            },
-                            pointer: {
-                                show: false,
-                            },
-                        },
-                        // 显示数字
-                        {
-                            type: "pie",
-                            radius: ["0", "40%"],
-                            center: ["50%", "49.5%"],
-                            z: 8,
-                            animation: false,
-                            hoverAnimation: false,
-                            data: [{
-                                value: this.value < 0 ? 0 : this.value,
-                                itemStyle: {
-                                    normal: {
-                                        color: "transition",
-                                    },
-                                },
-                                label: {
-                                    normal: {
-                                        formatter: function (params) {
-                                            return params.value;
-                                        },
-                                        color: this.color,
-                                        fontSize: 12,
-                                        fontWeight: "bold",
-                                        position: "center",
-                                        show: true,
-                                    },
-                                },
-                                labelLine: {
-                                    show: false,
-                                },
-                            }, ],
-                        },
-                        {
-                            name: "内部阴影",
-                            type: "gauge",
-                            radius: "85%",
-                            splitNumber: 10,
-                            axisLine: {
-                                lineStyle: {
-                                    color: [
-                                        // [
-                                        //   1,
-                                        //   new echarts.graphic.LinearGradient(0, 1, 0, 0, [
-                                        //     {
-                                        //       offset: 0,
-                                        //       color: "rgba(45,230,150,0)",
-                                        //     },
-                                        //     {
-                                        //       offset: 0.5,
-                                        //       color: "rgba(45,230,150,0.2)",
-                                        //     },
-                                        //     {
-                                        //       offset: 1,
-                                        //       color: "rgba(45,230,150,1)",
-                                        //     },
-                                        //   ]),
-                                        // ],
-                                        [
-                                            1,
-                                            this.color == "green" ?
-                                            "rgba(45,230,150,0.1)" :
-                                            "rgba(255, 131, 0, 0.1)",
-                                        ],
-                                        // [1, "rgba(45,230,150,0)"],
-                                    ],
-                                    width: 3,
-                                },
-                            },
-                            axisLabel: {
-                                show: false,
-                            },
-                            axisTick: {
-                                show: false,
-                            },
-                            splitLine: {
-                                show: false,
-                            },
-                            itemStyle: {
-                                show: false,
-                            },
-                        },
-                        // 光环
-                        {
-                            type: "pie",
-                            radius: "40%",
-                            center: ["50%", "49.5%"],
-                            animationType: "scale",
-                            animation: false,
-                            label: {
-                                show: false,
-                            },
-                            labelLine: {
-                                show: false,
-                            },
-                            emphasis: {
-                                scale: false,
-                            },
-                            data: [{
-                                value: 1,
-                                itemStyle: {
-                                    color: "transparent",
-                                    borderColor: this.color,
-                                    opacity: 0.3,
-                                    shadowColor: this.color,
-                                    shadowBlur: 20,
-                                },
-                            }, ],
-                        },
-                    ],
-                };
+                    color: this.color,
+                    fontSize: 12,
+                    fontWeight: "bold",
+                    position: "center",
+                    show: true,
+                  },
+                },
+                labelLine: {
+                  show: false,
+                },
+              },
+            ],
+          },
+          {
+            name: "内部阴影",
+            type: "gauge",
+            radius: "85%",
+            splitNumber: 10,
+            axisLine: {
+              lineStyle: {
+                color: [
+                  // [
+                  //   1,
+                  //   new echarts.graphic.LinearGradient(0, 1, 0, 0, [
+                  //     {
+                  //       offset: 0,
+                  //       color: "rgba(45,230,150,0)",
+                  //     },
+                  //     {
+                  //       offset: 0.5,
+                  //       color: "rgba(45,230,150,0.2)",
+                  //     },
+                  //     {
+                  //       offset: 1,
+                  //       color: "rgba(45,230,150,1)",
+                  //     },
+                  //   ]),
+                  // ],
+                  [
+                    1,
+                    this.color == "green"
+                      ? "rgba(45,230,150,0.1)"
+                      : "rgba(255, 131, 0, 0.1)",
+                  ],
+                  // [1, "rgba(45,230,150,0)"],
+                ],
+                width: 3,
+              },
+            },
+            axisLabel: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+            itemStyle: {
+              show: false,
+            },
+          },
+          // 光环
+          {
+            type: "pie",
+            radius: "40%",
+            center: ["50%", "49.5%"],
+            animationType: "scale",
+            animation: false,
+            label: {
+              show: false,
+            },
+            labelLine: {
+              show: false,
+            },
+            emphasis: {
+              scale: false,
+            },
+            data: [
+              {
+                value: 1,
+                itemStyle: {
+                  color: "transparent",
+                  borderColor: this.color,
+                  opacity: 0.3,
+                  shadowColor: this.color,
+                  shadowBlur: 20,
+                },
+              },
+            ],
+          },
+        ],
+      };
 
-                chart.clear();
-                chart.setOption(option);
+      chart.clear();
+      chart.setOption(option);
 
-                this.resize = function () {
-                    chart.resize();
-                };
+      this.resize = function () {
+        chart.resize();
+      };
 
-                window.removeEventListener("resize", this.resize);
-                window.addEventListener("resize", this.resize);
-            },
-        },
-        created() {
-            this.id = "pie-chart-" + util.newGUID();
-        },
-        mounted() {
-            this.$el.style.width = this.width;
-            this.$el.style.height = this.height;
-            this.initChart();
-        },
-        updated() {
-            this.initChart();
-        },
-        unmounted() {
-            window.removeEventListener("resize", this.resize);
-        },
+      window.removeEventListener("resize", this.resize);
+      window.addEventListener("resize", this.resize);
+    },
+  },
+  created() {
+    this.id = "pie-chart-" + util.newGUID();
+  },
+  mounted() {
+    this.$el.style.width = this.width;
+    this.$el.style.height = this.height;
+    this.initChart();
+  },
+  updated() {
+    this.initChart();
+  },
+  unmounted() {
+    window.removeEventListener("resize", this.resize);
+  },
 
-        watch: {
-            "$store.state.theme"() {
-                this.initChart();
-            },
-        },
-    };
+  watch: {
+    "$store.state.theme"() {
+      this.initChart();
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
-    .chart {
-        width: 100%;
-        height: 100%;
-        display: block;
-        margin: auto;
-    }
+.chart {
+  width: 100%;
+  height: 100%;
+  display: block;
+  margin: auto;
+}
 </style>

+ 59 - 54
src/components/homeComponent/echartsGaugeComponent.vue

@@ -1,67 +1,72 @@
 <template>
-    <div class="power-review">
-        <Row type="flex" justify="space-between" :align="'middle'">
-            <!-- 功率复核 PowerLoad -->
-            <Col v-for="item in PowerLoad" :key="item" :span="6">
-            <echarts-gauge :title="item.title" :unit="item.unit" :value="item.value" :max="item.max" height="98px"
-                width="100%" color="#1C99FF" :theme="theme" />
-            </Col>
-        </Row>
-    </div>
+  <div class="power-review">
+    <Row type="flex" justify="space-between" :align="'middle'">
+      <!-- 功率复核 PowerLoad -->
+      <Col v-for="item in PowerLoad" :key="item" :span="6">
+        <echarts-gauge
+          :title="item.title"
+          :unit="item.unit"
+          :value="item.value"
+          :max="item.max"
+          height="98px"
+          width="100%"
+          color="#1C99FF"
+          :theme="theme"
+        />
+      </Col>
+    </Row>
+  </div>
 </template>
 
 <script>
-    import Col from "@/components/homeComponent/grid/col.vue";
-    import Row from "@/components/homeComponent/grid/row.vue";
-    import echartsGauge from "@/components/homeComponent/echartsGauge.vue";
-    import dayjs from "dayjs";
-    export default {
-        components: {
-            Row,
-            Col,
-            echartsGauge,
-        },
-        data() {
-            return {
-                // 功率复核数据
-                PowerLoad: [],
-
-            };
-        },
-
-        props: {
-            data: {
-                type: Array,
-                default: () => [],
-            },
-            theme: {
-                type: Boolean,
-                default: false,
-            },
-        },
+import Col from "@/components/homeComponent/grid/col.vue";
+import Row from "@/components/homeComponent/grid/row.vue";
+import echartsGauge from "@/components/homeComponent/echartsGauge.vue";
+import dayjs from "dayjs";
+export default {
+  components: {
+    Row,
+    Col,
+    echartsGauge,
+  },
+  data() {
+    return {
+      // 功率复核数据
+      PowerLoad: [],
+    };
+  },
 
-        mounted() {
-            this.PowerLoad = this.data;
-        },
+  props: {
+    data: {
+      type: Array,
+      default: () => [],
+    },
+    theme: {
+      type: Boolean,
+      default: false,
+    },
+  },
 
-        methods: {
+  mounted() {
+    this.PowerLoad = this.data;
+  },
 
-        },
+  methods: {},
 
-        watch: {
-            data(res) {
-                this.PowerLoad = res;
-            },
-        },
-    };
+  watch: {
+    data(res) {
+      this.PowerLoad = res;
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
-    .power-review {
-        padding: 15px 10px 10px 10px;
-    }
+.power-review {
+  padding: 15px 10px 10px 10px;
+}
 
-    .col+.col {
-        margin-left: 0px;
-    }
+.col + .col {
+  margin-left: 0px;
+}
 </style>

+ 321 - 310
src/components/homeComponent/forecastBarComponent.vue

@@ -1,330 +1,341 @@
 <template>
-    <div>
-        <div class="chart" v-for="index of list.length" :key="index" :id="id + index"></div>
-    </div>
+  <div>
+    <div
+      class="chart"
+      v-for="index of list.length"
+      :key="index"
+      :id="id + index"
+    ></div>
+  </div>
 </template>
 
 <script>
-    import util from "@/helper/util.js";
-    import partten from "@/helper/partten.js";
-    import * as echarts from "echarts";
+import util from "@/helper/util.js";
+import partten from "@/helper/partten.js";
+import * as echarts from "echarts";
 
-    export default {
-        name: "percent-pie",
-        componentName: "percent-pie",
-        props: {
-            width: {
-                type: String,
-                default: "100%",
+export default {
+  name: "percent-pie",
+  componentName: "percent-pie",
+  props: {
+    width: {
+      type: String,
+      default: "100%",
+    },
+    height: {
+      type: String,
+      default: "18.519vh",
+    },
+    //  传入数据
+    list: {
+      type: Array,
+      default: () => [],
+    },
+    total: {
+      type: Number,
+      default: 150,
+    },
+    theme: {
+      type: Boolean,
+      default: false,
+    },
+    colors: {
+      type: Array,
+      default: () => ["#FF9B23", "#1C99FF"],
+    },
+  },
+  data() {
+    return {
+      id: "",
+      chart: null,
+      firstAnimation: true,
+    };
+  },
+
+  computed: {
+    datas() {
+      return this.list.map((t) => {
+        return t.value;
+      });
+    },
+  },
+  methods: {
+    resize() {},
+    initChart(value, index) {
+      var currColor = value.color;
+      var $dom = document.getElementById(this.id + (index + 1));
+      $dom.style.width = this.width;
+      $dom.style.height = `calc(${this.height} / ${this.list.length} - 4px)`;
+      let chart = echarts.init($dom);
+      let option = {
+        xAxis: {
+          //   max: value.total,
+          splitLine: {
+            show: false,
+          },
+          axisLine: {
+            show: false,
+          },
+          axisLabel: {
+            show: false,
+          },
+          axisTick: {
+            show: false,
+          },
+        },
+        grid: {
+          left: 16,
+          top: 20, // 设置条形图的边s距
+          right: 0,
+          bottom: 0,
+          containLabel: true,
+        },
+        yAxis: [
+          {
+            type: "category",
+            inverse: true,
+            data: [value],
+            axisLine: {
+              show: false,
             },
-            height: {
-                type: String,
-                default: "18.519vh",
+            axisTick: {
+              show: false,
             },
-            //  传入数据
-            list: {
-                type: Array,
-                default: () => [],
+            axisLabel: {
+              show: false,
             },
-            total: {
-                type: Number,
-                default: 150,
+          },
+        ],
+        series: [
+          // 内
+          {
+            type: "bar",
+            barWidth: 6,
+            animation: this.firstAnimation,
+            // legendHoverLink: false,
+            // silent: true,
+            itemStyle: {
+              normal: {
+                color: function (params) {
+                  return {
+                    type: "linear",
+                    x: 100,
+                    y: 10,
+                    x2: 1,
+                    y2: 0,
+                    colorStops: [
+                      {
+                        offset: 0,
+                        color: currColor, // 0% 处的颜色
+                      },
+                      {
+                        offset: 1,
+                        color: currColor, // 100% 处的颜色
+                      },
+                    ],
+                  };
+                },
+                shadowBlur: 10,
+                shadowColor: "rgba(255, 255, 255, 0.30)",
+              },
             },
-            theme: {
-                type: Boolean,
-                default: false,
+            label: {
+              normal: {
+                show: false,
+                position: [0, -20],
+                formatter: function (param) {
+                  return param.data.value;
+                },
+                textStyle: {
+                  color: currColor,
+                  // this.$store.state.themeName === "dark" ? "#ffffff" : "#000",
+                  fontSize: 12,
+                },
+              },
             },
-            colors: {
-                type: Array,
-                default: () => ["#FF9B23", "#1C99FF"],
+            data: [value],
+            z: 1,
+            animationEasing: "elasticOut",
+          },
+          // 三角
+          {
+            type: "pictorialBar",
+            symbolPosition: "end",
+            animation: this.firstAnimation,
+            data: [value.value],
+            symbol: "triangle",
+            symbolOffset: [0, -10],
+            symbolSize: [5, 5],
+            symbolRotate: 180,
+            itemStyle: {
+              normal: {
+                borderWidth: 0,
+                color: function (params) {
+                  return currColor;
+                },
+                // shadowBlur: 2,
+                // shadowColor: "rgba(255, 255, 255, 0.80)",
+              },
             },
-        },
-        data() {
-            return {
-                id: "",
-                chart: null,
-                firstAnimation: true,
-            };
-        },
-
-        computed: {
-            datas() {
-                return this.list.map((t) => {
-                    return t.value;
-                });
+          },
+          // 分隔
+          {
+            type: "pictorialBar",
+            itemStyle: {
+              normal: {
+                color: this.theme ? "#fff" : "#000",
+              },
             },
-        },
-        methods: {
-            resize() {},
-            initChart(value, index) {
-                var currColor = value.color;
-                var $dom = document.getElementById(this.id + (index + 1));
-                $dom.style.width = this.width;
-                $dom.style.height = `calc(${this.height} / ${this.list.length} - 4px)`;
-                let chart = echarts.init($dom);
-                let option = {
-                    xAxis: {
-                        //   max: value.total,
-                        splitLine: {
-                            show: false,
-                        },
-                        axisLine: {
-                            show: false,
-                        },
-                        axisLabel: {
-                            show: false,
-                        },
-                        axisTick: {
-                            show: false,
-                        },
-                    },
-                    grid: {
-                        left: 16,
-                        top: 20, // 设置条形图的边s距
-                        right: 0,
-                        bottom: 0,
-                        containLabel: true,
+            animation: this.firstAnimation,
+            symbolRepeat: "fixed",
+            symbolMargin: 4,
+            symbol: "rect",
+            symbolClip: true,
+            symbolSize: [1, 8],
+            symbolPosition: "start",
+            symbolOffset: [8, -1],
+            symbolBoundingData: value.total,
+            symbolRotate: -15,
+            data: [value],
+            z: 2,
+            animationEasing: "elasticOut",
+          },
+          // 外边框
+          {
+            type: "pictorialBar",
+            animation: this.firstAnimation,
+            symbol: "rect",
+            symbolBoundingData: value.total,
+            itemStyle: {
+              normal: {
+                color: "none",
+              },
+            },
+            label: {
+              normal: {
+                formatter: (params) => {
+                  return "{gm|}{f|  " + params.data + "}";
+                },
+                rich: {
+                  f: {
+                    color:
+                      this.$store.state.themeName === "dark" ? "#fff" : "#000",
+                    fontSize: 14,
+                    lineHeight: 20,
+                    fontFamily: "Bicubik",
+                  },
+                  gm: {
+                    backgroundColor: currColor,
+                    width: 4,
+                    height: 4,
+                    lineHeight: 20,
+                    verticalAlign: "middle",
+                    borderRadius: [50, 50, 50, 50],
+                  },
+                },
+                position: "right",
+                distance: 8, // 向右偏移位置
+                show: true,
+              },
+            },
+            // data: [+value.total],
+          },
+          // 外框
+          {
+            type: "bar",
+            animation: this.firstAnimation,
+            name: "外框",
+            barGap: "-120%", // 设置外框粗细
+            data: [
+              {
+                value: value.total,
+                itemStyle: {
+                  normal: {
+                    color: "transparent",
+                    borderColor: currColor, // [, "#333"],
+                    borderWidth: 1, // 边框宽度
+                    // barBorderRadius: 0, //圆角半径
+                    opacity: 0.5,
+                    label: {
+                      // 标签显示位置
+                      show: false,
+                      position: "top", // insideTop 或者横向的 insideLeft
                     },
-                    yAxis: [{
-                        type: "category",
-                        inverse: true,
-                        data: [value],
-                        axisLine: {
-                            show: false,
-                        },
-                        axisTick: {
-                            show: false,
-                        },
-                        axisLabel: {
-                            show: false,
-                        },
-                    }, ],
-                    series: [
-                        // 内
-                        {
-                            type: "bar",
-                            barWidth: 6,
-                            animation: this.firstAnimation,
-                            // legendHoverLink: false,
-                            // silent: true,
-                            itemStyle: {
-                                normal: {
-                                    color: function (params) {
-                                        return {
-                                            type: "linear",
-                                            x: 100,
-                                            y: 10,
-                                            x2: 1,
-                                            y2: 0,
-                                            colorStops: [{
-                                                    offset: 0,
-                                                    color: currColor, // 0% 处的颜色
-                                                },
-                                                {
-                                                    offset: 1,
-                                                    color: currColor, // 100% 处的颜色
-                                                },
-                                            ],
-                                        };
-                                    },
-                                    shadowBlur: 10,
-                                    shadowColor: "rgba(255, 255, 255, 0.30)",
-                                },
-                            },
-                            label: {
-                                normal: {
-                                    show: false,
-                                    position: [0, -20],
-                                    formatter: function (param) {
-                                        return param.data.value;
-                                    },
-                                    textStyle: {
-                                        color: currColor,
-                                        // this.$store.state.themeName === "dark" ? "#ffffff" : "#000",
-                                        fontSize: 12,
-                                    },
-                                },
-                            },
-                            data: [value],
-                            z: 1,
-                            animationEasing: "elasticOut",
-                        },
-                        // 三角
-                        {
-                            type: "pictorialBar",
-                            symbolPosition: "end",
-                            animation: this.firstAnimation,
-                            data: [value.value],
-                            symbol: "triangle",
-                            symbolOffset: [0, -10],
-                            symbolSize: [5, 5],
-                            symbolRotate: 180,
-                            itemStyle: {
-                                normal: {
-                                    borderWidth: 0,
-                                    color: function (params) {
-                                        return currColor;
-                                    },
-                                    // shadowBlur: 2,
-                                    // shadowColor: "rgba(255, 255, 255, 0.80)",
-                                },
-                            },
-                        },
-                        // 分隔
-                        {
-                            type: "pictorialBar",
-                            itemStyle: {
-                                normal: {
-                                    color: this.theme ? "#fff" : "#000",
-                                },
-                            },
-                            animation: this.firstAnimation,
-                            symbolRepeat: "fixed",
-                            symbolMargin: 4,
-                            symbol: "rect",
-                            symbolClip: true,
-                            symbolSize: [1, 8],
-                            symbolPosition: "start",
-                            symbolOffset: [8, -1],
-                            symbolBoundingData: value.total,
-                            symbolRotate: -15,
-                            data: [value],
-                            z: 2,
-                            animationEasing: "elasticOut",
-                        },
-                        // 外边框
-                        {
-                            type: "pictorialBar",
-                            animation: this.firstAnimation,
-                            symbol: "rect",
-                            symbolBoundingData: value.total,
-                            itemStyle: {
-                                normal: {
-                                    color: "none",
-                                },
-                            },
-                            label: {
-                                normal: {
-                                    formatter: (params) => {
-                                        return "{gm|}{f|  " + params.data + "}";
-                                    },
-                                    rich: {
-                                        f: {
-                                            color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
-                                            fontSize: 14,
-                                            lineHeight: 20,
-                                            fontFamily: "Bicubik",
-                                        },
-                                        gm: {
-                                            backgroundColor: currColor,
-                                            width: 4,
-                                            height: 4,
-                                            lineHeight: 20,
-                                            verticalAlign: "middle",
-                                            borderRadius: [50, 50, 50, 50],
-                                        },
-                                    },
-                                    position: "right",
-                                    distance: 8, // 向右偏移位置
-                                    show: true,
-                                },
-                            },
-                            // data: [+value.total],
-                        },
-                        // 外框
-                        {
-                            type: "bar",
-                            animation: this.firstAnimation,
-                            name: "外框",
-                            barGap: "-120%", // 设置外框粗细
-                            data: [{
-                                value: value.total,
-                                itemStyle: {
-                                    normal: {
-                                        color: "transparent",
-                                        borderColor: currColor, // [, "#333"],
-                                        borderWidth: 1, // 边框宽度
-                                        // barBorderRadius: 0, //圆角半径
-                                        opacity: 0.5,
-                                        label: {
-                                            // 标签显示位置
-                                            show: false,
-                                            position: "top", // insideTop 或者横向的 insideLeft
-                                        },
-                                    },
-                                },
-                            }, ],
-                            barWidth: 9,
-                        },
-                    ],
-                };
+                  },
+                },
+              },
+            ],
+            barWidth: 9,
+          },
+        ],
+      };
 
-                chart.clear();
-                chart.setOption(option);
+      chart.clear();
+      chart.setOption(option);
 
-                this.resize = function () {
-                    chart.resize();
-                };
+      this.resize = function () {
+        chart.resize();
+      };
 
-                window.removeEventListener("resize", this.resize);
-                window.addEventListener("resize", this.resize);
-            },
-            handleElectricDetail() {},
-        },
-        created() {
-            this.id = "pie-chart-" + util.newGUID();
-        },
-        mounted() {
-            // this.$nextTick(() => {
-            //   this.$el.style.width = this.width;
-            //   this.$el.style.height = this.height;
-            //   this.list.forEach((value, index) => {
-            //     this.initChart(value, index);
-            //   });
-            //   this.firstAnimation = false;
-            // });
-        },
-        //   updated() {
-        //     this.$nextTick(() => {
-        //       this.list.forEach((value, index) => {
-        //         this.initChart(value, index);
-        //       });
-        //     });
-        //   },
-        watch: {
-            list: {
-                handler(val) {
-                    if (val && val.length) {
-                        this.$nextTick(() => {
-                            this.$el.style.width = this.width;
-                            this.$el.style.height = this.height;
-                            this.list.forEach((value, index) => {
-                                this.initChart(value, index);
-                            });
-                            this.firstAnimation = false;
-                        });
-                    }
-                },
-                deep: true,
-                immediate: true,
-            },
-            "$store.state.theme"() {
-                this.list.forEach((value, index) => {
-                    this.initChart(value, index);
-                });
-            },
-        },
-        unmounted() {
-            window.removeEventListener("resize", this.resize);
-        },
-    };
+      window.removeEventListener("resize", this.resize);
+      window.addEventListener("resize", this.resize);
+    },
+    handleElectricDetail() {},
+  },
+  created() {
+    this.id = "pie-chart-" + util.newGUID();
+  },
+  mounted() {
+    // this.$nextTick(() => {
+    //   this.$el.style.width = this.width;
+    //   this.$el.style.height = this.height;
+    //   this.list.forEach((value, index) => {
+    //     this.initChart(value, index);
+    //   });
+    //   this.firstAnimation = false;
+    // });
+  },
+  //   updated() {
+  //     this.$nextTick(() => {
+  //       this.list.forEach((value, index) => {
+  //         this.initChart(value, index);
+  //       });
+  //     });
+  //   },
+  watch: {
+    list: {
+      handler(val) {
+        if (val && val.length) {
+          this.$nextTick(() => {
+            this.$el.style.width = this.width;
+            this.$el.style.height = this.height;
+            this.list.forEach((value, index) => {
+              this.initChart(value, index);
+            });
+            this.firstAnimation = false;
+          });
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+    "$store.state.theme"() {
+      this.list.forEach((value, index) => {
+        this.initChart(value, index);
+      });
+    },
+  },
+  unmounted() {
+    window.removeEventListener("resize", this.resize);
+  },
+};
 </script>
 
 <style lang="less">
-    .chart {
-        width: 100%;
-        height: 100%;
-        display: inline-block;
-        cursor: default;
-    }
+.chart {
+  width: 100%;
+  height: 100%;
+  display: inline-block;
+  cursor: default;
+}
 </style>

File diff suppressed because it is too large
+ 576 - 449
src/components/powerPredictionComponent/batteryDivinerDialog/dayBatterDialog.vue


+ 527 - 402
src/components/powerPredictionComponent/batteryDivinerDialog/monthAndYearBatterDialog.vue

@@ -1,429 +1,554 @@
 <template>
-    <el-dialog custom-class="windLifeDialog" :title="title" v-model="dialogVisible" :fullscreen="true"
-        :close-on-click-modal="false" @close="closeDialog">
-        <div class="globalDiaMain" v-loading="loading" :class="!theme ? 'themeDa' : 'themeLi'">
-            <div class="main_top">
-                <div class="main_top_left">
-                    <div class="exceed">
-                        <span style="margin-top: 3px;">时间:</span>
-                        <el-date-picker v-model="monthVal" v-if="isMonth" type="daterange" value-format="YYYY-MM-DD"
-                            :clearable='false' range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
-                        </el-date-picker>
-                        <el-date-picker v-model="yearVal" v-else type="monthrange" value-format="YYYY-MM"
-                            range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份">
-                        </el-date-picker>
-                    </div>
-                    <div class="exceed">
-                        <span style="margin-top: 3px;">超前:</span>
-                        <el-select class="exTime" v-model="chooseExceedTimeFv" placeholder="请选择">
-                            <el-option v-for="item in ExceedTimeList" :key="item.value" :label="item.label"
-                                :disabled="item.disabled" :value="item.value">
-                            </el-option>
-                        </el-select>
-                    </div>
-                    <el-button type="primary" @click="seachData">查 询</el-button>
-                    <el-button @click="exportExcel">导出查询结果</el-button>
-                </div>
-            </div>
-            <div class="main_charts">
-                <div id="centersCharts" class="chartsStyle"></div>
-            </div>
-            <div class="main_table warn-table" style="margin-top: 20px">
-                <el-table :data="tableData" ref="report-table" border max-height="50vh" style="width: 100%">
-                    <el-table-column prop="dataTime" label="时间" align="center" width="160"></el-table-column>
-                    <el-table-column label="当期数据" align="center">
-                        <el-table-column prop="veryShortTermForecastDq" label="计划发电" align="center"></el-table-column>
-                        <el-table-column prop="actualPowerDq" label="实际发电" align="center"></el-table-column>
-                        <el-table-column prop="shortTermForecastDq" label="预测发电" align="center"></el-table-column>
-                    </el-table-column>
-                    <el-table-column label="同期数据" align="center">
-                        <el-table-column prop="veryShortTermForecastTq" label="计划发电" align="center"></el-table-column>
-                        <el-table-column prop="actualPowerTq" label="实际发电" align="center"></el-table-column>
-                        <el-table-column prop="shortTermForecastTq" label="预测发电" align="center"></el-table-column>
-                    </el-table-column>
-                    <el-table-column label="同期比率" align="center">
-                        <el-table-column prop="tqActualRatio" label="计划发电" align="center"></el-table-column>
-                        <el-table-column prop="tqUltraRatio" label="实际发电" align="center"></el-table-column>
-                        <el-table-column prop="tqShortRatio" label="预测发电" align="center"></el-table-column>
-                    </el-table-column>
-                    <el-table-column label="环比数据" align="center">
-                        <el-table-column prop="veryShortTermForecastSy" label="计划发电" align="center"></el-table-column>
-                        <el-table-column prop="actualPowerSy" label="实际发电" align="center"></el-table-column>
-                        <el-table-column prop="shortTermForecastSy" label="预测发电" align="center"></el-table-column>
-                    </el-table-column>
-                    <el-table-column label="环比比率" align="center">
-                        <el-table-column prop="hbActualRatio" label="计划发电" align="center"></el-table-column>
-                        <el-table-column prop="hbUltraRatio" label="实际发电" align="center"></el-table-column>
-                        <el-table-column prop="hbShortRatio" label="预测发电" align="center"></el-table-column>
-                    </el-table-column>
-                </el-table>
-            </div>
+  <el-dialog
+    custom-class="windLifeDialog"
+    :title="title"
+    v-model="dialogVisible"
+    :fullscreen="true"
+    :close-on-click-modal="false"
+    @close="closeDialog"
+  >
+    <div
+      class="globalDiaMain"
+      v-loading="loading"
+      :class="!theme ? 'themeDa' : 'themeLi'"
+    >
+      <div class="main_top">
+        <div class="main_top_left">
+          <div class="exceed">
+            <span style="margin-top: 3px">时间:</span>
+            <el-date-picker
+              v-model="monthVal"
+              v-if="isMonth"
+              type="daterange"
+              value-format="YYYY-MM-DD"
+              :clearable="false"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            >
+            </el-date-picker>
+            <el-date-picker
+              v-model="yearVal"
+              v-else
+              type="monthrange"
+              value-format="YYYY-MM"
+              range-separator="至"
+              start-placeholder="开始月份"
+              end-placeholder="结束月份"
+            >
+            </el-date-picker>
+          </div>
+          <div class="exceed">
+            <span style="margin-top: 3px">超前:</span>
+            <el-select
+              style="width: 130px"
+              class="exTime"
+              v-model="chooseExceedTimeFv"
+              placeholder="请选择"
+            >
+              <el-option
+                v-for="item in ExceedTimeList"
+                :key="item.value"
+                :label="item.label"
+                :disabled="item.disabled"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </div>
+          <el-button type="primary" @click="seachData">查 询</el-button>
+          <el-button @click="exportExcel">导出查询结果</el-button>
         </div>
-    </el-dialog>
+      </div>
+      <div class="main_charts">
+        <div id="centersCharts" class="chartsStyle"></div>
+      </div>
+      <div class="main_table warn-table" style="margin-top: 20px">
+        <el-table
+          :data="tableData"
+          ref="report-table"
+          border
+          max-height="50vh"
+          style="width: 100%"
+        >
+          <el-table-column
+            prop="dataTime"
+            label="时间"
+            align="center"
+            width="160"
+          ></el-table-column>
+          <el-table-column label="当期数据" align="center">
+            <el-table-column
+              prop="veryShortTermForecastDq"
+              label="计划发电"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="actualPowerDq"
+              label="实际发电"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="shortTermForecastDq"
+              label="预测发电"
+              align="center"
+            ></el-table-column>
+          </el-table-column>
+          <el-table-column label="同期数据" align="center">
+            <el-table-column
+              prop="veryShortTermForecastTq"
+              label="计划发电"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="actualPowerTq"
+              label="实际发电"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="shortTermForecastTq"
+              label="预测发电"
+              align="center"
+            ></el-table-column>
+          </el-table-column>
+          <el-table-column label="同期比率" align="center">
+            <el-table-column
+              prop="tqActualRatio"
+              label="计划发电"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="tqUltraRatio"
+              label="实际发电"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="tqShortRatio"
+              label="预测发电"
+              align="center"
+            ></el-table-column>
+          </el-table-column>
+          <el-table-column label="环比数据" align="center">
+            <el-table-column
+              prop="veryShortTermForecastSy"
+              label="计划发电"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="actualPowerSy"
+              label="实际发电"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="shortTermForecastSy"
+              label="预测发电"
+              align="center"
+            ></el-table-column>
+          </el-table-column>
+          <el-table-column label="环比比率" align="center">
+            <el-table-column
+              prop="hbActualRatio"
+              label="计划发电"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="hbUltraRatio"
+              label="实际发电"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="hbShortRatio"
+              label="预测发电"
+              align="center"
+            ></el-table-column>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+  </el-dialog>
 </template>
 
 <script>
-    import * as XLSX from 'xlsx'
-    import {
-        saveAs
-    } from 'file-saver'
-    import * as XLSXD from 'xlsx-js-style'
-    import {
-        apiGetmonthlyDailyPowerComparisonChartData,
-        apiGetyearlyDailyPowerComparisonChartData,
-        apiGetmonthlyDailyPowerComparisonTableData,
-        apiGetyearlyDailyPowerComparisonTableData
-    } from '../../../api/api'
-    export default {
-        props: {
-            from: {
-                type: String,
-                default: () => {
-                    return '';
-                },
-            },
-            ExceedTimeList: {
-                type: Array,
-                default: () => {
-                    return [];
-                },
-            },
-            stationData: {
-                type: Array,
-                default: () => {
-                    return [];
-                },
-            },
-            echartsTheme: {
-                type: String,
-                default: () => {
-                    return '';
-                },
-            },
-            theme: {
-                type: Boolean,
-                default: () => {
-                    return false;
-                },
-            },
-        },
-        data() {
-            return {
-                title: '',
-                dialogVisible: false,
-                windTurbines: null,
-                windTurbinesVal: null,
-                tableData: [],
-                chooseExceedTimeFv: 0,
-                pickerTime: [],
-                monthVal: [],
-                yearVal: [],
-                loading: false,
-                isMonth: false
+import * as XLSX from "xlsx";
+import { saveAs } from "file-saver";
+import * as XLSXD from "xlsx-js-style";
+import {
+  apiGetmonthlyDailyPowerComparisonChartData,
+  apiGetyearlyDailyPowerComparisonChartData,
+  apiGetmonthlyDailyPowerComparisonTableData,
+  apiGetyearlyDailyPowerComparisonTableData,
+} from "../../../api/api";
+export default {
+  props: {
+    from: {
+      type: String,
+      default: () => {
+        return "";
+      },
+    },
+    ExceedTimeList: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    stationData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    echartsTheme: {
+      type: String,
+      default: () => {
+        return "";
+      },
+    },
+    theme: {
+      type: Boolean,
+      default: () => {
+        return false;
+      },
+    },
+  },
+  data() {
+    return {
+      title: "",
+      dialogVisible: false,
+      windTurbines: null,
+      windTurbinesVal: null,
+      tableData: [],
+      chooseExceedTimeFv: 0,
+      pickerTime: [],
+      monthVal: [],
+      yearVal: [],
+      loading: false,
+      isMonth: false,
+    };
+  },
+  created() {},
+  methods: {
+    closeDialog() {
+      this.dialogVisible = false;
+    },
+    seachData() {
+      this.loading = true;
+      this.getChartsData();
+      this.getTableData();
+    },
+    chooseVal(val) {
+      this.stationData.forEach((item) => {
+        if (item.no === val) {
+          this.windTurbinesVal = item.itemVal;
+        }
+      });
+    },
+    // 全域功率预测echarts
+    getChartsData() {
+      let that = this;
+      let params = {
+        leadTime: that.chooseExceedTimeFv,
+        stationNumber: that.windTurbines,
+        itemVal: that.windTurbinesVal,
+      };
+      if (that.isMonth) {
+        params.beginDataTime = that.monthVal[0];
+        params.endDataTime = that.monthVal[1];
+        apiGetmonthlyDailyPowerComparisonChartData(params).then((datas) => {
+          that.changeChartsData(datas);
+        });
+      } else {
+        params.beginDataTime = that.yearVal[0];
+        params.endDataTime = that.yearVal[1];
+        delete params.leadTime;
+        apiGetyearlyDailyPowerComparisonChartData(params).then((datas) => {
+          that.changeChartsData(datas);
+        });
+      }
+    },
+    //数据处理
+    changeChartsData(datas) {
+      if (datas && datas.data) {
+        let xAxis = [];
+        let series = [];
+        let legend = [];
+        if (datas.data.dateList.length > 0) {
+          datas.data.dateList.forEach((item) => {
+            if (this.isMonth) {
+              xAxis.push(item.substring(0, item.indexOf(" ")));
+            } else {
+              xAxis.push(item.substring(0, item.indexOf(" ") - 3));
             }
+          });
+        }
+        if (datas.data.dataFormatList.length > 0) {
+          datas.data.dataFormatList.forEach((iten) => {
+            legend.push(iten.name);
+            let seriesObj = {
+              name: iten.name,
+              type: "line",
+              data: iten.data.map((it) => {
+                return this.$utils.isHasNum(it);
+              }),
+              symbol: "none",
+            };
+            series.push(seriesObj);
+          });
+        }
+        this.getglobalLine("centersCharts", xAxis, legend, series);
+      }
+    },
+    getglobalLine(name, xAxis, legend, series) {
+      let option = {
+        title: {
+          text: "电量",
         },
-        created() {},
-        methods: {
-            closeDialog() {
-                this.dialogVisible = false
-            },
-            seachData() {
-                this.loading = true
-                this.getChartsData()
-                this.getTableData()
-
-            },
-            chooseVal(val) {
-                this.stationData.forEach(item => {
-                    if (item.no === val) {
-                        this.windTurbinesVal = item.itemVal
-                    }
-                })
-            },
-            // 全域功率预测echarts
-            getChartsData() {
-                let that = this
-                let params = {
-                    leadTime: that.chooseExceedTimeFv,
-                    stationNumber: that.windTurbines,
-                    itemVal: that.windTurbinesVal
-                }
-                if (that.isMonth) {
-                    params.beginDataTime = that.monthVal[0]
-                    params.endDataTime = that.monthVal[1]
-                    apiGetmonthlyDailyPowerComparisonChartData(params).then(datas => {
-                        that.changeChartsData(datas)
-                    })
-                } else {
-                    params.beginDataTime = that.yearVal[0]
-                    params.endDataTime = that.yearVal[1]
-                    delete params.leadTime
-                    apiGetyearlyDailyPowerComparisonChartData(params).then(datas => {
-                        that.changeChartsData(datas)
-                    })
-                }
-            },
-            //数据处理
-            changeChartsData(datas) {
-                if (datas && datas.data) {
-                    let xAxis = []
-                    let series = []
-                    let legend = []
-                    if (datas.data.dateList.length > 0) {
-                        datas.data.dateList.forEach(item => {
-                            if (this.isMonth) {
-                                xAxis.push(item.substring(0, item.indexOf(' ')))
-                            } else {
-                                xAxis.push(item.substring(0, item.indexOf(' ') - 3))
-                            }
-                        })
-                    }
-                    if (datas.data.dataFormatList.length > 0) {
-                        datas.data.dataFormatList.forEach(iten => {
-                            legend.push(iten.name)
-                            let seriesObj = {
-                                name: iten.name,
-                                type: 'line',
-                                data: iten.data.map(it => {
-                                    return this.$utils.isHasNum(it)
-                                }),
-                                symbol: 'none'
-                            }
-                            series.push(seriesObj)
-                        })
-                    }
-                    this.getglobalLine('centersCharts', xAxis, legend, series)
+        tooltip: {
+          trigger: "axis",
+        },
+        legend: {
+          right: "20",
+          data: legend,
+        },
+        grid: {
+          left: "5%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        xAxis: {
+          type: "category",
+          boundaryGap: false,
+          data: xAxis,
+        },
+        yAxis: {
+          type: "value",
+          name: "万千瓦时(Wkw/h)",
+        },
+        series: series,
+      };
+      if (this.from === "index") {
+        option.backgroundColor = "";
+      }
+      if (!this.theme) {
+        option.backgroundColor = "";
+      }
+      // 基于准备好的dom,初始化echarts实例
+      let dom = document.getElementById(name);
+      dom.removeAttribute("_echarts_instance_")
+        ? dom.removeAttribute("_echarts_instance_")
+        : "";
+      let myChart = this.$echarts.init(dom, this.echartsTheme);
+      myChart.setOption(option);
+      window.addEventListener("resize", function () {
+        myChart.resize();
+      });
+    },
+    // 全域功率预测table
+    getTableData() {
+      let that = this;
+      let params = {
+        leadTime: that.chooseExceedTimeFv,
+        stationNumber: that.windTurbines,
+        itemVal: that.windTurbinesVal,
+      };
+      if (that.isMonth) {
+        params.beginDataTime = that.monthVal[0];
+        params.endDataTime = that.monthVal[1];
+        apiGetmonthlyDailyPowerComparisonTableData(params).then((datas) => {
+          that.changeTableData(datas);
+        });
+      } else {
+        params.beginDataTime = that.yearVal[0];
+        params.endDataTime = that.yearVal[1];
+        delete params.leadTime;
+        apiGetyearlyDailyPowerComparisonTableData(params).then((datas) => {
+          that.changeTableData(datas);
+        });
+      }
+    },
+    changeTableData(datas) {
+      if (datas && datas.data) {
+        this.loading = false;
+        if (datas.data.dataFormatList) {
+          datas.data.dataFormatList.forEach((item) => {
+            for (let i in item) {
+              if (i !== "dataTime") {
+                item[i] = this.$utils.isHasNum(item[i]);
+              } else {
+                if (!this.isMonth) {
+                  item[i] = item[i].substring(0, item[i].lastIndexOf("-"));
                 }
-            },
-            getglobalLine(name, xAxis, legend, series) {
-                let option = {
-                    title: {
-                        text: '电量'
-                    },
-                    tooltip: {
-                        trigger: 'axis'
-                    },
-                    legend: {
-                        right: '20',
-                        data: legend
-                    },
-                    grid: {
-                        left: '5%',
-                        right: '4%',
-                        bottom: '3%',
-                        containLabel: true
-                    },
-                    xAxis: {
-                        type: 'category',
-                        boundaryGap: false,
-                        data: xAxis
+              }
+            }
+            //同期计划发电
+            item.tqActualRatio = this.$utils.ratioCalculation(
+              item.veryShortTermForecastDq,
+              item.veryShortTermForecastTq
+            );
+            //同期实际发电
+            item.tqUltraRatio = this.$utils.ratioCalculation(
+              item.actualPowerDq,
+              item.actualPowerTq
+            );
+            //同期预测发电
+            item.tqShortRatio = this.$utils.ratioCalculation(
+              item.shortTermForecastDq,
+              item.shortTermForecastTq
+            );
+            //环比计划发电
+            item.hbActualRatio = this.$utils.ratioCalculation(
+              item.veryShortTermForecastDq,
+              item.veryShortTermForecastSy
+            );
+            //环比实际发电
+            item.hbUltraRatio = this.$utils.ratioCalculation(
+              item.actualPowerDq,
+              item.actualPowerSy
+            );
+            //环比预测发电
+            item.hbShortRatio = this.$utils.ratioCalculation(
+              item.shortTermForecastDq,
+              item.shortTermForecastSy
+            );
+          });
+          this.tableData = datas.data.dataFormatList;
+        }
+      }
+    },
+    exportExcel() {
+      let $e = this.$refs["report-table"].$el;
+      try {
+        let $table = $e.querySelector(".el-table__fixed");
+        if (!$table) {
+          $table = $e;
+        }
+        const wb = XLSX.utils.table_to_book($table, {
+          raw: true,
+        });
+        if (wb && wb.Sheets.Sheet1) {
+          let as = ["!cols", "!fullref", "!merges", "!ref", "!rows"];
+          let bs = [
+            "时间",
+            "当期数据",
+            "实际发电",
+            "预测发电",
+            "同期数据",
+            "同期比率",
+            "环比数据",
+            "环比比率",
+          ];
+          for (let i in wb.Sheets.Sheet1) {
+            if (as.indexOf(i) < 0) {
+              if (bs.indexOf(wb.Sheets.Sheet1[i].v) >= 0) {
+                wb.Sheets.Sheet1[i].s = {
+                  font: {
+                    name: "微软雅黑",
+                    sz: 11,
+                    bold: true,
+                    color: {
+                      rgb: "ffffff",
                     },
-                    yAxis: {
-                        type: 'value',
-                        name: '万千瓦时(Wkw/h)'
+                  },
+                  alignment: {
+                    horizontal: "center",
+                    vertical: "center",
+                  },
+                  fill: {
+                    fgColor: {
+                      rgb: "4f81bd",
                     },
-                    series: series
+                  },
                 };
-                if (this.from === 'index') {
-                    option.backgroundColor = ''
-                }
-                if (!this.theme) {
-                    option.backgroundColor = ''
-                }
-                // 基于准备好的dom,初始化echarts实例
-                let dom = document.getElementById(name);
-                dom.removeAttribute("_echarts_instance_") ? dom.removeAttribute("_echarts_instance_") : ''
-                let myChart = this.$echarts.init(dom, this.echartsTheme);
-                myChart.setOption(option);
-                window.addEventListener("resize", function () {
-                    myChart.resize()
-                })
-            },
-            // 全域功率预测table
-            getTableData() {
-                let that = this
-                let params = {
-                    leadTime: that.chooseExceedTimeFv,
-                    stationNumber: that.windTurbines,
-                    itemVal: that.windTurbinesVal
-                }
-                if (that.isMonth) {
-                    params.beginDataTime = that.monthVal[0]
-                    params.endDataTime = that.monthVal[1]
-                    apiGetmonthlyDailyPowerComparisonTableData(params).then(datas => {
-                        that.changeTableData(datas)
-                    })
+                if (i === "A1") {
+                  wb.Sheets.Sheet1["!cols"].push({
+                    wch: 30,
+                  });
+                } else if (i === "B1") {
+                  wb.Sheets.Sheet1["!cols"].push({
+                    wch: 20,
+                  });
                 } else {
-                    params.beginDataTime = that.yearVal[0]
-                    params.endDataTime = that.yearVal[1]
-                    delete params.leadTime
-                    apiGetyearlyDailyPowerComparisonTableData(params).then(datas => {
-                        that.changeTableData(datas)
-                    })
-                }
-            },
-            changeTableData(datas) {
-                if (datas && datas.data) {
-                    this.loading = false
-                    if (datas.data.dataFormatList) {
-                        datas.data.dataFormatList.forEach(item => {
-                            for (let i in item) {
-                                if (i !== 'dataTime') {
-                                    item[i] = this.$utils.isHasNum(item[i])
-                                } else {
-                                    if (!this.isMonth) {
-                                        item[i] = item[i].substring(0, item[i].lastIndexOf('-'))
-                                    }
-                                }
-                            }
-                            //同期计划发电
-                            item.tqActualRatio = this.$utils.ratioCalculation(item.veryShortTermForecastDq, item
-                                .veryShortTermForecastTq)
-                            //同期实际发电
-                            item.tqUltraRatio = this.$utils.ratioCalculation(item.actualPowerDq, item
-                                .actualPowerTq)
-                            //同期预测发电
-                            item.tqShortRatio = this.$utils.ratioCalculation(item.shortTermForecastDq, item
-                                .shortTermForecastTq)
-                            //环比计划发电
-                            item.hbActualRatio = this.$utils.ratioCalculation(item.veryShortTermForecastDq, item
-                                .veryShortTermForecastSy)
-                            //环比实际发电
-                            item.hbUltraRatio = this.$utils.ratioCalculation(item.actualPowerDq, item
-                                .actualPowerSy)
-                            //环比预测发电
-                            item.hbShortRatio = this.$utils.ratioCalculation(item.shortTermForecastDq, item
-                                .shortTermForecastSy)
-                        })
-                        this.tableData = datas.data.dataFormatList
-                    }
-                }
-            },
-            exportExcel() {
-                let $e = this.$refs['report-table'].$el
-                try {
-                    let $table = $e.querySelector('.el-table__fixed')
-                    if (!$table) {
-                        $table = $e
-                    }
-                    const wb = XLSX.utils.table_to_book($table, {
-                        raw: true
-                    })
-                    if (wb && wb.Sheets.Sheet1) {
-                        let as = ['!cols', '!fullref', '!merges', '!ref', '!rows']
-                        let bs = ['时间', '当期数据', '实际发电', '预测发电', '同期数据', '同期比率', '环比数据', '环比比率']
-                        for (let i in wb.Sheets.Sheet1) {
-                            if (as.indexOf(i) < 0) {
-                                if (bs.indexOf(wb.Sheets.Sheet1[i].v) >= 0) {
-                                    wb.Sheets.Sheet1[i].s = {
-                                        font: {
-                                            name: '微软雅黑',
-                                            sz: 11,
-                                            bold: true,
-                                            color: {
-                                                rgb: 'ffffff'
-                                            }
-                                        },
-                                        alignment: {
-                                            horizontal: 'center',
-                                            vertical: 'center'
-                                        },
-                                        fill: {
-                                            fgColor: {
-                                                rgb: '4f81bd'
-                                            }
-                                        }
-                                    }
-                                    if (i === 'A1') {
-                                        wb.Sheets.Sheet1['!cols'].push({
-                                            wch: 30
-                                        })
-                                    } else if (i === 'B1') {
-                                        wb.Sheets.Sheet1['!cols'].push({
-                                            wch: 20
-                                        })
-                                    } else {
-                                        wb.Sheets.Sheet1['!cols'].push({
-                                            wch: 15
-                                        })
-                                    }
-                                } else {
-                                    wb.Sheets.Sheet1[i].s = {
-                                        font: {
-                                            name: '微软雅黑',
-                                            sz: 10,
-                                            bold: false,
-                                            color: {
-                                                rgb: '000000'
-                                            }
-                                        },
-                                        alignment: {
-                                            horizontal: 'center',
-                                            vertical: 'center'
-                                        },
-                                        // fill:{fgColor: {rgb: '4f81bd'}}
-                                    }
-                                }
-                            }
-                        }
-                    }
-
-                    const wbout = XLSXD.write(wb, {
-                        bookType: 'xlsx',
-                        bookSST: true,
-                        type: 'array'
-                    })
-                    saveAs(
-                        new Blob([wbout], {
-                            type: 'application/octet-stream'
-                        }),
-                        `${this.title}.xlsx`,
-                    )
-                } catch (e) {
-                    if (typeof console !== 'undefined') console.error(e)
+                  wb.Sheets.Sheet1["!cols"].push({
+                    wch: 15,
+                  });
                 }
+              } else {
+                wb.Sheets.Sheet1[i].s = {
+                  font: {
+                    name: "微软雅黑",
+                    sz: 10,
+                    bold: false,
+                    color: {
+                      rgb: "000000",
+                    },
+                  },
+                  alignment: {
+                    horizontal: "center",
+                    vertical: "center",
+                  },
+                  // fill:{fgColor: {rgb: '4f81bd'}}
+                };
+              }
             }
+          }
         }
-    }
+
+        const wbout = XLSXD.write(wb, {
+          bookType: "xlsx",
+          bookSST: true,
+          type: "array",
+        });
+        saveAs(
+          new Blob([wbout], {
+            type: "application/octet-stream",
+          }),
+          `${this.title}.xlsx`
+        );
+      } catch (e) {
+        if (typeof console !== "undefined") console.error(e);
+      }
+    },
+  },
+};
 </script>
 
 <style lang="less">
-    @import '../SecondaryPageStyle/globalblackStyle.less';
-    @import '../SecondaryPageStyle/globalwhiteStyle.less';
+@import "../SecondaryPageStyle/globalblackStyle.less";
+@import "../SecondaryPageStyle/globalwhiteStyle.less";
 </style>
 <style lang="less">
-    .globalDiaMain {
-        .main_top {
-            .main_top_left {
-                .exceed {
-                    .el-date-editor {
-                        .el-input__prefix {
-                            margin-left: 5px !important;
-                        }
-                    }
-                }
-            }
+.globalDiaMain {
+  .main_top {
+    .main_top_left {
+      .exceed {
+        .el-date-editor {
+          .el-input__prefix {
+            margin-left: 5px !important;
+          }
         }
+      }
     }
+  }
+}
 
-    .themeDa {
-
-        .main_top {
-            .main_top_left {
-                .exceed {
-                    color: #fff;
-                }
-            }
-        }
+.themeDa {
+  .main_top {
+    .main_top_left {
+      .exceed {
+        color: #fff;
+      }
     }
+  }
+}
 
-    .themeLi {
-        .main_top {
-            .main_top_left {
-                .exceed {
-                    color: #000;
-                }
-            }
-        }
+.themeLi {
+  .main_top {
+    .main_top_left {
+      .exceed {
+        color: #000;
+      }
     }
+  }
+}
 </style>

File diff suppressed because it is too large
+ 914 - 681
src/components/powerPredictionComponent/homePageAssembly/globalDialogPage.vue


File diff suppressed because it is too large
+ 564 - 426
src/components/powerPredictionComponent/panoramicPowerDialog/panoramaPowerDialogPage.vue


File diff suppressed because it is too large
+ 844 - 620
src/components/powerPredictionComponent/powerPredictionDialog/predictionDialogPage.vue


+ 3 - 0
src/main.js

@@ -29,6 +29,8 @@ import modeConfig from "@public/static/config/modeConfig.js"
 
 import './permission' // permission control
 
+import "./themeDark.less";
+
 const debounce = (fn, delay) => {
   let timer = null;
   return function () {
@@ -60,5 +62,6 @@ app.config.globalProperties.$echarts = echarts;
 app.config.globalProperties.$axios = axios;
 app.config.globalProperties.icoName = icon;
 app.config.globalProperties.reportBaseUrl = modeConfig?.reportBaseUrl || "";
+app.config.globalProperties.baseReportUrl = modeConfig?.baseReportUrl || "";
 app.use(L);
 app.use(store).use(router).use(ElementPlus, { size: 'small', locale: zhCn }).mount('#app')

+ 34 - 1
src/router/index.js

@@ -140,6 +140,22 @@ const routes = [
         component: () => import("../views/intelligentReporting/fgztjqkb/index.vue"),
     },
     {
+        path: "/intelligentReport/fdlrb",
+        name: "intelligentReportfdlrb",
+        meta: {
+            title: "发电量日报",
+        },
+        component: () => import("../views/intelligentReporting/fdlrb/index.vue"),
+    },
+    {
+        path: "/intelligentReport/swdlrb",
+        name: "intelligentReportswdlrb",
+        meta: {
+            title: "上网电量日报",
+        },
+        component: () => import("../views/intelligentReporting/swdlrb/index.vue"),
+    },
+    {
         path: "/intelligentReport/gztjqkb",
         name: "intelligentReportgztjqkb",
         meta: {
@@ -148,6 +164,14 @@ const routes = [
         component: () => import("../views/intelligentReporting/gztjqkb/index.vue"),
     },
     {
+        path: "/intelligentReport/yxdtjb",
+        name: "intelligentReportyxdtjb",
+        meta: {
+            title: "月限电统计报表",
+        },
+        component: () => import("../views/intelligentReporting/yxdtjb/index.vue"),
+    },
+    {
         path: "/intelligentReport/zhbb",
         name: "intelligentReportzhbb",
         meta: {
@@ -301,11 +325,20 @@ const routes = [
         path: "/generatingCap/dataAnalysis/analysisReport",
         name: "dataAnalysisAnalysisReport",
         meta: {
-        title: "分析报告",
+        title: "能效分析报告",
         },
         component: () =>
         import("../views/generatingCapacity/report/index.vue"),
     },
+    {
+        path: "/generatingCap/dataAnalysis/jjyxReport",
+        name: "dataAnalysisJjyxReport",
+        meta: {
+        title: "经济运行分析报告",
+        },
+        component: () =>
+        import("../views/generatingCapacity/jjyxReport/index.vue"),
+    },
 ]
 
 const router = createRouter({

+ 4 - 4
src/store/index.js

@@ -9,13 +9,13 @@ import { createStore } from 'vuex'
 import user from './modules/user'
 
 export default createStore({
-    state: {
-        theme: false
+  state: {
+    theme: false
   },
   getters: {
   },
-    mutations: {
-        
+  mutations: {
+
   },
   actions: {
   },

+ 914 - 0
src/themeDark.less

@@ -0,0 +1,914 @@
+// 主色
+@mc1: #09172b;
+@mc2: #142446;
+@mc3: #2169c3;
+
+// 辅助色
+@fzs1: #2999a0;
+@fzs2: #67b9ff;
+@fzs3: #ff6271;
+
+// 文字颜色
+@fc1 : #a6b8dd;
+@fc2 : #f9fbff;
+@fc3 : #c3e1ff;
+@fc4 : #4d72b8;
+@fc5 : #94e5ff;
+@fc6 : #7a8385;
+@fc7 : #e4ecff;
+
+// 渐变色
+@jbs1: linear-gradient(to right, #16a4dc, #142446);
+@jbs2: linear-gradient(to right, #175dd2, #70d0f4);
+@jbs3: linear-gradient(to right, #42bf54, #cff4d8);
+@jbs4: linear-gradient(to right, #f5d023, #fff7cb);
+@jbs5: linear-gradient(to right, #f1880c, #ffd179);
+@jbs6: linear-gradient(to right, #ff293d, #ff9ea7);
+
+@green          : #05bb4c;
+@gray           : #606769;
+@gray-l         : #B3BDC0;
+@picker-bg-color: fade(rgb(3, 7, 19), 95);
+
+@primary-color    : #2568c4;
+@border-color     : transparent;
+@text-color       : #fff;
+@placeholder-color: #c0c4cc;
+@disabled-color   : #c0c4cc;
+@disabled-bg      : #f5f7fa;
+
+.nsfStyle {
+    #app {
+
+        .themeDarkHome {
+            background: @mc1  !important;
+        }
+
+        .themeDark {
+
+            // 顶部 header
+            .proheader {
+                background: @mc2;
+
+                .proMenu {
+                    .defaultBacksty {
+                        color: @fc6  !important;
+                    }
+
+                    .changeBacksty {
+                        color       : @fzs2  !important;
+                        border-color: @mc3;
+                    }
+                }
+            }
+
+            // 首页右侧切换主题 switch
+            .settingStop {
+                .el-switch {
+                    .el-switch__core {
+                        border-color: @fc1;
+
+                        .el-switch__action {
+                            background: @mc3;
+                        }
+                    }
+                }
+            }
+
+            // 首页指标标题 header
+            .headerRight {
+                background: @mc2;
+
+                .headerName,
+                .headerNa2 {
+                    color: @fc7;
+                }
+
+                .headerZsN {
+                    background: @mc3;
+                }
+            }
+
+            // 首页天气
+            .weaMain {
+                .pTwo {
+                    color: @fc6;
+                }
+            }
+
+            // 首页右侧预测电量 charts 顶部描述文本
+            .electricMain {
+                .powerName {
+                    color: @fc7;
+                }
+            }
+
+            // 首页设备台数
+            .emInfoBox {
+                .t {
+                    background: @mc2 ;
+
+                    .headerZs {
+                        background: #0f0f0f;
+
+                        .headerZsN {
+                            background: @mc3;
+                        }
+                    }
+
+                }
+
+                .b {
+                    .genre {
+                        color: @fc6;
+                    }
+                }
+            }
+
+            // 首页预测电量
+            .powerCharts {
+                .powerValue {
+                    span:last-child {
+                        color: #fff
+                    }
+                }
+            }
+
+            // 首页底部 echarts
+            .hover72Power,
+            .monthPower {
+                background: @mc2;
+            }
+
+            // 首页点击地图风场后左侧的滑出窗口
+            .infoBox {
+                .el-button {
+                    color: @fzs2  !important;
+                }
+
+                p,
+                .el-tooltip__trigger {
+                    color: #fff;
+                }
+            }
+
+            // 首页计划电量完成情况下方文字描述
+            .analysMain_Msg_bot {
+                background: @mc2;
+
+                span {
+                    color: #fff;
+                }
+            }
+
+            .el-tree-node {
+                background: transparent;
+            }
+
+            .el-dropdown-link.nodeLabel {
+                color: #c3c3c4;
+            }
+
+
+            // 菜单
+            .elmenuSty {
+                background: @mc1;
+
+                .el-menu {
+                    .el-menu-item {
+                        color: #777;
+
+                        &.is-active {
+                            color: #fff;
+
+                            .elMenuTitle {
+                                background: #1a66c6;
+                            }
+
+                            path {
+                                fill: #fff;
+                            }
+                        }
+
+                        path {
+                            fill: #777;
+                        }
+                    }
+
+                }
+            }
+
+            .dataFilePrepareMain,
+            .dataFileProcessMain {
+
+                .treeDataMain,
+                .excelDataMain,
+                .tableDataMain {
+                    background: @mc2;
+                    padding   : 10px 5px;
+
+                    .main {
+                        background: #13171e;
+                    }
+
+                }
+            }
+
+            // el-table
+            .el-table,
+            .custom-table.el-table {
+                background: rgb(3, 7, 19);
+                border    : 0px; // 包裹表格父元素边框
+
+                .el-table__row {
+                    background: transparent; // 表格底色,因表格上层有其他颜色遮挡所以视觉效果看起来仿佛是表格边框
+
+                    & .el-table__cell {
+                        border-bottom: 1px solid rgb(17, 58, 120) !important; // 表格单元格底部边框颜色
+
+                        .el-button {
+                            color: rgb(71, 174, 231) !important;
+
+                            &:active {
+                                color: #70d0f4 !important;
+                            }
+                        }
+                    }
+                }
+
+                &.el-table--border::after,
+                &.el-table--group::after,
+                &::before {
+                    background-color: transparent;
+                }
+
+                tr {
+                    td {
+                        background-color: rgb(3, 7, 19); // 表格基数行背景颜色
+                    }
+
+                    &:hover td {
+                        color           : #67b9ff; // 表格基数行 hover 文字颜色
+                        background-color: rgb(3, 7, 19) !important; // 表格基数行 hover 背景颜色
+                    }
+                }
+
+                td {
+                    border     : 0px; // 表格内部除了最后一行底部以外的上下左右边框
+                    padding    : 0;
+                    height     : 37px;
+                    line-height: 37px;
+                    color      : rgb(194, 225, 255);
+
+                    &.light,
+                    &.always-light {
+                        color: #67b9ff !important;
+                    }
+                }
+
+                th {
+                    border     : 0px;
+                    padding    : 0px;
+                    height     : 37px;
+                    line-height: 37px;
+                    font-weight: normal;
+                    text-align : center;
+                    color      : rgb(85, 113, 166);
+                    cursor     : pointer;
+
+                    &.is-leaf {
+                        border: 0px;
+                    }
+
+                    &.light,
+                    &.always-light {
+                        color: #67b9ff !important;
+                    }
+                }
+
+                th,
+                tr {
+                    background-color: transparent;
+                    border          : 0px;
+                }
+
+                thead {
+                    color      : @gray-l;
+                    font-weight: 500;
+                    font-size  : 14px;
+                    border     : 0px;
+
+                    th,
+                    &.is-group th {
+                        &.el-table__cell {
+                            background  : rgb(19, 35, 71);
+                            border-color: transparent !important;
+                            color       : #bcd2ff;
+                        }
+                    }
+                }
+
+                .el-table__body {
+                    border   : 0px; // 表格最外侧除右边以外边框
+                    font-size: 14px;
+                }
+
+                &.el-table--striped .el-table__body tr.el-table__row--striped {
+                    td {
+                        background-color: rgb(16, 25, 46); // 表格偶数行背景颜色
+                    }
+
+                    &:hover td {
+                        color           : #67b9ff;
+                        background-color: rgb(16, 25, 46) !important; // 表格偶数行 hover 背景颜色
+                    }
+
+
+                }
+
+                &.el-table--border,
+                &.el-table--group {
+                    border: none;
+                }
+
+                .ascending .sort-caret.ascending {
+                    border-bottom-color: #2169c3;
+                }
+
+                .descending .sort-caret.descending {
+                    border-top-color: #2169c3;
+                }
+            }
+
+            .warn-table,
+            .df-table {
+
+                .tableData_tit p {
+                    color: #fff !important;
+                }
+
+                .el-table,
+                .custom-table.el-table {
+                    background: rgb(3, 7, 19);
+                    border    : 1px solid rgba(33, 105, 195, 0.5) !important; // 包裹表格父元素边框
+
+                    .el-table__row {
+                        background: transparent; // 表格底色,因表格上层有其他颜色遮挡所以视觉效果看起来仿佛是表格边框
+
+                        & .el-table__cell {
+                            border-bottom: 1px solid rgb(17, 58, 120) !important; // 表格单元格底部边框颜色
+
+                            .el-button {
+                                color: rgb(71, 174, 231) !important;
+
+                                &:active {
+                                    color: #70d0f4 !important;
+                                }
+                            }
+                        }
+
+                        &:hover .cell {
+                            color: rgb(71, 174, 231) !important;
+                        }
+                    }
+
+                    &.el-table--border::after,
+                    &.el-table--group::after,
+                    &::before {
+                        background-color: transparent;
+                    }
+
+                    tr {
+                        td {
+                            background-color: rgb(3, 7, 19); // 表格基数行背景颜色
+                        }
+
+                        &:hover td {
+                            color           : #67b9ff; // 表格基数行 hover 文字颜色
+                            background-color: rgb(3, 7, 19) !important; // 表格基数行 hover 背景颜色
+                        }
+                    }
+
+                    td {
+                        border     : 0px; // 表格内部除了最后一行底部以外的上下左右边框
+                        padding    : 0;
+                        height     : 37px;
+                        line-height: 37px;
+                        color      : rgb(194, 225, 255);
+
+                        &.light,
+                        &.always-light {
+                            color: #67b9ff !important;
+                        }
+                    }
+
+                    th {
+                        border     : 0px;
+                        padding    : 0px;
+                        height     : 37px;
+                        line-height: 37px;
+                        font-weight: normal;
+                        text-align : center;
+                        color      : rgb(85, 113, 166);
+                        cursor     : pointer;
+
+                        &.is-leaf {
+                            border: 0px;
+                        }
+
+                        &.light,
+                        &.always-light {
+                            color: #67b9ff !important;
+                        }
+                    }
+
+                    th,
+                    tr {
+                        background-color: transparent;
+                        border          : 0px;
+                    }
+
+                    thead {
+                        color      : @gray-l;
+                        font-weight: 500;
+                        font-size  : 14px;
+                        border     : 0px;
+
+                        th,
+                        &.is-group th {
+                            &.el-table__cell {
+                                background  : rgb(19, 35, 71) !important;
+                                border-color: transparent !important;
+                                color       : #bcd2ff;
+                            }
+                        }
+                    }
+
+                    .el-table__body {
+                        border   : 0px; // 表格最外侧除右边以外边框
+                        font-size: 14px;
+                    }
+
+                    &.el-table--striped .el-table__body tr.el-table__row--striped {
+                        td {
+                            background-color: rgb(16, 25, 46); // 表格偶数行背景颜色
+                        }
+
+                        &:hover td {
+                            color           : #67b9ff;
+                            background-color: rgb(16, 25, 46) !important; // 表格偶数行 hover 背景颜色
+                        }
+
+
+                    }
+
+                    &.el-table--border,
+                    &.el-table--group {
+                        border: none;
+                    }
+
+                    .ascending .sort-caret.ascending {
+                        border-bottom-color: #2169c3;
+                    }
+
+                    .descending .sort-caret.descending {
+                        border-top-color: #2169c3;
+                    }
+                }
+
+                .el-table__expanded-cell {
+                    background: transparent;
+                }
+
+                .el-table__footer-wrapper tbody td {
+                    background: #1a1f2fcc;
+                }
+            }
+
+            .el-table__expanded-cell {
+                background: transparent;
+            }
+
+            .el-table__footer-wrapper tbody td {
+                background: #1a1f2fcc;
+            }
+
+            // 去除表格顶、左、底部边框
+            .el-table__border-left-patch,
+            .el-table__inner-wrapper::after,
+            .el-table__inner-wrapper::before {
+                background: transparent;
+            }
+        }
+
+        // el-input
+        .el-input {
+
+            // 基本样式
+            .el-input__wrapper {
+                background-color: rgba(83, 98, 104, .2);
+                border-radius   : 4px;
+                border          : 1px solid @border-color;
+
+                // 输入框
+                .el-input__inner {
+                    color    : @text-color;
+                    font-size: 14px;
+
+                    &::placeholder {
+                        color: @placeholder-color;
+                    }
+                }
+
+                // 悬停状态
+                &:hover {
+                    border-color: darken(@border-color, 10%);
+                }
+
+                // 聚焦状态
+                &.is-focus {
+                    border-color: @primary-color;
+                    box-shadow  : 0 0 0 2px fade(@primary-color, 20%);
+                }
+            }
+
+            // 禁用状态
+            &.is-disabled {
+                .el-input__wrapper {
+                    background-color: @disabled-bg;
+                    border-color    : @border-color;
+
+                    .el-input__inner {
+                        color: @disabled-color;
+                    }
+                }
+            }
+
+            // 清除按钮
+            .el-input__clear {
+                color: @placeholder-color;
+
+                &:hover {
+                    color: @text-color;
+                }
+            }
+
+            // 前缀和后缀图标
+            .el-input__prefix,
+            .el-input__suffix {
+                color: @placeholder-color;
+
+                .el-input__icon {
+                    font-size: 16px;
+                }
+            }
+        }
+
+        .el-select {
+
+            // 基本样式
+            .el-select__wrapper {
+                background-color: rgba(83, 98, 104, .2);
+                border-radius   : 4px;
+                border          : 1px solid @border-color;
+
+                .el-select__placeholder {
+                    color: #fff;
+                }
+
+                // 悬停状态
+                &:hover {
+                    border-color: darken(@border-color, 10%);
+                }
+
+                // 聚焦状态
+                &.is-focus {
+                    border-color: @primary-color;
+                    box-shadow  : 0 0 0 2px fade(@primary-color, 20%);
+                }
+            }
+
+            // 禁用状态
+            &.is-disabled {
+                .el-input__wrapper {
+                    background-color: @disabled-bg;
+                    border-color    : @border-color;
+
+                    .el-input__inner {
+                        color: @disabled-color;
+                    }
+                }
+            }
+
+            // 下拉箭头
+            .el-select__caret {
+                color    : @placeholder-color;
+                font-size: 14px;
+
+                &.is-reverse {
+                    transform: rotateZ(180deg);
+                }
+            }
+
+            // 清除按钮
+            .el-select__clear {
+                color: @placeholder-color;
+
+                &:hover {
+                    color: @text-color;
+                }
+            }
+
+            .el-select__selection.is-near {
+                width: 95%;
+            }
+        }
+
+        .el-button.el-button--danger {
+            span {
+                color: #fff;
+            }
+        }
+
+        // /generatingCap/dataFilter/process
+        .main_top {
+            background: #13171e;
+
+            .topPsty {
+                color     : #1c99ff;
+                background: #1e2126;
+            }
+        }
+
+        .main {
+            background: #13171e;
+        }
+
+        // /generatingCap/dataAnalysis/jjyxReport
+        .analysisReport {
+            .infoBox {
+                background: rgb(4, 12, 11);
+            }
+        }
+
+    }
+
+    // el-dialogv
+    .el-dialog.currentDialog,
+    .el-dialog[custom-class="windLifeDialog"] {
+        background: rgba(3, 7, 19, 0.95);
+        border    : 1px solid rgba(33, 105, 195, 0.5);
+        box-shadow: 0px 8px 17px 1px rgba(33, 105, 195, 0.3);
+
+        .el-dialog__title {
+            color: #fff;
+        }
+    }
+
+    .reportDia {
+        #pdfDom {
+            p {
+                color: #fff;
+
+                span {
+                    color: #fff;
+                }
+            }
+        }
+    }
+
+    // 下拉菜单
+    .el-popper {
+        // border: 1px solid rgb(10, 23, 42) !important;
+    }
+
+    .el-select-dropdown__wrap {
+        background-color: rgb(10, 23, 42);
+        border          : 1px solid rgb(10, 23, 42);
+        border-radius   : 4px;
+        box-shadow      : 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+
+        .el-select-dropdown__item {
+            font-size    : 14px;
+            padding      : 0 20px;
+            position     : relative;
+            white-space  : nowrap;
+            overflow     : hidden;
+            text-overflow: ellipsis;
+            color        : @text-color;
+            height       : 34px;
+            line-height  : 34px;
+
+            &.hover,
+            &.is-hovering,
+            &:hover {
+                background-color: @fzs2;
+            }
+
+            &.is-selected {
+                color      : @fzs2;
+                font-weight: 400;
+
+                &:hover {
+                    background: @fzs2;
+                    color     : #fff;
+                }
+
+                &.is-hovering {
+                    background: @fzs2;
+                    color     : #fff;
+                }
+            }
+
+            &.is-disabled {
+                color : @disabled-color;
+                cursor: not-allowed;
+            }
+        }
+    }
+
+    // 多选样式
+    .el-select .el-select__selection.is-near {
+        position   : absolute;
+        line-height: normal;
+        white-space: normal;
+        z-index    : 1;
+        top        : 50%;
+        transform  : translateY(-50%);
+        display    : flex;
+        align-items: center;
+        flex-wrap  : wrap;
+
+        .el-tag {
+            background: #000;
+            color     : @text-color;
+        }
+    }
+
+    // el-radio-group
+    .el-radio-group {
+        .el-radio {
+            .el-radio__label {
+                color: #fff;
+            }
+
+            &.is-checked {
+                .el-radio__inner {
+                    background  : @fzs2;
+                    border-color: @fzs2;
+                }
+
+                .el-radio__label {
+                    color: @fzs2;
+                }
+            }
+        }
+    }
+
+    .el-picker__popper.el-popper {
+        background-color: rgb(3, 7, 19);
+
+        .el-date-picker {
+            background: rgb(3, 7, 19)
+        }
+
+        .el-date-picker__header {
+
+            .el-date-picker__prev-btn button,
+            .el-date-picker__next-btn button,
+            .el-date-picker__header-label {
+                color: #fff;
+
+                &:hover {
+                    color: @fzs2;
+                }
+            }
+        }
+
+        .el-picker-panel__content {
+            .el-date-table {
+                tbody {
+                    tr:first-child {
+                        th {
+                            color: #fff;
+                        }
+                    }
+
+                    td.prev-month,
+                    td.next-month {
+                        color: #606769;
+                    }
+
+                    td.available {
+                        color: #fff;
+
+                        &:hover {
+                            color: @fzs2;
+                        }
+                    }
+
+                    td.current:not(.disabled) {
+                        .el-date-table-cell__text {
+                            background: @fzs2;
+                            color     : #fff;
+                        }
+                    }
+
+
+                }
+            }
+
+            .el-year-table,
+            .el-month-table {
+                td.current:not(.disabled) {
+                    .cell {
+                        background: @fzs2;
+                        color     : #fff;
+                    }
+                }
+            }
+        }
+    }
+
+    .el-picker-panel {
+        background-color: rgb(3, 7, 19);
+
+        .start-date,
+        .in-range,
+        .end-date {
+            .el-date-table-cell {
+                background: @mc3;
+
+                &:hover {
+                    background: @mc3;
+                    color     : @fc1;
+                }
+            }
+
+        }
+
+        .el-input__wrapper {
+            background-color: rgba(83, 98, 104, .2);
+            border          : 1px solid @border-color;
+
+            .el-input__inner {
+                color: #fff;
+            }
+        }
+
+        .el-time-panel {
+            border-color    : #fff;
+            background-color: rgb(3, 7, 19);
+            box-shadow      : var(--el-box-shadow-light);
+        }
+
+        .el-time-spinner__item {
+            color: rgb(223, 232, 250);
+
+            &.is-active {
+                color: #67b9ff;
+            }
+
+            &:hover:not(.disabled):not(.is-active) {
+                background: fade(rgb(26, 92, 175), 75);
+            }
+        }
+
+        .el-time-panel__footer {
+            background: rgb(3, 7, 19);
+        }
+
+        .el-time-panel__btn.cancel {
+            color: #fff,
+        }
+
+        .el-time-panel__btn.confirm {
+            color: #67b9ff,
+        }
+    }
+
+    .el-picker-panel__footer {
+        background: @picker-bg-color ;
+
+        .el-button--text {
+            color: #fff;
+        }
+
+        .el-button.is-plain {
+            color       : #67b9ff;
+            border-color: #67b9ff;
+        }
+    }
+
+    .el-input-number {
+
+        .el-input-number__decrease,
+        .el-input-number__increase {
+            background: #1e3f9a !important;
+        }
+    }
+
+    .el-loading-mask {
+        background: rgba(rgb(3, 7, 19, 0.5));
+    }
+}

File diff suppressed because it is too large
+ 108295 - 0
src/views/generatingCapacity/dataAnalysis/agcAnalysis/components/data.json


+ 93 - 80
src/views/generatingCapacity/dataAnalysis/agcAnalysis/components/search.vue

@@ -1,86 +1,99 @@
 <template>
-    <div class="seach">
-        <el-form class="generat-seach" :inline="true" :model="queryForm">
-            <el-form-item label="场站" class="!mb-0">
-                <el-select v-model="queryForm.station" class="w-[150px]">
-                    <el-option v-for="item in stationList" :key="item.id" :label="item.title" :value="item.id">
-                    </el-option>
-                </el-select>
-            </el-form-item>
-            <el-form-item label="开始时间" class="!mb-0">
-                <el-date-picker type="date" class="!w-[150px]" v-model="queryForm.st"></el-date-picker>
-            </el-form-item>
-            <el-form-item label="结束时间" class="!mb-0">
-                <el-date-picker type="date" class="!w-[150px]" v-model="queryForm.et"></el-date-picker>
-            </el-form-item>
-            <el-form-item label="等间隔" class="!mb-0">
-                <el-radio-group v-model="queryForm.interval">
-                    <el-radio :label="1">一秒钟</el-radio>
-                    <el-radio :label="2">一分钟</el-radio>
-                    <el-radio :label="3">十分钟</el-radio>
-                    <el-radio :label="4">十五分钟</el-radio>
-                </el-radio-group>
-            </el-form-item>
-            <el-form-item class="!mb-0">
-                <el-button type="primary" @click="funSubmit">执行</el-button>
-            </el-form-item>
-        </el-form>
-    </div>
+  <div class="seach">
+    <el-form class="generat-seach" :inline="true" :model="queryForm">
+      <el-form-item label="场站" class="!mb-0">
+        <el-select
+          style="width: 120px"
+          v-model="queryForm.station"
+          class="w-[150px]"
+        >
+          <el-option
+            v-for="item in stationList"
+            :key="item.id"
+            :label="item.title"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="开始时间" class="!mb-0">
+        <el-date-picker
+          type="date"
+          class="!w-[150px]"
+          v-model="queryForm.st"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="结束时间" class="!mb-0">
+        <el-date-picker
+          type="date"
+          class="!w-[150px]"
+          v-model="queryForm.et"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item label="等间隔" class="!mb-0">
+        <el-radio-group v-model="queryForm.interval">
+          <el-radio :label="1">一秒钟</el-radio>
+          <el-radio :label="2">一分钟</el-radio>
+          <el-radio :label="3">十分钟</el-radio>
+          <el-radio :label="4">十五分钟</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <el-form-item class="!mb-0">
+        <el-button type="primary" @click="funSubmit">执行</el-button>
+      </el-form-item>
+    </el-form>
+  </div>
 </template>
 <script setup name="search">
-    import {
-        onMounted,
-        reactive,
-        ref
-    } from 'vue'
-    import httpRequest from '@/utils/request.js'
-    import SubmitBtn from '@/components/generatingCapacityComponent/SubmitBtn.vue'
-    // import configStationJson from './configStation.json'
+import { onMounted, reactive, ref } from "vue";
+import httpRequest from "@/utils/request.js";
+import SubmitBtn from "@/components/generatingCapacityComponent/SubmitBtn.vue";
+// import configStationJson from './configStation.json'
 
-    const queryForm = reactive({
-        station: '',
-        st: Date.now() - 30 * 24 * 60 * 60 * 1000,
-        et: Date.now(),
-        interval: 3
-    })
-    /**场站 */
-    const stationList = ref([])
-    const funGetStation = async () => {
-        const res = await httpRequest.get("/agc/config")
-        // stationList.value = Object.values(configStationJson) // configStationJson
-        stationList.value = Object.values(res)
-        if (stationList.value.length) {
-            queryForm.station = stationList.value[0].id
-        }
+const queryForm = reactive({
+  station: "",
+  st: Date.now() - 30 * 24 * 60 * 60 * 1000,
+  et: Date.now(),
+  interval: 3,
+});
+/**场站 */
+const stationList = ref([]);
+const funGetStation = async () => {
+  const res = await httpRequest.get("/agc/config");
+  // stationList.value = Object.values(configStationJson) // configStationJson
+  stationList.value = Object.values(res);
+  if (stationList.value.length) {
+    queryForm.station = stationList.value[0].id;
+  }
 
-        funSubmit()
-    }
-    /**导出 */
-    const emits = defineEmits(['submit'])
-    const funSubmit = async () => {
-        const startDate = new Date(queryForm.st).setHours(0, 0, 0, 0)
-        const endDate = new Date(queryForm.et).setHours(0, 0, 0, 0)
-        const query = {
-            id: queryForm.station,
-            startTs: new Date(startDate).getTime(),
-            endTs: new Date(endDate).getTime(),
-            interval: queryForm.interval
-        }
-        switch (queryForm.interval) {
-            case 2:
-                query.interval = 60
-                break;
-            case 3:
-                query.interval = 600
-                break;
-            case 4:
-                query.interval = 900
-                break;
-        }
-        emits('submit', query)
-    }
-    /**created */
-    onMounted(() => {
-        funGetStation()
-    });
+  funSubmit();
+};
+/**导出 */
+const emits = defineEmits(["submit"]);
+const funSubmit = async () => {
+  const startDate = new Date(queryForm.st).setHours(0, 0, 0, 0);
+  const endDate = new Date(queryForm.et).setHours(0, 0, 0, 0);
+  const query = {
+    id: queryForm.station,
+    startTs: new Date(startDate).getTime(),
+    endTs: new Date(endDate).getTime(),
+    interval: queryForm.interval,
+  };
+  switch (queryForm.interval) {
+    case 2:
+      query.interval = 60;
+      break;
+    case 3:
+      query.interval = 600;
+      break;
+    case 4:
+      query.interval = 900;
+      break;
+  }
+  emits("submit", query);
+};
+/**created */
+onMounted(() => {
+  funGetStation();
+});
 </script>

File diff suppressed because it is too large
+ 580 - 408
src/views/generatingCapacity/dataAnalysis/agcAnalysis/index.vue


File diff suppressed because it is too large
+ 33347 - 0
src/views/generatingCapacity/dataAnalysis/angleAnalysis/components/data.json


+ 121 - 1
src/views/generatingCapacity/dataAnalysis/angleAnalysis/index.vue

@@ -101,6 +101,8 @@ const excelHeight = ref(window.innerHeight - 120 + "px"); //excel高度
 const excelList = ref([]);
 const speedParams = ref({});
 const currentNodeKey = ref("");
+
+import jsonData from "./components/data.json";
 const funExcelChange = async (obj) => {
   //点击excel项时
   funSubmit({
@@ -359,9 +361,127 @@ watch(
     deep: true,
   }
 );
+
+const initPageData = () => {
+  treeData.value = funRepeatMap(
+    JSON.parse(JSON.stringify(jsonData.treeData)),
+    "prepare"
+  );
+  excelList.value = [];
+  if (actTreeNode.value) {
+    if (actTreeNode.value.childs) {
+      excelList.value = actTreeNode.value.childs.map((o) => {
+        return {
+          id: o.id,
+          interval: o.interval,
+          path: o.path,
+          prepareid: o.prepareid,
+          station: o.station,
+          time: o.time,
+          type: o.type,
+          windturbine: o.windturbine,
+          isCheck: false,
+          name: o.path.substring(
+            o.path.indexOf(o.station + "_") + (o.station + "_").length
+          ),
+        };
+      });
+    } else {
+      excelList.value = [];
+    }
+    const child = actTreeNode.value.childs[0];
+    const obj = {
+      id: child.id,
+      interval: child.interval,
+      path: child.path,
+      prepareid: child.prepareid,
+      station: child.station,
+      time: child.time,
+      type: child.type,
+      windturbine: child.windturbine,
+      name: child.path.substring(
+        child.path.indexOf(child.station + "_") + (child.station + "_").length
+      ),
+    };
+    currentNodeKey.value = actTreeNode.value?.id || "";
+
+    let exTime = [];
+    let yp1 = [],
+      yp2 = [],
+      yp3 = [],
+      speed = [];
+    jsonData.angelData.bw.forEach((it) => {
+      exTime.push(it.time);
+      yp1.push(it.yp1);
+      yp2.push(it.yp2);
+      yp3.push(it.yp3);
+      speed.push(it.speed);
+    });
+    tableData.value = jsonData.angelData.bw;
+    seriesAllData.value = jsonData.angelData.bw;
+    xAxisData.value = exTime;
+
+    seriesData.value = [
+      {
+        name: "叶片1",
+        type: "line",
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+        smooth: false, //这个是把线变成曲线
+        data: yp1,
+        xAxisIndex: 0,
+      },
+      {
+        name: "叶片2",
+        type: "line",
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+        smooth: false, //这个是把线变成曲线
+        data: yp2,
+        xAxisIndex: 0,
+      },
+      {
+        name: "叶片3",
+        type: "line",
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+        smooth: false, //这个是把线变成曲线
+        data: yp3,
+        xAxisIndex: 0,
+      },
+      {
+        name: "风速",
+        type: "line",
+        yAxisIndex: 1,
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+        smooth: false, //这个是把线变成曲线
+        data: speed,
+        xAxisIndex: 0,
+      },
+    ];
+
+    tableName.value = obj.name;
+
+    let xAsis = [];
+    let series = [];
+    for (const item in jsonData.curveData) {
+      xAsis.push(item);
+      series.push(jsonData.curveData[item]);
+    }
+    linexAxis.data = xAsis;
+    lineSeries[0].data = series;
+
+    speedParams.value = {
+      ids: obj.id,
+    };
+  }
+};
+
 /**mounted */
 onMounted(() => {
-  funGetTree();
+  initPageData();
+  // funGetTree();
   theme.value = store.state.theme;
   echartsTheme.value = !theme.value ? "dark" : "";
   tableHeight.value = window.innerHeight - 170 + "px";

+ 396 - 0
src/views/generatingCapacity/dataAnalysis/combine/components/barChart.json

@@ -0,0 +1,396 @@
+{
+    "color": [
+        "#db60c8",
+        "#c12e34",
+        "#e6b600d9",
+        "#0098d9",
+        "#465a83",
+        "#005eaa",
+        "#cda819",
+        "#32a487"
+    ],
+    "backgroundColor": "rgba(0,0,0,0)",
+    "textStyle": {},
+    "title": {
+        "textStyle": {
+            "color": "#000"
+        },
+        "subtextStyle": {
+            "color": "#000"
+        }
+    },
+    "line": {
+        "itemStyle": {
+            "borderWidth": 1
+        },
+        "lineStyle": {
+            "width": 2
+        },
+        "symbolSize": 4,
+        "symbol": "emptyCircle",
+        "smooth": false
+    },
+    "radar": {
+        "itemStyle": {
+            "borderWidth": 1
+        },
+        "lineStyle": {
+            "width": 2
+        },
+        "symbolSize": 4,
+        "symbol": "emptyCircle",
+        "smooth": false
+    },
+    "bar": {
+        "itemStyle": {
+            "barBorderWidth": 0,
+            "barBorderColor": "#ccc"
+        },
+        "barMaxWidth": 50
+    },
+    "pie": {
+        "itemStyle": {
+            "borderWidth": 0,
+            "borderColor": "#ccc"
+        }
+    },
+    "scatter": {
+        "itemStyle": {
+            "borderWidth": 0,
+            "borderColor": "#ccc"
+        }
+    },
+    "boxplot": {
+        "itemStyle": {
+            "borderWidth": 0,
+            "borderColor": "#ccc"
+        }
+    },
+    "parallel": {
+        "itemStyle": {
+            "borderWidth": 0,
+            "borderColor": "#ccc"
+        }
+    },
+    "sankey": {
+        "itemStyle": {
+            "borderWidth": 0,
+            "borderColor": "#ccc"
+        }
+    },
+    "funnel": {
+        "itemStyle": {
+            "borderWidth": 0,
+            "borderColor": "#ccc"
+        }
+    },
+    "gauge": {
+        "itemStyle": {
+            "borderWidth": 0,
+            "borderColor": "#ccc"
+        }
+    },
+    "candlestick": {
+        "itemStyle": {
+            "color": "#c12e34",
+            "color0": "#2b821d",
+            "borderColor": "#c12e34",
+            "borderColor0": "#2b821d",
+            "borderWidth": 1
+        }
+    },
+    "graph": {
+        "itemStyle": {
+            "borderWidth": 0,
+            "borderColor": "#ccc"
+        },
+        "lineStyle": {
+            "width": 1,
+            "color": "#aaaaaa"
+        },
+        "symbolSize": 4,
+        "symbol": "emptyCircle",
+        "smooth": false,
+        "color": [
+            "#c12e34",
+            "#e6b600",
+            "#0098d9",
+            "#50ec39",
+            "#005eaa",
+            "#339ca8",
+            "#cda819",
+            "#32a487"
+        ],
+        "label": {
+            "color": "#eeeeee"
+        }
+    },
+    "map": {
+        "itemStyle": {
+            "areaColor": "#ddd",
+            "borderColor": "#eee",
+            "borderWidth": 0.5
+        },
+        "label": {
+            "color": "#c12e34"
+        },
+        "emphasis": {
+            "itemStyle": {
+                "areaColor": "#e6b600",
+                "borderColor": "#ddd",
+                "borderWidth": 1
+            },
+            "label": {
+                "color": "#c12e34"
+            }
+        }
+    },
+    "geo": {
+        "itemStyle": {
+            "areaColor": "#ddd",
+            "borderColor": "#eee",
+            "borderWidth": 0.5
+        },
+        "label": {
+            "color": "#c12e34"
+        },
+        "emphasis": {
+            "itemStyle": {
+                "areaColor": "#e6b600",
+                "borderColor": "#ddd",
+                "borderWidth": 1
+            },
+            "label": {
+                "color": "#c12e34"
+            }
+        }
+    },
+    "categoryAxis": {
+        "axisLine": {
+            "show": true,
+            "lineStyle": {
+                "color": "#838383"
+            }
+        },
+        "axisTick": {
+            "show": true,
+            "lineStyle": {
+                "color": "#838383"
+            }
+        },
+        "axisLabel": {
+            "show": true,
+            "color": "#838383"
+        },
+        "splitLine": {
+            "show": false,
+            "lineStyle": {
+                "color": [
+                    "#ccc"
+                ]
+            }
+        },
+        "splitArea": {
+            "show": false,
+            "areaStyle": {
+                "color": [
+                    "rgba(250,250,250,0.3)",
+                    "rgba(200,200,200,0.3)"
+                ]
+            }
+        }
+    },
+    "valueAxis": {
+        "axisLine": {
+            "show": true,
+            "lineStyle": {
+                "color": "#838383"
+            }
+        },
+        "axisTick": {
+            "show": true,
+            "lineStyle": {
+                "color": "#838383"
+            }
+        },
+        "axisLabel": {
+            "show": true,
+            "color": "#838383"
+        },
+        "splitLine": {
+            "show": true,
+            "lineStyle": {
+                "color": [
+                    "#ccc"
+                ]
+            }
+        },
+        "splitArea": {
+            "show": false,
+            "areaStyle": {
+                "color": [
+                    "rgba(250,250,250,0.3)",
+                    "rgba(200,200,200,0.3)"
+                ]
+            }
+        }
+    },
+    "logAxis": {
+        "axisLine": {
+            "show": true,
+            "lineStyle": {
+                "color": "#838383"
+            }
+        },
+        "axisTick": {
+            "show": true,
+            "lineStyle": {
+                "color": "#838383"
+            }
+        },
+        "axisLabel": {
+            "show": true,
+            "color": "#838383"
+        },
+        "splitLine": {
+            "show": true,
+            "lineStyle": {
+                "color": [
+                    "#ccc"
+                ]
+            }
+        },
+        "splitArea": {
+            "show": false,
+            "areaStyle": {
+                "color": [
+                    "rgba(250,250,250,0.3)",
+                    "rgba(200,200,200,0.3)"
+                ]
+            }
+        }
+    },
+    "timeAxis": {
+        "axisLine": {
+            "show": true,
+            "lineStyle": {
+                "color": "#838383"
+            }
+        },
+        "axisTick": {
+            "show": true,
+            "lineStyle": {
+                "color": "#838383"
+            }
+        },
+        "axisLabel": {
+            "show": true,
+            "color": "#838383"
+        },
+        "splitLine": {
+            "show": true,
+            "lineStyle": {
+                "color": [
+                    "#ccc"
+                ]
+            }
+        },
+        "splitArea": {
+            "show": false,
+            "areaStyle": {
+                "color": [
+                    "rgba(250,250,250,0.3)",
+                    "rgba(200,200,200,0.3)"
+                ]
+            }
+        }
+    },
+    "toolbox": {
+        "iconStyle": {
+            "borderColor": "#06467c"
+        },
+        "emphasis": {
+            "iconStyle": {
+                "borderColor": "#4187c2"
+            }
+        }
+    },
+    "legend": {
+        "textStyle": {
+            "color": "#838383"
+        }
+    },
+    "tooltip": {
+        "axisPointer": {
+            "lineStyle": {
+                "color": "#cccccc",
+                "width": 1
+            },
+            "crossStyle": {
+                "color": "#cccccc",
+                "width": 1
+            }
+        }
+    },
+    "timeline": {
+        "lineStyle": {
+            "color": "#005eaa",
+            "width": 1
+        },
+        "itemStyle": {
+            "color": "#005eaa",
+            "borderWidth": 1
+        },
+        "controlStyle": {
+            "color": "#005eaa",
+            "borderColor": "#005eaa",
+            "borderWidth": 0.5
+        },
+        "checkpointStyle": {
+            "color": "#005eaa",
+            "borderColor": "#316bc2"
+        },
+        "label": {
+            "color": "#005eaa"
+        },
+        "emphasis": {
+            "itemStyle": {
+                "color": "#005eaa"
+            },
+            "controlStyle": {
+                "color": "#005eaa",
+                "borderColor": "#005eaa",
+                "borderWidth": 0.5
+            },
+            "label": {
+                "color": "#005eaa"
+            }
+        }
+    },
+    "visualMap": {
+        "color": [
+            "#1790cf",
+            "#a2d4e6"
+        ]
+    },
+    "dataZoom": {
+        "backgroundColor": "rgba(47,69,84,0)",
+        "dataBackgroundColor": "rgba(47,69,84,0.3)",
+        "fillerColor": "rgba(167,183,204,0.4)",
+        "handleColor": "#a7b7cc",
+        "handleSize": "100%",
+        "textStyle": {
+            "color": "#838383B3B3B3"
+        }
+    },
+    "markPoint": {
+        "label": {
+            "color": "#eeeeee"
+        },
+        "emphasis": {
+            "label": {
+                "color": "#eeeeee"
+            }
+        }
+    }
+}

+ 235 - 0
src/views/generatingCapacity/dataAnalysis/combine/components/barChart.vue

@@ -0,0 +1,235 @@
+<script setup>
+import util from "@tools/util";
+import chartTheme from "./barChart.json";
+import { ref, toRaw, computed, onMounted, watch, nextTick } from "vue";
+import { useStore } from "vuex";
+import * as echarts from "echarts";
+const chartId = "chart-" + util.newGUID(); //chartId
+const chartIns = ref(null); //chart 实例
+const emits = defineEmits(["getSelected"]);
+const props = defineProps({
+  xAxis: {
+    type: Object,
+    required: true,
+    default: () => ({}),
+  },
+  yAxis: {
+    type: Array,
+    required: false,
+  },
+  series: {
+    type: Array,
+    required: true,
+  },
+  dataset: {
+    type: Array,
+    required: false,
+    default: () => [],
+  },
+  height: {
+    type: String,
+    required: false,
+    default: "500px",
+  },
+  width: {
+    type: String,
+    required: false,
+    default: "500px",
+  },
+  title: {
+    type: String,
+    required: false,
+  },
+  subtext: {
+    type: String,
+    required: false,
+  },
+  brush: {
+    type: Boolean,
+    required: false,
+    default: false,
+  },
+  theme: {
+    type: Boolean,
+    default: false,
+  },
+  echartsTheme: {
+    type: String,
+    default: "",
+  },
+});
+
+/**定义option */
+const option = computed({
+  get() {
+    return {
+      backgroundColor: "",
+      color: [
+        "rgb(50,93,171)",
+        "#0098d980",
+        "#626c91",
+        "#a0a7e6",
+        "#c4ebad",
+        "#96dee8",
+      ],
+      title: {
+        text: props.title || "",
+        subtext: props.subtext || "",
+        top: -6,
+        right: 360,
+      },
+      xAxis: props.xAxis || {},
+      yAxis: props.yAxis || {},
+      brush: {
+        seriesIndex: [1],
+        yAxisIndex: 0,
+        transformable: true,
+        throttleType: "debounce",
+        throttleDelay: 1000,
+        removeOnClick: true,
+        brushType: props.brush ? "polygon" : false,
+        brushMode: "multiple",
+        brushStyle: {
+          borderWidth: 1,
+          borderColor: "#ff2424",
+        },
+      },
+      toolbox: {
+        show: props.brush,
+      },
+      tooltip: {
+        confine: true,
+        trigger: "axis",
+      },
+      dataset: props.dataset || [],
+      series: props.series || [],
+      legend: {
+        right: "120",
+        top: "5",
+        itemWidth: 6,
+      },
+      grid: {
+        top: 80,
+        left: 40,
+        right: 40,
+        bottom: 40,
+      },
+      dataZoom: [
+        {
+          type: "inside", //图表下方的伸缩条
+          show: false, //是否显示
+          realtime: true, //拖动时,是否实时更新系列的视图
+          start: 0, //伸缩条开始位置(1-100),可以随时更改
+          end: 100, //伸缩条结束位置(1-100),可以随时更改
+        },
+        {
+          type: "slider", //图表下方的伸缩条
+          show: false, //是否显示
+          realtime: true, //拖动时,是否实时更新系列的视图
+          start: 0, //伸缩条开始位置(1-100),可以随时更改
+          end: 100, //伸缩条结束位置(1-100),可以随时更改
+        },
+      ],
+    };
+  },
+  set(val) {},
+});
+watch(
+  () => option,
+  (newVal, oldVal) => {
+    if (chartIns.value) {
+      const echartIns = toRaw(chartIns.value);
+      echartIns.setOption(toRaw(newVal.value));
+    }
+  },
+  {
+    deep: true,
+  }
+);
+
+watch([() => props.width, () => props.height], (newVal, oldVal) => {
+  if (chartIns.value) {
+    const echartIns = toRaw(chartIns.value);
+    nextTick(() => echartIns.resize());
+  }
+});
+const store = useStore();
+const collapse = computed({
+  get() {
+    return store.state.collapse;
+  },
+  set(val) {},
+});
+watch(collapse, (val) => {
+  if (chartIns.value) {
+    setTimeout(() => {
+      chartIns.value.resize();
+    }, 300);
+  }
+});
+const funBrushChange = (flag) => {
+  const echartIns = toRaw(chartIns.value);
+  echartIns.dispatchAction({
+    type: "takeGlobalCursor",
+    // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
+    key: "brush",
+    brushOption: {
+      seriesIndex: [1],
+      yAxisIndex: 0,
+      transformable: true,
+      throttleType: "debounce",
+      throttleDelay: 1000,
+      removeOnClick: true,
+      brushType: flag ? "polygon" : false,
+      brushMode: "multiple",
+      brushStyle: {
+        borderWidth: 1,
+        color: "rgba(255,36,36,0.2)",
+        borderColor: "#ff2424",
+      },
+    },
+  });
+  echartIns.off("brushSelected");
+  echartIns.on("brushSelected", (params) => {
+    emits("getSelected", params.batch || []);
+  });
+};
+watch(
+  () => props.brush,
+  (newVal, oldVal) => funBrushChange(newVal)
+);
+
+onMounted(() => {
+  nextTick(() => {
+    init();
+  });
+});
+
+watch(
+  () => props.echartsTheme,
+  (newVal, oldVal) => init()
+);
+
+const init = () => {
+  echarts.registerTheme("chartTheme", chartTheme);
+  const echartIns = echarts.init(
+    document.getElementById(chartId),
+    props.echartsTheme
+  );
+  document.getElementById(chartId).removeAttribute("_echarts_instance_")
+    ? document.getElementById(chartId).removeAttribute("_echarts_instance_")
+    : "";
+  chartIns.value = echartIns;
+  echartIns.setOption(option.value);
+  funBrushChange(props.brush);
+  window.addEventListener("resize", () => {
+    echartIns.resize();
+  });
+};
+</script>
+<template>
+  <div
+    :id="chartId"
+    :style="{ height: props.height, width: props.width }"
+  ></div>
+</template>

+ 386 - 0
src/views/generatingCapacity/dataAnalysis/combine/components/barLineChart.vue

@@ -0,0 +1,386 @@
+<template>
+  <div class="chart" :id="id"></div>
+</template>
+
+<script>
+import util from "@/helper/util.js";
+import partten from "@/helper/partten.js";
+import * as echarts from "echarts";
+
+export default {
+  name: "multiple-bar-chart",
+  componentName: "multiple-bar-chart",
+  props: {
+    width: {
+      type: String,
+      default: "100%",
+    },
+    height: {
+      type: String,
+      default: "800px",
+    },
+    // 传入数据
+    bardata: {
+      type: Object,
+      default: () => {
+        return {
+          area: [
+            "风场1",
+            "风场2",
+            "风场3",
+            "风场4",
+            "风场5",
+            "风场6",
+            "风场7",
+            "风场8",
+            "风场9",
+          ],
+          legend: [
+            "实际电量",
+            "计划检修损失",
+            "非计划检修损失",
+            "限电损失",
+            "受累损失",
+            "性能损失",
+            "理论发电量",
+          ],
+          data: [
+            [1320, 1302, 901, 634, 1390, 1330, 1320, 1000, 500],
+            [320, 302, 301, 334, 390, 330, 320, 100, 50],
+            [320, 302, 301, 334, 390, 330, 320, 100, 50],
+            [1320, 1302, 901, 634, 1390, 1330, 1320, 1000, 500],
+            [320, 302, 301, 334, 390, 330, 320, 100, 50],
+            [320, 302, 301, 334, 390, 330, 320, 100, 50],
+            [1320, 1302, 901, 634, 1390, 1330, 1320, 1000, 500],
+            [320, 302, 301, 334, 390, 330, 320, 100, 50],
+          ],
+        };
+      },
+    },
+    lineData: {
+      type: Array,
+      default: () => [200, 350, 400, 500, 600, 700, 800, 900, 1200],
+    },
+    lineName: {
+      type: String,
+      default: "损失电量",
+    },
+    // 单位
+    units: {
+      type: Array,
+      default: () => ["(万KWh)", "(风速)"],
+    },
+    // 显示 legend
+    showLegend: {
+      type: Boolean,
+      default: true,
+    },
+    // 颜色
+    color: {
+      type: Array,
+      default: () => [
+        "#323E6F",
+        "#e17e23",
+        "#ba3237",
+        "#c531c7",
+        "#ffffff",
+        "#EDEB2F",
+      ],
+    },
+    // 每页显示个数
+    pageSize: {
+      type: Number,
+      default: 20,
+    },
+  },
+  data() {
+    return {
+      id: "",
+      chart: null,
+      themeName: "light",
+      areaData: [],
+    };
+  },
+  methods: {
+    initChart() {
+      let chart = echarts.init(this.$el);
+      this.chart = chart;
+      let option = {
+        color: this.color,
+        grid: {
+          left: 40,
+          right: 40,
+          bottom: 16,
+          top: 16,
+          containLabel: true,
+        },
+        legend: {
+          show: this.showLegend,
+          data: this.bardata.legend,
+          right: 56,
+          // icon: "ract",
+          itemWidth: 8,
+          itemHeight: 8,
+          inactiveColor:
+            this.themeName === "dark" ? partten.getColor("gray") : "#838383",
+          textStyle: {
+            color:
+              this.themeName === "dark" ? partten.getColor("grayl") : "#838383",
+            fontSize: 12,
+          },
+        },
+        tooltip: {
+          trigger: "axis",
+          backgroundColor: true
+            ? "rgba(255,255,255,0.9)"
+            : "rgba(255,255,255,0.9)",
+          borderColor:
+            this.themeName === "dark" ? partten.getColor("gray") : "#838383",
+          textStyle: {
+            color: this.themeName === "dark" ? "#fff" : "#838383",
+            fontSize: util.vh(16),
+          },
+        },
+        dataZoom: [
+          {
+            type: "inside",
+            start: 0,
+            end: this.end,
+            yAxisIndex: [0],
+          },
+          {
+            start: 0,
+            end: this.end,
+            top: 20,
+            bottom: 40,
+            yAxisIndex: [0],
+            backgroundColor: "transparent",
+            // handleIcon: "path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z",
+            handleStyle: {
+              color:
+                this.themeName === "dark"
+                  ? partten.getColor("green")
+                  : partten.getColor("blue"),
+            },
+            moveHandleSize: 0,
+            // dataBackground: {
+            //   lineStyle: {
+            //     color: partten.getColor("gray"),
+            //   },
+            //   areaStyle: {
+            //     color: partten.getColor("gray"),
+            //   },
+            // },
+            // selectedDataBackground: {
+            //   lineStyle: {
+            //     color: partten.getColor("yellow"),
+            //   },
+            //   areaStyle: {
+            //     color: partten.getColor("yellow"),
+            //   },
+            // },
+            fillerColor: "transparent",
+            textStyle: {
+              color:
+                this.themeName === "dark"
+                  ? partten.getColor("grayl")
+                  : "#838383",
+            },
+            borderColor:
+              this.themeName === "dark" ? partten.getColor("gray") : "#838383",
+            brushSelect: false,
+          },
+        ],
+        yAxis: [
+          {
+            type: "category",
+            axisLabel: {
+              color:
+                this.themeName === "dark"
+                  ? partten.getColor("gray")
+                  : "#838383",
+            },
+            inverse: true,
+            // minInterval: 10,
+            // maxInterval: 10,
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            data: this.areaData,
+          },
+        ],
+        xAxis: [
+          {
+            type: "value",
+            name: "万kWh",
+            axisLabel: {
+              color:
+                this.themeName === "dark"
+                  ? partten.getColor("gray")
+                  : "#838383",
+              // formatter: "{value}万kWh",
+            },
+            axisLine: {
+              type: "dashed",
+              lineStyle: {
+                color:
+                  this.themeName === "dark"
+                    ? partten.getColor("gray")
+                    : "#838383",
+              },
+              width: 5,
+            },
+            axisTick: {
+              show: false,
+            },
+            splitLine: {
+              lineStyle: {
+                type: "dashed",
+                dashOffset: 10,
+                color: this.themeName === "dark" ? "#5a6162" : "#838383" + 80,
+              },
+            },
+          },
+          {
+            type: "value",
+            name: "",
+            axisLabel: {
+              show: false,
+              // formatter: "{value}万kWh",
+              // color: partten.getColor("gray"),
+            },
+            axisLine: {
+              show: false,
+            },
+            axisTick: {
+              show: false,
+            },
+            splitLine: {
+              show: false,
+            },
+          },
+        ],
+        series: [],
+      };
+
+      if (this.bardata && this.bardata.legend)
+        // bar data
+        for (var i = 0; i < this.bardata.legend.length; i++) {
+          option.series.push({
+            name: this.bardata.legend[i].name,
+            type: "bar",
+            stack: "总量",
+            barWidth: 16,
+            label: {
+              show: false,
+              position: "insideRight",
+            },
+            data: this.bardata.data[i],
+          });
+        }
+
+      // line data
+      if (this.lineData.length > 0) {
+        option.series.push({
+          name: "理论发电量",
+          type: "line",
+          data: this.lineData,
+          smooth: false, //平滑展示
+          xAxisIndex: 1,
+          lineStyle: {
+            color:
+              this.themeName === "dark"
+                ? partten.getColor("green")
+                : partten.getColor("blue"),
+          },
+          itemStyle: {
+            color:
+              this.themeName === "dark"
+                ? partten.getColor("green")
+                : partten.getColor("blue"),
+          },
+        });
+      }
+      chart.setOption(option);
+      chart.resize();
+    },
+  },
+  created() {
+    this.id = "pie-chart-" + util.newGUID();
+    if (this.bardata.area && this.bardata.area.length < this.pageSize) {
+      this.areaData = this.bardata.area;
+      for (let i = this.bardata.area.length; i <= this.pageSize; i++) {
+        this.areaData.push("");
+      }
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.$el.style.width = this.width;
+      this.$el.style.height = this.height;
+      this.initChart();
+    });
+  },
+  updated() {
+    this.$nextTick(() => {
+      this.initChart();
+    });
+  },
+  beforeUpdate() {
+    this.areaData = this.bardata.area;
+  },
+  beforeUpdate() {
+    this.areaData = this.bardata.area;
+  },
+  activated() {
+    this.$nextTick(() => {
+      this.$el.style.width = this.width;
+      this.$el.style.height = this.height;
+      this.initChart();
+    });
+  },
+  computed: {
+    collapse() {
+      return this.$store.state.collapse;
+    },
+    legend() {
+      return this.bardata.legend;
+    },
+    end() {
+      var result = 20;
+      if (this.areaData) {
+        result = parseInt((this.pageSize / this.areaData.length) * 100);
+      }
+      return result;
+    },
+  },
+  watch: {
+    collapse(val) {
+      if (this.chart) {
+        setTimeout(() => {
+          this.chart.resize();
+        }, 300);
+      }
+    },
+    bardata(val) {
+      if (val.area && val.area.length < this.pageSize) {
+        this.areaData = val.area;
+        for (let i = val.area.length; i <= this.pageSize; i++) {
+          this.areaData.push("");
+        }
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.chart {
+  width: 100%;
+  height: 100%;
+  display: inline-block;
+}
+</style>

+ 404 - 350
src/views/generatingCapacity/dataAnalysis/combine/components/current-scatter-chart.vue

@@ -1,372 +1,426 @@
 <template>
-    <div class="chart" :id="id">
-    </div>
+  <div class="chart" :id="id"></div>
 </template>
 
 <script>
-    import util from "@tools/util";
-    import partten from "@tools/partten";
-    import * as echarts from "echarts";
-    import chartTheme from './current-scatter-chart.json'
+import util from "@tools/util";
+import partten from "@tools/partten";
+import * as echarts from "echarts";
+import chartTheme from "./current-scatter-chart.json";
 
-    export default {
-        name: 'currentScatterChart',
-        props: {
-            // 图表宽度
-            width: {
-                type: String,
-                default: "100%",
-            },
-            // 图表高度
-            height: {
-                type: String,
-                default: "350px",
-            },
-            // 图表主标题
-            chartTitle: {
-                type: String,
-                default: "自定义图表组件",
-            },
-            // X 轴配置项
-            xAxisData: {
-                type: Array,
-                default: () => {
-                    return [];
-                },
-            },
-            // Y 轴配置项
-            yAxisData: {
-                type: Array,
-                default: () => {
-                    return [];
-                },
+export default {
+  name: "currentScatterChart",
+  props: {
+    // 图表宽度
+    width: {
+      type: String,
+      default: "100%",
+    },
+    // 图表高度
+    height: {
+      type: String,
+      default: "350px",
+    },
+    // 图表主标题
+    chartTitle: {
+      type: String,
+      default: "自定义图表组件",
+    },
+    // X 轴配置项
+    xAxisData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    // Y 轴配置项
+    yAxisData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    dataSet: {
+      type: String,
+      default: "",
+    },
+    // 图表核心数据
+    seriesData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    // 是否显示图表图例
+    showLegend: {
+      type: Boolean,
+      default: true,
+    },
+    // 是否默认采用笔刷模式
+    brushSelected: {
+      type: Boolean,
+      default: false,
+    },
+    theme: {
+      type: Boolean,
+      default: false,
+    },
+    echartsTheme: {
+      type: String,
+      default: "",
+    },
+    showToolbox: {
+      type: Boolean,
+      default: true,
+    },
+    tooltipTrigger: {
+      type: String,
+      default: "item",
+    },
+    brushIndex: {
+      type: Number,
+      defaylt: () => {
+        return 0;
+      },
+    },
+  },
+  data() {
+    return {
+      id: "",
+      chart: null,
+      color: [
+        "#05bb4c",
+        "#4b55ae",
+        "#fa8c16",
+        "#f8de5b",
+        "#1a93cf",
+        "#c531c7",
+        "#bd3338",
+      ],
+    };
+  },
+  computed: {
+    collapse() {
+      return this.$store.state.collapse;
+    },
+  },
+  watch: {
+    height() {
+      if (this.chart) {
+        this.chart.resize();
+      }
+    },
+    collapse(val) {
+      if (this.chart) {
+        setTimeout(() => {
+          this.chart.resize();
+        }, 300);
+      }
+    },
+  },
+  methods: {
+    resize() {},
+    initChart() {
+      const that = this;
+      echarts.registerTheme("chartTheme", chartTheme);
+      let myChart = echarts.init(document.getElementById(this.id), "dark");
+      that.chart = myChart;
+      //指定图表的配置项和数据
+      let legendData = [];
+      that.seriesData.forEach((ele) => {
+        legendData.push(ele.name);
+      });
+      const option = {
+        backgroundColor: "",
+        //标题
+        title: {
+          text: that.chartTitle,
+          // right: 460,
+          left: "center",
+          // left: 110,
+          // top: 4,
+          textStyle: {
+            fontSize: 16,
+            color:
+              that.echartsTheme === "dark" ? partten.getColor("white") : "#000",
+          },
+        },
+        // backgroundColor:
+        //   that.theme === "dark"
+        //     ? "rgba(0,0,0,0.4)"
+        //     : "rgba(255,255,255,0.5)",
+        //工具箱
+        color: [
+          "#3D54BE",
+          "rgb(255,0,0)",
+          "#a1a1a1",
+          "#0098d9",
+          "#FF8700",
+          "#005eaa",
+          "#cda819",
+          "#32a487",
+        ],
+        toolbox: {
+          show: that.showToolbox,
+          x: "right",
+          position: [10, 10],
+          // backgroundColor:'rgba(0,0,0,0.4)',
+          borderColor: that.theme
+            ? partten.getColor("gray")
+            : partten.getColor("white"),
+          textStyle: {
+            fontSize: util.vh(16),
+            color: that.theme
+              ? partten.getColor("gray")
+              : partten.getColor("white"),
+          },
+          iconStyle: {
+            borderColor: that.theme
+              ? partten.getColor("gray")
+              : partten.getColor("white"),
+          },
+          emphasis: {
+            iconStyle: {
+              borderColor: that.theme
+                ? partten.getColor("gray")
+                : partten.getColor("white"),
             },
-            dataSet: {
-                type: String,
-                default: ''
+          },
+        },
+        tooltip: {
+          trigger: that.tooltipTrigger,
+          axisPointer: {
+            type: "line",
+          },
+          backgroundColor: "rgba(0,0,0,0.4)",
+          borderColor: partten.getColor("white"),
+          textStyle: {
+            fontSize: util.vh(16),
+            color: "#fff",
+          },
+          //   formatter(params) {
+          //     console.log(123123, params);
+          //     let str = "";
+          //     params?.forEach((ele) => {
+          //       str += `${ele.seriesName}: ${
+          //         ele?.value?.[1] || ele.axisValue
+          //       }${that.getChartUnit(ele.seriesName)}\n`;
+          //     });
+          //     // if (params.value && params.value.x) {
+          //     //   str = `${params.seriesName}<br />风速:${params.value.x} m/s<br />功率:${params.value.y} kW`;
+          //     // } else {
+          //     //   str = `${params.name}`;
+          //     // }
+          //     return str;
+          //   },
+        },
+        dataZoom: [
+          {
+            type: "inside", //图表下方的伸缩条
+            show: false, //是否显示
+            realtime: true, //拖动时,是否实时更新系列的视图
+            start: 0, //伸缩条开始位置(1-100),可以随时更改
+            end: 100, //伸缩条结束位置(1-100),可以随时更改
+          },
+          {
+            type: "slider", //图表下方的伸缩条
+            show: false, //是否显示
+            realtime: true, //拖动时,是否实时更新系列的视图
+            start: 0, //伸缩条开始位置(1-100),可以随时更改
+            end: 100, //伸缩条结束位置(1-100),可以随时更改
+          },
+        ],
+        textStyle: {
+          fontSize: util.vh(16),
+          color: that.echartsTheme === "dark" ? "#fff" : "#000",
+        },
+        //图例-每一条数据的名字
+        legend: {
+          show: that.showLegend,
+          //   data: ["拟合功率", "保证功率", "无用点", "有用点", "Cp值"],
+          data: legendData,
+          right: "center",
+          top: "25",
+          // icon: "circle",
+          itemWidth: 6,
+          inactiveColor:
+            that.echartsTheme === "dark" ? partten.getColor("white") : "#000",
+          textStyle: {
+            color:
+              that.echartsTheme === "dark" ? partten.getColor("white") : "#000",
+            fontSize: 14,
+          },
+        },
+        grid: {
+          top: 48,
+          left: 40,
+          right: 40,
+          bottom: 24,
+        },
+        //x轴
+        xAxis: [
+          {
+            name: "m/s",
+            nameTextStyle: {
+              color: "#838383",
             },
-            // 图表核心数据
-            seriesData: {
-                type: Array,
-                default: () => {
-                    return [];
-                },
+            type: "value",
+            boundaryGap: false,
+            data: that.xAxisData || [],
+            min: 0,
+            max: 25,
+            interval: 1,
+            axisLabel: {
+              formatter: "{value}",
             },
-            // 是否显示图表图例
-            showLegend: {
-                type: Boolean,
-                default: true,
+            splitLine: {
+              show: false,
             },
-            // 是否默认采用笔刷模式
-            brushSelected: {
-                type: Boolean,
-                default: false,
+            textStyle: {
+              color:
+                that.echartsTheme === "dark"
+                  ? partten.getColor("gray")
+                  : "#000",
             },
-            theme: {
-                type: Boolean,
-                default: false,
+          },
+        ],
+        //y轴没有显式设置,根据值自动生成y轴
+        yAxis: [
+          {
+            splitLine: {
+              show: false,
             },
-            echartsTheme: {
-                type: String,
-                default: '',
+            position: "left",
+            min: 0,
+            name: "kW",
+            nameTextStyle: {
+              color: "#838383",
             },
-        },
-        data() {
-            return {
-                id: "",
-                chart: null,
-                color: [
-                    "#05bb4c",
-                    "#4b55ae",
-                    "#fa8c16",
-                    "#f8de5b",
-                    "#1a93cf",
-                    "#c531c7",
-                    "#bd3338",
-                ],
-            };
-        },
-        computed: {
-            collapse() {
-                return this.$store.state.collapse
-            }
-        },
-        watch: {
-            height() {
-                if (this.chart) {
-                    this.chart.resize()
-                }
+          },
+          {
+            splitLine: {
+              show: false,
             },
-            collapse(val) {
-                if (this.chart) {
-                    setTimeout(() => {
-                        this.chart.resize()
-                    }, 300)
-                }
-            }
-        },
-        methods: {
-            resize() {},
-            initChart() {
-                const that = this;
-                echarts.registerTheme('chartTheme', chartTheme)
-                let myChart = echarts.init(document.getElementById(this.id), 'dark');
-                that.chart = myChart
-                //指定图表的配置项和数据
-                const option = {
-                    backgroundColor: '',
-                    //标题
-                    title: {
-                        text: that.chartTitle,
-                        // right: 460,
-                        left: 'center',
-                        // left: 110,
-                        // top: 4,
-                        textStyle: {
-                            fontSize: 16,
-                            color: that.echartsTheme === "dark" ? partten.getColor("white") : "#000",
-                        },
-                    },
-                    // backgroundColor:
-                    //   that.theme === "dark"
-                    //     ? "rgba(0,0,0,0.4)"
-                    //     : "rgba(255,255,255,0.5)",
-                    //工具箱
-                    color: [
-                        "#3D54BE",
-                        "rgb(255,0,0)",
-                        "#a1a1a1",
-                        "#0098d9",
-                        "#FF8700",
-                        "#005eaa",
-                        "#cda819",
-                        "#32a487"
-                    ],
-                    toolbox: {
-                        show: true,
-                        x: "right",
-                        position: [10, 10],
-                        // backgroundColor:'rgba(0,0,0,0.4)',
-                        borderColor: that.theme ? partten.getColor("gray") : partten.getColor("white"),
-                        textStyle: {
-                            fontSize: util.vh(16),
-                            color: that.theme ? partten.getColor("gray") : partten.getColor("white")
-                        },
-                        iconStyle: {
-                            borderColor: that.theme ? partten.getColor("gray") : partten.getColor("white")
-                        },
-                        emphasis: {
-                            iconStyle: {
-                                borderColor: that.theme ? partten.getColor("gray") : partten.getColor("white")
-                            },
-                        },
-                    },
-                    tooltip: {
-                        trigger: "item",
-                        axisPointer: {
-                            type: "cross",
-                        },
-                        backgroundColor: "rgba(0,0,0,0.4)",
-                        borderColor: partten.getColor("white"),
-                        textStyle: {
-                            fontSize: util.vh(16),
-                            color: "#fff",
-                        },
-                        formatter(params) {
-                            let str = ''
-                            if (params.value && params.value.x) {
-                                str =
-                                    `${params.seriesName}<br />风速:${params.value.x} m/s<br />功率:${params.value.y} kW`
-                            } else {
-                                str = `${params.name}`
-                            }
-                            return str
-                        },
-                    },
-                    brush: {
-                        seriesIndex: [2, 3],
-                        yAxisIndex: 0,
-                        transformable: true,
-                        throttleType: "debounce",
-                        throttleDelay: 1000,
-                        removeOnClick: true,
-                        brushType: "polygon",
-                        brushMode: "multiple",
-                        brushStyle: {
-                            borderWidth: 1,
-                            borderColor: "#ff2424",
-                        },
-                    },
-                    dataZoom: [{
-                            type: "inside", //图表下方的伸缩条
-                            show: false, //是否显示
-                            realtime: true, //拖动时,是否实时更新系列的视图
-                            start: 0, //伸缩条开始位置(1-100),可以随时更改
-                            end: 100, //伸缩条结束位置(1-100),可以随时更改
-                        },
-                        {
-                            type: "slider", //图表下方的伸缩条
-                            show: false, //是否显示
-                            realtime: true, //拖动时,是否实时更新系列的视图
-                            start: 0, //伸缩条开始位置(1-100),可以随时更改
-                            end: 100, //伸缩条结束位置(1-100),可以随时更改
-                        },
-                    ],
-                    textStyle: {
-                        fontSize: util.vh(16),
-                        color: that.echartsTheme === "dark" ? "#fff" : "#000",
-                    },
-                    //图例-每一条数据的名字
-                    legend: {
-                        show: that.showLegend,
-                        data: ["拟合功率", "保证功率", "无用点", "有用点", "Cp值"],
-                        right: "center",
-                        top: "25",
-                        // icon: "circle",
-                        itemWidth: 6,
-                        inactiveColor: that.echartsTheme === "dark" ?
-                            partten.getColor("white") : "#000",
-                        textStyle: {
-                            color: that.echartsTheme === "dark" ?
-                                partten.getColor("white") : "#000",
-                            fontSize: 14,
-                        },
+            position: "right",
+            min: 0,
+          },
+        ],
+        animation: true,
+        dataset: that.dataSet.length ? JSON.parse(that.dataSet) : [],
+        //数据-data是最终要显示的数据
+        series: that.seriesData,
+      };
 
-                    },
-                    grid: {
-                        top: 48,
-                        left: 40,
-                        right: 40,
-                        bottom: 24,
-                    },
-                    //x轴
-                    xAxis: [{
-                        name: 'm/s',
-                        nameTextStyle: {
-                            color: '#838383'
-                        },
-                        type: "value",
-                        boundaryGap: false,
-                        data: that.xAxisData || [],
-                        min: 0,
-                        max: 25,
-                        interval: 1,
-                        axisLabel: {
-                            formatter: "{value}",
-                        },
-                        splitLine: {
-                            show: false,
-                        },
-                        textStyle: {
-                            color: that.echartsTheme === "dark" ?
-                                partten.getColor("gray") : "#000",
-                        },
-                    }, ],
-                    //y轴没有显式设置,根据值自动生成y轴
-                    yAxis: [{
-                        splitLine: {
-                            show: false
-                        },
-                        position: 'left',
-                        min: 0,
-                        name: 'kW',
-                        nameTextStyle: {
-                            color: '#838383'
-                        }
-                    }, {
-                        splitLine: {
-                            show: false
-                        },
-                        position: 'right',
-                        min: 0,
-                    }],
-                    animation: true,
-                    dataset: that.dataSet.length ? JSON.parse(that.dataSet) : [],
-                    //数据-data是最终要显示的数据
-                    series: that.seriesData,
-                };
+      if (that.brushSelected) {
+        option.brush = {
+          seriesIndex: [2, 3],
+          yAxisIndex: that.brushIndex,
+          transformable: true,
+          throttleType: "debounce",
+          throttleDelay: 1000,
+          removeOnClick: true,
+          brushType: "polygon",
+          brushMode: "multiple",
+          brushStyle: {
+            borderWidth: 1,
+            borderColor: "#ff2424",
+          },
+        };
+      }
 
-                that.resize = function () {
-                    myChart.resize();
-                };
+      that.resize = function () {
+        myChart.resize();
+      };
 
-                window.addEventListener("resize", that.resize);
+      window.addEventListener("resize", that.resize);
 
-                myChart.setOption(option);
-                if (that.brushSelected) {
-                    myChart.dispatchAction({
-                        type: "takeGlobalCursor",
-                        // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
-                        key: "brush",
-                        brushOption: {
-                            seriesIndex: [2, 3],
-                            yAxisIndex: 0,
-                            transformable: true,
-                            throttleType: "debounce",
-                            throttleDelay: 1000,
-                            removeOnClick: true,
-                            brushType: "polygon",
-                            brushMode: "multiple",
-                            brushStyle: {
-                                borderWidth: 1,
-                                color: "rgba(255,36,36,0.2)",
-                                borderColor: "#ff2424",
-                            },
-                        },
-                    });
-                }
-
-                myChart.off("brushSelected");
-                myChart.on("brushSelected", (params) => {
-                    that.$emit("getSelected", params.batch || []);
-                });
-                myChart.off('click')
-                myChart.on('click', params => {
-                    // console.log(params)
-                    if (params.componentType === 'markArea') {
-                        myChart.dispatchAction({
-                            type: 'brush',
-                            areas: [{
-                                xAxisIndex: 0,
-                                brushType: 'lineX',
-                                coordRange: [params.data.coord[0][0], params.data.coord[1][0]]
-                            }, ]
-                        });
-                    }
-                })
+      myChart.setOption(option);
+      if (that.brushSelected) {
+        myChart.dispatchAction({
+          type: "takeGlobalCursor",
+          // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
+          key: "brush",
+          brushOption: {
+            seriesIndex: [2, 3],
+            yAxisIndex: 0,
+            transformable: true,
+            throttleType: "debounce",
+            throttleDelay: 1000,
+            removeOnClick: true,
+            brushType: "polygon",
+            brushMode: "multiple",
+            brushStyle: {
+              borderWidth: 1,
+              color: "rgba(255,36,36,0.2)",
+              borderColor: "#ff2424",
             },
-        },
-        created() {
-            this.id = "chart-" + util.newGUID();
-        },
-        mounted() {
-            // this.$nextTick(() => {
-            this.$el.style.width = this.width;
-            this.$el.style.height = this.height;
-            this.initChart();
-            if (this.chart) {
-                this.chart.resize()
-            }
-            // });
-        },
-        updated() {
-            // console.log('update')
-            let myChart = echarts.init(document.getElementById(this.id));
-            myChart.dispose();
-            this.$nextTick(() => {
-                this.initChart();
-            });
-        },
-        unmounted() {
-            window.removeEventListener("resize", this.resize);
-        },
-    };
+          },
+        });
+      }
+
+      myChart.off("brushSelected");
+      myChart.on("brushSelected", (params) => {
+        that.$emit("getSelected", params.batch || []);
+      });
+      myChart.off("click");
+      myChart.on("click", (params) => {
+        // console.log(params)
+        if (params.componentType === "markArea") {
+          myChart.dispatchAction({
+            type: "brush",
+            areas: [
+              {
+                xAxisIndex: 0,
+                brushType: "lineX",
+                coordRange: [params.data.coord[0][0], params.data.coord[1][0]],
+              },
+            ],
+          });
+        }
+      });
+    },
+
+    getChartUnit(seriesName) {
+      let unit = "";
+      if (/功率/.test(seriesName)) {
+        unit = "kW";
+      } else if (/风速/.test(seriesName)) {
+        unit = "m/s";
+      }
+      return ` ${unit}`;
+    },
+  },
+  created() {
+    this.id = "chart-" + util.newGUID();
+  },
+  mounted() {
+    // this.$nextTick(() => {
+    this.$el.style.width = this.width;
+    this.$el.style.height = this.height;
+    this.initChart();
+    if (this.chart) {
+      this.chart.resize();
+    }
+    // });
+  },
+  updated() {
+    // console.log('update')
+    let myChart = echarts.init(document.getElementById(this.id));
+    myChart.dispose();
+    this.$nextTick(() => {
+      this.initChart();
+    });
+  },
+  unmounted() {
+    window.removeEventListener("resize", this.resize);
+  },
+};
 </script>
 
 <style lang="less">
-    .chart {
-        width: 100%;
-        height: 100%;
-        display: inline-block;
-    }
+.chart {
+  width: 100%;
+  height: 100%;
+  display: inline-block;
+}
 </style>

File diff suppressed because it is too large
+ 70875 - 0
src/views/generatingCapacity/dataAnalysis/combine/components/data.json


+ 103 - 52
src/views/generatingCapacity/dataAnalysis/combine/components/search.vue

@@ -1,61 +1,112 @@
 <template>
-    <div class="seach">
-        <el-form class="generat-seach" :inline="true" :model="queryForm">
-            <el-form-item label="最大风速" class="!mb-0">
-                <el-input-number v-model="queryForm.maxs" class="!w-[130px]" :max="30"></el-input-number>
-            </el-form-item>
-            <el-form-item label="最小风速" class="!mb-0">
-                <el-input-number v-model="queryForm.mins" class="!w-[130px]" :min="0"></el-input-number>
-            </el-form-item>
-            <el-form-item label="最大功率" class="!mb-0">
-                <el-input-number v-model="queryForm.maxp" class="!w-[130px]"></el-input-number>
-            </el-form-item>
-            <el-form-item label="最小功率" class="!mb-0">
-                <el-input-number v-model="queryForm.minp" class="!w-[130px]" :min="0"></el-input-number>
-            </el-form-item>
-            <el-form-item label="多项式" class="!mb-0">
-                <el-select v-model="queryForm.dimension" class="w-[80px]">
-                    <el-option v-for="item in 30" :key="item" :value="item" :label="item"></el-option>
-                </el-select>
-            </el-form-item>
-            <el-form-item label="拟合方式" class="!mb-0">
-                <el-select v-model="queryForm.mode" class="w-[120px]">
-                    <el-option :value="0" label="单台拟合"></el-option>
-                    <el-option :value="1" label="合并拟合"></el-option>
-                    <el-option :value="2" label="同名拟合"></el-option>
-                </el-select>
-            </el-form-item>
-            <el-form-item class="!mb-0">
-                <el-button type="primary" @click="funSubmit">曲线拟合</el-button>
-            </el-form-item>
-        </el-form>
-    </div>
+  <div class="seach">
+    <el-form class="generat-seach" :inline="true" :model="queryForm">
+      <el-form-item label="最大风速" class="!mb-0">
+        <el-input-number
+          v-model="queryForm.maxs"
+          class="!w-[130px]"
+          :max="30"
+        ></el-input-number>
+      </el-form-item>
+      <el-form-item label="最小风速" class="!mb-0">
+        <el-input-number
+          v-model="queryForm.mins"
+          class="!w-[130px]"
+          :min="0"
+        ></el-input-number>
+      </el-form-item>
+      <el-form-item label="最大功率" class="!mb-0">
+        <el-input-number
+          v-model="queryForm.maxp"
+          class="!w-[130px]"
+        ></el-input-number>
+      </el-form-item>
+      <el-form-item label="最小功率" class="!mb-0">
+        <el-input-number
+          v-model="queryForm.minp"
+          class="!w-[130px]"
+          :min="0"
+        ></el-input-number>
+      </el-form-item>
+      <el-form-item label="多项式" class="!mb-0">
+        <el-select
+          style="width: 60px"
+          v-model="queryForm.dimension"
+          class="w-[80px]"
+        >
+          <el-option
+            v-for="item in 30"
+            :key="item"
+            :value="item"
+            :label="item"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="拟合方式" class="!mb-0">
+        <el-select style="width: 100px" v-model="queryForm.mode" class="w-[120px]">
+          <el-option :value="0" label="单台拟合"></el-option>
+          <el-option :value="1" label="合并拟合"></el-option>
+          <el-option :value="2" label="同名拟合"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item class="!mb-0">
+        <el-button type="primary" @click="funSubmit">曲线拟合</el-button>
+      </el-form-item>
+    </el-form>
+  </div>
 </template>
 
 <script>
-    export default {
-        data() {
-            return {
-                queryForm: {
-                    maxs: 25,
-                    mins: 0,
-                    maxp: 2500,
-                    minp: 0,
-                    dimension: 10, //拟合维度
-                    mode: 0 //拟合方式
-                },
-            }
-        },
-        methods: {
-            funSubmit() {
-                this.$emit('submit', this.queryForm)
-            }
-        }
-    }
+export default {
+  props: {
+    maxProduction: {
+      type: Number,
+      default: () => {
+        return 2500;
+      },
+    },
+  },
+
+  data() {
+    return {
+      queryForm: {
+        maxs: 25,
+        mins: 0,
+        maxp: 2500,
+        minp: 0,
+        dimension: 10, //拟合维度
+        mode: 0, //拟合方式
+      },
+    };
+  },
+
+  created() {
+    this.queryForm.maxp = this.maxProduction;
+  },
+
+  methods: {
+    funSubmit() {
+      this.$emit("submit", this.queryForm);
+    },
+  },
+
+  watch: {
+    maxProduction(value) {
+      this.queryForm.maxp = value;
+    },
+  },
+};
 </script>
 
 <style lang="less">
-    .seach {
-        padding: 20px 0 0 20px;
+.seach {
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  .generat-seach {
+    .el-form-item {
+      margin: 0 20px 0 0;
     }
+  }
+}
 </style>

+ 197 - 1
src/views/generatingCapacity/dataAnalysis/combine/index.vue

@@ -3,7 +3,7 @@
     <div class="dataAnalysisComMain">
       <div class="main_top">
         <p class="topPsty">功率曲线拟合分析</p>
-        <search-cop @submit="funSubmit"> </search-cop>
+        <search-cop @submit="funSubmit" :maxProduction="maxProduction"> </search-cop>
       </div>
       <div class="main">
         <div class="treeDataMain">
@@ -233,6 +233,8 @@ import httpRequest from "@/utils/request.js";
 import { ElMessage } from "element-plus";
 import util from "@tools/util";
 import CurrentScatterChart from "./components/current-scatter-chart.vue";
+
+import jsonData from "./components/data.json";
 // import dotRes from '@/data/dot.json'
 // import tableRes from '@/data/table.json'
 // import areaDataRes from '@/data/areaData.json'
@@ -246,6 +248,7 @@ const excelType = ref("");
 const excelCheckIds = ref([]);
 const excelList = ref([]);
 const currentNodeKey = ref("");
+const maxProduction = ref(2500);
 const funExcelChange = async (obj) => {
   //点击excel项时
   activeTab.value = "1";
@@ -300,6 +303,8 @@ const funExcelChange = async (obj) => {
     tableLoading.value = false;
   }
 
+  maxProduction.value = res.data.production || 2500;
+
   if (chartResponse && chartResponse.code === 200) {
     chartRes = chartResponse.data;
     markDot.pcl5 = chartRes.obj.pc5ratio;
@@ -838,8 +843,198 @@ watch(
     deep: true,
   }
 );
+const initPageData = () => {
+  treeData.value = funRepeatMap(JSON.parse(JSON.stringify(jsonData.treeData1)));
+  excelList.value = [];
+
+  actTreeNode.value = null;
+  excelFitList.value = [];
+  processTreeData.value = funRepeatMap(
+    JSON.parse(JSON.stringify(jsonData.treeData2)),
+    "process"
+  ); //flag控制对actTreeNode赋值
+  if (actTreeNode.value) {
+    if (actTreeNode.value.childs) {
+      excelList.value = actTreeNode.value.childs.map((o) => {
+        return {
+          id: o.id,
+          interval: o.interval,
+          path: o.path,
+          prepareid: o.prepareid,
+          station: o.station,
+          time: o.time,
+          type: o.type,
+          windturbine: o.windturbine,
+          isCheck: false,
+          name: o.path.substring(
+            o.path.indexOf(o.station + "_") + (o.station + "_").length
+          ),
+        };
+      });
+
+      excelFitList.value = actTreeNode.value.childs.map((o) => {
+        return {
+          id: o.id,
+          interval: o.interval,
+          path: o.path,
+          prepareid: o.prepareid,
+          station: o.station,
+          time: o.time,
+          type: o.type,
+          windturbine: o.windturbine,
+          name: o.path.substring(
+            o.path.indexOf(o.station + "_") + (o.station + "_").length
+          ),
+        };
+      });
+    } else {
+      excelList.value = [];
+    }
+
+    const child = actTreeNode.value.childs[0];
+    const obj = {
+      id: child.id,
+      interval: child.interval,
+      path: child.path,
+      prepareid: child.prepareid,
+      station: child.station,
+      time: child.time,
+      type: child.type,
+      windturbine: child.windturbine,
+      name: child.path.substring(
+        child.path.indexOf(child.station + "_") + (child.station + "_").length
+      ),
+    };
+    currentNodeKey.value = actTreeNode.value?.id || "";
+
+    activeTab.value = "1";
+    isChartArea.value = false;
+    tableShowId.value = obj.id;
+    tableName.value = obj.name;
+    excelType.value = obj.type; // 接收excel的type 用于控制右侧tab展示
+
+    let chartRes = {
+      scatterhs: [[]],
+      scatterls: [[]],
+      sjgl: [[]],
+      llgl: [[]],
+      cpz: [[]],
+    };
+    tableLoading.value = true;
+    tableColumn.value = jsonData.tableData.title.map((o) => {
+      return {
+        prop: o.key,
+        width: o.des === "时间" ? 100 : 80,
+        label: o.des,
+      };
+    });
+    tableData.value = jsonData.tableData.data;
+    tableLoading.value = false;
+    maxProduction.value = jsonData.tableData.production || 2500;
+
+    chartRes = jsonData.chartData;
+    markDot.pcl5 = chartRes.obj.pc5ratio;
+    markDot.pcl10 = chartRes.obj.pc10ratio;
+    markDot.pcl12 = chartRes.obj.pc12ratio;
+    markDot.pcl25 = chartRes.obj.pc25ratio;
+    avgObj.title = chartRes.obj.path
+      .substring(
+        chartRes.obj.path.indexOf(chartRes.obj.station + "_") +
+          (chartRes.obj.station + "_").length
+      )
+      .split("_")[0];
+    avgObj.cpavg = Number(chartRes.obj.cpavg).toFixed(2);
+    avgObj.frequency = Number(chartRes.obj.frequency).toFixed(2);
+    avgObj.pcratio = Number(chartRes.obj.pcratio).toFixed(2);
+    dataSet.value = JSON.stringify([
+      {
+        source: chartRes.wyd,
+        // source: chartRes.scatterls
+      },
+      {
+        source: chartRes.yyd,
+        // source: chartRes.scatterhs
+      },
+    ]);
+    const color = [
+      "#1C99FF",
+      "#FF8700",
+      "#3D54BE",
+      "#fa8c16",
+      "#1DA0D7",
+      "#DD5044",
+    ];
+    seriesData.value = [
+      {
+        name: "拟合功率",
+        type: "line",
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+        smooth: true, //这个是把线变成曲线
+        data: chartRes.sjgl,
+        xAxisIndex: 0,
+      },
+      {
+        name: "保证功率",
+        type: "line",
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+        smooth: true, //这个是把线变成曲线
+        data: chartRes.llgl,
+        xAxisIndex: 0,
+      },
+      {
+        type: "effectScatter",
+        showEffectOn: "emphasis",
+        rippleEffect: {
+          scale: 1,
+        },
+        name: "无用点",
+        symbolSize: (data) => {
+          return data.s ? (data.s > 10 ? 10 : data.s) : 4;
+        },
+        datasetIndex: 0,
+        encode: {
+          x: "x",
+          y: "y",
+        },
+        xAxisIndex: 0,
+        yAxisIndex: 0,
+      },
+      {
+        type: "effectScatter",
+        showEffectOn: "emphasis",
+        rippleEffect: {
+          scale: 1,
+        },
+        name: "有用点",
+        symbolSize: (data) => {
+          return data.s ? (data.s > 10 ? 10 : data.s) : 4;
+        },
+        datasetIndex: 1,
+        encode: {
+          x: "x",
+          y: "y",
+        },
+        xAxisIndex: 0,
+        yAxisIndex: 0,
+      },
+      {
+        name: "Cp值",
+        type: "line",
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+        smooth: true, //这个是把线变成曲线
+        data: chartRes.cpz,
+        xAxisIndex: 0,
+        yAxisIndex: 1,
+      },
+    ];
+  }
+};
 /**mounted */
 onMounted(() => {
+  initPageData();
   funGetTree();
   funGetProcessTree();
   theme.value = store.state.theme;
@@ -882,6 +1077,7 @@ onMounted(() => {
         font-weight: 600;
         margin-left: 10px;
         border-radius: 3px;
+        margin-right: 20px;
       }
     }
 

File diff suppressed because it is too large
+ 52150 - 0
src/views/generatingCapacity/dataAnalysis/hotAnalysis/components/data.json


+ 178 - 0
src/views/generatingCapacity/dataAnalysis/hotAnalysis/index.vue

@@ -285,6 +285,8 @@ import tools from "@tools/htmlToPdf.js";
 import { ElMessage } from "element-plus";
 import util from "@tools/util";
 import CurrentScatterChart from "./components/current-scatter-chart.vue";
+
+import jsonData from "./components/data.json";
 /**配置参数 */
 const treeHeight = ref(window.innerHeight - 111 + "px"); //tree高度
 const excelHeight = ref(window.innerHeight - 111 + "px"); //excel高度
@@ -1118,8 +1120,184 @@ watch(
     deep: true,
   }
 );
+
+const initPageData = () => {
+  //flag控制是否获取tree的第一项 true为可获取
+  actTreeNode.value = null;
+  excelList.value = [];
+  processTreeData.value = funRepeatMap(
+    JSON.parse(JSON.stringify(jsonData.treeData))
+  ); //flag控制对actTreeNode赋值
+  if (actTreeNode.value) {
+    if (actTreeNode.value.childs) {
+      excelList.value = actTreeNode.value.childs.map((o) => {
+        return {
+          id: o.id,
+          interval: o.interval,
+          path: o.path,
+          prepareid: o.prepareid,
+          station: o.station,
+          time: o.time,
+          type: o.type,
+          windturbine: o.windturbine,
+          isCheck: false,
+          name: o.path.substring(
+            o.path.indexOf(o.station + "_") + (o.station + "_").length
+          ),
+        };
+      });
+    } else {
+      excelList.value = [];
+    }
+
+    const child = actTreeNode.value.childs[0];
+    const obj = {
+      id: child.id,
+      interval: child.interval,
+      path: child.path,
+      prepareid: child.prepareid,
+      station: child.station,
+      time: child.time,
+      type: child.type,
+      windturbine: child.windturbine,
+      name: child.path.substring(
+        child.path.indexOf(child.station + "_") + (child.station + "_").length
+      ),
+    };
+    currentNodeKey.value = actTreeNode.value?.id || "";
+
+    excelCheckIds.value = [obj.id]; //当为单选展示风机图表时
+    chartExcelList.value = excelList.value.map((o) => {
+      return {
+        ...o,
+        name: o.windturbine,
+      };
+    }); // 选中excel当前项时, excel列表赋值给dialog 下拉框
+    queryForm.checkIds = excelList.value.map((o) => o.id);
+    checkAll.value = true;
+
+    for (const chart of jsonData.powerData) {
+      powerproduction.value = `(额定功率=${chart.power.powerProduction}kW)`;
+      powerproductionNum.value = chart.power.powerProduction;
+      barxAxis.data = Object.keys(chart.res1);
+      barSeries[0].data = Object.values(chart.res1);
+      barSeries[0].markLine.data = [
+        {
+          yAxis: 0,
+        },
+      ];
+      chartId++;
+      lineSeries.value = [
+        {
+          type: "effectScatter",
+          showEffectOn: "emphasis",
+          rippleEffect: {
+            scale: 1,
+          },
+          legendHoverLink: false,
+          name: "",
+          symbolSize: 5,
+          data: chart.res2,
+          yAxisIndex: 0,
+          markLine: {
+            symbol: "none",
+            label: {
+              show: false,
+            },
+            lineStyle: {
+              color: "#F72C5B",
+            },
+            data: [
+              {
+                yAxis: powerproductionNum.value,
+              },
+            ],
+          },
+        },
+      ];
+      chartId++;
+    }
+
+    tableColumn.value = jsonData.tableData.title.map((o) => {
+      return {
+        prop: o.key,
+        label: o.des,
+        width: o.des === "时间" ? 100 : 80,
+      };
+    });
+    tableData.value = jsonData.tableData.data;
+    /**---------------------------- */
+    // activeTab.value = '1'
+    isChartArea.value = false;
+
+    const chartRes = jsonData.analysisData;
+    maxMinData.value = [chartRes.maxhjwd, chartRes.minhjwd];
+    markDot.pcl5 = chartRes.obj.pc5ratio;
+    markDot.pcl10 = chartRes.obj.pc10ratio;
+    markDot.pcl12 = chartRes.obj.pc12ratio;
+    markDot.pcl25 = chartRes.obj.pc25ratio;
+    avgObj.title = chartRes.obj.path
+      .substring(
+        chartRes.obj.path.indexOf(chartRes.obj.station + "_") +
+          (chartRes.obj.station + "_").length
+      )
+      .split("_")[0];
+    avgObj.cpavg = Number(chartRes.obj.cpavg).toFixed(2);
+    avgObj.frequency = Number(chartRes.obj.frequency).toFixed(2);
+    avgObj.pcratio = Number(chartRes.obj.pcratio).toFixed(2);
+    const color = [
+      "#1C99FF",
+      "#FF8700",
+      "#3D54BE",
+      "#fa8c16",
+      "#1DA0D7",
+      "#DD5044",
+    ];
+    seriesData.value = [
+      {
+        name: "拟合功率",
+        type: "line",
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+        smooth: true, //这个是把线变成曲线
+        data: chartRes.sjgl,
+        xAxisIndex: 0,
+      },
+      {
+        name: "保证功率",
+        type: "line",
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+        smooth: true, //这个是把线变成曲线
+        data: chartRes.llgl,
+        xAxisIndex: 0,
+      },
+      {
+        type: "effectScatter",
+        showEffectOn: "emphasis",
+        rippleEffect: {
+          scale: 1,
+        },
+        name: "数据散点",
+        symbolSize: 5,
+        // symbolSize: (data) => {
+        // 	return data.s ? data.s > 10 ? 10 : data.s : 4
+        // },
+        // datasetIndex: 1,
+        // encode: {
+        // 	x: 'x',
+        // 	y: 'y'
+        // },
+        data: chartRes.scatter,
+        xAxisIndex: 0,
+        yAxisIndex: 0,
+      },
+    ];
+  }
+};
 /**mounted */
 onMounted(() => {
+  initPageData();
   funGetProcessTree();
   theme.value = store.state.theme;
   echartsTheme.value = !theme.value ? "dark" : "";

+ 349 - 343
src/views/generatingCapacity/dataAnalysis/lineAnalysis/components/current-scatter-chart.vue

@@ -1,362 +1,368 @@
 <template>
-    <div class="chart" :id="id"></div>
+  <div class="chart" :id="id"></div>
 </template>
 
 <script>
-    import util from "@tools/util";
-    import partten from "@tools/partten";
-    import * as echarts from "echarts";
-    import chartTheme from './current-scatter-chart.json'
+import util from "@tools/util";
+import partten from "@tools/partten";
+import * as echarts from "echarts";
+import chartTheme from "./current-scatter-chart.json";
 
-    export default {
-        name: 'currentScatterChart',
-        props: {
-            // 图表宽度
-            width: {
-                type: String,
-                default: "100%",
-            },
-            // 图表高度
-            height: {
-                type: String,
-                default: "350px",
-            },
-            // 图表主标题
-            chartTitle: {
-                type: String,
-                default: "自定义图表组件",
-            },
-            // X 轴配置项
-            xAxisData: {
-                type: Array,
-                default: () => {
-                    return [];
-                },
-            },
-            // Y 轴配置项
-            yAxisData: {
-                type: Array,
-                default: () => {
-                    return [];
-                },
+export default {
+  name: "currentScatterChart",
+  props: {
+    // 图表宽度
+    width: {
+      type: String,
+      default: "100%",
+    },
+    // 图表高度
+    height: {
+      type: String,
+      default: "350px",
+    },
+    // 图表主标题
+    chartTitle: {
+      type: String,
+      default: "自定义图表组件",
+    },
+    // X 轴配置项
+    xAxisData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    // Y 轴配置项
+    yAxisData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    dataSet: {
+      type: String,
+      default: "",
+    },
+    // 图表核心数据
+    seriesData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    // 是否显示图表图例
+    showLegend: {
+      type: Boolean,
+      default: true,
+    },
+    // 是否默认采用笔刷模式
+    brushSelected: {
+      type: Boolean,
+      default: false,
+    },
+    theme: {
+      type: Boolean,
+      default: false,
+    },
+    echartsTheme: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      id: "",
+      chart: null,
+      color: [
+        "#05bb4c",
+        "#4b55ae",
+        "#fa8c16",
+        "#f8de5b",
+        "#1a93cf",
+        "#c531c7",
+        "#bd3338",
+      ],
+      theme: "dark",
+    };
+  },
+  computed: {
+    collapse() {
+      return this.$store.state.collapse;
+    },
+  },
+  watch: {
+    height() {
+      if (this.chart) {
+        this.chart.resize();
+      }
+    },
+    collapse(val) {
+      if (this.chart) {
+        setTimeout(() => {
+          this.chart.resize();
+        }, 300);
+      }
+    },
+  },
+  methods: {
+    resize() {},
+    initChart() {
+      const that = this;
+      // echarts.registerTheme('chartTheme', chartTheme)
+      let myChart = echarts.init(
+        document.getElementById(this.id),
+        that.echartsTheme
+      );
+      that.chart = myChart;
+      //指定图表的配置项和数据
+      const option = {
+        //标题
+        title: {
+          text: that.chartTitle,
+          right: 440,
+          top: 4,
+          textStyle: {
+            fontSize: 14,
+            color:
+              that.echartsTheme === "dark" ? partten.getColor("grayl") : "#000",
+          },
+        },
+        // backgroundColor:
+        //   that.theme === "dark"
+        //     ? "rgba(0,0,0,0.4)"
+        //     : "rgba(255,255,255,0.5)",
+        //工具箱
+        color: [
+          "rgb(255,0,0)",
+          "#FF8700",
+          "#e6b600d9",
+          "#0098d9",
+          "#3D54BE",
+          "#005eaa",
+          "#cda819",
+          "#32a487",
+        ],
+        toolbox: {
+          show: false,
+          x: "right",
+          position: [10, 10],
+          // backgroundColor:'rgba(0,0,0,0.4)',
+          borderColor: partten.getColor("gray"),
+          textStyle: {
+            fontSize: util.vh(16),
+            color: partten.getColor("gray"),
+          },
+          iconStyle: {
+            borderColor: partten.getColor("gray"),
+          },
+          emphasis: {
+            iconStyle: {
+              borderColor: partten.getColor("gray"),
             },
-            dataSet: {
-                type: String,
-                default: ''
+          },
+        },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "cross",
+          },
+          // backgroundColor: "rgba(0,0,0,0.4)",
+          // borderColor: partten.getColor("gray"),
+          // textStyle: {
+          //   fontSize: util.vh(16),
+          //   color: partten.getColor("gray"),
+          // },
+          // formatter(params) {
+          //   return params.value?.x
+          //     ? `${params.seriesName}<br />风速:${params.value.x}m/s<br />功率:${params.value.y}kW`
+          //     : `${params.name}`;
+          // },
+        },
+        brush: {
+          seriesIndex: [2, 3],
+          yAxisIndex: 0,
+          transformable: true,
+          throttleType: "debounce",
+          throttleDelay: 1000,
+          removeOnClick: true,
+          brushType: "polygon",
+          brushMode: "multiple",
+          brushStyle: {
+            borderWidth: 1,
+            borderColor: "#ff2424",
+          },
+        },
+        dataZoom: [
+          {
+            type: "inside", //图表下方的伸缩条
+            show: false, //是否显示
+            realtime: true, //拖动时,是否实时更新系列的视图
+            start: 0, //伸缩条开始位置(1-100),可以随时更改
+            end: 100, //伸缩条结束位置(1-100),可以随时更改
+          },
+          {
+            type: "slider", //图表下方的伸缩条
+            show: false, //是否显示
+            realtime: true, //拖动时,是否实时更新系列的视图
+            start: 0, //伸缩条开始位置(1-100),可以随时更改
+            end: 100, //伸缩条结束位置(1-100),可以随时更改
+          },
+        ],
+        textStyle: {
+          fontSize: util.vh(16),
+          color: that.echartsTheme === "dark" ? "#fff" : "#000",
+        },
+        //图例-每一条数据的名字
+        legend: {
+          show: that.showLegend,
+        //   data: [],
+          right: 260,
+          type: "scroll",
+          top: "5",
+          // icon: "circle",
+          itemWidth: 6,
+          inactiveColor: that.echartsTheme === "dark" ? "#fff" : "#000",
+          textStyle: {
+            color: that.echartsTheme === "dark" ? "#fff" : "#000",
+            fontSize: 12,
+          },
+        },
+        grid: {
+          top: 58,
+          left: 40,
+          right: 40,
+          bottom: 24,
+        },
+        //x轴
+        xAxis: [
+          {
+            name: "m/s",
+            nameTextStyle: {
+              color: that.echartsTheme === "dark" ? "#fff" : "#000",
             },
-            // 图表核心数据
-            seriesData: {
-                type: Array,
-                default: () => {
-                    return [];
-                },
+            type: "value",
+            boundaryGap: false,
+            data: that.xAxisData || [],
+            min: 0,
+            max: 25,
+            interval: 1,
+            axisLabel: {
+              formatter: "{value}",
             },
-            // 是否显示图表图例
-            showLegend: {
-                type: Boolean,
-                default: true,
+            splitLine: {
+              show: false,
             },
-            // 是否默认采用笔刷模式
-            brushSelected: {
-                type: Boolean,
-                default: false,
+            smooth: true,
+            textStyle: {
+              color: that.echartsTheme === "dark" ? "#fff" : "#000",
             },
-            theme: {
-                type: Boolean,
-                default: false,
+          },
+        ],
+        //y轴没有显式设置,根据值自动生成y轴
+        yAxis: [
+          {
+            splitLine: {
+              show: false,
             },
-            echartsTheme: {
-                type: String,
-                default: '',
+            position: "left",
+            min: 0,
+            name: "kW",
+            nameTextStyle: {
+              color: that.echartsTheme === "dark" ? "#fff" : "#000",
             },
-        },
-        data() {
-            return {
-                id: "",
-                chart: null,
-                color: [
-                    "#05bb4c",
-                    "#4b55ae",
-                    "#fa8c16",
-                    "#f8de5b",
-                    "#1a93cf",
-                    "#c531c7",
-                    "#bd3338",
-                ],
-                theme: 'dark'
-            };
-        },
-        computed: {
-            collapse() {
-                return this.$store.state.collapse
-            }
-        },
-        watch: {
-            height() {
-                if (this.chart) {
-                    this.chart.resize()
-                }
-            },
-            collapse(val) {
-                if (this.chart) {
-                    setTimeout(() => {
-                        this.chart.resize()
-                    }, 300)
-                }
-            }
-        },
-        methods: {
-            resize() {},
-            initChart() {
-                const that = this;
-                // echarts.registerTheme('chartTheme', chartTheme)
-                let myChart = echarts.init(document.getElementById(this.id), that.echartsTheme);
-                that.chart = myChart
-                //指定图表的配置项和数据
-                const option = {
-                    //标题
-                    title: {
-                        text: that.chartTitle,
-                        right: 440,
-                        top: 4,
-                        textStyle: {
-                            fontSize: 14,
-                            color: that.echartsTheme === "dark" ? partten.getColor("grayl") : "#000",
-                        },
-                    },
-                    // backgroundColor:
-                    //   that.theme === "dark"
-                    //     ? "rgba(0,0,0,0.4)"
-                    //     : "rgba(255,255,255,0.5)",
-                    //工具箱
-                    color: [
-                        "rgb(255,0,0)",
-                        "#FF8700",
-                        "#e6b600d9",
-                        "#0098d9",
-                        "#3D54BE",
-                        "#005eaa",
-                        "#cda819",
-                        "#32a487"
-                    ],
-                    toolbox: {
-                        show: false,
-                        x: "right",
-                        position: [10, 10],
-                        // backgroundColor:'rgba(0,0,0,0.4)',
-                        borderColor: partten.getColor("gray"),
-                        textStyle: {
-                            fontSize: util.vh(16),
-                            color: partten.getColor("gray")
-                        },
-                        iconStyle: {
-                            borderColor: partten.getColor("gray")
-                        },
-                        emphasis: {
-                            iconStyle: {
-                                borderColor: partten.getColor("gray")
-                            },
-                        },
-                    },
-                    tooltip: {
-                        trigger: "axis",
-                        axisPointer: {
-                            type: "cross",
-                        },
-                        // backgroundColor: "rgba(0,0,0,0.4)",
-                        // borderColor: partten.getColor("gray"),
-                        // textStyle: {
-                        //   fontSize: util.vh(16),
-                        //   color: partten.getColor("gray"),
-                        // },
-                        // formatter(params) {
-                        //   return params.value?.x
-                        //     ? `${params.seriesName}<br />风速:${params.value.x}m/s<br />功率:${params.value.y}kW`
-                        //     : `${params.name}`;
-                        // },
-                    },
-                    brush: {
-                        seriesIndex: [2, 3],
-                        yAxisIndex: 0,
-                        transformable: true,
-                        throttleType: "debounce",
-                        throttleDelay: 1000,
-                        removeOnClick: true,
-                        brushType: "polygon",
-                        brushMode: "multiple",
-                        brushStyle: {
-                            borderWidth: 1,
-                            borderColor: "#ff2424",
-                        },
-                    },
-                    dataZoom: [{
-                            type: "inside", //图表下方的伸缩条
-                            show: false, //是否显示
-                            realtime: true, //拖动时,是否实时更新系列的视图
-                            start: 0, //伸缩条开始位置(1-100),可以随时更改
-                            end: 100, //伸缩条结束位置(1-100),可以随时更改
-                        },
-                        {
-                            type: "slider", //图表下方的伸缩条
-                            show: false, //是否显示
-                            realtime: true, //拖动时,是否实时更新系列的视图
-                            start: 0, //伸缩条开始位置(1-100),可以随时更改
-                            end: 100, //伸缩条结束位置(1-100),可以随时更改
-                        },
-                    ],
-                    textStyle: {
-                        fontSize: util.vh(16),
-                        color: that.echartsTheme === "dark" ? "#fff" : "#000",
-                    },
-                    //图例-每一条数据的名字
-                    legend: {
-                        show: that.showLegend,
-                        // data: [ "拟合功率", "保证功率","无用点", "有用点", "Cp值"],
-                        right: 260,
-                        type: 'scroll',
-                        top: "5",
-                        // icon: "circle",
-                        itemWidth: 6,
-                        inactiveColor: that.echartsTheme === "dark" ?
-                            "#fff" : "#000",
-                        textStyle: {
-                            color: that.echartsTheme === "dark" ?
-                                "#fff" : "#000",
-                            fontSize: 12,
-                        },
-
-                    },
-                    grid: {
-                        top: 58,
-                        left: 40,
-                        right: 40,
-                        bottom: 24,
-                    },
-                    //x轴
-                    xAxis: [{
-                        name: 'm/s',
-                        nameTextStyle: {
-                            color: that.echartsTheme === "dark" ?
-                                "#fff" : "#000",
-                        },
-                        type: "value",
-                        boundaryGap: false,
-                        data: that.xAxisData || [],
-                        min: 0,
-                        max: 25,
-                        interval: 1,
-                        axisLabel: {
-                            formatter: "{value}",
-                        },
-                        splitLine: {
-                            show: false,
-                        },
-                        smooth: true,
-                        textStyle: {
-                            color: that.echartsTheme === "dark" ?
-                                "#fff" : "#000",
-                        },
-                    }, ],
-                    //y轴没有显式设置,根据值自动生成y轴
-                    yAxis: [{
-                        splitLine: {
-                            show: false
-                        },
-                        position: 'left',
-                        min: 0,
-                        name: 'kW',
-                        nameTextStyle: {
-                            color: that.echartsTheme === "dark" ?
-                                "#fff" : "#000",
-                        }
-                    }],
-                    animation: true,
-                    dataset: that.dataSet.length ? JSON.parse(that.dataSet) : [],
-                    //数据-data是最终要显示的数据
-                    series: that.seriesData,
-                };
-                if (that.echartsTheme === 'dark') {
-                    option.backgroundColor = ''
-                }
+          },
+        ],
+        animation: true,
+        dataset: that.dataSet.length ? JSON.parse(that.dataSet) : [],
+        //数据-data是最终要显示的数据
+        series: that.seriesData,
+      };
+      if (that.echartsTheme === "dark") {
+        option.backgroundColor = "";
+      }
 
-                that.resize = function () {
-                    myChart.resize();
-                };
+      that.resize = function () {
+        myChart.resize();
+      };
 
-                window.addEventListener("resize", that.resize);
+      window.addEventListener("resize", that.resize);
 
-                myChart.setOption(option);
-                // if (that.brushSelected) {
-                //   myChart.dispatchAction({
-                //     type: "takeGlobalCursor",
-                //     // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
-                //     key: "brush",
-                //     brushOption: {
-                //       seriesIndex: [2,3],
-                //       yAxisIndex: 0,
-                //       transformable: true,
-                //       throttleType: "debounce",
-                //       throttleDelay: 1000,
-                //       removeOnClick: true,
-                //       brushType: "polygon",
-                //       brushMode: "multiple",
-                //       brushStyle: {
-                //         borderWidth: 1,
-                //         color: "rgba(255,36,36,0.2)",
-                //         borderColor: "#ff2424",
-                //       },
-                //     },
-                //   });
-                // }
-                myChart.off("brushSelected");
-                myChart.on("brushSelected", (params) => {
-                    that.$emit("getSelected", params.batch || []);
-                });
-                myChart.off('click')
-                myChart.on('click', params => {
-                    // if(params.componentType === 'markArea'){
-                    //   myChart.dispatchAction({
-                    //     type: 'brush',
-                    //     areas: [
-                    //       {
-                    //         xAxisIndex: 0,
-                    //         brushType: 'lineX',
-                    //         coordRange: [params.data.coord[0][0], params.data.coord[1][0]]
-                    //       },
-                    //     ]
-                    //   });
-                    // }
-                })
-            },
-        },
-        created() {
-            this.id = "chart-" + util.newGUID();
-        },
-        mounted() {
-            // this.$nextTick(() => {
-            this.$el.style.width = this.width;
-            this.$el.style.height = this.height;
-            this.initChart();
-            // });
-        },
-        updated() {
-            // console.log('update')
-            let myChart = echarts.init(document.getElementById(this.id), this.echartsTheme);
-            myChart.dispose();
-            this.$nextTick(() => {
-                this.initChart();
-            });
-        },
-        unmounted() {
-            window.removeEventListener("resize", this.resize);
-        },
-    };
+      myChart.setOption(option);
+      // if (that.brushSelected) {
+      //   myChart.dispatchAction({
+      //     type: "takeGlobalCursor",
+      //     // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
+      //     key: "brush",
+      //     brushOption: {
+      //       seriesIndex: [2,3],
+      //       yAxisIndex: 0,
+      //       transformable: true,
+      //       throttleType: "debounce",
+      //       throttleDelay: 1000,
+      //       removeOnClick: true,
+      //       brushType: "polygon",
+      //       brushMode: "multiple",
+      //       brushStyle: {
+      //         borderWidth: 1,
+      //         color: "rgba(255,36,36,0.2)",
+      //         borderColor: "#ff2424",
+      //       },
+      //     },
+      //   });
+      // }
+      myChart.off("brushSelected");
+      myChart.on("brushSelected", (params) => {
+        that.$emit("getSelected", params.batch || []);
+      });
+      myChart.off("click");
+      myChart.on("click", (params) => {
+        // if(params.componentType === 'markArea'){
+        //   myChart.dispatchAction({
+        //     type: 'brush',
+        //     areas: [
+        //       {
+        //         xAxisIndex: 0,
+        //         brushType: 'lineX',
+        //         coordRange: [params.data.coord[0][0], params.data.coord[1][0]]
+        //       },
+        //     ]
+        //   });
+        // }
+      });
+    },
+  },
+  created() {
+    this.id = "chart-" + util.newGUID();
+  },
+  mounted() {
+    // this.$nextTick(() => {
+    this.$el.style.width = this.width;
+    this.$el.style.height = this.height;
+    this.initChart();
+    // });
+  },
+  updated() {
+    // console.log('update')
+    let myChart = echarts.init(
+      document.getElementById(this.id),
+      this.echartsTheme
+    );
+    myChart.dispose();
+    this.$nextTick(() => {
+      this.initChart();
+    });
+  },
+  unmounted() {
+    window.removeEventListener("resize", this.resize);
+  },
+};
 </script>
 
 <style lang="less">
-    .chart {
-        width: 100%;
-        height: 100%;
-        display: inline-block;
-    }
+.chart {
+  width: 100%;
+  height: 100%;
+  display: inline-block;
+}
 </style>

File diff suppressed because it is too large
+ 32035 - 0
src/views/generatingCapacity/dataAnalysis/lineAnalysis/components/data.json


+ 383 - 137
src/views/generatingCapacity/dataAnalysis/lineAnalysis/index.vue

@@ -208,6 +208,7 @@ import httpRequest from "@/utils/request.js";
 import { ElMessage } from "element-plus";
 import util from "@tools/util";
 import CurrentScatterChart from "./components/current-scatter-chart.vue";
+import jsonData from "./components/data.json";
 // import dotRes from '@/data/dot.json'
 // import tableRes from '@/data/table.json'
 // import areaDataRes from '@/data/areaData.json'
@@ -598,114 +599,216 @@ const barUnWorkSeries = ref([
     data: [],
   },
 ]);
-const funTimeArea = async () => {
+const funTimeArea = () => {
   if (seriesData.value.length) {
     activeTab.value = "1";
     //获取数据
-    const res = await httpRequest.get("/power/fitting/time", {
-      params: {
-        ids: excelCheckIds.value.join(","),
-      },
-    });
-    if (res.code === 200) {
-      barxAxis.data = [];
-      barSeries.value = [
-        {
-          name: "不运行",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-        {
-          name: "3~5m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-        {
-          name: "5~7m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-        {
-          name: "7~9m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-        {
-          name: "9~11m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-        {
-          name: "11~20m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-        {
-          name: "20~25m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-      ];
-      barUnWorkSeries.value = [
-        {
-          name: "3~5m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-        {
-          name: "5~7m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
+    const res = httpRequest
+      .get("/power/fitting/time", {
+        params: {
+          ids: excelCheckIds.value.join(","),
         },
-        {
-          name: "7~9m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-        {
-          name: "9~11m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-        {
-          name: "11~20m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-        {
-          name: "20~25m风速",
-          type: "bar",
-          stack: "a",
-          data: [],
-        },
-      ];
-      for (const wtObj of res.data) {
-        barxAxis.data.push(wtObj.wtId);
-        for (const timeKey in wtObj.time1) {
-          barSeries.value[timeKey].data.push(
-            (wtObj.time1[timeKey] / 60).toFixed(0)
-          );
+      })
+      .then((res) => {
+        if (res.code === 200) {
+          barxAxis.data = [];
+          barSeries.value = [
+            {
+              name: "不运行",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "3~5m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "5~7m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "7~9m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "9~11m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "11~20m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "20~25m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+          ];
+          barUnWorkSeries.value = [
+            {
+              name: "3~5m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "5~7m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "7~9m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "9~11m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "11~20m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+            {
+              name: "20~25m风速",
+              type: "bar",
+              stack: "a",
+              data: [],
+            },
+          ];
+          for (const wtObj of res.data) {
+            barxAxis.data.push(wtObj.wtId);
+            for (const timeKey in wtObj.time1) {
+              barSeries.value[timeKey].data.push(
+                (wtObj.time1[timeKey] / 60).toFixed(0)
+              );
+            }
+            for (const time2Key in wtObj.time2) {
+              barUnWorkSeries.value[time2Key].data.push(
+                (wtObj.time2[time2Key] / 60).toFixed(0)
+              );
+            }
+          }
+          tmDialog.value = true;
         }
-        for (const time2Key in wtObj.time2) {
-          barUnWorkSeries.value[time2Key].data.push(
-            (wtObj.time2[time2Key] / 60).toFixed(0)
-          );
+      })
+      .catch(() => {
+        barxAxis.data = [];
+        barSeries.value = [
+          {
+            name: "不运行",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "3~5m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "5~7m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "7~9m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "9~11m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "11~20m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "20~25m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+        ];
+        barUnWorkSeries.value = [
+          {
+            name: "3~5m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "5~7m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "7~9m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "9~11m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "11~20m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+          {
+            name: "20~25m风速",
+            type: "bar",
+            stack: "a",
+            data: [],
+          },
+        ];
+        for (const wtObj of jsonData.timeData) {
+          barxAxis.data.push(wtObj.wtId);
+          for (const timeKey in wtObj.time1) {
+            barSeries.value[timeKey].data.push(
+              (wtObj.time1[timeKey] / 60).toFixed(0)
+            );
+          }
+          for (const time2Key in wtObj.time2) {
+            barUnWorkSeries.value[time2Key].data.push(
+              (wtObj.time2[time2Key] / 60).toFixed(0)
+            );
+          }
         }
-      }
-      tmDialog.value = true;
-    }
+        tmDialog.value = true;
+      });
   }
 };
 
@@ -758,46 +861,127 @@ const countSeries = ref([
     markLine: {},
   },
 ]);
-const funPower = async () => {
+const funPower = () => {
   if (seriesData.value.length) {
     //获取数据
-    const res = await httpRequest.get("/rated/power", {
-      params: {
-        ids: excelCheckIds.value.join(","),
-      },
-    });
-    if (res.code === 200) {
-      powerxAxis.data = [];
-      powerSeries.value = [
-        {
-          name: "平均全功率",
-          type: "bar",
-          data: [],
-          markLine: {
-            symbol: "none",
-            label: {
-              show: true,
+    const res = httpRequest
+      .get("/rated/power", {
+        params: {
+          ids: excelCheckIds.value.join(","),
+        },
+      })
+      .then((res) => {
+        if (res.code === 200) {
+          powerxAxis.data = [];
+          powerSeries.value = [
+            {
+              name: "平均全功率",
+              type: "bar",
+              data: [],
+              markLine: {
+                symbol: "none",
+                label: {
+                  show: true,
+                },
+                lineStyle: {
+                  color: "rgba(96,174,255, 1)",
+                },
+                data: [],
+              },
             },
-            lineStyle: {
-              color: "rgba(96,174,255, 1)",
+          ];
+          countSeries.value = [
+            {
+              name: "次数",
+              type: "bar",
+              data: [],
+              markLine: {},
             },
+          ];
+          if (res.data.data) {
+            const xAxis = [],
+              seriesArr = [],
+              countArr = [];
+            for (const val of res.data.data) {
+              xAxis.push(val.wt);
+              seriesArr.push(val.avg);
+              countArr.push(val.count);
+            }
+            powerxAxis.data = xAxis;
+            countSeries.value[0].data = countArr.map((o) => {
+              return {
+                value: o,
+                // itemStyle: {
+                // 	color: o < res.data.avg ? 'rgb(197,78,82)' : 'rgb(50,93,171)'
+                // }
+              };
+            });
+            powerSeries.value[0].data = seriesArr.map((o) => {
+              return {
+                value: o,
+                itemStyle: {
+                  color: o < res.data.avg ? "rgb(197,78,82)" : "rgb(50,93,171)",
+                },
+              };
+            });
+            let maxValue = Math.max(...seriesArr);
+            if (res.data.power > maxValue) {
+              maxValue = res.data.power;
+            } else {
+              maxValue = null;
+            }
+            poweryAxis.value.max = maxValue;
+            powerSeries.value[0].markLine.data = [
+              {
+                yAxis: res.data.avg,
+                name: `平均额定功率${res.data.avg}`,
+                lineStyle: {
+                  color: "green",
+                },
+              },
+              {
+                yAxis: res.data.power,
+                name: `额定功率${res.data.power}`,
+                lineStyle: {
+                  color: "red",
+                },
+              },
+            ];
+          }
+          powerDialog.value = true;
+        }
+      })
+      .catch(() => {
+        powerxAxis.data = [];
+        powerSeries.value = [
+          {
+            name: "平均全功率",
+            type: "bar",
             data: [],
+            markLine: {
+              symbol: "none",
+              label: {
+                show: true,
+              },
+              lineStyle: {
+                color: "rgba(96,174,255, 1)",
+              },
+              data: [],
+            },
           },
-        },
-      ];
-      countSeries.value = [
-        {
-          name: "次数",
-          type: "bar",
-          data: [],
-          markLine: {},
-        },
-      ];
-      if (res.data.data) {
+        ];
+        countSeries.value = [
+          {
+            name: "次数",
+            type: "bar",
+            data: [],
+            markLine: {},
+          },
+        ];
         const xAxis = [],
           seriesArr = [],
           countArr = [];
-        for (const val of res.data.data) {
+        for (const val of jsonData.powerData.data) {
           xAxis.push(val.wt);
           seriesArr.push(val.avg);
           countArr.push(val.count);
@@ -820,7 +1004,7 @@ const funPower = async () => {
           };
         });
         let maxValue = Math.max(...seriesArr);
-        if (res.data.power > maxValue) {
+        if (jsonData.powerData.power > maxValue) {
           maxValue = res.data.power;
         } else {
           maxValue = null;
@@ -842,9 +1026,8 @@ const funPower = async () => {
             },
           },
         ];
-      }
-      powerDialog.value = true;
-    }
+        powerDialog.value = true;
+      });
   }
 };
 /**dialog 数据 */
@@ -868,8 +1051,71 @@ watch(
     deep: true,
   }
 );
+
+const initPageData = () => {
+  actTreeNode.value = null;
+  treeData.value = funRepeatMap(JSON.parse(JSON.stringify(jsonData.treeData)));
+  excelList.value = [];
+  nextTick(() => {
+    if (actTreeNode.value) {
+      if (actTreeNode.value.childs) {
+        excelList.value = actTreeNode.value.childs.map((o) => {
+          return {
+            id: o.id,
+            interval: o.interval,
+            path: o.path,
+            prepareid: o.prepareid,
+            station: o.station,
+            time: o.time,
+            type: o.type,
+            windturbine: o.windturbine,
+            isCheck: false,
+            name: o.path.substring(
+              o.path.indexOf(o.station + "_") + (o.station + "_").length
+            ),
+          };
+        });
+      } else {
+        excelList.value = [];
+      }
+      if (treeCopRef.value && treeCopRef.value.data) {
+        treeCopRef.value.$refs.tree.setCheckedKeys(
+          [actTreeNode.value.id],
+          true
+        );
+        excelCheckIds.value = [actTreeNode.value.childs[0].id];
+
+        wtData.value = [];
+        seriesData.value = [];
+        seriesData.value.push({
+          name: "保证功率",
+          type: "line",
+          symbol: "line", //设定为实心点
+          symbolSize: 0, //设定实心点的大小
+          smooth: true, //这个是把线变成曲线
+          data: jsonData.lineData.bzgl || [],
+          xAxisIndex: 0,
+        });
+        for (const wtObj of jsonData.lineData.sjgl) {
+          seriesData.value.push({
+            // name: wtObj.obj.windturbineId + "\n实际功率",
+            name: wtObj.obj.code + "\n实际功率",
+            type: "line",
+            symbol: "line", //设定为实心点
+            symbolSize: 0, //设定实心点的大小
+            smooth: true, //这个是把线变成曲线
+            data: wtObj.sjgl || [],
+            xAxisIndex: 0,
+          });
+          wtData.value.push(wtObj.obj);
+        }
+      }
+    }
+  });
+};
 /**mounted */
 onMounted(() => {
+  initPageData();
   funGetTree();
   theme.value = store.state.theme;
   echartsTheme.value = !theme.value ? "dark" : "";

File diff suppressed because it is too large
+ 25045 - 0
src/views/generatingCapacity/dataAnalysis/posAnalysis/components/data.json


+ 489 - 337
src/views/generatingCapacity/dataAnalysis/posAnalysis/components/leafletMap.vue

@@ -1,378 +1,530 @@
 <template>
-    <div class="mapCom">
-        <div id="map"></div>
-    </div>
+  <div class="mapCom">
+    <div id="map"></div>
+  </div>
 </template>
 <script>
-    import httpRequest from '@/utils/request.js'
-    import {
-        CanvasLabel
-    } from "@panzhiyue/leaflet-canvaslabel"
-    import './leaflet.canvas-markers.js'
-    export default {
-        props: {
-            ids: {
-                type: Array,
-                default: () => {
-                    return [];
-                },
-            },
-            windList: {
-                type: Array,
-                default: () => {
-                    return [];
-                },
-            },
-        },
-        data() {
-            return {
-                map: null,
-                DefaultIcon1: null,
-                layerGroup: [],
-                layers: [],
-                rightObj: {},
-                areaLayer: null,
-                tilsUrl: "./static/kMapTiles/{z}/{x}/{y}.jpg",
-                ciLayer: null
-            }
-        },
-        watch: {
-            ids(val) {
-                this.funStationPos(val)
-                // this.funStationPosLabel(val)
-            },
-        },
-        mounted() {
-            this.initMap();
-        },
-        methods: {
-            initMap() {
-                //矢量文本标签渲染器
-                let canvasLabel = new L.CanvasLabel({
-                    collisionFlg: true,
-                    scale: 2
-                });
-                this.map = L.map("map", {
-                    renderer: canvasLabel,
-                    // center: [40.02404009136253, 116.50641060224784], // 地图中心--北京
-                    // center: [38.44673272215545, 106.27624511718751], // 地图中心--银川
-                    // center: [108.953939, 34.266611], // 地图中心--陕西
-                    // center: [109.470962, 34.520632], // 地图中心--渭南
-                    zoom: 16, //缩放比列
-                    zoomControl: false, //禁用 + - 按钮
-                    doubleClickZoom: true, // 禁用双击放大
-                    attributionControl: false, // 移除右下角leaflet标识
-                    preferCanvas: true,
-                    contextmenu: true,
-                    contextmenuWidth: 140,
-                    contextmenuItems: [{
-                            text: '功率曲线拟合',
-                            callback: this.powerLine
-                        },
-                        {
-                            text: '对风偏差分析',
-                            callback: this.windAny
-                        }
-                    ]
-                });
-                // let name = L.tileLayer(
-                //     "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}",
-                // ).addTo(this.map)
-
-                let name = L.tileLayer(this.tilsUrl, {
-                    minZoom: 1,
-                    maxZoom: 16
-                }).addTo(this.map)
+import httpRequest from "@/utils/request.js";
+import { CanvasLabel } from "@panzhiyue/leaflet-canvaslabel";
+import "./leaflet.canvas-markers.js";
+export default {
+  props: {
+    ids: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    windList: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+  },
+  data() {
+    return {
+      map: null,
+      DefaultIcon1: null,
+      layerGroup: [],
+      layers: [],
+      rightObj: {},
+      areaLayer: null,
+      tilsUrl: "./static/kMapTiles/{z}/{x}/{y}.jpg",
+      ciLayer: null,
+    };
+  },
+  watch: {
+    ids(val) {
+      this.funStationPos(val);
+      // this.funStationPosLabel(val)
+    },
+  },
+  mounted() {
+    this.initMap();
+  },
+  methods: {
+    initMap() {
+      //矢量文本标签渲染器
+      let canvasLabel = new L.CanvasLabel({
+        collisionFlg: true,
+        scale: 2,
+      });
+      this.map = L.map("map", {
+        renderer: canvasLabel,
+        // center: [40.02404009136253, 116.50641060224784], // 地图中心--北京
+        // center: [38.44673272215545, 106.27624511718751], // 地图中心--银川
+        // center: [108.953939, 34.266611], // 地图中心--陕西
+        // center: [109.470962, 34.520632], // 地图中心--渭南
+        zoom: 16, //缩放比列
+        zoomControl: false, //禁用 + - 按钮
+        doubleClickZoom: true, // 禁用双击放大
+        attributionControl: false, // 移除右下角leaflet标识
+        preferCanvas: true,
+        contextmenu: true,
+        contextmenuWidth: 140,
+        contextmenuItems: [
+          {
+            text: "功率曲线拟合分析",
+            callback: this.powerLine,
+          },
+          {
+            text: "对风偏差分析",
+            callback: this.windAny,
+          },
+          {
+            text: "曲线偏差率分析",
+            callback: this.qxAny,
+          },
+          {
+            text: "温度与功率分析",
+            callback: this.wdyglAny,
+          },
+          {
+            text: "损失电量分析",
+            callback: this.ssdlAny,
+          },
+          {
+            text: "桨距角分析",
+            callback: this.jjjAny,
+          },
+        ],
+      });
+      // let name = L.tileLayer(
+      //     "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}",
+      // ).addTo(this.map)
 
-                this.setAreaLayer('db', true)
-                this.setAreaLayer('jb', true)
+      let name = L.tileLayer(this.tilsUrl, {
+        minZoom: 1,
+        maxZoom: 16,
+      }).addTo(this.map);
 
-            },
-            async funStationPos(ids) {
-                let res = null
-                if (ids.length > 0) {
-                    res = await httpRequest.get('/base/location', {
-                        params: {
-                            ids: this.ids.join(","),
-                        },
-                    })
-                } else {
-                    res = await httpRequest.get('/base/station', {
-                        params: {},
-                    })
-                }
-                if (res.code === 200) {
-                    if (res.data && res.data.length) {
+      this.setAreaLayer("db", true);
+      this.setAreaLayer("jb", true);
+    },
 
-                        this.layers = []
-                        if (this.ciLayer !== null) {
-                            this.ciLayer.clearLayers();
-                            this.ciLayer = L.canvasIconLayer({}).addTo(this.map)
-                        } else {
-                            this.ciLayer = L.canvasIconLayer({}).addTo(this.map)
-                        }
+    async funStationPos(ids) {
+      let res = null;
+      if (ids.length > 0) {
+        res = await httpRequest.get("/base/location", {
+          params: {
+            ids: this.ids.join(","),
+          },
+        });
+      } else {
+        res = await httpRequest.get("/base/station", {
+          params: {},
+        });
+      }
+      if (res.code === 200) {
+        if (res.data && res.data.length) {
+          this.layers = [];
+          if (this.ciLayer !== null) {
+            this.ciLayer.clearLayers();
+            this.ciLayer = L.canvasIconLayer({}).addTo(this.map);
+          } else {
+            this.ciLayer = L.canvasIconLayer({}).addTo(this.map);
+          }
 
-                        let iconUrl = require(`@/assets/images/indexCom/fengji.png`)
+          let iconUrl = require(`@/assets/images/indexCom/fengji.png`);
 
-                        for (let i = 0; i < res.data.length; i++) {
-                            let item = res.data[i]
+          for (let i = 0; i < res.data.length; i++) {
+            let item = res.data[i];
 
-                            let marker = L.marker([Number(item.latitude), Number(item.longitude)], {
-                                // title: item.name,
-                                icon: L.divIcon({
-                                    // html: `<div style="position:relative;top:40px;left:5px">${item.aname}</div>`,
-                                    className: 'iconSty',
-                                    iconUrl: iconUrl,
-                                    iconSize: [30, 39],
-                                    iconAnchor: [15, 12.5]
-                                }),
-                                data: item
-                            }).bindTooltip(`
+            let marker = L.marker(
+              [Number(item.latitude), Number(item.longitude)],
+              {
+                // title: item.name,
+                icon: L.divIcon({
+                  // html: `<div style="position:relative;top:40px;left:5px">${item.aname}</div>`,
+                  className: "iconSty",
+                  iconUrl: iconUrl,
+                  iconSize: [30, 39],
+                  iconAnchor: [15, 12.5],
+                }),
+                data: item,
+              }
+            )
+              .bindTooltip(
+                `
                                 <div class="tip-box-top">
                                     <div class="item">${item.aname}</div>
                                     <div class="item">经度:${item.latitude}°</div>
                                     <div class="item">纬度:${item.longitude}°</div>
                                     <div class="item">海拔高度:${item.altitude}m</div>
-                                </div>`).addTo(this.map);
+                                </div>`
+              )
+              .addTo(this.map);
 
-                            let latlng = L.latLng(Number(item.latitude), Number(item.longitude));
-                            let c = L.circleMarker(latlng, {
-                                radius: 5,
-                                color: 'transparent',
-                                labelStyle: {
-                                    text: item.aname,
-                                    scale: 1,
-                                    rotation: 0,
-                                    offsetY: 35,
-                                    fillStyle: '#000',
-                                    zIndex: i
-                                },
-                                data: item
-                            }).addTo(this.map);
-                            this.layers.push(c)
+            let latlng = L.latLng(
+              Number(item.latitude),
+              Number(item.longitude)
+            );
+            let c = L.circleMarker(latlng, {
+              radius: 5,
+              color: "transparent",
+              labelStyle: {
+                text: item.aname,
+                scale: 1,
+                rotation: 0,
+                offsetY: 35,
+                fillStyle: "#000",
+                zIndex: i,
+              },
+              data: item,
+            }).addTo(this.map);
+            this.layers.push(c);
 
-                            this.ciLayer.addLayer(marker)
-                            this.layers.push(marker)
+            this.ciLayer.addLayer(marker);
+            this.layers.push(marker);
 
-                            let that = this
-                            marker.on('mouseover', function onmouseover(e) {
-                                console.log('map', item)
-                                that.rightObj = item
-                            })
-
-                        }
-                        let center = this.map.getCenter()
-                        this.map.panTo([center.lat, center.lng], {
-                            animate: true
-                        })
-                        this.map.setView(this.layers[0].getLatLng(), 13);
-
-                    }
-                }
-            },
+            let that = this;
+            marker.on("mouseover", function onmouseover(e) {
+              that.rightObj = item;
+            });
+          }
+          let center = this.map.getCenter();
+          this.map.panTo([center.lat, center.lng], {
+            animate: true,
+          });
+          this.map.setView(this.layers[0].getLatLng(), 13);
+        }
+      }
+    },
 
-            async funStationPosLabel(ids) {
-                if (this.layers.length > 0) {
-                    for (var i = 0; i < this.layers.length; i++) {
-                        this.map.removeLayer(this.layers[i]);
-                    }
-                    this.layers = []
-                }
-                let res = null
-                if (ids.length > 0) {
-                    res = await httpRequest.get('/base/location', {
-                        params: {
-                            ids: this.ids.join(","),
-                        },
-                    })
-                } else {
-                    res = await httpRequest.get('/base/station', {
-                        params: {},
-                    })
-                }
-                if (res.code === 200) {
-                    if (res.data && res.data.length) {
-                        this.layers = []
-                        for (let i = 0; i < res.data.length; i++) {
-                            let item = res.data[i]
+    async funStationPosLabel(ids) {
+      if (this.layers.length > 0) {
+        for (var i = 0; i < this.layers.length; i++) {
+          this.map.removeLayer(this.layers[i]);
+        }
+        this.layers = [];
+      }
+      let res = null;
+      if (ids.length > 0) {
+        res = await httpRequest.get("/base/location", {
+          params: {
+            ids: this.ids.join(","),
+          },
+        });
+      } else {
+        res = await httpRequest.get("/base/station", {
+          params: {},
+        });
+      }
+      if (res.code === 200) {
+        if (res.data && res.data.length) {
+          this.layers = [];
+          for (let i = 0; i < res.data.length; i++) {
+            let item = res.data[i];
 
-                            let latlng = L.latLng(Number(item.latitude), Number(item.longitude));
-                            let c = L.circleMarker(latlng, {
-                                radius: 5,
-                                color: '#12e799',
-                                labelStyle: {
-                                    text: item.aname,
-                                    scale: 1,
-                                    rotation: 0,
-                                    offsetY: 15,
-                                    fillStyle: '#000',
-                                    zIndex: i
-                                },
-                                data: item
-                            }).bindTooltip(`
+            let latlng = L.latLng(
+              Number(item.latitude),
+              Number(item.longitude)
+            );
+            let c = L.circleMarker(latlng, {
+              radius: 5,
+              color: "#12e799",
+              labelStyle: {
+                text: item.aname,
+                scale: 1,
+                rotation: 0,
+                offsetY: 15,
+                fillStyle: "#000",
+                zIndex: i,
+              },
+              data: item,
+            })
+              .bindTooltip(
+                `
                                 <div class="tip-box-top">
                                     <div class="item">${item.aname}</div>
                                     <div class="item">经度:${item.latitude}°</div>
                                     <div class="item">纬度:${item.longitude}°</div>
                                     <div class="item">海拔高度:${item.altitude}m</div>
-                                </div>`).addTo(this.map);
-                            this.layers.push(c)
+                                </div>`
+              )
+              .addTo(this.map);
+            this.layers.push(c);
 
-                            let that = this
-                            c.on('mouseover', function onmouseover(e) {
-                                console.log('map', item)
-                                that.rightObj = item
-                            })
+            let that = this;
+            c.on("mouseover", function onmouseover(e) {
+              console.log("map", item);
+              that.rightObj = item;
+            });
+          }
+          let center = this.map.getCenter();
+          this.map.panTo([center.lat, center.lng], {
+            animate: true,
+          });
+          this.map.setView(this.layers[0].getLatLng(), 13);
+        }
+      }
+    },
 
-                        }
-                        let center = this.map.getCenter()
-                        this.map.panTo([center.lat, center.lng], {
-                            animate: true
-                        })
-                        this.map.setView(this.layers[0].getLatLng(), 13);
-                    }
-                }
-            },
+    setAreaLayer(jsonName, isBounds) {
+      const wfAllGeoJson = require(`@/assets/${jsonName}.json`);
+      this.areaLayer = L.geoJSON(wfAllGeoJson, {
+        style: (feature) => {
+          return {
+            fillOpacity: 0.1,
+            fillColor: "rgb(27, 242, 245)",
+            weight: 2,
+            color: "rgb(27, 242, 245)",
+          };
+        },
+      });
+      this.map.addLayer(this.areaLayer);
+      if (isBounds) {
+        this.map.fitBounds(this.areaLayer.getBounds());
+      }
+    },
 
-            setAreaLayer(jsonName, isBounds) {
-                const wfAllGeoJson = require(`@/assets/${jsonName}.json`)
-                this.areaLayer = L.geoJSON(wfAllGeoJson, {
-                    style: feature => {
-                        return {
-                            fillOpacity: 0.1,
-                            fillColor: 'rgb(27, 242, 245)',
-                            weight: 2,
-                            color: 'rgb(27, 242, 245)'
-                        }
-                    }
-                })
-                this.map.addLayer(this.areaLayer)
-                if (isBounds) {
-                    this.map.fitBounds(this.areaLayer.getBounds())
-                }
-            },
-            powerLine(e) {
-                console.log('2221111', this.layers)
-                console.log('ceeeee', e)
-                if (!this.rightObj.latitude && !this.rightObj.longitude) {
-                    this.$message({
-                        message: '该坐标系下暂无功率曲线拟合',
-                        type: 'error'
-                    });
-                } else {
-                    this.layers.forEach(item => {
-                        if (item.options.data) {
-                            if (item.options.data.name.indexOf('风电场') === -1) {
-                                if (item.options.data.latitude === this.rightObj.latitude && item
-                                    .options.data
-                                    .longitude === this.rightObj.longitude) {
-                                    this.$emit('rightClick', {
-                                        menuIndex: 0,
-                                        current: this.rightObj
-                                    })
-                                }
-                            } else {
-                                if (item.options.data.name === this.rightObj.name) {
-                                    this.$message({
-                                        message: '风场暂无功率曲线拟合功能',
-                                        type: 'error'
-                                    });
-                                }
-                            }
-                        }
-                    })
-                }
-            },
-            windAny(e) {
-                if (!this.rightObj.latitude && !this.rightObj.longitude) {
-                    this.$message({
-                        message: '该坐标系下暂无对风偏差分析',
-                        type: 'error'
-                    });
-                } else {
-                    this.layers.forEach(item => {
-                        if (item.options.data) {
-                            if (item.options.data.name.indexOf('风电场') === -1) {
-                                if (item.options.data.latitude === this.rightObj.latitude && item
-                                    .options.data
-                                    .longitude === this.rightObj.longitude) {
-                                    this.$emit('rightClick', {
-                                        menuIndex: 1,
-                                        current: this.rightObj
-                                    })
-                                }
-                            } else {
-                                if (item.options.data.name === this.rightObj.name) {
-                                    this.$message({
-                                        message: '风场暂无对风偏差分析功能',
-                                        type: 'error'
-                                    });
+    powerLine(e) {
+      if (!this.rightObj.latitude && !this.rightObj.longitude) {
+        this.$message({
+          message: "该坐标系下暂无功率曲线拟合",
+          type: "error",
+        });
+      } else {
+        this.layers.forEach((item) => {
+          if (item.options.data) {
+            if (item.options.data.name.indexOf("风电场") === -1) {
+              if (
+                item.options.data.latitude === this.rightObj.latitude &&
+                item.options.data.longitude === this.rightObj.longitude
+              ) {
+                this.$emit("rightClick", {
+                  menuIndex: 0,
+                  current: this.rightObj,
+                });
+              }
+            } else {
+              if (item.options.data.name === this.rightObj.name) {
+                this.$message({
+                  message: "风场暂无功率曲线拟合功能",
+                  type: "error",
+                });
+              }
+            }
+          }
+        });
+      }
+    },
 
-                                }
-                            }
-                        }
-                    })
-                }
+    windAny(e) {
+      if (!this.rightObj.latitude && !this.rightObj.longitude) {
+        this.$message({
+          message: "该坐标系下暂无对风偏差分析",
+          type: "error",
+        });
+      } else {
+        this.layers.forEach((item) => {
+          if (item.options.data) {
+            if (item.options.data.name.indexOf("风电场") === -1) {
+              if (
+                item.options.data.latitude === this.rightObj.latitude &&
+                item.options.data.longitude === this.rightObj.longitude
+              ) {
+                this.$emit("rightClick", {
+                  menuIndex: 1,
+                  current: this.rightObj,
+                });
+              }
+            } else {
+              if (item.options.data.name === this.rightObj.name) {
+                this.$message({
+                  message: "风场暂无对风偏差分析功能",
+                  type: "error",
+                });
+              }
             }
-        }
-    };
-</script>
-<style scoped lang="less">
-    .mapCom {
-        height: 100%;
+          }
+        });
+      }
+    },
 
-        .iconLabel {
-            width: 80px !important;
-        }
+    qxAny(e) {
+      if (!this.rightObj.latitude && !this.rightObj.longitude) {
+        this.$message({
+          message: "该坐标系下暂无曲线偏差分析",
+          type: "error",
+        });
+      } else {
+        this.layers.forEach((item) => {
+          if (item.options.data) {
+            if (item.options.data.name.indexOf("风电场") === -1) {
+              if (
+                item.options.data.latitude === this.rightObj.latitude &&
+                item.options.data.longitude === this.rightObj.longitude
+              ) {
+                this.$emit("rightClick", {
+                  menuIndex: 2,
+                  current: this.rightObj,
+                });
+              }
+            } else {
+              if (item.options.data.name === this.rightObj.name) {
+                this.$message({
+                  message: "风场暂无曲线偏差分析功能",
+                  type: "error",
+                });
+              }
+            }
+          }
+        });
+      }
+    },
 
-        .iconSty {
-            .iconStyClass {
-                width: 50px;
-                height: 100px;
-                position: relative;
-                top: 40px;
+    wdyglAny(e) {
+      if (!this.rightObj.latitude && !this.rightObj.longitude) {
+        this.$message({
+          message: "该坐标系下暂无温度与功率分析",
+          type: "error",
+        });
+      } else {
+        this.layers.forEach((item) => {
+          if (item.options.data) {
+            if (item.options.data.name.indexOf("风电场") === -1) {
+              if (
+                item.options.data.latitude === this.rightObj.latitude &&
+                item.options.data.longitude === this.rightObj.longitude
+              ) {
+                this.$emit("rightClick", {
+                  menuIndex: 3,
+                  current: this.rightObj,
+                });
+              }
+            } else {
+              if (item.options.data.name === this.rightObj.name) {
+                this.$message({
+                  message: "风场暂无温度与功率分析功能",
+                  type: "error",
+                });
+              }
             }
-        }
-    }
+          }
+        });
+      }
+    },
+
+    ssdlAny(e) {
+      if (!this.rightObj.latitude && !this.rightObj.longitude) {
+        this.$message({
+          message: "该坐标系下暂无损失电量分析",
+          type: "error",
+        });
+      } else {
+        this.layers.forEach((item) => {
+          if (item.options.data) {
+            if (item.options.data.name.indexOf("风电场") === -1) {
+              if (
+                item.options.data.latitude === this.rightObj.latitude &&
+                item.options.data.longitude === this.rightObj.longitude
+              ) {
+                this.$emit("rightClick", {
+                  menuIndex: 4,
+                  current: this.rightObj,
+                });
+              }
+            } else {
+              if (item.options.data.name === this.rightObj.name) {
+                this.$message({
+                  message: "风场暂无损失电量分析功能",
+                  type: "error",
+                });
+              }
+            }
+          }
+        });
+      }
+    },
 
+    jjjAny(e) {
+      if (!this.rightObj.latitude && !this.rightObj.longitude) {
+        this.$message({
+          message: "该坐标系下暂无桨距角分析",
+          type: "error",
+        });
+      } else {
+        this.layers.forEach((item) => {
+          if (item.options.data) {
+            if (item.options.data.name.indexOf("风电场") === -1) {
+              if (
+                item.options.data.latitude === this.rightObj.latitude &&
+                item.options.data.longitude === this.rightObj.longitude
+              ) {
+                this.$emit("rightClick", {
+                  menuIndex: 5,
+                  current: this.rightObj,
+                });
+              }
+            } else {
+              if (item.options.data.name === this.rightObj.name) {
+                this.$message({
+                  message: "风场暂无桨距角分析功能",
+                  type: "error",
+                });
+              }
+            }
+          }
+        });
+      }
+    },
+  },
+};
+</script>
+<style scoped lang="less">
+.mapCom {
+  height: 100%;
 
+  .iconLabel {
+    width: 80px !important;
+  }
 
-    #map {
-        width: 100%;
-        height: 100%;
+  .iconSty {
+    .iconStyClass {
+      width: 50px;
+      height: 100px;
+      position: relative;
+      top: 40px;
     }
+  }
+}
 
+#map {
+  width: 100%;
+  height: 100%;
+}
 
+.lmap-image {
+  width: 32px;
+  height: 32px;
+}
 
-    .lmap-image {
-        width: 32px;
-        height: 32px;
-    }
+.lmap-span {
+  display: inline-block;
+  margin-left: 5px;
+  padding: 5px;
+  font-weight: bold;
+  line-height: 20px;
+  font-size: 14px;
+  color: #fff;
+  white-space: nowrap;
+}
 
-    .lmap-span {
-        display: inline-block;
-        margin-left: 5px;
-        padding: 5px;
-        font-weight: bold;
-        line-height: 20px;
-        font-size: 14px;
-        color: #fff;
-        white-space: nowrap;
-    }
-
-    .lmap-text {
-        display: inline-block;
-        margin-left: 5px;
-        padding: 5px;
-        font-weight: bold;
-        line-height: 20px;
-        font-size: 16px;
-        color: #fff;
-        width: 500px;
-        white-space: nowrap;
-        position: absolute;
-        text-align: center;
-        top: 25px;
-        left: -250px;
-    }
+.lmap-text {
+  display: inline-block;
+  margin-left: 5px;
+  padding: 5px;
+  font-weight: bold;
+  line-height: 20px;
+  font-size: 16px;
+  color: #fff;
+  width: 500px;
+  white-space: nowrap;
+  position: absolute;
+  text-align: center;
+  top: 25px;
+  left: -250px;
+}
 </style>

File diff suppressed because it is too large
+ 2013 - 1328
src/views/generatingCapacity/dataAnalysis/posAnalysis/index.vue


+ 186 - 176
src/views/generatingCapacity/dataAnalysis/rateAnalysis/components/chart.vue

@@ -1,186 +1,196 @@
+<template>
+  <div
+    :id="chartId"
+    :style="{ height: props.height, width: props.width }"
+  ></div>
+</template>
+  
 <script setup>
-    import util from "@tools/util";
-    import chartTheme from './../rateAnalysis.json'
-    import {
-        ref,
-        toRaw,
-        computed,
-        onMounted,
-        watch,
-        nextTick
-    } from 'vue';
-    import {
-        useStore
-    } from 'vuex';
-    import * as echarts from 'echarts'
-    const chartId = 'chart-' + util.newGUID(); //chartId
-    const chartIns = ref(null) //chart 实例
-    const props = defineProps({
-        xAxis: {
-            type: Object,
-            required: true,
-            default: () => ({})
-        },
-        series: {
-            type: Array,
-            required: true
-        },
-        height: {
-            type: String,
-            required: false,
-            default: '500px'
-        },
-        width: {
-            type: String,
-            required: false,
-            default: '500px'
-        },
-        title: {
-            type: String,
-            required: false
-        },
-        subtext: {
-            type: String,
-            required: false
-        },
-        // 是否为dialog中单表
-        isDiaAlone: {
-            type: Boolean,
-            default: false
-        },
-        // 是否含雷达图
-        isRadar: {
-            type: Boolean,
-            default: false
-        },
-        theme: {
-            type: Boolean,
-            default: false
+import util from "@tools/util";
+import chartTheme from "./../rateAnalysis.json";
+import { ref, toRaw, computed, onMounted, watch, nextTick } from "vue";
+import { useStore } from "vuex";
+import * as echarts from "echarts";
+const chartId = "chart-" + util.newGUID(); //chartId
+const chartIns = ref(null); //chart 实例
+const props = defineProps({
+  xAxis: {
+    type: Object,
+    required: true,
+    default: () => ({}),
+  },
+  series: {
+    type: Array,
+    required: true,
+  },
+  height: {
+    type: String,
+    required: false,
+    default: "500px",
+  },
+  width: {
+    type: String,
+    required: false,
+    default: "500px",
+  },
+  title: {
+    type: String,
+    required: false,
+  },
+  subtext: {
+    type: String,
+    required: false,
+  },
+  // 是否为dialog中单表
+  isDiaAlone: {
+    type: Boolean,
+    default: false,
+  },
+  // 是否含雷达图
+  isRadar: {
+    type: Boolean,
+    default: false,
+  },
+  theme: {
+    type: Boolean,
+    default: false,
+  },
+  echartsTheme: {
+    type: String,
+    default: "",
+  },
+});
+
+/**定义option */
+const option = computed({
+  get() {
+    let radar = null;
+    if (props.isRadar && props.xAxis.data.length) {
+      radar = {
+        radius: "70%",
+        center: ["60%", "50%"],
+        indicator: props.xAxis.data.map((o) => {
+          return {
+            text: "",
+            max: 1000,
+          };
+        }),
+        splitArea: {
+          show: false,
         },
-        echartsTheme: {
-            type: String,
-            default: ''
+        splitLine: {
+          show: false,
         },
-    })
-
-    /**定义option */
-    const option = computed({
-        get() {
-            let radar = null
-            if (props.isRadar && props.xAxis.data.length) {
-                radar = {
-                    radius: '70%',
-                    center: ['60%', '50%'],
-                    indicator: props.xAxis.data.map(o => {
-                        return {
-                            text: '',
-                            max: 1000
-                        }
-                    }),
-                    splitArea: {
-                        show: false
-                    },
-                    splitLine: {
-                        show: false
-                    }
-                }
-            }
-            return {
-                backgroundColor: '',
-                title: {
-                    text: props.title || '',
-                    subtext: props.subtext || '',
-                    top: 10,
-                    left: props.isDiaAlone ? '22%' : '5%',
-                },
-                angleAxis: props.xAxis || {},
-                radiusAxis: {},
-                polar: {
-                    radius: '70%',
-                    center: props.subtext !== '风速风向玫瑰图' ? ['60%', '50%'] : ['50%', '50%']
-                },
-                radar: radar,
-                tooltip: {
-                    formatter: (params) => {
-                        return params.componentSubType === 'radar' ?
-                            `${params.marker}${params.seriesName}` :
-                            props.subtext !== '风速风向玫瑰图' ?
-                            `${params.marker}${params.seriesName}m<br/>${params.value>1? '频次:'+ params.value: ''}` :
-                            `${params.marker}${params.seriesName}<br/>${'最大风速:'+ params.value}m/s`
-                    },
-                    confine: true
-                },
-                series: props.series || [],
-                legend: {
-                    show: true,
-                    orient: 'vertical',
-                    left: props.isDiaAlone ? '22%' : '5%',
-                    itemWidth: 16,
-                    itemHeight: 10,
-                    textStyle: {
-                        fontSize: util.vh(10)
-                    },
-                    top: 'middle',
-                    // data: ['0-2.5', '2.5-5', '5-7.5', '7.5-10', '10-12.5', '12.5-15', '15-17.5', '17.5-20',
-                    //     '20-22.5', '22.5-25', '25-inf'
-                    // ]
-                    data: ['0-3', '3-5', '5-10', '10-12', '12-25', '25-inf']
-                }
-            }
+      };
+    }
+    return {
+      backgroundColor: "",
+      title: {
+        text: props.title || "",
+        subtext: props.subtext || "",
+        top: 10,
+        left: props.isDiaAlone ? "22%" : "5%",
+      },
+      angleAxis: props.xAxis || {},
+      radiusAxis: {},
+      polar: {
+        radius: "70%",
+        center:
+          props.subtext !== "风速风向玫瑰图" ? ["60%", "50%"] : ["50%", "50%"],
+      },
+      radar: radar,
+      tooltip: {
+        formatter: (params) => {
+          return params.componentSubType === "radar"
+            ? `${params.marker}${params.seriesName}`
+            : props.subtext !== "风速风向玫瑰图"
+            ? `${params.marker}${params.seriesName}m<br/>${
+                params.value > 1 ? "频次:" + params.value : ""
+              }`
+            : `${params.marker}${params.seriesName}<br/>${
+                "最大风速:" + params.value
+              }m/s`;
         },
-        set(val) {}
-    })
-    watch(() => option, (newVal, oldVal) => {
-        if (chartIns.value) {
-            const echartIns = toRaw(chartIns.value)
-            echartIns.setOption(newVal.value)
-        }
-    }, {
-        deep: true
-    })
-
-    watch([() => props.width, () => props.height], (newVal, oldVal) => {
-        if (chartIns.value) {
-            const echartIns = toRaw(chartIns.value)
-            nextTick(() => echartIns.resize())
-        }
-    })
-    const store = useStore()
-    const collapse = computed({
-        get() {
-            return store.state.collapse
+        confine: true,
+      },
+      series: props.series || [],
+      legend: {
+        show: true,
+        orient: "vertical",
+        left: props.isDiaAlone ? "22%" : "5%",
+        itemWidth: 16,
+        itemHeight: 10,
+        textStyle: {
+          fontSize: util.vh(10),
         },
-        set(val) {}
-    })
-    watch(collapse, (val) => {
-        if (chartIns.value) {
-            setTimeout(() => {
-                chartIns.value.resize()
-            }, 300)
-        }
-    })
+        top: "middle",
+        // data: ['0-2.5', '2.5-5', '5-7.5', '7.5-10', '10-12.5', '12.5-15', '15-17.5', '17.5-20',
+        //     '20-22.5', '22.5-25', '25-inf'
+        // ]
+        data: ["0-3", "3-5", "5-10", "10-12", "12-25", "25-inf"],
+      },
+    };
+  },
+  set(val) {},
+});
+watch(
+  () => option,
+  (newVal, oldVal) => {
+    if (chartIns.value) {
+      const echartIns = toRaw(chartIns.value);
+      echartIns.setOption(newVal.value);
+    }
+  },
+  {
+    deep: true,
+  }
+);
 
+watch([() => props.width, () => props.height], (newVal, oldVal) => {
+  if (chartIns.value) {
+    const echartIns = toRaw(chartIns.value);
+    nextTick(() => echartIns.resize());
+  }
+});
+const store = useStore();
+const collapse = computed({
+  get() {
+    return store.state.collapse;
+  },
+  set(val) {},
+});
+watch(collapse, (val) => {
+  if (chartIns.value) {
+    setTimeout(() => {
+      chartIns.value.resize();
+    }, 300);
+  }
+});
 
-    onMounted(() => {
-        nextTick(() => {
-            init()
-        })
-    })
+onMounted(() => {
+  nextTick(() => {
+    init();
+  });
+});
 
-    watch(() => props.echartsTheme, (newVal, oldVal) => init())
+watch(
+  () => props.echartsTheme,
+  (newVal, oldVal) => init()
+);
 
-    const init = () => {
-        echarts.registerTheme('chartTheme', chartTheme)
-        const echartIns = echarts.init(document.getElementById(chartId), props.echartsTheme)
-        document.getElementById(chartId).removeAttribute("_echarts_instance_") ? document.getElementById(chartId)
-            .removeAttribute("_echarts_instance_") : ''
-        chartIns.value = echartIns
-        echartIns.setOption(option.value)
-        window.addEventListener('resize', () => {
-            echartIns.resize()
-        })
-    }
+const init = () => {
+  echarts.registerTheme("chartTheme", chartTheme);
+  const echartIns = echarts.init(
+    document.getElementById(chartId),
+    props.echartsTheme
+  );
+  document.getElementById(chartId).removeAttribute("_echarts_instance_")
+    ? document.getElementById(chartId).removeAttribute("_echarts_instance_")
+    : "";
+  chartIns.value = echartIns;
+  echartIns.setOption(option.value);
+  window.addEventListener("resize", () => {
+    echartIns.resize();
+  });
+};
 </script>
-<template>
-    <div :id="chartId" :style="{ height: props.height, width: props.width }"></div>
-</template>

File diff suppressed because it is too large
+ 46416 - 0
src/views/generatingCapacity/dataAnalysis/rateAnalysis/components/data.json


+ 222 - 215
src/views/generatingCapacity/dataAnalysis/rateAnalysis/components/lineChart.vue

@@ -1,227 +1,234 @@
 <script setup>
-    import util from "@tools/util";
-    import chartTheme from './../rateAnalysis.json'
-    import {
-        ref,
-        toRaw,
-        computed,
-        onMounted,
-        watch,
-        nextTick
-    } from 'vue';
-    import {
-        useStore
-    } from 'vuex'
-    import * as echarts from 'echarts'
-    const chartId = 'chart-' + util.newGUID(); //chartId
-    const chartIns = ref(null) //chart 实例
-    const emits = defineEmits(['getSelected'])
-    const props = defineProps({
-        xAxis: {
-            type: Object,
-            required: true,
-            default: () => ({})
-        },
-        yAxis: {
-            type: Array,
-            required: false
-        },
-        series: {
-            type: Array,
-            required: true
-        },
-        dataset: {
-            type: Array,
-            required: false,
-            default: () => ([])
-        },
-        height: {
-            type: String,
-            required: false,
-            default: '500px'
-        },
-        width: {
-            type: String,
-            required: false,
-            default: '500px'
-        },
-        title: {
-            type: String,
-            required: false
-        },
-        subtext: {
-            type: String,
-            required: false
-        },
-        brush: {
-            type: Boolean,
-            required: false,
-            default: false
-        },
-        theme: {
-            type: Boolean,
-            default: false
+import util from "@tools/util";
+import chartTheme from "./../rateAnalysis.json";
+import { ref, toRaw, computed, onMounted, watch, nextTick } from "vue";
+import { useStore } from "vuex";
+import * as echarts from "echarts";
+const chartId = "chart-" + util.newGUID(); //chartId
+const chartIns = ref(null); //chart 实例
+const emits = defineEmits(["getSelected"]);
+const props = defineProps({
+  xAxis: {
+    type: Object,
+    required: true,
+    default: () => ({}),
+  },
+  yAxis: {
+    type: Array,
+    required: false,
+  },
+  series: {
+    type: Array,
+    required: true,
+  },
+  dataset: {
+    type: Array,
+    required: false,
+    default: () => [],
+  },
+  height: {
+    type: String,
+    required: false,
+    default: "500px",
+  },
+  width: {
+    type: String,
+    required: false,
+    default: "500px",
+  },
+  title: {
+    type: String,
+    required: false,
+  },
+  subtext: {
+    type: String,
+    required: false,
+  },
+  brush: {
+    type: Boolean,
+    required: false,
+    default: false,
+  },
+  theme: {
+    type: Boolean,
+    default: false,
+  },
+  echartsTheme: {
+    type: String,
+    default: "",
+  },
+});
+
+/**定义option */
+const option = computed({
+  get() {
+    console.log(props.subtext, props.series);
+    return {
+      backgroundColor: "",
+      color: [
+        "#FF8700",
+        "#0098d980",
+        "#626c91",
+        "#a0a7e6",
+        "#c4ebad",
+        "#96dee8",
+      ],
+      title: {
+        text: props.title || "",
+        subtext: props.subtext || "",
+        top: 6,
+        left: "5%",
+      },
+      xAxis: props.xAxis || {},
+      yAxis: props.yAxis || {},
+      brush: {
+        seriesIndex: [1],
+        yAxisIndex: 0,
+        transformable: true,
+        throttleType: "debounce",
+        throttleDelay: 1000,
+        removeOnClick: true,
+        brushType: props.brush ? "polygon" : false,
+        brushMode: "multiple",
+        brushStyle: {
+          borderWidth: 1,
+          borderColor: "#ff2424",
         },
-        echartsTheme: {
-            type: String,
-            default: ''
+      },
+      toolbox: {
+        show: props.brush,
+      },
+      tooltip: {
+        confine: true,
+        axisPointer: {
+          type: "cross",
         },
-    })
-
-    /**定义option */
-    const option = computed({
-        get() {
-            return {
-                backgroundColor: '',
-                color: [
-                    "#FF8700",
-                    "#0098d980",
-                    "#626c91",
-                    "#a0a7e6",
-                    "#c4ebad",
-                    "#96dee8"
-                ],
-                title: {
-                    text: props.title || '',
-                    subtext: props.subtext || '',
-                    top: 6,
-                    left: '5%',
-                },
-                xAxis: props.xAxis || {},
-                yAxis: props.yAxis || {},
-                brush: {
-                    seriesIndex: [1],
-                    yAxisIndex: 0,
-                    transformable: true,
-                    throttleType: "debounce",
-                    throttleDelay: 1000,
-                    removeOnClick: true,
-                    brushType: props.brush ? "polygon" : false,
-                    brushMode: "multiple",
-                    brushStyle: {
-                        borderWidth: 1,
-                        borderColor: "#ff2424",
-                    },
-                },
-                toolbox: {
-                    show: props.brush,
-                },
-                tooltip: {
-                    confine: true,
-                    axisPointer: {
-                        type: "cross",
-                    },
-                },
-                dataset: props.dataset || [],
-                series: props.series || [],
-                legend: {
-                    right: "120",
-                    top: "5",
-                    itemWidth: 6,
-                },
-                grid: {
-                    top: 80,
-                    left: 40,
-                    right: 40,
-                    bottom: 40,
-                },
-                dataZoom: [{
-                        type: "inside", //图表下方的伸缩条
-                        show: false, //是否显示
-                        realtime: true, //拖动时,是否实时更新系列的视图
-                        start: 0, //伸缩条开始位置(1-100),可以随时更改
-                        end: 100, //伸缩条结束位置(1-100),可以随时更改
-                    },
-                    {
-                        type: "slider", //图表下方的伸缩条
-                        show: false, //是否显示
-                        realtime: true, //拖动时,是否实时更新系列的视图
-                        start: 0, //伸缩条开始位置(1-100),可以随时更改
-                        end: 100, //伸缩条结束位置(1-100),可以随时更改
-                    },
-                ],
-            }
+      },
+      dataset: props.dataset || [],
+      series: props.series || [],
+      legend: {
+        right: "120",
+        top: "5",
+        itemWidth: 6,
+      },
+      grid: {
+        top: 80,
+        left: 40,
+        right: 40,
+        bottom: 40,
+      },
+      dataZoom: [
+        {
+          type: "inside", //图表下方的伸缩条
+          show: false, //是否显示
+          realtime: true, //拖动时,是否实时更新系列的视图
+          start: 0, //伸缩条开始位置(1-100),可以随时更改
+          end: 100, //伸缩条结束位置(1-100),可以随时更改
         },
-        set(val) {}
-    })
-    watch(() => option, (newVal, oldVal) => {
-        if (chartIns.value) {
-            const echartIns = toRaw(chartIns.value)
-            echartIns.setOption(toRaw(newVal.value))
-        }
-    }, {
-        deep: true
-    })
-    watch([() => props.width, () => props.height], (newVal, oldVal) => {
-        if (chartIns.value) {
-            const echartIns = toRaw(chartIns.value)
-            nextTick(() => echartIns.resize())
-        }
-    })
-    const store = useStore()
-    const collapse = computed({
-        get() {
-            return store.state.collapse
+        {
+          type: "slider", //图表下方的伸缩条
+          show: false, //是否显示
+          realtime: true, //拖动时,是否实时更新系列的视图
+          start: 0, //伸缩条开始位置(1-100),可以随时更改
+          end: 100, //伸缩条结束位置(1-100),可以随时更改
         },
-        set(val) {}
-    })
-    watch(collapse, (val) => {
-        if (chartIns.value) {
-            setTimeout(() => {
-                chartIns.value.resize()
-            }, 300)
-        }
-    })
-    const funBrushChange = (flag) => {
-        const echartIns = toRaw(chartIns.value)
-        echartIns.dispatchAction({
-            type: "takeGlobalCursor",
-            // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
-            key: "brush",
-            brushOption: {
-                seriesIndex: [1],
-                yAxisIndex: 0,
-                transformable: true,
-                throttleType: "debounce",
-                throttleDelay: 1000,
-                removeOnClick: true,
-                brushType: flag ? "polygon" : false,
-                brushMode: "multiple",
-                brushStyle: {
-                    borderWidth: 1,
-                    color: "rgba(255,36,36,0.2)",
-                    borderColor: "#ff2424",
-                },
-            },
-        });
-        echartIns.off("brushSelected");
-        echartIns.on("brushSelected", (params) => {
-            emits("getSelected", params.batch || []);
-        });
+      ],
+    };
+  },
+  set(val) {},
+});
+watch(
+  () => option,
+  (newVal, oldVal) => {
+    if (chartIns.value) {
+      const echartIns = toRaw(chartIns.value);
+      echartIns.setOption(toRaw(newVal.value));
     }
-    watch(() => props.brush, (newVal, oldVal) => funBrushChange(newVal))
+  },
+  {
+    deep: true,
+  }
+);
+watch([() => props.width, () => props.height], (newVal, oldVal) => {
+  if (chartIns.value) {
+    const echartIns = toRaw(chartIns.value);
+    nextTick(() => echartIns.resize());
+  }
+});
+const store = useStore();
+const collapse = computed({
+  get() {
+    return store.state.collapse;
+  },
+  set(val) {},
+});
+watch(collapse, (val) => {
+  if (chartIns.value) {
+    setTimeout(() => {
+      chartIns.value.resize();
+    }, 300);
+  }
+});
+const funBrushChange = (flag) => {
+  const echartIns = toRaw(chartIns.value);
+  echartIns.dispatchAction({
+    type: "takeGlobalCursor",
+    // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
+    key: "brush",
+    brushOption: {
+      seriesIndex: [1],
+      yAxisIndex: 0,
+      transformable: true,
+      throttleType: "debounce",
+      throttleDelay: 1000,
+      removeOnClick: true,
+      brushType: flag ? "polygon" : false,
+      brushMode: "multiple",
+      brushStyle: {
+        borderWidth: 1,
+        color: "rgba(255,36,36,0.2)",
+        borderColor: "#ff2424",
+      },
+    },
+  });
+  echartIns.off("brushSelected");
+  echartIns.on("brushSelected", (params) => {
+    emits("getSelected", params.batch || []);
+  });
+};
+watch(
+  () => props.brush,
+  (newVal, oldVal) => funBrushChange(newVal)
+);
 
-    onMounted(() => {
-        nextTick(() => {
-            init()
-        })
-    })
+onMounted(() => {
+  nextTick(() => {
+    init();
+  });
+});
 
-    watch(() => props.echartsTheme, (newVal, oldVal) => init())
+watch(
+  () => props.echartsTheme,
+  (newVal, oldVal) => init()
+);
 
-    const init = () => {
-        echarts.registerTheme('chartTheme', chartTheme)
-        const echartIns = echarts.init(document.getElementById(chartId), props.echartsTheme)
-        document.getElementById(chartId).removeAttribute("_echarts_instance_") ? document.getElementById(chartId)
-            .removeAttribute("_echarts_instance_") : ''
-        chartIns.value = echartIns
-        echartIns.setOption(option.value)
-        funBrushChange(props.brush)
-        window.addEventListener('resize', () => {
-            echartIns.resize()
-        })
-    }
+const init = () => {
+  echarts.registerTheme("chartTheme", chartTheme);
+  const echartIns = echarts.init(
+    document.getElementById(chartId),
+    props.echartsTheme
+  );
+  document.getElementById(chartId).removeAttribute("_echarts_instance_")
+    ? document.getElementById(chartId).removeAttribute("_echarts_instance_")
+    : "";
+  chartIns.value = echartIns;
+  echartIns.setOption(option.value);
+  funBrushChange(props.brush);
+  window.addEventListener("resize", () => {
+    echartIns.resize();
+  });
+};
 </script>
 <template>
-    <div :id="chartId" :style="{ height: '100%', width: props.width }"></div>
+  <div :id="chartId" :style="{ height: '100%', width: props.width }"></div>
 </template>

+ 226 - 27
src/views/generatingCapacity/dataAnalysis/rateAnalysis/index.vue

@@ -58,7 +58,6 @@
                   <ZoomIn />
                 </el-icon>
                 <chart-cop
-                  class=""
                   height="100%"
                   width="100%"
                   :xAxis="item.xAxis"
@@ -275,6 +274,7 @@ import {
 import { useStore } from "vuex";
 import httpRequest from "@/utils/request.js";
 import tools from "@tools/htmlToPdf.js";
+import jsonData from "./components/data.json";
 // import flowerRes from '@/data/flower.json'
 // import lineChartRes from '@/data/lineNew.json'
 /**配置参数 */
@@ -494,7 +494,7 @@ const funSubmit = async () => {
           xAxis: {
             type: "category",
             boundaryGap: false,
-            data: ["N", "N-E", "E", "S-E", "S", "S-W", "W", "W-N"],
+            data: ["北", "东北", "东", "东南", "南", "西南", "西", "西北"],
             splitLine: {
               show: true,
             },
@@ -530,21 +530,21 @@ const funSubmit = async () => {
             type: "category",
             boundaryGap: false,
             data: [
-              "N",
+              "",
               "",
-              "N-E",
+              "东北",
               "",
-              "E",
+              "",
               "",
-              "S-E",
+              "东南",
               "",
-              "S",
+              "",
               "",
-              "S-W",
+              "西南",
               "",
-              "W",
+              "西",
               "",
-              "W-N",
+              "西北",
               "",
             ],
             splitLine: {
@@ -904,21 +904,21 @@ const funDiaSubmit = async () => {
                 type: "category",
                 boundaryGap: false,
                 data: [
-                  "N",
+                  "",
                   "",
-                  "N-E",
+                  "东北",
                   "",
-                  "E",
+                  "",
                   "",
-                  "S-E",
+                  "东南",
                   "",
-                  "S",
+                  "",
                   "",
-                  "S-W",
+                  "西南",
                   "",
-                  "W",
+                  "西",
                   "",
-                  "W-N",
+                  "西北",
                   "",
                 ],
                 splitLine: {
@@ -959,21 +959,21 @@ const funDiaSubmit = async () => {
                 type: "category",
                 boundaryGap: false,
                 data: [
-                  "N",
+                  "",
                   "",
-                  "N-E",
+                  "东北",
                   "",
-                  "E",
+                  "",
                   "",
-                  "S-E",
+                  "东南",
                   "",
-                  "S",
+                  "",
                   "",
-                  "S-W",
+                  "西南",
                   "",
-                  "W",
+                  "西",
                   "",
-                  "W-N",
+                  "西北",
                   "",
                 ],
                 splitLine: {
@@ -1041,11 +1041,12 @@ const funDiaSubmit = async () => {
                   smooth: true, //这个是把线变成曲线
                   data: chart.count,
                   yAxisIndex: 1,
+                  large: true,
                 },
                 {
                   type: "effectScatter",
                   showEffectOn: "emphasis",
-
+                  large: true,
                   rippleEffect: {
                     scale: 1,
                   },
@@ -1089,6 +1090,7 @@ const funDiaSubmit = async () => {
                       color: "#F72C5B",
                       width: "3",
                     },
+                    large: true,
                     data: [
                       {
                         name: `平均偏航:${chart.frequency.avg}度`,
@@ -1151,8 +1153,205 @@ watch(
     deep: true,
   }
 );
+
+const initPageData = () => {
+  actTreeNode.value = null;
+  excelList.value = [];
+  treeData.value = funRepeatMap(JSON.parse(JSON.stringify(jsonData.treeData)));
+  if (actTreeNode.value) {
+    if (actTreeNode.value.childs) {
+      excelList.value = actTreeNode.value.childs.map((o) => {
+        return {
+          id: o.id,
+          interval: o.interval,
+          path: o.path,
+          prepareid: o.prepareid,
+          station: o.station,
+          time: o.time,
+          type: o.type,
+          windturbine: o.windturbine,
+          isCheck: false,
+          name: o.path.substring(
+            o.path.indexOf(o.station + "_") + (o.station + "_").length
+          ),
+        };
+      });
+    } else {
+      excelList.value = [];
+    }
+
+    const obj = {
+      id: actTreeNode.value.childs[0].id,
+    };
+
+    excelCheckIds.value = [obj.id]; //当为单选展示风机图表时
+    chartExcelList.value = excelList.value.map((o) => {
+      return {
+        ...o,
+        name: o.windturbine,
+      };
+    }); // 选中excel当前项时, excel列表赋值给dialog 下拉框
+    queryForm.checkIds = excelList.value.map((o) => o.id);
+    checkAll.value = true;
+
+    chartData.value = [];
+    for (const chart of jsonData.rosesData) {
+      chartData.value.push({
+        id: chartId,
+        title: "",
+        subtext: "风速风向玫瑰图",
+        xAxis: {
+          type: "category",
+          boundaryGap: false,
+          data: ["北", "东北", "东", "东南", "南", "西南", "西", "西北"],
+          splitLine: {
+            show: true,
+          },
+        },
+        isRadar: false,
+        series:
+          // chart.roses.length ? chart.roses.map((o, index) => {
+          //     return {
+          //         type: 'bar',
+          //         data: o,
+          //         coordinateSystem: 'polar',
+          //         name: funText(index),
+          //         stack: 'a',
+          //         emphasis: {
+          //             focus: 'series'
+          //         }
+          //     }
+          // }) :
+          {
+            type: "bar",
+            data: chart.roses,
+            coordinateSystem: "polar",
+            name: "方位风速",
+          },
+      });
+      chartId++;
+      chartData.value.push({
+        id: chartId,
+        title: "",
+        subtext: "风速风向频次玫瑰图",
+        isRadar: true,
+        xAxis: {
+          type: "category",
+          boundaryGap: false,
+          data: [
+            "北",
+            "",
+            "东北",
+            "",
+            "东",
+            "",
+            "东南",
+            "",
+            "南",
+            "",
+            "西南",
+            "",
+            "西",
+            "",
+            "西北",
+            "",
+          ],
+          splitLine: {
+            show: true,
+          },
+        },
+        series: chart.count.length
+          ? [
+              ...chart.count.map((o, index) => {
+                return {
+                  type: "bar",
+                  data: o,
+                  coordinateSystem: "polar",
+                  name: funText(index),
+                  stack: "a",
+                  emphasis: {
+                    focus: "series",
+                  },
+                };
+              }),
+              {
+                type: "radar",
+                // coordinateSystem: 'polar',
+                tooltip: {
+                  trigger: "item",
+                },
+                // smooth: true,
+                // areaStyle: {},
+                name: "对风",
+                data: [
+                  {
+                    value: chart.radar,
+                  },
+                ],
+              },
+            ]
+          : [],
+      });
+      chartId++;
+      scatterSeries.value[0].data = chart.frequency.data.length
+        ? chart.frequency.data.map((item) => {
+            return [item[1] + "", item[0] + "", (item[2] * 15).toFixed(1)];
+          })
+        : [];
+      scatterSeries.value[0].markLine.data = [
+        {
+          xAxis: `${chart.frequency.avg}`,
+          name: `平均偏航:${chart.frequency.avg}度`,
+        },
+      ];
+    }
+    lineDataSet.value[0].source = jsonData.ratioData[0].scatter.map((o) => {
+      return [o.x + "", o.y];
+    });
+    lineSeries.value = [
+      {
+        name: "对风频次",
+        type: "line",
+        symbol: "line", //设定为实心点
+        symbolSize: 0, //设定实心点的大小
+        smooth: true, //这个是把线变成曲线
+        data: jsonData.ratioData[0].count,
+        yAxisIndex: 1,
+      },
+      {
+        type: "effectScatter",
+        showEffectOn: "emphasis",
+
+        rippleEffect: {
+          scale: 1,
+        },
+        legendHoverLink: false,
+        name: "数据散点",
+        symbolSize: 5,
+        datasetIndex: 0,
+        encode: {
+          x: "x",
+          y: "y",
+        },
+        yAxisIndex: 0,
+      },
+    ];
+
+    tableColumn.value = jsonData.tableData.title.map((o) => {
+      return {
+        prop: o.key,
+        label: o.des,
+        width: o.des === "时间" ? 100 : 80,
+      };
+    });
+    tableData.value = jsonData.tableData.data;
+
+    currentNodeKey.value = actTreeNode.value?.id || "";
+  }
+};
 /**activated */
 onMounted(() => {
+  initPageData();
   funGetTree();
   //test
   // funSubmit()

+ 224 - 215
src/views/generatingCapacity/dataAnalysis/spaceAnalysis/components/barChart.vue

@@ -1,226 +1,235 @@
 <script setup>
-    import util from "@tools/util";
-    import chartTheme from './barChart.json'
-    import {
-        ref,
-        toRaw,
-        computed,
-        onMounted,
-        watch,
-        nextTick
-    } from 'vue';
-    import {
-        useStore
-    } from 'vuex'
-    import * as echarts from 'echarts'
-    const chartId = 'chart-' + util.newGUID(); //chartId
-    const chartIns = ref(null) //chart 实例
-    const emits = defineEmits(['getSelected'])
-    const props = defineProps({
-        xAxis: {
-            type: Object,
-            required: true,
-            default: () => ({})
-        },
-        yAxis: {
-            type: Array,
-            required: false
-        },
-        series: {
-            type: Array,
-            required: true
-        },
-        dataset: {
-            type: Array,
-            required: false,
-            default: () => ([])
-        },
-        height: {
-            type: String,
-            required: false,
-            default: '500px'
-        },
-        width: {
-            type: String,
-            required: false,
-            default: '500px'
-        },
-        title: {
-            type: String,
-            required: false
-        },
-        subtext: {
-            type: String,
-            required: false
-        },
-        brush: {
-            type: Boolean,
-            required: false,
-            default: false
-        },
-        theme: {
-            type: Boolean,
-            default: false,
-        },
-        echartsTheme: {
-            type: String,
-            default: '',
-        },
-    })
+import util from "@tools/util";
+import chartTheme from "./barChart.json";
+import { ref, toRaw, computed, onMounted, watch, nextTick } from "vue";
+import { useStore } from "vuex";
+import * as echarts from "echarts";
+const chartId = "chart-" + util.newGUID(); //chartId
+const chartIns = ref(null); //chart 实例
+const emits = defineEmits(["getSelected"]);
+const props = defineProps({
+  xAxis: {
+    type: Object,
+    required: true,
+    default: () => ({}),
+  },
+  yAxis: {
+    type: Array,
+    required: false,
+  },
+  series: {
+    type: Array,
+    required: true,
+  },
+  dataset: {
+    type: Array,
+    required: false,
+    default: () => [],
+  },
+  height: {
+    type: String,
+    required: false,
+    default: "500px",
+  },
+  width: {
+    type: String,
+    required: false,
+    default: "500px",
+  },
+  title: {
+    type: String,
+    required: false,
+  },
+  subtext: {
+    type: String,
+    required: false,
+  },
+  brush: {
+    type: Boolean,
+    required: false,
+    default: false,
+  },
+  theme: {
+    type: Boolean,
+    default: false,
+  },
+  echartsTheme: {
+    type: String,
+    default: "",
+  },
+});
 
-    /**定义option */
-    const option = computed({
-        get() {
-            return {
-                backgroundColor: '',
-                color: [
-                    "rgb(50,93,171)",
-                    "#0098d980",
-                    "#626c91",
-                    "#a0a7e6",
-                    "#c4ebad",
-                    "#96dee8"
-                ],
-                title: {
-                    text: props.title || '',
-                    subtext: props.subtext || '',
-                    top: -6,
-                    right: 360,
-                },
-                xAxis: props.xAxis || {},
-                yAxis: props.yAxis || {},
-                brush: {
-                    seriesIndex: [1],
-                    yAxisIndex: 0,
-                    transformable: true,
-                    throttleType: "debounce",
-                    throttleDelay: 1000,
-                    removeOnClick: true,
-                    brushType: props.brush ? "polygon" : false,
-                    brushMode: "multiple",
-                    brushStyle: {
-                        borderWidth: 1,
-                        borderColor: "#ff2424",
-                    },
-                },
-                toolbox: {
-                    show: props.brush,
-                },
-                tooltip: {
-                    confine: true,
-                    trigger: "axis",
-                },
-                dataset: props.dataset || [],
-                series: props.series || [],
-                legend: {
-                    right: "120",
-                    top: "5",
-                    itemWidth: 6,
-                },
-                grid: {
-                    top: 80,
-                    left: 40,
-                    right: 40,
-                    bottom: 40,
-                },
-                dataZoom: [{
-                        type: "inside", //图表下方的伸缩条
-                        show: false, //是否显示
-                        realtime: true, //拖动时,是否实时更新系列的视图
-                        start: 0, //伸缩条开始位置(1-100),可以随时更改
-                        end: 100, //伸缩条结束位置(1-100),可以随时更改
-                    },
-                    {
-                        type: "slider", //图表下方的伸缩条
-                        show: false, //是否显示
-                        realtime: true, //拖动时,是否实时更新系列的视图
-                        start: 0, //伸缩条开始位置(1-100),可以随时更改
-                        end: 100, //伸缩条结束位置(1-100),可以随时更改
-                    },
-                ],
-            }
+/**定义option */
+const option = computed({
+  get() {
+    return {
+      backgroundColor: "",
+      color: [
+        "rgb(50,93,171)",
+        "#0098d980",
+        "#626c91",
+        "#a0a7e6",
+        "#c4ebad",
+        "#96dee8",
+      ],
+      title: {
+        text: props.title || "",
+        subtext: props.subtext || "",
+        top: -6,
+        right: 360,
+      },
+      xAxis: props.xAxis || {},
+      yAxis: props.yAxis || {},
+      brush: {
+        seriesIndex: [1],
+        yAxisIndex: 0,
+        transformable: true,
+        throttleType: "debounce",
+        throttleDelay: 1000,
+        removeOnClick: true,
+        brushType: props.brush ? "polygon" : false,
+        brushMode: "multiple",
+        brushStyle: {
+          borderWidth: 1,
+          borderColor: "#ff2424",
         },
-        set(val) {}
-    })
-    watch(() => option, (newVal, oldVal) => {
-        if (chartIns.value) {
-            const echartIns = toRaw(chartIns.value)
-            echartIns.setOption(toRaw(newVal.value))
-        }
-    }, {
-        deep: true
-    })
-
-    watch([() => props.width, () => props.height], (newVal, oldVal) => {
-        if (chartIns.value) {
-            const echartIns = toRaw(chartIns.value)
-            nextTick(() => echartIns.resize())
-        }
-    })
-    const store = useStore()
-    const collapse = computed({
-        get() {
-            return store.state.collapse
+      },
+      toolbox: {
+        show: props.brush,
+      },
+      tooltip: {
+        confine: true,
+        trigger: "axis",
+      },
+      dataset: props.dataset || [],
+      series: props.series || [],
+      legend: {
+        right: "120",
+        top: "5",
+        itemWidth: 6,
+      },
+      grid: {
+        top: 80,
+        left: 40,
+        right: 40,
+        bottom: 40,
+      },
+      dataZoom: [
+        {
+          type: "inside", //图表下方的伸缩条
+          show: false, //是否显示
+          realtime: true, //拖动时,是否实时更新系列的视图
+          start: 0, //伸缩条开始位置(1-100),可以随时更改
+          end: 100, //伸缩条结束位置(1-100),可以随时更改
         },
-        set(val) {}
-    })
-    watch(collapse, (val) => {
-        if (chartIns.value) {
-            setTimeout(() => {
-                chartIns.value.resize()
-            }, 300)
-        }
-    })
-    const funBrushChange = (flag) => {
-        const echartIns = toRaw(chartIns.value)
-        echartIns.dispatchAction({
-            type: "takeGlobalCursor",
-            // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
-            key: "brush",
-            brushOption: {
-                seriesIndex: [1],
-                yAxisIndex: 0,
-                transformable: true,
-                throttleType: "debounce",
-                throttleDelay: 1000,
-                removeOnClick: true,
-                brushType: flag ? "polygon" : false,
-                brushMode: "multiple",
-                brushStyle: {
-                    borderWidth: 1,
-                    color: "rgba(255,36,36,0.2)",
-                    borderColor: "#ff2424",
-                },
-            },
-        });
-        echartIns.off("brushSelected");
-        echartIns.on("brushSelected", (params) => {
-            emits("getSelected", params.batch || []);
-        });
+        {
+          type: "slider", //图表下方的伸缩条
+          show: false, //是否显示
+          realtime: true, //拖动时,是否实时更新系列的视图
+          start: 0, //伸缩条开始位置(1-100),可以随时更改
+          end: 100, //伸缩条结束位置(1-100),可以随时更改
+        },
+      ],
+    };
+  },
+  set(val) {},
+});
+watch(
+  () => option,
+  (newVal, oldVal) => {
+    if (chartIns.value) {
+      const echartIns = toRaw(chartIns.value);
+      echartIns.setOption(toRaw(newVal.value));
     }
-    watch(() => props.brush, (newVal, oldVal) => funBrushChange(newVal))
+  },
+  {
+    deep: true,
+  }
+);
 
-    onMounted(() => {
-        nextTick(() => {
-            init()
-        })
-    })
+watch([() => props.width, () => props.height], (newVal, oldVal) => {
+  if (chartIns.value) {
+    const echartIns = toRaw(chartIns.value);
+    nextTick(() => echartIns.resize());
+  }
+});
+const store = useStore();
+const collapse = computed({
+  get() {
+    return store.state.collapse;
+  },
+  set(val) {},
+});
+watch(collapse, (val) => {
+  if (chartIns.value) {
+    setTimeout(() => {
+      chartIns.value.resize();
+    }, 300);
+  }
+});
+const funBrushChange = (flag) => {
+  const echartIns = toRaw(chartIns.value);
+  echartIns.dispatchAction({
+    type: "takeGlobalCursor",
+    // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
+    key: "brush",
+    brushOption: {
+      seriesIndex: [1],
+      yAxisIndex: 0,
+      transformable: true,
+      throttleType: "debounce",
+      throttleDelay: 1000,
+      removeOnClick: true,
+      brushType: flag ? "polygon" : false,
+      brushMode: "multiple",
+      brushStyle: {
+        borderWidth: 1,
+        color: "rgba(255,36,36,0.2)",
+        borderColor: "#ff2424",
+      },
+    },
+  });
+  echartIns.off("brushSelected");
+  echartIns.on("brushSelected", (params) => {
+    emits("getSelected", params.batch || []);
+  });
+};
+watch(
+  () => props.brush,
+  (newVal, oldVal) => funBrushChange(newVal)
+);
 
-    watch(() => props.echartsTheme, (newVal, oldVal) => init())
+onMounted(() => {
+  nextTick(() => {
+    init();
+  });
+});
 
-    const init = () => {
-        echarts.registerTheme('chartTheme', chartTheme)
-        const echartIns = echarts.init(document.getElementById(chartId), props.echartsTheme)
-        document.getElementById(chartId).removeAttribute("_echarts_instance_") ? document.getElementById(chartId)
-            .removeAttribute("_echarts_instance_") : ''
-        chartIns.value = echartIns
-        echartIns.setOption(option.value)
-        funBrushChange(props.brush)
-        window.addEventListener('resize', () => {
-            echartIns.resize()
-        })
-    }
+watch(
+  () => props.echartsTheme,
+  (newVal, oldVal) => init()
+);
+
+const init = () => {
+  echarts.registerTheme("chartTheme", chartTheme);
+  const echartIns = echarts.init(
+    document.getElementById(chartId),
+    props.echartsTheme
+  );
+  document.getElementById(chartId).removeAttribute("_echarts_instance_")
+    ? document.getElementById(chartId).removeAttribute("_echarts_instance_")
+    : "";
+  chartIns.value = echartIns;
+  echartIns.setOption(option.value);
+  funBrushChange(props.brush);
+  window.addEventListener("resize", () => {
+    echartIns.resize();
+  });
+};
 </script>
 <template>
-    <div :id="chartId" :style="{ height: props.height, width: props.width }"></div>
+  <div
+    :id="chartId"
+    :style="{ height: props.height, width: props.width }"
+  ></div>
 </template>

File diff suppressed because it is too large
+ 17899 - 0
src/views/generatingCapacity/dataAnalysis/spaceAnalysis/components/data.json


+ 85 - 0
src/views/generatingCapacity/dataAnalysis/spaceAnalysis/index.vue

@@ -172,6 +172,7 @@ import {
 import { useStore } from "vuex";
 import httpRequest from "@/utils/request.js";
 import tools from "@tools/htmlToPdf.js";
+import jsonData from "./components/data.json";
 /**配置参数 */
 const treeHeight = ref(window.innerHeight - 116 + "px"); //tree高度
 const excelHeight = ref(window.innerHeight - 116 + "px"); //excel高度
@@ -740,11 +741,95 @@ watch(
     deep: true,
   }
 );
+
+const initPageData = () => {
+  actTreeNode.value = null;
+  excelList.value = [];
+  treeData.value = funRepeatMap(JSON.parse(JSON.stringify(jsonData.treeData)));
+  if (actTreeNode.value) {
+    currentNodeKey.value = actTreeNode.value?.id || "";
+    if (actTreeNode.value.childs) {
+      excelList.value = actTreeNode.value.childs.map((o) => {
+        return {
+          id: o.id,
+          interval: o.interval,
+          path: o.path,
+          prepareid: o.prepareid,
+          station: o.station,
+          time: o.time,
+          type: o.type,
+          windturbine: o.windturbine,
+          isCheck: false,
+          name: o.path.substring(
+            o.path.indexOf(o.station + "_") + (o.station + "_").length
+          ),
+        };
+      });
+    } else {
+      excelList.value = [];
+    }
+
+    const obj = {
+      id: actTreeNode.value.childs[0].id,
+    };
+    excelCheckIds.value = [obj.id]; //当为单选展示风机图表时
+    chartExcelList.value = excelList.value.map((o) => {
+      return {
+        ...o,
+        name: o.windturbine,
+      };
+    }); // 选中excel当前项时, excel列表赋值给dialog 下拉框
+    queryForm.checkIds = excelList.value.map((o) => o.id);
+    checkAll.value = true;
+
+    for (const chart of jsonData.speedData) {
+        chart.currentData.sort((a, b) => {
+          return new Date(a.time).getTime() - new Date(b.time).getTime();
+        });
+        chart.preData.sort((a, b) => {
+          return new Date(a.time).getTime() - new Date(b.time).getTime();
+        });
+        let xAxisData = [],
+          barData1 = [],
+          barData2 = [],
+          lineData1 = [],
+          lineData2 = [];
+        let avgSpeedSum = 0,
+          avgMrxsSum = 0;
+        chart.currentData.forEach((current) => {
+          xAxisData.push(current.time);
+          barData1.push(current.avgspeed);
+          avgSpeedSum += current.avgspeed;
+          avgMrxsSum += current.mrxs;
+          lineData1.push((current.mrxs * 100).toFixed(2));
+        });
+        chart.preData.forEach((current) => {
+          xAxisData.push(current.time);
+          barData2.push(current.avgspeed);
+          lineData2.push((current.mrxs * 100).toFixed(2));
+        });
+        avgSpeed.value = (avgSpeedSum / barData1.length).toFixed(2) + " m/s";
+        avgMrxs.value =
+          ((avgMrxsSum / lineData1.length) * 100).toFixed(2) + " %";
+        // windName.value = chart.wtId
+        windName.value = chart.code;
+        barxAxis.data = xAxisData;
+        linexAxis.data = xAxisData;
+        barSeries[0].data = barData1;
+        barSeries[1].data = barData2;
+        chartId++;
+        lineSeries[0].data = lineData1;
+        lineSeries[1].data = lineData2;
+        chartId++;
+      }
+  }
+};
 /**activated */
 onMounted(() => {
   //test
   // funSubmit()
   //
+  initPageData();
   funGetTree();
   theme.value = store.state.theme;
   echartsTheme.value = !theme.value ? "dark" : "";

File diff suppressed because it is too large
+ 16502 - 0
src/views/generatingCapacity/dataAnalysis/windAnalysis/components/data.json


File diff suppressed because it is too large
+ 630 - 487
src/views/generatingCapacity/dataAnalysis/windAnalysis/index.vue


File diff suppressed because it is too large
+ 23053 - 0
src/views/generatingCapacity/dataFilter/prepare/component/data.json


+ 62 - 1
src/views/generatingCapacity/dataFilter/prepare/index.vue

@@ -62,6 +62,7 @@ import { onMounted, ref, onActivated, watch } from "vue";
 import httpRequest from "@/utils/request.js";
 import { useStore } from "vuex";
 import { apiGetpowerpreparetree } from "@/api/gengra";
+import jsonData from "./component/data.json";
 // import {
 //     baseURL,
 //     socketURL
@@ -104,7 +105,7 @@ const treeData = ref([]);
 const actTreeNode = ref(null); //当前激活的treeNode
 const funRepeatMap = (arr) => {
   return arr.map((o) => {
-    if (o.children) {
+    if (o?.children?.length) {
       const findIndex = o.children.findIndex((p) => !!p.type);
       if (findIndex !== -1) {
         o.childs = o.children;
@@ -220,6 +221,63 @@ const funSubmit = async (params) => {
     ElMessage.success(res.msg);
   }
 };
+
+const initPageData = () => {
+  treeData.value = funRepeatMap(JSON.parse(JSON.stringify(jsonData.treeData)));
+  excelList.value = [];
+  if (actTreeNode.value) {
+    if (actTreeNode.value.childs) {
+      excelList.value = actTreeNode.value.childs.map((o) => {
+        return {
+          id: o.id,
+          interval: o.interval,
+          path: o.path,
+          prepareid: o.prepareid,
+          station: o.station,
+          time: o.time,
+          type: o.type,
+          windturbine: o.windturbine,
+          isCheck: false,
+          name: o.path.substring(
+            o.path.indexOf(o.station + "_") + (o.station + "_").length
+          ),
+        };
+      });
+    } else {
+      excelList.value = [];
+    }
+
+    const child = actTreeNode.value.childs[0];
+    const obj = {
+      id: child.id,
+      interval: child.interval,
+      path: child.path,
+      prepareid: child.prepareid,
+      station: child.station,
+      time: child.time,
+      type: child.type,
+      windturbine: child.windturbine,
+      name: child.path.substring(
+        child.path.indexOf(child.station + "_") + (child.station + "_").length
+      ),
+    };
+    currentNodeKey.value = actTreeNode.value?.id || "";
+
+    tableShowId.value = obj.id;
+    tableName.value = obj.name;
+    tableLoading.value = true;
+
+    tableColumn.value = jsonData.tableData.title.map((o) => {
+      return {
+        prop: o.key,
+        label: o.des,
+        width: o.des === "时间" ? 100 : 80,
+      };
+    });
+    tableData.value = jsonData.tableData.data;
+    tableLoading.value = false;
+  }
+};
 /**created */
 // funGetTree()
 const theme = ref(null);
@@ -238,6 +296,7 @@ watch(
 /**mounted */
 onMounted(() => {
   // funWebSocket()
+  initPageData();
   funGetTree();
   theme.value = store.state.theme;
   tableHeight.value = window.innerHeight - 115 + "px";
@@ -265,6 +324,7 @@ onMounted(() => {
     .main_top {
       height: 40px;
       display: flex;
+      justify-content: flex-start;
       align-items: center;
 
       .topPsty {
@@ -275,6 +335,7 @@ onMounted(() => {
         font-weight: 600;
         margin-left: 10px;
         border-radius: 3px;
+        margin-right: 20px;
       }
     }
 

+ 23 - 2
src/views/generatingCapacity/dataFilter/prepare/search.vue

@@ -1,8 +1,9 @@
 <template>
   <div class="seach">
-    <el-form class="generat-seach" :inline="true" :model="queryForm">
+    <el-form class="generat-seach" inline :model="queryForm">
       <el-form-item label="场站" class="!mb-0">
         <el-select
+          style="width: 120px"
           v-model="queryForm.station"
           class="w-[150px]"
           @change="funStationChange"
@@ -18,6 +19,7 @@
       </el-form-item>
       <el-form-item label="风机" class="!mb-0">
         <el-select
+          style="width: 150px"
           multiple
           class="w-[150px]"
           v-model="queryForm.wtIds"
@@ -76,6 +78,8 @@ import {
   apiGetbaseWindturbine,
   apiGetpowerpreparedata,
 } from "@/api/gengra";
+
+import jsonData from "./component/data.json";
 export default {
   components: {
     SubmitBtn,
@@ -95,9 +99,19 @@ export default {
     };
   },
   mounted() {
+    this.initPageData();
     this.funGetStation();
   },
   methods: {
+    initPageData() {
+      this.stationList = jsonData.stationList;
+      this.queryForm.station = this.stationList[0].id;
+
+      this.windList = jsonData.windList;
+      this.queryForm.wtIds = this.windList.map((o) => o.id);
+      this.checkAll = true;
+    },
+
     funSubmit() {
       const startDate = new Date(this.queryForm.st).setHours(0, 0, 0, 0);
       const endDate = new Date(this.queryForm.et).setHours(0, 0, 0, 0);
@@ -172,6 +186,13 @@ export default {
 
 <style lang="less">
 .seach {
-  padding: 20px 0 0 20px;
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  .generat-seach {
+    .el-form-item {
+      margin: 0 20px 0 0;
+    }
+  }
 }
 </style>

File diff suppressed because it is too large
+ 38262 - 0
src/views/generatingCapacity/dataFilter/process/component/data.json


+ 75 - 3
src/views/generatingCapacity/dataFilter/process/index.vue

@@ -1,9 +1,13 @@
 <template>
-  <div class="dataFileProcess" :class="!theme ? 'themeDark' : 'themeLight'">
+  <div
+    class="dataFileProcess"
+    :class="theme === false ? 'themeDark' : 'themeLight'"
+  >
     <div class="dataFileProcessMain">
       <div class="main_top">
         <p class="topPsty">风电数据处理</p>
-        <search-cop @submit="funSubmit"> </search-cop>
+        <search-cop @submit="funSubmit" :maxProduction="maxProduction">
+        </search-cop>
       </div>
       <div class="main">
         <div class="treeDataMain">
@@ -71,6 +75,8 @@ import httpRequest from "@/utils/request.js";
 //     baseURL
 // } from '@/api/axios.js'
 import { ElMessage } from "element-plus";
+
+import jsonData from "./component/data.json";
 /**配置参数 */
 const treeHeight = ref((window.innerHeight - 120) / 2 + "px"); //tree高度
 const excelHeight = ref(window.innerHeight - 116 + "px"); //excel高度
@@ -81,6 +87,7 @@ const excelCheckIds = ref([]);
 const excelList = ref([]);
 const xhrId = ref("");
 const currentNodeKey = ref("");
+const maxProduction = ref(2500);
 const funExcelChange = async (obj) => {
   //点击excel项时
   tableShowId.value = obj.id;
@@ -115,6 +122,7 @@ const funExcelChange = async (obj) => {
   } else {
     tableLoading.value = false;
   }
+  maxProduction.value = res.data.production || 2500;
 };
 const funExcelCheckChange = ({ checkArr, data }) => {
   //bug
@@ -312,11 +320,74 @@ watch(
     deep: true,
   }
 );
+
+const initPageData = () => {
+  treeData.value = funRepeatMap(JSON.parse(JSON.stringify(jsonData.treeData1)));
+
+  actTreeNode.value = null;
+  processTreeData.value = funRepeatMap(
+    JSON.parse(JSON.stringify(jsonData.treeData2)),
+    "fitting"
+  );
+  excelList.value = [];
+  if (actTreeNode.value) {
+    if (actTreeNode.value.childs) {
+      excelList.value = actTreeNode.value.childs.map((o) => {
+        return {
+          id: o.id,
+          interval: o.interval,
+          path: o.path,
+          prepareid: o.prepareid,
+          station: o.station,
+          time: o.time,
+          type: o.type,
+          windturbine: o.windturbine,
+          isCheck: false,
+          name: o.path.substring(
+            o.path.indexOf(o.station + "_") + (o.station + "_").length
+          ),
+        };
+      });
+    } else {
+      excelList.value = [];
+    }
+    const child = actTreeNode.value.childs[0];
+    const obj = {
+      id: child.id,
+      interval: child.interval,
+      path: child.path,
+      prepareid: child.prepareid,
+      station: child.station,
+      time: child.time,
+      type: child.type,
+      windturbine: child.windturbine,
+      name: child.path.substring(
+        child.path.indexOf(child.station + "_") + (child.station + "_").length
+      ),
+    };
+    currentNodeKey.value = actTreeNode.value?.id || "";
+    tableShowId.value = obj.id;
+    tableName.value = obj.name;
+    let res = null;
+    tableLoading.value = true;
+    tableColumn.value = jsonData.tableData.title.map((o) => {
+      return {
+        prop: o.key,
+        label: o.des,
+        width: o.des === "时间" ? 100 : 70,
+      };
+    });
+    tableData.value = jsonData.tableData.data;
+    maxProduction.value = jsonData.tableData.production || 2500;
+    tableLoading.value = false;
+  }
+};
 /**mounted */
 onMounted(async () => {
+  theme.value = store.state.theme;
+  initPageData();
   await funGetTree();
   funGetProcessTree();
-  theme.value = store.state.theme;
   tableHeight.value = window.innerHeight - 116 + "px";
   excelHeight.value = window.innerHeight - 116 + "px";
   treeHeight.value = (window.innerHeight - 120) / 2 + "px";
@@ -353,6 +424,7 @@ onMounted(async () => {
         font-weight: 600;
         margin-left: 10px;
         border-radius: 3px;
+        margin-right: 20px;
       }
     }
 

+ 92 - 50
src/views/generatingCapacity/dataFilter/process/search.vue

@@ -1,59 +1,101 @@
 <template>
-    <div class="seach">
-        <el-form class="generat-seach" :inline="true" :model="queryForm">
-            <el-form-item label="最大风速" class="!mb-0">
-                <el-input-number v-model="queryForm.maxs" class="!w-[130px]" :max="30"></el-input-number>
-            </el-form-item>
-            <el-form-item label="最小风速" class="!mb-0">
-                <el-input-number v-model="queryForm.mins" class="!w-[130px]" :min="0"></el-input-number>
-            </el-form-item>
-            <el-form-item label="最大功率" class="!mb-0">
-                <el-input-number v-model="queryForm.maxp" class="!w-[130px]"></el-input-number>
-            </el-form-item>
-            <el-form-item label="最小功率" class="!mb-0">
-                <el-input-number v-model="queryForm.minp" class="!w-[130px]" :min="0"></el-input-number>
-            </el-form-item>
-            <el-form-item label="筛选条件:" class="!mb-0">
-                <el-checkbox v-model="queryForm.isfbw">非并网</el-checkbox>
-                <el-checkbox v-model="queryForm.isfhl">非合理值</el-checkbox>
-                <el-checkbox v-model="queryForm.isbw">并网后10分钟</el-checkbox>
-                <el-checkbox v-model="queryForm.istj">停机前10分钟</el-checkbox>
-                <el-checkbox v-model="queryForm.isglpc">功率曲线偏差</el-checkbox>
-            </el-form-item>
-            <el-form-item class="!mb-0">
-                <el-button type="primary" @click="funSubmit">预处理</el-button>
-            </el-form-item>
-        </el-form>
-    </div>
+  <div class="seach">
+    <el-form class="generat-seach" :inline="true" :model="queryForm">
+      <el-form-item label="最大风速" class="!mb-0">
+        <el-input-number
+          v-model="queryForm.maxs"
+          class="!w-[130px]"
+          :max="30"
+        ></el-input-number>
+      </el-form-item>
+      <el-form-item label="最小风速" class="!mb-0">
+        <el-input-number
+          v-model="queryForm.mins"
+          class="!w-[130px]"
+          :min="0"
+        ></el-input-number>
+      </el-form-item>
+      <el-form-item label="最大功率" class="!mb-0">
+        <el-input-number
+          v-model="queryForm.maxp"
+          class="!w-[130px]"
+        ></el-input-number>
+      </el-form-item>
+      <el-form-item label="最小功率" class="!mb-0">
+        <el-input-number
+          v-model="queryForm.minp"
+          class="!w-[130px]"
+          :min="0"
+        ></el-input-number>
+      </el-form-item>
+      <el-form-item label="筛选条件:" class="!mb-0">
+        <el-checkbox v-model="queryForm.isfbw">非并网</el-checkbox>
+        <el-checkbox v-model="queryForm.isfhl">非合理值</el-checkbox>
+        <el-checkbox v-model="queryForm.isbw">并网后10分钟</el-checkbox>
+        <el-checkbox v-model="queryForm.istj">停机前10分钟</el-checkbox>
+        <el-checkbox v-model="queryForm.isglpc">功率曲线偏差</el-checkbox>
+      </el-form-item>
+      <el-form-item class="!mb-0">
+        <el-button type="primary" @click="funSubmit">预处理</el-button>
+      </el-form-item>
+    </el-form>
+  </div>
 </template>
 
 <script>
-    export default {
-        data() {
-            return {
-                queryForm: {
-                    maxs: 25,
-                    mins: 0,
-                    maxp: 2500,
-                    minp: 0,
-                    isfbw: true,
-                    isfhl: true,
-                    isbw: true,
-                    istj: true,
-                    isglpc: true,
-                },
-            }
-        },
-        methods: {
-            funSubmit() {
-                this.$emit('submit', this.queryForm)
-            }
-        }
-    }
+export default {
+  props: {
+    maxProduction: {
+      type: Number,
+      default: () => {
+        return 2500;
+      },
+    },
+  },
+
+  data() {
+    return {
+      queryForm: {
+        maxs: 25,
+        mins: 0,
+        maxp: 2500,
+        minp: 0,
+        isfbw: true,
+        isfhl: true,
+        isbw: true,
+        istj: true,
+        isglpc: true,
+      },
+    };
+  },
+
+  created() {
+    this.queryForm.maxp = this.maxProduction;
+  },
+
+  methods: {
+    funSubmit() {
+      this.$emit("submit", this.queryForm);
+    },
+  },
+
+  watch: {
+    maxProduction(value) {
+      this.queryForm.maxp = value;
+    },
+  },
+};
 </script>
 
 <style lang="less">
-    .seach {
-        padding: 20px 0 0 20px;
+.seach {
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+  .generat-seach {
+    .el-form-item {
+      margin: 0 20px 0 0;
     }
+  }
+}
 </style>

File diff suppressed because it is too large
+ 1530 - 0
src/views/generatingCapacity/jjyxReport/index.vue


File diff suppressed because it is too large
+ 6042 - 0
src/views/generatingCapacity/report/component/data.json


+ 90 - 0
src/views/generatingCapacity/report/fixGetPDF copy.js

@@ -0,0 +1,90 @@
+/*
+ * @Author: 蒋珅 11455645+jiang-shena@user.noreply.gitee.com
+ * @Date: 2023-06-12 18:13:48
+ * @LastEditors: 蒋珅 11455645+jiang-shena@user.noreply.gitee.com
+ * @LastEditTime: 2023-06-13 16:26:14
+ * @FilePath: \PowerAnalysis\src\pages\report\fixGetPDF.js
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
+// 页面导出为pdf格式
+import html2Canvas from 'html2canvas';
+import jsPDF from 'jspdf';
+const htmlToPdf = {
+    getPdf(loading, title,) {
+        let dom = null
+        let domStr = ''
+        if (title === '经济运行分析会报告') {
+            dom = document.querySelector('#pdfDomop')
+            domStr = '#pdfDomop'
+        } else {
+            dom = document.querySelector('#pdfDom')
+            domStr = '#pdfDom'
+        }
+        let theme = dom.className === 'block' ? false : true
+
+        html2Canvas(document.querySelector(domStr), {
+            allowTaint: false,
+            taintTest: false,
+            logging: false,
+            useCORS: true,
+            dpi: window.devicePixelRatio * 4, //将分辨率提高到特定的DPI 提高四倍
+            scale: 4, //按比例增加分辨率
+        }).then((canvas) => {
+            var pdf = new jsPDF('p', 'mm', 'a4'); //A4纸,纵向
+            if (!theme) {
+                pdf.setDrawColor(4, 12, 11);
+                pdf.rect(0, 0, pdf.internal.pageSize.getWidth(), pdf.internal.pageSize.getHeight(), 'F');
+            }
+            var ctx = canvas.getContext('2d'),
+                a4w = 190,
+                a4h = 272, //A4大小,210mm x 297mm,四边各保留10mm的边距,显示区域190x277
+                imgHeight = Math.floor((a4h * canvas.width) / a4w), //按A4显示比例换算一页图像的像素高度
+                renderedHeight = 0;
+
+            while (renderedHeight < canvas.height) {
+                var page = document.createElement('canvas');
+                page.width = canvas.width;
+                page.height = Math.min(imgHeight, canvas.height - renderedHeight); //可能内容不足一页
+
+                //用getImageData剪裁指定区域,并画到前面创建的canvas对象中
+                page
+                    .getContext('2d')
+                    .putImageData(
+                        ctx.getImageData(
+                            0,
+                            renderedHeight,
+                            canvas.width,
+                            Math.min(imgHeight, canvas.height - renderedHeight),
+                        ),
+                        0,
+                        0,
+                    );
+                pdf.addImage(
+                    page.toDataURL('image/jpeg', 1.0),
+                    'JPEG',
+                    10,
+                    10,
+                    a4w,
+                    Math.min(a4h, (a4w * page.height) / page.width),
+                ); //添加图像到页面,保留10mm边距
+
+                renderedHeight += imgHeight;
+                if (renderedHeight < canvas.height) {
+                    pdf.addPage(); //如果后面还有内容,添加一个空页
+                    if (!theme) {
+                        pdf.setDrawColor(4, 12, 11);
+                        pdf.rect(0, 0, pdf.internal.pageSize.getWidth(), pdf.internal.pageSize.getHeight(), 'F');
+                    }
+                }
+                // delete page;
+            }
+            //保存文件
+            pdf.save(title + '.pdf');
+            // loading = false;
+            console.log(loading);
+        });
+    },
+};
+
+export default htmlToPdf;
+

+ 46 - 46
src/views/generatingCapacity/report/fixGetPDF.js

@@ -16,22 +16,22 @@ const htmlToPdf = {
         if (title === '经济运行分析会报告') {
             dom = document.querySelector('#pdfDomop')
             domStr = '#pdfDomop'
-        } else { 
+        } else {
             dom = document.querySelector('#pdfDom')
             domStr = '#pdfDom'
         }
-        let theme = dom.className ==='block' ? false : true
+        let theme = dom.className === 'block' ? false : true
 
         html2Canvas(document.querySelector(domStr), {
-        allowTaint: false,
-        taintTest: false,
-        logging: false,
-        useCORS: true,
-        dpi: window.devicePixelRatio * 4, //将分辨率提高到特定的DPI 提高四倍
-        scale: 4, //按比例增加分辨率
+            allowTaint: false,
+            taintTest: false,
+            logging: false,
+            useCORS: true,
+            dpi: window.devicePixelRatio * 4, //将分辨率提高到特定的DPI 提高四倍
+            scale: 4, //按比例增加分辨率
         }).then((canvas) => {
             var pdf = new jsPDF('p', 'mm', 'a4'); //A4纸,纵向
-            if (!theme) { 
+            if (!theme) {
                 pdf.setDrawColor(4, 12, 11);
                 pdf.rect(0, 0, pdf.internal.pageSize.getWidth(), pdf.internal.pageSize.getHeight(), 'F');
             }
@@ -41,47 +41,47 @@ const htmlToPdf = {
                 imgHeight = Math.floor((a4h * canvas.width) / a4w), //按A4显示比例换算一页图像的像素高度
                 renderedHeight = 0;
 
-        while (renderedHeight < canvas.height) {
-            var page = document.createElement('canvas');
-            page.width = canvas.width;
-            page.height = Math.min(imgHeight, canvas.height - renderedHeight); //可能内容不足一页
+            while (renderedHeight < canvas.height) {
+                var page = document.createElement('canvas');
+                page.width = canvas.width;
+                page.height = Math.min(imgHeight, canvas.height - renderedHeight); //可能内容不足一页
 
-            //用getImageData剪裁指定区域,并画到前面创建的canvas对象中
-            page
-            .getContext('2d')
-            .putImageData(
-                ctx.getImageData(
-                0,
-                renderedHeight,
-                canvas.width,
-                Math.min(imgHeight, canvas.height - renderedHeight),
-                ),
-                0,
-                0,
-            );
-            pdf.addImage(
-            page.toDataURL('image/jpeg', 1.0),
-            'JPEG',
-            10,
-            10,
-            a4w,
-            Math.min(a4h, (a4w * page.height) / page.width),
-            ); //添加图像到页面,保留10mm边距
+                //用getImageData剪裁指定区域,并画到前面创建的canvas对象中
+                page
+                    .getContext('2d')
+                    .putImageData(
+                        ctx.getImageData(
+                            0,
+                            renderedHeight,
+                            canvas.width,
+                            Math.min(imgHeight, canvas.height - renderedHeight),
+                        ),
+                        0,
+                        0,
+                    );
+                pdf.addImage(
+                    page.toDataURL('image/jpeg', 1.0),
+                    'JPEG',
+                    10,
+                    10,
+                    a4w,
+                    Math.min(a4h, (a4w * page.height) / page.width),
+                ); //添加图像到页面,保留10mm边距
 
-            renderedHeight += imgHeight;
-            if (renderedHeight < canvas.height) {
-                pdf.addPage(); //如果后面还有内容,添加一个空页
-                if (!theme) { 
-                    pdf.setDrawColor(4, 12, 11);
-                    pdf.rect(0, 0, pdf.internal.pageSize.getWidth(), pdf.internal.pageSize.getHeight(), 'F');
+                renderedHeight += imgHeight;
+                if (renderedHeight < canvas.height) {
+                    pdf.addPage(); //如果后面还有内容,添加一个空页
+                    if (!theme) {
+                        pdf.setDrawColor(4, 12, 11);
+                        pdf.rect(0, 0, pdf.internal.pageSize.getWidth(), pdf.internal.pageSize.getHeight(), 'F');
+                    }
                 }
+                // delete page;
             }
-            // delete page;
-        }
-        //保存文件
-        pdf.save(title + '.pdf');
-        // loading = false;
-        console.log(loading);
+            //保存文件
+            pdf.save(title + '.pdf');
+            // loading = false;
+            console.log(loading);
         });
     },
 };

+ 224 - 203
src/views/generatingCapacity/report/index.vue

@@ -2,11 +2,16 @@
   <div class="analysisReport" :class="!theme ? 'themeDark' : 'themeLight'">
     <div class="analysisReportMain">
       <div class="main_top">
-        <p class="topPsty">分析报告</p>
+        <p class="topPsty">能效分析报告</p>
         <div class="seach">
           <el-form class="generat-seach" :inline="true">
             <el-form-item label="场站" class="!mb-0">
-              <el-select v-model="station" clearable class="w-[150px]">
+              <el-select
+                style="width: 120px"
+                v-model="station"
+                clearable
+                class="w-[150px]"
+              >
                 <el-option
                   v-for="item in stationList"
                   :key="item.id"
@@ -28,13 +33,13 @@
             </el-form-item>
             <el-form-item>
               <el-button type="primary" @click="addform">查询</el-button>
-              <el-button
+              <!-- <el-button
                 style="width: 100px"
                 type="primary"
                 handleReportOp
                 @click="handleReportOp"
                 >经济运行报告</el-button
-              >
+              > -->
             </el-form-item>
           </el-form>
         </div>
@@ -106,7 +111,7 @@
         style="
           font-weight: bolder;
           font-size: 18px;
-          text-aling: center;
+          text-align: center;
           margin-bottom: 20px;
           text-align: center;
         "
@@ -372,7 +377,6 @@
         @change="handleReportOp"
       />
     </div>
-
     <div
       id="pdfDomop"
       :class="!theme ? 'block' : 'white'"
@@ -381,7 +385,7 @@
       <h2
         style="
           font-weight: bolder;
-          text-aling: center;
+          text-align: center;
           margin-bottom: 20px;
           text-align: center;
         "
@@ -1346,9 +1350,9 @@
         <!-- <el-button type="primary" @click="centerDialogVisible = false">
         确定
     </el-button> -->
-        <el-button @click="exportPDFop" type="danger" :loading="loading"
+        <!-- <el-button @click="exportPDFop" type="danger" :loading="loading"
           >导出 PDF</el-button
-        >
+        > -->
         <el-button @click="exportWORD" type="primary" :loading="loading"
           >导出 WORD</el-button
         >
@@ -1375,9 +1379,11 @@ import dayjs from "dayjs";
 
 import axios from "axios";
 
+import jsonData from "./component/data.json";
+
 const pickerVal = ref([
   dayjs().subtract(1, "month").startOf("month").format("YYYY-MM"),
-  dayjs().format("YYYY-MM")
+  dayjs().format("YYYY-MM"),
 ]);
 const curve = ref([]);
 const mrlxs = ref([]);
@@ -1568,7 +1574,9 @@ const tableData = ref([]);
 const station = ref("");
 const addform = async () => {
   const res = await httpRequest.get(
-    `/report/list?station=${station.value}&st=${pickerVal.value?.[0] || ""}&et=${pickerVal.value?.[1] || ""}`
+    `/report/list?station=${station.value}&st=${
+      pickerVal.value?.[0] || ""
+    }&et=${pickerVal.value?.[1] || ""}`
   );
 
   //    res.data.forEach((ele)=>{
@@ -1642,7 +1650,7 @@ const leijiashanXN = ref([]);
 const xingzhuangXN = ref([]);
 const zuozhuangXN = ref([]);
 
-const handleReportOp = async () => {
+const handleReportOp = () => {
   if (reportParamDate.value) {
     economicalOperationVisible.value = true;
     OperationName.value = "";
@@ -1652,201 +1660,208 @@ const handleReportOp = async () => {
     fzylyxslistY.value = [];
     fjklyl.value = [];
 
-    const res = await httpRequest.get(
-      `/MeetingReport/Analysisreport?time=${reportParamDate.value}`
-    );
-    // const res = dataJson
-    OperationName.value = res.data.title.name;
-    OperationMonth.value = res.data.title.month;
-    OperationData.value = res.data;
-    fzylyxslistM.value = res.data.yfzylyxslist;
-    fzylyxslistY.value = res.data.nfzylyxslist;
-    twoxize.value = twoxizeJson.data;
-    fjklyl.value = res.data.fjklyl;
-    res.data.dlcylist.forEach((it) => {
-      if (it.cycleType === "M") {
-        dlcylistM.value.push(it);
-      } else if (it.cycleType === "Y") {
-        dlcylistY.value.push(it);
-      }
-    });
-    // 五项损失列表数据处理
-    const stationName = [
-      "吉山梁",
-      "繁食沟",
-      "草山梁",
-      "左庄",
-      "新庄",
-      "雷家山",
-      "月度",
-      "年度",
-    ];
-    const typeOsY = ["月累计", "月同期"];
-    const typeOsN = ["年累计", "年同期"];
-    const typeOsHJ = ["合计", "同期合计"];
-    let arr = [];
-    stationName.forEach((iv) => {
-      let obj = {};
-      res.data.wdssdlfx.forEach((it) => {
-        if (iv !== "月度" && iv !== "年度") {
-          if (it.windpowerstationName.indexOf(iv) !== -1) {
-            if (it.cycleType === "M") {
-              typeOsY.forEach((ib) => {
-                obj = {
-                  windpowerstationName: iv,
-                  wdss: ib,
-                  gzssdl: ib === "月累计" ? it.gzssdl : it.tqgzssdl,
-                  jhssdl: ib === "月累计" ? it.jhssdl : it.tqjhssdl,
-                  xdssdl: ib === "月累计" ? it.xdssdl : it.tqxdssdl,
-                  slssdl: ib === "月累计" ? it.slssdl : it.tqslssdl,
-                  xnssdl: ib === "月累计" ? it.xnssdl : it.tqxnssdl,
-                  zhj: ib === "月累计" ? it.zhj : it.tqzhj,
-                  hj: ib === "月累计" ? it.hj : it.tqhj,
-                };
-                arr.push(obj);
-              });
-            } else if (it.cycleType === "Y") {
-              typeOsN.forEach((ib) => {
-                obj = {
-                  windpowerstationName: iv,
-                  wdss: ib,
-                  gzssdl: ib === "年累计" ? it.gzssdl : it.tqgzssdl,
-                  jhssdl: ib === "年累计" ? it.jhssdl : it.tqjhssdl,
-                  xdssdl: ib === "年累计" ? it.xdssdl : it.tqxdssdl,
-                  slssdl: ib === "年累计" ? it.slssdl : it.tqslssdl,
-                  xnssdl: ib === "年累计" ? it.xnssdl : it.tqxnssdl,
-                  zhj: ib === "年累计" ? it.zhj : it.tqzhj,
-                  hj: ib === "年累计" ? it.hj : it.tqhj,
-                };
-                arr.push(obj);
-              });
-            }
-          }
-        } else {
-          if (it.windpowerstationName === "合计") {
-            if (it.cycleType === "M" && iv === "月度") {
-              typeOsHJ.forEach((ib) => {
-                obj = {
-                  windpowerstationName: iv,
-                  wdss: ib,
-                  gzssdl: ib === "合计" ? it.gzssdl : it.tqgzssdl,
-                  jhssdl: ib === "合计" ? it.jhssdl : it.tqjhssdl,
-                  xdssdl: ib === "合计" ? it.xdssdl : it.tqxdssdl,
-                  slssdl: ib === "合计" ? it.slssdl : it.tqslssdl,
-                  xnssdl: ib === "合计" ? it.xnssdl : it.tqxnssdl,
-                  zhj: ib === "合计" ? it.zhj : it.tqzhj,
-                  hj: ib === "合计" ? it.hj : it.tqhj,
-                };
-                arr.push(obj);
-              });
-            } else if (it.cycleType === "Y" && iv === "年度") {
-              typeOsHJ.forEach((ib) => {
-                obj = {
-                  windpowerstationName: iv,
-                  wdss: ib,
-                  gzssdl: ib === "合计" ? it.gzssdl : it.tqgzssdl,
-                  jhssdl: ib === "合计" ? it.jhssdl : it.tqjhssdl,
-                  xdssdl: ib === "合计" ? it.xdssdl : it.tqxdssdl,
-                  slssdl: ib === "合计" ? it.slssdl : it.tqslssdl,
-                  xnssdl: ib === "合计" ? it.xnssdl : it.tqxnssdl,
-                  zhj: ib === "合计" ? it.zhj : it.tqzhj,
-                  hj: ib === "合计" ? it.hj : it.tqhj,
-                };
-                arr.push(obj);
-              });
-            }
+    httpRequest
+      .get(`/MeetingReport/Analysisreport?time=${reportParamDate.value}`)
+      .then((res) => {
+        renderReportPage(res);
+      })
+      .catch(() => {
+        renderReportPage({ data: jsonData.reportData });
+      });
+  }
+};
+
+const renderReportPage = (res) => {
+  OperationName.value = res.data.title.name;
+  OperationMonth.value = res.data.title.month;
+  OperationData.value = res.data;
+  fzylyxslistM.value = res.data.yfzylyxslist;
+  fzylyxslistY.value = res.data.nfzylyxslist;
+  twoxize.value = twoxizeJson.data;
+  fjklyl.value = res.data.fjklyl;
+  res.data.dlcylist.forEach((it) => {
+    if (it.cycleType === "M") {
+      dlcylistM.value.push(it);
+    } else if (it.cycleType === "Y") {
+      dlcylistY.value.push(it);
+    }
+  });
+  // 五项损失列表数据处理
+  const stationName = [
+    "吉山梁",
+    "繁食沟",
+    "草山梁",
+    "左庄",
+    "新庄",
+    "雷家山",
+    "月度",
+    "年度",
+  ];
+  const typeOsY = ["月累计", "月同期"];
+  const typeOsN = ["年累计", "年同期"];
+  const typeOsHJ = ["合计", "同期合计"];
+  let arr = [];
+  stationName.forEach((iv) => {
+    let obj = {};
+    res.data.wdssdlfx.forEach((it) => {
+      if (iv !== "月度" && iv !== "年度") {
+        if (it.windpowerstationName.indexOf(iv) !== -1) {
+          if (it.cycleType === "M") {
+            typeOsY.forEach((ib) => {
+              obj = {
+                windpowerstationName: iv,
+                wdss: ib,
+                gzssdl: ib === "月累计" ? it.gzssdl : it.tqgzssdl,
+                jhssdl: ib === "月累计" ? it.jhssdl : it.tqjhssdl,
+                xdssdl: ib === "月累计" ? it.xdssdl : it.tqxdssdl,
+                slssdl: ib === "月累计" ? it.slssdl : it.tqslssdl,
+                xnssdl: ib === "月累计" ? it.xnssdl : it.tqxnssdl,
+                zhj: ib === "月累计" ? it.zhj : it.tqzhj,
+                hj: ib === "月累计" ? it.hj : it.tqhj,
+              };
+              arr.push(obj);
+            });
+          } else if (it.cycleType === "Y") {
+            typeOsN.forEach((ib) => {
+              obj = {
+                windpowerstationName: iv,
+                wdss: ib,
+                gzssdl: ib === "年累计" ? it.gzssdl : it.tqgzssdl,
+                jhssdl: ib === "年累计" ? it.jhssdl : it.tqjhssdl,
+                xdssdl: ib === "年累计" ? it.xdssdl : it.tqxdssdl,
+                slssdl: ib === "年累计" ? it.slssdl : it.tqslssdl,
+                xnssdl: ib === "年累计" ? it.xnssdl : it.tqxnssdl,
+                zhj: ib === "年累计" ? it.zhj : it.tqzhj,
+                hj: ib === "年累计" ? it.hj : it.tqhj,
+              };
+              arr.push(obj);
+            });
           }
         }
-      });
-    });
-    console.log("wdssdl===>>", arr);
-    wdssdlfx.value = arr;
-    // 能耗指标分析(风电)
-    const stationArr = [
-      "吉山梁",
-      "繁食沟",
-      "草山梁",
-      "左庄",
-      "新庄",
-      "雷家山",
-      "月度",
-    ];
-    const typeArr = ["zhcydl", "fdcydl", "zbsh", "xbsh"];
-    res.data.nhzbfxlist.forEach((it) => {
-      if (it.wpid !== "月度") {
-        let obj = {
-          wpid: it.wpid,
-          type: "月累计",
-          zhcydl: it.yzhcydl,
-          fdcydl: it.yfdcydl,
-          zbsh: it.yzbsh,
-          xbsh: it.yxbsh,
-        };
-        nhzbfxlist.value.push(obj);
-        let obj2 = {
-          wpid: it.wpid,
-          type: "月同期",
-          zhcydl: it.ytqzhcydl,
-          fdcydl: it.ytqfdcydl,
-          zbsh: it.ytqzbsh,
-          xbsh: it.ytqxbsh,
-        };
-        nhzbfxlist.value.push(obj2);
-        let obj3 = {
-          wpid: it.wpid,
-          type: "年累计",
-          zhcydl: it.nzhcydl,
-          fdcydl: it.nfdcydl,
-          zbsh: it.nzbsh,
-          xbsh: it.nxbsh,
-        };
-        nhzbfxlist.value.push(obj3);
-        let obj4 = {
-          wpid: it.wpid,
-          type: "年同期",
-          zhcydl: it.ntqzhcydl,
-          fdcydl: it.ntqfdcydl,
-          zbsh: it.ntqzbsh,
-          xbsh: it.ntqxbsh,
-        };
-        nhzbfxlist.value.push(obj4);
       } else {
-        let obj = {
-          wpid: it.wpid,
-          type: "合计",
-          zhcydl: it.yzhcydl,
-          fdcydl: it.yfdcydl,
-          zbsh: it.yzbsh,
-          xbsh: it.yxbsh,
-        };
-        nhzbfxlist.value.push(obj);
-        let obj2 = {
-          wpid: it.wpid,
-          type: "同期合计",
-          zhcydl: it.ytqzhcydl,
-          fdcydl: it.ytqfdcydl,
-          zbsh: it.ytqzbsh,
-          xbsh: it.ytqxbsh,
-        };
-        nhzbfxlist.value.push(obj2);
+        if (it.windpowerstationName === "合计") {
+          if (it.cycleType === "M" && iv === "月度") {
+            typeOsHJ.forEach((ib) => {
+              obj = {
+                windpowerstationName: iv,
+                wdss: ib,
+                gzssdl: ib === "合计" ? it.gzssdl : it.tqgzssdl,
+                jhssdl: ib === "合计" ? it.jhssdl : it.tqjhssdl,
+                xdssdl: ib === "合计" ? it.xdssdl : it.tqxdssdl,
+                slssdl: ib === "合计" ? it.slssdl : it.tqslssdl,
+                xnssdl: ib === "合计" ? it.xnssdl : it.tqxnssdl,
+                zhj: ib === "合计" ? it.zhj : it.tqzhj,
+                hj: ib === "合计" ? it.hj : it.tqhj,
+              };
+              arr.push(obj);
+            });
+          } else if (it.cycleType === "Y" && iv === "年度") {
+            typeOsHJ.forEach((ib) => {
+              obj = {
+                windpowerstationName: iv,
+                wdss: ib,
+                gzssdl: ib === "合计" ? it.gzssdl : it.tqgzssdl,
+                jhssdl: ib === "合计" ? it.jhssdl : it.tqjhssdl,
+                xdssdl: ib === "合计" ? it.xdssdl : it.tqxdssdl,
+                slssdl: ib === "合计" ? it.slssdl : it.tqslssdl,
+                xnssdl: ib === "合计" ? it.xnssdl : it.tqxnssdl,
+                zhj: ib === "合计" ? it.zhj : it.tqzhj,
+                hj: ib === "合计" ? it.hj : it.tqhj,
+              };
+              arr.push(obj);
+            });
+          }
+        }
       }
     });
+  });
+  console.log("wdssdl===>>", arr);
+  wdssdlfx.value = arr;
+  // 能耗指标分析(风电)
+  const stationArr = [
+    "吉山梁",
+    "繁食沟",
+    "草山梁",
+    "左庄",
+    "新庄",
+    "雷家山",
+    "月度",
+  ];
+  const typeArr = ["zhcydl", "fdcydl", "zbsh", "xbsh"];
+  res.data.nhzbfxlist.forEach((it) => {
+    if (it.wpid !== "月度") {
+      let obj = {
+        wpid: it.wpid,
+        type: "月累计",
+        zhcydl: it.yzhcydl,
+        fdcydl: it.yfdcydl,
+        zbsh: it.yzbsh,
+        xbsh: it.yxbsh,
+      };
+      nhzbfxlist.value.push(obj);
+      let obj2 = {
+        wpid: it.wpid,
+        type: "月同期",
+        zhcydl: it.ytqzhcydl,
+        fdcydl: it.ytqfdcydl,
+        zbsh: it.ytqzbsh,
+        xbsh: it.ytqxbsh,
+      };
+      nhzbfxlist.value.push(obj2);
+      let obj3 = {
+        wpid: it.wpid,
+        type: "年累计",
+        zhcydl: it.nzhcydl,
+        fdcydl: it.nfdcydl,
+        zbsh: it.nzbsh,
+        xbsh: it.nxbsh,
+      };
+      nhzbfxlist.value.push(obj3);
+      let obj4 = {
+        wpid: it.wpid,
+        type: "年同期",
+        zhcydl: it.ntqzhcydl,
+        fdcydl: it.ntqfdcydl,
+        zbsh: it.ntqzbsh,
+        xbsh: it.ntqxbsh,
+      };
+      nhzbfxlist.value.push(obj4);
+    } else {
+      let obj = {
+        wpid: it.wpid,
+        type: "合计",
+        zhcydl: it.yzhcydl,
+        fdcydl: it.yfdcydl,
+        zbsh: it.yzbsh,
+        xbsh: it.yxbsh,
+      };
+      nhzbfxlist.value.push(obj);
+      let obj2 = {
+        wpid: it.wpid,
+        type: "同期合计",
+        zhcydl: it.ytqzhcydl,
+        fdcydl: it.ytqfdcydl,
+        zbsh: it.ytqzbsh,
+        xbsh: it.ytqxbsh,
+      };
+      nhzbfxlist.value.push(obj2);
+    }
+  });
 
-    //单机性能指标对比分析
-    for (let i in res.data.xnzbdbfx) {
-      if (i === "繁食沟风电场") {
-        fanshigouXN.value = res.data.xnzbdbfx[i];
-      } else if (i === "草山梁风电场") {
-        caoshaniangXN.value = res.data.xnzbdbfx[i];
-      } else if (i === "吉山梁风电场") {
-        jishanliangXN.value = res.data.xnzbdbfx[i];
-      } else if (i === "左庄风电场") {
-        zuozhuangXN.value = res.data.xnzbdbfx[i];
-      } else if (i === "新庄风电场") {
-        xingzhuangXN.value = res.data.xnzbdbfx[i];
-      } else if (i === "雷家山风电场") {
-        leijiashanXN.value = res.data.xnzbdbfx[i];
-      }
+  //单机性能指标对比分析
+  for (let i in res.data.xnzbdbfx) {
+    if (i === "繁食沟风电场") {
+      fanshigouXN.value = res.data.xnzbdbfx[i];
+    } else if (i === "草山梁风电场") {
+      caoshaniangXN.value = res.data.xnzbdbfx[i];
+    } else if (i === "吉山梁风电场") {
+      jishanliangXN.value = res.data.xnzbdbfx[i];
+    } else if (i === "左庄风电场") {
+      zuozhuangXN.value = res.data.xnzbdbfx[i];
+    } else if (i === "新庄风电场") {
+      xingzhuangXN.value = res.data.xnzbdbfx[i];
+    } else if (i === "雷家山风电场") {
+      leijiashanXN.value = res.data.xnzbdbfx[i];
     }
   }
 };
@@ -1911,11 +1926,17 @@ watch(
   }
 );
 
+const initPageData = () => {
+  stationList.value = jsonData.stationData;
+  tableData.value = jsonData.tableData;
+};
+
 onMounted(() => {
-  funGetStation();
+  initPageData();
+  // funGetStation();
+  // addform();
   theme.value = store.state.theme;
   tableHeight.value = window.innerHeight - 110 + "px";
-  addform();
 });
 </script>
 <style lang="less" scoped>

File diff suppressed because it is too large
+ 1487 - 4847
src/views/home/component/data.json


BIN
src/views/home/fc.png


File diff suppressed because it is too large
+ 16 - 0
src/views/home/fc.svg


BIN
src/views/home/gf.png


File diff suppressed because it is too large
+ 16 - 0
src/views/home/gf.svg


File diff suppressed because it is too large
+ 541 - 63
src/views/home/index.vue


+ 62 - 0
src/views/intelligentReporting/fdlrb/index.vue

@@ -0,0 +1,62 @@
+<template>
+  <div :style="pageHeight">
+    <iframe
+      :src="url"
+      width="100%"
+      height="100%"
+      frameborder="0"
+      scrolling="auto"
+    ></iframe>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      url: null,
+    };
+  },
+  computed: {
+    pageHeight() {
+      return {
+        height: document.documentElement.clientHeight - 80 + "px",
+      };
+    },
+  },
+  watch: {
+    $route: {
+      handler: function (route) {
+        this.url = null;
+        if (route.query.name) {
+          if (route.query.name === "xinzhuang") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$6a2108d151244a918b742bc47414daa3&id=admin&pw=admin`;
+          } else if (route.query.name === "jishanliang") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$7a5b111364fb4f378a6419ca38eafea4&id=admin&pw=admin`;
+          } else if (route.query.name === "zuozhuang") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$24531ed58d7c48739c1cd17b94b36f67&id=admin&pw=admin`;
+          } else if (route.query.name === "fanshigou") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$1223ec3c1c774c4894edf6d1dfd41bb1&id=admin&pw=admin`;
+          } else if (route.query.name === "caoshanliang") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$6b5da53b223140df8156cd632e627fb6&id=admin&pw=admin`;
+          } else if (route.query.name === "leijiashan") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$af611e23c7f84330b4e3c310cbe5ffd6&id=admin&pw=admin`;
+          }
+        }
+      },
+      immediate: true,
+    },
+  },
+};
+</script>

+ 62 - 0
src/views/intelligentReporting/swdlrb/index.vue

@@ -0,0 +1,62 @@
+<template>
+  <div :style="pageHeight">
+    <iframe
+      :src="url"
+      width="100%"
+      height="100%"
+      frameborder="0"
+      scrolling="auto"
+    ></iframe>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      url: null,
+    };
+  },
+  computed: {
+    pageHeight() {
+      return {
+        height: document.documentElement.clientHeight - 80 + "px",
+      };
+    },
+  },
+  watch: {
+    $route: {
+      handler: function (route) {
+        this.url = null;
+        if (route.query.name) {
+          if (route.query.name === "xinzhuang") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$81a48bfcfb3c48899a5170820647c2e9&id=admin&pw=admin`;
+          } else if (route.query.name === "jishanliang") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$cb43c0e41a7c4843873210e852497216&id=admin&pw=admin`;
+          } else if (route.query.name === "zuozhuang") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$390fa37a63d548afb62c62c42bc873ea&id=admin&pw=admin`;
+          } else if (route.query.name === "fanshigou") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$0017b69c21894ad295a31fd3ad689fa0&id=admin&pw=admin`;
+          } else if (route.query.name === "caoshanliang") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$32b145f06acb4b478aeb357458556d42&id=admin&pw=admin`;
+          } else if (route.query.name === "leijiashan") {
+            this.url = `${
+              this.reportBaseUrl || "http://172.16.12.101:8083"
+            }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$27f75fd0d56b4e10bee8984f54e89e34&id=admin&pw=admin`;
+          }
+        }
+      },
+      immediate: true,
+    },
+  },
+};
+</script>

+ 33 - 0
src/views/intelligentReporting/yxdtjb/index.vue

@@ -0,0 +1,33 @@
+<template>
+  <div :style="pageHeight">
+    <iframe
+      :src="url"
+      width="100%"
+      height="100%"
+      frameborder="0"
+      scrolling="auto"
+    ></iframe>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      url: null,
+    };
+  },
+  computed: {
+    pageHeight() {
+      return {
+        height: document.documentElement.clientHeight - 80 + "px",
+      };
+    },
+  },
+
+  created() {
+    this.url = `${
+      this.reportBaseUrl || "http://172.16.12.101:8083"
+    }/rbi/ebibase/showreport.do?resid=EANA$2$2$1$bd71f31ba69443b5b3f3997965927c41$6e66adeec7ff4fd7a52ab13dcc3e85e8`;
+  },
+};
+</script>

File diff suppressed because it is too large
+ 947 - 690
src/views/powerPrediction/batteryDivinerPage.vue


File diff suppressed because it is too large
+ 1077 - 0
src/views/powerPrediction/component/batteryDiviner.json


File diff suppressed because it is too large
+ 1818 - 0
src/views/powerPrediction/component/homePageNoMap.json


File diff suppressed because it is too large
+ 3829 - 0
src/views/powerPrediction/component/panoramicPower.json


File diff suppressed because it is too large
+ 1478 - 0
src/views/powerPrediction/component/power.json


+ 333 - 0
src/views/powerPrediction/component/statisticalSummary.json

@@ -0,0 +1,333 @@
+{
+    "dlStationsAllData": {
+        "list": [
+            {
+                "no": 1,
+                "areaNo": null,
+                "areaBelongs": null,
+                "stationName": "草山梁风电场",
+                "stationCode": "GJNY_SXGS_CSL_FDC_STA",
+                "stationType": null,
+                "stationLongitude": null,
+                "stationLatitude": null,
+                "numberUnits": null,
+                "installedCapacity": null,
+                "affiliatedCompany": null,
+                "itemVal": "0"
+            },
+            {
+                "no": 2,
+                "areaNo": null,
+                "areaBelongs": null,
+                "stationName": "繁食沟风电场",
+                "stationCode": "GJNY_SXGS_FSG_FDC_STA",
+                "stationType": null,
+                "stationLongitude": null,
+                "stationLatitude": null,
+                "numberUnits": null,
+                "installedCapacity": null,
+                "affiliatedCompany": null,
+                "itemVal": "0"
+            },
+            {
+                "no": 3,
+                "areaNo": null,
+                "areaBelongs": null,
+                "stationName": "吉山梁风电场",
+                "stationCode": "GJNY_SXGS_JSL_FDC_STA",
+                "stationType": null,
+                "stationLongitude": null,
+                "stationLatitude": null,
+                "numberUnits": null,
+                "installedCapacity": null,
+                "affiliatedCompany": null,
+                "itemVal": "0"
+            },
+            {
+                "no": 4,
+                "areaNo": null,
+                "areaBelongs": null,
+                "stationName": "雷家山风电场",
+                "stationCode": "GJNY_SXGS_LJS_FDC_STA",
+                "stationType": null,
+                "stationLongitude": null,
+                "stationLatitude": null,
+                "numberUnits": null,
+                "installedCapacity": null,
+                "affiliatedCompany": null,
+                "itemVal": "0"
+            },
+            {
+                "no": 5,
+                "areaNo": null,
+                "areaBelongs": null,
+                "stationName": "新庄风电场",
+                "stationCode": "GJNY_SXGS_XZ_FDC_STA",
+                "stationType": null,
+                "stationLongitude": null,
+                "stationLatitude": null,
+                "numberUnits": null,
+                "installedCapacity": null,
+                "affiliatedCompany": null,
+                "itemVal": "0"
+            },
+            {
+                "no": 6,
+                "areaNo": null,
+                "areaBelongs": null,
+                "stationName": "左庄风电场",
+                "stationCode": "GJNY_SXGS_ZZ_FDC_STA",
+                "stationType": null,
+                "stationLongitude": null,
+                "stationLatitude": null,
+                "numberUnits": null,
+                "installedCapacity": null,
+                "affiliatedCompany": null,
+                "itemVal": "0"
+            }
+        ]
+    },
+    "monthlyPowerGenerationReportData": {
+        "dataFormatList": [
+            {
+                "name": "计划发电",
+                "xAxisData": null,
+                "data": [
+                    655.4272143343635,
+                    631.9772587842104,
+                    393.2130772338839,
+                    214.51094605668155,
+                    436.06115848579213,
+                    416.6042996534019,
+                    226.02820972697342,
+                    314.9898799795777,
+                    354.963050645641,
+                    53.38773954351188,
+                    323.7378451035347,
+                    466.3745094050813,
+                    515.2775475951131,
+                    475.91079133021077,
+                    159.3552651225098,
+                    569.7847341416248,
+                    557.764372769475,
+                    420.8448218703213,
+                    361.63915412709525,
+                    833.9552745957776,
+                    359.7766684417222,
+                    679.5994221436101,
+                    455.49015960402664,
+                    186.73232541832436,
+                    260.92281105712783,
+                    583.7756199781089,
+                    346.5250507703825,
+                    285.58242392845887,
+                    240.70469721252076,
+                    124.08941761573715,
+                    137.46863451013087
+                ]
+            },
+            {
+                "name": "实际发电",
+                "xAxisData": null,
+                "data": [
+                    943.5465853759765,
+                    881.7822935400391,
+                    620.3793248156738,
+                    310.50329836486816,
+                    321.03446943237304,
+                    460.9857621428223,
+                    340.7591409921875,
+                    322.7985429716797,
+                    351.8570800793457,
+                    266.4707186595459,
+                    268.68920917822265,
+                    455.14478177612307,
+                    620.1992219482422,
+                    692.1134234814454,
+                    293.8751442519531,
+                    375.6453613366699,
+                    636.6001706801758,
+                    535.1059837768555,
+                    266.38904732177735,
+                    619.2797693071288,
+                    564.1080971044921,
+                    429.39609815063477,
+                    619.5286955737305,
+                    263.66159691711425,
+                    193.99697123876953,
+                    399.0864174707031,
+                    529.5217597668457,
+                    386.3341692456055,
+                    233.5554613522949,
+                    166.7521723807373,
+                    165.45233699108888
+                ]
+            }
+        ],
+        "dateList": [
+            "2024-08-01 00:00:00",
+            "2024-08-02 00:00:00",
+            "2024-08-03 00:00:00",
+            "2024-08-04 00:00:00",
+            "2024-08-05 00:00:00",
+            "2024-08-06 00:00:00",
+            "2024-08-07 00:00:00",
+            "2024-08-08 00:00:00",
+            "2024-08-09 00:00:00",
+            "2024-08-10 00:00:00",
+            "2024-08-11 00:00:00",
+            "2024-08-12 00:00:00",
+            "2024-08-13 00:00:00",
+            "2024-08-14 00:00:00",
+            "2024-08-15 00:00:00",
+            "2024-08-16 00:00:00",
+            "2024-08-17 00:00:00",
+            "2024-08-18 00:00:00",
+            "2024-08-19 00:00:00",
+            "2024-08-20 00:00:00",
+            "2024-08-21 00:00:00",
+            "2024-08-22 00:00:00",
+            "2024-08-23 00:00:00",
+            "2024-08-24 00:00:00",
+            "2024-08-25 00:00:00",
+            "2024-08-26 00:00:00",
+            "2024-08-27 00:00:00",
+            "2024-08-28 00:00:00",
+            "2024-08-29 00:00:00",
+            "2024-08-30 00:00:00",
+            "2024-08-31 00:00:00"
+        ]
+    },
+    "annualPowerGenerationReportData": {
+        "list": [
+            {
+                "dataTime": null,
+                "theoreticalPower": null,
+                "availablePower": null,
+                "actualPowerDq": null,
+                "veryShortTermForecastDq": null,
+                "shortTermForecastDq": null,
+                "actualPowerTq": null,
+                "veryShortTermForecastTq": null,
+                "shortTermForecastTq": null,
+                "actualPowerSy": null,
+                "veryShortTermForecastSy": null,
+                "shortTermForecastSy": null,
+                "actualWindSpeedDq": null,
+                "forecastWindSpeedDq": null,
+                "actualWindSpeedTq": null,
+                "forecastWindSpeedTq": null,
+                "actualWindSpeedSy": null,
+                "forecastWindSpeedSy": null,
+                "january": 13571.0,
+                "february": 12336.0,
+                "march": 14522.0,
+                "april": 14217.0,
+                "may": 16586.0,
+                "june": 11568.0,
+                "july": 12571.0,
+                "august": 11813.0,
+                "september": 10362.0,
+                "october": 10852.0,
+                "november": 14667.0,
+                "december": 14962.0
+            },
+            {
+                "dataTime": null,
+                "theoreticalPower": null,
+                "availablePower": null,
+                "actualPowerDq": null,
+                "veryShortTermForecastDq": null,
+                "shortTermForecastDq": null,
+                "actualPowerTq": null,
+                "veryShortTermForecastTq": null,
+                "shortTermForecastTq": null,
+                "actualPowerSy": null,
+                "veryShortTermForecastSy": null,
+                "shortTermForecastSy": null,
+                "actualWindSpeedDq": null,
+                "forecastWindSpeedDq": null,
+                "actualWindSpeedTq": null,
+                "forecastWindSpeedTq": null,
+                "actualWindSpeedSy": null,
+                "forecastWindSpeedSy": null,
+                "january": 0.0,
+                "february": 2.150786504149437,
+                "march": 14240.562750816345,
+                "april": 12148.8503074646,
+                "may": 11444.175255775452,
+                "june": 11340.811696052551,
+                "july": 12381.828666687012,
+                "august": 13534.553098678589,
+                "september": 11298.67358561877,
+                "october": 9471.594007492065,
+                "november": 10840.493476390839,
+                "december": 10651.513054996729
+            },
+            {
+                "dataTime": null,
+                "theoreticalPower": null,
+                "availablePower": null,
+                "actualPowerDq": null,
+                "veryShortTermForecastDq": null,
+                "shortTermForecastDq": null,
+                "actualPowerTq": null,
+                "veryShortTermForecastTq": null,
+                "shortTermForecastTq": null,
+                "actualPowerSy": null,
+                "veryShortTermForecastSy": null,
+                "shortTermForecastSy": null,
+                "actualWindSpeedDq": null,
+                "forecastWindSpeedDq": null,
+                "actualWindSpeedTq": null,
+                "forecastWindSpeedTq": null,
+                "actualWindSpeedSy": null,
+                "forecastWindSpeedSy": null,
+                "january": 0.0,
+                "february": 0.0,
+                "march": 0.0,
+                "april": 0.0,
+                "may": 0.0,
+                "june": 0.0,
+                "july": 0.0,
+                "august": 0.0,
+                "september": 0.0,
+                "october": 0.0,
+                "november": 0.0,
+                "december": 0.0
+            },
+            {
+                "dataTime": null,
+                "theoreticalPower": null,
+                "availablePower": null,
+                "actualPowerDq": null,
+                "veryShortTermForecastDq": null,
+                "shortTermForecastDq": null,
+                "actualPowerTq": null,
+                "veryShortTermForecastTq": null,
+                "shortTermForecastTq": null,
+                "actualPowerSy": null,
+                "veryShortTermForecastSy": null,
+                "shortTermForecastSy": null,
+                "actualWindSpeedDq": null,
+                "forecastWindSpeedDq": null,
+                "actualWindSpeedTq": null,
+                "forecastWindSpeedTq": null,
+                "actualWindSpeedSy": null,
+                "forecastWindSpeedSy": null,
+                "january": 0.0,
+                "february": 0.0,
+                "march": 0.0,
+                "april": 0.0,
+                "may": 0.0,
+                "june": 0.0,
+                "july": 0.0,
+                "august": 0.0,
+                "september": 0.0,
+                "october": 0.0,
+                "november": 0.0,
+                "december": 0.0
+            }
+        ]
+    }
+}

File diff suppressed because it is too large
+ 106 - 0
src/views/powerPrediction/component/weather.json


File diff suppressed because it is too large
+ 2251 - 1875
src/views/powerPrediction/homePageNoMap.vue


File diff suppressed because it is too large
+ 741 - 604
src/views/powerPrediction/panoramicPower.vue


File diff suppressed because it is too large
+ 1511 - 1171
src/views/powerPrediction/powerPredictionPage.vue


File diff suppressed because it is too large
+ 895 - 687
src/views/powerPrediction/statisticalSummaryPage.vue


File diff suppressed because it is too large
+ 1952 - 1515
src/views/powerPrediction/weatherPage.vue