From cf8a7f8678200464d781108e1e9495ddf5b39219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=94=BF?= <421335524@qq.com> Date: Sat, 23 Jul 2022 08:29:52 +0000 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E4=B8=BB=E9=94=AE=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=90=8D=E4=B8=8E'row'=E6=88=96'ids'=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E5=AF=BC=E8=87=B4=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/vm/vue/v3/index.vue.vm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm index a363ef364..f66cc3b89 100644 --- a/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm +++ b/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm @@ -492,8 +492,8 @@ function handleAdd() { /** 修改按钮操作 */ function handleUpdate(row) { reset(); - const ${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value - get${BusinessName}(${pkColumn.javaField}).then(response => { + const _${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value + get${BusinessName}(_${pkColumn.javaField}).then(response => { form.value = response.data; #foreach ($column in $columns) #if($column.htmlType == "checkbox") @@ -539,9 +539,9 @@ function submitForm() { /** 删除按钮操作 */ function handleDelete(row) { - const ${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value; - proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?').then(function() { - return del${BusinessName}(${pkColumn.javaField}s); + const _${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value; + proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + _${pkColumn.javaField}s + '"的数据项?').then(function() { + return del${BusinessName}(_${pkColumn.javaField}s); }).then(() => { getList(); proxy.#[[$modal]]#.msgSuccess("删除成功");