2 Commitit 1347abff94 ... f0b8ce92df

Tekijä SHA1 Viesti Päivämäärä
  liujiejie f0b8ce92df Merge branch 'master' of http://192.168.50.233:3000/rui.jiang/performance-test 1 kuukausi sitten
  liujiejie 007b13fd91 联调minio 上传接口 1 kuukausi sitten

+ 1 - 0
downLoadServer/.env

@@ -5,6 +5,7 @@ MINIO_ENDPOINT=192.168.50.233
 MINIO_PORT=6900
 MINIO_ACCESS_KEY=haH1vePq7unSp4TG1One
 MINIO_SECRET_KEY=idxO5SAjboUYERpDICgHgBoHX7bcYv355lMQANt6
+#   nginx 配置 minio
 #   env MINIO_ENDPOINT=192.168.50.233;
 #   env MINIO_PORT=6900;
 #   env MINIO_ACCESS_KEY=haH1vePq7unSp4TG1One;

+ 7 - 1
downLoadServer/src/server/controllers/chartController.js

@@ -9,6 +9,7 @@ import { generateTwoDMarkersChart } from "../utils/chartsCom/TwoDMarkersChart.js
 import { generateTwoDMarkersChart1 } from "../utils/chartsCom/TwoDMarkersChart1.js";
 import { generateColorbarInitTwoDmarkersChart } from "../utils/chartsCom/ColorbarInitTwoDmarkersChart.js";
 import { generatepowerMarkers2DCharts } from "../utils/chartsCom/powerMarkers2DCharts.js";
+import { getRadarCharts } from "../utils/chartsCom/Radar.js";
 import axios from "axios";
 
 // 提取公共逻辑到辅助函数
