Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
e88f8b54
提交
e88f8b54
编写于
3月 03, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:新增列表界面行为绘制支持
上级
cad9386e
变更
6
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
113 行增加
和
17 行删除
+113
-17
list-control-state.ts
...c/core/modules/widgets/list-control/list-control-state.ts
+7
-1
list-control.ts
...s}}/src/core/modules/widgets/list-control/list-control.ts
+13
-0
app-list.scss
...ces/templ/r7/app_{{apps}}/src/style/widgets/app-list.scss
+16
-0
index.scss
...ources/templ/r7/app_{{apps}}/src/style/widgets/index.scss
+2
-1
{{ctrls@LIST}}-list-state.ts.hbs
...es}}/{{ctrls@LIST}}-list/{{ctrls@LIST}}-list-state.ts.hbs
+39
-2
{{ctrls@LIST}}-list.vue.hbs
...ntities}}/{{ctrls@LIST}}-list/{{ctrls@LIST}}-list.vue.hbs
+36
-13
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/list-control/list-control-state.ts
浏览文件 @
e88f8b54
import
{
IParam
}
from
"@core"
;
import
{
MDControlState
}
from
"../md-control"
;
/**
...
...
@@ -7,5 +8,10 @@ import { MDControlState } from "../md-control";
* @extends {MDControl}
*/
export
interface
ListControlState
extends
MDControlState
{
/**
* @description 界面行为集合
* @type {IParam[]}
* @memberof ListControlState
*/
uIActions
:
IParam
[];
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/list-control/list-control.ts
浏览文件 @
e88f8b54
import
{
IParam
}
from
"@core"
;
import
{
MDControl
}
from
"../md-control"
;
/**
...
...
@@ -8,6 +9,17 @@ import { MDControl } from "../md-control";
*/
export
class
ListControl
extends
MDControl
{
/**
* @description 触发界面行为
* @protected
* @param {IParam} action 界面行为
* @param {MouseEvent} event 鼠标源事件
* @memberof ListControl
*/
protected
onUIAction
(
action
:
IParam
,
event
:
MouseEvent
)
{
console
.
log
(
action
,
event
);
}
/**
* @description 安装部件所有功能模块的方法
* @return {*}
...
...
@@ -17,6 +29,7 @@ export class ListControl extends MDControl {
const
superParams
=
super
.
moduleInstall
();
return
{
...
superParams
,
onUIAction
:
this
.
onUIAction
.
bind
(
this
)
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/app-list.scss
0 → 100644
浏览文件 @
e88f8b54
.app-list
{
.list-item__action
{
color
:
#2d8cf0
;
cursor
:
pointer
;
&
:not
(
:first-child
)
{
padding-left
:
12px
;
}
i
,
img
{
padding-right
:
6px
;
}
}
.list-item__action.disabled
{
color
:
#d2d2d2
;
cursor
:
no-drop
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/index.scss
浏览文件 @
e88f8b54
...
...
@@ -8,3 +8,4 @@
@use
'./app-portlet.scss'
;
@use
'./app-grid.scss'
;
@use
'./app-tree.scss'
;
@use
'./app-list.scss'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@LIST}}-list/{{ctrls@LIST}}-list-state.ts.hbs
浏览文件 @
e88f8b54
import { ControlVOBase, IParam, ListService, isEmpty, Verify } from '@core';
import {
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service } from '@api/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
-service';
import {
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service } from '@api/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
-service';
export class ControlVO extends ControlVOBase {
constructor(data: any){
super(data);
// 列表自持属性
this.$ownKeys =
{{
~#
each
ctrl
.
psDEListDataItems
as
|
dataItem
|
~
}}
{{#if
@first
}}
[
{{/
if
~
}}
'
{{
lowerCase
dataItem
.
name
}}
'
{{#
unless
@last
}}
,
{{/
unless
}}
{{
~#
if
@last
}}
];
{{/
if
~
}}
{{/
each
}}
}
{{#
each
ctrl
.
psDEListDataItems
as
|
dataItem
|
}}
{{#if
dataItem
.
psAppDEField
}}
get
{{
lowerCase
dataItem
.
name
}}
() {
return this.$DO.
{{
lowerCase
dataItem
.
psAppDEField
.
codeName
}}
;
}
set
{{
lowerCase
dataItem
.
name
}}
(value: any) {
this.$DO.
{{
lowerCase
dataItem
.
psAppDEField
.
codeName
}}
= value;
}
{{/if}}
{{/
each
}}
}
export const ctrlState = {
...
...
@@ -38,4 +59,20 @@ export const ctrlState = {
current: 1,
pageSize:
{{#if
ctrl
.
pagingSize
}}{{
ctrl
.
pagingSize
}}{{else}}
20
{{/if}}
},
// 界面行为
uIActions: {
{{#
each
ctrl
.
psDEListItems
as
|
listItem
|
}}
{{#
and
listItem
.
psDEUIActionGroup
listItem
.
psDEUIActionGroup
.
psUIActionGroupDetails
}}
{{#
listItem
}}
{{#
each
psDEUIActionGroup
.
psUIActionGroupDetails
as
|
uiActionDetail
|
}}
{{#if
uiActionDetail
.
getPSUIAction
}}
{{#
uiActionDetail
.
getPSUIAction
}}
{{
uIActionTag
}}
: { caption: '
{{
caption
}}
', tooltip: '
{{
tooltip
}}
', showCaption:
{{
..
/
showCaption
}}
, showIcon:
{{
..
/
showIcon
}}
, uIActionTag: '
{{
uIActionTag
}}
', uIActionType: '
{{
uIActionType
}}
', dataAccessAction: '
{{
dataAccessAction
}}
', noPrivDisplayMode: '
{{
noPrivDisplayMode
}}
', uIActionMode: '
{{
uIActionMode
}}
', disabled: false, visible: true,
{{#if
coutnerId
}}
counterId: '
{{
counterId
}}
',
{{/if}}{{#if
psSysImage
}}
cssClass: '
{{
psSysImage
.
cssClass
}}
',
{{#if
psSysImage
.
cssClass
}}{{/if}}{{#if
psSysImage
.
imagePath
}}
imagePath: '
{{
psSysImage
.
imagePath
}}
'
{{/if}}{{/if}}
},
{{/
uiActionDetail
.
getPSUIAction
}}
{{/if}}
{{/
each
}}
{{/
listItem
}}
{{/
and
}}
{{/
each
}}
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@LIST}}-list/{{ctrls@LIST}}-list.vue.hbs
浏览文件 @
e88f8b54
...
...
@@ -35,25 +35,48 @@ interface CtrlEmit {
const
emit
=
defineEmits
<
CtrlEmit
>
();
// 安装功能模块,提供状态和能力
const
{
name
,
state
,
useCustom
,
onEditorEvent
,
onToolbarEvent
,
onActionColEvent
,
newRow
,
remove
,
save
,
load
,
refresh
,
getData
,
exportExcel
}
=
new
ListControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
name
,
state
,
onUIAction
,
newRow
,
remove
,
save
,
load
,
refresh
,
getData
,
xDataCtrl
,
exportExcel
}
=
new
ListControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
name
,
state
,
newRow
,
remove
,
save
,
load
,
refresh
,
getData
,
exportExcel
});
</script>
<template>
<a-list
ref=
"xDataCtrl"
class=
"app-list
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
item-layout=
"horizontal"
:data-source=
"state.items"
>
<template
#
renderItem=
"{ item }"
>
<a-list-item>
<a-list-item
class=
"app-list-item"
>
<a-list-item-meta
:description=
"item.srfdescription"
>
<template
#
title
>
2321
<span
class=
"text"
>
\{{item.srfmajortext}}
</span>
</template>
<template
v-if=
"item.srficon"
>
<img
:src=
"item.srficon"
/>
</template>
</a-list-item-meta>
<template
#
actions
v-if=
"state.uIActions"
>
<div
class=
"list-item__actions"
>
<template
v-for=
"(action, index) of state.uIActions"
:key=
"index"
>
<span
v-if=
"action.visible"
:class=
"['list-item__action', action.disabled ? 'disabled' : '']"
:title=
"action.tooltip ? action.tooltip : action.caption"
@
click=
"(event) => onUIAction(action, event)"
>
<template
v-if=
"action.showIcon"
>
<i
v-if=
"action.cssClass"
:class=
"action.cssClass"
/>
<img
v-if=
"action.imagePath"
:src=
"action.imagePath"
/>
</template>
<span
v-if=
"action.showCaption"
class=
"text"
>
\{{action.caption}}
</span>
</span>
</template>
</div>
</template>
</a-list-item>
</template>
</a-list>
</template>
<style
lang=
"scss"
>
.app-list
{
}
</style>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录