Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
a9af16e2
提交
a9af16e2
编写于
12月 31, 2021
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新表格
上级
1cb602a1
变更
8
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
171 行增加
和
59 行删除
+171
-59
grid-column-model.hbs
...sources/templ/r7/@macro/grid-detail/grid-column-model.hbs
+32
-30
grid-column.hbs
...ain/resources/templ/r7/@macro/grid-detail/grid-column.hbs
+21
-18
grid-uacolumn-model.hbs
...urces/templ/r7/@macro/grid-detail/grid-uacolumn-model.hbs
+11
-0
include-grid.hbs
...in/resources/templ/r7/@macro/grid-detail/include-grid.hbs
+2
-1
grid-service.ts
...s}}/src/ibiz-core/service/control-service/grid-service.ts
+80
-0
index.ts
...p_{{apps}}/src/ibiz-core/service/control-service/index.ts
+2
-1
{{ctrls@GRID}}-grid-config.ts.hbs
...s}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-config.ts.hbs
+23
-9
{{ctrls@GRID}}-grid-service.ts.hbs
...}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-service.ts.hbs
+0
-0
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/grid-detail/grid-column-model.hbs
浏览文件 @
a9af16e2
{
{{#
unless
(
or
item
.
hideDefault
item
.
hiddenDataItem
)
}}
{
title: "
{{
item
.
caption
}}
",
columnType: "
{{
item
.
columnType
}}
",
{{#if
item
.
align
}}
...
...
@@ -27,4 +28,5 @@
aggMode: "
{{
item
.
aggMode
}}
",
{{/if}}
{{/
eq
}}
},
},
{{/
unless
}}
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/grid-detail/grid-column.hbs
浏览文件 @
a9af16e2
{{#if
(
neq
item
.
columnType
'GROUPGRIDCOLUMN'
)
}}
<div
v-if=
"Object.is(column.dataIndex, '
{{
item
.
codeName
}}
')"
class=
"table-cell"
>
{{#if
(
eq
item
.
columnType
'DEFGRIDCOLUMN'
)
}}
{{>
@macro
/
editor
/
include-editor
.
hbs
}}
{{#if
(
eq
item
.
columnType
'GROUPGRIDCOLUMN'
)
}}
{{#
each
item
.
psDEGridColumns
as
|
column
|
}}
{{>
(
lookup
'COLUMN'
)
item
=
column
ctrl
=
ctrl
}}
{{/
each
}}
{{else}}
{{#
unless
(
or
item
.
hideDefault
item
.
hiddenDataItem
)
}}
<div
v-if=
"Object.is(column.dataIndex, '
{{#if
item
.
dataItemName
}}{{
lowerCase
item
.
dataItemName
}}{{else}}{{
item
.
codeName
}}{{/if}}
')"
class=
"table-cell"
>
{{#if
(
eq
item
.
columnType
'DEFGRIDCOLUMN'
)
}}
{{#if
item
.
enableRowEdit
}}
<div
v-if=
"state.rowEditState"
class=
"editor-cell"
>
{{#
each
ctrl
.
psDEGridEditItems
as
|
editColumn
|
}}
{{#
eq
editColumn
.
codeName
(
item
.
codeName
)
}}
{{#if
item
.
psEditor
}}
{{>
(
lookup
.
'item.psEditor.editorType'
)
item
=
item
ctrlType
=
"grid"
}}
{{#if
(
eq
editColumn
.
codeName
item
.
codeName
)
}}
{{>
(
lookup
.
'editColumn.psEditor.editorType'
)
item
=
editColumn
ctrlType
=
"grid"
}}
{{/if}}
{{/
eq
}}
{{/
each
}}
</div>
<div
v-else
class=
"text-cell"
>
...
...
@@ -20,13 +23,13 @@
<span
class=
"text"
>
\{{text}}
</span>
</div>
{{/if}}
{{/if}}
{{#if
(
eq
item
.
columnType
'UAGRIDCOLUMN'
)
}}
<ibizToolbar
{{else
if
(
eq
item
.
columnType
'UAGRIDCOLUMN'
)
}}
<ibizToolbar
mode=
"link"
name=
"
{{
lowerCase
item
.
codeName
}}
"
:actionModel=
"record.
{{
lowerCase
item
.
codeName
}}
"
@
toolbarEvent=
"($event) => handleToolbarEvent(record, $event)"
/>
{{/if}}
{{/if}}
</div>
{{/
unless
}}
{{/if}}
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/grid-detail/grid-uacolumn-model.hbs
0 → 100644
浏览文件 @
a9af16e2
{{#if
(
eq
item
.
columnType
'GROUPGRIDCOLUMN'
)
}}
{{#
each
item
.
psDEGridColumns
as
|
column
|
}}
{{>
(
lookup
'UACOLUMNMODEL'
)
item
=
column
}}
{{/
each
}}
{{else
if
(
eq
item
.
columnType
'UAGRIDCOLUMN'
)
}}
{{#
each
item
.
psDEUIActionGroup
.
psUIActionGroupDetails
as
|
action
|
}}
{{#
action
}}
{ name: "
{{
name
}}
", caption: "
{{
psUIAction
.
caption
}}
", showIcon:
{{
showIcon
}}
, showCaption:
{{
showCaption
}}
, separator:
{{
addSeparator
}}
, uIActionTag: "
{{
psUIAction
.
uIActionTag
}}
", noPrivDisplayMode:
{{#if
psUIAction
.
noPrivDisplayMode
}}{{
psUIAction
.
noPrivDisplayMode
}}{{else}}
6
{{/if}}
, disabled: false, visible: true,
{{#if
psUIAction
.
psSysImage
}}{{#if
psUIAction
.
psSysImage
.
imagePath
}}
imgPath: "
{{
psUIAction
.
psSysImage
.
imagePath
}}
",
{{/if}}{{#if
psUIAction
.
psSysImage
.
cssClass
}}
iconClass: "
{{
psUIAction
.
psSysImage
.
cssClass
}}
",
{{/if}}{{/if}}
},
{{/
action
}}
{{/
each
}}
{{/if}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/grid-detail/include-grid.hbs
浏览文件 @
a9af16e2
{{#
*
inline
"COLUMN"
}}{{>
@macro
/
grid-detail
/
grid-column
.
hbs
}}{{/
inline
}}
{{#
*
inline
"COLUMNMODEL"
}}{{>
@macro
/
grid-detail
/
grid-column-model
.
hbs
}}{{/
inline
}}
{{#
*
inline
"UACOLUMNMODEL"
}}{{>
@macro
/
grid-detail
/
grid-uacolumn-model
.
hbs
}}{{/
inline
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/service/control-service/grid-service.ts
0 → 100644
浏览文件 @
a9af16e2
import
{
ControlServiceBase
,
ControlVOBase
,
hasFunction
}
from
'@ibiz-core'
;
/**
* @description 表格部件服务
* @export
* @class EditFormService
* @extends {ControlServiceBase<T>}
* @template T 部件数据对象类型
*/
export
class
GridService
<
T
extends
ControlVOBase
>
extends
ControlServiceBase
<
T
>
{
/**
* 加载数据
*
* @param [context={}] 上下文参数
* @param [data={}] 视图参数
* @param opts
* @return {*}
*/
public
async
get
(
context
:
any
,
data
:
any
,
opts
:
{
action
:
string
;
isLoading
?:
boolean
}):
Promise
<
any
>
{
let
_entityService
:
any
=
this
.
entityService
;
const
{
context
:
Context
,
data
:
Data
}
=
this
.
handleRequestData
(
context
,
data
,
opts
);
const
action
=
hasFunction
(
_entityService
,
opts
.
action
)
?
opts
.
action
:
'GET'
;
const
response
=
await
_entityService
[
action
](
Context
,
Data
,
opts
.
isLoading
);
// this.setRemoteCopyData(response);
response
.
data
=
this
.
newControlVO
(
response
.
data
);
return
this
.
handleResponse
(
response
,
opts
);
}
/**
* 创建数据
*
* @param [context={}] 上下文参数
* @param [data={}] 视图参数
* @param opts
* @return {*}
*/
public
async
create
(
context
:
any
,
data
:
any
,
opts
:
{
action
:
string
;
isLoading
?:
boolean
}):
Promise
<
any
>
{
let
_entityService
:
any
=
this
.
entityService
;
const
{
context
:
Context
,
data
:
Data
}
=
this
.
handleRequestData
(
context
,
data
,
opts
);
const
action
=
hasFunction
(
_entityService
,
opts
.
action
)
?
opts
.
action
:
'Create'
;
const
response
=
await
_entityService
[
action
](
Context
,
Data
,
opts
.
isLoading
);
response
.
data
=
this
.
newControlVO
(
response
.
data
);
return
this
.
handleResponse
(
response
,
opts
);
}
/**
* 删除数据
*
* @param [context={}] 上下文参数
* @param [data={}] 视图参数
* @param opts
* @return {*}
*/
public
async
remove
(
context
:
any
,
data
:
any
,
opts
:
{
action
:
string
;
isLoading
?:
boolean
}):
Promise
<
any
>
{
let
_entityService
:
any
=
this
.
entityService
;
const
{
context
:
Context
,
data
:
Data
}
=
this
.
handleRequestData
(
context
,
data
,
opts
);
const
action
=
hasFunction
(
_entityService
,
opts
.
action
)
?
opts
.
action
:
'Remove'
;
const
response
=
await
_entityService
[
action
](
Context
,
Data
,
opts
.
isLoading
);
response
.
data
=
this
.
newControlVO
(
response
.
data
);
return
this
.
handleResponse
(
response
,
opts
);
}
/**
* 更新数据
*
* @param [context={}] 上下文参数
* @param [data={}] 视图参数
* @param opts
* @return {*}
*/
public
async
update
(
context
:
any
,
data
:
any
,
opts
:
{
action
:
string
;
isLoading
?:
boolean
}):
Promise
<
any
>
{
let
_entityService
:
any
=
this
.
entityService
;
const
{
context
:
Context
,
data
:
Data
}
=
this
.
handleRequestData
(
context
,
data
,
opts
);
const
action
=
hasFunction
(
_entityService
,
opts
.
action
)
?
opts
.
action
:
'Update'
;
const
response
=
await
_entityService
[
action
](
Context
,
Data
,
opts
.
isLoading
);
response
.
data
=
this
.
newControlVO
(
response
.
data
);
return
this
.
handleResponse
(
response
,
opts
);
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/service/control-service/index.ts
浏览文件 @
a9af16e2
export
*
from
'./control-service-base'
export
*
from
'./edit-form-service'
export
*
from
'./grid-service'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-config.ts.hbs
浏览文件 @
a9af16e2
{{>
@macro
/
grid-detail
/
include-grid
.
hbs
}}
import { IParam } from '@ibiz-core';
import { ControlVOBase, IParam, GridService } from '@ibiz-core';
import {
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service } from '@service/entity/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
/
{{
spinalCase
ctrl
.
psAppDataEntity
.
codeName
}}
-service';
export class ControlVO extends ControlVOBase {
constructor(data: any){
super(data);
}
{{#
each
ctrl
.
psDEGridDataItems
as
|
dataItem
|
}}
get
{{
lowerCase
dataItem
.
name
}}
() {
return this.$DO.
{{
lowerCase
dataItem
.
psAppDEField
.
codeName
}}
;
}
set
{{
lowerCase
dataItem
.
name
}}
(value: any) {
this.$DO.
{{
lowerCase
dataItem
.
psAppDEField
.
codeName
}}
= value;
}
{{/
each
}}
}
export const CtrlConfig = {
controlCodeName: "
{{
ctrl
.
codeName
}}
",
controlName: "
{{
ctrl
.
name
}}
",
controlService: new GridService
<ControlVO>
(ControlVO, new
{{
pascalCase
ctrl
.
psAppDataEntity
.
codeName
}}
Service() ),
items: [],
dataAgg: [],
selectedRowKeys: [],
...
...
@@ -45,13 +65,7 @@ export const CtrlConfig = {
{{/if}}
uAColumnModel:[
{{#
each
ctrl
.
psDEGridColumns
as
|
column
|
}}
{{#if
(
eq
column
.
columnType
'UAGRIDCOLUMN'
)
}}
{{#
each
column
.
psDEUIActionGroup
.
psUIActionGroupDetails
as
|
action
|
}}
{{#
action
}}
{ name: "
{{
name
}}
", caption: "
{{
psUIAction
.
caption
}}
", showIcon:
{{
showIcon
}}
, showCaption:
{{
showCaption
}}
, separator:
{{
addSeparator
}}
, uIActionTag: "
{{
psUIAction
.
uIActionTag
}}
", noPrivDisplayMode:
{{#if
psUIAction
.
noPrivDisplayMode
}}{{
psUIAction
.
noPrivDisplayMode
}}{{else}}
6
{{/if}}
, disabled: false, visible: true,
{{#if
psUIAction
.
psSysImage
}}{{#if
psUIAction
.
psSysImage
.
imagePath
}}
imgPath: "
{{
psUIAction
.
psSysImage
.
imagePath
}}
",
{{/if}}{{#if
psUIAction
.
psSysImage
.
cssClass
}}
iconClass: "
{{
psUIAction
.
psSysImage
.
cssClass
}}
",
{{/if}}{{/if}}
},
{{/
action
}}
{{/
each
}}
{{/if}}
{{>
(
lookup
'UACOLUMNMODEL'
)
item
=
column
}}
{{/
each
}}
],
columnsModel: [
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@GRID}}-grid/{{ctrls@GRID}}-grid-service.ts.hbs
已删除
100644 → 0
浏览文件 @
1cb602a1
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录