mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
fix: 代码生成:Vue3标准模板问题修复。
This commit is contained in:
parent
535413804b
commit
552e9969cc
@ -3,7 +3,7 @@ import request from '@/config/axios'
|
|||||||
export interface ${simpleClassName}VO {
|
export interface ${simpleClassName}VO {
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if ($column.createOperation || $column.updateOperation)
|
#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
|
${column.javaField}: number
|
||||||
#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime")
|
#elseif(${column.javaType.toLowerCase()} == "date" || ${column.javaType.toLowerCase()} == "localdatetime")
|
||||||
${column.javaField}: Date
|
${column.javaField}: Date
|
||||||
@ -14,32 +14,34 @@ export interface ${simpleClassName}VO {
|
|||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const baseURL = '/${table.moduleName}/${simpleClassName_strikeCase}'
|
||||||
|
|
||||||
// 查询${table.classComment}列表
|
// 查询${table.classComment}列表
|
||||||
export const get${simpleClassName}Page = async (params: ${simpleClassName}PageReqVO) => {
|
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}详情
|
// 查询${table.classComment}详情
|
||||||
export const get${simpleClassName} = async (id: number) => {
|
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}
|
// 新增${table.classComment}
|
||||||
export const create${simpleClassName} = async (data: ${simpleClassName}VO) => {
|
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}
|
// 修改${table.classComment}
|
||||||
export const update${simpleClassName} = async (data: ${simpleClassName}VO) => {
|
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}
|
// 删除${table.classComment}
|
||||||
export const delete${simpleClassName} = async (id: number) => {
|
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
|
// 导出${table.classComment} Excel
|
||||||
export const export${simpleClassName}Api = async (params) => {
|
export const export${simpleClassName} = async (params) => {
|
||||||
return await request.download({ url: '${baseURL}/export-excel', params })
|
return await request.download({ url: `${baseURL}/export-excel`, params })
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formData.${javaField}"
|
v-model="formData.${javaField}"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="timestamp"
|
value-format="x"
|
||||||
placeholder="选择${comment}"
|
placeholder="选择${comment}"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
<el-form-item label="${comment}" prop="${javaField}">
|
<el-form-item label="${comment}" prop="${javaField}">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.${javaField}"
|
v-model="queryParams.${javaField}"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="YYYY-MM-DD"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择${comment}"
|
placeholder="选择${comment}"
|
||||||
clearable
|
clearable
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<el-form-item label="${comment}" prop="${javaField}">
|
<el-form-item label="${comment}" prop="${javaField}">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.${javaField}"
|
v-model="queryParams.${javaField}"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
|
Loading…
Reference in New Issue
Block a user