Merge pull request #6325 from dataease/pr@dev-v2_dzz

fix: Oracle 数据源创建界面的连接方式没有必填项标记,单选项没有默认选项
This commit is contained in:
dataeaseShu 2023-10-24 10:39:47 +08:00 committed by GitHub
commit a6bc2d9ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) }
}