Commit b6df0c336ca5b352d831bcd88277aea176f9e84a
1 parent
2866b587
fix:代码生成模板修改
Showing
2 changed files
with
9 additions
and
9 deletions
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm
| @@ -5,31 +5,31 @@ const request = useAxios() | @@ -5,31 +5,31 @@ const request = useAxios() | ||
| 5 | 5 | ||
| 6 | #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") | 6 | #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") |
| 7 | // 查询${table.classComment}列表 | 7 | // 查询${table.classComment}列表 |
| 8 | -export const getPostPageApi = async (params: ${simpleClassName}PageReqVO) => { | 8 | +export const get${simpleClassName}PageApi = async (params: ${simpleClassName}PageReqVO) => { |
| 9 | return await request.get({ url: '${baseURL}/page', params }) | 9 | return await request.get({ url: '${baseURL}/page', params }) |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | // 查询${table.classComment}详情 | 12 | // 查询${table.classComment}详情 |
| 13 | -export const getPostApi = async (id: number) => { | 13 | +export const get${simpleClassName}Api = async (id: number) => { |
| 14 | return await request.get({ url: '${baseURL}/get?id=' + id }) | 14 | return await request.get({ url: '${baseURL}/get?id=' + id }) |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | // 新增${table.classComment} | 17 | // 新增${table.classComment} |
| 18 | -export const createPostApi = async (data: ${simpleClassName}VO) => { | 18 | +export const create${simpleClassName}Api = async (data: ${simpleClassName}VO) => { |
| 19 | return await request.post({ url: '${baseURL}/create', data }) | 19 | return await request.post({ url: '${baseURL}/create', data }) |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | // 修改${table.classComment} | 22 | // 修改${table.classComment} |
| 23 | -export const updatePostApi = async (data: ${simpleClassName}VO) => { | 23 | +export const update${simpleClassName}Api = async (data: ${simpleClassName}VO) => { |
| 24 | return await request.put({ url: '${baseURL}/update', data }) | 24 | return await request.put({ url: '${baseURL}/update', data }) |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | // 删除${table.classComment} | 27 | // 删除${table.classComment} |
| 28 | -export const deletePostApi = async (id: number) => { | 28 | +export const delete${simpleClassName}Api = async (id: number) => { |
| 29 | return await request.delete({ url: '${baseURL}/delete?id=' + id }) | 29 | return await request.delete({ url: '${baseURL}/delete?id=' + id }) |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | // 导出${table.classComment} Excel | 32 | // 导出${table.classComment} Excel |
| 33 | -export const exportPostApi = async (params: ${simpleClassName}ExcelReqVO) => { | 33 | +export const export${simpleClassName}Api = async (params: ${simpleClassName}ExcelReqVO) => { |
| 34 | return await request.download({ url: '${baseURL}/export-excel', params }) | 34 | return await request.download({ url: '${baseURL}/export-excel', params }) |
| 35 | } | 35 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm
| @@ -6,9 +6,9 @@ | @@ -6,9 +6,9 @@ | ||
| 6 | import { useTable } from '@/hooks/web/useTable' | 6 | import { useTable } from '@/hooks/web/useTable' |
| 7 | import { useI18n } from '@/hooks/web/useI18n' | 7 | import { useI18n } from '@/hooks/web/useI18n' |
| 8 | import { FormExpose } from '@/components/Form' | 8 | import { FormExpose } from '@/components/Form' |
| 9 | - import type { ${simpleClassName}VO } from '@/api/system/post/types' | ||
| 10 | - import { rules, allSchemas } from './post.data' | ||
| 11 | - import * as ${simpleClassName}Api from '@/api/system/post' | 9 | + import type { ${simpleClassName}VO } from '@/api/${table.moduleName}/${simpleClassName}/types' |
| 10 | + import { rules, allSchemas } from './${simpleClassName}.data' | ||
| 11 | + import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${simpleClassName}' | ||
| 12 | const { t } = useI18n() // 国际化 | 12 | const { t } = useI18n() // 国际化 |
| 13 | 13 | ||
| 14 | // ========== 列表相关 ========== | 14 | // ========== 列表相关 ========== |