|
@@ -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";
|
|
@@ -554,38 +555,52 @@ export default {
|
|
|
// const diagramRelations = [
|
|
|
// {
|
|
|
// batchCode: "WOF039800012-WOB000001",
|
|
|
- // analysisTypeCode: "production_indicator",
|
|
|
- // analysisTypeName: "机组指标",
|
|
|
+ // fieldEngineCode: "WOG00604",
|
|
|
+ // fieldEngineName: "#01",
|
|
|
+ // analysisTypeCode: "power_curve",
|
|
|
+ // analysisTypeName: null,
|
|
|
// fileAddr:
|
|
|
- // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/production_indicator/manual/WT2000%252F93-production-indicator.csv",
|
|
|
+ // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/power_curve/manual/power_curve-%2301.json",
|
|
|
// autoAnalysis: null,
|
|
|
- // createTime: "2025-01-21 16:35:46",
|
|
|
- // engineTypeCode: "WEM00012",
|
|
|
+ // 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",
|
|
|
// },
|
|
|
- // // {
|
|
|
- // // batchCode: "WOF039800012-WOB000001",
|
|
|
- // // analysisTypeCode: "production_indicator",
|
|
|
- // // analysisTypeName: "机组指标",
|
|
|
- // // fileAddr:
|
|
|
- // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/production_indicator/manual/WT2000%252F100-production-indicator.csv",
|
|
|
- // // autoAnalysis: null,
|
|
|
- // // createTime: "2025-01-21 16:35:46",
|
|
|
- // // engineTypeCode: "WEM00013",
|
|
|
- // // },
|
|
|
- // // {
|
|
|
- // // batchCode: "WOF039800012-WOB000001",
|
|
|
- // // analysisTypeCode: "production_indicator",
|
|
|
- // // analysisTypeName: "机组指标",
|
|
|
- // // fileAddr:
|
|
|
- // // "http://192.168.50.233:6900/wof039800012/WOF039800012-WOB000001/production_indicator/manual/WT2000%252F110-production-indicator.csv",
|
|
|
- // // autoAnalysis: null,
|
|
|
- // // createTime: "2025-01-21 16:35:46",
|
|
|
- // // engineTypeCode: "WEM00018",
|
|
|
- // // },
|
|
|
// ];
|
|
|
// diagramRelations.map(async (item) => {
|
|
|
// const res = await axios.post(
|
|
|
- // "/downLoadChart/chartServer/charts/radarChart",
|
|
|
+ // "/downLoadChart/chartServer/charts/PlotlyChartsFen",
|
|
|
// {
|
|
|
// fieldEngineCode: item.fieldEngineCode ? item.fieldEngineCode : "", //lineChartFen
|
|
|
// bucketName: "bucket-zhzn",
|
|
@@ -593,7 +608,8 @@ export default {
|
|
|
// objectName: "charts/111.jpg", //在 MinIO 中的文件名
|
|
|
// fieldInfo: this.fieldInfo,
|
|
|
// fileAddr: item.fileAddr,
|
|
|
- // chartType: "radar",
|
|
|
+ // // 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
|
|
@@ -619,26 +635,26 @@ export default {
|
|
|
// );
|
|
|
// });
|
|
|
|
|
|
- // 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",
|
|
|
- // ],
|
|
|
- // });
|
|
|
+ // // 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",
|
|
|
+ // // ],
|
|
|
+ // // });
|
|
|
// },
|
|
|
|
|
|
// 获取 风机信息
|
|
@@ -646,7 +662,7 @@ export default {
|
|
|
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) {
|
|
@@ -797,10 +813,17 @@ export default {
|
|
|
}
|
|
|
await Promise.all(tasks);
|
|
|
|
|
|
- await axios.post("/downLoadChart/chartServer/charts/CopyFileCsv", {
|
|
|
- fieldInfo: this.fieldInfo,
|
|
|
- ...this.fileDataList,
|
|
|
- });
|
|
|
+ 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("全部图表生成请求已完成");
|