微调
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
import { type ErrorSystem } from '@/api/device/interface/error';
|
||||
import ErrorSystemDetailTable from '@/views/machine/errorSystem/components/errorSystemDetailTable.vue';
|
||||
import {getDictTreeList} from '@/api/system/dictionary/dictTree'
|
||||
import {getDictTreeByCode} from '@/api/system/dictionary/dictTree'
|
||||
import { type Dict } from '@/api/system/dictionary/interface';
|
||||
// 定义弹出组件元信息
|
||||
const dialogFormRef = ref()
|
||||
@@ -156,31 +156,31 @@ const handleTableDataUpdate = (newTableData: ErrorSystem.ErrorSystemDetail[]) =>
|
||||
}
|
||||
// 封装提取第二层节点的逻辑
|
||||
const loadSecondLevelOptions = async () => {
|
||||
const dictCode = '误差体系指标项'; // 替换为实际需要的字典代码
|
||||
const dictCode2 = '脚本-误差'; // 替换为实际需要的字典代码
|
||||
const dictCode = 'Err_Sys_Items'; // 替换为实际需要的字典代码
|
||||
const dictCode2 = 'Script_Error'; // 替换为实际需要的字典代码
|
||||
|
||||
const resDictTree: Dict.ResDictTree = {
|
||||
name: dictCode,
|
||||
name: '',
|
||||
id: '',
|
||||
pid: '',
|
||||
pids: '',
|
||||
code: '',
|
||||
code: dictCode,
|
||||
sort: 0
|
||||
};
|
||||
|
||||
const resDictTree2: Dict.ResDictTree = {
|
||||
name: dictCode2,
|
||||
name: '',
|
||||
id: '',
|
||||
pid: '',
|
||||
pids: '',
|
||||
code: '',
|
||||
code: dictCode2,
|
||||
sort: 0
|
||||
};
|
||||
|
||||
// 并行请求两个字典树列表
|
||||
const [result, result2] = await Promise.all([
|
||||
getDictTreeList(resDictTree),
|
||||
getDictTreeList(resDictTree2)
|
||||
getDictTreeByCode(resDictTree),
|
||||
getDictTreeByCode(resDictTree2)
|
||||
]);
|
||||
|
||||
const allOptions = convertToOptions(result.data as Dict.ResDictTree[]);
|
||||
|
||||
Reference in New Issue
Block a user