Merge pull request #3112 from dataease/pr@dev@dscheck

fix: 数据源检测时间超出范围后,置为初始值
This commit is contained in:
xuwei-fit2cloud 2022-09-19 18:03:52 +08:00 committed by GitHub
commit c279a7754b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@
<el-form-item :label="$t('system_parameter_setting.ds_check_time')" >
<el-form :inline="true" :disabled="show">
<el-form-item >
<el-input v-model="formInline.dsCheckInterval" type="number" min="1" @change="onSimpleCronChange()" />
<el-input size="mini" v-model="formInline.dsCheckInterval" type="number" min="1" @change="onSimpleCronChange()" />
</el-form-item>
<el-form-item class="form-item">
@ -276,21 +276,14 @@ export default {
if (this.formInline.dsCheckIntervalType === 'minute') {
if (this.formInline.dsCheckInterval < 1 || this.formInline.dsCheckInterval > 59) {
this.$message({ message: this.$t('cron.minute_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 59
this.formInline.dsCheckInterval = 1
}
return
}
if (this.formInline.dsCheckIntervalType === 'hour') {
if (this.formInline.dsCheckInterval < 1 || this.formInline.dsCheckInterval > 23) {
this.$message({ message: this.$t('cron.hour_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 23
}
return
}
if (this.formInline.dsCheckIntervalType === 'day') {
if (this.formInline.dsCheckInterval < 1 || this.formInline.dsCheckInterval > 31) {
this.$message({ message: this.$t('cron.day_limit'), type: 'warning', showClose: true })
this.taskForm.extraData.simple_cron_value = 31
this.formInline.dsCheckInterval = 1
}
return
}