diff --git a/src/views/auditPages/taskManagement/index.vue b/src/views/auditPages/taskManagement/index.vue index 191e62e..da0d593 100644 --- a/src/views/auditPages/taskManagement/index.vue +++ b/src/views/auditPages/taskManagement/index.vue @@ -155,14 +155,9 @@ - + 取消 @@ -193,6 +188,21 @@ export default { components: { myPagination, myDialog, danweiList }, data() { return { + pickerOptions: { + disabledDate(time) { + const date = new Date(); + const oneday = date.getTime(); + return time.getTime() < new Date().getTime() - 86400000; + }, + selectableRange: (() => { + let data = new Date(); + let hour = data.getHours(); + let minute = data.getMinutes(); + let second = data.getSeconds(); + return [`${hour}:${minute}:${second} - 23:59:59`] + })(), + }, + btnloading: false, formInline: { name: "", @@ -267,7 +277,12 @@ export default { window.removeEventListener('resize', this.cancalDebounce); }, methods: { - + disabledDate(time) { + // 禁用当前时间之前的时间选项 + console.log(time); + + return time.getTime() < Date.now() - 8.64e7; // 减去一天的毫秒数,以禁用当前日期之前的所有时间 + }, checkboxChange() { console.log(111); this.ruleForm.dwmc = [] @@ -310,7 +325,7 @@ export default { submitForm(formName) { console.log(this.ruleForm.taskDeadline); this.fonsisis(this.ruleForm.taskDeadline) - if(!this.fonsisis(this.ruleForm.taskDeadline)) { + if (!this.fonsisis(this.ruleForm.taskDeadline)) { this.$message.error('选择时间不能小于当前时间'); return false }