fix: 缓存网元类型获取级联数据判断

This commit is contained in:
TsMask
2023-12-08 18:20:21 +08:00
parent fafe604323
commit e6a4591fb6
11 changed files with 144 additions and 108 deletions

View File

@@ -19,6 +19,7 @@ import {
taskStop,
taskRun,
} from '@/api/perfManage/taskManage';
const neInfoStore = useNeInfoStore();
const { t, currentLocale } = useI18n();
const generateOptions = (start: any, end: any) => {
@@ -378,7 +379,7 @@ function fnSelectPer(s: any, option: any) {
/**性能测量数据集选择初始 */
function fnSelectPerformanceInit(neType: string) {
//console.logg(currentLocale.value); //当前语言
const performance = useNeInfoStore().perMeasurementList.filter(
const performance = neInfoStore.perMeasurementList.filter(
i => i.neType === neType
);
//进行分组选择
@@ -692,9 +693,9 @@ onMounted(() => {
Promise.allSettled([
// 获取网元网元列表
useNeInfoStore().fnNelist(),
neInfoStore.fnNelist(),
// 获取性能测量集列表
useNeInfoStore().fnNeTaskPerformance(),
neInfoStore.fnNeTaskPerformance(),
]).finally(() => {
// 获取列表数据
fnGetList();
@@ -719,7 +720,7 @@ onMounted(() => {
>
<a-auto-complete
v-model:value="queryParams.neType"
:options="useNeInfoStore().getNeSelectOtions"
:options="neInfoStore.getNeSelectOtions"
allow-clear
:placeholder="t('views.traceManage.task.neTypePlease')"
/>
@@ -887,7 +888,7 @@ onMounted(() => {
>
<a-cascader
:value="modalState.neType"
:options="useNeInfoStore().getNeCascaderOtions"
:options="neInfoStore.getNeCascaderOptions"
disabled
/>
</a-form-item>
@@ -1002,7 +1003,7 @@ onMounted(() => {
>
<a-cascader
v-model:value="modalState.neType"
:options="useNeInfoStore().getNeCascaderOtions"
:options="neInfoStore.getNeCascaderOptions"
@change="fnNeChange"
:allow-clear="false"
:placeholder="t('views.traceManage.task.neTypePlease')"