Commit ca27ca0e authored by jiaorz's avatar jiaorz

rgh

parent cd4bf5cf
......@@ -464,15 +464,27 @@
set[formName].validate(valid => {
if (valid) {
addObj(this.form)
.then(() => {
this.dialogFormVisible = false;
this.getList();
.then(response => {
console.log(response)
if(response.status == 200) {
this.$notify({
title: '成功',
message: '创建成功',
message: "添加成功",
type: 'success',
duration: 2000
});
} else {
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
}
this.dialogFormVisible = false;
this.getList();
})
} else {
return false;
......@@ -510,16 +522,25 @@
} else {
this.form.password = undefined;
}
putObj(this.form.id, this.form).then(() => {
this.dialogFormVisible = false;
this.getList();
this.form.password = undefined;
putObj(this.form.id, this.form).then(response => {
if(response.status == 200) {
this.$notify({
title: '成功',
message: '编辑成功',
type: 'success',
duration: 2000
});
} else {
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
});
}
this.dialogFormVisible = false;
this.getList();
this.form.password = undefined;
});
} else {
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment