From c98f452431a6076cbd2fad035a03989b3ca7c546 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 26 Jul 2022 20:05:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2vue3=E4=B8=BB=E9=94=AE?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=90=8D=E4=B8=8Erow=E6=88=96ids=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?= 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-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm index a363ef364..f66cc3b89 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm +++ b/ruoyi-modules/ruoyi-gen/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("删除成功");