Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
9cf7c3fd
提交
9cf7c3fd
编写于
3月 24, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
822cb13e
变更
7
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
49 行增加
和
17 行删除
+49
-17
control-base.ts
...s}}/src/core/modules/widgets/control-base/control-base.ts
+10
-2
exp-bar-control.ts
...c/core/modules/widgets/exp-bar-control/exp-bar-control.ts
+1
-1
list-control.ts
...s}}/src/core/modules/widgets/list-control/list-control.ts
+2
-0
{{ctrls@TABEXPPANEL}}-tab-exp-panel-state.ts.hbs
...xp-panel/{{ctrls@TABEXPPANEL}}-tab-exp-panel-state.ts.hbs
+26
-0
{{ctrls@TABEXPPANEL}}-tab-exp-panel.vue.hbs
...tab-exp-panel/{{ctrls@TABEXPPANEL}}-tab-exp-panel.vue.hbs
+7
-1
{{ctrls@TREEVIEW}}-tree-state.ts.hbs
...trls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree-state.ts.hbs
+1
-1
{{ctrls@TREEVIEW}}-tree.vue.hbs
...}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree.vue.hbs
+2
-12
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/control-base/control-base.ts
浏览文件 @
9cf7c3fd
...
...
@@ -85,6 +85,15 @@ export class ControlBase {
counterService
.
value
.
destory
();
}
});
// 获取计数器数据
const
getCounterData
=
(
counterId
:
string
):
number
=>
{
if
(
counterService
&&
counterService
.
value
)
{
return
counterService
.
value
.
data
[
counterId
];
}
return
0
;
}
return
getCounterData
;
}
/**
...
...
@@ -123,12 +132,11 @@ export class ControlBase {
this
.
setState
();
// 处理导航参数
this
.
useControlContextParams
();
// 使用计数器服务
this
.
useCounterService
();
return
{
state
:
this
.
state
,
name
:
this
.
state
.
controlName
,
getData
:
this
.
getData
.
bind
(
this
),
getCounterData
:
this
.
useCounterService
(),
onCtrlEvent
:
this
.
onCtrlEvent
.
bind
(
this
),
};
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/exp-bar-control/exp-bar-control.ts
浏览文件 @
9cf7c3fd
...
...
@@ -224,7 +224,7 @@ export class ExpBarControl extends MainControl {
this
.
useExpCtrlInit
();
return
{
...
superParams
,
search
:
this
.
search
.
bind
(
this
),
search
:
this
.
useSearch
(
),
onToolbarEvent
:
this
.
onToolbarEvent
.
bind
(
this
)
};
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/list-control/list-control.ts
浏览文件 @
9cf7c3fd
...
...
@@ -32,6 +32,8 @@ export class ListControl extends MDControl {
});
})
}
// 清空选中数据,避免多次加载选中效果异常
this
.
state
.
selections
=
[];
// 处理分组
this
.
handleDataGroup
();
// 处理默认选中
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TABEXPPANEL}}-tab-exp-panel/{{ctrls@TABEXPPANEL}}-tab-exp-panel-state.ts.hbs
浏览文件 @
9cf7c3fd
...
...
@@ -2,4 +2,30 @@ export const ctrlState = {
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
data: {},
{{#if
ctrl
.
psAppCounterRefs
}}
appCounterRefs: [
{{#
each
ctrl
.
psAppCounterRefs
as
|
counterRef
|
}}
{{#if
counterRef
.
psAppCounter
}}
{{#
with
counterRef
.
psAppCounter
as
|
counter
|
}}
{
id: '
{{
counterRef
.
id
}}
',
getAction: '
{{
counter
.
getPSAppDEAction
.
codeName
}}
',
timer:
{{#if
counter
.
timer
}}{{
counter
.
timer
}}{{else}}
6000
{{/if}}
,
{{#if
counter
.
psAppDataEntity
}}
deCodeName: '
{{
lowerCase
counter
.
psAppDataEntity
.
codeName
}}
'
{{/if}}
}
{{#
unless
@last
}}
,
{{/
unless
}}
{{/
with
}}
{{/if}}
{{/
each
}}
],
counterServices: [],
{{#if
ctrl
.
psControls
}}
{{#
each
ctrl
.
psControls
as
|
viewPanel
|
}}
{{#
and
viewPanel
.
psAppCounterRef
viewPanel
.
psAppCounterRef
.
psAppCounter
viewPanel
.
counterId
}}
{{
viewPanel
.
name
}}
Counter: { id: '
{{
viewPanel
.
psAppCounterRef
.
id
}}
', counterId: '
{{
viewPanel
.
counterId
}}
' },
{{/
and
}}
{{/
each
}}
{{/if}}
{{/if}}
};
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TABEXPPANEL}}-tab-exp-panel/{{ctrls@TABEXPPANEL}}-tab-exp-panel.vue.hbs
浏览文件 @
9cf7c3fd
...
...
@@ -37,7 +37,7 @@ const emit = defineEmits <CtrlEmit> ();
// 安装功能模块,提供状态和能力方法
const
tabExpPanelControl
=
new
TabExpPanelControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onCtrlEvent
}
=
tabExpPanelControl
;
const
{
name
,
state
,
onCtrlEvent
,
getCounterData
}
=
tabExpPanelControl
;
// 暴露内部状态及能力
defineExpose
({
name
,
state
});
...
...
@@ -51,7 +51,13 @@ defineExpose({ name, state });
{{#
each
ctrl
.
psControls
as
|
viewPanel
|
}}
<a-tab-pane
key=
"
{{
viewPanel
.
name
}}
"
>
<template
#
tab
>
{{#
and
viewPanel
.
psAppCounterRef
viewPanel
.
counterId
}}
<a-badge
:count=
"getCounterData('
{{
viewPanel
.
name
}}
Counter', '
{{
viewPanel
.
counterId
}}
')"
>
<AppIconText
{{#if
viewPanel
.
psSysImage
}}{{#if
viewPanel
.
psSysImage
.
cssClass
}}
iconClass=
"
{{
viewPanel
.
psSysImage
.
cssClass
}}
"
{{/if}}{{#if
viewPanel
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
viewPanel
.
psSysImage
.
imagePath
}}
"
{{/if}}{{/if}}
text=
"
{{
viewPanel
.
caption
}}
"
/>
</a-badge>
{{else}}
<AppIconText
{{#if
viewPanel
.
psSysImage
}}{{#if
viewPanel
.
psSysImage
.
cssClass
}}
iconClass=
"
{{
viewPanel
.
psSysImage
.
cssClass
}}
"
{{/if}}{{#if
viewPanel
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
viewPanel
.
psSysImage
.
imagePath
}}
"
{{/if}}{{/if}}
text=
"
{{
viewPanel
.
caption
}}
"
/>
{{/
and
}}
</template>
<
{{
viewPanel
.
codeName
}}
TabViewPanel
name=
"
{{
name
}}
"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree-state.ts.hbs
浏览文件 @
9cf7c3fd
...
...
@@ -201,7 +201,7 @@ export const ctrlState = {
{{/if}}
{{/
with
}}
},
counterService:
ref(null)
,
counterService:
{}
,
{{/
and
}}
contextMenus: {
{{#
each
ctrl
.
psDETreeNodes
as
|
treeNode
|
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TREEVIEW}}-tree/{{ctrls@TREEVIEW}}-tree.vue.hbs
浏览文件 @
9cf7c3fd
...
...
@@ -49,18 +49,8 @@ const getCustomText = (scriptCode: any) => {
}
// 安装功能模块,提供状态和能力方法
const
{
name
,
state
,
load
,
refresh
,
onTreeNodeSelect
,
onContextMenuClick
,
onRightClick
,
onCheck
}
=
new
TreeControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
load
,
refresh
,
onTreeNodeSelect
,
onContextMenuClick
,
onRightClick
,
onCheck
,
getCounterData
}
=
new
TreeControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
{{#
and
ctrl
.
psAppCounterRef
ctrl
.
psAppCounterRef
.
psAppCounter
}}
// 获取计数器数据
const
counterData
=
computed
(()
=>
{
const
{
counterService
}
=
state
;
if
(
counterService
)
{
return
counterService
.
data
;
}
return
{};
})
{{/
and
}}
// 暴露内部状态及能力
defineExpose
({
name
,
state
,
load
,
refresh
});
</script>
...
...
@@ -103,7 +93,7 @@ defineExpose({ name, state, load, refresh });
<span
:class=
"['app-tree-node__text', node.cssName]"
:title=
"node.tooltip ? node.tooltip : node.text"
>
<a-badge
v-if=
"node.counterId
&& counterData.hasOwnProperty(node.counterId)"
class=
"node__text-badge"
:count=
"counterData[node.counterId]
"
>
<a-badge
v-if=
"node.counterId
"
class=
"node__text-badge"
:count=
"getCounterData(node.counterId)
"
>
<template
v-if=
"node.textCustomCode && node.textScriptCode"
>
<span
:domPropsInnerHtml=
"getCustomText(node.textScriptCode)"
></span>
</template>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录