Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
f774df1d
提交
f774df1d
编写于
2月 24, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新工具栏计数器支持
上级
4f787a99
变更
8
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
97 行增加
和
16 行删除
+97
-16
PageModel.java
...ore/src/main/java/cn/ibizlab/codegen/model/PageModel.java
+6
-0
view-base-config.hbs
...rces/templ/r7/@macro/front-end/views/view-base-config.hbs
+1
-1
app-toolbar.vue
...mpl/r7/app_{{apps}}/src/components/common/app-toolbar.vue
+41
-11
i-app-counter-service.ts
...pps}}/src/core/interface/service/i-app-counter-service.ts
+8
-0
{{pages@APPINDEXVIEW}}.vue.hbs
...s}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
+2
-1
{{pages@DEEDITVIEW}}.vue.hbs
...dules}}/{{pages@DEEDITVIEW}}/{{pages@DEEDITVIEW}}.vue.hbs
+13
-1
{{pages@DEGRIDVIEW}}.vue.hbs
...dules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
+13
-1
{{pages@DETREEVIEW}}.vue.hbs
...dules}}/{{pages@DETREEVIEW}}/{{pages@DETREEVIEW}}.vue.hbs
+13
-1
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/PageModel.java
浏览文件 @
f774df1d
...
...
@@ -6,6 +6,7 @@ import lombok.Getter;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
net.ibizsys.model.app.view.IPSAppUIAction
;
import
net.ibizsys.model.app.view.IPSAppView
;
import
net.ibizsys.model.control.IPSControl
;
import
net.ibizsys.model.control.expbar.IPSExpBar
;
...
...
@@ -104,6 +105,11 @@ public class PageModel extends BaseModel{
appUIAction
.
put
(
"uIActionType"
,
UIAction
.
getUIActionType
());
appUIAction
.
put
(
"actionTarget"
,
UIAction
.
getActionTarget
());
appUIAction
.
put
(
"dataAccessAction"
,
UIAction
.
getDataAccessAction
());
if
(
UIAction
instanceof
IPSAppUIAction
)
{
if
(((
IPSAppUIAction
)
UIAction
).
getCounterId
()
!=
null
)
{
appUIAction
.
put
(
"counterId"
,
((
IPSAppUIAction
)
UIAction
).
getCounterId
());
}
}
toolbarItem
.
put
(
"uIAction"
,
appUIAction
);
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/views/view-base-config.hbs
浏览文件 @
f774df1d
...
...
@@ -79,7 +79,7 @@
{{#
page
.
viewToolBarItems
}}
toolbar: [
{{#
items
}}
{ id:'
{{
id
}}
',name:'
{{
name
}}
',caption:'
{{
caption
}}
',groupExtractMode:'
{{
groupExtractMode
}}
',itemType:'
{{
itemType
}}
',noPrivDisplayMode:'
{{
noPrivDisplayMode
}}
',showIcon:
{{
showIcon
}}
,showCaption:
{{
showCaption
}}
,tooltip:'
{{
tooltip
}}
',disabled: false, visible: true, imgPath: '
{{
imgPath
}}
',iconClass: '
{{
iconClass
}}
',xDataControlName:'
{{
xDataControlName
}}
',
{{#if
uIAction
}}
uIAction:{codeName:'
{{
uIAction
.
codeName
}}
',fullCodeName:'
{{
uIAction
.
fullCodeName
}}
',uIActionMode:'
{{
uIAction
.
uIActionMode
}}
',actionTarget:'
{{
uIAction
.
actionTarget
}}
',uIActionTag:'
{{
uIAction
.
uIActionTag
}}
',dataAccessAction:'
{{
uIAction
.
dataAccessAction
}}
',uIActionType:'
{{
uIAction
.
uIActionType
}}
'}
{{/if}}
},
{ id:'
{{
id
}}
',name:'
{{
name
}}
',caption:'
{{
caption
}}
',groupExtractMode:'
{{
groupExtractMode
}}
',itemType:'
{{
itemType
}}
',noPrivDisplayMode:'
{{
noPrivDisplayMode
}}
',showIcon:
{{
showIcon
}}
,showCaption:
{{
showCaption
}}
,tooltip:'
{{
tooltip
}}
',disabled: false, visible: true, imgPath: '
{{
imgPath
}}
',iconClass: '
{{
iconClass
}}
',xDataControlName:'
{{
xDataControlName
}}
',
{{#if
uIAction
}}
uIAction:{codeName:'
{{
uIAction
.
codeName
}}
',fullCodeName:'
{{
uIAction
.
fullCodeName
}}
',uIActionMode:'
{{
uIAction
.
uIActionMode
}}
',actionTarget:'
{{
uIAction
.
actionTarget
}}
',uIActionTag:'
{{
uIAction
.
uIActionTag
}}
',dataAccessAction:'
{{
uIAction
.
dataAccessAction
}}
',uIActionType:'
{{
uIAction
.
uIActionType
}}
'}
{{
#if
uIAction
.
counterId
}}
,counterId: '
{{
uIAction
.
counterId
}}
'
{{/if}}{{
/if}}
},
{{/
items
}}
],
{{/
page
.
viewToolBarItems
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/common/app-toolbar.vue
浏览文件 @
f774df1d
...
...
@@ -16,6 +16,11 @@ interface ToolbarProps {
* @description 行为模型
*/
actionModel
:
IParam
[];
/**
* @description 计数器数据
*/
counterData
:
IParam
;
}
interface
toolbarEmit
{
(
name
:
"onToolbarEvent"
,
value
:
IActionParam
):
void
;
...
...
@@ -32,6 +37,14 @@ const itemClick = (item: IParam) => {
data
:
item
,
});
};
const
hasCounter
=
(
item
:
any
)
=>
{
console
.
log
(
item
.
counterId
,
props
.
counterData
);
if
(
item
.
counterId
&&
props
.
counterData
&&
props
.
counterData
.
hasOwnProperty
(
item
.
counterId
))
{
return
true
;
}
return
false
;
}
</
script
>
<
template
>
<div
class=
"toolbar"
>
...
...
@@ -42,6 +55,8 @@ const itemClick = (item: IParam) => {
:title=
"item.tooltip"
>
<!-- todo 无权限显示模式 -->
<template
v-if=
"hasCounter(item)"
>
<a-badge
:count=
"counterData[item.counterId]"
>
<a-button
v-show=
"item.visible"
:class=
"['toolbar-item', item.class]"
...
...
@@ -53,6 +68,21 @@ const itemClick = (item: IParam) => {
:iconClass=
"item.showIcon ? item.iconClass : undefined"
:imgPath=
"item.showIcon ? item.imgPath : undefined"
/>
</a-button>
</a-badge>
</
template
>
<
template
v-else
>
<a-button
v-show=
"item.visible"
:class=
"['toolbar-item', item.class]"
:disabled=
"item.disabled"
@
click=
"itemClick(item)"
>
<AppIconText
:text=
"item.showCaption ? item.caption : undefined"
:iconClass=
"item.showIcon ? item.iconClass : undefined"
:imgPath=
"item.showIcon ? item.imgPath : undefined"
/>
</a-button>
</
template
>
</a-tooltip>
<!-- todo 模型缺失 -->
<!-- <a-dropdown v-else-if="Object.is(item.itemType, 'ITEMS')" v-show="item.visible">
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/interface/service/i-app-counter-service.ts
浏览文件 @
f774df1d
...
...
@@ -5,6 +5,14 @@
*/
export
interface
IAppCounterService
{
/**
* 计数器数据
*
* @type {*}
* @memberof IAppCounterService
*/
data
:
any
;
/**
* 执行计数器
*
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
浏览文件 @
f774df1d
...
...
@@ -38,9 +38,10 @@ const collapsedChange = () => {
collapsed
.
value
=
!
collapsed
.
value
;
}
{{#if
page
.
psAppCounterRefs
}}
// 计数器数据
const
counterData
=
computed
(()
=>
{
const
{
counterServices
}
=
toRefs
(
state
);
if
(
counterServices
.
value
&&
counterServices
.
value
.
length
)
{
if
(
counterServices
&&
counterServices
.
value
&&
counterServices
.
value
.
length
)
{
return
counterServices
.
value
[
0
].
data
;
}
return
{};
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEEDITVIEW}}/{{pages@DEEDITVIEW}}.vue.hbs
浏览文件 @
f774df1d
...
...
@@ -31,7 +31,16 @@ const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法
const
editView
=
new
EditView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
form
,
onToolbarEvent
,
onCtrlEvent
}
=
editView
;
{{#if
page
.
psAppCounterRefs
}}
// 计数器数据
const
counterData
=
computed
(()
=>
{
const
{
counterServices
}
=
toRefs
(
state
);
if
(
counterServices
&&
counterServices
.
value
&&
counterServices
.
value
.
length
)
{
return
counterServices
.
value
[
0
].
data
;
}
return
{};
})
{{/if}}
</script>
<template>
...
...
@@ -51,6 +60,9 @@ const { state, form, onToolbarEvent, onCtrlEvent } = editView;
mode=
"button"
name=
"
{{
lowerCase
codeName
}}
"
:actionModel=
"state.toolbar"
{{#if
page
.
psAppCounterRefs
}}
:counterData=
"counterData"
{{/if}}
@
onToolbarEvent=
"onToolbarEvent"
/>
</template>
{{/
eq
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
浏览文件 @
f774df1d
...
...
@@ -41,7 +41,16 @@ const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法
const
gridView
=
new
GridView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
grid
,
searchForm
,
quickSearchForm
,
onCtrlEvent
,
onToolbarEvent
,
onQuickGroupEvent
,
onQuickSearchEvent
}
=
gridView
;
{{#if
page
.
psAppCounterRefs
}}
// 计数器数据
const
counterData
=
computed
(()
=>
{
const
{
counterServices
}
=
toRefs
(
state
);
if
(
counterServices
&&
counterServices
.
value
&&
counterServices
.
value
.
length
)
{
return
counterServices
.
value
[
0
].
data
;
}
return
{};
})
{{/if}}
</script>
<template>
...
...
@@ -61,6 +70,9 @@ const { state, grid, searchForm, quickSearchForm, onCtrlEvent, onToolbarEvent, o
mode=
"button"
name=
"
{{
lowerCase
codeName
}}
"
:actionModel=
"state.toolbar"
{{#if
page
.
psAppCounterRefs
}}
:counterData=
"counterData"
{{/if}}
@
onToolbarEvent=
"onToolbarEvent"
/>
</template>
{{/
eq
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DETREEVIEW}}/{{pages@DETREEVIEW}}.vue.hbs
浏览文件 @
f774df1d
...
...
@@ -40,7 +40,16 @@ const emit = defineEmits<ViewEmit>();
// 安装功能模块,提供状态和能力方法
const
treeView
=
new
TreeView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
tree
,
onCtrlEvent
,
onToolbarEvent
,
onQuickGroupEvent
,
onQuickSearchEvent
}
=
treeView
;
{{#if
page
.
psAppCounterRefs
}}
// 计数器数据
const
counterData
=
computed
(()
=>
{
const
{
counterServices
}
=
toRefs
(
state
);
if
(
counterServices
&&
counterServices
.
value
&&
counterServices
.
value
.
length
)
{
return
counterServices
.
value
[
0
].
data
;
}
return
{};
})
{{/if}}
</script>
<template>
...
...
@@ -60,6 +69,9 @@ const { state, tree, onCtrlEvent, onToolbarEvent, onQuickGroupEvent, onQuickSear
mode=
"button"
name=
"
{{
lowerCase
codeName
}}
"
:actionModel=
"state.toolbar"
{{#if
page
.
psAppCounterRefs
}}
:counterData=
"counterData"
{{/if}}
@
onToolbarEvent=
"onToolbarEvent"
/>
</template>
{{/
eq
}}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录