联调检测脚本页面
This commit is contained in:
@@ -138,8 +138,8 @@ const save = () => {
|
||||
pqScriptAdd(formContent.value).then(res => {
|
||||
if (res.code === 'A0000') {
|
||||
ElMessage.success({ message: res.message })
|
||||
// scriptId.value = res.data
|
||||
formContent.value.id = '46296b72528f805376e362df594fc669'
|
||||
formContent.value.id = JSON.stringify(res.data)
|
||||
titleType.value == '编辑检测脚本'
|
||||
show.value = true
|
||||
}
|
||||
})
|
||||
@@ -171,13 +171,13 @@ const open = async (title: string, row: any) => {
|
||||
// 获取树字典
|
||||
const treeInfo = async (currentMode: string) => {
|
||||
const data: Dict.ResDictTree = {
|
||||
name: '',
|
||||
id: '',
|
||||
pid: '',
|
||||
pids: '',
|
||||
code: 'Script_Indicator_Items',
|
||||
sort: 0
|
||||
};
|
||||
name: '',
|
||||
id: '',
|
||||
pid: '',
|
||||
pids: '',
|
||||
code: 'Script_Indicator_Items',
|
||||
sort: 0
|
||||
}
|
||||
const result = await getDictTreeByCode(data)
|
||||
const allOptions = convertToOptions(result.data as Dict.ResDictTree[])
|
||||
secondLevelOptions.push(...(allOptions[0]?.children || []))
|
||||
@@ -198,7 +198,7 @@ onMounted(() => {
|
||||
const convertToOptions = (dictTree: Dict.ResDictTree[]): CascaderOption[] => {
|
||||
return dictTree.map(item => ({
|
||||
value: item.id,
|
||||
code: item.code,
|
||||
code: item.code.split('-')[1] || item.code.split('-')[0],
|
||||
label: item.name,
|
||||
children: item.children ? convertToOptions(item.children) : undefined
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user