@@ -20,7 +21,7 @@ const handleChartGeneration = async (
   additionalParams = {}
 ) => {
   try {
-    const { fileAddr } = req.body;
+    const { fileAddr, bucketName, objectName } = req.body;
     if (!fileAddr) {
       return errorResponse(res, "缺少数据URL", 400);
     }
@@ -56,6 +57,8 @@ const handleChartGeneration = async (
     // 生成图表并上传
     const imageUrl = await generateChartFn(
       data,
+      bucketName,
+      objectName,
       ...Object.values(additionalParams)
     );
 
@@ -147,3 +150,6 @@ export const createpowerMarkers2DCharts = async (req, res) => {
   );
 };
 //
+export const createRadarCharts = async (req, res) => {
+  await handleChartGeneration(req, res, getRadarCharts, "雷达图生成成功");
+};

+ 4 - 4
downLoadServer/src/server/controllers/uploadController.js

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2025-04-28 14:46:54
- * @LastEditTime: 2025-04-29 10:54:54
- * @LastEditors: bogon
+ * @LastEditTime: 2025-05-06 10:15:08
+ * @LastEditors: milo-MacBook-Pro.local
  * @Description: In User Settings Edit
  * @FilePath: /downLoadServer/src/server/controllers/uploadController.js
  */
@@ -34,9 +34,9 @@ const upload = multer({ storage });
 
 // 上传文件的控制器
 export const uploadFile = async (req, res) => {
-  const bucketName = "bucket-zhzn"; // 您的桶名称
+  const bucketName = req.body.bucketName; // 您的桶名称
   const filePath = req.body.filePath; // 从 req.body 中获取文件路径
-  const objectName = "1111.png"; // 在 MinIO 中的文件名
+  const objectName = req.body.objectName; // 在 MinIO 中的文件名
 
   // 检查 filePath 是否有效
   if (typeof filePath !== "string" || !filePath) {

+ 2 - 0
downLoadServer/src/server/routes/chartRoutes.js

@@ -10,6 +10,7 @@ import {
   createTwoDMarkersChart1,
   createColorbarInitTwoDmarkersChart,
   createpowerMarkers2DCharts,
+  createRadarCharts,
 } from "../controllers/chartController.js";
 
 const router = express.Router();
@@ -27,4 +28,5 @@ router.post(
   createColorbarInitTwoDmarkersChart
 );
 router.post("/powerMarkers2DCharts", createpowerMarkers2DCharts);
+router.post("/radarChart", createRadarCharts);
 export default router;

+ 4 - 4
downLoadServer/src/server/utils/chartsCom/3DDrawingChart.js

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2025-04-14 16:09:13
- * @LastEditTime: 2025-04-30 13:47:08
- * @LastEditors: bogon
+ * @LastEditTime: 2025-05-06 10:19:05
+ * @LastEditors: milo-MacBook-Pro.local
  * @Description: In User Settings Edit
  * @FilePath: /downLoadServer/src/server/utils/chartsCom/3DDrawingChart.js
  */
@@ -11,7 +11,7 @@ import fs from "fs-extra";
 import path from "path";
 import FormData from "form-data";
 import { colorSchemes } from "../colors.js";
-export const generate3DDrawingChart = async (data) => {
+export const generate3DDrawingChart = async (data, bucketName, objectName) => {
   try {
     console.log("开始生成热力图...");
     console.log("数据:", data);
@@ -207,7 +207,7 @@ export const generate3DDrawingChart = async (data) => {
       // 发送上传请求
       const response = await axios.post(
         `${process.env.API_BASE_URL}/examples/upload`,
-        { filePath: tempFilePath }
+        { filePath: tempFilePath, bucketName, objectName }
       );
       // return formData;
     } catch (error) {

+ 2 - 2
downLoadServer/src/server/utils/chartsCom/BarChart.js

@@ -8,7 +8,7 @@ import FormData from "form-data";
  * @param {Object} data - 图表数据
  * @returns {Promise<String>} - 返回图片URL
  */
-export const generateBarChart = async (data) => {
+export const generateBarChart = async (data, bucketName, objectName) => {
   try {
     console.log("开始生成图表...");
     console.log("数据:", data);
@@ -202,7 +202,7 @@ export const generateBarChart = async (data) => {
       // 发送上传请求
       const response = await axios.post(
         `${process.env.API_BASE_URL}/examples/upload`,
-        { filePath: tempFilePath }
+        { filePath: tempFilePath, bucketName, objectName }
       );
     } finally {
       await browser.close();

+ 8 - 4
downLoadServer/src/server/utils/chartsCom/ColorbarInitTwoDmarkersChart.js

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2025-04-28 10:27:00
- * @LastEditTime: 2025-04-30 13:48:35
- * @LastEditors: bogon
+ * @LastEditTime: 2025-05-06 10:19:42
+ * @LastEditors: milo-MacBook-Pro.local
  * @Description: In User Settings Edit
  * @FilePath: /downLoadServer/src/server/utils/chartsCom/ColorbarInitTwoDmarkersChart.js
  */
@@ -13,7 +13,11 @@ import FormData from "form-data";
 import { colorSchemes } from "../colors.js";
 import { text } from "stream/consumers";
 
-export const generateColorbarInitTwoDmarkersChart = async (data) => {
+export const generateColorbarInitTwoDmarkersChart = async (
+  data,
+  bucketName,
+  objectName
+) => {
   try {
     const colorsBar = colorSchemes[4].colors;
     // 创建临时目录
@@ -202,7 +206,7 @@ export const generateColorbarInitTwoDmarkersChart = async (data) => {
       // 发送上传请求
       const response = await axios.post(
         `${process.env.API_BASE_URL}/examples/upload`,
-        { filePath: tempFilePath }
+        { filePath: tempFilePath, bucketName, objectName }
       );
     } catch (error) {
       console.error("生成2D散点图失败:", error);

+ 4 - 4
downLoadServer/src/server/utils/chartsCom/HeatmapCharts.js

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2025-04-14 11:15:35
- * @LastEditTime: 2025-04-30 13:49:10
- * @LastEditors: bogon
+ * @LastEditTime: 2025-05-06 10:19:51
+ * @LastEditors: milo-MacBook-Pro.local
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/downLoadServer/src/server/utils/chartsCom/HeatmapCharts.js
  */
@@ -10,7 +10,7 @@ import path from "path";
 import fs from "fs-extra";
 import FormData from "form-data";
 import puppeteer from "puppeteer";
-export const generateHeatmapChart = async (data) => {
+export const generateHeatmapChart = async (data, bucketName, objectName) => {
   try {
     console.log("开始生成热力图...");
     console.log("数据:", data);
@@ -161,7 +161,7 @@ export const generateHeatmapChart = async (data) => {
       // 发送上传请求
       const response = await axios.post(
         `${process.env.API_BASE_URL}/examples/upload`,
-        { filePath: tempFilePath }
+        { filePath: tempFilePath, bucketName, objectName }
       );
     } catch (error) {
       console.error("生成热力图失败:", error);

+ 184 - 0
downLoadServer/src/server/utils/chartsCom/Radar.js

@@ -0,0 +1,184 @@
+import puppeteer from "puppeteer";
+import fs from "fs-extra";
+import path from "path";
+import FormData from "form-data";
+import { colorSchemes } from "../colors.js";
+import axios from "axios"; // 导入 axios
+
+export const getRadarCharts = async (data, bucketName, objectName) => {
+  try {
+    const colorsBar = colorSchemes[0].colors;
+    // 创建临时目录
+    const tempDir = path.join(process.cwd(), "images");
+    await fs.ensureDir(tempDir);
+    const tempFilePath = path.join(
+      tempDir,
+      `temp_scatter_chart_${Date.now()}.png`
+    );
+
+    // 获取 plotly.js 的绝对路径
+    const plotlyPath = path.join(
+      process.cwd(),
+      "src",
+      "public",
+      "js",
+      "plotly-3.0.1.min.js"
+    );
+    const plotlyContent = await fs.readFile(plotlyPath, "utf-8");
+
+    // 创建浏览器实例
+    const browser = await puppeteer.launch({
+      headless: "new",
+      args: ["--no-sandbox", "--disable-setuid-sandbox"],
+    });
+
+    try {
+      // 计算最大值、最小值和中位值
+      const values = calculateValues(data);
+      drawRadarChart(values);
+    } catch (error) {
+      console.error("绘制雷达图失败:", error);
+    } finally {
+      await browser.close();
+    }
+  } catch (error) {
+    console.error("发生错误:", error);
+  }
+};
+
+// 计算最大值、最小值和中位值
+function calculateValues(data) {
+  const itemCsvData = data; // 假设 data 是传入的 CSV 数据
+  const processedData = itemCsvData.map((item) => [
+    item.TurbinePowerRate,
+    item.TurbineRunRate,
+    item.WindSpeedAvr,
+    item.Thi,
+    item.Ws,
+  ]);
+
+  // 计算最大值
+  const maxValues = processedData[0].map((_, colIndex) =>
+    Math.max(...processedData.map((row) => row[colIndex]))
+  );
+
+  // 计算最小值
+  const minValues = processedData[0].map((_, colIndex) =>
+    Math.min(...processedData.map((row) => row[colIndex]))
+  );
+
+  // 计算中位值
+  const medianValues = calculateMedian(processedData);
+
+  return { maxValues, minValues, medianValues };
+}
+
+// 计算每列的中位值
+function calculateMedian(data) {
+  return data[0].map((_, colIndex) => {
+    const columnData = data
+      .map((row) => parseFloat(row[colIndex])) // 将字符串转换为数字
+      .sort((a, b) => a - b); // 数字排序
+    const mid = Math.floor(columnData.length / 2);
+    return columnData.length % 2 === 0
+      ? (columnData[mid - 1] + columnData[mid]) / 2
+      : columnData[mid];
+  });
+}
+
+// 渲染雷达图
+function drawRadarChart({ maxValues, minValues, medianValues }) {
+  // 获取数据
+  const values = [
+    // 这里需要根据实际数据填充
+  ];
+
+  // 雷达图的指示器,使用最大值、最小值和中位值来动态设置
+  const indicators = [
+    {
+      name: "风机能量利用率",
+      max: maxValues[0],
+      min: minValues[0],
+    },
+    {
+      name: "风机可利用率",
+      max: maxValues[1],
+      min: minValues[1],
+    },
+    { name: "平均风速", max: maxValues[2], min: minValues[2] },
+    {
+      name: "等效利用小时",
+      max: maxValues[3],
+      min: minValues[3],
+    },
+    {
+      name: "功率曲线一致性系数",
+      max: maxValues[4],
+      min: minValues[4],
+    },
+  ];
+
+  // 构建 ECharts 配置项
+  const option = {
+    title: {
+      text: "机组指标",
+      left: "center",
+      textStyle: {
+        fontSize: 16,
+      },
+    },
+    tooltip: {
+      trigger: "item",
+      formatter: (params) => {
+        const indicators = [
+          { label: "风机能量利用率", unit: " %" },
+          { label: "风机可利用率", unit: " %" },
+          { label: "平均风速", unit: " m/s" },
+          { label: "利用小时", unit: " h" },
+          { label: "功率曲线一致性系数", unit: " %" },
+        ];
+        const values = params.value;
+        let content = `<strong>${params.seriesName}</strong><br/>`;
+        for (let i = 0; i < indicators.length; i++) {
+          content += `${indicators[i].label}: ${values[i]}${
+            indicators[i].unit
+          }<br/>中位值: ${parseFloat(medianValues[i].toFixed(3))}${
+            indicators[i].unit
+          }<br/><br/>`;
+        }
+        return content;
+      },
+    },
+    radar: {
+      indicator: indicators,
+      center: ["45%", "45%"],
+      radius: "50%",
+    },
+    series: [
+      {
+        name: "机组指标",
+        type: "radar",
+        data: [
+          {
+            value: values,
+            name: "机组指标",
+          },
+        ],
+      },
+      {
+        name: "中位值",
+        type: "radar",
+        data: [
+          {
+            value: medianValues,
+            name: "中位值",
+          },
+        ],
+      },
+    ],
+  };
+
+  // 使用 ECharts 渲染雷达图
+  const chart = echarts.init(this.$refs.radarChart);
+  chart.setOption(option);
+}

+ 4 - 4
downLoadServer/src/server/utils/chartsCom/Time3DChart.js

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2025-04-14 17:49:33
- * @LastEditTime: 2025-04-30 13:50:00
- * @LastEditors: bogon
+ * @LastEditTime: 2025-05-06 10:20:54
+ * @LastEditors: milo-MacBook-Pro.local
  * @Description: In User Settings Edit
  * @FilePath: /performance-test/downLoadServer/src/server/utils/chartsCom/Time3DChart.js
  */
@@ -18,7 +18,7 @@ const formatDate = (dateString) => {
   const month = ("0" + (date.getMonth() + 1)).slice(-2); // 获取月份并确保两位数
   return `${year}-${month}`;
 };
-export const generateTime3DChart = async (data) => {
+export const generateTime3DChart = async (data, bucketName, objectName) => {
   try {
     // 创建临时目录
     const tempDir = path.join(process.cwd(), "images");
@@ -221,7 +221,7 @@ export const generateTime3DChart = async (data) => {
       // 发送上传请求
       const response = await axios.post(
         `${process.env.API_BASE_URL}/examples/upload`,
-        { filePath: tempFilePath }
+        { filePath: tempFilePath, bucketName, objectName }
       );
     } catch (error) {
       console.error("生成3D图失败:", error);

+ 8 - 4
downLoadServer/src/server/utils/chartsCom/TwoDMarkersChart.js

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2025-04-25 16:19:33
- * @LastEditTime: 2025-04-30 13:50:09
- * @LastEditors: bogon
+ * @LastEditTime: 2025-05-06 10:21:04
+ * @LastEditors: milo-MacBook-Pro.local
  * @Description: In User Settings Edit
  * @FilePath: /downLoadServer/src/server/utils/chartsCom/TwoDMarkersChart.js
  */
@@ -13,7 +13,11 @@ import path from "path";
 import FormData from "form-data";
 import { colorSchemes } from "../colors.js";
 
-export const generateTwoDMarkersChart = async (data) => {
+export const generateTwoDMarkersChart = async (
+  data,
+  bucketName,
+  objectName
+) => {
   try {
     // 创建临时目录
     const tempDir = path.join(process.cwd(), "images");
@@ -168,7 +172,7 @@ export const generateTwoDMarkersChart = async (data) => {
       // 发送上传请求
       const response = await axios.post(
         `${process.env.API_BASE_URL}/examples/upload`,
-        { filePath: tempFilePath }
+        { filePath: tempFilePath, bucketName, objectName }
       );
     } catch (error) {
       console.error("生成2D散点图失败:", error);

+ 6 - 2
downLoadServer/src/server/utils/chartsCom/TwoDMarkersChart1.js

@@ -4,7 +4,11 @@ import path from "path";
 import FormData from "form-data";
 import { colorSchemes } from "../colors.js";
 
-export const generateTwoDMarkersChart1 = async (data) => {
+export const generateTwoDMarkersChart1 = async (
+  data,
+  bucketName,
+  objectName
+) => {
   try {
     // 创建临时目录
     const tempDir = path.join(process.cwd(), "images");
@@ -190,7 +194,7 @@ export const generateTwoDMarkersChart1 = async (data) => {
       // 发送上传请求
       const response = await axios.post(
         `${process.env.API_BASE_URL}/examples/upload`,
-        { filePath: tempFilePath }
+        { filePath: tempFilePath, bucketName, objectName }
       );
     } catch (error) {
       console.error("生成2D散点图失败:", error);

+ 6 - 2
downLoadServer/src/server/utils/chartsCom/lineAndChildLine.js

@@ -12,7 +12,11 @@ import { colorSchemes } from "../colors.js";
  * @param {string[]} options.colors - 颜色数组2
  * @returns {Promise<String>} - 返回图片URL
  */
-export const generateLineAndChildLine = async (chartData) => {
+export const generateLineAndChildLine = async (
+  chartData,
+  bucketName,
+  objectName
+) => {
   try {
     const colorSchemesItem = colorSchemes[0].colors;
     // 获取数据
@@ -192,7 +196,7 @@ export const generateLineAndChildLine = async (chartData) => {
       // 发送上传请求
       const response = await axios.post(
         `${process.env.API_BASE_URL}/examples/upload`,
-        { filePath: tempFilePath }
+        { filePath: tempFilePath, bucketName, objectName }
       );
     } finally {
       await browser.close();

+ 7 - 2
downLoadServer/src/server/utils/chartsCom/lineChartsFen.js

@@ -9,7 +9,12 @@ import FormData from "form-data";
  * @param {Object} data - 图表数据
  * @returns {Promise<String>} - 返回图片URL
  */
-export const generateLineChart = async (data, fieldEngineCode) => {
+export const generateLineChart = async (
+  data,
+  bucketName,
+  objectName,
+  fieldEngineCode
+) => {
   try {
     console.log("开始生成折线图...");
     console.log("数据:", data);
@@ -196,7 +201,7 @@ export const generateLineChart = async (data, fieldEngineCode) => {
       // 发送上传请求
       const response = await axios.post(
         `${process.env.API_BASE_URL}/examples/upload`,
-        { filePath: tempFilePath }
+        { filePath: tempFilePath, bucketName, objectName }
       );
     } finally {
       await browser.close();

+ 12 - 3
downLoadServer/src/server/utils/chartsCom/powerMarkers2DCharts.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2025-04-28 14:15:23
- * @LastEditTime: 2025-04-28 17:33:17
+ * @LastEditTime: 2025-05-06 10:33:43
  * @LastEditors: bogon
  * @Description: In User Settings Edit
  * @FilePath: /downLoadServer/src/server/utils/chartsCom/powerMarkers2DCharts.js
@@ -13,7 +13,11 @@ import FormData from "form-data";
 import { colorSchemes } from "../colors.js";
 import axios from "axios"; // 导入 axios
 
-export const generatepowerMarkers2DCharts = async (data) => {
+export const generatepowerMarkers2DCharts = async (
+  data,
+  bucketName,
+  objectName
+) => {
   try {
     const colorsBar = colorSchemes[0].colors;
     // 创建临时目录
@@ -235,9 +239,14 @@ export const generatepowerMarkers2DCharts = async (data) => {
       const formData = new FormData();
       formData.append("file", fs.createReadStream(tempFilePath));
       // 发送上传请求
+      //在这里需要传入风场编号-风场编号+分析编号-分析类型-manual-名称.png
       const response = await axios.post(
         `${process.env.API_BASE_URL}/examples/upload`,
-        { filePath: tempFilePath }
+        {
+          filePath: tempFilePath,
+          bucketName, //桶名称
+          objectName, //在 MinIO 中的文件名
+        }
       );
       console.log(response.data, "response 上传结果"); // 打印上传结果
       // return response.data; // 返回上传结果

+ 53 - 25
src/views/performance/assetssMag.vue

@@ -63,7 +63,7 @@
             v-hasPermi="['home:performance:autoAssetss']"
             >查看自动分析列表</el-button
           >
-          <el-button @click="handleDownLoadChart" size="small">下载</el-button>
+          <!-- <el-button @click="handleDownLoadChart" size="small">下载</el-button> -->
         </el-form-item>
       </el-form>
     </div>
@@ -303,6 +303,13 @@
         >
           <template slot-scope="scope">
             <el-button
+              @click="handleDownLoadChart(scope.row)"
+              type="text"
+              size="small"
+            >
+              下载报告
+            </el-button>
+            <el-button
               @click="abnormalDialog(scope.row, '上传报告')"
               type="text"
               size="small"
@@ -457,7 +464,9 @@ import {
   addAnalysisResult,
   queryCodeNum,
   editPriority,
+  analysisDetail,
 } from "@/api/performance";
+import { getFieldInfo } from "@/api/overview";
 import axios from "axios";
 export default {
   components: {
@@ -465,6 +474,7 @@ export default {
   },
   data() {
     return {
+      fieldInfo: {}, //风场信息
       firstLoad: false, // 是否是第一次加载
       fieldCodeList: [],
       addDialogVisible: false,
@@ -516,6 +526,7 @@ export default {
         analysisName: undefined,
         analysisState: undefined,
       },
+      allAnalysis: [],
       tableData: [],
       rowInfo: {},
       title: "",
@@ -532,30 +543,47 @@ export default {
     this.fetchData();
   },
   methods: {
-    async handleDownLoadChart() {
-      // const res = await axios.post(
-      //   "/downLoadChart/chartServer/charts/powerMarkers2DCharts",
-      //   {
-      //     fieldEngineCode: "WOG00623", //lineChartFen
-      //     fileAddr:
-      //       // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/wind_speed_frequency/manual/wind_Speed_Frequency%2302.json", //barChart  url:bar
-      //       // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/cp/manual/%2320.json", //lineChartFen  url:line
-      //       // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/cp/manual/WEM00013.json", //lineAndChartLine  url:lineAndChildLine
-      //       // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/data_integrity_second/manual/Data_Integrity_Of_Second_Analyst.json", //HeatmapCharts  url:heatmap
-      //       // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/speed_torque/manual/total_3D_WEM00012.json", //3DDrawingChart  url:3DDrawingChart
-      //       // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/speed_torque/manual/3D_%2301.json", //Time3DChart  url:Time3DChart
-      //       // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/tsr_cp_power_scatter/manual/%2301.json", //TwoDMarkersChart  url:TwoDMarkersChart
-      //       // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/power_scatter_2D/manual/%2301-scatter.json", //TwoDMarkersChart1  url:TwoDMarkersChart1 2D有功功率散点图
-      //       // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/min_pitch/manual/min_pitch%2301.json",
-      //       // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/yaw_error_density/manual/%2304.json", //ColorbarInitTwoDmarkersChart  url:ColorbarInitTwoDmarkersChart 最小桨距角 、动态偏航误差
-      //       "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/pitch_generator_speed/manual/pitch_GeneratorSpeed_Analyst%2301.json", //powerMarkers2DCharts url:powerMarkers2DCharts
-      //   }
-      // );
-      // console.log(res, "res linechart");
-      const res = await axios.post(
-        "/downLoadChart/examples/checkIfAFileExistsInMinio"
-      );
-      console.log(res, "res");
+    async handleDownLoadChart(row) {
+      console.log(row.fieldCode, "row");
+      await this.getAllAnalysis(row.batchCode);
+      await this.getFieldDetail(row.batchCode);
+      this.allAnalysis.map(async (item, ind) => {
+        const res = await axios.post(
+          "/downLoadChart/chartServer/charts/radarChart",
+          {
+            fieldEngineCode: "WOG00623", //lineChartFen
+            bucketName:
+              row.fieldCode + "/" + row.batchCode + "/" + item.analysisTypeCode, //桶名称
+            objectName: "", //在 MinIO 中的文件名
+            fieldInfo: this.fieldInfo,
+            fileAddr:
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/wind_speed_frequency/manual/wind_Speed_Frequency%2302.json", //barChart  url:bar
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/cp/manual/%2320.json", //lineChartFen  url:line
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/cp/manual/WEM00013.json", //lineAndChartLine  url:lineAndChildLine
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/data_integrity_second/manual/Data_Integrity_Of_Second_Analyst.json", //HeatmapCharts  url:heatmap
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/speed_torque/manual/total_3D_WEM00012.json", //3DDrawingChart  url:3DDrawingChart
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/speed_torque/manual/3D_%2301.json", //Time3DChart  url:Time3DChart
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/tsr_cp_power_scatter/manual/%2301.json", //TwoDMarkersChart  url:TwoDMarkersChart
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/power_scatter_2D/manual/%2301-scatter.json", //TwoDMarkersChart1  url:TwoDMarkersChart1 2D有功功率散点图
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/min_pitch/manual/min_pitch%2301.json",
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/yaw_error_density/manual/%2304.json", //ColorbarInitTwoDmarkersChart  url:ColorbarInitTwoDmarkersChart 最小桨距角 、动态偏航误差
+              // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/pitch_generator_speed/manual/pitch_GeneratorSpeed_Analyst%2301.json", //powerMarkers2DCharts url:powerMarkers2DCharts
+              "", //radarChart url:radarChart
+          }
+        );
+        console.log(res, "res linechart");
+      });
+    },
+    //获取 风机信息
+    async getFieldDetail(batchCode) {
+      const res = await getFieldInfo({ batchCode });
+      this.fieldInfo = res.data.fieldInfo; //风场信息
+    },
+    //获取所有分析类型,分析结果接口
+    async getAllAnalysis(batchCode) {
+      const res = await analysisDetail({ batchCode });
+      console.log(res.data, "分析全部结果");
+      this.allAnalysis = res.data;
     },
     //自动分析列表页面跳转
     handleAutoAsstessList() {

+ 521 - 0
src/views/performance/js/allAnalysisType.js

@@ -0,0 +1,521 @@
+/*
+ * @Author: your name
+ * @Date: 2025-05-06 17:01:14
+ * @LastEditTime: 2025-05-06 17:35:33
+ * @LastEditors: bogon
+ * @Description: In User Settings Edit
+ * @FilePath: /performance-test/src/views/performance/js/allAnalysisType.js
+ */
+export const allAnalysisType = [
+  {
+    typeName: "分钟级SCADA数据记录完整度分析",
+    id: 101,
+    parentId: 1,
+    typeCode: "data_integrity_minute",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "heatmap",
+    },
+    diagramRelations: {
+      urlType: "heatmap",
+    },
+  },
+  {
+    typeName: "秒级SCADA数据记录完整度分析",
+    id: 102,
+    parentId: 1,
+    typeCode: "data_integrity_second",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "heatmap",
+    },
+    diagramRelations: {
+      urlType: "heatmap",
+    },
+  },
+  {
+    typeName: "风速频率分析",
+    id: 103,
+    parentId: 2,
+    typeCode: "wind_speed_frequency",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "bar",
+    },
+    diagramRelations: {
+      urlType: "bar",
+    },
+  },
+  {
+    typeName: "风向玫瑰分析",
+    id: 104,
+    parentId: 2,
+    typeCode: "wind_direction_frequency",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "radarChart",
+    },
+    diagramRelations: {
+      urlType: "radarChart",
+    },
+  },
+  {
+    typeName: "风速均值分析",
+    id: 105,
+    parentId: 2,
+    typeCode: "wind_speed",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "bar",
+    },
+    diagramRelations: {
+      urlType: "bar",
+    },
+  },
+  {
+    typeName: "有功功率曲线分析",
+    id: 106,
+    parentId: 3,
+    typeCode: "power_curve",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "",
+    },
+  },
+  {
+    typeName: "逐月有功功率散点2D分析",
+    id: 107,
+    parentId: 3,
+    typeCode: "power_scatter_2D",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "TwoDMarkersChart1",
+    },
+  },
+  {
+    typeName: "逐月有功功率散点3D分析",
+    id: 108,
+    parentId: 3,
+    typeCode: "power_scatter",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "Time3DChart",
+    },
+  },
+  {
+    typeName: "额定功率和风速分析",
+    id: 109,
+    parentId: 4,
+    typeCode: "rated_power_windspeed",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "",
+    },
+  },
+  {
+    typeName: "额定风速分析",
+    id: 110,
+    parentId: 4,
+    typeCode: "rated_windspeed",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "",
+    },
+  },
+  {
+    typeName: "风能利用系数和有功功率分析",
+    id: 111,
+    parentId: 5,
+    typeCode: "cp",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "风能利用系数和风速分析",
+    id: 112,
+    parentId: 5,
+    typeCode: "cp_windspeed",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "风能利用系数时序分析",
+    id: 113,
+    parentId: 5,
+    typeCode: "cp_trend",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "",
+    },
+  },
+  {
+    typeName: "叶尖速比和有功功率分析",
+    id: 114,
+    parentId: 5,
+    typeCode: "tsr",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "叶尖速比和风速分析",
+    id: 115,
+    parentId: 5,
+    typeCode: "tsr_windspeed",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "叶尖速比时序分析",
+    id: 116,
+    parentId: 5,
+    typeCode: "tsr_trend",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "",
+    },
+  },
+  {
+    typeName: "叶尖速比-Cp-功率分析",
+    id: 117,
+    parentId: 5,
+    typeCode: "tsr_cp_power",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "叶尖速比-Cp-功率散点分析",
+    id: 118,
+    parentId: 5,
+    typeCode: "tsr_cp_power_scatter",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "TwoDMarkersChart",
+    },
+    diagramRelations: {
+      urlType: "TwoDMarkersChart",
+    },
+  },
+  {
+    typeName: "变桨和叶尖速比及风能利用系数分析",
+    id: 127,
+    parentId: 5,
+    typeCode: "pitch_tsr_cp",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "TwoDMarkersChart",
+    },
+  },
+  {
+    typeName: "静态偏航误差分析",
+    id: 121,
+    parentId: 6,
+    typeCode: "yaw_error",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "",
+    },
+  },
+  {
+    typeName: "动态偏航误差分析",
+    id: 129,
+    parentId: 6,
+    typeCode: "yaw_error_density",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      FileTypeFromUrl: "PDF-",
+      urlType: ["lineAndChildLine", "ColorbarInitTwoDmarkersChart"],
+    },
+  },
+  {
+    typeName: "最小桨距角分析",
+    id: 122,
+    parentId: 7,
+    typeCode: "min_pitch",
+    typeFlag: "second",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "ColorbarInitTwoDmarkersChart",
+    },
+  },
+  {
+    typeName: "发电机转速和有功功率分析",
+    id: 119,
+    parentId: 8,
+    typeCode: "speed_power",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "3DDrawingChart",
+    },
+    diagramRelations: {
+      FileTypeFromUrl: "speed_power", //powerMarkers2DCharts
+      urlType: ["powerMarkers2DCharts", "Time3DChart"],
+    },
+  },
+  {
+    typeName: "发电机转速和转矩分析",
+    id: 120,
+    parentId: 8,
+    typeCode: "speed_torque",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "3DDrawingChart",
+    },
+    diagramRelations: {
+      FileTypeFromUrl: "speed_torque", //powerMarkers2DCharts
+      urlType: ["powerMarkers2DCharts", "Time3DChart"],
+    },
+  },
+  {
+    typeName: "变桨和有功功率协调性分析",
+    id: 123,
+    parentId: 8,
+    typeCode: "pitch_power",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      FileTypeFromUrl: "pitch_power", //powerMarkers2DCharts
+      urlType: ["powerMarkers2DCharts", "Time3DChart"],
+    },
+  },
+  {
+    typeName: "变桨和发电机转速协调性分析",
+    id: 124,
+    parentId: 8,
+    typeCode: "pitch_generator_speed",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "powerMarkers2DCharts",
+    },
+  },
+  {
+    typeName: "环境温度传感器分析",
+    id: 125,
+    parentId: 9,
+    typeCode: "temperature_environment",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "bar",
+    },
+    diagramRelations: {
+      urlType: "",
+    },
+  },
+  {
+    typeName: "齿轮箱-高速轴温度分析",
+    id: 131,
+    parentId: 9,
+    typeCode: "temperature_large_components",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "齿轮箱-中速轴温度分析",
+    id: 132,
+    parentId: 9,
+    typeCode: "temperature_large_components",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "齿轮箱-低速轴温度分析",
+    id: 133,
+    parentId: 9,
+    typeCode: "temperature_large_components",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "主轴承温度分析",
+    id: 134,
+    parentId: 9,
+    typeCode: "temperature_large_components",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "发电机-驱动端轴承温度分析",
+    id: 135,
+    parentId: 9,
+    typeCode: "temperature_large_components",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "发电机-非驱动端轴承温度分析",
+    id: 136,
+    parentId: 9,
+    typeCode: "temperature_large_components",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "发电机-轴承温度偏差分析",
+    id: 137,
+    parentId: 9,
+    typeCode: "temperature_large_components",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "GeneratorTemperature",
+    },
+  },
+  {
+    typeName: "发电机-绕组温度分析",
+    id: 138,
+    parentId: 9,
+    typeCode: "temperature_large_components",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "lineAndChildLine",
+    },
+    diagramRelations: {
+      urlType: "line",
+    },
+  },
+  {
+    typeName: "机组指标",
+    id: 41,
+    parentId: 10,
+    typeCode: "production_indicator",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "radar",
+    },
+  },
+  {
+    typeName: "全场指标",
+    id: 128,
+    parentId: 10,
+    typeCode: "production_indicator",
+    typeFlag: "minute",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "",
+    },
+  },
+  {
+    typeName: "机组故障统计",
+    id: 42,
+    parentId: 11,
+    typeCode: "fault",
+    typeFlag: "fault",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "",
+    },
+  },
+  {
+    typeName: "全场故障统计",
+    id: 130,
+    parentId: 11,
+    typeCode: "fault",
+    typeFlag: "fault",
+    generalFiles: {
+      urlType: "",
+    },
+    diagramRelations: {
+      urlType: "",
+    },
+  },
+];