微调
This commit is contained in:
@@ -60,7 +60,7 @@ import { useDictStore } from '@/stores/modules/dict'
|
||||
import TestScriptDetail from '@/views/machine/testScript/components/testScriptDetail.vue'
|
||||
import { type TestScript } from '@/api/device/interface/testScript'
|
||||
import type { Dict } from '@/api/system/dictionary/interface'
|
||||
import { getDictTreeList } from '@/api/system/dictionary/dictTree'
|
||||
import { getDictTreeByCode } from '@/api/system/dictionary/dictTree'
|
||||
import type { CascaderOption } from 'element-plus'
|
||||
const modeId = ref()
|
||||
const secondLevelOptions: any[] = []
|
||||
@@ -123,16 +123,16 @@ const save = () => {
|
||||
|
||||
// 打开弹窗,可能是新增,也可能是编辑
|
||||
const open = async (sign: string, row: any, currentMode: string, id: string) => {
|
||||
const dictCode = '测试脚本字典表' // 替换为实际需要的字典代码
|
||||
const dictCode = 'Script_Indicator_Items' // 替换为实际需要的字典代码
|
||||
const resDictTree: Dict.ResDictTree = {
|
||||
name: dictCode,
|
||||
name: '',
|
||||
id: '',
|
||||
pid: '',
|
||||
pids: '',
|
||||
code: '',
|
||||
code: dictCode,
|
||||
sort: 0
|
||||
}
|
||||
const result = await getDictTreeList(resDictTree)
|
||||
const result = await getDictTreeByCode(resDictTree)
|
||||
const allOptions = convertToOptions(result.data as Dict.ResDictTree[])
|
||||
|
||||
secondLevelOptions.push(...(allOptions[0]?.children || []))
|
||||
|
||||
Reference in New Issue
Block a user