Browse Source

修改图表展示

liujiejie 1 year ago
parent
commit
02a23da07c

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

@@ -196,9 +196,9 @@ 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://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", //大~#@唐
+            url: "http://10.96.137.5:9080/tiles/{z}/{x}/{y}.png", //大~#@唐
           }),
         }),
         new VectorLayer({

+ 166 - 98
src/utils/allTypesOfAnalysisData.json

@@ -179,10 +179,11 @@
       "type": "scatter"
     },
     "2DLayoutConfig": {
-      "title": "",
+      "title": { "text": "机组", "x": 0.5 },
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
-        "title": "Generator Speed",
+        // "title": "发电机转速",
+        "title": "功率",
         "dtick": 100,
         "tickangle": -45,
         "gridcolor": "rgb(255,255,255)",
@@ -193,7 +194,8 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
-        "title": "Power",
+        // "title": "Power",
+        "title": "桨距角",
         "dtick": 100,
         // range: [0, 5000],
         "gridcolor": "rgb(255,255,255)",
@@ -216,10 +218,10 @@
       "mode": "markers"
     },
     "3DLayoutConfig": {
-      "title": "",
+      "title": { "text": "月度桨距角功率3D散点图", "x": 0.5 },
       "scene": {
         "xaxis": {
-          "title": "Generator Speed",
+          "title": "桨距角",
           "dtick": 100,
           "gridcolor": "rgb(255,255,255)",
           "showgrid": true,
@@ -231,7 +233,7 @@
           "showbackground": true // 显示背景
         },
         "yaxis": {
-          "title": "Time",
+          "title": "时间",
           "gridcolor": "rgb(255,255,255)",
           "showgrid": true,
           "zeroline": false,
@@ -242,7 +244,7 @@
           "showbackground": true // 显示背景
         },
         "zaxis": {
-          "title": "Power",
+          "title": "功率",
           "dtick": 100,
           "gridcolor": "rgb(255,255,255)",
           "showgrid": true,
@@ -331,8 +333,8 @@
     "analysisTypeCode": "pitch_tsr_cp",
     "modeType": "markers",
     "graphType": "scatter2D",
-    "xLable": "TSR",
-    "yLable": "CP",
+    "xLable": "叶尖速比",
+    "yLable": "风能利用系数",
     "zLable": "",
     "com": "MarkersCharts",
     "chartsType": [
@@ -346,9 +348,9 @@
     },
     "2DLayoutConfig": {
       "plot_bgcolor": "#e5ecf6",
-      "title": "Cp vs. TSR :",
+      "title": "风能利用系数 vs. 叶尖速比 :",
       "xaxis": {
-        "title": "TSR",
+        "title": "叶尖速比",
         "range": [5, 20],
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -358,7 +360,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
-        "title": "Cp",
+        "title": "风能利用系数",
         "range": [0, 1],
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -366,6 +368,13 @@
         "ticklen": 5,
         "gridwidth": 1, // 网格线宽度
         "tickcolor": "rgb(255,255,255)"
+      },
+      "legend": {
+        "title": {
+          "text": "桨距角" // 图例的标题
+        }
+        // "itemsizing": "constant",//不确定
+        // "itemwidth": 80
       }
     }
   },
@@ -373,7 +382,7 @@
     //只有分图,散点
     "analysisTypeName": "逐月有功功率散点3D分析",
     "analysisTypeCode": "power_scatter",
-    "title": "每月风力发电量",
+    "title": "当月发电量",
     "modeType": "markers",
     "graphType": "scatter3D",
     "xLable": "风速(m/s)",
@@ -387,8 +396,10 @@
     ],
     "com": "MarkersCharts",
     "lableConfig": {
+      "title": "当月发电量:",
       "scene": {
         "xaxis": {
+          "title": "风速",
           "dtick": 100,
           "gridcolor": "rgb(255,255,255)", // 网格线颜色
           "showgrid": true,
@@ -400,6 +411,7 @@
           "showbackground": true // 显示背景
         },
         "yaxis": {
+          "title": "时间",
           "gridcolor": "rgb(255,255,255)", // 网格线颜色
           "showgrid": true,
           "zeroline": false,
@@ -410,6 +422,7 @@
           "showbackground": true // 显示背景
         },
         "zaxis": {
+          "title": "功率",
           "dtick": 100,
           "gridcolor": "rgb(255,255,255)", // 网格线颜色
           "showgrid": true,
@@ -493,10 +506,11 @@
     ]
   },
   {
+    //改
     //总图分图都有
     "analysisTypeName": "发电机转速和有功功率分析",
     "analysisTypeCode": "speed_power",
-    "title": "涡轮发电机转速功率3D散点图",
+    "title": "风力发电机转速功率3D散点图-",
     "modeType": "markers",
     "graphType": "scatter3d",
     "xLable": "发电机速度",
@@ -536,17 +550,17 @@
       "type": "scatter"
     },
     "2DLayoutConfig": {
-      "title": "涡轮发电机转速功率2D散点图",
+      "title": "月度发电机转速功率2D散点图",
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
-        "title": "Generator Speed",
+        "title": "发电机转速",
         "dtick": 100,
         // range: [0, 1800],
         "tickangle": -45,
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
-        "title": "Power",
+        "title": "功率",
         "dtick": 100,
         // range: [0, 5000],
         "tickcolor": "rgb(255,255,255)"
@@ -564,10 +578,12 @@
       "mode": "markers"
     },
     "3DLayoutConfig": {
-      "title": "涡轮发电机转速功率3D散点图",
+      "zongtitle": "风机发电机转速功率3D散点图",
+      "fentitle": "月度发电机转速功率3D散点图",
       "scene": {
         "xaxis": {
-          "title": "Generator Speed",
+          "zongtitle": "发电机转速",
+          "fentitle": "发电机转速",
           "dtick": 100,
           "gridcolor": "rgb(255,255,255)", // 网格线颜色
           "showgrid": true,
@@ -579,7 +595,8 @@
           "showbackground": true // 显示背景
         },
         "yaxis": {
-          "title": "Time",
+          "zongtitle": "机组",
+          "fentitle": "时间",
           "gridcolor": "rgb(255,255,255)", // 网格线颜色
           "showgrid": true,
           "zeroline": false,
@@ -590,7 +607,8 @@
           "showbackground": true // 显示背景
         },
         "zaxis": {
-          "title": "Power",
+          "fentitle": "功率",
+          "zongtitle": "功率",
           "dtick": 100,
           "gridcolor": "rgb(255,255,255)", // 网格线颜色
           "showgrid": true,
@@ -796,16 +814,18 @@
     "modeType": "lines",
     "graphType": "scatter",
     "xLable": "功率(kW)",
-    "yLable": "TSR",
+    "yLable": "叶尖速比",
     "com": "lineAndChildLine",
     "lableConfig": {
       "title": {
-        "text": "",
+        "zongtext": "叶尖速比分布",
+        "fentext": "机组:",
         "x": 0.5
       },
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
-        "title": "功率(kW)",
+        "zongtitle": "最小功率",
+        "fentitle": "功率(kW)",
         "range": [0, 26],
         "tickmode": "linear",
         "gridcolor": "rgb(255,255,255)",
@@ -816,7 +836,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
-        "title": "TSR",
+        "title": "叶尖速比",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
         "zeroline": false,
@@ -902,8 +922,8 @@
     "analysisTypeCode": "data_integrity_minute",
     "modeType": "heatmap",
     "graphType": "heatmap",
-    "xLable": "Turbine Name",
-    "yLable": "Year Month",
+    "xLable": "日期",
+    "yLable": "机组",
     "zLable": "",
     "com": "HeatmapCharts",
     "chartsType": [
@@ -913,8 +933,10 @@
       }
     ],
     "lableConfig": {
+      "title": { "text": "数据完整度检测(%)", "x": 0.5 },
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
+        "title": "日期",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
         "zeroline": false,
@@ -924,6 +946,7 @@
         "tickangle": -45 // 设置x轴标签倾斜45度
       },
       "yaxis": {
+        "title": "机组",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
         "zeroline": false,
@@ -940,8 +963,8 @@
     "analysisTypeCode": "wind_speed_frequency",
     "modeType": "bar",
     "graphType": "bar",
-    "xLable": "Wind Speed(m/s)",
-    "yLable": "Frequency(%)",
+    "xLable": "风速(m/s)",
+    "yLable": "频率(%)",
     "zLable": "",
     "com": "BarChart",
     "chartsType": [
@@ -953,11 +976,13 @@
     "lableConfig": {
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "title": {
+        "text": "风速频率",
         "x": 0.5,
         "xanchor": "center",
         "yanchor": "top"
       },
       "xaxis": {
+        "title": "风速",
         "showgrid": true,
         "range": [0, 26],
         "dtick": 1,
@@ -970,6 +995,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
+        "title": "频率",
         "showgrid": true,
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -1125,8 +1151,8 @@
     "analysisTypeCode": "wind_speed",
     "modeType": "bar",
     "graphType": "bar",
-    "xLable": "Turbine Name",
-    "yLable": "Averagr Wind Speed (m/s)",
+    "xLable": "机组",
+    "yLable": "平均风速(m/s)",
     "zLable": "",
     "com": "BarChart",
     "chartsType": [
@@ -1138,11 +1164,13 @@
     "lableConfig": {
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "title": {
+        "text": "机组平均风速",
         "x": 0.5,
         "xanchor": "center",
         "yanchor": "top"
       },
       "xaxis": {
+        "title": "机组",
         "showgrid": true,
         "range": [0, 26],
         "dtick": 1,
@@ -1155,6 +1183,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
+        "title": "平均风速(m/s)",
         "showgrid": true,
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -1271,9 +1300,12 @@
       }
     ],
     "lableConfig": {
+      "title": {
+        "text": "机组:"
+      },
       "plot_bgcolor": "#e5ecf6",
       "xaxis": {
-        "title": "Wind Speed",
+        "title": "风速",
         "tickmode": "array",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -1282,7 +1314,7 @@
         "tickangle": -45
       },
       "yaxis": {
-        "title": "Power",
+        "title": "功率",
         "tickmode": "array",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -1330,10 +1362,10 @@
       }
     ],
     "lableConfig": {
-      "title": "Power Distribution at Rated Wind Speed (Ambient Temp >= 25°C)",
+      "title": "额定全风速 (环境温度 >= 25°C) 10min功率分配",
       "plot_bgcolor": "#e5ecf6",
       "yaxis": {
-        "title": "Power",
+        "title": "功率",
         "tickfont": { "size": 10 },
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -1341,7 +1373,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "xaxis": {
-        "title": "Turbine",
+        "title": "机组",
         "tickangle": -45,
         "type": "category",
         "tickfont": { "size": 10 },
@@ -1354,6 +1386,7 @@
     }
   },
   {
+    //改
     "analysisTypeName": "额定风速分析",
     "analysisTypeCode": "rated_windspeed",
     "modeType": "bar",
@@ -1371,17 +1404,17 @@
     "lableConfig": {
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "title": {
-        "text": "Wind Speed Frequency: Turbine A",
+        "text": "额定风速间隔数据计数",
         "x": 0.5,
         "xanchor": "center",
         "yanchor": "top"
       },
       "xaxis": {
-        "title": "Turbine",
+        "title": "机组",
         "tickangle": -45
       },
       "yaxis": {
-        "title": "Count",
+        "title": "总数",
         "showgrid": true,
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -1404,9 +1437,9 @@
     "analysisTypeCode": "speed_torque",
     "modeType": "markers",
     "graphType": "scatter3d",
-    "xLable": "Generator Speed(发电机速度)",
-    "yLable": "Turbine(涡轮)",
-    "zLable": "Generator Turbine(发电机涡轮机)",
+    "xLable": "发电机速",
+    "yLable": "机组",
+    "zLable": "实际扭矩",
     "com": "MarkersCharts",
     "chartsType": [
       {
@@ -1441,10 +1474,12 @@
       "type": "scatter"
     },
     "2DLayoutConfig": {
-      "title": "涡轮发电机转速功率2D散点图",
+      // "title": "发电机转速功率2D散点图",
+      "title": "月度发电机转速扭矩散点图",
+
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
-        "title": "Generator Speed",
+        "title": "发电机转速",
         "dtick": 100,
         // range: [0, 1800],
         "tickangle": -45,
@@ -1456,7 +1491,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
-        "title": "Power",
+        "title": "扭矩",
         "dtick": 100,
         // range: [0, 5000],
         "gridcolor": "rgb(255,255,255)",
@@ -1479,11 +1514,12 @@
       "mode": "markers"
     },
     "3DLayoutConfig": {
-      "title": "涡轮发电机转速功率2D散点图",
-
+      "zongtitle": "发电机转速扭矩3D散点图",
+      "fentitle": "月度发电机转速扭矩3D散点图",
       "scene": {
         "xaxis": {
-          "title": "Generator Speed",
+          "zongtitle": "发电机转速",
+          "fentitle": "发电机转速",
           "dtick": 100,
           "gridcolor": "rgb(255,255,255)",
           "showgrid": true,
@@ -1495,7 +1531,8 @@
           "showbackground": true // 显示背景
         },
         "yaxis": {
-          "title": "Time",
+          "zongtitle": "机组",
+          "fentitle": "时间",
           "gridcolor": "rgb(255,255,255)",
           "showgrid": true,
           "zeroline": false,
@@ -1506,7 +1543,8 @@
           "showbackground": true // 显示背景
         },
         "zaxis": {
-          "title": "Power",
+          "zongtitle": "实际扭矩",
+          "fentitle": "扭矩",
           "dtick": 100,
           "gridcolor": "rgb(255,255,255)",
           "showgrid": true,
@@ -1594,8 +1632,8 @@
     "analysisTypeCode": "pitch_generator_speed",
     "modeType": "markers",
     "graphType": "scatter",
-    "xLable": "Generator Speed(发电机速度)",
-    "yLable": "Pitch Angle",
+    "xLable": "发电机速",
+    "yLable": "桨距角",
     "zLable": "",
     "com": "MarkersCharts",
     "chartsType": [
@@ -1623,10 +1661,10 @@
       "type": "scatter"
     },
     "2DLayoutConfig": {
-      "title": "",
+      "title": "机组",
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
-        "title": "Generator Speed",
+        "title": "发电机转速",
         "dtick": 100,
         // range: [0, 1800],
         "tickangle": -45,
@@ -1638,7 +1676,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
-        "title": "Power",
+        "title": "桨距角",
         "dtick": 100,
         // range: [0, 5000],
         "gridcolor": "rgb(255,255,255)",
@@ -1655,8 +1693,8 @@
     "analysisTypeCode": "temperature_environment",
     "modeType": "bar",
     "graphType": "bar",
-    "xLable": "Turbine Name",
-    "yLable": "Temperature difference",
+    "xLable": "机组名称",
+    "yLable": "温度偏差",
     "com": "BarChart",
     "chartsType": [
       {
@@ -1688,13 +1726,13 @@
     ],
     "lableConfig": [
       {
-        "title": "Temperature Bias",
+        "title": "温度偏差-",
         "xaxis": {
-          "title": "Turbine Name",
+          "title": "机组名称",
           "tickangle": -45
         },
         "yaxis": {
-          "title": "Temperature Difference",
+          "title": "温度偏差",
           "rangemode": "tozero"
         },
         "shapes": [
@@ -1725,13 +1763,13 @@
         ]
       },
       {
-        "title": "Temperature Median",
+        "title": "平均温度-",
         "xaxis": {
-          "title": "Turbine Name",
+          "title": "机组名称",
           "tickangle": -45
         },
         "yaxis": {
-          "title": "Temperature"
+          "title": "温度"
         }
       }
     ]
@@ -1747,12 +1785,14 @@
     "com": "lineAndChildLine",
     "lableConfig": {
       "title": {
-        "text": "",
+        "zongtext": "叶尖速比-风能利用系数分析-功率分布图",
+        "fentext": "机组:",
         "x": 0.5
       },
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
-        "title": "功率(kW)",
+        "zongtitle": "最小功率(kW)",
+        "fentitle": "最小功率(kW)",
         "range": [0, 26],
         "tickmode": "linear",
         "gridcolor": "rgb(255,255,255)",
@@ -1763,7 +1803,8 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
-        "title": "TSR/CP^(1/3)",
+        "zongtitle": "叶尖速比/风能利用系数分析^(1/3)",
+        "fentitle": "叶尖速比/风能利用系数分析^(1/3)",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
         "zeroline": false,
@@ -1842,13 +1883,14 @@
     ]
   },
   {
+    //改
     "analysisTypeName": "叶尖速比时序分析",
     "analysisTypeCode": "tsr_trend",
     "title": "",
     "modeType": "box+markers",
     "graphType": "box",
-    "xLable": "Time",
-    "yLable": "TSR",
+    "xLable": "时间",
+    "yLable": "叶尖速比",
     "zLable": "",
     "com": "BoxMarkersCharts",
     "chartsType": [
@@ -1881,9 +1923,12 @@
       }
     ],
     "lableConfig": {
+      "title": {
+        "text": "机组:"
+      },
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
-        "title": "Time",
+        "title": "时间",
         "tickmode": "auto",
         "tickformat": "%Y-%m-%d",
         "showgrid": true,
@@ -1894,7 +1939,7 @@
         "ticklen": 5
       },
       "yaxis": {
-        "title": "Cp",
+        "title": "叶尖速比",
         "range": [0, 1],
         "showgrid": true,
         "gridcolor": "lightgray",
@@ -1914,11 +1959,11 @@
   {
     "analysisTypeName": "最小桨距角分析",
     "analysisTypeCode": "min_pitch",
-    "title": "",
+    "title": "最小桨距角分布",
     "modeType": "markers",
     "graphType": "scatter",
-    "xLable": "Time",
-    "yLable": "Pitch Angle",
+    "xLable": "时间",
+    "yLable": "桨距角",
     "com": "MarkersCharts",
     "chartsType": [
       {
@@ -1935,10 +1980,10 @@
       }
     ],
     "lableConfig": {
-      "title": "Pitch Angle Distribution",
+      "title": "最小桨距角分布",
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
-        "title": "Time",
+        "title": "时间",
         "tickformat": "%Y-%m-%d",
         "tickangle": -45,
         "gridcolor": "rgb(255,255,255)",
@@ -1947,7 +1992,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
-        "title": "Pitch Angle",
+        "title": "桨距角",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
         "zeroline": false,
@@ -1963,6 +2008,7 @@
     ]
   },
   {
+    //改
     //cpAnalyst.py 文件
     "analysisTypeName": "风能利用系数和有功功率分析",
     "title": "CP 分布图",
@@ -1987,7 +2033,8 @@
     "com": "lineAndChildLine",
     "lableConfig": {
       "title": {
-        "text": "",
+        "zongtext": "风能利用系数分布-",
+        "fentext": "发电机:",
         "x": 0.5
       },
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
@@ -2003,17 +2050,24 @@
         "tickangle": -45
       },
       "yaxis": {
-        "title": "CP 中位值",
+        // "title": "CP 中位值",
+        "title": "风能利用系数",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
         "zeroline": false,
         "tickcolor": "rgb(255,255,255)"
       },
-      "legend": {
+      "zonglegend": {
         "orientation": "h",
         "xanchor": "center",
         "x": 0.5,
         "y": -0.2
+      },
+      "fenlegend": {
+        "x": 1.1, // 控制图例在X轴上的位置,1是最右边,1.05有间距
+        "y": 0.5, // 控制图例在Y轴上的位置,0.5表示垂直居中
+        "xanchor": "left", // 图例以左边为锚点,确保有右边间距
+        "yanchor": "middle" // 图例以中间为锚点,垂直居中
       }
     },
     "colors": [
@@ -2080,25 +2134,26 @@
     ]
   },
   {
+    //改
     // <h1>风能利用系数和风速分析</h1>
     "analysisTypeName": "风能利用系数和风速分析",
     // "title": "CP 分布图",
     "analysisTypeCode": "cp_windspeed",
     "modeType": "lines",
     "graphType": "scatter",
-    "xLable": "Wind Speed Floor",
-    "yLable": "CP",
+    "xLable": "风速",
+    "yLable": "风能利用系数",
     "powerConfig": null,
     "config": null,
     "com": "lineAndChildLine",
     "lableConfig": {
       "title": {
-        "text": "",
+        "text": "风能利用系数分布-",
         "x": 0.5
       },
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
-        "title": "Wind Speed Floor",
+        "title": "风速",
         "range": [0, 26],
         "tickmode": "linear",
         "gridcolor": "rgb(255,255,255)",
@@ -2109,7 +2164,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
-        "title": "Cp",
+        "title": "风能利用系数",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
         "zeroline": false,
@@ -2117,11 +2172,17 @@
         "tickcolor": "rgb(255,255,255)",
         "range": [0.3, 0.5] // 根据你需要的值范围进行设置
       },
-      "legend": {
+      "zonglegend": {
         "orientation": "h",
         "xanchor": "center",
         "x": 0.5,
         "y": -0.2
+      },
+      "fenlegend": {
+        "x": 1.1, // 控制图例在X轴上的位置,1是最右边,1.05有间距
+        "y": 0.5, // 控制图例在Y轴上的位置,0.5表示垂直居中
+        "xanchor": "left", // 图例以左边为锚点,确保有右边间距
+        "yanchor": "middle" // 图例以中间为锚点,垂直居中
       }
     },
     "colors": [
@@ -2193,7 +2254,7 @@
     "title": "",
     "modeType": "markers",
     "graphType": "scatter",
-    "xLable": "Power",
+    "xLable": "功率",
     "yLable": "TSR/CP^(1/3)",
     "zLable": "",
     "com": "MarkersCharts",
@@ -2212,10 +2273,11 @@
       }
     },
     "2DLayoutConfig": {
-      "title": "",
+      "title": "机组",
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
         // "dtick": 100,
+        "title": "功率",
         "tickangle": -45,
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -2225,7 +2287,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
-        "title": "Power",
+        "title": "叶尖速比/风能利用系数分析^(1/3)",
         // "dtick": 100,
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -2243,7 +2305,7 @@
     "modeType": "box+markers",
     "graphType": "box",
     "xLable": "Time",
-    "yLable": "CP",
+    "yLable": "风能利用系数",
     "zLable": "",
     "com": "BoxMarkersCharts",
     "chartsType": [
@@ -2276,9 +2338,12 @@
       }
     ],
     "lableConfig": {
+      "title": {
+        "text": "机组:"
+      },
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
-        "title": "Time",
+        "title": "时间",
         "tickmode": "auto",
         "tickformat": "%Y-%m-%d",
         "showgrid": true,
@@ -2289,7 +2354,7 @@
         "ticklen": 5
       },
       "yaxis": {
-        "title": "Cp",
+        "title": "风能利用系数",
         "range": [0, 1],
         "showgrid": true,
         "gridcolor": "lightgray",
@@ -2312,15 +2377,17 @@
     "modeType": "lines",
     "graphType": "scatter",
     "xLable": "Wind Speed Floor",
-    "yLable": "TSR",
+    "yLable": "叶尖速比",
     "zLable": "",
     "com": "lineAndChildLine",
     "lableConfig": {
       "title": {
-        "x": 0.5
+        "x": 0.5,
+        "text": "叶尖速比分布图"
       },
       "plot_bgcolor": "#e5ecf6", // 图表区域背景颜色
       "xaxis": {
+        "title": "风速最低阈值",
         "tickmode": "linear",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -2330,6 +2397,7 @@
         "tickcolor": "rgb(255,255,255)"
       },
       "yaxis": {
+        "title": "叶尖风速比",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
         "zeroline": false,
@@ -2408,12 +2476,12 @@
   {
     "analysisTypeName": "秒级SCADA数据记录完整度分析",
     "analysisTypeCode": "data_integrity_second",
-    "title": "",
+    "title": "数据完整度检测(%)",
     "modeType": "heatmap",
     "graphType": "heatmap",
-    "xLable": "Turbine Name",
+    "xLable": "机组",
     "colorscale": "Viridis",
-    "yLable": "Year Month",
+    "yLable": "日期",
     "zLable": "",
     "com": "HeatmapCharts",
     "chartsType": [
@@ -2480,7 +2548,7 @@
     "lableConfig": {
       "plot_bgcolor": "#e5ecf6",
       "xaxis": {
-        "title": "Wind Speed",
+        "title": "风速",
         "tickmode": "array",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,
@@ -2489,7 +2557,7 @@
         "tickangle": -45
       },
       "yaxis": {
-        "title": "Power",
+        "title": "功率",
         "tickmode": "array",
         "gridcolor": "rgb(255,255,255)",
         "showgrid": true,

+ 13 - 9
src/views/performance/assetssDetail.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:25:45
- * @LastEditTime: 2024-09-25 16:49:33
+ * @LastEditTime: 2024-09-27 14:16:25
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/assetssDetail.vue
@@ -27,7 +27,11 @@
       <el-col :span="8">
         <div style="text-align: end; font-size: 16px">
           分析时间:{{
-            generalFiles.length > 0 ? generalFiles[0].createTime : "/"
+            generalFiles.length > 0
+              ? generalFiles[0].createTime
+              : diagramRelations.length > 0
+              ? diagramRelations[0].createTime
+              : "/"
           }}
         </div>
       </el-col>
@@ -148,7 +152,7 @@
                           powerCurveDom && powerCurveDom.powerCurveTableData
                         "
                         border
-                        max-height="550"
+                        max-height="500"
                         style="width: 100%"
                         align="center"
                       >
@@ -158,11 +162,11 @@
                         </el-table-column>
                         <el-table-column prop="xData" label="风速">
                         </el-table-column>
-                        <el-table-column prop="yData" label="合同功率">
+                        <el-table-column prop="yData" label="实际功率">
                         </el-table-column>
                         <el-table-column
                           prop="contractPowerCurve"
-                          label="实际功率"
+                          label="合同功率"
                         >
                         </el-table-column>
                       </el-table>
@@ -262,7 +266,7 @@
                           powerCurveDom && powerCurveDom.powerCurveTableData
                         "
                         border
-                        max-height="550"
+                        max-height="500"
                         style="width: 100%"
                         align="center"
                       >
@@ -272,11 +276,11 @@
                         </el-table-column>
                         <el-table-column prop="xData" label="风速">
                         </el-table-column>
-                        <el-table-column prop="yData" label="合同功率">
+                        <el-table-column prop="yData" label="实际功率">
                         </el-table-column>
                         <el-table-column
                           prop="contractPowerCurve"
-                          label="实际功率"
+                          label="合同功率"
                         >
                         </el-table-column>
                       </el-table>
@@ -805,7 +809,7 @@ export default {
         });
     },
     downLoadCsv(tableDatas) {
-      const headers = ["风机名称", "风机机型", "风速", "合同功率", "实际功率"]; // CSV 文件的标题
+      const headers = ["风机名称", "风机机型", "风速", "实际功率", "合同功率"]; // CSV 文件的标题
       const data = tableDatas.map((item) => {
         return [
           item.enginName,

+ 5 - 4
src/views/performance/batchMag.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-27 09:23:37
- * @LastEditTime: 2024-09-18 17:04:20
+ * @LastEditTime: 2024-09-26 13:30:15
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/batchMag.vue
@@ -208,14 +208,15 @@
         </el-form>
         <span slot="footer" class="dialog-footer">
           <el-button @click="cancel('addUserForm')" size="small"
-            >取 消</el-button
-          >
+            >取 消
+          </el-button>
           <el-button
             type="primary"
             @click="submitForm('addUserForm')"
             size="small"
-            >确 定</el-button
           >
+            确 定
+          </el-button>
         </span>
       </div>
     </el-dialog>

+ 141 - 159
src/views/performance/components/EditAnalysis.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2024-05-29 09:14:23
- * @LastEditTime: 2024-09-25 09:22:19
+ * @LastEditTime: 2024-09-27 16:20:06
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/src/views/performance/components/EditAnalysis.vue
@@ -188,7 +188,7 @@
                     <el-table
                       :data="powerCurveDom && powerCurveDom.powerCurveTableData"
                       border
-                      max-height="550"
+                      max-height="500"
                       style="width: 100%"
                       align="center"
                     >
@@ -198,11 +198,11 @@
                       </el-table-column>
                       <el-table-column prop="xData" label="风速">
                       </el-table-column>
-                      <el-table-column prop="yData" label="合同功率">
+                      <el-table-column prop="yData" label="实际功率">
                       </el-table-column>
                       <el-table-column
                         prop="contractPowerCurve"
-                        label="实际功率"
+                        label="合同功率"
                       >
                       </el-table-column>
                     </el-table>
@@ -227,106 +227,109 @@
             </template>
           </template>
           <template v-if="powerHtmlZongData.length > 0">
-            <el-col
-              v-for="(file, index) in powerHtmlZongData"
-              :key="index + file.fileAddr + file.createTime"
-              :span="24"
-              class="col_content"
-              :style="{
-                display:
-                  getFileType(file.fileAddr) === 'html' ? 'block' : 'none',
-              }"
-            >
-              <iframe
-                v-if="getFileType(file.fileAddr) === 'html'"
-                :src="file.fileAddr"
-                :ref="'iframe' + index"
-                frameborder="0"
-                @load="iframeLoad(index + powerHtmlZongData.length)"
-                width="100%"
-                height="100%"
-              ></iframe>
-            </el-col>
+            <template v-for="(file, index) in powerHtmlZongData">
+              <!-- <div style="margin: 20px 0">11</div> -->
+              <el-col
+                class="col_content"
+                :key="index + file.fileAddr + file.createTime"
+                :span="24"
+              >
+                <iframe
+                  v-if="getFileType(file.fileAddr) === 'html'"
+                  :src="file.fileAddr"
+                  :ref="'iframe' + index"
+                  frameborder="0"
+                  @load="iframeLoad(index + powerHtmlZongData.length)"
+                  style="width: 100%; height: 100%"
+                ></iframe>
+              </el-col>
+              <!-- <div style="margin: 20px 0">12</div> -->
+            </template>
           </template>
           <el-col :span="24">
-            <div
+            <span
               style="font-weight: 700; font-size: 16px; margin: 20px 0"
               v-if="graphFilesData.length > 0 || powerHtmlFenData.length > 0"
             >
               分析分图:
-            </div>
+            </span>
           </el-col>
-          <template
-            v-if="graphFilesData[0] !== null && graphFilesData.length !== 0"
-          >
-            <template v-for="(powerCurveDom, ind) in graphFilesData">
-              <el-row>
-                <el-col
-                  v-loading="htmlLoading"
-                  v-if="form.configAnalysis === 'power_curve'"
-                  :span="12"
-                >
-                  <div class="left">
-                    <el-table
-                      :data="powerCurveDom && powerCurveDom.powerCurveTableData"
-                      border
-                      max-height="550"
-                      style="width: 100%"
-                      align="center"
-                    >
-                      <el-table-column prop="enginName" label="风机名称">
-                      </el-table-column>
-                      <el-table-column prop="engineTypeName" label="风机机型">
-                      </el-table-column>
-                      <el-table-column prop="xData" label="风速">
-                      </el-table-column>
-                      <el-table-column prop="yData" label="合同功率">
-                      </el-table-column>
-                      <el-table-column
-                        prop="contractPowerCurve"
-                        label="实际功率"
+          <el-col>
+            <template
+              v-if="graphFilesData[0] !== null && graphFilesData.length !== 0"
+            >
+              <template v-for="(powerCurveDom, ind) in graphFilesData">
+                <el-row>
+                  <el-col
+                    v-loading="htmlLoading"
+                    v-if="form.configAnalysis === 'power_curve'"
+                    :span="12"
+                  >
+                    <div class="left">
+                      <el-table
+                        :data="
+                          powerCurveDom && powerCurveDom.powerCurveTableData
+                        "
+                        border
+                        max-height="500"
+                        style="width: 100%"
+                        align="center"
                       >
-                      </el-table-column>
-                    </el-table>
-                  </div>
-                </el-col>
-                <el-col
-                  v-loading="htmlLoading"
-                  v-if="form.configAnalysis === 'power_curve'"
-                  :span="12"
-                >
-                  <div class="right">
-                    <PlotlyCharts
-                      :lineMarkerData="powerCurveDom.chartsData"
-                      :comType="'graph'"
-                      :ind="`fen${ind}`"
-                    ></PlotlyCharts>
-                  </div>
-                </el-col>
-              </el-row>
+                        <el-table-column prop="enginName" label="风机名称">
+                        </el-table-column>
+                        <el-table-column prop="engineTypeName" label="风机机型">
+                        </el-table-column>
+                        <el-table-column prop="xData" label="风速">
+                        </el-table-column>
+                        <el-table-column prop="yData" label="实际功率">
+                        </el-table-column>
+                        <el-table-column
+                          prop="contractPowerCurve"
+                          label="合同功率"
+                        >
+                        </el-table-column>
+                      </el-table>
+                    </div>
+                  </el-col>
+                  <el-col
+                    v-loading="htmlLoading"
+                    v-if="form.configAnalysis === 'power_curve'"
+                    :span="12"
+                  >
+                    <div class="right">
+                      <PlotlyCharts
+                        :lineMarkerData="powerCurveDom.chartsData"
+                        :comType="'graph'"
+                        :inds="`fen${ind}`"
+                      ></PlotlyCharts>
+                    </div>
+                  </el-col>
+                </el-row>
+              </template>
             </template>
-          </template>
+          </el-col>
           <template v-if="powerHtmlFenData.length > 0">
-            <el-col
-              v-for="(file, index) in powerHtmlFenData"
-              :key="index + file.fileAddr + file.createTime"
-              :span="24"
-              class="col_content"
-              :style="{
-                display:
-                  getFileType(file.fileAddr) === 'html' ? 'block' : 'none',
-              }"
-            >
-              <iframe
-                v-if="getFileType(file.fileAddr) === 'html'"
-                :src="file.fileAddr"
-                :ref="'iframe' + index"
-                frameborder="0"
-                @load="iframeLoad(index + powerHtmlFenData.length)"
-                width="100%"
-                height="100%"
-              ></iframe>
-            </el-col>
+            <template v-for="(file, index) in powerHtmlFenData">
+              <el-col
+                :key="index + file.fileAddr + file.createTime"
+                :span="24"
+                class="col_content"
+                :style="{
+                  display:
+                    getFileType(file.fileAddr) === 'html' ? 'block' : 'none',
+                }"
+              >
+                <iframe
+                  v-if="getFileType(file.fileAddr) === 'html'"
+                  :src="file.fileAddr"
+                  :ref="'iframe' + index"
+                  frameborder="0"
+                  @load="iframeLoad(index + powerHtmlFenData.length)"
+                  width="100%"
+                  height="100%"
+                ></iframe>
+              </el-col>
+            </template>
           </template>
         </template>
         <template v-else>
@@ -408,26 +411,28 @@
                 分析总图:
               </div>
             </el-col>
-            <el-col
-              v-for="(file, index) in generalFiles"
-              :key="index + file.fileAddr + file.createTime"
-              :span="24"
-              class="col_content"
-              :style="{
-                display:
-                  getFileType(file.fileAddr) === 'html' ? 'block' : 'none',
-              }"
-            >
-              <iframe
-                v-if="getFileType(file.fileAddr) === 'html'"
-                :src="file.fileAddr"
-                :ref="'iframe' + index"
-                frameborder="0"
-                @load="iframeLoad(index + generalFiles.length)"
-                width="100%"
-                height="100%"
-              ></iframe>
-            </el-col>
+            <template v-for="(file, index) in generalFiles">
+              <el-col
+                :key="index + file.fileAddr + file.createTime"
+                :span="24"
+                class="col_content"
+                :style="{
+                  display:
+                    getFileType(file.fileAddr) === 'html' ? 'block' : 'none',
+                }"
+              >
+                <iframe
+                  v-if="getFileType(file.fileAddr) === 'html'"
+                  :src="file.fileAddr"
+                  :ref="'iframe' + index"
+                  frameborder="0"
+                  @load="iframeLoad(index + generalFiles.length)"
+                  width="100%"
+                  height="100%"
+                ></iframe>
+              </el-col>
+            </template>
+
             <el-col :span="24">
               <div
                 style="font-weight: 700; font-size: 16px"
@@ -436,50 +441,28 @@
                 分析分图:
               </div>
             </el-col>
-            <el-col
-              v-for="(file, index) in diagramRelations"
-              :key="index + file.fileAddr + file.createTime"
-              :span="24"
-              :style="{
-                display:
-                  getFileType(file.fileAddr) === 'html' ? 'block' : 'none',
-              }"
-              class="col_content"
-            >
-              <iframe
-                v-if="getFileType(file.fileAddr) === 'html'"
-                :src="file.fileAddr"
-                :ref="'iframe' + index + diagramRelations.length"
-                frameborder="0"
-                width="100%"
-                height="100%"
-                @load="iframeLoad(index + diagramRelations.length)"
-              ></iframe>
-            </el-col>
+            <template v-for="(file, index) in diagramRelations">
+              <el-col
+                :key="index + file.fileAddr + file.createTime"
+                :span="24"
+                :style="{
+                  display:
+                    getFileType(file.fileAddr) === 'html' ? 'block' : 'none',
+                }"
+                class="col_content"
+              >
+                <iframe
+                  v-if="getFileType(file.fileAddr) === 'html'"
+                  :src="file.fileAddr"
+                  :ref="'iframe' + index + diagramRelations.length"
+                  frameborder="0"
+                  width="100%"
+                  height="100%"
+                  @load="iframeLoad(index + diagramRelations.length)"
+                ></iframe>
+              </el-col>
+            </template>
           </template>
-
-          <!-- <el-col
-            :span="12"
-            v-loading="htmlLoading"
-            v-if="form.configAnalysis !== 'yaw_error'"
-          >
-            <div class="right">
-              <iframe
-                v-if="htmlLoading"
-                :src="windDetail.elevationHeight"
-                frameborder="0"
-                @load="iframeLoad"
-                width="100%"
-                height="100%"
-              ></iframe>
-              <img
-                v-else
-                style="width: 100%"
-                src="../../../assets/img/loadingError.webp"
-                alt=""
-              />
-            </div>
-          </el-col> -->
         </template>
       </el-row>
     </el-card>
@@ -933,7 +916,6 @@ export default {
         headers.join(","),
         ...data.map((row) => row.join(",")),
       ].join("\n");
-
       downLoadCsvFile(csvContent, "风机有功功率数据");
     },
     mergeData(arr, brr) {
@@ -1141,6 +1123,6 @@ export default {
   margin-top: 30px;
 }
 .col_content {
-  height: 500px;
+  height: 600px;
 }
 </style>