防止主键字段名与'row'或'ids'一致导致报错的问题。
This commit is contained in:
parent
86fc709b03
commit
cf8a7f8678
@ -492,8 +492,8 @@ function handleAdd() {
|
|||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
function handleUpdate(row) {
|
function handleUpdate(row) {
|
||||||
reset();
|
reset();
|
||||||
const ${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value
|
const _${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value
|
||||||
get${BusinessName}(${pkColumn.javaField}).then(response => {
|
get${BusinessName}(_${pkColumn.javaField}).then(response => {
|
||||||
form.value = response.data;
|
form.value = response.data;
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if($column.htmlType == "checkbox")
|
#if($column.htmlType == "checkbox")
|
||||||
@ -539,9 +539,9 @@ function submitForm() {
|
|||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
const ${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value;
|
const _${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value;
|
||||||
proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?').then(function() {
|
proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + _${pkColumn.javaField}s + '"的数据项?').then(function() {
|
||||||
return del${BusinessName}(${pkColumn.javaField}s);
|
return del${BusinessName}(_${pkColumn.javaField}s);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
getList();
|
getList();
|
||||||
proxy.#[[$modal]]#.msgSuccess("删除成功");
|
proxy.#[[$modal]]#.msgSuccess("删除成功");
|
||||||
|
Loading…
Reference in New Issue
Block a user