Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
293fd75e
提交
293fd75e
编写于
12月 28, 2021
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
6591a538
变更
12
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
127 行增加
和
58 行删除
+127
-58
grid-column-model.hbs
...sources/templ/r7/@macro/grid-detail/grid-column-model.hbs
+1
-0
grid-control-state.ts
...z-core/modules/widgets/grid-control/grid-control-state.ts
+4
-4
grid-control.ts
...rc/ibiz-core/modules/widgets/grid-control/grid-control.ts
+77
-6
{{pages@DEEDITVIEW}}-config.ts.hbs
...}/{{pages@DEEDITVIEW}}/{{pages@DEEDITVIEW}}-config.ts.hbs
+2
-2
index.ts.hbs
...n/resources/templ/r7/app_{{apps}}/src/router/index.ts.hbs
+22
-22
{{appEntities}}-service-base.ts.hbs
...rvice/{{appEntities}}/{{appEntities}}-service-base.ts.hbs
+2
-2
{{ctrls@APPMENU}}-menu-config.ts.hbs
...ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu-config.ts.hbs
+1
-1
{{ctrls@FORM}}-form-config.ts.hbs
...s}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-config.ts.hbs
+6
-6
{{ctrls@FORM}}-form-service.ts.hbs
...}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-service.ts.hbs
+2
-2
{{ctrls@FORM}}-form.vue.hbs
...ntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
+2
-2
{{ctrls@GRID}}-grid-config.ts.hbs
...s}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-config.ts.hbs
+6
-4
{{ctrls@GRID}}-grid.vue.hbs
...ntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
+2
-7
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/grid-detail/grid-column-model.hbs
浏览文件 @
293fd75e
{
{
title: "
{{
item
.
caption
}}
",
title: "
{{
item
.
caption
}}
",
columnType: "
{{
item
.
columnType
}}
",
{{#
neq
lastColumn
true
}}
{{#
neq
lastColumn
true
}}
{{#if
item
.
widthUnit
'PX'
}}
{{#if
item
.
widthUnit
'PX'
}}
width:
{{
item
.
width
}}
,
width:
{{
item
.
width
}}
,
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/grid-control/grid-control-state.ts
浏览文件 @
293fd75e
...
@@ -13,14 +13,14 @@ export interface GridControlState extends MainControlState {
...
@@ -13,14 +13,14 @@ export interface GridControlState extends MainControlState {
* @type {IParam[]}
* @type {IParam[]}
* @memberof GridControlState
* @memberof GridControlState
*/
*/
I
tems
:
IParam
[];
i
tems
:
IParam
[];
/**
/**
* @description 表格列模型
* @description 表格列模型
* @type {IParam}
* @type {IParam}
* @memberof GridControlState
* @memberof GridControlState
*/
*/
columnsModel
:
IParam
;
columnsModel
:
IParam
[]
;
/**
/**
* @description 表格界面行为模型
* @description 表格界面行为模型
...
@@ -72,11 +72,11 @@ export interface GridControlState extends MainControlState {
...
@@ -72,11 +72,11 @@ export interface GridControlState extends MainControlState {
selectFirstDefault
:
boolean
;
selectFirstDefault
:
boolean
;
/**
/**
* @description
数据总条数
* @description
分页大小
* @type {number}
* @type {number}
* @memberof GridControlState
* @memberof GridControlState
*/
*/
total
:
number
;
pageSize
:
number
;
/**
/**
* @description 是否启用分页
* @description 是否启用分页
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
293fd75e
import
{
deepCopy
,
GridControlProps
,
GridControlState
,
IAction
Param
,
MainControl
}
from
'@ibiz-core'
;
import
{
calcActionItemAuthState
,
deepCopy
,
GridControlProps
,
GridControlState
,
IActionParam
,
I
Param
,
MainControl
}
from
'@ibiz-core'
;
/**
/**
* @description 表格部件
* @description 表格部件
...
@@ -40,6 +40,61 @@ export class GridControl extends MainControl {
...
@@ -40,6 +40,61 @@ export class GridControl extends MainControl {
this
.
controlState
.
items
[
rowIndex
][
name
]
=
value
;
this
.
controlState
.
items
[
rowIndex
][
name
]
=
value
;
}
}
/**
* @description 获取界面行为权限状态
* @param {IParam} rowData 行数据
* @return {*}
* @memberof GridControl
*/
public
getActionAuthState
(
rowData
:
IParam
)
{
const
{
UIService
,
actionModel
}
=
this
.
controlState
;
let
tempActionModel
:
any
=
deepCopy
(
actionModel
);
calcActionItemAuthState
(
rowData
,
tempActionModel
,
UIService
);
return
tempActionModel
;
}
/**
* @description 获取操作列标识
* @param {IParam} column 表格列集合
* @memberof GridControl
*/
public
getUAGridColumn
(
columns
:
IParam
[]):
any
{
columns
.
forEach
((
column
:
IParam
)
=>
{
if
(
Object
.
is
(
column
.
columnType
,
"UAGRIDCOLUMN"
))
{
return
column
.
dataIndex
;
}
if
(
column
.
children
?.
length
>
0
)
{
return
this
.
getUAGridColumn
(
column
.
children
);
}
})
}
/**
* @description 计算表格行为权限
* @memberof GridControl
*/
public
calcGridAuthState
()
{
const
dataRef
=
toRef
(
this
.
controlState
,
'items'
);
const
columnsModelRef
=
toRef
(
this
.
controlState
,
'columnsModel'
);
let
uaColumnKey
=
this
.
getUAGridColumn
(
columnsModelRef
.
value
);
if
(
uaColumnKey
)
{
dataRef
.
value
.
forEach
((
item
:
IParam
)
=>
{
Object
.
assign
(
item
,
{
[
uaColumnKey
]:
this
.
getActionAuthState
(
item
),
})
})
}
}
/**
* @description 处理表格分组
* @memberof GridControl
*/
public
handleGridGroup
()
{
const
{
groupMode
,
groupField
,
groupCodeList
}
=
this
.
controlState
;
}
/**
/**
* @description 使用加载功能模块
* @description 使用加载功能模块
* @param {GridControlProps} props 传入的props
* @param {GridControlProps} props 传入的props
...
@@ -51,24 +106,40 @@ export class GridControl extends MainControl {
...
@@ -51,24 +106,40 @@ export class GridControl extends MainControl {
const
load
=
async
(
opt
:
any
=
{})
=>
{
const
load
=
async
(
opt
:
any
=
{})
=>
{
try
{
try
{
const
loadAction
=
this
.
controlState
.
controlAction
.
loadAction
;
const
loadAction
=
this
.
controlState
.
controlAction
.
loadAction
;
const
{
controlService
,
context
,
viewParams
,
showBusyIndicator
}
=
this
.
controlState
;
const
{
controlService
,
context
,
viewParams
,
showBusyIndicator
,
noSort
,
minorSortDir
,
minorSortPSDEF
,
enablePagingBar
,
pageSize
}
=
this
.
controlState
;
const
dataRef
=
toRef
(
this
.
controlState
,
'items'
);
const
dataRef
=
toRef
(
this
.
controlState
,
'items'
);
const
paginationRef
=
toRef
(
this
.
controlState
,
'pagination'
);
if
(
!
loadAction
){
if
(
!
loadAction
){
return
;
return
;
}
}
let
_context
=
deepCopy
(
context
);
let
_context
=
deepCopy
(
context
);
let
_viewParams
=
deepCopy
(
viewParams
);
let
_viewParams
=
deepCopy
(
viewParams
);
if
(
noSort
&&
minorSortDir
&&
minorSortPSDEF
)
{
Object
.
assign
(
_viewParams
,
{
sort
:
`
${
minorSortPSDEF
}
,
${
minorSortDir
}
`
});
}
if
(
enablePagingBar
)
{
if
(
opt
.
current
&&
opt
.
pageSize
)
{
Object
.
assign
(
_viewParams
,
{
page
:
opt
.
current
-
1
,
size
:
opt
.
pageSize
});
}
else
{
Object
.
assign
(
_viewParams
,
{
page
:
0
,
size
:
pageSize
});
}
}
const
response
=
await
controlService
.
get
(
loadAction
,
_context
,
{
viewParams
:
_viewParams
},
showBusyIndicator
);
const
response
=
await
controlService
.
get
(
loadAction
,
_context
,
{
viewParams
:
_viewParams
},
showBusyIndicator
);
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
return
return
}
}
dataRef
.
value
=
response
.
data
;
dataRef
.
value
=
response
.
data
;
if
(
enablePagingBar
)
{
paginationRef
.
value
[
'total'
]
=
response
.
total
;
}
this
.
calcGridAuthState
();
this
.
handleGridGroup
();
}
catch
(
error
)
{
}
catch
(
error
)
{
// todo 错误异常处理
// todo 错误异常处理
}
}
}
}
// 订阅viewSubject,监听load行为
// 订阅viewSubject,监听load行为
...
@@ -114,7 +185,7 @@ export class GridControl extends MainControl {
...
@@ -114,7 +185,7 @@ export class GridControl extends MainControl {
*/
*/
public
moduleInstall
(
props
:
GridControlProps
,
emit
?:
Function
)
{
public
moduleInstall
(
props
:
GridControlProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
const
{
load
}
=
this
.
useLoad
(
props
)
const
{
load
}
=
this
.
useLoad
(
props
)
;
const
handleEditorEvent
=
this
.
handleEditorEvent
.
bind
(
this
);
const
handleEditorEvent
=
this
.
handleEditorEvent
.
bind
(
this
);
this
.
handleEditorEvent
=
(
rowIndex
:
number
,
actionParam
:
IActionParam
)
=>
{
this
.
handleEditorEvent
=
(
rowIndex
:
number
,
actionParam
:
IActionParam
)
=>
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEEDITVIEW}}/{{pages@DEEDITVIEW}}-config.ts.hbs
浏览文件 @
293fd75e
...
@@ -7,9 +7,9 @@ export const ViewConfig = {
...
@@ -7,9 +7,9 @@ export const ViewConfig = {
{{
lowerCase
codeName
}}
:{
{{
lowerCase
codeName
}}
:{
name:'
{{
name
}}
',
name:'
{{
name
}}
',
items:[
items:[
{{#
p
S
DEToolbarItems
}}
{{#
p
s
DEToolbarItems
}}
{ name:'
{{
name
}}
',caption:'
{{
caption
}}
',groupExtractMode:'
{{
groupExtractMode
}}
',itemType:'
{{
itemType
}}
',noPrivDisplayMode:'
{{
noPrivDisplayMode
}}
',showIcon:
{{
showIcon
}}
,showCaption:
{{
showCaption
}}
,tooltip:'
{{
tooltip
}}
' },
{ name:'
{{
name
}}
',caption:'
{{
caption
}}
',groupExtractMode:'
{{
groupExtractMode
}}
',itemType:'
{{
itemType
}}
',noPrivDisplayMode:'
{{
noPrivDisplayMode
}}
',showIcon:
{{
showIcon
}}
,showCaption:
{{
showCaption
}}
,tooltip:'
{{
tooltip
}}
' },
{{/
p
S
DEToolbarItems
}}
{{/
p
s
DEToolbarItems
}}
]
]
},
},
{{/
eq
}}
{{/
eq
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/router/index.ts.hbs
浏览文件 @
293fd75e
...
@@ -11,67 +11,67 @@ const routes = [
...
@@ -11,67 +11,67 @@ const routes = [
caption: "
{{
app
.
defaultPSAppIndexView
.
caption
}}
",
caption: "
{{
app
.
defaultPSAppIndexView
.
caption
}}
",
viewType: "
{{
app
.
defaultPSAppIndexView
.
viewType
}}
",
viewType: "
{{
app
.
defaultPSAppIndexView
.
viewType
}}
",
dynaModelFilePath: "
{{
app
.
defaultPSAppIndexView
.
dynaModelFilePath
}}
",
dynaModelFilePath: "
{{
app
.
defaultPSAppIndexView
.
dynaModelFilePath
}}
",
{{#if
app
.
defaultPSAppIndexView
.
p
S
SysImage
}}
{{#if
app
.
defaultPSAppIndexView
.
p
s
SysImage
}}
imgPath: "
{{
app
.
defaultPSAppIndexView
.
p
SSysImage
.
I
magePath
}}
",
imgPath: "
{{
app
.
defaultPSAppIndexView
.
p
sSysImage
.
i
magePath
}}
",
iconCls: "
{{
app
.
defaultPSAppIndexView
.
p
S
SysImage
.
cssClass
}}
",
iconCls: "
{{
app
.
defaultPSAppIndexView
.
p
s
SysImage
.
cssClass
}}
",
{{/if}}
{{/if}}
parameters: [
parameters: [
{ pathName: "views", parameterName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
" },
{ pathName: "views", parameterName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
" },
],
],
requireAuth:
{{#
eq
app
.
defaultPSAppIndexView
.
accUserMode
0
}}
false
{{else}}{{#
eq
app
.
defaultPSAppIndexView
.
accUserMode
3
}}
false
{{else}}
true
{{/
eq
}}{{/
eq
}}
,
requireAuth:
{{#
eq
app
.
defaultPSAppIndexView
.
accUserMode
0
}}
false
{{else}}{{#
eq
app
.
defaultPSAppIndexView
.
accUserMode
3
}}
false
{{else}}
true
{{/
eq
}}{{/
eq
}}
,
},
},
component: () => import("@page/
{{#if
app
.
defaultPSAppIndexView
.
p
SAppDataEntity
}}{{
spinalCase
app
.
defaultPSAppIndexView
.
pS
AppDataEntity
.
codeName
}}{{else}}
default
{{/if}}
/
{{
spinalCase
app
.
defaultPSAppIndexView
.
codeName
}}
/
{{
spinalCase
app
.
defaultPSAppIndexView
.
codeName
}}
.vue"),
component: () => import("@page/
{{#if
app
.
defaultPSAppIndexView
.
p
sAppDataEntity
}}{{
spinalCase
app
.
defaultPSAppIndexView
.
ps
AppDataEntity
.
codeName
}}{{else}}
default
{{/if}}
/
{{
spinalCase
app
.
defaultPSAppIndexView
.
codeName
}}
/
{{
spinalCase
app
.
defaultPSAppIndexView
.
codeName
}}
.vue"),
children: [
children: [
{{#
each
app
.
allPSAppViews
as
|
appView
|
}}
{{#
each
app
.
allPSAppViews
as
|
appView
|
}}
{{!-- 实体视图 --}}
{{!-- 实体视图 --}}
{{#if
appView
.
p
S
AppDataEntity
}}
{{#if
appView
.
p
s
AppDataEntity
}}
{{!-- 多重路径 --}}
{{!-- 多重路径 --}}
{{#if
appView
.
p
SAppDataEntity
.
pS
AppDERSPathCount
}}
{{#if
appView
.
p
sAppDataEntity
.
ps
AppDERSPathCount
}}
{{#if
(
or
(
eq
appView
.
viewType
'DEEDITVIEW'
)
(
eq
appView
.
viewType
'DEGRIDVIEW'
))
}}
{{#if
(
or
(
eq
appView
.
viewType
'DEEDITVIEW'
)
(
eq
appView
.
viewType
'DEGRIDVIEW'
))
}}
{
{
path: "
{{
lowerCase
(
pluralize
appView
.
p
S
AppDataEntity
.
codeName
)
}}
/:
{{
lowerCase
codeName
}}
?/views/:view?",
path: "
{{
lowerCase
(
pluralize
appView
.
p
s
AppDataEntity
.
codeName
)
}}
/:
{{
lowerCase
codeName
}}
?/views/:view?",
meta: {
meta: {
captionTag: "
{{#if
appView
.
capPSLanguageRes
}}{{
appView
.
capPSLanguageRes
.
lanResTag
}}{{/if}}
",
captionTag: "
{{#if
appView
.
capPSLanguageRes
}}{{
appView
.
capPSLanguageRes
.
lanResTag
}}{{/if}}
",
caption: "
{{
appView
.
caption
}}
",
caption: "
{{
appView
.
caption
}}
",
viewType: "
{{
appView
.
viewType
}}
",
viewType: "
{{
appView
.
viewType
}}
",
info:'',
info:'',
{{#if
appView
.
p
S
SysImage
}}
{{#if
appView
.
p
s
SysImage
}}
imgPath: "
{{
appView
.
p
SSysImage
.
I
magePath
}}
",
imgPath: "
{{
appView
.
p
sSysImage
.
i
magePath
}}
",
iconCls: "
{{
appView
.
p
S
SysImage
.
cssClass
}}
",
iconCls: "
{{
appView
.
p
s
SysImage
.
cssClass
}}
",
{{/if}}
{{/if}}
parameters: [
parameters: [
{ pathName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
", parameterName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
" },
{ pathName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
", parameterName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
" },
{ pathName: "
{{
lowerCase
(
pluralize
appView
.
p
S
AppDataEntity
.
codeName
)
}}
", parameterName: "
{{
lowerCase
codeName
}}
" },
{ pathName: "
{{
lowerCase
(
pluralize
appView
.
p
s
AppDataEntity
.
codeName
)
}}
", parameterName: "
{{
lowerCase
codeName
}}
" },
{ pathName: 'views', parameterName: 'view' },
{ pathName: 'views', parameterName: 'view' },
],
],
resource: "
{{
entity
.
codeName
.
lowerCase
}}
",
resource: "
{{
entity
.
codeName
.
lowerCase
}}
",
requireAuth: false,
requireAuth: false,
},
},
component: () => import("@page/
{{#if
appView
.
p
SAppDataEntity
}}{{
spinalCase
appView
.
pS
AppDataEntity
.
codeName
}}{{else}}
default
{{/if}}
/
{{
spinalCase
appView
.
codeName
}}
/
{{
spinalCase
appView
.
codeName
}}
.vue"),
component: () => import("@page/
{{#if
appView
.
p
sAppDataEntity
}}{{
spinalCase
appView
.
ps
AppDataEntity
.
codeName
}}{{else}}
default
{{/if}}
/
{{
spinalCase
appView
.
codeName
}}
/
{{
spinalCase
appView
.
codeName
}}
.vue"),
},
},
{{/if}}
{{/if}}
{{else}}
{{else}}
{{#if
(
or
(
eq
appView
.
viewType
'DEEDITVIEW'
)
(
eq
appView
.
viewType
'DEGRIDVIEW'
))
}}
{{#if
(
or
(
eq
appView
.
viewType
'DEEDITVIEW'
)
(
eq
appView
.
viewType
'DEGRIDVIEW'
))
}}
{
{
path: "
{{
lowerCase
(
pluralize
appView
.
p
S
AppDataEntity
.
codeName
)
}}
/:
{{
lowerCase
codeName
}}
?/views/:view?",
path: "
{{
lowerCase
(
pluralize
appView
.
p
s
AppDataEntity
.
codeName
)
}}
/:
{{
lowerCase
codeName
}}
?/views/:view?",
meta: {
meta: {
captionTag: "
{{#if
appView
.
capPSLanguageRes
}}{{
appView
.
capPSLanguageRes
.
lanResTag
}}{{/if}}
",
captionTag: "
{{#if
appView
.
capPSLanguageRes
}}{{
appView
.
capPSLanguageRes
.
lanResTag
}}{{/if}}
",
caption: "
{{
appView
.
caption
}}
",
caption: "
{{
appView
.
caption
}}
",
viewType: "
{{
appView
.
viewType
}}
",
viewType: "
{{
appView
.
viewType
}}
",
info:'',
info:'',
{{#if
appView
.
p
S
SysImage
}}
{{#if
appView
.
p
s
SysImage
}}
imgPath: "
{{
appView
.
p
SSysImage
.
I
magePath
}}
",
imgPath: "
{{
appView
.
p
sSysImage
.
i
magePath
}}
",
iconCls: "
{{
appView
.
p
S
SysImage
.
cssClass
}}
",
iconCls: "
{{
appView
.
p
s
SysImage
.
cssClass
}}
",
{{/if}}
{{/if}}
parameters: [
parameters: [
{ pathName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
", parameterName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
" },
{ pathName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
", parameterName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
" },
{ pathName: "
{{
lowerCase
(
pluralize
appView
.
p
SAppDataEntity
.
codeName
)
}}
", parameterName: "
{{
lowerCase
appView
.
pS
AppDataEntity
.
codeName
}}
" },
{ pathName: "
{{
lowerCase
(
pluralize
appView
.
p
sAppDataEntity
.
codeName
)
}}
", parameterName: "
{{
lowerCase
appView
.
ps
AppDataEntity
.
codeName
}}
" },
{ pathName: 'views', parameterName: 'view' },
{ pathName: 'views', parameterName: 'view' },
],
],
resource: "
{{
entity
.
codeName
.
lowerCase
}}
",
resource: "
{{
entity
.
codeName
.
lowerCase
}}
",
requireAuth: false,
requireAuth: false,
},
},
component: () => import("@page/
{{#if
appView
.
p
SAppDataEntity
}}{{
spinalCase
appView
.
pS
AppDataEntity
.
codeName
}}{{else}}
default
{{/if}}
/
{{
spinalCase
appView
.
codeName
}}
/
{{
spinalCase
appView
.
codeName
}}
.vue"),
component: () => import("@page/
{{#if
appView
.
p
sAppDataEntity
}}{{
spinalCase
appView
.
ps
AppDataEntity
.
codeName
}}{{else}}
default
{{/if}}
/
{{
spinalCase
appView
.
codeName
}}
/
{{
spinalCase
appView
.
codeName
}}
.vue"),
},
},
{{/if}}
{{/if}}
{{/if}}
{{/if}}
...
@@ -84,9 +84,9 @@ const routes = [
...
@@ -84,9 +84,9 @@ const routes = [
caption: "
{{
appView
.
caption
}}
",
caption: "
{{
appView
.
caption
}}
",
viewType: "
{{
appView
.
viewType
}}
",
viewType: "
{{
appView
.
viewType
}}
",
info:'',
info:'',
{{#if
appView
.
p
S
SysImage
}}
{{#if
appView
.
p
s
SysImage
}}
imgPath: "
{{
appView
.
p
SSysImage
.
I
magePath
}}
",
imgPath: "
{{
appView
.
p
sSysImage
.
i
magePath
}}
",
iconCls: "
{{
appView
.
p
S
SysImage
.
cssClass
}}
",
iconCls: "
{{
appView
.
p
s
SysImage
.
cssClass
}}
",
{{/if}}
{{/if}}
parameters: [
parameters: [
{ pathName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
", parameterName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
" },
{ pathName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
", parameterName: "
{{
lowerCase
app
.
defaultPSAppIndexView
.
codeName
}}
" },
...
@@ -94,7 +94,7 @@ const routes = [
...
@@ -94,7 +94,7 @@ const routes = [
],
],
requireAuth: false,
requireAuth: false,
},
},
component: () => import("@page/
{{#if
appView
.
p
SAppDataEntity
}}{{
spinalCase
appView
.
pS
AppDataEntity
.
codeName
}}{{else}}
default
{{/if}}
/
{{
spinalCase
appView
.
codeName
}}
/
{{
spinalCase
appView
.
codeName
}}
.vue"),
component: () => import("@page/
{{#if
appView
.
p
sAppDataEntity
}}{{
spinalCase
appView
.
ps
AppDataEntity
.
codeName
}}{{else}}
default
{{/if}}
/
{{
spinalCase
appView
.
codeName
}}
/
{{
spinalCase
appView
.
codeName
}}
.vue"),
},
},
{{/
neq
}}
{{/
neq
}}
{{/if}}
{{/if}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/service/{{appEntities}}/{{appEntities}}-service-base.ts.hbs
浏览文件 @
293fd75e
...
@@ -31,8 +31,8 @@ export class {{appEntity.codeName.pascalCase}}ServiceBase extends EntityService
...
@@ -31,8 +31,8 @@ export class {{appEntity.codeName.pascalCase}}ServiceBase extends EntityService
*/
*/
async
{{
singleAppMethod
.
codeName
}}
(_context: any = {}, _data: any = {}): Promise
<any>
{
async
{{
singleAppMethod
.
codeName
}}
(_context: any = {}, _data: any = {}): Promise
<any>
{
//
{{
singleAppMethod
}}
//
{{
singleAppMethod
}}
//
{{
singleAppMethod
.
p
S
DEServiceAPIMethod
}}
//
{{
singleAppMethod
.
p
s
DEServiceAPIMethod
}}
//
{{
singleAppMethod
.
p
S
DEServiceAPIMethod
.
requestMethod
}}
//
{{
singleAppMethod
.
p
s
DEServiceAPIMethod
.
requestMethod
}}
{{#
eq
singleAppMethod
.
methodType
"SELECT"
}}
{{#
eq
singleAppMethod
.
methodType
"SELECT"
}}
const res = await this.http.post(`/
{{
appEntity
.
codeName
.
pluralize
}}
/${encodeURIComponent(_context.
{{
appEntity
.
codeName
.
lowerCase
}}
)}
{{
singleAppMethod
.
requestPath
}}
`, _data);
const res = await this.http.post(`/
{{
appEntity
.
codeName
.
pluralize
}}
/${encodeURIComponent(_context.
{{
appEntity
.
codeName
.
lowerCase
}}
)}
{{
singleAppMethod
.
requestPath
}}
`, _data);
return res;
return res;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu-config.ts.hbs
浏览文件 @
293fd75e
...
@@ -5,7 +5,7 @@ export const CtrlConfig = {
...
@@ -5,7 +5,7 @@ export const CtrlConfig = {
defaultOpens: [],
defaultOpens: [],
defaultSelect: [],
defaultSelect: [],
menus: [
menus: [
{{#
each
ctrl
.
p
S
AppMenuItems
as
|
item
|
}}
{{#
each
ctrl
.
p
s
AppMenuItems
as
|
item
|
}}
{{>
(
lookup
'MENUITEM'
)
item
=
item
}}
{{>
(
lookup
'MENUITEM'
)
item
=
item
}}
{{/
each
}}
{{/
each
}}
],
],
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-config.ts.hbs
浏览文件 @
293fd75e
...
@@ -15,24 +15,24 @@ export const CtrlConfig = {
...
@@ -15,24 +15,24 @@ export const CtrlConfig = {
*/
*/
export class ControlVO extends ControlVOBase {
export class ControlVO extends ControlVOBase {
// 表单里映射了属性的字段
// 表单里映射了属性的字段
{{#
each
ctrl
.
p
S
DEFormItems
as
|
formItem
|
}}
{{#
each
ctrl
.
p
s
DEFormItems
as
|
formItem
|
}}
{{!-- // 表单formItem
{{!-- // 表单formItem
{{formItem.name}}
{{formItem.name}}
{{formItem.id}} --}}
{{formItem.id}} --}}
{{#
neq
formItem
.
p
S
AppDEField
null
}}
{{#
neq
formItem
.
p
s
AppDEField
null
}}
get
{{
lowerCase
formItem
.
id
}}
() {
get
{{
lowerCase
formItem
.
id
}}
() {
return this.$DO.
{{
lowerCase
formItem
.
p
S
AppDEField
.
codeName
}}
;
return this.$DO.
{{
lowerCase
formItem
.
p
s
AppDEField
.
codeName
}}
;
}
}
set
{{
lowerCase
formItem
.
id
}}
(value: any) {
set
{{
lowerCase
formItem
.
id
}}
(value: any) {
this.$DO.
{{
lowerCase
formItem
.
p
S
AppDEField
.
codeName
}}
= value;
this.$DO.
{{
lowerCase
formItem
.
p
s
AppDEField
.
codeName
}}
= value;
}
}
{{/
neq
}}
{{/
neq
}}
{{/
each
}}
{{/
each
}}
// 表单里没有映射实体属性的字段
// 表单里没有映射实体属性的字段
{{#
each
ctrl
.
p
S
DEFormItems
as
|
formItem
|
}}
{{#
each
ctrl
.
p
s
DEFormItems
as
|
formItem
|
}}
{{#
eq
formItem
.
p
S
AppDEField
null
}}
{{#
eq
formItem
.
p
s
AppDEField
null
}}
{{
lowerCase
formItem
.
id
}}
: any;
{{
lowerCase
formItem
.
id
}}
: any;
{{/
eq
}}
{{/
eq
}}
{{/
each
}}
{{/
each
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form-service.ts.hbs
浏览文件 @
293fd75e
import { ControlServiceBase } from '@ibiz-core';
import { ControlServiceBase } from '@ibiz-core';
import {
{{
pascalCase
ctrl
.
p
SAppDataEntity
.
codeName
}}
Service } from '@service/
{{
spinalCase
ctrl
.
pSAppDataEntity
.
codeName
}}
/
{{
spinalCase
ctrl
.
pS
AppDataEntity
.
codeName
}}
-service';
import {
{{
pascalCase
ctrl
.
p
sAppDataEntity
.
codeName
}}
Service } from '@service/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
ctrl
.
ps
AppDataEntity
.
codeName
}}
-service';
import { ControlVO } from './
{{
ctrl
.
codeName
.
lowerCase
}}
-form-config';
import { ControlVO } from './
{{
ctrl
.
codeName
.
lowerCase
}}
-form-config';
export class ControlService extends ControlServiceBase {
export class ControlService extends ControlServiceBase {
...
@@ -7,7 +7,7 @@ export class ControlService extends ControlServiceBase {
...
@@ -7,7 +7,7 @@ export class ControlService extends ControlServiceBase {
/**
/**
* 实体服务对象
* 实体服务对象
*/
*/
public entityService:
{{
pascalCase
ctrl
.
p
SAppDataEntity
.
codeName
}}
Service = new
{{
pascalCase
ctrl
.
pS
AppDataEntity
.
codeName
}}
Service();
public entityService:
{{
pascalCase
ctrl
.
p
sAppDataEntity
.
codeName
}}
Service = new
{{
pascalCase
ctrl
.
ps
AppDataEntity
.
codeName
}}
Service();
/**
/**
* 加载数据
* 加载数据
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
浏览文件 @
293fd75e
...
@@ -31,13 +31,13 @@ const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(p
...
@@ -31,13 +31,13 @@ const { state, handleEditorEvent } = new FormControl(CtrlConfig).moduleInstall(p
<template>
<template>
<a-form
<a-form
name=
"
{{
ctrl
.
codeName
}}
"
name=
"
{{
ctrl
.
codeName
}}
"
class=
"ibiz-form
{{#if
ctrl
.
p
SSysCss
}}
{{
ctrl
.
pS
SysCss
.
cssName
}}{{/if}}{{#if
ctrl
.
infoFormMode
}}
ibiz-info-form
{{/if}}
"
class=
"ibiz-form
{{#if
ctrl
.
p
sSysCss
}}
{{
ctrl
.
ps
SysCss
.
cssName
}}{{/if}}{{#if
ctrl
.
infoFormMode
}}
ibiz-info-form
{{/if}}
"
style=
"
{{#if
ctrl
.
formWidth
}}
width:
{{
ctrl
.
formWidth
}}
px;
{{/if}}
"
style=
"
{{#if
ctrl
.
formWidth
}}
width:
{{
ctrl
.
formWidth
}}
px;
{{/if}}
"
:model=
"state.data"
:model=
"state.data"
:rules=
"state.rules"
>
:rules=
"state.rules"
>
{{#if
ctrl
.
noTabHeader
}}
{{#if
ctrl
.
noTabHeader
}}
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPage
|
}}
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPage
|
}}
{{#
each
ctrlPage
.
p
S
DEFormDetails
as
|
formDetail
|
}}
{{#
each
ctrlPage
.
p
s
DEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
{{/
each
}}
{{/
each
}}
{{/
each
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-config.ts.hbs
浏览文件 @
293fd75e
...
@@ -4,8 +4,8 @@ export const CtrlConfig = {
...
@@ -4,8 +4,8 @@ export const CtrlConfig = {
controlCodeName: "
{{
ctrl
.
codeName
}}
",
controlCodeName: "
{{
ctrl
.
codeName
}}
",
controlName: "
{{
ctrl
.
name
}}
",
controlName: "
{{
ctrl
.
name
}}
",
items: [],
items: [],
total: 0,
aggMode: "
{{
ctrl
.
aggMode
}}
",
aggMode: "
{{
ctrl
.
aggMode
}}
",
{{#if
ctrl
.
enableGroup
}}
groupMode: "
{{
ctrl
.
groupMode
}}
",
groupMode: "
{{
ctrl
.
groupMode
}}
",
groupField: "
{{
ctrl
.
groupPSAppDEField
.
codeName
}}
",
groupField: "
{{
ctrl
.
groupPSAppDEField
.
codeName
}}
",
{{#if
ctrl
.
groupPSCodeList
}}
{{#if
ctrl
.
groupPSCodeList
}}
...
@@ -14,18 +14,20 @@ export const CtrlConfig = {
...
@@ -14,18 +14,20 @@ export const CtrlConfig = {
codeListType: "
{{
ctrl
.
groupPSCodeList
.
codeListType
}}
",
codeListType: "
{{
ctrl
.
groupPSCodeList
.
codeListType
}}
",
},
},
{{/if}}
{{/if}}
{{/if}}
{{#if
ctrl
.
noSort
}}
{{#if
ctrl
.
noSort
}}
noSort: true,
noSort: true,
{{else}}
{{else}}
noSort: false,
noSort: false,
minorSortDir: "
{{#if
ctrl
.
minorSortDir
}}{{
ctrl
.
minorSortDir
}}{{
else}}
ASC
{{
/if}}
",
minorSortDir: "
{{#if
ctrl
.
minorSortDir
}}{{
ctrl
.
minorSortDir
}}{{/if}}
",
minorSortPSDEF: "
{{
ctrl
.
minorSortPSAppDEField
.
codeName
}}
",
minorSortPSDEF: "
{{
ctrl
.
minorSortPSAppDEField
.
codeName
}}
",
{{/if}}
{{/if}}
{{#if
ctrl
.
enablePagingBar
}}
{{#if
ctrl
.
enablePagingBar
}}
enablePagingBar: true,
enablePagingBar: true,
pageSize:
{{#if
ctrl
.
pagingSize
}}{{
ctrl
.
pagingSize
}}{{else}}
20
{{/if}}
,
pagination: {
pagination: {
position: ['bottomRight'],
position: ['bottomRight'],
defaultPageSize:
{{
ctrl
.
pagingSize
}}
,
defaultPageSize:
{{
#if
ctrl
.
pagingSize
}}{{
ctrl
.
pagingSize
}}{{else}}
20
{{/if
}}
,
showQuickJumper: true,
showQuickJumper: true,
showTotal: (total: number, range: IParam[]) => `${range[0]}-${range[1]} of ${total} items`,
showTotal: (total: number, range: IParam[]) => `${range[0]}-${range[1]} of ${total} items`,
pageSizeOptions: ['10','20','50','100'],
pageSizeOptions: ['10','20','50','100'],
...
@@ -35,7 +37,7 @@ export const CtrlConfig = {
...
@@ -35,7 +37,7 @@ export const CtrlConfig = {
pagination: false,
pagination: false,
{{/if}}
{{/if}}
columnsModel: [
columnsModel: [
{{#
each
ctrl
.
p
S
DEGridColumns
as
|
column
|
}}
{{#
each
ctrl
.
p
s
DEGridColumns
as
|
column
|
}}
{{#if
@last
}}
{{#if
@last
}}
{{>
(
lookup
'COLUMNMODEL'
)
item
=
column
lastColumn
=
true
}}
{{>
(
lookup
'COLUMNMODEL'
)
item
=
column
lastColumn
=
true
}}
{{else}}
{{else}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid.vue.hbs
浏览文件 @
293fd75e
...
@@ -30,12 +30,9 @@ const props = withDefaults(defineProps<Props>(), {
...
@@ -30,12 +30,9 @@ const props = withDefaults(defineProps<Props>(), {
interface
CtrlEmit
{
interface
CtrlEmit
{
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
(
name
:
"ctrlEvent"
,
value
:
IActionParam
):
void
;
}
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力方法
// 安装功能模块,提供状态和能力方法
const
{
state
,
handleEditorEvent
}
=
new
GridControl
(
CtrlConfig
).
moduleInstall
(
props
);
const
{
state
,
handleEditorEvent
}
=
new
GridControl
(
CtrlConfig
).
moduleInstall
(
props
);
// 表格滚动条配置
// 表格滚动条配置
const
gridScrollOption
=
computed
(()
=>
{
const
gridScrollOption
=
computed
(()
=>
{
return
{
return
{
...
@@ -57,12 +54,10 @@ const rowSelectionOption = computed(() => {
...
@@ -57,12 +54,10 @@ const rowSelectionOption = computed(() => {
},
},
};
};
});
});
// 处理拖动列
// 处理拖动列
const
handleResizeColumn
=
(
width
:
number
,
column
:
IParam
)
=>
{
const
handleResizeColumn
=
(
width
:
number
,
column
:
IParam
)
=>
{
column
.
width
=
width
;
column
.
width
=
width
;
}
}
// 处理表格变化(分页,过滤,排序)
// 处理表格变化(分页,过滤,排序)
const
handleChange
=
(
pagination
:
IParam
,
filters
:
IParam
,
sorter
:
IParam
,
data
:
IParam
)
=>
{
const
handleChange
=
(
pagination
:
IParam
,
filters
:
IParam
,
sorter
:
IParam
,
data
:
IParam
)
=>
{
const
{
current
,
pageSize
}
=
pagination
;
const
{
current
,
pageSize
}
=
pagination
;
...
@@ -106,7 +101,7 @@ for (let i = 0; i < 100; i++) {
...
@@ -106,7 +101,7 @@ for (let i = 0; i < 100; i++) {
</div>
</div>
</template>
</template>
<template
#
bodyCell=
"{ column, text, record }"
>
<template
#
bodyCell=
"{ column, text, record }"
>
{{#
each
ctrl
.
p
S
DEGridColumns
as
|
column
|
}}
{{#
each
ctrl
.
p
s
DEGridColumns
as
|
column
|
}}
{{>
(
lookup
'COLUMN'
)
item
=
column
ctrl
=
ctrl
}}
{{>
(
lookup
'COLUMN'
)
item
=
column
ctrl
=
ctrl
}}
{{/
each
}}
{{/
each
}}
</template>
</template>
...
@@ -114,7 +109,7 @@ for (let i = 0; i < 100; i++) {
...
@@ -114,7 +109,7 @@ for (let i = 0; i < 100; i++) {
<template
#
summary
>
<template
#
summary
>
<a-table-summary-row>
<a-table-summary-row>
<a-table-summary-cell>
数据聚合
</a-table-summary-cell>
<a-table-summary-cell>
数据聚合
</a-table-summary-cell>
{{#
each
ctrl
.
p
S
DEGridColumns
as
|
column
|
}}
{{#
each
ctrl
.
p
s
DEGridColumns
as
|
column
|
}}
{{>
(
lookup
'SUMMARYCOLUMN'
)
item
=
column
ctrl
=
ctrl
}}
{{>
(
lookup
'SUMMARYCOLUMN'
)
item
=
column
ctrl
=
ctrl
}}
{{/
each
}}
{{/
each
}}
</a-table-summary-row>
</a-table-summary-row>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录