rui.jiang 5 月之前
父節點
當前提交
ebfcaeebf7
共有 77 個文件被更改,包括 1825 次插入1594 次删除
  1. 68 115
      aa.html
  2. 3 3
      src/components/map/index.vue
  3. 0 0
      src/icons/svg/themes.svg
  4. 1 0
      src/icons/svg/themes2.svg
  5. 11 1
      src/store/themes.js
  6. 4 4
      src/views/overview/components/analysis_information/index.vue
  7. 8 3
      src/views/overview/components/cp/index.vue
  8. 6 3
      src/views/overview/components/cp_trend/index.vue
  9. 8 3
      src/views/overview/components/cp_windspeed/index.vue
  10. 6 3
      src/views/overview/components/data_integrity_minute/index.vue
  11. 6 3
      src/views/overview/components/data_integrity_second/index.vue
  12. 1 1
      src/views/overview/components/dicCard/index.vue
  13. 7 4
      src/views/overview/components/fault_all/index.vue
  14. 6 3
      src/views/overview/components/fault_unit/index.vue
  15. 170 35
      src/views/overview/components/filterChart/index.vue
  16. 8 4
      src/views/overview/components/min_pitch/index.vue
  17. 7 3
      src/views/overview/components/pitch_generator_speed/index.vue
  18. 8 3
      src/views/overview/components/pitch_power/index.vue
  19. 8 4
      src/views/overview/components/pitch_tsr_cp/index.vue
  20. 7 16
      src/views/overview/components/power_curve/index.vue
  21. 7 3
      src/views/overview/components/power_scatter/index.vue
  22. 7 3
      src/views/overview/components/power_scatter_2D/index.vue
  23. 7 4
      src/views/overview/components/production_indicator_all/index.vue
  24. 7 4
      src/views/overview/components/production_indicator_unit/index.vue
  25. 7 4
      src/views/overview/components/rated_power_windspeed/index.vue
  26. 7 3
      src/views/overview/components/rated_windspeed/index.vue
  27. 9 3
      src/views/overview/components/speed_power/index.vue
  28. 8 10
      src/views/overview/components/speed_torque/index.vue
  29. 7 3
      src/views/overview/components/temperature_environment/index.vue
  30. 8 3
      src/views/overview/components/temperature_large_components_Winding_tem/index.vue
  31. 8 3
      src/views/overview/components/temperature_large_components_adriven/index.vue
  32. 8 3
      src/views/overview/components/temperature_large_components_hig/index.vue
  33. 8 3
      src/views/overview/components/temperature_large_components_low/index.vue
  34. 8 3
      src/views/overview/components/temperature_large_components_mid/index.vue
  35. 8 3
      src/views/overview/components/temperature_large_components_min/index.vue
  36. 7 3
      src/views/overview/components/temperature_large_components_tem_deviation/index.vue
  37. 8 3
      src/views/overview/components/temperature_large_components_undriven/index.vue
  38. 8 3
      src/views/overview/components/tsr/index.vue
  39. 8 3
      src/views/overview/components/tsr_cp_power/index.vue
  40. 12 8
      src/views/overview/components/tsr_cp_power_scatter/index.vue
  41. 7 4
      src/views/overview/components/tsr_trend/index.vue
  42. 9 4
      src/views/overview/components/tsr_windspeed/index.vue
  43. 7 3
      src/views/overview/components/wind_direction_frequency/index.vue
  44. 9 5
      src/views/overview/components/wind_speed/index.vue
  45. 7 3
      src/views/overview/components/wind_speed_frequency/index.vue
  46. 8 4
      src/views/overview/components/yaw_error/index.vue
  47. 7 3
      src/views/overview/components/yaw_error_density/index.vue
  48. 92 19
      src/views/overview/index.vue
  49. 7 8
      src/views/performance/assetssDetail.vue
  50. 6 6
      src/views/performance/components/EditAnalysis.vue
  51. 129 39
      src/views/performance/components/PlotlyCharts.vue
  52. 1 1
      src/views/performance/components/abnormalDetail.vue
  53. 33 18
      src/views/performance/components/analysisEvent.vue
  54. 200 205
      src/views/performance/components/chartsCom/3DDrawingChart.vue
  55. 6 26
      src/views/performance/components/chartsCom/BarChart.vue
  56. 70 42
      src/views/performance/components/chartsCom/BoxLineCharts.vue
  57. 53 2
      src/views/performance/components/chartsCom/BoxMarkersCharts.vue
  58. 5 1
      src/views/performance/components/chartsCom/FaultAll.vue
  59. 3 1
      src/views/performance/components/chartsCom/FaultUnit.vue
  60. 57 12
      src/views/performance/components/chartsCom/GeneratorTemperature.vue
  61. 29 3
      src/views/performance/components/chartsCom/HeatmapCharts.vue
  62. 0 43
      src/views/performance/components/chartsCom/MarkersCharts.vue
  63. 0 395
      src/views/performance/components/chartsCom/NoColourBandTwoDMarkerChart.vue
  64. 188 91
      src/views/performance/components/chartsCom/Time3DChart.vue
  65. 123 35
      src/views/performance/components/chartsCom/TwoDMarkersChart.vue
  66. 24 9
      src/views/performance/components/chartsCom/WindRoseChart.vue
  67. 0 105
      src/views/performance/components/chartsCom/YawErrorDensityChart.vue
  68. 14 2
      src/views/performance/components/chartsCom/YewErrorBarChart.vue
  69. 57 7
      src/views/performance/components/chartsCom/lineAndChildLine.vue
  70. 0 144
      src/views/performance/components/chartsCom/lineChart.vue
  71. 79 44
      src/views/performance/components/chartsCom/lineChartsFen.vue
  72. 59 17
      src/views/performance/components/chartsCom/powerMarkers2DCharts.vue
  73. 4 2
      src/views/performance/components/chartsCom/yawErrorBarSum.vue
  74. 30 3
      src/views/performance/components/chartsCom/yawErrorLine.vue
  75. 二進制
      src2.13.zip
  76. 二進制
      src2.14.zip
  77. 2 2
      vue.config.js

+ 68 - 115
aa.html

@@ -1,132 +1,85 @@
 <!DOCTYPE html>
-<html>
+<html lang="en">
   <head>
-    <meta charset="utf-8" />
-    <title>3D Scatter Chart with ECharts-GL</title>
-    <!-- 引入 ECharts 和 ECharts-GL -->
-    <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.0/dist/echarts.min.js"></script>
-    <script src="https://cdn.jsdelivr.net/npm/echarts-gl@2.0.9/dist/echarts-gl.min.js"></script>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>3D Scatter Plot</title>
+    <!-- 使用备用 CDN 加载 Plotly.js -->
+    <script src="https://cdn.bootcdn.net/ajax/libs/plotly.js/2.35.3/plotly.min.js"></script>
   </head>
   <body>
-    <!-- 准备一个具备宽高的 DOM 容器 -->
-    <div id="main" style="width: 600px; height: 600px"></div>
+    <div id="plotly-3d-chart" style="width: 100%; height: 600px"></div>
 
     <script>
-      // 初始化图表
-      const myChart = echarts.init(document.getElementById("main"));
+      // 原始数据
+      const xData = [5.1, 4.9, 4.7, 4.6, 5.0, 5.4, 4.6, 5.0, 4.4, 4.9]; // sepal_length
+      const yData = [3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1]; // sepal_width
+      const zData = [0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.2]; // petal_width
+      const species = [
+        "setosa",
+        "setosa",
+        "setosa",
+        "setosa",
+        "setosa",
+        "versicolor",
+        "versicolor",
+        "versicolor",
+        "virginica",
+        "virginica",
+      ];
 
