fix(Embedded Management): The assistant is embedded. After deleting the historical application, create a new application and display the historical application used for setting

This commit is contained in:
dataeaseShu
2025-09-29 17:28:57 +08:00
committed by dataeaseShu
parent 27f372beec
commit 0f1a2b9296
+11 -2
View File
@@ -56,6 +56,7 @@ const defaultEmbedded = {
name: '',
type: 0,
description: '',
configuration: '',
domain: '',
}
const currentEmbedded = reactive<any>(cloneDeep(defaultEmbedded))
@@ -63,9 +64,11 @@ const currentEmbedded = reactive<any>(cloneDeep(defaultEmbedded))
const isCreate = ref(false)
const defaultForm = {
oid: 1,
public_list: [] as any,
public_list: [],
private_list: [],
}
const dsForm = reactive(cloneDeep(defaultForm))
const dsForm = reactive<{ [key: string]: any }>(cloneDeep(defaultForm))
const defaultCertificateForm = {
id: '',
@@ -116,6 +119,12 @@ const initWorkspace = () => {
}
const handleAddEmbedded = (val: any) => {
Object.assign(currentEmbedded, cloneDeep(defaultEmbedded))
Object.keys(dsForm).forEach((ele) => {
if (!['oid', 'public_list', 'private_list'].includes(ele)) {
delete dsForm[ele]
}
})
Object.assign(urlForm, cloneDeep(defaultUrlForm))
currentEmbedded.type = val
if (val === 0) {
handleBaseEmbedded(null)