From 071b4bec4942218ca40b9a50b2588df601f8f21b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E5=8A=B2=E9=BE=99?= <2860996570@qq.com>
Date: Thu, 26 Dec 2024 16:53:47 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E7=94=A8=E7=A6=81=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/auditPages/taskManagement/index.vue | 35 +++++++++++++------
1 file changed, 25 insertions(+), 10 deletions(-)
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
}