diff --git a/src/views/auditPages/taskManagement/index.vue b/src/views/auditPages/taskManagement/index.vue index 8e4c22e..191e62e 100644 --- a/src/views/auditPages/taskManagement/index.vue +++ b/src/views/auditPages/taskManagement/index.vue @@ -155,8 +155,14 @@ - + 取消 @@ -261,7 +267,8 @@ export default { window.removeEventListener('resize', this.cancalDebounce); }, methods: { - checkboxChange(){ + + checkboxChange() { console.log(111); this.ruleForm.dwmc = [] this.tabclicklist = [] @@ -282,9 +289,31 @@ export default { this.tabclicklist = [] this.btnloading = false }, - submitForm(formName) { - console.log(this.ruleForm); + fonsisis(data) { + // 定义特定的时间字符串 + const specificTimeStr = data; + + // 将时间字符串转换为Date对象 + const specificTime = new Date(specificTimeStr); + + // 获取当前时间 + const currentTime = new Date(); + + // 比较当前时间是否大于特定时间 + if (currentTime > specificTime) { + return false + } else { + return true + } + }, + submitForm(formName) { + console.log(this.ruleForm.taskDeadline); + this.fonsisis(this.ruleForm.taskDeadline) + if(!this.fonsisis(this.ruleForm.taskDeadline)) { + this.$message.error('选择时间不能小于当前时间'); + return false + } this.$refs[formName].validate((valid) => { if (valid) { this.btnloading = true @@ -295,9 +324,6 @@ export default { this.getInfo(); this.$modal.msgSuccess("新增成功"); this.btnloading = false - - - }) setTimeout(() => { this.ruleForm.dwmc = this.ruleForm.dwmc.split(",") @@ -445,7 +471,7 @@ export default { type: 'warning' }).then(() => { - assetTaskclose({ taskId: row.id,taskName:row.taskName }).then(res => { + assetTaskclose({ taskId: row.id, taskName: row.taskName }).then(res => { if (res.code == 200) { this.$message({ type: 'success',