fix: 看班告警统计判断修复,超时30秒
This commit is contained in:
@@ -303,6 +303,7 @@ export async function origGet() {
|
|||||||
params: {
|
params: {
|
||||||
SQL: totalSQL,
|
SQL: totalSQL,
|
||||||
},
|
},
|
||||||
|
timeout: 30_000,
|
||||||
});
|
});
|
||||||
////
|
////
|
||||||
|
|
||||||
@@ -340,6 +341,7 @@ export async function top3Sel(filterFlag?: string) {
|
|||||||
params: {
|
params: {
|
||||||
SQL: top3SQL,
|
SQL: top3SQL,
|
||||||
},
|
},
|
||||||
|
timeout: 30_000,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 解析数据
|
// 解析数据
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { BarChart, PieChart } from 'echarts/charts';
|
|||||||
import { CanvasRenderer } from 'echarts/renderers';
|
import { CanvasRenderer } from 'echarts/renderers';
|
||||||
import { LabelLayout } from 'echarts/features';
|
import { LabelLayout } from 'echarts/features';
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
@@ -96,18 +97,24 @@ function initPicture() {
|
|||||||
let pieArr: any = [];
|
let pieArr: any = [];
|
||||||
let testArr: any = [];
|
let testArr: any = [];
|
||||||
if (resArr[0].status === 'fulfilled') {
|
if (resArr[0].status === 'fulfilled') {
|
||||||
testArr = completeData(resArr[0].value.data, wantArr);
|
const res0 = resArr[0].value;
|
||||||
testArr.map((item: any) => {
|
if (res0.code === RESULT_CODE_SUCCESS) {
|
||||||
item.name = t('views.index.' + item.name) + ': ' + item.value;
|
testArr = completeData(res0.data, wantArr);
|
||||||
pieArr.push(item);
|
testArr.map((item: any) => {
|
||||||
});
|
item.name = t('views.index.' + item.name) + ': ' + item.value;
|
||||||
|
pieArr.push(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (resArr[1].status === 'fulfilled') {
|
||||||
|
const res1 = resArr[1].value;
|
||||||
|
if (res1.code === RESULT_CODE_SUCCESS) {
|
||||||
|
res1.data.map((item: any) => {
|
||||||
|
barArr.push(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resArr[1].status === 'fulfilled') {
|
|
||||||
resArr[1].value.data.map((item: any) => {
|
|
||||||
barArr.push(item);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let firstThreeItems = barArr
|
let firstThreeItems = barArr
|
||||||
.sort((a: any, b: any) => {
|
.sort((a: any, b: any) => {
|
||||||
return b.value - a.value;
|
return b.value - a.value;
|
||||||
|
|||||||
Reference in New Issue
Block a user