-      // 生成随机测试数据(100个点)
-      function generateRandomData(count) {
-        let data = [];
-        for (let i = 0; i < count; i++) {
-          data.push([
-            Math.random() * 10, // x
-            Math.random() * 10, // y
-            Math.random() * 10, // z
-            Math.random(), // 用于颜色映射的第四个维度(可选)
-          ]);
-        }
-        return data;
-      }
-
-      // 配置项
-      const option = {
-        // 启用 3D 坐标系
-        globe: {
-          environment: "auto",
-          backgroundColor: "#FFFFFF", // 设置背景为白色
-          baseTexture: null, // 移除默认的球体纹理(不显示黑色球体)
-        },
-        // 3D 坐标轴配置
-        xAxis3D: {
-          type: "value",
-          name: "X Axis",
-        },
-        yAxis3D: {
-          type: "value",
-          name: "Y Axis",
-        },
-        zAxis3D: {
-          type: "value",
-          name: "Z Axis",
-        },
-        // 3D 网格配置
-        grid3D: {
-          viewControl: {
-            autoRotate: true, // 自动旋转
-            autoRotateSpeed: 10, // 旋转速度(1-10)
-          },
-          axisPointer: {
-            show: true,
-            color: "#fff",
+      // 创建 trace 数组
+      const data = [
+        {
+          type: "scatter3d",
+          mode: "markers",
+          x: xData.slice(0, 5), // Setosa
+          y: yData.slice(0, 5),
+          z: zData.slice(0, 5),
+          marker: {
+            color: ["red", "red", "red", "red", "red"], // 为 Setosa 设置颜色
+            size: 10,
           },
+          name: "Setosa", // 图例中的名称
         },
-        // 数据集(使用随机生成的数据)
-        dataset: {
-          source: generateRandomData(100),
-        },
-        // 系列配置
-        series: [
-          {
-            type: "scatter3D",
-            // 数据维度映射(x, y, z)
-            encode: {
-              x: 0,
-              y: 1,
-              z: 2,
-            },
-            // 点的大小
-            symbolSize: 8,
-            // 颜色配置(使用第四个维度)
-            itemStyle: {
-              color: function (params) {
-                // 使用第四个维度值映射到颜色
-                const value = params.value[3];
-                return echarts.color.modifyHSL(
-                  "#5A94DF",
-                  undefined,
-                  undefined,
-                  undefined,
-                  value * 0.5
-                );
-              },
-            },
+        {
+          type: "scatter3d",
+          mode: "markers",
+          x: xData.slice(5, 8), // Versicolor
+          y: yData.slice(5, 8),
+          z: zData.slice(5, 8),
+          marker: {
+            color: ["green", "green", "green"], // 为 Versicolor 设置颜色
+            size: 10,
           },
-        ],
-        // 工具栏
-        toolbox: {
-          show: true,
-          feature: {
-            saveAsImage: {
-              show: true,
-              type: "png",
-            },
-            myTool: {
-              show: true,
-              title: "切换视角",
-              icon: "path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z",
-              onclick: function () {
-                myChart.setOption({
-                  grid3D: {
-                    viewControl: {
-                      alpha: 45,
-                      beta: 30,
-                    },
-                  },
-                });
-              },
-            },
+          name: "Versicolor", // 图例中的名称
+        },
+        {
+          type: "scatter3d",
+          mode: "markers",
+          x: xData.slice(8), // Virginica
+          y: yData.slice(8),
+          z: zData.slice(8),
+          marker: {
+            color: ["blue", "blue"], // 为 Virginica 设置颜色
+            size: 10,
           },
+          name: "Virginica", // 图例中的名称
         },
-      };
+      ];
 
-      // 应用配置
-      myChart.setOption(option);
+      const layout = {
+        title: "3D Scatter Plot of Iris Dataset",
+        scene: {
+          xaxis: { title: "Sepal Length" },
+          yaxis: { title: "Sepal Width" },
+          zaxis: { title: "Petal Width" },
+        },
+        showlegend: true, // 显示图例
+      };
 
-      // 窗口大小改变时自动调整图表
-      window.addEventListener("resize", function () {
-        myChart.resize();
-      });
+      // 使用 Plotly 绘制图表
+      Plotly.newPlot("plotly-3d-chart", data, layout);
     </script>
   </body>
 </html>

+ 3 - 3
src/components/map/index.vue

@@ -31,7 +31,7 @@
           <span>纬度</span><span>{{ hoverInfo.latitude }}°</span>
         </p>
         <p>
-          <span>分析型数</span
+          <span>分析型数</span
           ><span
             >{{
               hoverInfo.analysisTypeCount ? hoverInfo.analysisTypeCount : 0
@@ -235,8 +235,8 @@ export default {
         new TileLayer({
           source: new XYZ({
             // url: "http://127.0.0.1:8010/tiles/{z}/{x}/{y}.png", //本地
-            // url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
-            url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
+            url: "http://192.168.50.235/tiles/{z}/{x}/{y}.png", //内网
+            // url: "http://106.120.102.238:18000/tiles/{z}/{x}/{y}.png", //外网
             // url: "http://10.96.137.5:9080/tiles/{z}/{x}/{y}.png", //大~#@唐
           }),
         }),

文件差異過大導致無法顯示
+ 0 - 0
src/icons/svg/themes.svg


+ 1 - 0
src/icons/svg/themes2.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1740377160625" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1637" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M298.35 84.69h427.3a213.65 213.65 0 0 1 213.66 213.66v427.3a213.65 213.65 0 0 1-213.66 213.66H298.34A213.65 213.65 0 0 1 84.69 725.66V298.35A213.66 213.66 0 0 1 298.35 84.69z" fill="#E8E7E6" p-id="1638"></path><path d="M792 504.56l-1.34 0.05C777.09 368.79 662.9 262.74 524 262.74c-144.77 0-262.71 115.19-267.82 259.21h23.91l-24 0.81c-3.76 125 67.29 236.09 201.55 273s112.74-61.85 100.78-69.09-20.39-26.83-9.83-49.35 19.64-21.31 68.82-22.21C750.85 657.28 782.39 562 789.75 522h2.06c-0.12-3.29-0.31-6.57-0.54-9.83 0.58-4.83 0.73-7.61 0.73-7.61z m-434 29.65a48.1 48.1 0 1 1 47.84-48.1 48 48 0 0 1-47.84 48.1z m88.6-116.07a48 48 0 1 1 47.95-48 48 48 0 0 1-47.93 48z m150 2.53a48.1 48.1 0 1 1 47.85-48.1 48 48 0 0 1-47.85 48.1z m93.26 113.54a48.1 48.1 0 1 1 47.95-48.1 48 48 0 0 1-47.95 48.1z" fill="#DD4F47" p-id="1639"></path></svg>

+ 11 - 1
src/store/themes.js

@@ -1,24 +1,34 @@
+import { theme } from "tailwindcss/stubs/defaultConfig.stub";
+
 /*
  * @Author: your name
  * @Date: 2024-05-27 15:09:27
- * @LastEditTime: 2024-06-04 09:23:28
+ * @LastEditTime: 2025-02-24 15:24:11
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/store/themes.js
  */
 export default {
+  namespaced: true,
   state: {
     theme: localStorage.getItem("theme") || "green",
+    themeColor: [],
   },
   mutations: {
     setTheme(state, theme) {
       state.theme = theme;
       localStorage.setItem("theme", theme);
     },
+    setThemeColor(state, theme) {
+      state.themeColor = theme;
+    },
   },
   actions: {
     switchTheme({ commit }, theme) {
       commit("setTheme", theme);
     },
+    themeChange({ commit }, theme) {
+      commit("setThemeColor", theme);
+    },
   },
 };

+ 4 - 4
src/views/overview/components/analysis_information/index.vue

@@ -164,7 +164,7 @@
       </div>
     </div>
     <div class="box-min">
-      <h4>完成分析型:</h4>
+      <h4>完成分析型:</h4>
       <template v-if="analysisInfo && analysisInfo.analysisTypes?.length > 0">
         <div
           class="analysisTypes"
@@ -183,7 +183,7 @@
         </div>
       </template>
 
-      <el-empty v-else description="暂无完成分析型"></el-empty>
+      <el-empty v-else description="暂无完成分析型"></el-empty>
     </div>
   </el-card>
 </template>
@@ -212,7 +212,7 @@ export default {
         fieldCode: "",
       }, //风场信息
       fieldCode: "", //风场编号
-      analysisInfo: {}, //分析型编号
+      analysisInfo: {}, //分析型编号
       activeNames: ["1", "2", "3"],
       data: [
         1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
@@ -270,7 +270,7 @@ export default {
         const res = await getFieldInfo({ batchCode: this.initBatchCode });
         if (res.code === 200) {
           this.fieldInfo = res.data.fieldInfo; //风场信息
-          this.analysisInfo = res.data.analysisInfo; //分析型编号
+          this.analysisInfo = res.data.analysisInfo; //分析型编号
         }
       } catch (err) {
       } finally {

+ 8 - 3
src/views/overview/components/cp/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:05:58
- * @LastEditTime: 2025-02-12 15:08:11
+ * @LastEditTime: 2025-02-26 10:39:16
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/cp/index.vue
@@ -14,6 +14,7 @@
       <FilterChart
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
+        :setUpimg="['有功功率', '风能利用系数']"
         @handlePrevious="handlePrevious"
         @handleNext="handleNext"
       ></FilterChart>
@@ -44,6 +45,7 @@
       <el-empty description="暂无分析记录" v-else></el-empty>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="`${new Date().getTime()}` + item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="`${new Date().getTime()}` + item.batchCode"
@@ -60,6 +62,7 @@
       <el-empty description="暂无分析记录" v-else></el-empty>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="`${new Date().getTime()}` + item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="`${new Date().getTime()}` + item.fieldEngineCode"
@@ -163,6 +166,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -189,7 +193,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -310,8 +314,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = setUpImg;
       this.getAnalysisDetail();
     },
     //下一条

+ 6 - 3
src/views/overview/components/cp_trend/index.vue

@@ -4,6 +4,7 @@
     <div class="left">
       <FilterChart
         :windList="windEngineGroupList"
+        :setUpimg="['风能利用系数']"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
         @handleNext="handleNext"
@@ -32,6 +33,7 @@
         v-slot="{ item, index }"
       >
         <BoxMarkersCharts
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="index + item.fieldEngineCode"
           :ref="item.fieldEngineCode"
@@ -129,6 +131,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       isShowDescription: false,
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
@@ -155,7 +158,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -282,10 +285,10 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
-      console.log(this.fieldEngineCodes, "this.fieldEngineCodes");
     },
     //下一条
     handleNext() {

+ 8 - 3
src/views/overview/components/cp_windspeed/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:08:00
- * @LastEditTime: 2025-02-12 17:00:19
+ * @LastEditTime: 2025-02-26 11:09:24
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/cp_windspeed/index.vue
@@ -13,6 +13,7 @@
     <div class="left">
       <FilterChart
         :windList="windEngineGroupList"
+        :setUpimg="['风能利用系数']"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
         @handleNext="handleNext"
@@ -44,6 +45,7 @@
       <el-empty description="暂无分析记录" v-else></el-empty>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index + item.batchCode"
           :ref="item.batchCode"
@@ -60,6 +62,7 @@
       <el-empty description="暂无分析记录" v-else></el-empty>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index + item.fieldEngineCode"
           :ref="item.fieldEngineCode"
@@ -163,6 +166,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       isShowDescription: false,
@@ -189,7 +193,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -310,8 +314,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 6 - 3
src/views/overview/components/data_integrity_minute/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 17:54:02
- * @LastEditTime: 2025-02-12 15:02:41
+ * @LastEditTime: 2025-02-26 11:17:15
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/data_integrity_minute/index.vue
@@ -11,6 +11,7 @@
     <!-- scada分钟级数据 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -137,6 +138,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       isShowDescription: false,
       commentDescriptionVos: [], //评论列表
       windEngineGroupList: [], //批次风机列表
@@ -158,7 +160,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -289,8 +291,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
       console.log(this.fieldEngineCodes, "this.fieldEngineCodes");
     },

+ 6 - 3
src/views/overview/components/data_integrity_second/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 17:55:01
- * @LastEditTime: 2025-02-12 15:45:23
+ * @LastEditTime: 2025-02-26 11:17:08
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/data_integrity_second/index.vue
@@ -12,6 +12,7 @@
     <!-- 秒级钟级SCADA数据完整度分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -139,6 +140,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       isShowDescription: false,
       commentDescriptionVos: [], //评论列表
       windEngineGroupList: [], //批次风机列表
@@ -160,7 +162,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -288,8 +290,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
       console.log(this.fieldEngineCodes, "this.fieldEngineCodes");
     },

+ 1 - 1
src/views/overview/components/dicCard/index.vue

@@ -88,7 +88,7 @@ export default {
         this.activeName = "current";
       }
     },
-    //分析
+    //分析
     // analysisTypeCode() {
     //   if (newVal) {
     //     this.analysisCommentDescListHistory()

+ 7 - 4
src/views/overview/components/fault_all/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-13 13:56:55
- * @LastEditTime: 2025-02-10 14:09:56
+ * @LastEditTime: 2025-02-26 11:09:02
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/fault_all/index.vue
@@ -12,6 +12,7 @@
     <!-- 全场故障统计 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -177,6 +178,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -236,7 +238,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -292,7 +294,7 @@ export default {
             Papa.parse(csvText, {
               header: true, // 使用 CSV 第一行作为键
               complete: (result) => {
-                // 根据分析型设置不同的数据
+                // 根据分析型设置不同的数据
                 if (analysisType === "fault") {
                   if (Object.keys(result.data[0]).includes("fault_detail")) {
                     //总图故障统计展示
@@ -397,8 +399,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 6 - 3
src/views/overview/components/fault_unit/index.vue

@@ -11,6 +11,7 @@
     <!-- 机组故障统计 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -170,6 +171,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       isShowDescription: false,
       commentDescriptionVos: [], //评论列表
       windEngineGroupList: [], //批次风机列表
@@ -229,7 +231,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -285,7 +287,7 @@ export default {
             Papa.parse(csvText, {
               header: true, // 使用 CSV 第一行作为键
               complete: (result) => {
-                // 根据分析型设置不同的数据
+                // 根据分析型设置不同的数据
                 if (analysisType === "fault") {
                   if (
                     Object.keys(result.data[0]).includes("wind_turbine_name")
@@ -382,8 +384,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 170 - 35
src/views/overview/components/filterChart/index.vue

@@ -1,52 +1,102 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-13 14:53:21
- * @LastEditTime: 2025-02-18 09:16:21
+ * @LastEditTime: 2025-02-26 14:10:27
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/filterChart/index.vue
 -->
 <template>
-  <el-form ref="form" :inline="true" :model="form" label-width="100px">
-    <el-form-item label="机组名称:" size="small" v-if="windList.length > 0">
-      <el-select
-        v-model="form.value2"
-        multiple
-        collapse-tags
-        placeholder="请选择机组名称"
+  <div class="filterChart">
+    <h3>图像设置:</h3>
+    <el-form ref="form" :inline="true" :model="form" label-width="100px">
+      <el-row>
+        <el-col>
+          <el-form-item
+            label="机组名称"
+            size="small"
+            v-if="windList.length > 0"
+          >
+            <el-select
+              v-model="form.value2"
+              multiple
+              collapse-tags
+              placeholder="请选择机组名称"
+            >
+              <el-option
+                v-for="(item, indWind) in windList"
+                :key="item.engineCode + indWind"
+                :label="item.engineName"
+                :value="item.engineCode"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-form-item
+        :label="`${inpItem.label}`"
+        v-for="(inpItem, inpInd) in form.dgeneratorSpeed"
       >
-        <el-option
-          v-for="(item, indWind) in windList"
-          :key="item.engineCode + indWind"
-          :label="item.engineName"
-          :value="item.engineCode"
+        <div class="demo-input-suffix">
+          <el-input
+            type="number"
+            :min="1"
+            size="small"
+            placeholder="步长"
+            v-model="inpItem.dtick"
+          >
+          </el-input>
+          <el-input
+            type="number"
+            :min="1"
+            size="small"
+            placeholder="最小值"
+            v-model="inpItem.min"
+          >
+          </el-input>
+          <el-input
+            type="number"
+            :min="1"
+            size="small"
+            placeholder="最大值"
+            v-model="inpItem.max"
+          >
+          </el-input>
+        </div>
+      </el-form-item>
+      <el-form-item>
+        <el-button
+          type="primary"
+          size="small"
+          @click="onSearch"
+          v-if="windList.length > 0"
+          >查询</el-button
         >
-        </el-option>
-      </el-select>
-    </el-form-item>
-    <el-form-item>
-      <el-button
-        type="primary"
-        size="small"
-        @click="onSearch"
-        v-if="windList.length > 0"
-        >查询</el-button
-      >
-      <el-button type="primary" size="small" @click="onSubmit('handlePrevious')"
-        >上一次分析结果</el-button
-      >
-      <el-button type="primary" size="small" @click="onSubmit('handleNext')"
-        >下一次分析结果</el-button
-      >
-    </el-form-item>
-  </el-form>
+        <el-button
+          type="primary"
+          size="small"
+          @click="onSubmit('handlePrevious')"
+          >上一次分析结果</el-button
+        >
+        <el-button type="primary" size="small" @click="onSubmit('handleNext')"
+          >下一次分析结果</el-button
+        >
+      </el-form-item>
+    </el-form>
+  </div>
 </template>
 <script>
 export default {
   name: "filterChart",
   props: {
     windList: {
-      default: [],
+      default: () => [],
+      type: Array,
+    },
+    setUpimg: {
+      default: () => [],
       type: Array,
     },
   },
@@ -54,12 +104,77 @@ export default {
     return {
       form: {
         value2: [],
+        dgeneratorSpeed: [
+          {
+            label: "有功功率",
+            text: [
+              "功率(kw)",
+              "有功功率(kw)",
+              "有功功率(kw)",
+              "功率(kW)",
+              "功率(kw)",
+              "有功功率(kW)",
+              "有功功率(kw)",
+            ],
+            dtick: null, //步长
+            min: null, //最小值
+            max: null, //最大值
+          },
+          {
+            label: "叶尖速比",
+            text: ["叶尖速比"],
+            dtick: null, //步长
+            min: null, //最小值
+            max: null, //最大值
+          },
+          {
+            label: "风能利用系数",
+            text: ["风能利用系数"],
+            dtick: null, //步长
+            min: null, //最小值
+            max: null, //最大值
+          },
+          {
+            label: "桨距角",
+            text: ["桨距角(度)", "桨距角(°)"],
+            dtick: null, //步长
+            min: null, //最小值
+            max: null, //最大值
+          },
+          {
+            label: "发电机转速",
+            text: ["发电机转速(r/min)", "发电机转速(r/min)"],
+            dtick: null, //步长
+            min: null, //最小值
+            max: null, //最大值
+          },
+          {
+            label: "实际扭矩",
+            text: ["扭矩(N·m)", "实际扭矩(N·m)"],
+            dtick: null, //步长
+            min: null, //最小值
+            max: null, //最大值
+          },
+        ],
       },
+      setUpImgData: [],
     };
   },
+  created() {
+    // 确保 this.form.dgeneratorSpeed 和 this.setUpimg 都已经初始化
+    if (
+      Array.isArray(this.form.dgeneratorSpeed) &&
+      Array.isArray(this.setUpimg)
+    ) {
+      this.form.dgeneratorSpeed = this.form.dgeneratorSpeed.filter(
+        (item) => this.setUpimg.includes(item.label) // 过滤出 label 在 setUpimg 中的项
+      );
+    }
+  },
+
   methods: {
     onSearch() {
-      this.$emit("getEnfineList", this.form.value2);
+      this.$emit("getEnfineList", this.form.value2, this.form.dgeneratorSpeed);
     },
     onSubmit(type) {
       if (type === "handlePrevious") {
@@ -71,4 +186,24 @@ export default {
   },
 };
 </script>
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+.filterChart {
+  h3 {
+    font-size: 16px;
+    font-weight: 500;
+    margin-top: 10px 0;
+  }
+}
+// ::v-deep.el-input--small .el-input__inner {
+//   width: 220px !important;
+// }
+.demo-input-suffix {
+  display: flex !important;
+}
+::v-deep.demo-input-suffix .el-input--small {
+  width: 100px !important;
+}
+::v-deep.demo-input-suffix .el-input--small .el-input__inner {
+  width: 90px !important;
+}
+</style>

+ 8 - 4
src/views/overview/components/min_pitch/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:08:13
- * @LastEditTime: 2025-02-17 17:11:19
+ * @LastEditTime: 2025-02-26 10:45:08
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/min_pitch/index.vue
@@ -12,6 +12,7 @@
     <!-- 最小桨距角分析--只有分图不存在总图 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['桨距角']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -36,10 +37,11 @@
       <VirtualList
         :list="diagramRelationsDatas"
         keyField="fieldEngineCode"
-        :itemSize="452"
+        :itemSize="500"
         v-slot="{ item, index }"
       >
         <TwoDMarkersChart
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -138,6 +140,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -164,7 +167,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -290,8 +293,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 3
src/views/overview/components/pitch_generator_speed/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:09:25
- * @LastEditTime: 2025-02-17 17:22:39
+ * @LastEditTime: 2025-02-26 11:01:03
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/pitch_generator_speed/index.vue
@@ -13,6 +13,7 @@
     <div class="left">
       <FilterChart
         :windList="windEngineGroupList"
+        :setUpimg="['桨距角', '发电机转速']"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
         @handleNext="handleNext"
@@ -40,6 +41,7 @@
         v-slot="{ item, index }"
       >
         <powerMarkers2DCharts
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -138,6 +140,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -164,7 +167,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -290,8 +293,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 3
src/views/overview/components/pitch_power/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:09:41
- * @LastEditTime: 2025-02-20 15:38:29
+ * @LastEditTime: 2025-02-26 11:05:29
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/pitch_power/index.vue
@@ -12,6 +12,7 @@
     <!-- 变桨和有功功率协调性分析--只有分图不存在总图 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['桨距角', '有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -40,6 +41,7 @@
         v-slot="{ item, index }"
       >
         <powerMarkers2DCharts
+          :setUpImgData="setUpImgData"
           v-if="getFileTypeFromUrl(item.fileAddr) === 'pitch_power'"
           :index="index + 'powerMarkers2DCharts'"
           :key="item.fieldEngineCode + 'powerMarkers2DCharts'"
@@ -47,6 +49,7 @@
           :fileAddr="item.fileAddr"
         ></powerMarkers2DCharts>
         <Time3DChart
+          :setUpImgData="setUpImgData"
           v-if="getFileTypeFromUrl(item.fileAddr) === '3D'"
           :key="item.fieldEngineCode + 'Time3DChart'"
           :index="index + 'fen'"
@@ -149,6 +152,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -175,7 +179,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -311,8 +315,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 4
src/views/overview/components/pitch_tsr_cp/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:09:55
- * @LastEditTime: 2025-02-19 15:24:51
+ * @LastEditTime: 2025-02-26 11:18:50
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/pitch_tsr_cp/index.vue
@@ -12,6 +12,7 @@
     <!-- 变桨和叶尖速比及风能利用系数分析--只有分图不存在总图 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['叶尖速比', '风能利用系数']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -34,10 +35,11 @@
       <VirtualList
         :list="diagramRelationsDatas"
         keyField="fileAddr"
-        :itemSize="452"
+        :itemSize="500"
         v-slot="{ item, index }"
       >
         <TwoDMarkersChart
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -136,6 +138,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -162,7 +165,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -288,8 +291,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 16
src/views/overview/components/power_curve/index.vue

@@ -1,12 +1,3 @@
-<!--
- * @Author: your name
- * @Date: 2025-01-09 18:10:08
- * @LastEditTime: 2025-02-18 15:25:04
- * @LastEditors: bogon
- * @Description: In User Settings Edit
- * @FilePath: /performance-test/src/views/overview/components/power_curve/index.vue
--->
-
 <template>
   <div class="type-variable">
     <!-- 有功功率曲线分析 -->
@@ -14,6 +5,7 @@
       <FilterChart
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
+        :setUpimg="['有功功率']"
         @handlePrevious="handlePrevious"
         @handleNext="handleNext"
       ></FilterChart>
@@ -76,6 +68,7 @@
             <el-col :span="24" :key="ind + 'rightTable'">
               <div class="rightTable">
                 <PlotlyCharts
+                  :setUpImgData="setUpImgData"
                   :lineMarkerData="powerCurveDom.chartsData"
                   :comType="'generalDrawing'"
                   :inds="`${new Date().getTime()}` + `zong${ind}`"
@@ -103,6 +96,7 @@
             >
               <div class="rightTable">
                 <PlotlyCharts
+                  :setUpImgData="setUpImgData"
                   :lineMarkerData="powerCurveDom.chartsData"
                   :comType="'graph'"
                   :inds="`${new Date().getTime()}` + `fen${ind}`"
@@ -202,9 +196,6 @@ import {
 } from "@/api/performance";
 import PlotlyCharts from "@/views/performance/components/PlotlyCharts.vue";
 import { downLoadCsvFile } from "@/utils/common";
-import { saveAs } from "file-saver";
-import JSZip from "jszip";
-import Papa from "papaparse";
 import axios from "axios";
 export default {
   name: "powerCurve",
@@ -241,6 +232,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -267,7 +259,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -375,8 +367,6 @@ export default {
         this.generalFilesData = generalFilesData.filter(
           (item) => item && item.chartsData
         );
-        console.log(this.generalFilesData, "总图");
-        console.log(this.graphFilesData, "分图");
       } catch (err) {
         console.error("Failed to fetch analysis details:", err);
       }
@@ -519,8 +509,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 3
src/views/overview/components/power_scatter/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:10:22
- * @LastEditTime: 2025-02-12 16:44:23
+ * @LastEditTime: 2025-02-26 11:19:23
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/power_scatter/index.vue
@@ -12,6 +12,7 @@
     <!-- 逐月有功功率散点3D分析--只有分图不存在总图 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -39,6 +40,7 @@
         v-slot="{ item, index }"
       >
         <Time3DChart
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode"
           :index="index + 'fen'"
           :ref="item.fieldEngineCode"
@@ -139,6 +141,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -167,7 +170,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -317,8 +320,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 3
src/views/overview/components/power_scatter_2D/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:10:35
- * @LastEditTime: 2025-02-12 16:29:54
+ * @LastEditTime: 2025-02-26 11:19:41
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/power_scatter_2D/index.vue
@@ -13,6 +13,7 @@
     <!-- 逐月有功功率散点2D分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -40,6 +41,7 @@
         v-slot="{ item, index }"
       >
         <powerMarkers2DCharts
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -140,6 +142,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -166,7 +169,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -293,8 +296,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 4
src/views/overview/components/production_indicator_all/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-13 13:45:50
- * @LastEditTime: 2025-02-11 13:51:12
+ * @LastEditTime: 2025-02-26 11:10:18
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/production_indicator_all/index.vue
@@ -12,6 +12,7 @@
     <!-- 全场指标 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -144,6 +145,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       commentDescriptionVos: [], //评论列表
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
@@ -199,7 +201,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -255,7 +257,7 @@ export default {
             Papa.parse(csvText, {
               header: true, // 使用 CSV 第一行作为键
               complete: (result) => {
-                // 根据分析型设置不同的数据
+                // 根据分析型设置不同的数据
                 if (analysisType === "production_indicator") {
                   this.productionIndicatorCsvHeader.push(
                     Object.keys(result.data[0])
@@ -354,8 +356,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 4
src/views/overview/components/production_indicator_unit/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-13 13:44:56
- * @LastEditTime: 2025-02-12 11:29:24
+ * @LastEditTime: 2025-02-26 11:10:25
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/production_indicator_unit/index.vue
@@ -11,6 +11,7 @@
     <!-- 机组指标 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -215,6 +216,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       handleTableData: [], //点击查看雷达图浮窗数据,用于计算中位值
       chartItem: {}, //点击查看雷达图浮窗数据
       radarIsShow: false,
@@ -277,7 +279,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -343,7 +345,7 @@ export default {
             Papa.parse(csvText, {
               header: true, // 使用 CSV 第一行作为键
               complete: (result) => {
-                // 根据分析型设置不同的数据
+                // 根据分析型设置不同的数据
                 this.productionIndicatorCsvHeader.push(
                   Object.keys(result.data[0])
                 );
@@ -443,8 +445,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 4
src/views/overview/components/rated_power_windspeed/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-09 18:10:47
- * @LastEditTime: 2025-02-12 16:56:12
+ * @LastEditTime: 2025-02-26 11:20:36
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/rated_power_windspeed/index.vue
@@ -12,6 +12,7 @@
     <!-- 额定功率和风速分析--只有分图不存在总图 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -39,6 +40,7 @@
         v-slot="{ item, index }"
       >
         <BoxLineCharts
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="`${new Date().getTime()}` + item.batchCode + index"
@@ -138,7 +140,7 @@ export default {
       form: {
         value2: "",
       },
-
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -165,7 +167,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -291,8 +293,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
       console.log(this.fieldEngineCodes, "this.fieldEngineCodes");
     },

+ 7 - 3
src/views/overview/components/rated_windspeed/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:08:56
- * @LastEditTime: 2025-02-12 16:56:25
+ * @LastEditTime: 2025-02-26 11:20:54
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/rated_windspeed/index.vue
@@ -12,6 +12,7 @@
     <!-- 额定风速分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -40,6 +41,7 @@
         v-slot="{ item, index }"
       >
         <BarChart
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :inds="`${new Date().getTime()}` + index + 'barChart'"
           :ref="`${new Date().getTime()}` + item.batchCode"
@@ -139,6 +141,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -165,7 +168,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -285,8 +288,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 9 - 3
src/views/overview/components/speed_power/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:09:17
- * @LastEditTime: 2025-02-20 16:32:01
+ * @LastEditTime: 2025-02-26 14:13:57
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/speed_power/index.vue
@@ -12,6 +12,7 @@
     <!-- 发电机转速和有功功率分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率', '发电机转速']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -39,6 +40,7 @@
         v-slot="{ item, index }"
       >
         <DDrawingChart
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="index + 'zong'"
           :ref="item.batchCode + index"
@@ -56,6 +58,7 @@
         <powerMarkers2DCharts
           v-if="getFileTypeFromUrl(item.fileAddr) === 'speed_power'"
           :index="index + 'powerMarkers2DCharts'"
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + 'powerMarkers2DCharts'"
           :ref="item.fieldEngineCode"
           :fileAddr="item.fileAddr"
@@ -63,6 +66,7 @@
 
         <Time3DChart
           v-if="getFileTypeFromUrl(item.fileAddr) === '3D'"
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + 'Time3DChart'"
           :index="index + 'fen'"
           :ref="item.fieldEngineCode + 'Time3DChart'"
@@ -169,6 +173,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -197,7 +202,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -369,8 +374,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 10
src/views/overview/components/speed_torque/index.vue

@@ -3,6 +3,7 @@
     <!-- 发电机转速和转矩分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['发电机转速', '实际扭矩']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -29,6 +30,7 @@
         v-slot="{ item, index }"
       >
         <DDrawingChart
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="index + 'zong'"
           :ref="item.batchCode + index"
@@ -46,21 +48,15 @@
         v-slot="{ item, index }"
       >
         <powerMarkers2DCharts
+          :setUpImgData="setUpImgData"
           v-if="getFileTypeFromUrl(item.fileAddr) === 'speed_torque'"
           :index="index + 'powerMarkers2DCharts'"
           :key="item.fieldEngineCode + 'powerMarkers2DCharts'"
           :ref="item.fieldEngineCode"
           :fileAddr="item.fileAddr"
         ></powerMarkers2DCharts>
-        <!-- <TwoDMarkersChart
-          v-if="getFileTypeFromUrl(item.fileAddr) === 'speed_torque'"
-          :index="index + 'TwoDMarkersChart'"
-          :key="item.fieldEngineCode + 'TwoDMarkersChart'"
-          :ref="item.fieldEngineCode"
-          :fileAddr="item.fileAddr"
-        >
-        </TwoDMarkersChart> -->
         <Time3DChart
+          :setUpImgData="setUpImgData"
           v-if="getFileTypeFromUrl(item.fileAddr) === '3D'"
           :key="item.fieldEngineCode + 'Time3DChart'"
           :index="index + 'fen'"
@@ -166,6 +162,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -196,7 +193,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -370,8 +367,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 3
src/views/overview/components/temperature_environment/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:09:46
- * @LastEditTime: 2025-02-12 17:24:10
+ * @LastEditTime: 2025-02-26 11:21:52
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/temperature_environment/index.vue
@@ -12,6 +12,7 @@
     <!-- 环境温度传感器分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -41,6 +42,7 @@
       <el-empty description="暂无分图分析记录" v-else></el-empty>
       <div v-for="(item, index) in generalFilesDatas">
         <BarChart
+          :setUpImgData="setUpImgData"
           :key="`${new Date().getTime()}` + item.batchCode + index"
           :inds="`${new Date().getTime()}` + index + 'barChart'"
           :ref="`${new Date().getTime()}` + item.batchCode"
@@ -170,6 +172,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -196,7 +199,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -316,8 +319,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 3
src/views/overview/components/temperature_large_components_Winding_tem/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 10:04:11
- * @LastEditTime: 2025-02-10 14:53:44
+ * @LastEditTime: 2025-02-26 11:23:49
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/temperature_large_components_Winding_tem/index.vue
@@ -12,6 +12,7 @@
     <!-- 发电机-绕组温度分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -53,6 +54,7 @@
       <el-empty description="暂无总图分析记录" v-else></el-empty>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.batchCode"
@@ -69,6 +71,7 @@
       <el-empty description="暂无分图分析记录" v-else></el-empty>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -171,6 +174,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -187,7 +191,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -324,8 +328,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 3
src/views/overview/components/temperature_large_components_adriven/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 10:01:52
- * @LastEditTime: 2025-02-10 14:52:45
+ * @LastEditTime: 2025-02-26 11:22:19
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/temperature_large_components_adriven/index.vue
@@ -12,6 +12,7 @@
     <!-- 发电机-驱动端轴承温度分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -53,6 +54,7 @@
       <el-empty description="暂无总图分析记录" v-else></el-empty>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.batchCode"
@@ -70,6 +72,7 @@
       <el-empty description="暂无分图分析记录" v-else></el-empty>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -172,6 +175,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -193,7 +197,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -325,8 +329,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 3
src/views/overview/components/temperature_large_components_hig/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 09:58:32
- * @LastEditTime: 2025-02-10 14:52:53
+ * @LastEditTime: 2025-02-26 11:22:30
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/temperature_large_components_hig/index.vue
@@ -12,6 +12,7 @@
     <!-- 齿轮箱-高速轴温度分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -53,6 +54,7 @@
       <el-empty description="暂无总图分析记录" v-else></el-empty>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.batchCode"
@@ -70,6 +72,7 @@
       <el-empty description="暂无分图分析记录" v-else></el-empty>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -172,6 +175,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -193,7 +197,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -329,8 +333,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 3
src/views/overview/components/temperature_large_components_low/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 10:00:25
- * @LastEditTime: 2025-02-10 14:53:01
+ * @LastEditTime: 2025-02-26 11:22:39
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/temperature_large_components_low/index.vue
@@ -12,6 +12,7 @@
     <!-- 齿轮箱-低速轴温度分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -53,6 +54,7 @@
       <el-empty description="暂无总图分析记录" v-else></el-empty>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.batchCode"
@@ -70,6 +72,7 @@
       <el-empty description="暂无分图分析记录" v-else></el-empty>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -172,6 +175,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -188,7 +192,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -329,8 +333,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 3
src/views/overview/components/temperature_large_components_mid/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 09:59:43
- * @LastEditTime: 2025-02-10 14:53:09
+ * @LastEditTime: 2025-02-26 11:22:49
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/temperature_large_components_mid/index.vue
@@ -12,6 +12,7 @@
     <!-- 齿轮箱-中速轴温度分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -53,6 +54,7 @@
       <el-empty description="暂无总图分析记录" v-else></el-empty>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.batchCode"
@@ -70,6 +72,7 @@
       <el-empty description="暂无分图分析记录" v-else></el-empty>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -172,6 +175,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -188,7 +192,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -331,8 +335,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 3
src/views/overview/components/temperature_large_components_min/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 10:01:06
- * @LastEditTime: 2025-02-10 14:53:19
+ * @LastEditTime: 2025-02-26 11:22:58
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/temperature_large_components_min/index.vue
@@ -12,6 +12,7 @@
     <!-- 主轴承温度分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -53,6 +54,7 @@
       <el-empty description="暂无总图分析记录" v-else></el-empty>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.batchCode"
@@ -70,6 +72,7 @@
       <el-empty description="暂无分图分析记录" v-else></el-empty>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -172,6 +175,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -188,7 +192,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -325,8 +329,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 3
src/views/overview/components/temperature_large_components_tem_deviation/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 10:03:27
- * @LastEditTime: 2025-02-10 14:53:29
+ * @LastEditTime: 2025-02-26 11:23:18
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/temperature_large_components_tem_deviation/index.vue
@@ -12,6 +12,7 @@
     <!-- 发电机-轴承温度偏差分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -52,6 +53,7 @@
       <el-empty description="暂无分图分析记录" v-else></el-empty>
       <div v-for="(item, index) in diagramRelationsDatas">
         <GeneratorTemperature
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -154,6 +156,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -170,7 +173,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -307,8 +310,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 3
src/views/overview/components/temperature_large_components_undriven/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 10:02:36
- * @LastEditTime: 2025-02-10 14:53:36
+ * @LastEditTime: 2025-02-26 11:23:36
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/temperature_large_components_undriven/index.vue
@@ -12,6 +12,7 @@
     <!-- 发电机-非驱动端轴承温度分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -53,6 +54,7 @@
       <el-empty description="暂无总图分析记录" v-else></el-empty>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.batchCode"
@@ -70,6 +72,7 @@
       <el-empty description="暂无分图分析记录" v-else></el-empty>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -172,6 +175,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -188,7 +192,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -329,8 +333,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 3
src/views/overview/components/tsr/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:10:11
- * @LastEditTime: 2025-02-13 10:36:07
+ * @LastEditTime: 2025-02-26 11:24:02
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/tsr/index.vue
@@ -12,6 +12,7 @@
     <!-- 叶尖速比和有功功率分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['叶尖速比']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -40,6 +41,7 @@
       </div>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.batchCode"
@@ -55,6 +57,7 @@
       </div>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -163,6 +166,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -179,7 +183,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -309,8 +313,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 3
src/views/overview/components/tsr_cp_power/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:10:24
- * @LastEditTime: 2025-02-13 10:39:33
+ * @LastEditTime: 2025-02-26 11:24:13
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/tsr_cp_power/index.vue
@@ -12,6 +12,7 @@
     <!-- 叶尖速比-风能利用系数-功率分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -41,6 +42,7 @@
       </div>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.batchCode"
@@ -56,6 +58,7 @@
       </div>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -164,6 +167,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -180,7 +184,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -310,8 +314,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 12 - 8
src/views/overview/components/tsr_cp_power_scatter/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:22:59
- * @LastEditTime: 2025-02-10 14:54:08
+ * @LastEditTime: 2025-02-26 11:24:28
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/index.vue
@@ -12,6 +12,7 @@
     <!-- 叶尖速比-Cp-功率散点分析--只有分图不存在总图 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['有功功率']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -35,16 +36,17 @@
       <VirtualList
         :list="diagramRelationsDatas"
         keyField="fieldEngineCode"
-        :itemSize="452"
+        :itemSize="500"
         v-slot="{ item, index }"
       >
-        <NoColourBandTwoDMarkerChart
+        <TwoDMarkersChart
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
           :fileAddr="item.fileAddr"
         >
-        </NoColourBandTwoDMarkerChart>
+        </TwoDMarkersChart>
       </VirtualList>
       <el-dialog
         v-if="isShowDescription"
@@ -95,7 +97,7 @@
 <script>
 import DicCard from "@/views/overview/components/dicCard/index.vue";
 import FilterChart from "@/views/overview/components/filterChart/index.vue";
-import NoColourBandTwoDMarkerChart from "@/views/performance/components/chartsCom/NoColourBandTwoDMarkerChart.vue";
+import TwoDMarkersChart from "@/views/performance/components/chartsCom/TwoDMarkersChart.vue";
 import TinymceEditor from "@/components/Tinymce.vue";
 import {
   analysisDetail,
@@ -108,7 +110,7 @@ export default {
   components: {
     DicCard,
     FilterChart,
-    NoColourBandTwoDMarkerChart,
+    TwoDMarkersChart,
     TinymceEditor,
   },
   props: {
@@ -138,6 +140,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -154,7 +157,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -290,8 +293,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 4
src/views/overview/components/tsr_trend/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:10:39
- * @LastEditTime: 2025-02-14 13:34:29
+ * @LastEditTime: 2025-02-26 11:24:41
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/tsr_trend/index.vue
@@ -12,6 +12,7 @@
     <!-- 叶尖速比时序分析--只有分图不存在总图 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['叶尖速比']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -38,6 +39,7 @@
         v-slot="{ item, index }"
       >
         <BoxMarkersCharts
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -137,7 +139,7 @@ export default {
       form: {
         value2: "",
       },
-
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -154,7 +156,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -290,8 +292,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
       console.log(this.fieldEngineCodes, "this.fieldEngineCodes");
     },

+ 9 - 4
src/views/overview/components/tsr_windspeed/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:10:59
- * @LastEditTime: 2025-02-13 10:37:52
- * @LastEditors: milo-MacBook-Pro.local
+ * @LastEditTime: 2025-02-26 11:24:51
+ * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/tsr_windspeed/index.vue
 -->
@@ -12,6 +12,7 @@
     <!-- 叶尖速比和风速分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="['叶尖速比']"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -40,6 +41,7 @@
       </div>
       <div v-for="(item, index) in generalFilesDatas">
         <lineAndChildLine
+          :setUpImgData="setUpImgData"
           :key="item.batchCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.batchCode"
@@ -55,6 +57,7 @@
       </div>
       <div v-for="(item, index) in diagramRelationsDatas">
         <lineChartsFen
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index"
           :ref="item.fieldEngineCode"
@@ -163,6 +166,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -179,7 +183,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -309,8 +313,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 3
src/views/overview/components/wind_direction_frequency/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:11:12
- * @LastEditTime: 2025-02-10 14:54:28
+ * @LastEditTime: 2025-02-26 11:26:10
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/wind_direction_frequency/index.vue
@@ -11,6 +11,7 @@
     <!-- 风向玫瑰分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -38,6 +39,7 @@
         v-slot="{ item, index }"
       >
         <WindRoseChart
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :inds="index"
           :ref="item.fieldEngineCode"
@@ -138,6 +140,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -154,7 +157,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -290,8 +293,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 9 - 5
src/views/overview/components/wind_speed/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:11:23
- * @LastEditTime: 2025-02-13 09:48:29
+ * @LastEditTime: 2025-02-26 11:25:57
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/wind_spee/index.vue
@@ -12,6 +12,7 @@
     <!-- 风速均值分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -40,12 +41,13 @@
         v-slot="{ item, index }"
       >
         <!-- {{ item.fileAddr }} -->
-        <!-- <BarChart
+        <BarChart
+          :setUpImgData="setUpImgData"
           :key="`${new Date().getTime()}` + item.batchCode + index"
           :inds="`${new Date().getTime()}` + index"
           :ref="`${new Date().getTime()}` + item.batchCode"
           :fileAddr="item.fileAddr"
-        ></BarChart> -->
+        ></BarChart>
         <!-- <BarChart
           :key="item.batchCode + index"
           :inds="index + 'barChart'"
@@ -145,6 +147,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -161,7 +164,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -291,8 +294,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 3
src/views/overview/components/wind_speed_frequency/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:11:34
- * @LastEditTime: 2025-02-10 14:33:04
+ * @LastEditTime: 2025-02-26 11:25:24
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/wind_speed_frequency/index.vue
@@ -11,6 +11,7 @@
     <!-- 风速频率分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -38,6 +39,7 @@
         v-slot="{ item, index }"
       >
         <BarChart
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :inds="index + 'barChart'"
           :ref="item.fieldEngineCode"
@@ -151,6 +153,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       comment: "",
       options: [],
       windEngineGroupList: [], //批次风机列表
@@ -167,7 +170,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -297,8 +300,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 8 - 4
src/views/overview/components/yaw_error/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-10 09:24:14
- * @LastEditTime: 2025-02-12 17:09:14
+ * @LastEditTime: 2025-02-26 11:26:51
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/overview/components/yaw_error/index.vue
@@ -12,6 +12,7 @@
     <!-- 静态偏航误差分析 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -75,6 +76,7 @@
       <div v-if="fenFaultCsvData.length > 0">
         <div v-for="(item, index) in fenFaultCsvData">
           <yawErrorLine
+            :setUpImgData="setUpImgData"
             :key="item.fieldEngineCode + index"
             :index="`${new Date().getTime()}` + index"
             :ref="item.fieldEngineCode"
@@ -188,6 +190,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -237,7 +240,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -303,7 +306,7 @@ export default {
             Papa.parse(csvText, {
               header: true, // 使用 CSV 第一行作为键
               complete: (result) => {
-                // 根据分析型设置不同的数据
+                // 根据分析型设置不同的数据
                 if (analysisType === "yaw_error") {
                   if (Object.keys(result.data[0]).includes("engine_name")) {
                     //总图
@@ -424,8 +427,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 7 - 3
src/views/overview/components/yaw_error_density/index.vue

@@ -3,6 +3,7 @@
     <!-- 动态偏航误差分析--只有分图不存在总图 -->
     <div class="left">
       <FilterChart
+        :setUpimg="[]"
         :windList="windEngineGroupList"
         @getEnfineList="getEnfineList"
         @handlePrevious="handlePrevious"
@@ -30,6 +31,7 @@
       >
         <lineAndChildLine
           v-if="getFileTypeFromUrl(item.fileAddr) === 'PDF-'"
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :index="`${new Date().getTime()}` + index + item.fieldEngineCode"
           :ref="item.fieldEngineCode"
@@ -38,6 +40,7 @@
         </lineAndChildLine>
         <TwoDMarkersChart
           v-else
+          :setUpImgData="setUpImgData"
           :key="item.fieldEngineCode + index"
           :ref="item.fieldEngineCode + index"
           :index="index + item.fieldEngineCode"
@@ -138,6 +141,7 @@ export default {
       form: {
         value2: "",
       },
+      setUpImgData: [],
       windEngineGroupList: [], //批次风机列表
       fieldEngineCodes: [], //选中风机
       comment: "",
@@ -156,7 +160,7 @@ export default {
       if (this.isShow) {
         if (!this.isShowDescription) {
           this.$message({
-            message: "当前分析型暂无分析,不能进行评论操作",
+            message: "当前分析型暂无分析,不能进行评论操作",
             type: "warning",
           });
           this.$emit("setIsShow");
@@ -287,9 +291,9 @@ export default {
       // 如果该功能没有实现,可以删除这个方法
     },
     //获取选中风机list
-    getEnfineList(data) {
+    getEnfineList(data, setUpImg) {
       this.fieldEngineCodes = data;
-      console.log(this.fieldEngineCodes, "this.fieldEngineCodes");
+      this.setUpImgData = [...setUpImg];
       this.getAnalysisDetail();
     },
     //下一条

+ 92 - 19
src/views/overview/index.vue

@@ -22,7 +22,6 @@
           </el-dropdown-menu>
         </el-dropdown>
       </div>
-
       <el-tree
         class="filter-tree"
         :data="data"
@@ -88,19 +87,19 @@
         </template>
       </el-menu>
       <!-- 动态渲染组件 -->
-      <keep-alive>
-        <component
-          :ref="analysisTypeCode"
-          :is="currentComponent"
-          :initBatchCode="initBatchCode"
-          :analysisTypeCode="analysisTypeCode"
-          :batchCodeList="batchCodeList"
-          @setInitBathCode="setInitBathCode"
-          @setIsShow="setIsShow"
-          :isShow="isShow"
-          :isShowTinymceEditorCom="true"
-        ></component>
-      </keep-alive>
+      <!-- <keep-alive> -->
+      <component
+        :ref="analysisTypeCode"
+        :is="currentComponent"
+        :initBatchCode="initBatchCode"
+        :analysisTypeCode="analysisTypeCode"
+        :batchCodeList="batchCodeList"
+        @setInitBathCode="setInitBathCode"
+        @setIsShow="setIsShow"
+        :isShow="isShow"
+        :isShowTinymceEditorCom="true"
+      ></component>
+      <!-- </keep-alive> -->
     </div>
     <div
       class="tousutiwen_box"
@@ -118,7 +117,44 @@
         </div>
       </el-tooltip>
     </div>
-
+    <div class="tousutiwen_box1">
+      <el-tooltip
+        class="item"
+        effect="dark"
+        content="图表主题设置"
+        placement="right"
+      >
+        <div class="tousutiwen_icon">
+          <el-popover placement="right" width="220" trigger="click">
+            <div style="margin-right: 20px; display: flex; align-items: center">
+              <el-select
+                size="small"
+                v-model="color1"
+                @change="updateChartColor"
+                placeholder="选择配色方案"
+                style="width: 200px"
+              >
+                <el-option
+                  v-for="(scheme, index) in colorSchemes"
+                  :key="index"
+                  :label="scheme.label"
+                  :value="scheme.colors"
+                  :style="getOptionStyle(scheme.colors)"
+                ></el-option>
+              </el-select>
+              <!-- <span style="margin-left: 10px">图表主题设置</span> -->
+            </div>
+            <template>
+              <svg-icon
+                icon-class="themes"
+                slot="reference"
+                style="width: 40px; height: 40px"
+              />
+            </template>
+          </el-popover>
+        </div>
+      </el-tooltip>
+    </div>
     <el-dialog
       :title="'分析主题:' + batchTitle"
       :visible="isShowComment"
@@ -148,12 +184,17 @@
 <script>
 import { queryAllAnalysisType } from "@/api/performance";
 import { getAnalysisCodeInfo } from "@/api/overview";
+import { colorSchemes } from "@/views/overview/js/colors";
+import { mapActions } from "vuex";
 export default {
   data() {
     return {
       loading: false,
       filterText: "",
       data: [],
+      color1: colorSchemes[0].colors, // 默认颜色
+      // 配色方案列表(每个方案是一个颜色数组)
+      colorSchemes: [...colorSchemes],
       isShow: false, //控制评论框是否显示
       isShowComment: false, //控制上一条、下一条是否显示
       // 用于控制是否展开/收起
@@ -164,7 +205,7 @@ export default {
       batchTitle: "", //浮窗title
       initBatchCode: "", // 初始化分析编号
       dialogInitBatchCode: "",
-      analysisTypeCode: "", // 当前选中的分析
+      analysisTypeCode: "", // 当前选中的分析
       windEngineGroupList: "", //风机编码
       defaultProps: {
         children: "children",
@@ -196,7 +237,7 @@ export default {
       });
     },
     analysisTypeCode(newVal) {
-      console.log(newVal, "分析型 ");
+      console.log(newVal, "分析型 ");
     },
   },
   async created() {
@@ -208,6 +249,23 @@ export default {
   },
 
   methods: {
+    ...mapActions("themes", ["themeChange"]),
+    updateChartColor() {
+      // console.log("this.color1", this.color1);
+      this.themeChange(this.color1);
+    },
+    // 根据配色方案设置每个选项的样式
+    getOptionStyle(scheme) {
+      return {
+        background: `linear-gradient(to right, ${scheme
+          .slice(0, 8)
+          .join(", ")})`,
+        color: "#fff",
+        height: "30px",
+        lineHeight: "30px",
+        borderRadius: "0px",
+      };
+    },
     setIsShow() {
       this.isShow = false;
     },
@@ -247,7 +305,7 @@ export default {
             //     formattedData[0]?.codeNumber,
             //     formattedData[0]?.children[0]?.codeNumber,
             //   ] || [];
-            // 确保数据加载完成后才查询其他分析
+            // 确保数据加载完成后才查询其他分析
             // this.queryAllAnalysisType();
           }
         })
@@ -458,7 +516,22 @@ export default {
     align-items: center;
     justify-content: center;
   }
-  .tousutiwen_box:hover {
+  .tousutiwen_box1 {
+    position: fixed;
+    right: 80px;
+    bottom: 25%;
+    background: rgb(255, 255, 255);
+    border-radius: 50%;
+    width: 50px;
+    height: 50px;
+    color: rgb(132, 145, 165);
+    box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 4px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+  .tousutiwen_box:hover,
+  .tousutiwen_box1:hover {
     background: rgb(196, 199, 206);
   }
   .el-menu-demo {

+ 7 - 8
src/views/performance/assetssDetail.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:25:45
- * @LastEditTime: 2025-01-14 15:41:51
+ * @LastEditTime: 2025-02-26 11:33:43
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/assetssDetail.vue
@@ -52,7 +52,7 @@
       >
         <el-row type="flex" justify="space-between">
           <el-col :span="8">
-            <el-form-item label="分析型" prop="analysisTypeCode">
+            <el-form-item label="分析型" prop="analysisTypeCode">
               <el-select
                 v-model="formInfo.analysisTypeCode"
                 size="small"
@@ -236,7 +236,7 @@
           </template>
         </div>
       </template>
-      <!-- 需要在这里添加三个分析型排版布局 ,分析详情中 -->
+      <!-- 需要在这里添加三个分析型排版布局 ,分析详情中 -->
       <div v-else>
         <el-card class="box-card analysisType" v-if="generalFiles.length > 0">
           <div slot="header" class="clearfix">
@@ -535,7 +535,7 @@ import WindRoseChart from "./components/chartsCom/WindRoseChart.vue";
 import PowerMarkers2DCharts from "./components/chartsCom/powerMarkers2DCharts.vue";
 // import JsonMarkerCharts from "./components/JsonMarkerCharts.vue";
 import PlotlyCharts from "./components/PlotlyCharts.vue";
-import LineCharts from "./components/chartsCom/lineChart.vue";
+
 import { downLoadCsvFile } from "@/utils/common";
 import { saveAs } from "file-saver";
 import JSZip from "jszip";
@@ -549,7 +549,6 @@ export default {
     HeatmapCharts,
     CreateNewChart,
     PlotlyCharts,
-    LineCharts,
     BoxLineCharts,
     PowerMarkers2DCharts,
   },
@@ -590,7 +589,7 @@ export default {
     };
   },
   created() {
-    //获取分析 分析型、机组编号 列表
+    //获取分析 分析型、机组编号 列表
     this.getWindCodeList();
   },
   computed: {
@@ -775,7 +774,7 @@ export default {
           : null;
       this.getDetailInfo();
     },
-    //分析型图表样式
+    //分析型图表样式
     async chartsTypeConfig() {
       const result = await queryAnalysisTypeConfig();
     },
@@ -1031,7 +1030,7 @@ export default {
             Papa.parse(csvText, {
               header: true, // 使用 CSV 第一行作为键
               complete: (result) => {
-                // 根据分析型设置不同的数据
+                // 根据分析型设置不同的数据
                 if (analysisType === "yaw_error") {
                   this.csvHeaders = Object.keys(result.data[0]);
                   this.csvData = result.data.filter(

+ 6 - 6
src/views/performance/components/EditAnalysis.vue

@@ -14,10 +14,10 @@
         <el-collapse-item title="数据关联:" name="1">
           <el-row class="flex-wrap-row" :gutter="5">
             <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
-              <el-form-item label="分析型" prop="configAnalysis">
+              <el-form-item label="分析型" prop="configAnalysis">
                 <el-select
                   v-model="form.configAnalysis"
-                  placeholder="请选择分析型"
+                  placeholder="请选择分析型"
                   size="small"
                   clearable
                   @change="handleAnalysisType"
@@ -629,7 +629,7 @@ import {
   delAnalysisCommentType,
   addAnalysisCommentType,
   analysisCommentEdit,
-  queryAnalysisedType, //查询分析
+  queryAnalysisedType, //查询分析
   queryAnalysisedEngine, //查询机组
 } from "@/api/performance";
 import { getWindEngineGroup } from "@/api/ledger";
@@ -743,7 +743,7 @@ export default {
     },
   },
   created() {
-    //获取分析 分析型、机组编号 列表
+    //获取分析 分析型、机组编号 列表
     // this.getWindCodeList();
   },
   methods: {
@@ -1062,7 +1062,7 @@ export default {
             Papa.parse(csvText, {
               header: true, // 使用 CSV 第一行作为键
               complete: (result) => {
-                // 根据分析型设置不同的数据
+                // 根据分析型设置不同的数据
                 if (analysisType === "yaw_error") {
                   this.csvHeaders = Object.keys(result.data[0]);
                   this.csvData = result.data.filter(
@@ -1245,7 +1245,7 @@ export default {
           this.$message({
             type: "error",
             message:
-              "分析内容与可视化分析、现象描述、原因描述、排查建议 分析型不可删除!",
+              "分析内容与可视化分析、现象描述、原因描述、排查建议 分析型不可删除!",
           });
           return;
         }

+ 129 - 39
src/views/performance/components/PlotlyCharts.vue

@@ -32,22 +32,32 @@
     <div
       v-if="comType === 'generalDrawing'"
       :id="`power-curve-plot${inds}`"
+      :ref="`power-curve-plot${inds}`"
       style="width: 100%; height: 550px"
     ></div>
     <!-- 分图组件  -->
     <template v-else-if="comType === 'graph'">
-      <div :id="`chart-${inds}`" style="width: 100%; height: 550px"></div>
+      <div
+        :ref="`chart-${inds}`"
+        :id="`chart-${inds}`"
+        style="width: 100%; height: 550px"
+      ></div>
     </template>
   </div>
 </template>
 <script>
 import Plotly from "plotly.js-dist";
-import { colorSchemesLine } from "@/views/overview/js/colors";
+import { colorSchemes } from "@/views/overview/js/colors";
+import { mapState } from "vuex";
 export default {
   props: {
     lineMarkerData: Object,
     comType: String,
     inds: String,
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   name: "PowerCurvePlot",
   data() {
@@ -56,7 +66,7 @@ export default {
       graphData: [], //分图数据length data
       color1: [], // 默认颜色
       // 配色方案列表(每个方案是一个颜色数组)
-      colorSchemes: [...colorSchemesLine],
+      colorSchemes: [...colorSchemes],
       config: {
         powerConfig: {
           mode: "lines+markers",
@@ -95,7 +105,7 @@ export default {
             y: -0.2,
           },
         },
-        colors: [...colorSchemesLine[0].colors],
+        colors: [...colorSchemes[0].colors],
       },
       powerCurveData: {
         turbines: [],
@@ -104,24 +114,42 @@ export default {
     };
   },
   mounted() {
-    this.updateCharts(); // 初次渲染
+    this.color1 = this.themeColor;
+    this.updateCharts(this.setUpImgData); // 初次渲染
+  },
+  computed: {
+    ...mapState("themes", {
+      themeColor: "themeColor",
+    }),
   },
   watch: {
     lineMarkerData: {
       deep: true,
       handler() {
-        this.updateCharts(); // 数据变化时更新
+        this.updateCharts(this.setUpImgData); // 数据变化时更新
+      },
+    },
+    themeColor: {
+      handler() {
+        this.color1 = this.themeColor;
+        this.updateChartColor();
       },
+      deep: true,
     },
     comType(newType, oldType) {
       if (newType !== oldType) {
-        this.updateCharts(); // 类型变化时更新
+        this.updateCharts(this.setUpImgData); // 类型变化时更新
       }
     },
+    setUpImgData: {
+      handler(newType) {
+        this.updateCharts(newType);
+      },
+      deep: true,
+    },
   },
   methods: {
-    updateCharts() {
-      // console.log(this.lineMarkerData, "this.lineMarkerData");
+    updateCharts(newType) {
       this.powerCurveData.turbines =
         this.lineMarkerData.data?.filter(
           (item) => item.enginName !== "合同功率曲线"
@@ -133,31 +161,47 @@ export default {
         ) || [];
 
       if (this.comType === "generalDrawing" && this.lineMarkerData?.data) {
-        this.renderPlot();
+        this.renderPlot(newType);
       } else if (this.comType === "graph" && this.lineMarkerData?.data) {
         this.$nextTick(() => {
-          this.initializeEngineCharts();
+          this.initializeEngineCharts(newType);
         });
       }
     },
-    renderPlot() {
-      const data = [];
-      this.powerCurveData.turbines.forEach((turbine, index) => {
-        data.push({
-          x: turbine.xData,
-          y: turbine.yData.map((val) => (val !== null ? val : 0.0)),
-          mode: "lines",
-          name: turbine.enginName,
-          fill: this.chartType === "line" ? "none" : "tonexty",
-          line: {
-            color:
-              this.color1.length > 0
-                ? this.color1[index % this.color1.length]
-                : this.config.colors[index % this.config.colors.length],
-          },
-        });
-      });
+    renderPlot(newType) {
+      // 确保图表容器存在
+      const chartContainer = this.$refs[`power-curve-plot${this.inds}`];
+      if (!chartContainer) {
+        return false;
+      }
 
+      // 工具函数:处理空值
+      const processNullValues = (data) =>
+        data.map((val) => (val !== null ? val : 0.0));
+
+      // 获取x轴和y轴的设置
+      const getChartSetUp = (axisTitle) => {
+        return newType.find((item) => item.text.includes(axisTitle));
+      };
+
+      const data = this.powerCurveData.turbines.map((turbine, index) => ({
+        x: turbine.xData,
+        y: processNullValues(turbine.yData),
+        mode: "lines",
+        name: turbine.enginName,
+        fill: this.chartType === "line" ? "none" : "tonexty",
+        line: {
+          color:
+            this.color1.length > 0
+              ? this.color1[index % this.color1.length]
+              : this.config.colors[index % this.config.colors.length],
+        },
+        hovertemplate:
+          `风速: %{x} m/s<br>功率: %{y} kW<br>机组:` +
+          `${turbine.enginName}<extra></extra>`,
+      }));
+
+      // 添加合同功率曲线
       data.push({
         x: this.powerCurveData.contractPowerCurve[0].xData,
         y: this.powerCurveData.contractPowerCurve[0].yData,
@@ -165,25 +209,46 @@ export default {
         name: this.config.powerConfig.name,
         line: this.config.powerConfig.line,
         marker: this.config.powerConfig.marker,
+        hovertemplate:
+          `风速: %{x} m/s<br>合同功率: %{y} kW<br>` +
+          `${this.config.powerConfig.name}<extra></extra>`,
       });
-      // console.log(this.powerCurveData, "this.powerCurveData");
+
+      // 配置图表布局
       const layout = {
-        title: "有功功率曲线分析" + this.lineMarkerData.engineTypeName,
+        title: `有功功率曲线分析${this.lineMarkerData.engineTypeName}`,
         plot_bgcolor: this.config.lableConfig.plot_bgcolor,
-        xaxis: this.config.lableConfig.xaxis,
-        yaxis: this.config.lableConfig.yaxis,
+        xaxis: { ...this.config.lableConfig.xaxis },
+        yaxis: { ...this.config.lableConfig.yaxis },
         legend: this.config.lableConfig.legend,
       };
+
+      // 更新x轴和y轴的范围与步长
+      const xChartSetUp = getChartSetUp(layout.xaxis.title);
+      if (xChartSetUp) {
+        layout.xaxis.dtick = xChartSetUp.dtick;
+        layout.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+      }
+
+      const yChartSetUp = getChartSetUp(layout.yaxis.title);
+      if (yChartSetUp) {
+        layout.yaxis.dtick = yChartSetUp.dtick;
+        layout.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
+      }
+
+      // 绘制图表
       Plotly.newPlot(`power-curve-plot${this.inds}`, data, layout);
     },
+
     //初始化分图
-    initializeEngineCharts() {
+    initializeEngineCharts(newType) {
+      if (!this.$refs[`chart-${this.inds}`]) {
+        return false;
+      }
       const fentuCharts = this.powerCurveData.turbines.filter(
         (item) =>
           item.enginCode === this.lineMarkerData?.formInfoFieldEngineCode
       );
-      // console.log(this.powerCurveData.turbines, "this.powerCurveData.turbines");
-      // console.log(fentuCharts, "fentuCharts");
       if (fentuCharts[0]?.enginName || fentuCharts[0]?.enginCode) {
         const highlightedData = [];
         const nonHighlightedData = [];
@@ -196,6 +261,23 @@ export default {
           yaxis: this.config.lableConfig.yaxis,
           legend: this.config.lableConfig.legend,
         };
+        // 获取x轴和y轴的设置
+        const getChartSetUp = (axisTitle) => {
+          return newType.find((item) => item.text.includes(axisTitle));
+        };
+        // 更新x轴和y轴的范围与步长
+        const xChartSetUp = getChartSetUp(layout.xaxis.title);
+        if (xChartSetUp) {
+          layout.xaxis.dtick = xChartSetUp.dtick;
+          layout.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+        }
+
+        const yChartSetUp = getChartSetUp(layout.yaxis.title);
+        if (yChartSetUp) {
+          layout.yaxis.dtick = yChartSetUp.dtick;
+          layout.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
+        }
+
         // 先渲染其他的风机数据
         this.powerCurveData.turbines.forEach((turbine, index) => {
           const isHighlighted =
@@ -212,6 +294,9 @@ export default {
             line: {
               color: isHighlighted ? "#1c77b3" : "#d3d3d3",
             },
+            hovertemplate:
+              `风速: %{x} m/s<br>功率: %{y} kW<br>机组:` +
+              `${turbine.enginName}<extra></extra>`, // 设置 hovertemplate
           };
 
           if (isHighlighted) {
@@ -233,6 +318,9 @@ export default {
             width: 1, // 设置线条的宽度为1
           },
           marker: { color: "red", size: 4 },
+          hovertemplate:
+            `风速: %{x} m/s<br>合同功率: %{y} kW<br>` +
+            `${this.powerCurveData.contractPowerCurve[0].enginName}<extra></extra>`, // 设置 hovertemplate
         });
         Plotly.newPlot(`chart-${this.inds}`, data, layout);
       }
@@ -241,21 +329,23 @@ export default {
     toggleChartType() {
       this.chartType = this.chartType === "line" ? "bar" : "line"; // 切换图表类型
       // 重新绘制图表
-      this.updateCharts();
+      this.updateCharts(this.setUpImgData);
     },
     updateChartColor(color) {
       // 更新图表颜色
       // this.color1 = color;
-      this.updateCharts();
+      this.updateCharts(this.setUpImgData);
     },
     // 根据配色方案设置每个选项的样式
     getOptionStyle(scheme) {
       return {
-        background: `linear-gradient(to right, ${scheme.join(", ")})`,
+        background: `linear-gradient(to right, ${scheme
+          .slice(0, 8)
+          .join(", ")})`,
         color: "#fff",
         height: "30px",
         lineHeight: "30px",
-        borderRadius: "4px",
+        borderRadius: "0px",
       };
     },
   },

+ 1 - 1
src/views/performance/components/abnormalDetail.vue

@@ -35,7 +35,7 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column prop="address" label="分析型">
+      <el-table-column prop="address" label="分析型">
         <template slot-scope="scope">
           <div v-if="scope.row.isEditing && setDataState === 'add'">
             <el-select v-model="scope.row.analysisTypeCode" size="small">

+ 33 - 18
src/views/performance/components/analysisEvent.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:13:51
- * @LastEditTime: 2025-02-18 09:50:52
+ * @LastEditTime: 2025-02-25 14:36:02
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
@@ -65,13 +65,13 @@
 
             <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
               <el-form-item
-                label="分析型"
-                v-if="checkedCities.find((item) => item === '分析型')"
+                label="分析型"
+                v-if="checkedCities.find((item) => item === '分析型')"
                 prop=""
               >
                 <el-select
                   v-model="form.configAnalysis"
-                  placeholder="请选择分析型"
+                  placeholder="请选择分析型"
                   size="small"
                   collapse-tags
                   multiple
@@ -275,7 +275,7 @@
             </el-col>
           </el-row>
         </el-collapse-item>
-        <el-collapse-item
+        <!-- <el-collapse-item
           title="图像坐标系设置:"
           name="3"
           v-if="checkedCities.find((item) => item === '图像设置')"
@@ -546,15 +546,22 @@
               </el-form-item>
             </el-col>
           </el-row>
-        </el-collapse-item>
+        </el-collapse-item> -->
       </el-collapse>
     </el-form>
     <el-card shadow="always" class="box-card">
       <el-row>
-        <div class="filedView">风场信息概览</div>
+        <div class="filedView">
+          <span></span>
+          <span>风场信息概览</span>
+
+          <el-button type="primary" size="small" @click="handleBtn"
+            >切换{{ disableMsg }}</el-button
+          >
+        </div>
       </el-row>
       <el-row>
-        <el-col :span="12">
+        <el-col :span="24" v-if="disableMsg === '地图'">
           <div class="left">
             <el-table :data="batchList" border>
               <el-table-column prop="engineName" label="风机名称">
@@ -583,7 +590,7 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="12" v-loading="htmlLoading">
+        <el-col :span="24" v-loading="htmlLoading" v-else>
           <div class="right">
             <Map></Map>
           </div>
@@ -625,7 +632,7 @@
                 </el-row>
               </div>
 
-              <el-checkbox label="图像设置" key="图像设置"></el-checkbox>
+              <!-- <el-checkbox label="图像设置" key="图像设置"></el-checkbox>
               <div class="checkFromRow">
                 <el-row>
                   <el-col :span="12">发电机转矩坐标系</el-col>
@@ -634,7 +641,7 @@
                   <el-col :span="12">有功功率坐标系</el-col>
                   <el-col :span="12">发电机转矩坐标系</el-col>
                 </el-row>
-              </div>
+              </div> -->
             </el-checkbox-group>
           </div></el-col
         >
@@ -683,6 +690,7 @@ export default {
   },
   data() {
     return {
+      disableMsg: "表格",
       formInline: {
         pageNum: 1,
         pageSize: 10,
@@ -701,7 +709,7 @@ export default {
       // },
       loading: false,
       form: {
-        configAnalysis: null, //分析
+        configAnalysis: null, //分析
         powerFarmID: null, //风场编号//通过路由获取的默认传递的
         dataBatchNum: null, //批次号
         scada: "", //scada数类型
@@ -725,8 +733,8 @@ export default {
       },
       activeNames: ["1", "2", "3"],
       checkAll: false,
-      checkedCities: ["分析型", "数据源", "分析时间", "滤除月份", "机组名称"],
-      cities: ["分析型", "数据源", "分析时间", "滤除月份", "机组名称"],
+      checkedCities: ["分析型", "数据源", "分析时间", "滤除月份", "机组名称"],
+      cities: ["分析型", "数据源", "分析时间", "滤除月份", "机组名称"],
       isIndeterminate: true,
       drawer: false,
       direction: "rtl",
@@ -760,7 +768,7 @@ export default {
     },
   },
   created() {
-    //获取分析 分析型、机组编号 列表
+    //获取分析 分析型、机组编号 列表
     this.getWindCodeList();
     this.getQueryDataTime();
     this.getFengjiList();
@@ -770,6 +778,10 @@ export default {
     });
   },
   methods: {
+    //切换风机信息展示
+    handleBtn() {
+      this.disableMsg = this.disableMsg == "表格" ? "地图" : "表格";
+    },
     getTimeList() {
       let scada = [];
       if (this.form.scada) {
@@ -903,7 +915,7 @@ export default {
           configAnalysis:
             this.form.configAnalysis !== null
               ? this.form.configAnalysis
-              : undefined, //分析
+              : undefined, //分析
           powerFarmID: this.$route.query.fieldEngineCode, //风场编号//通过路由获取的默认传递的
           dataBatchNum: this.$route.query.batchCode, //批次号
           scada: this.form.scada !== null ? this.form.scada : undefined, //scada数类型
@@ -1037,7 +1049,7 @@ export default {
     resetForm() {
       this.picker = [];
       this.form = {
-        configAnalysis: null, //分析
+        configAnalysis: null, //分析
         powerFarmID: this.$route.query.fieldEngineCode, //风场编号//通过路由获取的默认传递的
         dataBatchNum: this.$route.query.batchCode, //批次号
         scada: "", //scada数类型
@@ -1075,13 +1087,16 @@ export default {
   height: 100%;
   .filedView {
     height: 60px;
-    line-height: 60px;
+    // line-height: 60px;
     background-color: #fff;
     color: #303133;
     cursor: pointer;
     border-bottom: 1px solid #ebeef5;
     font-size: 16px;
     text-align: center;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
     font-weight: 500;
     margin-bottom: 10px;
   }

+ 200 - 205
src/views/performance/components/chartsCom/3DDrawingChart.vue

@@ -1,34 +1,63 @@
 <template>
-  <div style="height: 600px">
-    <div
-      :id="`plotly-3d-chart-` + index"
-      style="width: 100%; height: 600px"
-    ></div>
-    <div
-      v-loading="loading"
-      :id="`plotly-3d-chart-` + index"
-      ref="plotlyChart"
-      style="height: 600px"
-    >
-      <el-empty v-if="isError" description="请求失败"></el-empty>
+  <div>
+    <!-- 配色方案选择和图表类型切换 -->
+    <div style="display: flex; align-items: center; padding-top: 20px">
+      <div style="margin-right: 20px; display: flex; align-items: center">
+        <el-select
+          size="small"
+          v-model="color1"
+          @change="updateChartColor"
+          placeholder="选择配色方案"
+          style="width: 200px"
+        >
+          <el-option
+            v-for="(scheme, index) in colorSchemes"
+            :key="index"
+            :label="scheme.label"
+            :value="scheme.colors"
+            :style="getOptionStyle(scheme.colors)"
+          ></el-option>
+        </el-select>
+      </div>
     </div>
-  </div>
-  <!-- <div>
-    <div
-      v-loading="loading"
-      :id="`plotly-3d-chart-` + index"
-      ref="plotlyChart"
-      style="height: 600px"
-    >
-      <el-empty v-if="isError" description="请求失败"></el-empty>
+    <!-- 点大小控制 -->
+    <div style="display: flex; align-items: center">
+      <el-slider
+        v-model="pointSize"
+        :min="1"
+        :max="15"
+        :step="1"
+        label="点的大小"
+        show-stops
+        style="width: 150px"
+        @change="updateChartColor"
+      ></el-slider>
+    </div>
+
+    <!-- 图表展示区域 -->
+    <div style="height: 600px">
+      <div
+        :id="`plotly-3d-chart-` + index"
+        style="width: 100%; height: 600px"
+      ></div>
+      <div
+        v-loading="loading"
+        :id="`plotly-3d-chart-` + index"
+        ref="plotlyChart"
+        style="height: 600px"
+      >
+        <el-empty v-if="isError" description="请求失败"></el-empty>
+      </div>
     </div>
-  </div> -->
+  </div>
 </template>
 
 <script>
 import Plotly from "plotly.js-dist";
 import axios from "axios";
 import { myMixin } from "@/mixins/chartRequestMixin";
+import { colorSchemes } from "@/views/overview/js/colors";
+import { mapState } from "vuex";
 export default {
   props: {
     fileAddr: {
@@ -39,18 +68,61 @@ export default {
       default: "",
       type: String,
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   data() {
     return {
-      color1: "",
+      color1: [
+        "#DBEEBC",
+        "#A8D7BE",
+        "#8ECAC1",
+        "#77BDC2",
+        "#64ADC2",
+        "#559ABE",
+        "#4884B7",
+        "#406DAB",
+        "#3856A0",
+        "#314291",
+        "#28357A",
+        "#1A285E",
+        "#FF7F50",
+        "#FFD700",
+        "#90EE90",
+      ], // 默认颜色
       chartData: {},
+      chartType: "scatter", // 当前图表类型(默认是散点图)
+      colorSchemes: [...colorSchemes],
+      pointSize: 2, // 默认点大小
     };
   },
   mixins: [myMixin],
   async mounted() {
     this.getData();
+    this.color1 = this.themeColor;
+  },
+  computed: {
+    ...mapState("themes", {
+      themeColor: "themeColor",
+    }),
+  },
+  watch: {
+    themeColor: {
+      handler() {
+        this.color1 = this.themeColor;
+        this.updateChartColor();
+      },
+      deep: true,
+    },
+    setUpImgData: {
+      handler(newType) {
+        this.renderChart();
+      },
+      deep: true,
+    },
   },
-
   methods: {
     async getData() {
       if (this.fileAddr !== "") {
@@ -61,13 +133,10 @@ export default {
           const resultChartsData = await axios.get(this.fileAddr, {
             cancelToken: this.cancelToken.token,
           });
-          console.log(this.fileAddr, "解析3D数据");
           if (typeof resultChartsData.data === "string") {
             let dataString = resultChartsData.data;
-            // 如果数据字符串的开头和结尾可能有多余的字符(比如非法字符),可以进行清理
             dataString = dataString.trim(); // 去除前后空格
-            // 如果数据包含了类似 "Infinity" 或其他无法解析的字符,替换它们
-            dataString = dataString.replace(/Infinity/g, '"Infinity"'); // 例如,将 "Infinity" 转换为字符串
+            dataString = dataString.replace(/Infinity/g, '"Infinity"'); // 替换 Infinity 为 "Infinity"
             try {
               const parsedData = JSON.parse(dataString);
               this.chartData = parsedData;
@@ -77,7 +146,6 @@ export default {
           } else {
             this.chartData = resultChartsData.data;
           }
-          // this.chartData = resultChartsData.data;
           this.renderChart();
           this.isError = false;
           this.loading = false;
@@ -87,206 +155,133 @@ export default {
         }
       }
     },
-    // renderChart() {
-    //   // 构造3D散点图数据
 
-    //   const trace = {
-    //     x: this.chartData.data[0].xData, // 发电机转速
-    //     y: this.chartData.data[0].yData, // 时间
-    //     z: this.chartData.data[0].zData, // 有功功率
-    //     mode: "markers", // 强制设置为markers,避免出现线条
-    //     type: "scatter3d", // 3D 散点图
-    //     marker: {
-    //       size: 2, // 点的大小
-    //       color: this.chartData.data[0].zData, // 根据 Z 数据设置颜色
-    //       colorscale: this.color1
-    //         ? [
-    //             [0, "#F9FDD2"], // 颜色从 this.color1 开始
-    //             [1, this.color1], // 结束颜色为其他颜色
-    //           ]
-    //         : [
-    //             [0, "#F9FDD2"],
-    //             [0.15, "#E9F6BD"],
-    //             [0.3, "#C2E3B9"],
-    //             [0.45, "#8AC8BE"],
-    //             [0.6, "#5CA8BF"],
-    //             [0.75, "#407DB3"],
-    //             [0.9, "#2E4C9A"],
-    //             [1, "#1B2973"],
-    //           ],
-    //     },
-    //     name: this.chartData.data[0].color, // 图例显示的名称,使用 color 数据
-    //     legendgroup: this.chartData.data[0].color, // 使用 color 数据作为图例组
-    //   };
-    //   const config = { scrollZoom: true };
+    // 更新配色方案
+    updateChartColor() {
+      this.renderChart(); // 当配色方案或点大小发生变化时重新渲染图表
+    },
 
-    //   const layout = {
-    //     title: this.chartData.data[0].title,
-    //     scene: {
-    //       xaxis: {
-    //         title: this.chartData.xaixs, // X 轴标题
-    //         gridcolor: "rgb(255,255,255)", // 网格线颜色
-    //         tickcolor: "rgb(255,255,255)",
-    //         backgroundcolor: "#e5ecf6",
-    //         showbackground: true, // 显示背景
-    //       },
-    //       yaxis: {
-    //         title: this.chartData.yaixs, // Y 轴标题
-    //         gridcolor: "rgb(255,255,255)", // 网格线颜色
-    //         tickcolor: "rgb(255,255,255)",
-    //         backgroundcolor: "#e5ecf6",
-    //         showbackground: true, // 显示背景
-    //       },
-    //       zaxis: {
-    //         title: this.chartData.zaixs, // Z 轴标题
-    //         gridcolor: "rgb(255,255,255)", // 网格线颜色
-    //         tickcolor: "rgb(255,255,255)",
-    //         backgroundcolor: "#e5ecf6",
-    //         showbackground: true, // 显示背景
-    //       },
-    //       aspectratio: {
-    //         x: 1, // X 轴比例
-    //         y: 3, // Y 轴比例
-    //         z: 1, // Z 轴比例(可根据需要调整)
-    //       },
-    //       plot_bgcolor: "#e5ecf6",
-    //       gridcolor: "#fff", // 设置网格线颜色
-    //       camera: {
-    //         center: {
-    //           x: 0, // 设置中心点
-    //           y: 0, // 设置中心点
-    //           z: 0, // 设置中心点
-    //         },
-    //         eye: {
-    //           x: 0, // 眼睛的位置
-    //           y: 0, // 眼睛的位置
-    //           z: 2.5, // 眼睛的位置
-    //         },
-    //         up: {
-    //           x: 0, // 设置上方向
-    //           y: 0, // 设置上方向
-    //           z: 1, // 设置上方向
-    //         },
-    //       },
-    //     },
-    //     margin: { t: 50, b: 50, l: 50, r: 50 }, // 图表边距
-    //     staticPlot: false,
-    //     legend: {
-    //       x: 0.8, // 图例的 X 位置
-    //       y: 0.9, // 图例的 Y 位置
-    //       title: {
-    //         text: this.chartData.yaixs, // 图例标题
-    //       },
-    //       bgcolor: "rgba(255, 255, 255, 0.7)", // 图例背景色
-    //       bordercolor: "black", // 图例边框颜色
-    //       borderwidth: 1, // 图例边框宽度
-    //     },
-    //   };
-    //   console.log(trace, "渲染图表3Ds");
-    //   Plotly.newPlot(`plotly-3d-chart-` + this.index, [trace], layout, config);
-    // },
-    renderChart() {
-      // 构造3D散点图数据
-      const trace = {
-        x: this.chartData.data[0].xData, // 发电机转速
-        y: this.chartData.data[0].yData, // 时间
-        z: this.chartData.data[0].zData, // 有功功率
-        mode: "markers", // 强制设置为markers,避免出现线条
-        type: "scatter3d", // 3D 散点图
-        marker: {
-          size: 2, // 点的大小
-          color: this.chartData.data[0].zData, // 这里的 zData 用于决定每个点的颜色
-          colorscale: this.color1
-            ? [
-                [0, "#F9FDD2"], // 颜色从 this.color1 开始
-                [1, this.color1], // 结束颜色为其他颜色
-              ]
-            : [
-                [0, "#F9FDD2"],
-                [0.15, "#E9F6BD"],
-                [0.3, "#C2E3B9"],
-                [0.45, "#8AC8BE"],
-                [0.6, "#5CA8BF"],
-                [0.75, "#407DB3"],
-                [0.9, "#2E4C9A"],
-                [1, "#1B2973"],
-              ], // 自定义颜色渐变
-          colorbar: {
-            title: this.chartData.yaixs, // 色带标题
-            // tickvals: [0, 0.5, 1], // 设置色带刻度值
-            // ticktext: ["低", "中", "高"], // 设置刻度文本
-            // tickmode: "array", // 使用数组模式
-            ticks: "outside", // 设置刻度显示方向
-            tickangle: 45, // 设置刻度文字角度
-          },
-        },
-        name: "数据系列", // 图例名称
-        // legendgroup: "group1", // 图例组
-        hovertemplate:
-          `${this.chartData.xaixs}:` +
-          ` %{x} <br> ` +
-          `${this.chartData.yaixs}:` +
-          "%{y} <br>" +
-          `${this.chartData.zaixs}:` +
-          "%{z} <br>",
+    // 切换图表类型
+    setChartType(type) {
+      this.chartType = type;
+      this.renderChart(); // 切换图表类型时重新渲染图表
+    },
+
+    // 获取配色选项样式
+    getOptionStyle(scheme) {
+      return {
+        background: `linear-gradient(to right, ${scheme
+          .slice(0, 8)
+          .join(", ")})`,
+        color: "#fff",
+        height: "30px",
+        lineHeight: "30px",
+        borderRadius: "0px",
       };
+    },
+
+    renderChart() {
+      console.log(this.setUpImgData, "setUpImgData");
+      const uniqueColors = [...new Set(this.chartData.data[0].color)];
+      if (!this.color1) {
+        this.color1 = colorSchemes[0].colors;
+      }
+      const traces = uniqueColors.map((color, idx) => {
+        const colorData = this.chartData.data[0].color.map((c) =>
+          c === color ? 1 : 0
+        );
 
-      const config = { scrollZoom: true };
+        const trace = {
+          x: this.chartData.data[0].xData.filter((_, i) => colorData[i] === 1),
+          y: this.chartData.data[0].yData.filter((_, i) => colorData[i] === 1),
+          z: this.chartData.data[0].zData.filter((_, i) => colorData[i] === 1),
+          mode: this.chartType === "scatter" ? "markers" : "lines", // 根据选择的图表类型来设置模式
+          type: "scatter3d",
+          marker: {
+            size: this.pointSize, // 使用动态点大小
+            color: this.color1[idx], // 使用配色方案
+            colorscale: "YlGnBu",
+          },
+          name: ` ${color}`,
+          legendgroup: `group-${idx}`,
+          hovertemplate:
+            `${this.chartData.xaixs}:` +
+            ` %{x} <br> ` +
+            `${this.chartData.yaixs}:` +
+            "%{y} <br>" +
+            `${this.chartData.zaixs}:` +
+            "%{z} <br>",
+        };
+        return trace;
+      });
 
       const layout = {
         title: this.chartData.data[0].title,
         scene: {
           xaxis: {
-            title: this.chartData.xaixs, // X 轴标题
-            gridcolor: "rgb(255,255,255)", // 网格线颜色
+            title: this.chartData.xaixs,
+            gridcolor: "rgb(255,255,255)",
             tickcolor: "rgb(255,255,255)",
             backgroundcolor: "#e5ecf6",
-            showbackground: true, // 显示背景
+            showbackground: true,
           },
           yaxis: {
-            title: this.chartData.yaixs, // Y 轴标题
-            gridcolor: "rgb(255,255,255)", // 网格线颜色
+            title: this.chartData.yaixs,
+            gridcolor: "rgb(255,255,255)",
             tickcolor: "rgb(255,255,255)",
             backgroundcolor: "#e5ecf6",
-            showbackground: true, // 显示背景
+            showbackground: true,
           },
           zaxis: {
-            title: this.chartData.zaixs, // Z 轴标题
-            gridcolor: "rgb(255,255,255)", // 网格线颜色
+            title: this.chartData.zaixs,
+            gridcolor: "rgb(255,255,255)",
             tickcolor: "rgb(255,255,255)",
             backgroundcolor: "#e5ecf6",
-            showbackground: true, // 显示背景
-          },
-          aspectratio: {
-            x: 1, // X 轴比例
-            y: 3, // Y 轴比例
-            z: 1, // Z 轴比例
+            showbackground: true,
           },
+          // aspectratio: {
+          //   x: 1,
+          //   y: 3,
+          //   z: 1,
+          // },
           plot_bgcolor: "#e5ecf6",
-          gridcolor: "#fff", // 设置网格线颜色
-          camera: {
-            center: {
-              x: 0, // 设置中心点
-              y: 0, // 设置中心点
-              z: 0, // 设置中心点
-            },
-            eye: {
-              x: 0, // 眼睛的位置
-              y: 0, // 眼睛的位置
-              z: 2.5, // 眼睛的位置
-            },
-            up: {
-              x: 0, // 设置上方向
-              y: 0, // 设置上方向
-              z: 1, // 设置上方向
-            },
-          },
+          gridcolor: "#fff",
+          // camera: {
+          //   center: { x: 0, y: 0, z: 0 },
+          //   eye: { x: 0, y: 0, z: 2.5 },
+          //   up: { x: 0, y: 0, z: 1 },
+          // },
         },
-        margin: { t: 50, b: 50, l: 50, r: 50 }, // 图表边距
+        margin: { t: 50, b: 50, l: 50, r: 50 },
         staticPlot: false,
+        showlegend: true,
+        legend: {
+          marker: {
+            size: 10, // 图例中点的大小
+          },
+        },
       };
-
-      Plotly.newPlot(`plotly-3d-chart-` + this.index, [trace], layout, config);
+      // 获取x轴和y轴的设置
+      const getChartSetUp = (axisTitle) => {
+        return this.setUpImgData.find((item) => item.text.includes(axisTitle));
+      };
+      // 更新x轴和y轴的范围与步长
+      const xChartSetUp = getChartSetUp(layout.scene.xaxis.title);
+      if (xChartSetUp) {
+        layout.scene.xaxis.dtick = xChartSetUp.dtick;
+        layout.scene.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+      }
+      const yChartSetUp = getChartSetUp(layout.scene.yaxis.title);
+      if (yChartSetUp) {
+        layout.scene.yaxis.dtick = yChartSetUp.dtick;
+        layout.scene.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
+      }
+      const zChartSetUp = getChartSetUp(layout.scene.zaxis.title);
+      if (zChartSetUp) {
+        layout.scene.zaxis.dtick = zChartSetUp.dtick;
+        layout.scene.zaxis.range = [zChartSetUp.min, zChartSetUp.max];
+      }
+      Plotly.newPlot(`plotly-3d-chart-` + this.index, traces, layout);
     },
   },
 };

+ 6 - 26
src/views/performance/components/chartsCom/BarChart.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:30:17
- * @LastEditTime: 2025-02-13 09:24:13
+ * @LastEditTime: 2025-02-21 15:18:51
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/BarChart.vue
@@ -121,31 +121,11 @@ export default {
           color: this.color1, // 折线图颜色
         },
         name: chartDataset.title || "数据", // 图例名称
-      };
-
-      // Normal Range Lines
-      const normalRangeLine = {
-        x: chartDataset.xData, // 横坐标数据
-        y: Array(chartDataset.xData.length).fill(this.normalRangeMin), // 最低值线
-        mode: "lines",
-        name: "LCL", // 图例名称(最低范围)
-        line: {
-          color: "red",
-          width: 2,
-          dash: "dash", // 虚线
-        },
-      };
-
-      const normalRangeMaxLine = {
-        x: chartDataset.xData, // 横坐标数据
-        y: Array(chartDataset.xData.length).fill(this.normalRangeMax), // 最高值线
-        mode: "lines",
-        name: "UCL", // 图例名称(最高范围)
-        line: {
-          color: "red",
-          width: 2,
-          dash: "dash", // 虚线
-        },
+        hovertemplate:
+          `${this.chartData.xaixs}:` +
+          ` %{x} <br> ` +
+          `${this.chartData.yaixs}:` +
+          "%{y} <br>",
       };
 
       const layout = {

+ 70 - 42
src/views/performance/components/chartsCom/BoxLineCharts.vue

@@ -2,18 +2,19 @@
   <div style="width: 100%; height: 500px">
     <!-- 条件渲染日期范围选择器 -->
     <el-date-picker
-      v-if="isDateType(chartData.data[0]?.xData)"
-      <!--
-      只有xData是日期时才显示
-      --
-    >
-      v-model="dateRange" type="daterange" align="right" unlink-panels
-      range-separator="至" start-placeholder="开始日期"
-      end-placeholder="结束日期" @change="onDateRangeChange" size="mini"
-      style="margin: 20px 0 0 0" ></el-date-picker
-    >
+      v-if="chartData.xaixs === '时间'"
+      v-model="dateRange"
+      type="daterange"
+      align="right"
+      unlink-panels
+      range-separator="至"
+      start-placeholder="开始日期"
+      end-placeholder="结束日期"
+      @change="onDateRangeChange"
+      size="mini"
+      style="margin: 20px 0 0 0"
+    ></el-date-picker>
 
-    <!-- boxLineCharts -->
     <div
       v-loading="loading"
       :id="`plotDivBox-${index}`"
@@ -39,6 +40,10 @@ export default {
     index: {
       type: String,
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   data() {
     return {
@@ -48,6 +53,20 @@ export default {
       isError: false,
     };
   },
+  watch: {
+    setUpImgData: {
+      handler(newType) {
+        this.drawBoxPlot();
+      },
+      deep: true,
+    },
+    dateRange: {
+      handler(newRange) {
+        this.drawBoxPlot(); // 日期范围变化时重新绘制图表
+      },
+      deep: true,
+    },
+  },
   mounted() {
     console.log(this.fileAddr, "fileAddr 连接");
     this.getData();
@@ -62,9 +81,9 @@ export default {
             cancelToken: this.cancelToken.token,
           });
           this.chartData = resultChartsData.data;
-          this.drawBoxPlot();
           this.loading = false;
           this.isError = false;
+          this.drawBoxPlot(); // 数据加载完成后绘制图表
         } catch (error) {
           this.loading = false;
           this.isError = true;
@@ -88,9 +107,12 @@ export default {
 
     // 判断xData是否为日期格式
     isDateType(xData) {
-      // 假设第一个元素如果是日期字符串或Date对象则为日期类型
-      const firstTimestamp = xData[0];
-      return !isNaN(Date.parse(firstTimestamp)); // 判断是否是有效日期
+      if (xData) {
+        const firstTimestamp = xData[0];
+        return !isNaN(Date.parse(firstTimestamp)); // 判断是否是有效日期
+      } else {
+        return false;
+      }
     },
 
     // 过滤数据
@@ -99,14 +121,12 @@ export default {
       const filteredYData = [];
       const filteredMedians = group.medians ? { x: [], y: [] } : null;
 
-      // 如果是日期类型数据,则进行日期过滤
       if (this.isDateType(group.xData)) {
         group.xData.forEach((timestamp, index) => {
           if (this.isInDateRange(timestamp)) {
             filteredXData.push(timestamp);
             filteredYData.push(group.yData[index]);
 
-            // 处理中位值数据,确保索引一致
             if (filteredMedians && this.isInDateRange(group.medians.x[index])) {
               filteredMedians.x.push(group.medians.x[index]);
               filteredMedians.y.push(group.medians.y[index]);
@@ -114,7 +134,6 @@ export default {
           }
         });
       } else {
-        // 如果不是日期类型,直接将数据添加到数组
         filteredXData.push(...group.xData);
         filteredYData.push(...group.yData);
 
@@ -134,12 +153,10 @@ export default {
 
     // 绘制箱线图
     drawBoxPlot() {
-      const chartData = this.chartData.data[0];
+      if (!this.chartData.data || this.loading) return; // 如果数据为空或正在加载则不绘制
 
-      // 过滤数据
+      const chartData = this.chartData.data[0];
       const filteredData = this.filterData(chartData);
-      // 构建箱线图
-      console.log(filteredData, "filteredData");
 
       const trace = {
         x: filteredData.xData,
@@ -148,14 +165,17 @@ export default {
         marker: {
           color: "lightgray",
         },
-        boxpoints: false, // 不显示散点
-        boxmean: false, // 不显示均值
+        boxpoints: false,
+        boxmean: false,
         name: filteredData.title,
+        hovertemplate:
+          `${this.chartData.xaixs}:` +
+          ` %{x} <br> ` +
+          `${this.chartData.yaixs}:` +
+          "%{y} <br>",
       };
 
-      let trace2 = {}; // 初始化trace2为一个空对象
-
-      // 如果有中位值并且中位值的x轴数据不为空,则显示中位点
+      let trace2 = {};
       if (filteredData.medians && filteredData.medians.x.length > 0) {
         trace2 = {
           x: filteredData.medians.x,
@@ -170,30 +190,38 @@ export default {
         };
       }
 
-      console.log(filteredData, "filteredData");
-
-      // 布局设置
       const layout = {
         title: filteredData.title,
         xaxis: {
           title: this.chartData.xaixs,
-          // 如果xData不是日期格式,则不配置type: "date"
-          title: this.chartData.xaixs,
-          // tickvals: filteredData.xData, // 设置tickvals为原始的xData
-          // ticktext: filteredData.xData, // 设置ticktext为原始的xData(避免被转换成数字)
-          // tickformat: this.isDateType(filteredData.xData)
-          //   ? "%Y-%m-%d"
-          //   : undefined,
-          tickmode: "array", // 精确控制刻度
+          tickmode: "array",
         },
         yaxis: { title: this.chartData.yaixs },
         showlegend: true,
       };
-      // 使用 v-if 防止重新渲染
-      if (this.chartData.data && this.chartData.data.length > 0) {
-        Plotly.newPlot(`plotDivBox-${this.index}`, [trace, trace2], layout);
+
+      const getChartSetUp = (axisTitle) => {
+        return this.setUpImgData.find((item) => item.text.includes(axisTitle));
+      };
+
+      const xChartSetUp = getChartSetUp(layout.xaxis.title);
+      if (xChartSetUp) {
+        layout.xaxis.dtick = xChartSetUp.dtick;
+        layout.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+      }
+
+      const yChartSetUp = getChartSetUp(layout.yaxis.title);
+      if (yChartSetUp) {
+        layout.yaxis.dtick = yChartSetUp.dtick;
+        layout.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
       }
-      // Plotly.newPlot(`plotDivBox-${this.index}`, [trace, trace2], layout);
+
+      this.$nextTick(() => {
+        const plotDiv = document.getElementById(`plotDivBox-${this.index}`);
+        if (plotDiv) {
+          Plotly.newPlot(plotDiv, [trace, trace2], layout);
+        }
+      });
     },
   },
 };

+ 53 - 2
src/views/performance/components/chartsCom/BoxMarkersCharts.vue

@@ -40,6 +40,10 @@ export default {
     index: {
       type: String,
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   data() {
     return {
@@ -52,6 +56,14 @@ export default {
   mounted() {
     this.getData(); // 获取数据
   },
+  watch: {
+    setUpImgData: {
+      handler(newType) {
+        this.drawBoxPlot();
+      },
+      deep: true,
+    },
+  },
   methods: {
     // 获取数据
     async getData() {
@@ -135,8 +147,32 @@ export default {
           marker: {
             color: group.color,
           },
-          boxpoints: false,
-          boxmean: false,
+          boxpoints: false, // 是否显示异常值
+          boxmean: true, // 是否显示均值
+          hovertemplate: (data) => {
+            // 获取箱线图的统计数据
+            const max = data.max; // 最大值
+            const min = data.min; // 最小值
+            const q1 = data.q1; // 下四分位数
+            const q3 = data.q3; // 上四分位数
+            const median = data.median; // 中位数
+            const mean = data.mean; // 均值
+            const iqr = q3 - q1; // 四分位距(IQR)
+            const outliers = data.outliers || "无"; // 异常值(如果没有异常值,则显示“无”)
+
+            return (
+              `${xaixs}: %{x}<br>` + // 显示类别
+              `<b>最大值</b>: ${max}<br>` + // 最大值
+              `<b>最小值</b>: ${min}<br>` + // 最小值
+              `<b>上四分位数 (Q3)</b>: ${q3}<br>` + // 上四分位数
+              `<b>中位数 (Median)</b>: ${median}<br>` + // 中位数
+              `<b>下四分位数 (Q1)</b>: ${q1}<br>` + // 下四分位数
+              `<b>四分位距 (IQR)</b>: ${iqr}<br>` + // 四分位距
+              `<b>均值 (Mean)</b>: ${mean}<br>` + // 均值
+              `<b>异常值</b>: ${outliers}<br>` + // 异常值
+              "<extra></extra>" // 额外的文本(可以留空)
+            );
+          },
         });
 
         // 如果有中位点数据且中位点数据不为空,添加中位点
@@ -151,6 +187,7 @@ export default {
             },
             name: `${group.title} - 中位点`,
             type: "scatter",
+            hovertemplate: `${xaixs}: %{x} <br> ${yaixs}: %{y} <br><b>中位点</b>: %{y}<br><extra></extra>`,
           });
         }
       });
@@ -167,6 +204,20 @@ export default {
         },
         showlegend: true,
       };
+      const getChartSetUp = (axisTitle) => {
+        return this.setUpImgData.find((item) => item.text.includes(axisTitle));
+      };
+      // 更新x轴和y轴的范围与步长
+      const xChartSetUp = getChartSetUp(layout.xaxis.title);
+      if (xChartSetUp) {
+        layout.xaxis.dtick = xChartSetUp.dtick;
+        layout.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+      }
+      const yChartSetUp = getChartSetUp(layout.yaxis.title);
+      if (yChartSetUp) {
+        layout.yaxis.dtick = yChartSetUp.dtick;
+        layout.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
+      }
 
       Plotly.newPlot(chartContainer, [...traces, ...medianMarkers], layout);
     },

+ 5 - 1
src/views/performance/components/chartsCom/FaultAll.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-15 14:24:59
- * @LastEditTime: 2025-01-15 15:55:10
+ * @LastEditTime: 2025-02-21 17:22:22
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/FaultAll.vue
@@ -70,6 +70,8 @@ export default {
         type: "bar",
         marker: { color: "#64ADC2" }, // 蓝色柱状图
         name: "故障次数",
+        hovertemplate:
+          `故障类型:` + ` %{x} <br> ` + `故障时长:` + "%{y} 分钟<br>",
       };
 
       // 故障时长的折线图数据(右侧 Y 轴)
@@ -81,6 +83,8 @@ export default {
         line: { color: "#1A295D" }, // 红色折线
         name: "故障时长",
         yaxis: "y2", // 使用第二个 Y 轴(右侧)
+        hovertemplate:
+          `故障类型:` + ` %{x} <br> ` + `故障时长:` + "%{y} 分钟 <br>",
       };
 
       // 布局配置,设置双 Y 轴

+ 3 - 1
src/views/performance/components/chartsCom/FaultUnit.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-15 15:49:57
- * @LastEditTime: 2025-01-23 09:56:11
+ * @LastEditTime: 2025-02-21 17:22:38
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/FaultUntal.vue
@@ -56,6 +56,7 @@ export default {
         mode: "markers", // 散点图
         marker: { color: "#64ADC2", size: 10 }, // 蓝色散点
         name: "故障次数",
+        hovertemplate: `机组:` + ` %{x} <br> ` + `故障次数:` + "%{y} 分钟<br>",
       };
 
       // 故障时长的散点图数据(右侧 Y 轴)
@@ -66,6 +67,7 @@ export default {
         marker: { color: "#1A295D", size: 10 }, // 红色散点
         name: "故障时长",
         yaxis: "y2", // 使用第二个 Y 轴(右侧)
+        hovertemplate: `机组:` + ` %{x} <br> ` + `故障时长:` + "%{y} 分钟<br>",
       };
 
       // 布局配置,设置双 Y 轴

+ 57 - 12
src/views/performance/components/chartsCom/GeneratorTemperature.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-21 11:18:49
- * @LastEditTime: 2025-02-19 10:06:39
+ * @LastEditTime: 2025-02-26 14:49:53
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/GeneratorTemperature.vue
@@ -50,9 +50,9 @@
 import { nextTick } from "vue"; // 导入 nextTick
 import Plotly from "plotly.js-dist";
 import axios from "axios";
-import { colorSchemesLine } from "@/views/overview/js/colors";
+import { colorSchemes } from "@/views/overview/js/colors";
 import { myMixin } from "@/mixins/chartRequestMixin"; // 假设你需要的 mixin
-
+import { mapState } from "vuex";
 export default {
   props: {
     fileAddr: {
@@ -65,6 +65,10 @@ export default {
         return "";
       },
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   mixins: [myMixin],
   data() {
@@ -72,18 +76,39 @@ export default {
       chartData: {},
       color1: [], // 默认颜色
       // 配色方案列表(每个方案是一个颜色数组)
-      colorSchemes: [...colorSchemesLine],
+      colorSchemes: [...colorSchemes],
       chartType: "line", // 默认图表类型是折线图
 
       loading: false,
       isError: false,
-      colors: [...colorSchemesLine[0].colors],
+      colors: [...colorSchemes[0].colors],
       typeLine: ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"],
     };
   },
+  computed: {
+    ...mapState("themes", {
+      themeColor: "themeColor",
+    }),
+  },
+  watch: {
+    themeColor: {
+      handler() {
+        this.color1 = this.themeColor;
+        this.updateChartColor();
+      },
+      deep: true,
+    },
+    setUpImgData: {
+      handler(newType) {
+        this.drawChart();
+      },
+      deep: true,
+    },
+  },
   mounted() {
     if (this.fileAddr) {
       this.getData();
+      this.color1 = this.themeColor;
     }
   },
   methods: {
@@ -132,6 +157,11 @@ export default {
                 ? this.color1[index % this.color1.length]
                 : this.colors[index % this.colors.length], // 为每个机组分配不同的颜色
           },
+          hovertemplate:
+            `${this.chartData.xaixs}:` +
+            ` %{x} <br> ` +
+            `${this.chartData.yaixs}:` +
+            "%{y} <br>",
         };
 
         if (this.chartType === "line") {
@@ -144,7 +174,6 @@ export default {
 
         data.push(chartConfig);
       });
-
       const layout = {
         title: this.chartData.title,
         xaxis: {
@@ -162,10 +191,24 @@ export default {
         autosize: true, // 开启自适应
         barmode: this.chartType === "bar" ? "stack" : "group", // 如果是柱状图则启用堆叠
       };
-
-      // 使用 Plotly.react 来更新图表
-      Plotly.react(`bar-chart${this.index}`, data, layout, {
-        responsive: true,
+      const getChartSetUp = (axisTitle) => {
+        return this.setUpImgData.find((item) => item.text.includes(axisTitle));
+      };
+      const xChartSetUp = getChartSetUp(layout.xaxis.title);
+      if (xChartSetUp) {
+        layout.xaxis.dtick = xChartSetUp.dtick;
+        layout.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+      }
+      const yChartSetUp = getChartSetUp(layout.yaxis.title);
+      if (yChartSetUp) {
+        layout.yaxis.dtick = yChartSetUp.dtick;
+        layout.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
+      }
+      this.$nextTick(() => {
+        // 使用 Plotly.react 来更新图表
+        Plotly.react(`bar-chart${this.index}`, data, layout, {
+          responsive: true,
+        });
       });
     },
 
@@ -181,11 +224,13 @@ export default {
     // 根据配色方案设置每个选项的样式
     getOptionStyle(scheme) {
       return {
-        background: `linear-gradient(to right, ${scheme.join(", ")})`,
+        background: `linear-gradient(to right, ${scheme
+          .slice(0, 8)
+          .join(", ")})`,
         color: "#fff",
         height: "30px",
         lineHeight: "30px",
-        borderRadius: "4px",
+        borderRadius: "0px",
       };
     },
   },

+ 29 - 3
src/views/performance/components/chartsCom/HeatmapCharts.vue

@@ -8,7 +8,8 @@
 import { nextTick } from "vue"; // 导入 nextTick
 import Plotly from "plotly.js-dist";
 import axios from "axios";
-
+import { colorSchemes } from "@/views/overview/js/colors";
+import { mapState } from "vuex";
 export default {
   props: {
     inds: {
@@ -22,9 +23,13 @@ export default {
       default: "",
     },
   },
+
   data() {
     return {
       chartData: {},
+      color1: colorSchemes[0].colors, // 默认颜色
+      // 配色方案列表(每个方案是一个颜色数组)
+      colorSchemes: [...colorSchemes],
       initData: [
         {
           z: [],
@@ -45,9 +50,24 @@ export default {
       ],
     };
   },
+  computed: {
+    ...mapState("themes", {
+      themeColor: "themeColor",
+    }),
+  },
+  watch: {
+    themeColor: {
+      handler() {
+        this.color1 = this.themeColor;
+        this.initcharts();
+      },
+      deep: true,
+    },
+  },
   mounted() {
     if (this.fileAddr) {
       this.getData();
+      this.color1 = this.themeColor;
     }
   },
 
@@ -60,7 +80,6 @@ export default {
           const resultChartsData = await axios.get(this.fileAddr, {
             cancelToken: this.cancelToken.token,
           });
-          console.log(resultChartsData.data, "resultChartsData");
           this.chartData = resultChartsData.data;
           this.initData[0].x = this.chartData.data[0].xData;
           this.initData[0].y = this.chartData.data[0].yData;
@@ -84,7 +103,14 @@ export default {
         x: this.initData[0].x,
         y: this.initData[0].y,
         z: this.initData[0].z,
-        colorscale: this.initData[0].colorscale, // 使用新的颜色范围
+        colorscale: [
+          [0, this.color1[0]], // 0% - 50%
+          [0.5, this.color1[0]], // 50%
+          [0.5, this.color1[4]], // 50% - 85%
+          [0.85, this.color1[4]], // 85%
+          [0.85, this.color1[8]], // 85% - 100%
+          [1, this.color1[8]], // 100%
+        ], // 使用新的颜色范围
         text: this.initData[0].z.map((row) =>
           row.map((value) => value.toString())
         ),

+ 0 - 43
src/views/performance/components/chartsCom/MarkersCharts.vue

@@ -1,43 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2024-09-11 14:24:26
- * @LastEditTime: 2025-01-14 13:57:00
- * @LastEditors: bogon
- * @Description: In User Settings Edit
- * @FilePath: /performance-test/src/views/performance/components/chartsCom/MarkersCharts.vue
--->
-<template>
-  <div>
-    <!-- MarkersCharts
-    <h1>变桨和有功功率协调性分析 2D+3D</h1>
-    <h1>变桨和叶尖速比及风能利用系数分析 2D</h1>
-    <h1>逐月有功功率散点3D分析 3D</h1>
-    <h1>发电机转速和有功功率分析 3D+2D+3D</h1>
-    <h1>发电机转速和转矩分析3D+2D+3D</h1>
-    <h1>变桨和发电机转速协调性分析2D</h1>
-    <h1>最小桨距角分析2D</h1>
-    <h1>叶尖速比-Cp-功率散点分析2D</h1> -->
-    <div :id="`chart-${inds}`" style="width: 100%; height: 550px"></div>
-  </div>
-</template>
-<script>
-import { allTypesDatas } from "@/utils/allTypesOfAnalysisData.js";
-import Plotly from "plotly.js-dist";
-export default {
-  props: {},
-  data() {
-    return {};
-  },
-  mounted() {
-    this.initcharts();
-  },
-  methods: {
-    initcharts() {
-      const lineDatas = allTypesDatas.filter(
-        (item) => item.analysisTypeCode === "temperature_large_components"
-      )[0];
-    },
-  },
-};
-</script>
-<style scoped></style>

+ 0 - 395
src/views/performance/components/chartsCom/NoColourBandTwoDMarkerChart.vue

@@ -1,395 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2025-01-17 17:22:04
- * @LastEditTime: 2025-02-17 17:36:23
- * @LastEditors: bogon
- * @Description: In User Settings Edit
- * @FilePath: /performance-test/src/views/performance/components/chartsCom/NoColourBandTwoDMarkerChart.vue
--->
-<template>
-  <div style="height: 400px">
-    <!-- 2D散点图 没色带 -->
-    <template>
-      <div style="display: flex; align-items: center; margin-top: 20px">
-        <div style="margin-right: 20px; display: flex; align-items: center">
-          <!-- <el-color-picker
-            size="small"
-            v-model="color1"
-            show-alpha
-            @change="updateChartColor"
-          ></el-color-picker>
-          <span style="margin-left: 10px">自定义颜色</span> -->
-          <el-select
-            size="small"
-            v-model="color1"
-            @change="updateChartColor"
-            placeholder="选择配色方案"
-            style="width: 200px"
-          >
-            <el-option
-              v-for="(scheme, index) in colorSchemes"
-              :key="index"
-              :label="scheme.label"
-              :value="scheme.colors"
-              :style="getOptionStyle(scheme.colors)"
-            ></el-option>
-          </el-select>
-        </div>
-        <!-- 图表类型切换按钮 -->
-        <!-- <div>
-          <el-button size="small" @click="setChartType('scatter')"
-            >散点图</el-button
-          >
-          <el-button size="small" @click="setChartType('line')"
-            >折线图</el-button
-          >
-        </div> -->
-      </div>
-      <!-- 点大小控制 -->
-      <div style="display: flex; align-items: center">
-        <!-- <span style="margin-right: 10px">点大小</span> -->
-        <el-slider
-          v-model="pointSize"
-          :min="3"
-          :max="15"
-          :step="1"
-          label="点的大小"
-          show-stops
-          style="width: 150px"
-          @change="updateChartColor"
-        ></el-slider>
-      </div>
-      <div v-loading="loading" ref="plotlyChart" style="height: 400px">
-        <el-empty v-if="isError" description="请求失败"></el-empty>
-      </div>
-    </template>
-  </div>
-</template>
-
-<script>
-import Plotly from "plotly.js-dist";
-import axios from "axios";
-import { colorSchemes } from "@/views/overview/js/colors";
-import { myMixin } from "@/mixins/chartRequestMixin";
-
-export default {
-  mixins: [myMixin],
-  props: {
-    fileAddr: {
-      default: "",
-      type: String,
-    },
-    index: {
-      type: String,
-    },
-  },
-  data() {
-    return {
-      pointSize: 5, // 默认点大小
-      color1: colorSchemes[0].colors, // 默认颜色
-      // 配色方案列表(每个方案是一个颜色数组)
-      colorSchemes: [...colorSchemes],
-      chartData: {},
-      chartType: "scatter", // 初始化为散点图 (scatter)
-
-      selectedPoints: [],
-      originalColors: [],
-      originalSizes: [],
-    };
-  },
-  async mounted() {
-    this.getData();
-  },
-  methods: {
-    // 根据配色方案设置每个选项的样式
-    getOptionStyle(scheme) {
-      return {
-        background: `linear-gradient(to right, ${scheme.join(", ")})`,
-        color: "#fff",
-        height: "30px",
-        lineHeight: "30px",
-        borderRadius: "4px",
-      };
-    },
-    async getData() {
-      if (this.fileAddr !== "") {
-        try {
-          this.loading = true;
-          this.cancelToken = axios.CancelToken.source();
-          console.log(this.cancelToken);
-          const resultChartsData = await axios.get(this.fileAddr, {
-            cancelToken: this.cancelToken.token,
-          });
-          this.chartData = resultChartsData.data;
-          this.drawChart();
-          this.isError = false;
-          this.loading = false;
-        } catch (error) {
-          this.isError = true;
-          this.loading = false;
-        }
-      }
-    },
-    drawChart() {
-      const data = this.chartData.data && this.chartData.data[0];
-      let trace = {};
-      // 保存原始颜色和大小
-      this.originalColors = [...data.yData];
-      this.originalSizes = new Array(data.xData.length).fill(6); // 初始点大小
-      if (this.chartType === "scatter") {
-        // 绘制 2D 散点图
-        console.log("重新绘制图表", this.color1);
-        trace = {
-          x: data.xData,
-          y: data.yData,
-          mode: "markers",
-          type: "scattergl", // 这里改为 scattergl
-          text: data.engineName, // 提示文本
-          marker: {
-            color: data.yData, // 根据 yData 的值设置颜色
-            // colorscale: "Viridis", // 使用的颜色区间
-            colorscale: this.color1
-              ? [
-                  [0, "#F9FDD2"], // 颜色从 this.color1 开始
-                  [1, this.color1], // 结束颜色为其他颜色
-                ]
-              : [
-                  [0, "#F9FDD2"],
-                  [0.15, "#E9F6BD"],
-                  [0.3, "#C2E3B9"],
-                  [0.45, "#8AC8BE"],
-                  [0.6, "#5CA8BF"],
-                  [0.75, "#407DB3"],
-                  [0.9, "#2E4C9A"],
-                  [1, "#1B2973"],
-                ],
-            // colorbar: {
-            //   title: data.colorbartitle, // 色标标题
-            // },
-            size: new Array(data.xData.length).fill(this.pointSize), // 初始点大小
-          },
-        };
-      } else if (this.chartType === "line") {
-        // 折线图
-        trace = {
-          x: data.xData,
-          y: data.yData,
-          mode: "lines",
-          type: "scattergl", // 折线图
-          text: data.engineName,
-          line: {
-            color: this.color1, // 使用自定义颜色
-          },
-        };
-      } else if (this.chartType === "bar") {
-        // 柱状图
-        trace = {
-          x: data.xData,
-          y: data.yData,
-          type: "bar", // 柱状图
-          marker: {
-            color: this.color1, // 使用自定义颜色
-          },
-        };
-      }
-      // 图表布局;
-      const layout = {
-        title: data.title,
-        xaxis: {
-          title: this.chartData.xaixs,
-          showline: false, // 隐藏x轴轴线
-          zeroline: false, // 隐藏零轴
-          gridcolor: "#fff", // 设置x轴网格线颜色
-          gridcolor: "rgb(255,255,255)", // 网格线颜色
-          tickcolor: "rgb(255,255,255)",
-          backgroundcolor: "#e5ecf6",
-          showbackground: true, // 显示背景
-        },
-        yaxis: {
-          showline: false, // 隐藏x轴轴线
-          zeroline: false, // 隐藏零轴
-          gridcolor: "#fff", // 设置x轴网格线颜色
-          title: this.chartData.yaixs,
-          line: {
-            show: false,
-          },
-          gridcolor: "rgb(255,255,255)", // 网格线颜色
-          tickcolor: "rgb(255,255,255)",
-          backgroundcolor: "#e5ecf6",
-          showbackground: true, // 显示背景
-        },
-        showlegend: false,
-        plot_bgcolor: "#e5ecf6",
-        gridcolor: "#fff", // 设置网格线颜色
-      };
-      const config = {
-        modeBarButtonsToAdd: [
-          {
-            name: "选择",
-            icon: Plotly.Icons.pencil,
-            click: (gd) => this.handleSelectClick(gd),
-          },
-          {
-            name: "清除选中",
-            icon: Plotly.Icons.undo,
-            click: (gd) => this.handleClearSelect(gd),
-          },
-          {
-            name: "下载CSV文件",
-            icon: Plotly.Icons.disk,
-            click: (gd) => this.handleDownloadCSV(gd),
-          },
-        ],
-        modeBarButtonsToRemove: [
-          // 移除不需要的工具按钮
-          "lasso2d",
-        ],
-        displaylogo: false,
-        editable: true,
-        scrollZoom: false,
-      };
-      // 使用 Plotly 绘制图表
-      Plotly.react(this.$refs.plotlyChart, [trace], layout, config).then(() => {
-        // 确保在图表加载完成后设置工具栏按钮
-        const plotElement = this.$refs.plotlyChart;
-        Plotly.relayout(plotElement, layout); // 使用 relayout 来确保自定义按钮应用
-      });
-    },
-    handleSelectClick(gd) {
-      // 绑定 plotly_click 事件
-      gd.on("plotly_click", (data) => {
-        const pointIndex = data.points[0].pointIndex;
-        const xClick = data.points[0].x;
-        const yClick = data.points[0].y;
-
-        // 将点击的点添加到选中的点数组
-        this.selectedPoints.push({
-          x: xClick, // 点击点的 x 坐标
-          y: yClick, // 点击点的 y 坐标
-          index: pointIndex, // 点击点的索引
-          time: data.points[0].text, // 点击点的时间信息
-        });
-
-        // 初始化颜色和大小数组
-        let newColors = [...this.originalColors];
-        let newSize = [...this.originalSizes];
-
-        // 如果选中的点数大于等于3,进行多边形选择区域的处理
-        if (this.selectedPoints.length >= 3) {
-          const xv = this.selectedPoints.map((p) => p.x);
-          const yv = this.selectedPoints.map((p) => p.y);
-
-          // 判断点是否在多边形内
-          function inPolygon(x, y, xv, yv) {
-            let inside = false;
-            for (let i = 0, j = xv.length - 1; i < xv.length; j = i++) {
-              const intersect =
-                yv[i] > y !== yv[j] > y &&
-                x < ((xv[j] - xv[i]) * (y - yv[i])) / (yv[j] - yv[i]) + xv[i];
-              if (intersect) inside = !inside;
-            }
-            return inside;
-          }
-
-          // 用于跟踪已添加的 (x, y) 组合
-          const addedPoints = {};
-
-          // 遍历图表数据中的所有点,检查是否在多边形内
-          gd.data[0].x.forEach((xVal, i) => {
-            const yVal = gd.data[0].y[i];
-            if (inPolygon(xVal, yVal, xv, yv)) {
-              const pointKey = `${xVal}-${yVal}`;
-              if (!addedPoints[pointKey]) {
-                this.selectedPoints.push({
-                  x: gd.data[0].x[i],
-                  y: gd.data[0].y[i],
-                  time: gd.data[0].text[i],
-                });
-
-                newColors[i] = "red"; // 高亮选择的点
-                newSize[i] = 10; // 设置点的大小
-                addedPoints[pointKey] = true;
-              }
-            }
-          });
-        }
-
-        // 更新选中点的颜色和大小
-        this.selectedPoints.forEach((point) => {
-          newColors[point.index] = "red";
-          newSize[point.index] = 10;
-        });
-
-        // 使用 Plotly.restyle 更新颜色和大小
-        Plotly.restyle(gd, {
-          "marker.color": [newColors],
-          "marker.size": [newSize],
-        });
-
-        // 处理选中的数据
-        this.getSelectData(this.selectedPoints, gd.layout);
-      });
-    },
-
-    handleClearSelect(gd) {
-      this.selectedPoints = [];
-      Plotly.restyle(gd, {
-        "marker.color": [this.originalColors],
-        "marker.size": [this.originalSizes],
-      });
-    },
-    getSelectData(selectedPoints, layout) {
-      // 在这里处理选中的数据,您可以将其展示或导出等
-      console.log("选中的点数据:", selectedPoints);
-      console.log("布局信息:", layout);
-    },
-    handleDownloadCSV(gd) {
-      if (this.selectedPoints.length === 0) {
-        alert("没有选中的数据");
-        return;
-      }
-      this.downloadCSV();
-    },
-
-    downloadCSV() {
-      const headers = [this.chartData.xaixs, this.chartData.yaixs];
-      const csvRows = [headers]; // 保存标头
-      // 使用 Set 或 Map 去重
-      const uniquePoints = [];
-      this.selectedPoints.forEach((point) => {
-        if (!uniquePoints.some((p) => p.x === point.x && p.y === point.y)) {
-          uniquePoints.push(point);
-        }
-      });
-
-      // 将去重后的点加入 CSV 数据
-      uniquePoints.forEach((point) => {
-        csvRows.push(`${point.x},${point.y}`);
-      });
-
-      const csvString = csvRows.join("\n");
-      const blob = new Blob([csvString], { type: "text/csv; charset=utf-8" });
-      const url = URL.createObjectURL(blob);
-      const a = document.createElement("a");
-      a.href = url;
-      a.download = "selected_data.csv";
-      a.click();
-      URL.revokeObjectURL(url);
-    },
-    setChartType(type) {
-      // 切换图表类型
-      this.chartType = type;
-      this.drawChart(); // 重新绘制图表
-    },
-
-    updateChartColor(color) {
-      // 更新图表颜色
-      // this.color1 = color;
-      console.log(this.color1, "this.color1");
-      this.drawChart();
-    },
-  },
-};
-</script>
-
-<style scoped></style>

+ 188 - 91
src/views/performance/components/chartsCom/Time3DChart.vue

@@ -1,13 +1,38 @@
-<!--
- * @Author: your name
- * @Date: 2025-01-22 18:50:27
- * @LastEditTime: 2025-02-20 10:21:12
- * @LastEditors: bogon
- * @Description: In User Settings Edit
- * @FilePath: /performance-test/src/views/performance/components/chartsCom/Time3DChart.vue
--->
 <template>
   <div>
+    <!-- 配色方案选择和图表类型切换 -->
+    <div style="display: flex; align-items: center; padding-top: 20px">
+      <div style="margin-right: 20px; display: flex; align-items: center">
+        <el-select
+          size="small"
+          v-model="color1"
+          @change="updateChartColor"
+          placeholder="选择配色方案"
+          style="width: 200px"
+        >
+          <el-option
+            v-for="(scheme, index) in colorSchemes"
+            :key="index"
+            :label="scheme.label"
+            :value="scheme.colors"
+            :style="getOptionStyle(scheme.colors)"
+          ></el-option>
+        </el-select>
+      </div>
+    </div>
+    <!-- 点大小控制 -->
+    <div style="display: flex; align-items: center">
+      <el-slider
+        v-model="pointSize"
+        :min="1"
+        :max="15"
+        :step="1"
+        label="点的大小"
+        show-stops
+        style="width: 150px"
+        @change="updateChartColor"
+      ></el-slider>
+    </div>
     <div
       v-loading="loading"
       :id="`plotly-3d-chart-` + index"
@@ -23,6 +48,8 @@
 import Plotly from "plotly.js-dist";
 import axios from "axios";
 import { myMixin } from "@/mixins/chartRequestMixin";
+import { colorSchemes } from "@/views/overview/js/colors";
+import { mapState } from "vuex";
 export default {
   props: {
     fileAddr: {
@@ -33,16 +60,60 @@ export default {
       default: "",
       type: String,
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   data() {
     return {
-      color1: "",
+      color1: [
+        "#DBEEBC",
+        "#A8D7BE",
+        "#8ECAC1",
+        "#77BDC2",
+        "#64ADC2",
+        "#559ABE",
+        "#4884B7",
+        "#406DAB",
+        "#3856A0",
+        "#314291",
+        "#28357A",
+        "#1A285E",
+        "#FF7F50",
+        "#FFD700",
+        "#90EE90",
+      ], // 默认颜色
       chartData: {},
+      chartType: "scatter", // 当前图表类型(默认是散点图)
+      colorSchemes: [...colorSchemes],
+      pointSize: 2, // 默认点大小
     };
   },
   mixins: [myMixin],
+  computed: {
+    ...mapState("themes", {
+      themeColor: "themeColor",
+    }),
+  },
+  watch: {
+    themeColor: {
+      handler() {
+        this.color1 = this.themeColor;
+        this.updateChartColor();
+      },
+      deep: true,
+    },
+    setUpImgData: {
+      handler(newType) {
+        this.renderChart();
+      },
+      deep: true,
+    },
+  },
   async mounted() {
     this.getData();
+    this.color1 = this.themeColor;
   },
 
   methods: {
@@ -56,10 +127,8 @@ export default {
           });
           if (typeof resultChartsData.data === "string") {
             let dataString = resultChartsData.data;
-            // 如果数据字符串的开头和结尾可能有多余的字符(比如非法字符),可以进行清理
             dataString = dataString.trim(); // 去除前后空格
-            // 如果数据包含了类似 "Infinity" 或其他无法解析的字符,替换它们
-            dataString = dataString.replace(/Infinity/g, '"Infinity"'); // 例如,将 "Infinity" 转换为字符串
+            dataString = dataString.replace(/Infinity/g, '"Infinity"'); // 处理无效字符
             try {
               const parsedData = JSON.parse(dataString);
               this.chartData = parsedData;
@@ -78,116 +147,144 @@ export default {
         }
       }
     },
-    renderChart() {
-      // 提取 Y 轴数据中的月份
-      const months = this.chartData.data[0].yData.map((date) => {
-        const month = new Date(date).getMonth(); // 获取月份,0-11 (Jan - Dec)
-        return month;
-      });
 
+    // 格式化日期为 YY-MM 格式
+    formatDate(dateString) {
+      const date = new Date(dateString);
+      const year = date.getFullYear().toString().slice(2); // 获取年份后两位
+      const month = ("0" + (date.getMonth() + 1)).slice(-2); // 获取月份并确保两位数
+      return `${year}-${month}`;
+    },
+
+    renderChart() {
+      // 提取 Y 轴数据中的月份,并去重
+      const uniqueMonths = Array.from(
+        new Set(
+          this.chartData.data[0].yData.map((date) => this.formatDate(date))
+        )
+      );
+      if (!this.color1) {
+        this.color1 = colorSchemes[0].colors;
+      }
       // 设置每个月份对应的颜色
-      const monthColors = [
-        "#DBEEBC",
-        "#A8D7BE",
-        "#8ECAC1",
-        "#77BDC2",
-        "#64ADC2",
-        "#559ABE",
-        "#4884B7",
-        "#406DAB",
-        "#3856A0",
-        "#314291",
-        "#28357A",
-        "#1A285E",
-        "#FF7F50",
-        "#FFD700",
-        "#90EE90",
-      ];
+      const monthColors = this.color1;
 
-      // 为每个点根据月份设置颜色
-      const pointColors = months.map((month) => monthColors[month]);
+      // 为每个月份生成独立的 trace,每个 trace 对应一个月份
+      const traces = uniqueMonths.map((month, monthIndex) => {
+        const monthData = this.chartData.data[0].yData
+          .map((date, index) => (this.formatDate(date) === month ? index : -1))
+          .filter((index) => index !== -1);
 
-      // 构造3D散点图数据
-      const trace = {
-        x: this.chartData.data[0].xData, // 发电机转速
-        y: this.chartData.data[0].yData, // 时间
-        z: this.chartData.data[0].zData, // 有功功率
-        mode: "markers", // 强制设置为markers,避免出现线条
-        type: "scatter3d", // 3D 散点图
-        marker: {
-          size: 2, // 点的大小
-          color: pointColors, // 设置每个点的颜色(根据月份)
-          colorscale: "YlGnBu", // 可以选择颜色比例,如 'YlGnBu'
-        },
-      };
+        const trace = {
+          x: monthData.map((index) => this.chartData.data[0].xData[index]), // 发电机转速
+          y: monthData.map((index) => this.chartData.data[0].yData[index]), // 时间
+          z: monthData.map((index) => this.chartData.data[0].zData[index]), // 有功功率
+          mode: "markers",
+          type: "scatter3d", // 3D 散点图
+          marker: {
+            size: this.pointSize,
+            color: monthColors[monthIndex],
+          },
+          name: month, // 图例项名称,格式为 YY-MM
+          legendgroup: `month-${monthIndex}`, // 图例分组
+          hovertemplate:
+            `${this.chartData.xaixs}:` +
+            ` %{x} <br> ` +
+            `${this.chartData.yaixs}:` +
+            "%{y} <br>" +
+            `${this.chartData.zaixs}:` +
+            "%{z} <br>",
+        };
 
-      const config = { scrollZoom: true };
+        return trace;
+      });
 
       const layout = {
         title: this.chartData.data[0].title,
         scene: {
           xaxis: {
             title: this.chartData.xaixs, // X 轴标题
-            gridcolor: "rgb(255,255,255)", // 网格线颜色
+            gridcolor: "rgb(255,255,255)",
             tickcolor: "rgb(255,255,255)",
             backgroundcolor: "#e5ecf6",
-            showbackground: true, // 显示背景
+            showbackground: true,
           },
           yaxis: {
             title: this.chartData.yaixs, // Y 轴标题
-            gridcolor: "rgb(255,255,255)", // 网格线颜色
+            tickformat: "%y-%m", // 设置 Y 轴的时间格式为 YY-MM
+            gridcolor: "rgb(255,255,255)",
             tickcolor: "rgb(255,255,255)",
             backgroundcolor: "#e5ecf6",
-            showbackground: true, // 显示背景
+            showbackground: true,
           },
           zaxis: {
             title: this.chartData.zaixs, // Z 轴标题
-            gridcolor: "rgb(255,255,255)", // 网格线颜色
+            gridcolor: "rgb(255,255,255)",
             tickcolor: "rgb(255,255,255)",
             backgroundcolor: "#e5ecf6",
-            showbackground: true, // 显示背景
-          },
-          aspectratio: {
-            x: 1, // X 轴比例
-            y: 3, // Y 轴比例
-            z: 1, // Z 轴比例(可根据需要调整)
+            showbackground: true,
           },
+          // aspectratio: {
+          //   x: 1,
+          //   y: 3,
+          //   z: 1,
+          // },
           plot_bgcolor: "#e5ecf6",
-          gridcolor: "#fff", // 设置网格线颜色
-          camera: {
-            center: {
-              x: 0, // 设置中心点
-              y: 0, // 设置中心点
-              z: 0, // 设置中心点
-            },
-            eye: {
-              x: 0, // 眼睛的位置
-              y: 0, // 眼睛的位置
-              z: 2.5, // 眼睛的位置
-            },
-            up: {
-              x: 0, // 设置上方向
-              y: 0, // 设置上方向
-              z: 1, // 设置上方向
-            },
-          },
+          gridcolor: "#fff",
+          // camera: {
+          //   center: { x: 0, y: 0, z: 0 },
+          //   eye: { x: 0, y: 0, z: 2.5 },
+          //   up: { x: 0, y: 0, z: 1 },
+          // },
         },
+        margin: { t: 50, b: 50, l: 50, r: 50 },
+        staticPlot: false,
+        showlegend: true,
         legend: {
-          // 图例设置
-          x: 0.8, // 图例的 X 位置(相对于图表的右边)
-          y: 0.8, // 图例的 Y 位置(相对于图表的顶部)
-          title: {
-            text: "Data Series", // 图例的标题
+          marker: {
+            size: 10, // 图例中点的大小
           },
-          bgcolor: "rgba(255, 255, 255, 0.7)", // 设置图例背景色
-          bordercolor: "black", // 设置图例的边框颜色
-          borderwidth: 1, // 设置图例的边框宽度
         },
-        margin: { t: 50, b: 50, l: 50, r: 50 }, // 图表边距
-        staticPlot: false,
       };
+      // 获取x轴和y轴的设置
+      const getChartSetUp = (axisTitle) => {
+        return this.setUpImgData.find((item) => item.text.includes(axisTitle));
+      };
+      // 更新x轴和y轴的范围与步长
+      const xChartSetUp = getChartSetUp(layout.scene.xaxis.title);
+      if (xChartSetUp) {
+        layout.scene.xaxis.dtick = xChartSetUp.dtick;
+        layout.scene.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+      }
+      const yChartSetUp = getChartSetUp(layout.scene.yaxis.title);
+      if (yChartSetUp) {
+        layout.scene.yaxis.dtick = yChartSetUp.dtick;
+        layout.scene.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
+      }
+      const zChartSetUp = getChartSetUp(layout.scene.zaxis.title);
+      if (zChartSetUp) {
+        layout.scene.zaxis.dtick = zChartSetUp.dtick;
+        layout.scene.zaxis.range = [zChartSetUp.min, zChartSetUp.max];
+      }
+      console.log(zChartSetUp, yChartSetUp, xChartSetUp, "xChartSetUp");
+      Plotly.newPlot(`plotly-3d-chart-` + this.index, traces, layout);
+    },
 
-      Plotly.newPlot(`plotly-3d-chart-` + this.index, [trace], layout, config);
+    updateChartColor() {
+      this.renderChart(); // 当配色方案或点大小发生变化时重新渲染图表
+    },
+
+    // 获取配色选项样式
+    getOptionStyle(scheme) {
+      return {
+        background: `linear-gradient(to right, ${scheme
+          .slice(0, 8)
+          .join(", ")})`,
+        color: "#fff",
+        height: "30px",
+        lineHeight: "30px",
+        borderRadius: "0px",
+      };
     },
   },
 };

+ 123 - 35
src/views/performance/components/chartsCom/TwoDMarkersChart.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="width: 100%; height: 500px">
+  <div style="width: 100%; height: 450px">
     <!-- 2D散点图 -->
     <div style="display: flex; align-items: center; padding-top: 20px">
       <div style="margin-right: 20px; display: flex; align-items: center">
@@ -33,7 +33,7 @@
       <!-- <span style="margin-right: 10px">点大小</span> -->
       <el-slider
         v-model="pointSize"
-        :min="3"
+        :min="1"
         :max="15"
         :step="1"
         label="点的大小"
@@ -57,6 +57,7 @@ import Plotly from "plotly.js-dist";
 import axios from "axios";
 import { myMixin } from "@/mixins/chartRequestMixin";
 import { colorSchemes } from "@/views/overview/js/colors";
+import { mapState } from "vuex";
 export default {
   props: {
     fileAddr: {
@@ -66,6 +67,10 @@ export default {
     index: {
       type: String,
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   data() {
     return {
@@ -81,19 +86,42 @@ export default {
       originalSizes: [],
     };
   },
+  computed: {
+    ...mapState("themes", {
+      themeColor: "themeColor",
+    }),
+  },
+  watch: {
+    themeColor: {
+      handler() {
+        this.color1 = this.themeColor;
+        this.updateChartColor();
+      },
+      deep: true,
+    },
+    setUpImgData: {
+      handler(newType) {
+        this.drawChart();
+      },
+      deep: true,
+    },
+  },
   mixins: [myMixin],
   async mounted() {
     this.getData();
+    this.color1 = this.themeColor;
   },
   methods: {
     // 根据配色方案设置每个选项的样式
     getOptionStyle(scheme) {
       return {
-        background: `linear-gradient(to right, ${scheme.join(", ")})`,
+        background: `linear-gradient(to right, ${scheme
+          .slice(0, 8)
+          .join(", ")})`,
         color: "#fff",
         height: "30px",
         lineHeight: "30px",
-        borderRadius: "4px",
+        borderRadius: "0px",
       };
     },
     async getData() {
@@ -141,23 +169,53 @@ export default {
       // 保存原始颜色和大小
       this.originalColors = [...data.yData];
       this.originalSizes = new Array(data.xData.length).fill(6); // 初始点大小
+
       if (this.chartType === "scatter") {
+        // 如果有 colorbar 数据
+        const uniqueTimeLabels =
+          data.colorbar && data.colorbar.length === data.xData.length
+            ? [...new Set(data.colorbar)] // 从 colorbar 中提取唯一的标签
+            : [...new Set(data.yData)]; // 如果没有 colorbar,使用 data.color
+
+        const ticktext = uniqueTimeLabels.map((dateStr) => dateStr); // 格式化为标签
+        const tickvals = uniqueTimeLabels.map((label, index) => index + 1); // 设置 tick 值
+        const timeMapping = uniqueTimeLabels.reduce((acc, curr, index) => {
+          acc[curr] = index + 1;
+          return acc;
+        }, {});
+        // 获取 colorbar 的最小值和最大值来计算比例值
+        const minValue = Math.min(...tickvals);
+        const maxValue = Math.max(...tickvals);
+
+        // 创建颜色比例映射
+        const colors = ticktext.map((item, ind) => {
+          const proportion = ind / (ticktext.length - 1); // 0 到 1 的比例值,取决于 ticktext 的位置
+          const colorIndex = Math.floor(proportion * (this.color1.length - 1)); // 计算颜色池索引
+          const defaultColor = this.color1[colorIndex]; // 获取对应的颜色
+          return [
+            proportion, // 比例值
+            defaultColor, // 对应颜色池中的颜色
+          ];
+        });
+
+        // 将时间字符串映射为数字
+        let colorValues = [];
+        if (data.colorbar && data.colorbar.length === data.xData.length) {
+          colorValues = data.colorbar.map((date) => timeMapping[date]);
+        } else {
+          colorValues = data.yData.map((date) => timeMapping[date]);
+        }
         // 绘制 2D 散点图
-        console.log("重新绘制图表", this.color1);
         trace = {
           x: data.xData,
           y: data.yData,
           mode: "markers",
-          type: "scattergl", // 这里改为 scattergl
+          type: "scattergl", // 使用 scattergl 提高性能
           text: data.engineName, // 提示文本
           marker: {
-            color: data.yData, // 根据 yData 的值设置颜色
-            // colorscale: "Viridis", // 使用的颜色区间
+            color: colorValues, // 根据 colorbar 映射的数字设置颜色
             colorscale: this.color1
-              ? [
-                  [0, "#F9FDD2"], // 颜色从 this.color1 开始
-                  [1, this.color1], // 结束颜色为其他颜色
-                ]
+              ? colors // 如果有 color1 使用自定义颜色比例
               : [
                   [0, "#F9FDD2"],
                   [0.15, "#E9F6BD"],
@@ -167,12 +225,17 @@ export default {
                   [0.75, "#407DB3"],
                   [0.9, "#2E4C9A"],
                   [1, "#1B2973"],
-                ],
-            colorbar: {
-              title: data.colorbartitle, // 色标标题
-            },
+                ], // 默认颜色渐变
+            colorbar: data.colorbar
+              ? { title: data.colorbartitle || "Color Legend" }
+              : undefined, // 如果有 colorbar 显示,否则不显示
             size: new Array(data.xData.length).fill(this.pointSize), // 点的大小
           },
+          hovertemplate:
+            `${this.chartData.xaixs}:` +
+            ` %{x} <br> ` +
+            `${this.chartData.yaixs}:` +
+            "%{y} <br> <extra></extra>",
         };
       } else if (this.chartType === "line") {
         // 折线图
@@ -180,10 +243,10 @@ export default {
           x: data.xData,
           y: data.yData,
           mode: "lines",
-          type: "scattergl", // 折线图
+          type: "scattergl", // 使用 scattergl 提高性能
           text: data.engineName,
           line: {
-            color: this.color1, // 使用自定义颜色
+            color: this.color1 || "#FF5733", // 使用自定义颜色
           },
         };
       } else if (this.chartType === "bar") {
@@ -193,12 +256,13 @@ export default {
           y: data.yData,
           type: "bar", // 柱状图
           marker: {
-            color: this.color1, // 使用自定义颜色
+            color: this.color1 || "#FF5733", // 使用自定义颜色
           },
         };
       }
-      // 图表布局;
-      const layout = {
+
+      // 图表布局
+      let layout = {
         title: data.title,
         xaxis: {
           title: this.chartData.xaixs,
@@ -217,9 +281,29 @@ export default {
         showlegend: false,
         plot_bgcolor: "#e5ecf6",
         gridcolor: "#fff", // 设置网格线颜色
-        // plot_bgcolor: "rad",
-        // gridcolor: "#d3d3d3", // 设置网格线颜色
       };
+
+      const getChartSetUp = (axisTitle) => {
+        return this.setUpImgData.find((item) => item.text.includes(axisTitle));
+      };
+
+      const xChartSetUp = getChartSetUp(layout.xaxis.title);
+      if (xChartSetUp) {
+        layout.xaxis.dtick = xChartSetUp.dtick;
+        layout.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+      }
+
+      const yChartSetUp = getChartSetUp(layout.yaxis.title);
+      if (yChartSetUp) {
+        layout.yaxis.dtick = yChartSetUp.dtick;
+        layout.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
+      }
+
+      if (this.chartData.xaixs === "时间") {
+        layout.xaxis.type = "date";
+        layout.xaxis.tickformat = "%Y-%m-%d";
+      }
+
       const config = {
         modeBarButtonsToAdd: [
           {
@@ -246,19 +330,25 @@ export default {
         editable: true,
         scrollZoom: false,
       };
-      // 使用 Plotly 绘制图表
-      Plotly.react(
-        this.$refs[`plotlyChart-${this.index}`],
-        [trace],
-        layout,
-        config
-      ).then(() => {
-        // 确保在图表加载完成后设置工具栏按钮
-        const plotElement = this.$refs[`plotlyChart-${this.index}`];
-        Plotly.relayout(plotElement, layout); // 使用 relayout 来确保自定义按钮应用
+      this.$nextTick(() => {
+        // 使用 Plotly 绘制图表
+        Plotly.react(
+          this.$refs[`plotlyChart-${this.index}`],
+          [trace],
+          layout,
+          config
+        ).then(() => {
+          // 确保在图表加载完成后设置工具栏按钮
+          const plotElement = this.$refs[`plotlyChart-${this.index}`];
+          Plotly.relayout(plotElement, layout); // 使用 relayout 来确保自定义按钮应用
+        });
       });
     },
 
+    generateHSLColor(index, total) {
+      const hue = (index / total) * 360; // 色相值从 0 到 360
+      return `hsl(${hue}, 100%, 50%)`; // 饱和度和亮度设置为固定值,生成多样的颜色
+    },
     handleSelectClick(gd) {
       // 绑定 plotly_click 事件
       gd.on("plotly_click", (data) => {
@@ -388,8 +478,6 @@ export default {
 
     updateChartColor(color) {
       // 更新图表颜色
-      // this.color1 = color;
-      console.log(this.color1, "this.color1");
       this.drawChart();
     },
   },

+ 24 - 9
src/views/performance/components/chartsCom/WindRoseChart.vue

@@ -14,6 +14,8 @@
 import Plotly from "plotly.js-dist";
 import axios from "axios";
 import { myMixin } from "@/mixins/chartRequestMixin";
+import { colorSchemes } from "@/views/overview/js/colors";
+import { mapState } from "vuex";
 
 export default {
   props: {
@@ -32,8 +34,16 @@ export default {
     return {
       // 数据结构
       chartData: {},
+      color1: colorSchemes[0].colors, // 默认颜色
+      // 配色方案列表(每个方案是一个颜色数组)
+      colorSchemes: [...colorSchemes],
     };
   },
+  computed: {
+    ...mapState("themes", {
+      themeColor: "themeColor",
+    }),
+  },
   watch: {
     chartData: {
       deep: true,
@@ -43,9 +53,17 @@ export default {
         }
       },
     },
+    themeColor: {
+      handler() {
+        this.color1 = this.themeColor;
+        this.renderChart();
+      },
+      deep: true,
+    },
   },
   mounted() {
     this.getData();
+    this.color1 = this.themeColor;
   },
   methods: {
     async getData() {
@@ -78,15 +96,7 @@ export default {
         });
       });
       const speedLabels = Array.from(windSpeedRanges).sort(); // 动态范围值
-      const colors = [
-        "#FBFDD4",
-        "#C0E2BA",
-        "#57A3BF",
-        "#1A2971",
-        "#FF6F61",
-        "#FFC300",
-        "#6A0572",
-      ]; // 可扩展颜色列表
+      const colors = [...this.color1]; // 可扩展颜色列表
       const colorscale = {};
       speedLabels.forEach((label, index) => {
         colorscale[label] = colors[index % colors.length];
@@ -130,6 +140,11 @@ export default {
               width: 1,
             },
           },
+          hovertemplate:
+            `${axes.radial}:` +
+            ` %{r} <br> ` +
+            `${axes.angular}:` +
+            "%{theta} <br> <extra></extra>",
         };
       });
 

+ 0 - 105
src/views/performance/components/chartsCom/YawErrorDensityChart.vue

@@ -1,105 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2025-02-13 11:04:01
- * @LastEditTime: 2025-02-19 10:13:21
- * @LastEditors: bogon
- * @Description: In User Settings Edit
- * @FilePath: /performance-test/src/views/performance/components/chartsCom/YawErrorDensityChart.vue
--->
-<template>
-  <div :ref="`plotlyChart-${index}`" style="width: 100%; height: 450px"></div>
-</template>
-
-<script>
-import Plotly from "plotly.js-dist";
-import axios from "axios";
-import { myMixin } from "@/mixins/chartRequestMixin";
-
-export default {
-  props: {
-    fileAddr: {
-      default: "",
-      type: String,
-    },
-    index: {
-      type: String,
-    },
-  },
-  data() {
-    return {
-      chartData: {
-        xData: [],
-        yData: [],
-        title: "",
-        xaixs: "",
-        yaixs: "",
-      },
-    };
-  },
-  mixins: [myMixin],
-  mounted() {
-    this.getData();
-  },
-  methods: {
-    async getData() {
-      if (this.fileAddr !== "") {
-        try {
-          this.loading = true;
-          this.cancelToken = axios.CancelToken.source();
-          console.log(this.cancelToken);
-          const resultChartsData = await axios.get(this.fileAddr, {
-            cancelToken: this.cancelToken.token,
-          });
-          console.log(resultChartsData);
-          this.chartData = resultChartsData.data;
-          this.drawChart();
-          this.isError = false;
-          this.loading = false;
-        } catch (error) {
-          this.isError = true;
-          this.loading = false;
-        }
-      }
-    },
-    drawDensityChart() {
-      const { xData, yData, title, xaixs, yaixs } = this.chartData;
-
-      // 确保数据有效
-      if (!xData || !yData || xData.length !== yData.length) {
-        console.error("xData 和 yData 长度不匹配!");
-        return;
-      }
-
-      // 配置图表数据
-      const trace = {
-        x: xData,
-        y: yData,
-        mode: "lines", // 绘制折线图
-        name: "概率密度函数",
-        type: "scattergl",
-        line: {
-          color: "blue",
-          width: 2,
-        },
-        fill: "tozeroy", // 填充曲线下面的区域
-        fillcolor: "rgba(99, 110, 252, 0.3)", // 曲线下面的填充颜色
-      };
-
-      // 图表布局配置
-      const layout = {
-        title: title || "概率密度函数图",
-        xaxis: {
-          title: xaixs || "X轴",
-        },
-        yaxis: {
-          title: yaixs || "概率密度函数",
-        },
-        showlegend: false,
-      };
-
-      // 使用 Plotly 渲染图表
-      Plotly.newPlot(this.$refs[`plotlyChart-${this.index}`], [trace], layout);
-    },
-  },
-};
-</script>

+ 14 - 2
src/views/performance/components/chartsCom/YewErrorBarChart.vue

@@ -2,7 +2,7 @@
   <div>
     <!-- 图表控制面板 -->
     <div style="display: flex; align-items: center">
-      <div style="margin-right: 20px; display: flex; align-items: center">
+      <!-- <div style="margin-right: 20px; display: flex; align-items: center">
         <el-color-picker
           size="small"
           v-model="color1"
@@ -10,7 +10,7 @@
           @change="updateChartColor"
         ></el-color-picker>
         <span style="margin-left: 10px">自定义颜色</span>
-      </div>
+      </div> -->
       <div>
         <el-button size="small" @click="toggleChartType">
           切换为{{ chartType === "bar" ? "折线图" : "柱状图" }}
@@ -44,6 +44,10 @@ export default {
     index: {
       type: String,
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   mixins: [myMixin],
   data() {
@@ -103,6 +107,11 @@ export default {
           color: this.color1, // 折线图颜色
         },
         name: "偏航误差值", // 图例名称
+        hovertemplate:
+          `机组名称:` +
+          ` %{x} <br> ` +
+          `偏航误差值:` +
+          "%{y} <br> <extra></extra>",
       };
 
       // 创建虚拟的 trace 以便显示图例
@@ -132,6 +141,9 @@ export default {
         title: "机组静态偏航误差值", // 图表标题
         xaxis: {
           title: "机组编号", // 横坐标标题
+          tickmode: "array",
+          tickvals: xData, // 设置刻度值(机组编号)
+          ticktext: xData, // 设置刻度文本(机组编号)
         },
         yaxis: {
           title: "静态偏航误差值(度)", // 纵坐标标题

+ 57 - 7
src/views/performance/components/chartsCom/lineAndChildLine.vue

@@ -28,6 +28,7 @@
     <div
       v-loading="loading"
       :id="`bar-chart${index}`"
+      :ref="`bar-chart${index}`"
       style="width: 100%; height: 400px"
     >
       <el-empty v-if="isError" description="请求失败"></el-empty>
@@ -39,9 +40,9 @@
 import { nextTick } from "vue"; // 导入 nextTick
 import Plotly from "plotly.js-dist";
 import axios from "axios";
-import { colorSchemesLine } from "@/views/overview/js/colors";
+import { colorSchemes } from "@/views/overview/js/colors";
 import { myMixin } from "@/mixins/chartRequestMixin"; // 假设你需要的 mixin
-
+import { mapState } from "vuex";
 export default {
   props: {
     fileAddr: {
@@ -54,6 +55,10 @@ export default {
         return "0";
       },
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   mixins: [myMixin],
   data() {
@@ -62,14 +67,35 @@ export default {
       chartType: "line", // 默认图表类型是折线图
       color1: [], // 默认颜色
       // 配色方案列表(每个方案是一个颜色数组)
-      colorSchemes: [...colorSchemesLine],
+      colorSchemes: [...colorSchemes],
       loading: false,
       isError: false,
-      colors: [...colorSchemesLine[0].colors],
+      colors: [...colorSchemes[0].colors],
     };
   },
+  computed: {
+    ...mapState("themes", {
+      themeColor: "themeColor",
+    }),
+  },
+  watch: {
+    themeColor: {
+      handler() {
+        this.color1 = this.themeColor;
+        this.updateChartColor();
+      },
+      deep: true,
+    },
+    setUpImgData: {
+      handler(newType) {
+        this.drawChart();
+      },
+      deep: true,
+    },
+  },
   mounted() {
     if (this.fileAddr) {
+      this.color1 = this.themeColor;
       this.getData();
     }
   },
@@ -100,8 +126,10 @@ export default {
     },
     // 绘制图表
     drawChart() {
+      if (!this.$refs[`bar-chart${this.index}`]) {
+        return false;
+      }
       const data = [];
-      console.log(this.chartData, "this.chartData");
       this.chartData &&
         this.chartData.data &&
         this.chartData.data.forEach((turbine, index) => {
@@ -122,6 +150,11 @@ export default {
                   ? this.color1[index % this.color1.length]
                   : this.colors[index % this.colors.length], // 为每个机组分配不同的颜色
             },
+            hovertemplate:
+              `${this.chartData.xaixs}:` +
+              ` %{x} <br> ` +
+              `${this.chartData.yaixs}:` +
+              "%{y} <br>",
           };
 
           if (this.chartType === "line") {
@@ -152,6 +185,21 @@ export default {
         autosize: true, // 开启自适应
         barmode: this.chartType === "bar" ? "stack" : "group", // 如果是柱状图则启用堆叠
       };
+      const getChartSetUp = (axisTitle) => {
+        return this.setUpImgData.find((item) => item.text.includes(axisTitle));
+      };
+
+      const xChartSetUp = getChartSetUp(layout.xaxis.title);
+      if (xChartSetUp) {
+        layout.xaxis.dtick = xChartSetUp.dtick;
+        layout.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+      }
+
+      const yChartSetUp = getChartSetUp(layout.yaxis.title);
+      if (yChartSetUp) {
+        layout.yaxis.dtick = yChartSetUp.dtick;
+        layout.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
+      }
       if (
         this.chartData.contract_Cp_curve_yData &&
         this.chartData.contract_Cp_curve_yData.length > 0
@@ -187,11 +235,13 @@ export default {
     // 根据配色方案设置每个选项的样式
     getOptionStyle(scheme) {
       return {
-        background: `linear-gradient(to right, ${scheme.join(", ")})`,
+        background: `linear-gradient(to right, ${scheme
+          .slice(0, 8)
+          .join(", ")})`,
         color: "#fff",
         height: "30px",
         lineHeight: "30px",
-        borderRadius: "4px",
+        borderRadius: "0px",
       };
     },
   },

+ 0 - 144
src/views/performance/components/chartsCom/lineChart.vue

@@ -1,144 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2024-09-11 14:23:08
- * @LastEditTime: 2024-10-08 14:10:25
- * @LastEditors: bogon
- * @Description: In User Settings Edit
- * @FilePath: /performance-test/src/views/performance/components/chartsCom/lineChart.vue
--->
-<template>
-  <div>
-    <h1>大部件温度传感器分析</h1>
-    <div :id="`chart-${inds}`" style="width: 100%; height: 550px"></div>
-    <div id="chart-types" style="width: 100%; height: 550px"></div>
-  </div>
-</template>
-<script>
-// 总图和分图数据需要处理分开
-import { allTypesDatas } from "@/utils/allTypesOfAnalysisData.js";
-import Plotly from "plotly.js-dist";
-export default {
-  props: {
-    inds: {
-      default() {
-        return "0";
-      },
-      type: String,
-    }, //循环下标防止图表覆盖问题
-    lineData: {
-      default() {
-        return {};
-      },
-      type: Object,
-    }, //图表数据
-    comType: {
-      default() {
-        return "";
-      },
-      type: String,
-    }, //总图、分图
-    chartsType: {
-      default() {
-        return [];
-      },
-      type: Array,
-    },
-    chartData: {
-      default: () => {
-        return [
-          {
-            x: [0, 1, 2, 3, 4], // X轴数据
-            y: [0, 1, 4, 9, 16], // Y轴数据
-          },
-          {
-            x: [0, 1, 2, 3, 4], // X轴数据
-            y: [1, 3, 5, 7, 11], // Y轴数据
-          },
-          {
-            x: [0, 1, 2, 3, 4], // X轴数据
-            y: [2, 5, 8, 10, 13], // Y轴数据
-          },
-          {
-            x: [0, 1, 2, 3, 4], // X轴数据
-            y: [3, 6, 9, 12, 15], // Y轴数据
-          },
-          {
-            x: [0, 1, 2, 3, 4], // X轴数据
-            y: [10, 25, 20, 40, 35], // Y轴数据
-          },
-          {
-            x: [0, 1, 2, 3, 4], // X轴数据
-            y: [5, 10, 15, 10, 25], // Y轴数据
-          },
-        ];
-      },
-      type: Array,
-    },
-  },
-  name: "LineChart",
-  data() {
-    return {};
-  },
-  mounted() {
-    // this.initChart();
-    this.initChartsType();
-  },
-  methods: {
-    initChart() {
-      const lineDatas = allTypesDatas.filter(
-        (item) => item.analysisTypeCode === "temperature_large_components"
-      )[0];
-      const trace = {
-        x: this.chartData[0].x,
-        y: this.chartData[0].y,
-        mode: "lines", // 折线图模式
-        line: {
-          // color: "darkblue",
-          // color:'lightgrey',
-          color: "#2f123a", //齿轮箱高速轴温度分布
-          width: 2,
-        },
-        type: "scatter", // 使用散点图的类型生成线
-      };
-      const layout = {
-        ...lineDatas.lableConfig,
-        autosize: true, // 开启自适应
-      };
-      const config = {
-        responsive: true, // 自适应
-      };
-
-      // 使用 Plotly 绘制图表
-      Plotly.newPlot(`chart-${this.inds}`, [trace], layout, config, {
-        responsive: true,
-      });
-    },
-    initChartsType() {
-      const lineDatas = allTypesDatas.filter(
-        (item) => item.analysisTypeCode === "temperature_large_components"
-      )[0];
-      const chartsType = lineDatas.chartsType[1].children.filter(
-        (item) => item.name === "发电机温度偏差:"
-      )[0];
-      const trace = chartsType.line_dash.map((item, ind) => {
-        return {
-          x: this.chartData[ind].x,
-          y: this.chartData[ind].y,
-          mode: "lines", // 折线图模式
-          name: item.name,
-          line: { color: item.color, dash: item.dash },
-          type: "scatter", // 使用散点图的类型生成线
-        };
-      });
-      const layout = { ...chartsType.lableConfig };
-      const config = {
-        responsive: true, // 自适应
-      };
-
-      // 使用 Plotly 绘制图表
-      Plotly.newPlot(`chart-types`, trace, layout, config);
-    },
-  },
-};
-</script>
-<style scoped></style>

+ 79 - 44
src/views/performance/components/chartsCom/lineChartsFen.vue

@@ -1,11 +1,3 @@
-<!--
- * @Author: your name
- * @Date: 2025-01-20 11:41:41
- * @LastEditTime: 2025-02-18 15:45:06
- * @LastEditors: bogon
- * @Description: In User Settings Edit
- * @FilePath: /performance-test/src/views/performance/components/chartsCom/lineChartsFen.vue
--->
 <template>
   <div>
     <!-- 图表控制面板 分图-->
@@ -50,6 +42,10 @@ export default {
       type: String,
       default: "",
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   mixins: [myMixin],
   data() {
@@ -59,6 +55,7 @@ export default {
       color1: "#406DAB", // 默认颜色
       loading: false,
       isError: false,
+      cancelToken: null, // 用于存储取消请求的标识符
     };
   },
   mounted() {
@@ -66,17 +63,42 @@ export default {
       this.getData();
     }
   },
+  watch: {
+    setUpImgData: {
+      handler(newType) {
+        this.drawChart();
+      },
+      deep: true,
+    },
+  },
+  beforeDestroy() {
+    if (this.cancelToken) {
+      this.cancelToken.cancel(
+        "Component is being destroyed, request canceled."
+      );
+    }
+  },
   methods: {
     // 获取数据
     async getData() {
       if (this.fileAddr !== "") {
         try {
           this.loading = true;
+
+          // 如果已有取消请求的标识符,先取消前一个请求
+          if (this.cancelToken) {
+            this.cancelToken.cancel("Operation canceled due to new request.");
+          }
+
+          // 创建新的请求取消标识符
           this.cancelToken = axios.CancelToken.source();
+
           const resultChartsData = await axios.get(this.fileAddr, {
             cancelToken: this.cancelToken.token,
           });
+
           this.chartData = resultChartsData.data;
+
           // 使用 nextTick 来确保 DOM 渲染完成后绘制图表
           nextTick(() => {
             this.drawChart();
@@ -84,62 +106,65 @@ export default {
             this.loading = false;
           });
         } catch (error) {
-          console.error("Error loading data:", error);
-          this.isError = true;
-          this.loading = false;
+          if (axios.isCancel(error)) {
+            console.log("Request was canceled");
+          } else {
+            console.error("Error loading data:", error);
+            this.isError = true;
+            this.loading = false;
+          }
         }
       }
     },
     // 绘制图表
     drawChart() {
-      // 先将数据按照条件进行排序
       const sortedData = this.chartData.data.sort((a, b) => {
-        // 符合条件的数据排在前面
         if (
           a.engineCode === this.fieldEngineCode &&
           b.engineCode !== this.fieldEngineCode
         ) {
-          return 1; // a 排在前面
+          return 1;
         }
         if (
           a.engineCode !== this.fieldEngineCode &&
           b.engineCode === this.fieldEngineCode
         ) {
-          return -1; // b 排在前面
+          return -1;
         }
-        return 0; // 如果两者都符合或都不符合,保持原顺序
+        return 0;
       });
 
       const data = [];
-      const lineData = []; // 用于存储所有线图数据
+      const lineData = [];
 
-      sortedData.forEach((turbine, index) => {
-        // 判断当前机组的 engineCode 是否与 fieldEngineCode 匹配
+      sortedData.forEach((turbine) => {
         const color =
-          turbine.engineCode === this.fieldEngineCode ? this.color1 : "#D3D3D3"; // #D3D3D3 为灰色
+          turbine.engineCode === this.fieldEngineCode ? this.color1 : "#D3D3D3";
 
         const chartConfig = {
-          x: turbine.xData, // X 数据
-          y: turbine.yData, // Y 数据
-          name: turbine.engineName, // 使用机组名称
-          line: { color }, // 设置线条颜色
-          marker: { color }, // 设置柱状图的颜色
+          x: turbine.xData,
+          y: turbine.yData,
+          name: turbine.engineName,
+          line: { color },
+          marker: { color },
+          hovertemplate: `
+            ${this.chartData.xaixs}: %{x} <br>
+            ${this.chartData.yaixs}: %{y} <br>
+          `,
         };
 
-        // 判断是否为线图
         if (this.chartType === "line") {
-          chartConfig.mode = "lines"; // 如果是折线图
+          chartConfig.mode = "lines";
           chartConfig.fill = "none";
-          lineData.push(chartConfig); // 将线图数据存储到 lineData 中
+          lineData.push(chartConfig);
         } else if (this.chartType === "bar") {
-          // chartConfig.type = "bar"; // 如果是柱状图
           chartConfig.fill = "tonexty";
-          data.push(chartConfig); // 将柱状图数据存储到 data 中
+          data.push(chartConfig);
         }
       });
 
-      // 将非线图的数据放到前面,线图的数据放到最后
-      const finalData = [...data, ...lineData]; // 先放柱状图,再放线图
+      const finalData = [...data, ...lineData];
+
       if (
         this.chartData.contract_Cp_curve_yData &&
         this.chartData.contract_Cp_curve_yData.length > 0
@@ -151,18 +176,19 @@ export default {
           name: "合同功率曲线",
           line: {
             color: "red",
-            width: 1, // 设置线条的宽度为1
+            width: 1,
           },
           marker: { color: "red", size: 4 },
         });
       }
+
       const layout = {
         title: this.chartData.title || "图表",
         xaxis: {
-          title: this.chartData.xaixs || "X轴", // 横坐标标题
+          title: this.chartData.xaixs || "X轴",
         },
         yaxis: {
-          title: this.chartData.yaixs || "Y轴", // 纵坐标标题
+          title: this.chartData.yaixs || "Y轴",
         },
         margin: {
           l: 50,
@@ -170,25 +196,34 @@ export default {
           t: 50,
           b: 50,
         },
-        autosize: true, // 开启自适应
-        barmode: this.chartType === "bar" ? "stack" : "group", // 如果是柱状图则启用堆叠
+        autosize: true,
+        barmode: this.chartType === "bar" ? "stack" : "group",
       };
+      const getChartSetUp = (axisTitle) => {
+        return this.setUpImgData.find((item) => item.text.includes(axisTitle));
+      };
+
+      const xChartSetUp = getChartSetUp(layout.xaxis.title);
+      if (xChartSetUp) {
+        layout.xaxis.dtick = xChartSetUp.dtick;
+        layout.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+      }
+
+      const yChartSetUp = getChartSetUp(layout.yaxis.title);
+      if (yChartSetUp) {
+        layout.yaxis.dtick = yChartSetUp.dtick;
+        layout.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
+      }
 
-      // 使用 Plotly.react 来更新图表
       Plotly.react(`line-chart-fen-${this.index}`, finalData, layout, {
         responsive: true,
       });
     },
     // 切换图表类型
     toggleChartType() {
-      this.chartType = this.chartType === "line" ? "bar" : "line"; // 切换图表类型
+      this.chartType = this.chartType === "line" ? "bar" : "line";
       this.drawChart(); // 重新绘制图表
     },
-
-    // 更新图表颜色
-    updateChartColor() {
-      this.drawChart(); // 更新颜色后重新绘制图表
-    },
   },
 };
 </script>

+ 59 - 17
src/views/performance/components/chartsCom/powerMarkers2DCharts.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-09-11 14:32:12
- * @LastEditTime: 2025-02-20 16:03:24
+ * @LastEditTime: 2025-02-26 15:01:26
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/powerMarkers2DCharts.vue
@@ -10,7 +10,7 @@
   <div> -->
 <!-- powerMarkers2DCharts
     <h1>逐月有功功率散点2D分析</h1> -->
-<!-- <h1>偏航控制策略异常检测 2D</h1>  目前没找到这个分析型-->
+<!-- <h1>偏航控制策略异常检测 2D</h1>  目前没找到这个分析型-->
 <template>
   <div style="min-height: 300px">
     <!-- 2D散点图 -->
@@ -39,7 +39,7 @@
         <!-- <span style="margin-right: 10px">点大小</span> -->
         <el-slider
           v-model="pointSize"
-          :min="3"
+          :min="1"
           :max="15"
           :step="1"
           label="点的大小"
@@ -64,6 +64,7 @@ import Plotly from "plotly.js-dist";
 import axios from "axios";
 import { myMixin } from "@/mixins/chartRequestMixin";
 import { colorSchemes } from "@/views/overview/js/colors";
+import { mapState } from "vuex";
 export default {
   mixins: [myMixin],
   props: {
@@ -74,6 +75,10 @@ export default {
     index: {
       type: String,
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   data() {
     return {
@@ -88,20 +93,42 @@ export default {
       colorSchemes: [...colorSchemes],
     };
   },
+  computed: {
+    ...mapState("themes", {
+      themeColor: "themeColor",
+    }),
+  },
+  watch: {
+    themeColor: {
+      handler() {
+        this.color1 = this.themeColor;
+        this.updateChartColor();
+      },
+      deep: true,
+    },
+    setUpImgData: {
+      handler(newType) {
+        this.drawChart();
+      },
+      deep: true,
+    },
+  },
   async mounted() {
     this.getData();
-    this.color1 = colorSchemes[0].colors;
+    this.color1 = this.themeColor;
     // console.log(this.color1, colorSchemes[0].colors, "color1");
   },
   methods: {
     // 根据配色方案设置每个选项的样式
     getOptionStyle(scheme) {
       return {
-        background: `linear-gradient(to right, ${scheme.join(", ")})`,
+        background: `linear-gradient(to right, ${scheme
+          .slice(0, 8)
+          .join(", ")})`,
         color: "#fff",
         height: "30px",
         lineHeight: "30px",
-        borderRadius: "4px",
+        borderRadius: "0px",
       };
     },
     async getData() {
@@ -258,7 +285,21 @@ export default {
         plot_bgcolor: "#e5ecf6",
         gridcolor: "#fff", // 设置网格线颜色
       };
+      const getChartSetUp = (axisTitle) => {
+        return this.setUpImgData.find((item) => item.text.includes(axisTitle));
+      };
 
+      const xChartSetUp = getChartSetUp(layout.xaxis.title);
+      if (xChartSetUp) {
+        layout.xaxis.dtick = xChartSetUp.dtick;
+        layout.xaxis.range = [xChartSetUp.min, xChartSetUp.max];
+      }
+
+      const yChartSetUp = getChartSetUp(layout.yaxis.title);
+      if (yChartSetUp) {
+        layout.yaxis.dtick = yChartSetUp.dtick;
+        layout.yaxis.range = [yChartSetUp.min, yChartSetUp.max];
+      }
       // 配置工具栏按钮
       const config = {
         modeBarButtonsToAdd: [
@@ -290,17 +331,18 @@ export default {
       const traces = [];
       if (scatterTrace) traces.push(scatterTrace); // 如果有散点数据
       if (lineTrace) traces.push(lineTrace); // 如果有线图数据
-
-      // 使用 Plotly 绘制图表
-      Plotly.react(
-        this.$refs[`plotlyChart-${this.index}`], // 这里是对 DOM 元素的引用
-        traces,
-        layout,
-        config
-      ).then(() => {
-        // 确保图表加载完成后设置工具栏按钮
-        const plotElement = this.$refs[`plotlyChart-${this.index}`];
-        Plotly.relayout(plotElement, layout); // 使用 relayout 来确保自定义按钮应用
+      this.$nextTick(() => {
+        // 使用 Plotly 绘制图表
+        Plotly.react(
+          this.$refs[`plotlyChart-${this.index}`], // 这里是对 DOM 元素的引用
+          traces,
+          layout,
+          config
+        ).then(() => {
+          // 确保图表加载完成后设置工具栏按钮
+          const plotElement = this.$refs[`plotlyChart-${this.index}`];
+          Plotly.relayout(plotElement, layout); // 使用 relayout 来确保自定义按钮应用
+        });
       });
     },
 

+ 4 - 2
src/views/performance/components/chartsCom/yawErrorBarSum.vue

@@ -2,7 +2,7 @@
   <div>
     <!-- 图表控制面板 -->
     <div style="display: flex; align-items: center">
-      <div style="margin-right: 20px; display: flex; align-items: center">
+      <!-- <div style="margin-right: 20px; display: flex; align-items: center">
         <el-color-picker
           size="small"
           v-model="color1"
@@ -10,7 +10,7 @@
           @change="updateChartColor"
         ></el-color-picker>
         <span style="margin-left: 10px">自定义颜色</span>
-      </div>
+      </div> -->
       <div>
         <el-button size="small" @click="toggleChartType">
           切换为{{ chartType === "bar" ? "折线图" : "柱状图" }}
@@ -117,6 +117,8 @@ export default {
         line: {
           color: this.color1, // 折线图颜色(如果切换到折线图)
         },
+        hovertemplate:
+          `偏航误差值:` + ` %{x} <br> ` + `台数:` + "%{y} <br> <extra></extra>",
       };
 
       const layout = {

+ 30 - 3
src/views/performance/components/chartsCom/yawErrorLine.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2025-01-22 09:42:59
- * @LastEditTime: 2025-02-19 10:04:48
+ * @LastEditTime: 2025-02-26 11:37:55
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/chartsCom/yawErrorLine.vue
@@ -52,6 +52,7 @@ import Plotly from "plotly.js-dist";
 import axios from "axios";
 import { myMixin } from "@/mixins/chartRequestMixin"; // 假设你需要的 mixin
 import { colorSchemes } from "@/views/overview/js/colors";
+import { mapState } from "vuex";
 export default {
   props: {
     fileAddr: {
@@ -64,6 +65,10 @@ export default {
         return "0";
       },
     },
+    setUpImgData: {
+      default: () => [],
+      type: Array,
+    },
   },
   mixins: [myMixin],
   data() {
@@ -78,9 +83,24 @@ export default {
       colors: [...colorSchemes[0].colors],
     };
   },
+  computed: {
+    ...mapState("themes", {
+      themeColor: "themeColor",
+    }),
+  },
+  watch: {
+    themeColor: {
+      handler() {
+        this.color1 = this.themeColor;
+        this.updateChartColor();
+      },
+      deep: true,
+    },
+  },
   mounted() {
     if (this.fileAddr) {
       this.getData();
+      this.color1 = this.themeColor;
     }
   },
   methods: {
@@ -134,6 +154,11 @@ export default {
                   ? this.color1[index % this.color1.length]
                   : this.colors[index % this.colors.length], // 为每个机组分配不同的颜色
             },
+            hovertemplate:
+              `${this.chartData.xaixs}:` +
+              ` %{x} <br> ` +
+              `${this.chartData.yaixs}:` +
+              "%{y} <br> <extra></extra>",
           };
 
           if (this.chartType === "line") {
@@ -199,11 +224,13 @@ export default {
     // 根据配色方案设置每个选项的样式
     getOptionStyle(scheme) {
       return {
-        background: `linear-gradient(to right, ${scheme.join(", ")})`,
+        background: `linear-gradient(to right, ${scheme
+          .slice(0, 8)
+          .join(", ")})`,
         color: "#fff",
         height: "30px",
         lineHeight: "30px",
-        borderRadius: "4px",
+        borderRadius: "0px",
       };
     },
   },

二進制
src2.13.zip


二進制
src2.14.zip


+ 2 - 2
vue.config.js

@@ -66,8 +66,8 @@ module.exports = {
         // target: "http://192.168.5.4:16200", // 石月
         // target: "http://192.168.50.235:16200", // 内网
         // target: "http://192.168.5.15:16200",
-        // target: "http://192.168.50.235:16500", //演示环境
-        target: "http://106.120.102.238:26500", //外网演示环境
+        target: "http://192.168.50.235:16500", //演示环境
+        // target: "http://106.120.102.238:26500", //外网演示环境
         // target: "http://106.120.102.238:16700", // 外网16700  生产16600
         // target: "http://10.96.137.5",
         changeOrigin: true,

部分文件因文件數量過多而無法顯示