优化代码生成
This commit is contained in:
@@ -102,6 +102,8 @@ $end
|
||||
},
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 操作类型 1、add 2、edit
|
||||
opertype: 0,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 表单参数
|
||||
@@ -240,6 +242,7 @@ $end
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加";
|
||||
this.opertype = 1;
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
@@ -264,6 +267,7 @@ $end
|
||||
if (code == 200) {
|
||||
this.open = true;
|
||||
this.title = "修改数据";
|
||||
this.opertype = 2;
|
||||
|
||||
this.form = {
|
||||
...data,
|
||||
@@ -322,7 +326,7 @@ $end
|
||||
$end
|
||||
console.log(JSON.stringify(this.form));
|
||||
|
||||
if (this.form.${replaceDto.FistLowerPk} != undefined && this.title === "修改数据") {
|
||||
if (this.form.${replaceDto.FistLowerPk} != undefined && this.opertype === 2) {
|
||||
update${genTable.BusinessName}(this.form)
|
||||
.then((res) => {
|
||||
this.msgSuccess("修改成功");
|
||||
|
||||
Reference in New Issue
Block a user