|
|
|
@ -516,19 +516,19 @@ export default {
|
|
|
|
|
console.log(this.formNew);
|
|
|
|
|
this.$refs["formNew"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
// if (this.formNew.id != null) {
|
|
|
|
|
// updateNew(this.formNew).then((response) => {
|
|
|
|
|
// this.$modal.msgSuccess("修改成功");
|
|
|
|
|
// this.openNew = false;
|
|
|
|
|
// this.getList();
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// addNew(this.formNew).then((response) => {
|
|
|
|
|
// this.$modal.msgSuccess("新增成功");
|
|
|
|
|
// this.openNew = false;
|
|
|
|
|
// this.getList();
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
if (this.formNew.id != null) {
|
|
|
|
|
updateNew(this.formNew).then((response) => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.openNew = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addNew(this.formNew).then((response) => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.openNew = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|