!462 fix: 代码生成:Vue3标准模板问题修复。
This commit is contained in:
parent
30ce9f6eca
commit
ac5299a00b
@ -1,9 +1,10 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
|
||||||
|
|
||||||
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
|
||||||
@ -16,30 +17,30 @@ export interface ${simpleClassName}VO {
|
|||||||
|
|
||||||
// 查询${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="结束日期"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
|
||||||
|
|
||||||
export interface ${simpleClassName}VO {
|
export interface ${simpleClassName}VO {
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { defHttp } from '@/utils/http/axios'
|
import { defHttp } from '@/utils/http/axios'
|
||||||
|
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
|
||||||
|
|
||||||
// 查询${table.classComment}列表
|
// 查询${table.classComment}列表
|
||||||
export function get${simpleClassName}Page(params) {
|
export function get${simpleClassName}Page(params) {
|
||||||
|
Loading…
Reference in New Issue
Block a user