This commit is contained in:
yanran200730
2022-07-28 13:43:43 +08:00
parent e0e0329cfe
commit b6cab0818c

View File

@@ -248,6 +248,7 @@
v-model="dateForm.choiceTime" v-model="dateForm.choiceTime"
type="datetime" type="datetime"
size="small" size="small"
:picker-options="pickerOptions"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择定时发送时间"> placeholder="请选择定时发送时间">
</el-date-picker> </el-date-picker>
@@ -322,7 +323,12 @@
}, },
girdNames: '', girdNames: '',
id: '', id: '',
tagsList: [] tagsList: [],
pickerOptions: {
disabledDate: e => {
return e.getTime() < (Date.now() - 60 * 1000 * 60 * 24)
}
}
} }
}, },
@@ -560,7 +566,11 @@
onDateForm () { onDateForm () {
this.$refs.dateForm.validate((valid) => { this.$refs.dateForm.validate((valid) => {
if (valid) { if (valid) {
this.confirm(1) if (new Date(this.dateForm.choiceTime).getTime() < Date.now()) {
return this.$message.error('定时发送时间不得早于当前时间')
} else {
this.confirm(1)
}
} }
}) })
}, },