新增性能测量集的存储

This commit is contained in:
lai
2023-10-18 10:23:57 +08:00
parent f6c4c5ed4b
commit a13e65b39b
2 changed files with 18 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { getNelistAll } from '@/api/configManage/neManage';
import { parseDataToOptions } from '@/utils/parse-tree-utils';
import { getNeTraceInterfaceAll } from '@/api/traceManage/task';
import { getNePerformanceList } from '@/api/perfManage/taskManage';
/**网元信息类型 */
type NeInfo = {
@@ -14,6 +15,8 @@ type NeInfo = {
neSelectOtions: Record<string, any>[];
/**跟踪接口列表 */
traceInterfaceList: Record<string, any>[];
/**性能测量数据集 */
perMeasurementList: Record<string, any>[];
};
const useNeInfoStore = defineStore('neinfo', {
@@ -22,6 +25,7 @@ const useNeInfoStore = defineStore('neinfo', {
neCascaderOtions: [],
neSelectOtions: [],
traceInterfaceList: [],
perMeasurementList: [],
}),
getters: {
/**
@@ -91,6 +95,18 @@ const useNeInfoStore = defineStore('neinfo', {
}
return res;
},
// 获取性能测量数据集列表
async fnNeTaskPerformance() {
// 有数据不请求
if (this.perMeasurementList.length > 0) {
return { code: 1, data: this.perMeasurementList, msg: 'success' };
}
const res = await getNePerformanceList();
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
this.perMeasurementList = res.data;
}
return res;
},
},
});

View File

@@ -138,13 +138,13 @@ const useUserStore = defineStore('user', {
} catch (error) {
console.error(error);
this.profile = {
this.profile = {color:{
critical: '#FF5722',
major: '#FFB800',
minor: '#393D49',
warning: '#009688',
event: '#1E9FFF',
};
}};
}
// 验证返回的roles是否是一个非空数组