gengxin时间提醒

main
李劲龙 2 weeks ago
parent 7b6766e843
commit d562070a47

@ -155,8 +155,14 @@
</el-col>
</el-form-item>
<el-form-item label="任务期限" prop="taskDeadline">
<el-date-picker type="datetime" placeholder="选择日期" v-model="ruleForm.taskDeadline" style="width: 100%;"
value-format="yyyy-MM-dd HH:mm:ss" default-time="23:59:59"></el-date-picker>
<el-date-picker
type="datetime"
placeholder="选择日期"
v-model="ruleForm.taskDeadline"
style="width: 100%;"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="23:59:59"
></el-date-picker>
</el-form-item>
<el-form-item class="newTask-form-item">
<el-button @click="resetForm('ruleForm')"></el-button>
@ -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',

Loading…
Cancel
Save