|
@@ -1,12 +1,12 @@
|
|
|
<template>
|
|
|
<div class="global-variable">
|
|
|
<div class="condition">
|
|
|
- <el-alert
|
|
|
+ <!-- <el-alert
|
|
|
title="分析前请核对数据是否导入,点击查看是否导入即可查看"
|
|
|
type="warning"
|
|
|
show-icon
|
|
|
>
|
|
|
- </el-alert>
|
|
|
+ </el-alert> -->
|
|
|
<el-form
|
|
|
:inline="true"
|
|
|
ref="ruleForm"
|
|
@@ -466,6 +466,7 @@ import {
|
|
|
editPriority,
|
|
|
analysisDetail,
|
|
|
} from "@/api/performance";
|
|
|
+import { downloadDocx } from "@/utils/common";
|
|
|
import { getFieldInfo } from "@/api/overview";
|
|
|
import axios from "axios";
|
|
|
import pLimit from "p-limit";
|
|
@@ -476,6 +477,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ fileDataList: {},
|
|
|
fieldInfo: {}, //风场信息
|
|
|
firstLoad: false, // 是否是第一次加载
|
|
|
fieldCodeList: [],
|
|
@@ -546,92 +548,129 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
// async handleDownLoadChart(row) {
|
|
|
- // //请求该批次下全部分析类型
|
|
|
+ // console.log(row.fieldCode, "row");
|
|
|
// await this.getAllAnalysis(row.batchCode);
|
|
|
- // //获取风场信息 要在pdf中展示
|
|
|
// await this.getFieldDetail(row.batchCode);
|
|
|
- // //循环分析类型分片逻辑处理
|
|
|
- // this.allAnalysis.map(async (itemAnalysis, indAnalysis) => {
|
|
|
- // const filterAnalysis = allAnalysisType.filter(
|
|
|
- // (itemType) => itemType.typeCode === itemAnalysis.analysisTypeCode
|
|
|
+
|
|
|
+ // const diagramRelations = [
|
|
|
+ // {
|
|
|
+ // batchCode: "WOF039800012-WOB000001",
|
|
|
+ // fieldEngineCode: "WOG00604",
|
|
|
+ // fieldEngineName: "#01",
|
|
|
+ // analysisTypeCode: "power_curve",
|
|
|
+ // analysisTypeName: null,
|
|
|
+ // fileAddr:
|
|
|
+ // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/power_curve/manual/power_curve-%2301.json",
|
|
|
+ // autoAnalysis: null,
|
|
|
+ // createTime: "2025-05-23 16:57:26",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // batchCode: "WOF039800012-WOB000001",
|
|
|
+ // fieldEngineCode: "WOG00604",
|
|
|
+ // fieldEngineName: "#01",
|
|
|
+ // analysisTypeCode: "power_curve",
|
|
|
+ // analysisTypeName: null,
|
|
|
+ // fileAddr:
|
|
|
+ // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/power_curve/manual/power_curve-%2301.json",
|
|
|
+ // autoAnalysis: null,
|
|
|
+ // createTime: "2025-05-23 16:57:26",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // batchCode: "WOF039800012-WOB000001",
|
|
|
+ // fieldEngineCode: "WOG00608",
|
|
|
+ // fieldEngineName: "#05",
|
|
|
+ // analysisTypeCode: "power_curve",
|
|
|
+ // analysisTypeName: null,
|
|
|
+ // fileAddr:
|
|
|
+ // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/power_curve/manual/power_curve-%2305.json",
|
|
|
+ // autoAnalysis: null,
|
|
|
+ // createTime: "2025-05-23 16:57:26",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // batchCode: "WOF039800012-WOB000001",
|
|
|
+ // fieldEngineCode: "WOG00613",
|
|
|
+ // fieldEngineName: "#10",
|
|
|
+ // analysisTypeCode: "power_curve",
|
|
|
+ // analysisTypeName: null,
|
|
|
+ // fileAddr:
|
|
|
+ // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/power_curve/manual/power_curve-%2310.json",
|
|
|
+ // autoAnalysis: null,
|
|
|
+ // createTime: "2025-05-23 16:57:26",
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
+ // diagramRelations.map(async (item) => {
|
|
|
+ // const res = await axios.post(
|
|
|
+ // "/downLoadChart/chartServer/charts/PlotlyChartsFen",
|
|
|
+ // {
|
|
|
+ // fieldEngineCode: item.fieldEngineCode ? item.fieldEngineCode : "", //lineChartFen
|
|
|
+ // bucketName: "bucket-zhzn",
|
|
|
+ // // row.fieldCode + "/" + row.batchCode + "/" + item.analysisTypeCode, //桶名称
|
|
|
+ // objectName: "charts/111.jpg", //在 MinIO 中的文件名
|
|
|
+ // fieldInfo: this.fieldInfo,
|
|
|
+ // fileAddr: item.fileAddr,
|
|
|
+ // // chartType: "radar",
|
|
|
+ // chartType: "",
|
|
|
+ // // "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_windspeed/manual/%2319.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
|
|
|
+ // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/rated_power_windspeed/manual/total_less_25.json", //boxLineCharts
|
|
|
+ // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/tsr_trend/manual/%2302.json", //boxMarkersCharts
|
|
|
+ // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/temperature_large_components/manual/GeneratorTemperature/%2321.json", //generatorTemperature
|
|
|
+ // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/wind_direction_frequency/manual/wind_direction_frequency%2318.json", //windRoseChart
|
|
|
+ // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/yaw_error/manual/%2320.json", //yawErrorLine
|
|
|
+ // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/fault/manual/total_fault_result.csv", //faultAllChart //全场故障
|
|
|
+ // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/fault/manual/turbine_fault_result.csv", //faultUnitChart //机组故障
|
|
|
+ // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/yaw_error/manual/yaw_error_result.csv", //静态偏航总图 //yawErrorBarSumChart
|
|
|
+ // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/production_indicator/manual/production_indicator_total.csv", //全场指标 productionIndicatorTotal
|
|
|
+ // }
|
|
|
// );
|
|
|
- // itemAnalysis.generalFiles &&
|
|
|
- // itemAnalysis.generalFiles.map(async (itemField, indField) => {
|
|
|
- // const res = await axios.post(
|
|
|
- // "/downLoadChart/chartServer/charts/" +
|
|
|
- // filterAnalysis[0].generalFiles.urlType,
|
|
|
- // {
|
|
|
- // fieldEngineCode: "WOG00623", //lineChartFen
|
|
|
- // bucketName:
|
|
|
- // row.fieldCode +
|
|
|
- // "/" +
|
|
|
- // row.batchCode +
|
|
|
- // "/" +
|
|
|
- // itemAnalysis.analysisTypeCode, //桶名称
|
|
|
- // objectName:
|
|
|
- // itemField.fieldEngineName || itemField.engineTypeCode, //在 MinIO 中的文件名
|
|
|
- // fieldInfo: this.fieldInfo,
|
|
|
- // fileAddr: itemField.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");
|
|
|
- // });
|
|
|
- // itemAnalysis.diagramRelations &&
|
|
|
- // itemAnalysis.diagramRelations.map(async (itemField, indField) => {
|
|
|
- // const res = await axios.post(
|
|
|
- // "/downLoadChart/chartServer/charts/" +
|
|
|
- // Array.isArray(filterAnalysis[0].diagramRelations.urlType)
|
|
|
- // ? this.getFileTypeFromUrl(
|
|
|
- // filterAnalysis[0].diagramRelations.FileTypeFromUrl
|
|
|
- // ) === filterAnalysis[0].diagramRelations.FileTypeFromUrl
|
|
|
- // ? filterAnalysis[0].diagramRelations.urlType[0]
|
|
|
- // : filterAnalysis[0].diagramRelations.urlType[1]
|
|
|
- // : filterAnalysis[0].diagramRelations.urlType,
|
|
|
- // {
|
|
|
- // fieldEngineCode: "WOG00623", //lineChartFen
|
|
|
- // bucketName:
|
|
|
- // row.fieldCode +
|
|
|
- // "/" +
|
|
|
- // row.batchCode +
|
|
|
- // "/" +
|
|
|
- // itemAnalysis.analysisTypeCode, //桶名称
|
|
|
- // objectName:
|
|
|
- // itemField.fieldEngineName || itemField.engineTypeCode, //在 MinIO 中的文件名
|
|
|
- // fieldInfo: this.fieldInfo,
|
|
|
- // fileAddr: itemField.fileAddr,
|
|
|
- // }
|
|
|
- // );
|
|
|
- // console.log(res, "res linechart");
|
|
|
- // });
|
|
|
// });
|
|
|
+
|
|
|
+ // // await axios.post("/downLoadChart/chartServer/charts/CopyFileCsv", {
|
|
|
+ // // fieldInfo: this.fieldInfo,
|
|
|
+ // // rows: [
|
|
|
+ // // {
|
|
|
+ // // Qdr: "-70352582.72",
|
|
|
+ // // Qp: "70352582.72",
|
|
|
+ // // Rdr: "0",
|
|
|
+ // // Thc: "1675.06",
|
|
|
+ // // },
|
|
|
+ // // ],
|
|
|
+ // // "zn-techcn-replace-tags-production_indicator_unit-generalFiles": [
|
|
|
+ // // "http://192.168.50.233:6900/bucket-zhzn/charts/#03.jpg",
|
|
|
+ // // "http://192.168.50.233:6900/bucket-zhzn/charts/#05.jpg",
|
|
|
+ // // "http://192.168.50.233:6900/bucket-zhzn/charts/#06.jpg",
|
|
|
+ // // "http://192.168.50.233:6900/bucket-zhzn/charts/#08.jpg",
|
|
|
+ // // "http://192.168.50.233:6900/bucket-zhzn/charts/#09.jpg",
|
|
|
+ // // "http://192.168.50.233:6900/bucket-zhzn/charts/#14.jpg",
|
|
|
+ // // "http://192.168.50.233:6900/bucket-zhzn/charts/#17.jpg",
|
|
|
+ // // ],
|
|
|
+ // // });
|
|
|
// },
|
|
|
- //获取 风机信息
|
|
|
+
|
|
|
+ // 获取 风机信息
|
|
|
+
|
|
|
async handleDownLoadChart(row) {
|
|
|
await this.getAllAnalysis(row.batchCode);
|
|
|
await this.getFieldDetail(row.batchCode);
|
|
|
-
|
|
|
+ this.$message.info("开始生成word文档");
|
|
|
const limit = pLimit(5); // 限制同时并发的请求数量为 5
|
|
|
const tasks = [];
|
|
|
-
|
|
|
for (const itemAnalysis of this.allAnalysis) {
|
|
|
const filterAnalysis = allAnalysisType.filter(
|
|
|
- (itemType) => itemType.typeCode === itemAnalysis.analysisTypeCode
|
|
|
+ (itemType) => itemType.typeName === itemAnalysis.analysisTypeName
|
|
|
)[0];
|
|
|
-
|
|
|
if (itemAnalysis.generalFiles) {
|
|
|
- //这里过滤的是发电机温度的类型 在url 中是否能找到filterFileAddr 关键字
|
|
|
+ //这里过滤的是发电机温度的类型 在url 中是否能找到filterFileAddr
|
|
|
for (const itemField of filterAnalysis.filterFileAddr
|
|
|
? itemAnalysis.generalFiles
|
|
|
.filter((item) => item.fileAddr.endsWith(".json"))
|
|
@@ -639,19 +678,105 @@ export default {
|
|
|
item.fileAddr.includes(filterAnalysis.filterFileAddr)
|
|
|
) || []
|
|
|
: itemAnalysis.generalFiles) {
|
|
|
- tasks.push(
|
|
|
- limit(() =>
|
|
|
- this.postChartData(
|
|
|
- filterAnalysis.generalFiles.urlType,
|
|
|
- row,
|
|
|
- itemAnalysis,
|
|
|
- itemField
|
|
|
+ //静态偏航误差 --通过allAnalysisType.js文件配置实现需求
|
|
|
+ if (Array.isArray(filterAnalysis.generalFiles.urlType)) {
|
|
|
+ filterAnalysis.generalFiles.urlType.map(
|
|
|
+ (itemUrlType, indUrlType) => {
|
|
|
+ tasks.push(
|
|
|
+ limit(() =>
|
|
|
+ this.postChartData(
|
|
|
+ itemUrlType,
|
|
|
+ row,
|
|
|
+ itemAnalysis,
|
|
|
+ itemField,
|
|
|
+ filterAnalysis,
|
|
|
+ "generalFiles"
|
|
|
+ )
|
|
|
+ )
|
|
|
+ );
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else if (filterAnalysis.typeCode === "fault") {
|
|
|
+ if (itemField.fileAddr.includes("turbine_fault_result")) {
|
|
|
+ if (itemField.engineTypeCode === "turbine_fault_result") {
|
|
|
+ tasks.push(
|
|
|
+ limit(() =>
|
|
|
+ this.postChartData(
|
|
|
+ "faultUnitChart",
|
|
|
+ row,
|
|
|
+ itemAnalysis,
|
|
|
+ itemField,
|
|
|
+ filterAnalysis,
|
|
|
+ "generalFiles"
|
|
|
+ )
|
|
|
+ )
|
|
|
+ );
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (itemField.engineTypeCode === "total_fault_result") {
|
|
|
+ tasks.push(
|
|
|
+ limit(() =>
|
|
|
+ this.postChartData(
|
|
|
+ "faultAllChart",
|
|
|
+ row,
|
|
|
+ itemAnalysis,
|
|
|
+ itemField,
|
|
|
+ filterAnalysis,
|
|
|
+ "generalFiles"
|
|
|
+ )
|
|
|
+ )
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (filterAnalysis.typeCode === "production_indicator") {
|
|
|
+ //总图全场
|
|
|
+ if (
|
|
|
+ itemField.fileAddr.includes(
|
|
|
+ filterAnalysis.generalFiles.FileTypeFromUrl
|
|
|
)
|
|
|
- )
|
|
|
- );
|
|
|
+ ) {
|
|
|
+ tasks.push(
|
|
|
+ limit(() =>
|
|
|
+ this.postChartData(
|
|
|
+ filterAnalysis.generalFiles.urlType,
|
|
|
+ row,
|
|
|
+ itemAnalysis,
|
|
|
+ itemField,
|
|
|
+ filterAnalysis,
|
|
|
+ "generalFiles"
|
|
|
+ )
|
|
|
+ )
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ tasks.push(
|
|
|
+ limit(() =>
|
|
|
+ this.postChartData(
|
|
|
+ "radarChart",
|
|
|
+ row,
|
|
|
+ itemAnalysis,
|
|
|
+ itemField,
|
|
|
+ filterAnalysis,
|
|
|
+ "generalFiles"
|
|
|
+ )
|
|
|
+ )
|
|
|
+ );
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ tasks.push(
|
|
|
+ limit(() =>
|
|
|
+ this.postChartData(
|
|
|
+ filterAnalysis.generalFiles.urlType,
|
|
|
+ row,
|
|
|
+ itemAnalysis,
|
|
|
+ itemField,
|
|
|
+ filterAnalysis,
|
|
|
+ "generalFiles"
|
|
|
+ )
|
|
|
+ )
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
if (itemAnalysis.diagramRelations) {
|
|
|
for (const itemField of filterAnalysis.filterFileAddr
|
|
|
? itemAnalysis.diagramRelations
|
|
@@ -670,38 +795,120 @@ export default {
|
|
|
? filterAnalysis.diagramRelations.urlType[0]
|
|
|
: filterAnalysis.diagramRelations.urlType[1]
|
|
|
: filterAnalysis.diagramRelations.urlType;
|
|
|
-
|
|
|
+ // console.log("urlType", filterAnalysis.typeName, urlType);
|
|
|
tasks.push(
|
|
|
limit(() =>
|
|
|
- this.postChartData(urlType, row, itemAnalysis, itemField)
|
|
|
+ this.postChartData(
|
|
|
+ urlType,
|
|
|
+ row,
|
|
|
+ itemAnalysis,
|
|
|
+ itemField,
|
|
|
+ filterAnalysis,
|
|
|
+ "diagramRelations"
|
|
|
+ )
|
|
|
)
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
await Promise.all(tasks);
|
|
|
+
|
|
|
+ const wordFilePath = await axios.post(
|
|
|
+ "/downLoadChart/chartServer/charts/CopyFileCsv",
|
|
|
+ {
|
|
|
+ fieldInfo: this.fieldInfo,
|
|
|
+ bucketName: "bucket-zhzn",
|
|
|
+ objectName: `charts/${row.fieldCode}/${row.batchCode}`,
|
|
|
+ ...this.fileDataList,
|
|
|
+ }
|
|
|
+ );
|
|
|
+ // //下载minio 文件
|
|
|
+ downloadDocx(wordFilePath.data.data.url, wordFilePath.data.data.fileName);
|
|
|
+
|
|
|
+ console.log("生成成功:", this.fileDataList);
|
|
|
console.log("全部图表生成请求已完成");
|
|
|
},
|
|
|
|
|
|
- async postChartData(urlType, row, itemAnalysis, itemField) {
|
|
|
+ async postChartData(
|
|
|
+ urlType,
|
|
|
+ row,
|
|
|
+ itemAnalysis,
|
|
|
+ itemField,
|
|
|
+ filterAnalysis,
|
|
|
+ typeChart
|
|
|
+ ) {
|
|
|
try {
|
|
|
+ const objectname =
|
|
|
+ itemAnalysis.analysisTypeCode === "temperature_large_components"
|
|
|
+ ? filterAnalysis.filterFileAddr +
|
|
|
+ "/" +
|
|
|
+ itemField.fieldEngineName +
|
|
|
+ ".jpg"
|
|
|
+ : urlType + itemField.fieldEngineName + ".jpg" ||
|
|
|
+ urlType + itemField.engineTypeCode + ".jpg";
|
|
|
const res = await axios.post(
|
|
|
`/downLoadChart/chartServer/charts/${urlType}`,
|
|
|
{
|
|
|
- fieldEngineCode: "WOG00623",
|
|
|
- bucketName: `${row.fieldCode}/${row.batchCode}/${itemAnalysis.analysisTypeCode}`,
|
|
|
- objectName: itemField.fieldEngineName || itemField.engineTypeCode,
|
|
|
+ fieldEngineCode: itemField.fieldEngineCode,
|
|
|
+ bucketName: "bucket-zhzn",
|
|
|
+ objectName:
|
|
|
+ `charts/${row.fieldCode}/${row.batchCode}/${itemAnalysis.analysisTypeCode}/` +
|
|
|
+ objectname,
|
|
|
fieldInfo: this.fieldInfo,
|
|
|
fileAddr: itemField.fileAddr,
|
|
|
+ chartType:
|
|
|
+ filterAnalysis.typeDocxName === "production_indicator_unit"
|
|
|
+ ? "radar"
|
|
|
+ : urlType,
|
|
|
}
|
|
|
);
|
|
|
- console.log("生成成功:", res);
|
|
|
+ let key = `zn-techcn-replace-tags-${filterAnalysis.typeDocxName}-${typeChart}`;
|
|
|
+ if (urlType === "yawErrorBarSumChart") {
|
|
|
+ key = `zn-techcn-replace-tags-${filterAnalysis.typeDocxName}-generalFiles2`;
|
|
|
+
|
|
|
+ if (!this.fileDataList["yawErrorRows"]) {
|
|
|
+ this.$set(this.fileDataList, "yawErrorRows", []); // Vue 2 中响应式设置对象属性
|
|
|
+ }
|
|
|
+ this.fileDataList["yawErrorRows"] = res?.data?.data?.data;
|
|
|
+ } else if (urlType === "yawErrorChart") {
|
|
|
+ key = `zn-techcn-replace-tags-${filterAnalysis.typeDocxName}-generalFiles1`;
|
|
|
+ }
|
|
|
+ if (filterAnalysis.typeDocxName === "production_indicator_all") {
|
|
|
+ if (!this.fileDataList["rows"]) {
|
|
|
+ this.$set(this.fileDataList, "rows", []); // Vue 2 中响应式设置对象属性
|
|
|
+ }
|
|
|
+ this.fileDataList["rows"] = res?.data?.data?.data;
|
|
|
+ }
|
|
|
+ //
|
|
|
+ if (itemField.engineTypeCode === "total_fault_result") {
|
|
|
+ if (!this.fileDataList["faultRows"]) {
|
|
|
+ this.$set(this.fileDataList, "faultRows", []); // Vue 2 中响应式设置对象属性
|
|
|
+ }
|
|
|
+ this.fileDataList["faultRows"] = res?.data?.data?.data;
|
|
|
+ }
|
|
|
+ if (itemField.engineTypeCode === "turbine_fault_result") {
|
|
|
+ if (!this.fileDataList["windTurbineRows"]) {
|
|
|
+ this.$set(this.fileDataList, "windTurbineRows", []); // Vue 2 中响应式设置对象属性
|
|
|
+ }
|
|
|
+ this.fileDataList["windTurbineRows"] = res?.data?.data?.data;
|
|
|
+ }
|
|
|
+ if (filterAnalysis.typeDocxName === "production_indicator_unit") {
|
|
|
+ if (!this.fileDataList[key]) {
|
|
|
+ this.$set(this.fileDataList, key, []); // Vue 2 中响应式设置对象属性
|
|
|
+ }
|
|
|
+ res?.data?.data?.imageUrls.map((imgval) => {
|
|
|
+ this.fileDataList[key].push(imgval);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (!this.fileDataList[key]) {
|
|
|
+ this.$set(this.fileDataList, key, []); // Vue 2 中响应式设置对象属性
|
|
|
+ }
|
|
|
+ this.fileDataList[key].push(res?.data?.data?.imageUrl);
|
|
|
+ }
|
|
|
} catch (err) {
|
|
|
console.error("生成失败:", err);
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
getFileTypeFromUrl(url, keyword) {
|
|
|
return url.includes(keyword) ? keyword : "Unknown";
|
|
|
},
|