Browse Source

fix: 修复图表问题

feature-v1.0.0
panyuyi 1 month ago
parent
commit
d36b0818a2
  1. 1
      src/api/axios/axiosCancel.ts
  2. 12
      src/views/Main/Dike/components/DataStatistics.vue
  3. 13
      src/views/Main/Reservoir/components/DataStatistics.vue
  4. 12
      src/views/Main/Sluice/components/DataStatistics.vue

1
src/api/axios/axiosCancel.ts

@ -22,6 +22,7 @@ export class AxiosCanceler {
if (url.indexOf('preview/capture') > 0) return; // 忽略 重复请求获取预览取流地址 if (url.indexOf('preview/capture') > 0) return; // 忽略 重复请求获取预览取流地址
if (url.indexOf('/sy-engine-backer/cameraInfo/') > 0) return; // 忽略 重复请求获取预览取流地址 if (url.indexOf('/sy-engine-backer/cameraInfo/') > 0) return; // 忽略 重复请求获取预览取流地址
if (url.indexOf('/run/statistic/chart') > 0) return; if (url.indexOf('/run/statistic/chart') > 0) return;
if (url.indexOf('/monitor/chart') > 0) return;
// 上传接口忽略重复请求 // 上传接口忽略重复请求
if (!url.includes('oss')) { if (!url.includes('oss')) {

12
src/views/Main/Dike/components/DataStatistics.vue

@ -270,8 +270,8 @@ function getEchartsData() {
mpcd: cascaderArr.value[1] || "", mpcd: cascaderArr.value[1] || "",
elementType: "C_SEEPAGE_FLOW", elementType: "C_SEEPAGE_FLOW",
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
initChart(res.data, echart1, echartsRef1.value); initChart(res, echart1, echartsRef1.value);
} }
}); });
// //
@ -282,8 +282,8 @@ function getEchartsData() {
stcd: cascaderArr.value[0] || "", stcd: cascaderArr.value[0] || "",
elementType: "C_DISPLACEMENT", elementType: "C_DISPLACEMENT",
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
initChart(res.data, echart2, echartsRef2.value); initChart(res, echart2, echartsRef2.value);
} }
}); });
// //
@ -294,8 +294,8 @@ function getEchartsData() {
mpcd: cascaderArr.value[1] || "", mpcd: cascaderArr.value[1] || "",
elementType: "DF_WATER_LEVEL", elementType: "DF_WATER_LEVEL",
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
initChart(res.data, echart3, echartsRef3.value); initChart(res, echart3, echartsRef3.value);
} }
}); });
} }

13
src/views/Main/Reservoir/components/DataStatistics.vue

@ -276,8 +276,9 @@ function getEchartsData() {
mpcd: cascaderArr.value[1] || "", mpcd: cascaderArr.value[1] || "",
elementType: "WATER_LEVEL", elementType: "WATER_LEVEL",
}).then((res) => { }).then((res) => {
if (res.data) { console.log("res >>>>> ", res);
initChart(res.data, echart1, echartsRef1.value); if (res) {
initChart(res, echart1, echartsRef1.value);
} }
}); });
// //
@ -288,8 +289,8 @@ function getEchartsData() {
stcd: cascaderArr.value[0] || "", stcd: cascaderArr.value[0] || "",
elementType: "ENV", elementType: "ENV",
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
initChart(res.data, echart2, echartsRef2.value); initChart(res, echart2, echartsRef2.value);
} }
}); });
// //
@ -300,8 +301,8 @@ function getEchartsData() {
mpcd: cascaderArr.value[1] || "", mpcd: cascaderArr.value[1] || "",
elementType: "C_STRESS", elementType: "C_STRESS",
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
initChart(res.data, echart3, echartsRef3.value); initChart(res, echart3, echartsRef3.value);
} }
}); });
// - // -

12
src/views/Main/Sluice/components/DataStatistics.vue

@ -270,8 +270,8 @@ function getEchartsData() {
mpcd: cascaderArr.value[1] || "", mpcd: cascaderArr.value[1] || "",
elementType: "SZ_SEEPAGE_AROUND", elementType: "SZ_SEEPAGE_AROUND",
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
initChart(res.data, echart1, echartsRef1.value); initChart(res, echart1, echartsRef1.value);
} }
}); });
// //
@ -282,8 +282,8 @@ function getEchartsData() {
stcd: cascaderArr.value[0] || "", stcd: cascaderArr.value[0] || "",
elementType: "SZ_WATER_LEVEL", elementType: "SZ_WATER_LEVEL",
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
initChart(res.data, echart2, echartsRef2.value); initChart(res, echart2, echartsRef2.value);
} }
}); });
// //
@ -294,8 +294,8 @@ function getEchartsData() {
mpcd: cascaderArr.value[1] || "", mpcd: cascaderArr.value[1] || "",
elementType: "SZ_DISPLACEMENT", elementType: "SZ_DISPLACEMENT",
}).then((res) => { }).then((res) => {
if (res.data) { if (res) {
initChart(res.data, echart3, echartsRef3.value); initChart(res, echart3, echartsRef3.value);
} }
}); });
} }

Loading…
Cancel
Save