!462 fix: 代码生成:Vue3标准模板问题修复。
This commit is contained in:
parent
30ce9f6eca
commit
ac5299a00b
@ -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 })
|
||||
}
|
||||
|
@ -102,7 +102,7 @@
|
||||
<el-date-picker
|
||||
v-model="formData.${javaField}"
|
||||
type="date"
|
||||
value-format="timestamp"
|
||||
value-format="x"
|
||||
placeholder="选择${comment}"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
@ -66,7 +66,7 @@
|
||||
<el-form-item label="${comment}" prop="${javaField}">
|
||||
<el-date-picker
|
||||
v-model="queryParams.${javaField}"
|
||||
value-format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="date"
|
||||
placeholder="选择${comment}"
|
||||
clearable
|
||||
@ -77,7 +77,7 @@
|
||||
<el-form-item label="${comment}" prop="${javaField}">
|
||||
<el-date-picker
|
||||
v-model="queryParams.${javaField}"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
|
@ -1,4 +1,5 @@
|
||||
import request from '@/config/axios'
|
||||
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
|
||||
|
||||
export interface ${simpleClassName}VO {
|
||||
#foreach ($column in $columns)
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { defHttp } from '@/utils/http/axios'
|
||||
|
||||
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
|
||||
|
||||
// 查询${table.classComment}列表
|
||||
export function get${simpleClassName}Page(params) {
|
||||
|
Loading…
Reference in New Issue
Block a user