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

@@ -10,7 +10,7 @@ type NeInfo = {
/**网元列表 */
neList: Record<string, any>[];
/**级联options树结构 */
neCascaderOtions: Record<string, any>[];
neCascaderOptions: Record<string, any>[];
/**选择器单级父类型 */
neSelectOtions: Record<string, any>[];
/**跟踪接口列表 */
@@ -22,7 +22,7 @@ type NeInfo = {
const useNeInfoStore = defineStore('neinfo', {
state: (): NeInfo => ({
neList: [],
neCascaderOtions: [],
neCascaderOptions: [],
neSelectOtions: [],
traceInterfaceList: [],
perMeasurementList: [],
@@ -33,8 +33,8 @@ const useNeInfoStore = defineStore('neinfo', {
* @param state 内部属性不用传入
* @returns 级联options
*/
getNeCascaderOtions(state) {
return state.neCascaderOtions;
getNeCascaderOptions(state) {
return state.neCascaderOptions;
},
/**
* 选择器单级父类型
@@ -70,7 +70,7 @@ const useNeInfoStore = defineStore('neinfo', {
'neName',
'neId'
);
this.neCascaderOtions = options;
this.neCascaderOptions = options;
// 转选择器单级父类型
this.neSelectOtions = options.map(item => item);