/** 提交按钮 */
this.anTagFlag=false
submitForm: function() {
if (this.anTagFlag) {
return;
}
this.anTagFlag = true;
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != undefined) {
configeidt(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
setTimeout(() => {
this.anTagFlag = false;
}, 300);
this.getList();
})
.catch(err => {
setTimeout(() => {
this.anTagFlag = false;
}, 500);
})
} else {
configadd(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
setTimeout(() => {
this.anTagFlag = false;
}, 500);
this.getList();
})
.catch(err => {
setTimeout(() => {
this.anTagFlag = false;
}, 500);
})
}
}
});
},