From ac5299a00b056acc89b6e63441934a2f1d83697c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 22 Apr 2023 19:01:20 +0800 Subject: [PATCH] =?UTF-8?q?!462=20fix:=20=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=EF=BC=9AVue3=E6=A0=87=E5=87=86=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/codegen/vue3/api/api.ts.vm | 17 +++++++++-------- .../resources/codegen/vue3/views/form.vue.vm | 2 +- .../resources/codegen/vue3/views/index.vue.vm | 4 ++-- .../resources/codegen/vue3_schema/api/api.ts.vm | 1 + .../resources/codegen/vue3_vben/api/api.ts.vm | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm index eaab40703..8bd1c4ee3 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm @@ -1,9 +1,10 @@ import request from '@/config/axios' +#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") export interface ${simpleClassName}VO { #foreach ($column in $columns) #if ($column.createOperation || $column.updateOperation) -#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") +#if(${column.javaType.toLowerCase()} == "long" || ${column.javaType.toLowerCase()} == "integer" || ${column.javaType.toLowerCase()} == "short" || ${column.javaType.toLowerCase()} == "double" || ${column.javaType.toLowerCase()} == "bigdecimal") ${column.javaField}: number #elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime") ${column.javaField}: Date @@ -16,30 +17,30 @@ export interface ${simpleClassName}VO { // 查询${table.classComment}列表 export const get${simpleClassName}Page = async (params: ${simpleClassName}PageReqVO) => { - return await request.get({ url: '${baseURL}/page', params }) + return await request.get({ url: `${baseURL}/page`, params }) } // 查询${table.classComment}详情 export const get${simpleClassName} = async (id: number) => { - return await request.get({ url: '${baseURL}/get?id=' + id }) + return await request.get({ url: `${baseURL}/get?id=` + id }) } // 新增${table.classComment} export const create${simpleClassName} = async (data: ${simpleClassName}VO) => { - return await request.post({ url: '${baseURL}/create', data }) + return await request.post({ url: `${baseURL}/create`, data }) } // 修改${table.classComment} export const update${simpleClassName} = async (data: ${simpleClassName}VO) => { - return await request.put({ url: '${baseURL}/update', data }) + return await request.put({ url: `${baseURL}/update`, data }) } // 删除${table.classComment} export const delete${simpleClassName} = async (id: number) => { - return await request.delete({ url: '${baseURL}/delete?id=' + id }) + return await request.delete({ url: `${baseURL}/delete?id=` + id }) } // 导出${table.classComment} Excel -export const export${simpleClassName}Api = async (params) => { - return await request.download({ url: '${baseURL}/export-excel', params }) +export const export${simpleClassName} = async (params) => { + return await request.download({ url: `${baseURL}/export-excel`, params }) } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm index 99cce39f2..6604263ea 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/form.vue.vm @@ -102,7 +102,7 @@ diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm index f396dde32..58bc69bc7 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm @@ -66,7 +66,7 @@