|
|
@@ -17,6 +17,7 @@
|
|
|
import {
|
|
|
update,
|
|
|
remove,
|
|
|
+ add,
|
|
|
pushServerFace,
|
|
|
deleteServerFace
|
|
|
} from "@/api/estate/serveruser.js";
|
|
|
@@ -278,6 +279,7 @@
|
|
|
this.dialogShow = true
|
|
|
},
|
|
|
showAddForm() {
|
|
|
+ debugger
|
|
|
this.isAdd = true
|
|
|
this.dialogShow = true
|
|
|
this.option.detail = false
|
|
|
@@ -287,8 +289,14 @@
|
|
|
}, 20)
|
|
|
},
|
|
|
async submit(form, done) {
|
|
|
- let data = deepClone(form)
|
|
|
- let res = await update(data)
|
|
|
+ //addOrUpdate 1——添加,2——更新
|
|
|
+ let data = form;
|
|
|
+ let res;
|
|
|
+ if (this.isAdd){
|
|
|
+ res = await add(data)
|
|
|
+ }else {
|
|
|
+ res = await update(data)
|
|
|
+ }
|
|
|
done()
|
|
|
if (res.data.success) {
|
|
|
this.dialogShow = false;
|