From abf5fae91a0f3362dd6b6eb39ec3253b018750bf Mon Sep 17 00:00:00 2001 From: 安浩浩 <1036606149@qq.com> Date: Tue, 13 May 2025 22:55:31 +0800 Subject: [PATCH] fix:将API导入路径中的simpleClassName_strikeCase替换为businessName,以确保正确引用API --- yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/general/views/form.vue.vm | 4 ++-- yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm | 8 +++++--- yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/form.vue.vm | 4 ++-- yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/index.vue.vm | 6 +++--- yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/modules/form_sub_erp.vue.vm | 4 ++-- yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/modules/form_sub_normal.vue.vm | 6 +++--- yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/modules/list_sub_erp.vue.vm | 8 ++++---- 7 files changed, 21 insertions(+), 19 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/general/views/form.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/general/views/form.vue.vm index 90c0a6e..c87cd2a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/general/views/form.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/general/views/form.vue.vm @@ -8,7 +8,7 @@ import { ImageUpload, FileUpload } from "#/components/upload"; import { message, Tabs, Form, Input, Textarea, Select, RadioGroup, Radio, CheckboxGroup, Checkbox, DatePicker, TreeSelect } from 'ant-design-vue'; import { DICT_TYPE, getDictOptions } from '#/utils'; #if($table.templateType == 2)## 树表需要导入这些 -import { get${simpleClassName}List } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; +import { get${simpleClassName}List } from '#/api/${table.moduleName}/${table.businessName}'; import { handleTree } from '@vben/utils' #end ## 特殊:主子表专属逻辑 @@ -22,7 +22,7 @@ import { handleTree } from '@vben/utils' import { computed, ref } from 'vue'; import { $t } from '#/locales'; -import { get${simpleClassName}, create${simpleClassName}, update${simpleClassName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; +import { get${simpleClassName}, create${simpleClassName}, update${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}'; const emit = defineEmits(['success']); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm index d7a90dc..5ca4c08 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/data.ts.vm @@ -1,13 +1,15 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; -import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; +import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}'; import { z } from '#/adapter/form'; +import { getRangePickerDefaultProps } from '#/utils/date'; +import { DICT_TYPE, getDictOptions } from '#/utils/dict'; + #if(${table.templateType} == 2)## 树表需要导入这些 -import { get${simpleClassName}List } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}'; +import { get${simpleClassName}List } from '#/api/${table.moduleName}/${table.businessName}'; import { handleTree } from '@vben/utils'; #end -import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; import { useAccess } from '@vben/access'; const { hasAccessByCodes } = useAccess(); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/form.vue.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/form.vue.vm index c4e0eec..1c1b7d7 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/form.vue.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben5_antd/schema/views/form.vue.vm @@ -1,5 +1,5 @@