|
|
@@ -1,15 +1,5 @@
|
|
|
<template>
|
|
|
<div class="global-variable">
|
|
|
- <!-- tab 切换 -->
|
|
|
- <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
- <el-tab-pane
|
|
|
- v-for="item in menuItems"
|
|
|
- :key="item.component"
|
|
|
- :label="item.name"
|
|
|
- :name="item.component"
|
|
|
- />
|
|
|
- </el-tabs>
|
|
|
-
|
|
|
<!-- 查询条件 -->
|
|
|
<div class="searchbox">
|
|
|
<p>
|
|
|
@@ -18,9 +8,9 @@
|
|
|
size="small"
|
|
|
style="width: 180px"
|
|
|
placeholder="请选择所属公司"
|
|
|
- :list="tabConditions[activeTab].parentOpt"
|
|
|
+ :list="queryCondition.parentOpt"
|
|
|
type="1"
|
|
|
- v-model="tabConditions[activeTab].companyCode"
|
|
|
+ v-model="queryCondition.companyCode"
|
|
|
@change="parentChange"
|
|
|
:defaultParentProps="{
|
|
|
children: 'children',
|
|
|
@@ -34,12 +24,12 @@
|
|
|
<el-select
|
|
|
size="small"
|
|
|
style="width: 150px"
|
|
|
- v-model="tabConditions[activeTab].unitvalue"
|
|
|
- @change="getchedian"
|
|
|
+ v-model="queryCondition.unitvalue"
|
|
|
+ @change="onUnitChange"
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in tabConditions[activeTab].unitoptions"
|
|
|
+ v-for="item in queryCondition.unitoptions"
|
|
|
:key="item.engineCode"
|
|
|
:label="item.engineName"
|
|
|
:value="item.engineCode"
|
|
|
@@ -47,45 +37,10 @@
|
|
|
</el-select>
|
|
|
</p>
|
|
|
<p>
|
|
|
- 测点:
|
|
|
- <el-select
|
|
|
- v-model="tabConditions[activeTab].monitoringvalue"
|
|
|
- size="small"
|
|
|
- clearable
|
|
|
- placeholder="请选择"
|
|
|
- :disabled="activeTab === 'Temperature'"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in tabConditions[activeTab].monitoringoptions"
|
|
|
- :key="item.itemKey"
|
|
|
- :label="item.itemValue"
|
|
|
- :value="item.itemKey"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </p>
|
|
|
-
|
|
|
- <!-- <p>
|
|
|
- 采样频率:
|
|
|
- <el-select
|
|
|
- v-model="tabConditions[activeTab].frequencyvalue"
|
|
|
- size="small"
|
|
|
- clearable
|
|
|
- placeholder="请选择"
|
|
|
- :disabled="activeTab === 'Temperature'"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in tabConditions[activeTab].frequencyoptions"
|
|
|
- :key="item"
|
|
|
- :label="item"
|
|
|
- :value="item"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </p> -->
|
|
|
- <p>
|
|
|
时间:
|
|
|
<el-date-picker
|
|
|
size="small"
|
|
|
- v-model="tabConditions[activeTab].timevalue"
|
|
|
+ v-model="queryCondition.timevalue"
|
|
|
type="datetimerange"
|
|
|
:picker-options="pickerOptions"
|
|
|
range-separator="至"
|
|
|
@@ -102,6 +57,15 @@
|
|
|
>查询</el-button
|
|
|
>
|
|
|
</div>
|
|
|
+ <!-- tab 切换 -->
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
+ <el-tab-pane
|
|
|
+ v-for="item in menuItems"
|
|
|
+ :key="item.component"
|
|
|
+ :label="item.name"
|
|
|
+ :name="item.component"
|
|
|
+ />
|
|
|
+ </el-tabs>
|
|
|
|
|
|
<!-- 动态组件内容 -->
|
|
|
<div class="main-body">
|
|
|
@@ -117,8 +81,9 @@
|
|
|
"
|
|
|
:totalCount="tabData[activeTab].totalCount"
|
|
|
:totalPage="tabData[activeTab].totalPage"
|
|
|
- :fieldCode="tabConditions[activeTab].companyCode"
|
|
|
- :windTurbineNumber="tabConditions[activeTab].unitvalue"
|
|
|
+ :echartsdata="tabData[activeTab].echartsdata"
|
|
|
+ :fieldCode="queryCondition.companyCode"
|
|
|
+ :windTurbineNumber="queryCondition.unitvalue"
|
|
|
@updatePage="handlePageChange"
|
|
|
/>
|
|
|
</keep-alive>
|
|
|
@@ -132,7 +97,6 @@ import * as XLSX from "xlsx";
|
|
|
import {
|
|
|
getSysOrganizationAuthTreeByRoleId,
|
|
|
windEngineGrouPage,
|
|
|
- queryDetectionDic,
|
|
|
} from "@/api/ledger.js";
|
|
|
import selecttree from "../../components/selecttree.vue";
|
|
|
import Bearing from "./components/malfunction/bearing.vue";
|
|
|
@@ -228,17 +192,35 @@ export default {
|
|
|
Loose: {},
|
|
|
Temperature: {},
|
|
|
},
|
|
|
+ // 查询条件放在 tab 之上:全局共享,不随 tab 切换清空
|
|
|
+ queryCondition: {
|
|
|
+ unitvalue: "",
|
|
|
+ unitoptions: [],
|
|
|
+ companyCode: "",
|
|
|
+ parentOpt: [],
|
|
|
+ timevalue: [],
|
|
|
+ },
|
|
|
tabData: {
|
|
|
- Bearing: { codedata: [], totalCount: 0, totalPage: 0 },
|
|
|
- Gear: { codedata: [], totalCount: 0, totalPage: 0 },
|
|
|
- Dissymmetry: { codedata: [], totalCount: 0, totalPage: 0 },
|
|
|
- Misalignment: { codedata: [], totalCount: 0, totalPage: 0 },
|
|
|
- Loose: { codedata: [], totalCount: 0, totalPage: 0 },
|
|
|
+ Bearing: { codedata: [], totalCount: 0, totalPage: 0, echartsdata: [] },
|
|
|
+ Gear: { codedata: [], totalCount: 0, totalPage: 0, echartsdata: [] },
|
|
|
+ Dissymmetry: {
|
|
|
+ codedata: [],
|
|
|
+ totalCount: 0,
|
|
|
+ totalPage: 0,
|
|
|
+ echartsdata: [],
|
|
|
+ },
|
|
|
+ Misalignment: {
|
|
|
+ codedata: [],
|
|
|
+ totalCount: 0,
|
|
|
+ totalPage: 0,
|
|
|
+ echartsdata: [],
|
|
|
+ },
|
|
|
+ Loose: { codedata: [], totalCount: 0, totalPage: 0, echartsdata: [] },
|
|
|
Temperature: {
|
|
|
codedata: [],
|
|
|
totalCount: 0,
|
|
|
totalPage: 0,
|
|
|
- echartsdata: {},
|
|
|
+ echartsdata: [],
|
|
|
},
|
|
|
},
|
|
|
datePickerOptions: {
|
|
|
@@ -274,6 +256,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getFunctionTypeByTab(tab) {
|
|
|
+ // 1:轴承诊断;2:齿轮诊断;3:不对中;4:不平衡;5:松动
|
|
|
+ const map = {
|
|
|
+ Bearing: "1",
|
|
|
+ Gear: "2",
|
|
|
+ Dissymmetry: "3",
|
|
|
+ Misalignment: "4",
|
|
|
+ Loose: "5",
|
|
|
+ };
|
|
|
+ return map[tab] || "";
|
|
|
+ },
|
|
|
defaultCondition() {
|
|
|
return {
|
|
|
unitvalue: "",
|
|
|
@@ -281,10 +274,6 @@ export default {
|
|
|
companyCode: "",
|
|
|
parentOpt: [],
|
|
|
timevalue: [],
|
|
|
- monitoringvalue: "",
|
|
|
- monitoringoptions: [],
|
|
|
- frequencyvalue: "",
|
|
|
- frequencyoptions: [],
|
|
|
};
|
|
|
},
|
|
|
handleClick(tab) {
|
|
|
@@ -295,10 +284,7 @@ export default {
|
|
|
const res = await getSysOrganizationAuthTreeByRoleId();
|
|
|
const treedata = res.data;
|
|
|
const processed = this.processTreeData(treedata);
|
|
|
-
|
|
|
- for (const key in this.tabConditions) {
|
|
|
- this.tabConditions[key].parentOpt = processed;
|
|
|
- }
|
|
|
+ this.queryCondition.parentOpt = processed;
|
|
|
},
|
|
|
|
|
|
// demo演示所需,必要时可删除
|
|
|
@@ -307,67 +293,21 @@ export default {
|
|
|
const treedata = res.data;
|
|
|
const processed = this.processTreeData(treedata);
|
|
|
|
|
|
- for (const key in this.tabConditions) {
|
|
|
- const tab = this.tabConditions[key];
|
|
|
- tab.parentOpt = processed;
|
|
|
-
|
|
|
- // 默认公司
|
|
|
- tab.companyCode = "WOF046400029";
|
|
|
-
|
|
|
- // 默认风机列表和选中值
|
|
|
- tab.unitoptions = [{ engineCode: "WOG01315", engineName: "#37" }];
|
|
|
- tab.unitvalue = "WOG01315";
|
|
|
-
|
|
|
- // 默认测点列表和选中值
|
|
|
- if (key === "Gear") {
|
|
|
- // Gear tab:保留主轴承 + 齿轮箱测点
|
|
|
- this.$set(tab, "monitoringoptions", [
|
|
|
- {
|
|
|
- itemKey: "gearbox_first_stage_planet_large_ring_radial_vibration",
|
|
|
- itemValue: "齿轮箱一级行星级大齿圈径向振动",
|
|
|
- },
|
|
|
- ]);
|
|
|
- this.$set(
|
|
|
- tab,
|
|
|
- "monitoringvalue",
|
|
|
- "gearbox_first_stage_planet_large_ring_radial_vibration",
|
|
|
- );
|
|
|
- } else {
|
|
|
- // 其他 tab:只保留主轴承测点
|
|
|
- this.$set(tab, "monitoringoptions", [
|
|
|
- {
|
|
|
- itemKey: "main_bearing_radial_horizontal_vibration",
|
|
|
- itemValue: "主轴承径向水平振动",
|
|
|
- },
|
|
|
- ]);
|
|
|
- this.$set(
|
|
|
- tab,
|
|
|
- "monitoringvalue",
|
|
|
- "main_bearing_radial_horizontal_vibration",
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- // 默认采样频率
|
|
|
- tab.frequencyoptions = ["12800", "25600", "51200"];
|
|
|
- tab.frequencyvalue = "12800";
|
|
|
-
|
|
|
- // 默认时间范围
|
|
|
- tab.timevalue = [
|
|
|
- new Date("2024-07-01 00:00:00"),
|
|
|
- new Date("2024-12-31 00:00:00"),
|
|
|
- ];
|
|
|
- }
|
|
|
-
|
|
|
- this.$nextTick(() => {
|
|
|
- this.tabConditions[this.activeTab].companyCode = "WOF046400029";
|
|
|
- });
|
|
|
+ this.queryCondition.parentOpt = processed;
|
|
|
+ this.queryCondition.companyCode = "WOF046400029";
|
|
|
+ this.queryCondition.unitoptions = [
|
|
|
+ { engineCode: "WOG01315", engineName: "#37" },
|
|
|
+ ];
|
|
|
+ this.queryCondition.unitvalue = "WOG01315";
|
|
|
+ this.queryCondition.timevalue = [
|
|
|
+ new Date("2024-07-01 00:00:00"),
|
|
|
+ new Date("2024-12-31 00:00:00"),
|
|
|
+ ];
|
|
|
},
|
|
|
parentChange(data) {
|
|
|
- const condition = this.tabConditions[this.activeTab];
|
|
|
+ const condition = this.queryCondition;
|
|
|
if (!data?.codeNumber) return;
|
|
|
condition.unitvalue = "";
|
|
|
- condition.monitoringvalue = "";
|
|
|
- condition.frequencyvalue = "";
|
|
|
|
|
|
windEngineGrouPage({
|
|
|
fieldCode: data.codeNumber,
|
|
|
@@ -377,45 +317,10 @@ export default {
|
|
|
condition.unitoptions = res.data.list;
|
|
|
});
|
|
|
|
|
|
- axios
|
|
|
- .get(`/ETLapi/waveData/getAllSamplingFrequency/${data.codeNumber}`)
|
|
|
- .then((res) => {
|
|
|
- condition.frequencyoptions = (res.data.datas || [])
|
|
|
- .map((item) => Number(item))
|
|
|
- .filter((num) => num >= 2000)
|
|
|
- .map((num) => num.toString());
|
|
|
- });
|
|
|
-
|
|
|
condition.companyCode = data.codeNumber;
|
|
|
},
|
|
|
- getchedian(value) {
|
|
|
- const condition = this.tabConditions[this.activeTab];
|
|
|
- const companyCode = condition.companyCode;
|
|
|
-
|
|
|
- axios
|
|
|
- .post(`/ETLapi/waveData/getAllMesurePointName/${companyCode}/${value}`)
|
|
|
- .then((res) => {
|
|
|
- condition.monitoringvalue = "";
|
|
|
- if (res.data.code === 500) {
|
|
|
- condition.monitoringoptions = [];
|
|
|
- this.$message({
|
|
|
- message: "当前风场不存在测点和采样频率数据" || "未知错误",
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- if (res.data.code === 200) {
|
|
|
- const datas = Array.isArray(res.data.datas) ? res.data.datas : [];
|
|
|
- condition.monitoringoptions = datas;
|
|
|
- if (datas.length === 0) {
|
|
|
- this.$message({ message: "暂无数据", type: "warning" });
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.error("测点请求失败:", err);
|
|
|
- condition.monitoringoptions = [];
|
|
|
- });
|
|
|
+ onUnitChange() {
|
|
|
+ // 已移除“测点/采样频率”筛选逻辑:风机切换仅更新选中值
|
|
|
},
|
|
|
processTreeData(treeData) {
|
|
|
const processedData = [];
|
|
|
@@ -434,130 +339,136 @@ export default {
|
|
|
return processedData;
|
|
|
},
|
|
|
onSearchClick() {
|
|
|
- this.conditions(1, false); // 主动查询,第一页,非分页触发
|
|
|
+ // 主动查询:一次拉取所有 tab 的第一页数据
|
|
|
+ this.menuItems.forEach((item) => {
|
|
|
+ this.fetchTabData(item.component, 1, false);
|
|
|
+ });
|
|
|
},
|
|
|
handlePageChange(page) {
|
|
|
- this.conditions(page, true); // true 表示分页触发
|
|
|
+ this.fetchTabData(this.activeTab, page, true); // 分页只作用当前 tab
|
|
|
},
|
|
|
+ fetchTabData(tab, page, isPageChange = false) {
|
|
|
+ const condition = this.queryCondition;
|
|
|
+ if (
|
|
|
+ !condition.companyCode ||
|
|
|
+ !condition.unitvalue ||
|
|
|
+ !condition.timevalue?.length
|
|
|
+ ) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- conditions(page, isPageChange = false) {
|
|
|
- const tab = this.activeTab;
|
|
|
- this.$nextTick(() => {
|
|
|
- const comp = this.$refs.activeComponent;
|
|
|
- if (comp && typeof comp.reset === "function") {
|
|
|
- comp.reset();
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- // 把后面接口请求部分放进延迟里,确保 reset 先执行完成
|
|
|
- setTimeout(() => {
|
|
|
- const condition = this.tabConditions[tab];
|
|
|
-
|
|
|
- if (tab === "Temperature") {
|
|
|
- const temperature = {
|
|
|
- windCode: condition.companyCode,
|
|
|
- windTurbineNumberList: [condition.unitvalue],
|
|
|
- startTime: this.$formatDateTWO(condition.timevalue[0]),
|
|
|
- endTime: this.$formatDateTWO(condition.timevalue[1]),
|
|
|
- pageNo: page,
|
|
|
- pageSize: 500,
|
|
|
- };
|
|
|
-
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: "温度诊断数据加载中,请稍候…",
|
|
|
- spinner: "el-icon-loading",
|
|
|
- background: "rgba(0, 0, 0, 0.8)",
|
|
|
- });
|
|
|
+ if (tab === "Temperature") {
|
|
|
+ const temperature = {
|
|
|
+ windCode: condition.companyCode,
|
|
|
+ windTurbineNumberList: [condition.unitvalue],
|
|
|
+ startTime: this.$formatDateTWO(condition.timevalue[0]),
|
|
|
+ endTime: this.$formatDateTWO(condition.timevalue[1]),
|
|
|
+ pageNo: page,
|
|
|
+ pageSize: 500,
|
|
|
+ };
|
|
|
+
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "温度诊断数据加载中,请稍候…",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.8)",
|
|
|
+ });
|
|
|
|
|
|
- const emptyEchartsData = {
|
|
|
- gearbox_oil: { timestamps: [], values: [] },
|
|
|
- generator_drive_end: { timestamps: [], values: [] },
|
|
|
- generator_nondrive_end: { timestamps: [], values: [] },
|
|
|
- main_bearing: { timestamps: [], values: [] },
|
|
|
- };
|
|
|
-
|
|
|
- const trendRequest = () => {
|
|
|
- const trendStart = performance.now();
|
|
|
- return axios
|
|
|
- .post("/AnalysisMulti/SPRT/trend", temperature)
|
|
|
- .then((res) => {
|
|
|
- const trendEnd = performance.now();
|
|
|
- console.log(
|
|
|
- `温度诊断 trend 接口耗时: ${(
|
|
|
- (trendEnd - trendStart) /
|
|
|
- 1000
|
|
|
- ).toFixed(2)}s`,
|
|
|
- );
|
|
|
- const echartsdata = res.data.data || {};
|
|
|
- this.tabData[tab].echartsdata = echartsdata;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.error("趋势图请求失败:", err);
|
|
|
- this.$message.error("温度趋势图数据请求失败,请稍后再试");
|
|
|
- });
|
|
|
- };
|
|
|
-
|
|
|
- const thresholdStart = performance.now();
|
|
|
- const thresholdReq = axios
|
|
|
- .post("/AnalysisMulti/temperature/threshold", temperature)
|
|
|
+ const emptyEchartsData = {
|
|
|
+ gearbox_oil: { timestamps: [], values: [] },
|
|
|
+ generator_drive_end: { timestamps: [], values: [] },
|
|
|
+ generator_nondrive_end: { timestamps: [], values: [] },
|
|
|
+ main_bearing: { timestamps: [], values: [] },
|
|
|
+ };
|
|
|
+
|
|
|
+ const trendRequest = () => {
|
|
|
+ const trendStart = performance.now();
|
|
|
+ return axios
|
|
|
+ .post("/AnalysisMulti/SPRT/trend", temperature)
|
|
|
.then((res) => {
|
|
|
- const thresholdEnd = performance.now();
|
|
|
+ const trendEnd = performance.now();
|
|
|
console.log(
|
|
|
- `温度诊断 threshold 接口耗时: ${(
|
|
|
- (thresholdEnd - thresholdStart) /
|
|
|
+ `温度诊断 trend 接口耗时: ${(
|
|
|
+ (trendEnd - trendStart) /
|
|
|
1000
|
|
|
).toFixed(2)}s`,
|
|
|
);
|
|
|
-
|
|
|
- const data = res.data.data.records || [];
|
|
|
- this.tabData[tab].codedata = data;
|
|
|
- this.tabData[tab].totalCount = res.data.data.totalSize || 0;
|
|
|
-
|
|
|
- if (!data.length) {
|
|
|
- this.$message.warning("暂无诊断数据");
|
|
|
- this.tabData[tab].echartsdata = emptyEchartsData;
|
|
|
- return Promise.resolve("skip trend");
|
|
|
- }
|
|
|
-
|
|
|
- return isPageChange ? Promise.resolve() : trendRequest();
|
|
|
+ const echartsdata = res.data.data || {};
|
|
|
+ this.tabData[tab].echartsdata = echartsdata;
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
- console.error("温度诊断请求失败:", err);
|
|
|
- this.$message.error("温度诊断数据请求失败,请稍后再试");
|
|
|
+ console.error("趋势图请求失败:", err);
|
|
|
+ this.$message.error("温度趋势图数据请求失败,请稍后再试");
|
|
|
});
|
|
|
+ };
|
|
|
+ const thresholdStart = performance.now();
|
|
|
+ const thresholdReq = axios
|
|
|
+ .post("/AnalysisMulti/temperature/threshold", temperature)
|
|
|
+ .then((res) => {
|
|
|
+ const thresholdEnd = performance.now();
|
|
|
+ console.log(
|
|
|
+ `温度诊断 threshold 接口耗时: ${(
|
|
|
+ (thresholdEnd - thresholdStart) /
|
|
|
+ 1000
|
|
|
+ ).toFixed(2)}s`,
|
|
|
+ );
|
|
|
+
|
|
|
+ const data = res.data.data.records || [];
|
|
|
+ this.tabData[tab].codedata = data;
|
|
|
+ this.tabData[tab].totalCount = res.data.data.totalSize || 0;
|
|
|
+
|
|
|
+ if (!data.length) {
|
|
|
+ this.$message.warning("暂无诊断数据");
|
|
|
+ this.tabData[tab].echartsdata = emptyEchartsData;
|
|
|
+ return Promise.resolve("skip trend");
|
|
|
+ }
|
|
|
|
|
|
- Promise.resolve(thresholdReq).finally(() => {
|
|
|
- loading.close();
|
|
|
+ return isPageChange ? Promise.resolve() : trendRequest();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error("温度诊断请求失败:", err);
|
|
|
+ this.$message.error("温度诊断数据请求失败,请稍后再试");
|
|
|
});
|
|
|
- } else {
|
|
|
- const params = {
|
|
|
- samplingFrequency: condition.frequencyvalue,
|
|
|
- windCode: condition.companyCode,
|
|
|
- windTurbineNumberList: [condition.unitvalue],
|
|
|
- mesureNameList: [condition.monitoringvalue],
|
|
|
- startTime: this.$formatDateTWO(condition.timevalue[0]),
|
|
|
- endTime: this.$formatDateTWO(condition.timevalue[1]),
|
|
|
- pageNo: page,
|
|
|
- pageSize: 10,
|
|
|
- };
|
|
|
-
|
|
|
- const startTime = performance.now();
|
|
|
- axios
|
|
|
- .post("/ETLapi/waveData/getMesureDataWithSF", params)
|
|
|
- .then((res) => {
|
|
|
- const endTime = performance.now();
|
|
|
- console.log(
|
|
|
- `其他 tab 接口请求耗时: ${(endTime - startTime).toFixed(2)}ms`,
|
|
|
- );
|
|
|
|
|
|
- const data = res.data || {};
|
|
|
- this.tabData[tab].codedata = data.datas || [];
|
|
|
- this.tabData[tab].totalCount = data.totalCount || 0;
|
|
|
- this.tabData[tab].totalPage = data.totalPage || 0;
|
|
|
- });
|
|
|
- }
|
|
|
- }, 300); // 延迟100毫秒执行接口请求逻辑
|
|
|
+ Promise.resolve(thresholdReq).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const params = {
|
|
|
+ windCode: condition.companyCode,
|
|
|
+ windTurbineNumber: condition.unitvalue,
|
|
|
+ startTime: this.$formatDateTWO(condition.timevalue[0]),
|
|
|
+ endTime: this.$formatDateTWO(condition.timevalue[1]),
|
|
|
+ functionType: this.getFunctionTypeByTab(tab),
|
|
|
+ pageNo: page,
|
|
|
+ isAsc: true,
|
|
|
+ pageSize: 10,
|
|
|
+ };
|
|
|
+
|
|
|
+ const startTime = performance.now();
|
|
|
+ //请求tab 接口数据
|
|
|
+ axios
|
|
|
+ .post("/transDataWeb/waveData/getByFunctionTypeInData", params)
|
|
|
+ .then((res) => {
|
|
|
+ const endTime = performance.now();
|
|
|
+ console.log(
|
|
|
+ `其他 tab 接口请求耗时: ${(endTime - startTime).toFixed(2)}ms`,
|
|
|
+ );
|
|
|
+
|
|
|
+ const data = res.data || {};
|
|
|
+ this.tabData[tab].codedata = data.datas || [];
|
|
|
+ this.tabData[tab].totalCount = data.totalCount || 0;
|
|
|
+ this.tabData[tab].totalPage = data.totalPage || 0;
|
|
|
+ });
|
|
|
+
|
|
|
+ axios
|
|
|
+ .post("/transDataWeb/waveData/getByFunctionTypeInDataSummary", params)
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res.data, "res.data.data");
|
|
|
+ const data = res.data.datas || [];
|
|
|
+ this.tabData[tab].echartsdata = data;
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
};
|