fix: Oracle 数据源创建界面的连接方式没有必填项标记,单选项没有默认选项

This commit is contained in:
dataeaseShu 2023-10-24 10:38:19 +08:00
parent 58e7aa1cea
commit 0c65938e5a

View File

@ -131,6 +131,10 @@ const initForm = type => {
cron: '0 0 0/1 * * ? *'
}
}
if (type === 'oracle') {
form.value.configuration.connectionType = 'sid'
}
form.value.type = type
setTimeout(() => {
dsForm.value.clearValidate()
@ -238,6 +242,16 @@ const setRules = () => {
}
]
}
if (form.value.type === 'oracle') {
configRules['configuration.connectionType'] = [
{
required: true,
message: t('datasource.connection_mode'),
trigger: 'change'
}
]
}
rule.value = { ...cloneDeep(configRules), ...cloneDeep(defaultRule) }
}