forked from github/dataease
Merge pull request #7020 from dataease/pr@dev-v2@fixDatasource
fix: 【系统设置】-基础设置中数据源检测时间间隔没有限制数值边界
This commit is contained in:
commit
1b6890bfd8
@ -44,6 +44,20 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate(valid => {
|
||||
if (valid) {
|
||||
if (
|
||||
state.form.dsExecuteTime === 'minute' &&
|
||||
(Number(state.form.dsIntervalTime) < 1 || Number(state.form.dsIntervalTime) > 59)
|
||||
) {
|
||||
ElMessage.error('分钟超出范围【1-59】')
|
||||
return
|
||||
}
|
||||
if (
|
||||
state.form.dsExecuteTime === 'hour' &&
|
||||
(Number(state.form.dsIntervalTime) < 1 || Number(state.form.dsIntervalTime) > 23)
|
||||
) {
|
||||
ElMessage.error('小时超出范围【1-23】')
|
||||
return
|
||||
}
|
||||
const param = buildSettingList()
|
||||
if (param.length < 2) {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user