forked from github/dataease
Merge pull request #6325 from dataease/pr@dev-v2_dzz
fix: Oracle 数据源创建界面的连接方式没有必填项标记,单选项没有默认选项
This commit is contained in:
commit
a6bc2d9ee7
@ -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) }
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user