1.添加生成Vue配置文件页面的模板;
2.修改后端Controller模板中findPage返回结果为PageBean; 3.修改后端JavaBean模板中日期格式
This commit is contained in:
@@ -3,9 +3,9 @@ package #(pkg).controller;
|
||||
import com.eversec.common.AbstractBaseController;
|
||||
import com.eversec.common.JBean;
|
||||
import com.eversec.common.Domain;
|
||||
import com.eversec.common.PageBean;
|
||||
import #(pkg).domain.#(bean);
|
||||
import #(pkg).service.#(bean)Service;
|
||||
import com.eversec.framework.core.data.QueryResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
@@ -99,7 +99,7 @@ public class #(bean)Controller extends AbstractBaseController {
|
||||
#end
|
||||
#end
|
||||
|
||||
QueryResult pageBean = #(beanFL)Service.findPage(m);
|
||||
PageBean pageBean = #(beanFL)Service.findPage(m);
|
||||
return JBean.by(200, "成功", pageBean).toJson();
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ public class #(bean) extends Domain {
|
||||
,field=field.substring(0, 1).toLowerCase() + field.substring(1)
|
||||
)
|
||||
#if(x.fieldType == "Date")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
#end
|
||||
private #(x.fieldType) #(field); //#(x.remark)
|
||||
#end
|
||||
|
14
tpl/front/VueRouterTpl.js
Normal file
14
tpl/front/VueRouterTpl.js
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* 工具模板路由配置信息
|
||||
*/
|
||||
export default [
|
||||
#for(x : cfg)
|
||||
#set(name=x.name,
|
||||
title=x.title)
|
||||
{
|
||||
name: '#(name)',
|
||||
title: '#(title)'
|
||||
}#if(!(for.last)),
|
||||
#end
|
||||
#end
|
||||
]
|
108
tpl/front/VueTpl.vue
Normal file
108
tpl/front/VueTpl.vue
Normal file
@@ -0,0 +1,108 @@
|
||||
|
||||
<template>
|
||||
<kit-common-list :componentListCfg="componentListCfg"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "kit-#(beanFL)",
|
||||
data(){
|
||||
return {
|
||||
componentListCfg: {
|
||||
apiCfg: {
|
||||
|
||||
title: "#(remark)",
|
||||
|
||||
conditionLabel: "#(conditionLabel)",
|
||||
|
||||
url: "/#(bean.toLowerCase())",
|
||||
|
||||
items: {
|
||||
#for(x : fieldList)
|
||||
#set(field=x.field,field=field.substring(0, 1).toLowerCase() + field.substring(1)
|
||||
,selects=x.selects
|
||||
,tag=x.tag
|
||||
,remark=x.remark1
|
||||
,fieldV=x.fieldV
|
||||
)
|
||||
"#(field)": {
|
||||
"col": "#(field)",
|
||||
"label": "#(remark)",
|
||||
"inExt": "#(selects)",
|
||||
"inType": "#(tag)",
|
||||
"expr": "#(fieldV)"
|
||||
}#if(!(for.last)),
|
||||
#end
|
||||
#end
|
||||
},
|
||||
|
||||
shows: [
|
||||
#for(x : showCol)
|
||||
#set(col=x
|
||||
)
|
||||
{
|
||||
"col": "#(col)",
|
||||
"order": false
|
||||
}#if(!(for.last)),
|
||||
#end
|
||||
#end
|
||||
],
|
||||
|
||||
filters: [
|
||||
#for(x : fs)
|
||||
#set(name=x.name,
|
||||
label=x.label,
|
||||
col=x.col,
|
||||
remark=x.remark
|
||||
)
|
||||
{
|
||||
name: "#(name)",
|
||||
label: "#(label)",
|
||||
filterType: [
|
||||
{
|
||||
col: "#(col)",
|
||||
remark: "#(remark)"
|
||||
}
|
||||
],
|
||||
checked: false
|
||||
}#if(!(for.last)),
|
||||
#end
|
||||
#end
|
||||
],
|
||||
|
||||
edits: [
|
||||
#for(x : editsList)
|
||||
#set(col=x.col,
|
||||
upAttr=x.upAttr,
|
||||
addAttr=x.addAttr,
|
||||
ck=x.ck
|
||||
)
|
||||
{
|
||||
col: "#(col)",
|
||||
#if(null!=upAttr)
|
||||
upAttr: "#(upAttr)",
|
||||
#end
|
||||
#if(null!=addAttr)
|
||||
addAttr: "#(addAttr)",
|
||||
#end
|
||||
#if(null!=ck)
|
||||
ck: "#(ck)"
|
||||
#end
|
||||
}#if(!(for.last)),
|
||||
#end
|
||||
#end
|
||||
],
|
||||
|
||||
details: [
|
||||
#for(x : detailsList)
|
||||
#set(col=x)
|
||||
{col: "#(col)"}#if(!(for.last)),
|
||||
#end
|
||||
#end
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user