Merge pull request #7020 from dataease/pr@dev-v2@fixDatasource

fix: 【系统设置】-基础设置中数据源检测时间间隔没有限制数值边界
This commit is contained in:
taojinlong 2023-12-05 04:07:54 -06:00 committed by GitHub
commit 1b6890bfd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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