Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
3e9e958a
提交
3e9e958a
编写于
1月 05, 2022
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新前端结构
上级
dc15f466
变更
65
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
65 个修改的文件
包含
1605 行增加
和
1141 行删除
+1605
-1141
PageModel.java
...ore/src/main/java/cn/ibizlab/codegen/model/PageModel.java
+71
-1
viewBaseConfig.hbs
.../templ/r7/@macro/front-end/view/common/viewBaseConfig.hbs
+6
-7
App.vue
...core/src/main/resources/templ/r7/app_{{apps}}/src/App.vue
+3
-10
app-func-config.ts.hbs
...rces/templ/r7/app_{{apps}}/src/app/app-func-config.ts.hbs
+31
-0
app-view-config.ts.hbs
...rces/templ/r7/app_{{apps}}/src/app/app-view-config.ts.hbs
+5
-3
app.ts
...e/src/main/resources/templ/r7/app_{{apps}}/src/app/app.ts
+59
-0
index.ts
...src/main/resources/templ/r7/app_{{apps}}/src/app/index.ts
+1
-0
index.scss
...sources/templ/r7/app_{{apps}}/src/custom/style/index.scss
+0
-1
app-func-config.ts.hbs
...ps}}/src/ibiz-core/helper/app-func/app-func-config.ts.hbs
+0
-31
index.ts
...pl/r7/app_{{apps}}/src/ibiz-core/helper/app-func/index.ts
+0
-2
index.ts
...urces/templ/r7/app_{{apps}}/src/ibiz-core/helper/index.ts
+0
-1
index.ts
...in/resources/templ/r7/app_{{apps}}/src/ibiz-core/index.ts
+2
-2
i-ui-action.ts
...{{apps}}/src/ibiz-core/interface/app-logic/i-ui-action.ts
+0
-21
index.ts
...7/app_{{apps}}/src/ibiz-core/interface/app-logic/index.ts
+0
-1
i-app.ts
...empl/r7/app_{{apps}}/src/ibiz-core/interface/app/i-app.ts
+46
-0
index.ts
...empl/r7/app_{{apps}}/src/ibiz-core/interface/app/index.ts
+1
-0
i-view-detail.ts
..._{{apps}}/src/ibiz-core/interface/common/i-view-detail.ts
+5
-5
index.ts
...es/templ/r7/app_{{apps}}/src/ibiz-core/interface/index.ts
+3
-2
i-app-func-service.ts
...pps}}/src/ibiz-core/interface/logic/i-app-func-service.ts
+20
-0
i-open-view-service.ts
...ps}}/src/ibiz-core/interface/logic/i-open-view-service.ts
+18
-0
index.ts
...pl/r7/app_{{apps}}/src/ibiz-core/interface/logic/index.ts
+2
-0
app-func-service.ts
...{apps}}/src/ibiz-core/logic/app-logic/app-func-service.ts
+10
-12
index.ts
...pl/r7/app_{{apps}}/src/ibiz-core/logic/app-logic/index.ts
+1
-0
app-backend-action.ts
...}/src/ibiz-core/logic/app-ui-action/app-backend-action.ts
+24
-0
app-front-action.ts
...s}}/src/ibiz-core/logic/app-ui-action/app-front-action.ts
+23
-0
app-sys-action.ts
...pps}}/src/ibiz-core/logic/app-ui-action/app-sys-action.ts
+24
-0
app-ui-action.ts
...apps}}/src/ibiz-core/logic/app-ui-action/app-ui-action.ts
+4
-4
index.ts
...7/app_{{apps}}/src/ibiz-core/logic/app-ui-action/index.ts
+1
-0
index.ts
...ources/templ/r7/app_{{apps}}/src/ibiz-core/logic/index.ts
+2
-0
index.ts
.../r7/app_{{apps}}/src/ibiz-core/modules/app-logic/index.ts
+0
-1
app-backend-action.ts
...iz-core/modules/app-logic/ui-action/app-backend-action.ts
+0
-36
app-front-action.ts
...ibiz-core/modules/app-logic/ui-action/app-front-action.ts
+0
-36
app-sys-action.ts
...c/ibiz-core/modules/app-logic/ui-action/app-sys-action.ts
+0
-36
index.ts
...apps}}/src/ibiz-core/modules/app-logic/ui-action/index.ts
+0
-1
app-base.ts
...mpl/r7/app_{{apps}}/src/ibiz-core/modules/app/app-base.ts
+59
-0
index.ts
.../templ/r7/app_{{apps}}/src/ibiz-core/modules/app/index.ts
+1
-0
editor-base.ts
.../app_{{apps}}/src/ibiz-core/modules/editor/editor-base.ts
+4
-5
index.ts
...rces/templ/r7/app_{{apps}}/src/ibiz-core/modules/index.ts
+1
-1
main-view.ts
...apps}}/src/ibiz-core/modules/views/main-view/main-view.ts
+39
-12
view-prop-base.ts
...}/src/ibiz-core/modules/views/view-base/view-prop-base.ts
+2
-2
view-state-base.ts
.../src/ibiz-core/modules/views/view-base/view-state-base.ts
+3
-3
control-prop-base.ts
...iz-core/modules/widgets/control-base/control-prop-base.ts
+3
-3
control-state-base.ts
...z-core/modules/widgets/control-base/control-state-base.ts
+2
-2
grid-control-state.ts
...z-core/modules/widgets/grid-control/grid-control-state.ts
+75
-13
grid-control.ts
...rc/ibiz-core/modules/widgets/grid-control/grid-control.ts
+689
-689
main-control-state.ts
...z-core/modules/widgets/main-control/main-control-state.ts
+0
-7
menu-control.ts
...rc/ibiz-core/modules/widgets/menu-control/menu-control.ts
+1
-2
grid-service.ts
...s}}/src/ibiz-core/service/control-service/grid-service.ts
+6
-6
entity-service.ts
...p_{{apps}}/src/ibiz-core/service/entity/entity-service.ts
+2
-2
index.ts
...ources/templ/r7/app_{{apps}}/src/ibiz-core/utils/index.ts
+2
-3
index.ts
...es/templ/r7/app_{{apps}}/src/ibiz-core/utils/net/index.ts
+1
-0
index.ts
...ces/templ/r7/app_{{apps}}/src/ibiz-core/utils/ui/index.ts
+2
-0
route-util.ts
...empl/r7/app_{{apps}}/src/ibiz-core/utils/ui/route-util.ts
+15
-15
ui-util.ts
...s/templ/r7/app_{{apps}}/src/ibiz-core/utils/ui/ui-util.ts
+96
-0
view-util.ts
...es/templ/r7/app_{{apps}}/src/ibiz-core/utils/view-util.ts
+0
-88
index.d.ts
...e/src/main/resources/templ/r7/app_{{apps}}/src/index.d.ts
+5
-0
{{pages@DEGRIDVIEW}}.vue.hbs
...dules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
+1
-1
app.ts
...in/resources/templ/r7/app_{{apps}}/src/service/app/app.ts
+0
-53
index.ts
...main/resources/templ/r7/app_{{apps}}/src/service/index.ts
+0
-2
index.scss
...main/resources/templ/r7/app_{{apps}}/src/style/index.scss
+1
-1
index.scss
...resources/templ/r7/app_{{apps}}/src/style/user/index.scss
+1
-0
app-modal.scss
.../templ/r7/app_{{apps}}/src/utils/app-modal/app-modal.scss
+0
-0
index.ts
...c/main/resources/templ/r7/app_{{apps}}/src/utils/index.ts
+1
-0
open-view-service.ts
.../r7/app_{{apps}}/src/utils/open-view/open-view-service.ts
+5
-6
yarn.lock
...r-core/src/main/resources/templ/r7/app_{{apps}}/yarn.lock
+226
-12
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/PageModel.java
浏览文件 @
3e9e958a
package
cn
.
ibizlab
.
codegen
.
model
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
net.ibizsys.model.app.view.IPSAppView
;
import
org.springframework.util.StringUtils
;
import
net.ibizsys.model.control.toolbar.IPSDETBUIActionItem
;
import
net.ibizsys.model.control.toolbar.IPSDEToolbar
;
import
net.ibizsys.model.view.IPSUIAction
;
import
java.util.*
;
...
...
@@ -42,6 +46,67 @@ public class PageModel extends BaseModel{
}
});
}
// 初始化工具栏数据
if
(
appView
.
getPSControls
()
!=
null
)
{
appView
.
getPSControls
().
forEach
(
item
->{
if
(
"TOOLBAR"
.
equals
(
item
.
getControlType
())){
JSONObject
viewToolBar
=
new
JSONObject
();
viewToolBar
.
put
(
"codeName"
,
item
.
getCodeName
());
viewToolBar
.
put
(
"controlType"
,
item
.
getControlType
());
viewToolBar
.
put
(
"logicName"
,
item
.
getLogicName
());
if
(((
IPSDEToolbar
)
item
).
getPSDEToolbarItems
()
!=
null
){
JSONArray
items
=
new
JSONArray
();
((
IPSDEToolbar
)
item
).
getPSDEToolbarItems
().
forEach
(
singleItam
->{
JSONObject
toolbarItem
=
new
JSONObject
();
toolbarItem
.
put
(
"caption"
,
singleItam
.
getCaption
());
if
(
singleItam
.
getCapPSLanguageRes
()
!=
null
&&
singleItam
.
getCapPSLanguageRes
().
getLanResTag
()
!=
null
){
toolbarItem
.
put
(
"capPSLanguageRes"
,
singleItam
.
getCapPSLanguageRes
().
getLanResTag
());
}
toolbarItem
.
put
(
"tooltip"
,
singleItam
.
getTooltip
());
if
(
singleItam
.
getTooltipPSLanguageRes
()
!=
null
&&
singleItam
.
getTooltipPSLanguageRes
().
getLanResTag
()
!=
null
){
toolbarItem
.
put
(
"tooltipPSLanguageRes"
,
singleItam
.
getTooltipPSLanguageRes
().
getLanResTag
());
}
toolbarItem
.
put
(
"itemType"
,
singleItam
.
getItemType
());
toolbarItem
.
put
(
"name"
,
singleItam
.
getName
());
toolbarItem
.
put
(
"showCaption"
,
singleItam
.
isShowCaption
());
toolbarItem
.
put
(
"showIcon"
,
singleItam
.
isShowIcon
());
if
(
singleItam
.
getPSSysImage
()
!=
null
&&
singleItam
.
getPSSysImage
().
getCssClass
()
!=
null
){
toolbarItem
.
put
(
"iconClass"
,
singleItam
.
getPSSysImage
().
getCssClass
());
}
if
(
singleItam
.
getPSSysImage
()
!=
null
&&
singleItam
.
getPSSysImage
().
getImagePath
()
!=
null
){
toolbarItem
.
put
(
"imgPath"
,
singleItam
.
getPSSysImage
().
getImagePath
());
}
if
(
"DEUIACTION"
.
equals
(
singleItam
.
getItemType
())){
IPSDETBUIActionItem
actionItem
=
(
IPSDETBUIActionItem
)
singleItam
;
toolbarItem
.
put
(
"groupExtractMode"
,
actionItem
.
getNoPrivDisplayMode
());
toolbarItem
.
put
(
"noPrivDisplayMode"
,
actionItem
.
getNoPrivDisplayMode
());
toolbarItem
.
put
(
"id"
,
actionItem
.
getPSAppViewUIAction
().
getId
());
toolbarItem
.
put
(
"xDataControlName"
,
actionItem
.
getPSAppViewUIAction
().
getXDataControlName
());
if
(
actionItem
.
getPSAppViewUIAction
().
getPSUIAction
()
!=
null
){
IPSUIAction
UIAction
=
actionItem
.
getPSAppViewUIAction
().
getPSUIAction
();
JSONObject
appUIAction
=
new
JSONObject
();
appUIAction
.
put
(
"caption"
,
UIAction
.
getCaption
());
if
(
UIAction
.
getCapPSLanguageRes
()
!=
null
&&
UIAction
.
getCapPSLanguageRes
().
getLanResTag
()
!=
null
){
appUIAction
.
put
(
"capPSLanguageRes"
,
UIAction
.
getCapPSLanguageRes
().
getLanResTag
());
}
appUIAction
.
put
(
"codeName"
,
UIAction
.
getCodeName
());
appUIAction
.
put
(
"fullCodeName"
,
UIAction
.
getFullCodeName
());
appUIAction
.
put
(
"name"
,
UIAction
.
getName
());
appUIAction
.
put
(
"uIActionMode"
,
UIAction
.
getUIActionMode
());
appUIAction
.
put
(
"uIActionTag"
,
UIAction
.
getUIActionTag
());
appUIAction
.
put
(
"uIActionType"
,
UIAction
.
getUIActionType
());
toolbarItem
.
put
(
"uIAction"
,
appUIAction
);
}
}
items
.
add
(
toolbarItem
);
});
viewToolBar
.
put
(
"items"
,
items
);
}
toolBarItems
.
add
(
viewToolBar
);
}
});
}
}
...
...
@@ -69,5 +134,10 @@ public class PageModel extends BaseModel{
return
ctrlsMap
.
values
();
}
private
Collection
<
JSONObject
>
toolBarItems
=
new
ArrayList
<>();
public
Collection
<
JSONObject
>
getViewToolBarItems
(){
return
toolBarItems
;
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/view/common/viewBaseConfig.hbs
浏览文件 @
3e9e958a
...
...
@@ -11,13 +11,12 @@
viewType: '
{{
page
.
viewType
}}
',
viewStyle: '
{{
page
.
viewStyle
}}
',
showCaptionBar: '
{{
page
.
viewStyle
}}
',
xDataControlName:'
{{
page
.
xDataControlName
}}
',
viewToolbarModel: [
{{#
page
.
ctrls
}}
{{#
eq
controlType
"TOOLBAR"
}}
{{#
psDEToolbarItems
}}
{ name:'
{{
name
}}
',caption:'
{{
caption
}}
',groupExtractMode:'
{{
groupExtractMode
}}
',itemType:'
{{
itemType
}}
',noPrivDisplayMode:'
{{
noPrivDisplayMode
}}
',showIcon:
{{
showIcon
}}
,showCaption:
{{
showCaption
}}
,tooltip:'
{{
tooltip
}}
',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}}
},
{{/
psDEToolbarItems
}}
{{/
eq
}}
{{/
page
.
ctrls
}}
{{#
page
.
viewToolBarItems
}}
{{#
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
}}
',uIActionTag:'
{{
uIAction
.
uIActionTag
}}
',uIActionType:'
{{
uIAction
.
uIActionType
}}
'}
{{/if}}
},
{{/
items
}}
{{/
page
.
viewToolBarItems
}}
],
{{>
@macro
/
front-end
/
view
/
common
/
controlAction
.
hbs
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/App.vue
浏览文件 @
3e9e958a
<
script
setup
lang=
"ts"
>
// This starter template is using Vue 3
<
script
setup
>
SFCs
// Check out https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup
import
{
App
}
from
'@service'
onMounted
(
async
()
=>
{
await
App
.
init
();
// App.openViewService.openView({codeName: 'ExampleEditorEditView'},{context: {},viewParams:{}})
import
{
App
}
from
'./app'
;
onMounted
(()
=>
{
(
window
as
any
).
App
=
App
.
getInstance
();
})
</
script
>
<
template
>
<router-view
/>
</
template
>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/app-func-config.ts.hbs
0 → 100644
浏览文件 @
3e9e958a
export const AppFuncConfig = [
{{#
each
app
.
allPSAppFuncs
as
|
func
|
}}
{
name: "
{{
func
.
name
}}
",
funcTag: "
{{
func
.
codeName
}}
",
appFuncType: "
{{
func
.
appFuncType
}}
",
{{#if
(
eq
func
.
appFuncType
'OPENHTMLPAGE'
)
}}
htmlPageUrl: "
{{
func
.
htmlPageUrl
}}
",
{{/if}}
{{#if
(
eq
func
.
appFuncType
'APPVIEW'
)
}}
openMode: "
{{
func
.
openMode
}}
",
viewName: "
{{
func
.
psAppView
.
name
}}
",
viewCodeName: "
{{
func
.
psAppView
.
codeName
}}
",
{{/if}}
navParam: {
{{#if
func
.
psNavigateParams
}}
{{#
each
func
.
psNavigateParams
as
|
param
|
}}
{{
lowerCase
param
.
key
}}
: "
{{#if
param
.
rawValue
}}{{
param
.
value
}}{{else}}
%
{{
lowerCase
param
.
value
}}
%
{{/if}}
",
{{/
each
}}
{{/if}}
},
navContext: {
{{#if
func
.
psNavigateContexts
}}
{{#
each
func
.
psNavigateContexts
as
|
context
|
}}
{{
lowerCase
context
.
key
}}
: "
{{#if
context
.
rawValue
}}{{
context
.
value
}}{{else}}
%
{{
lowerCase
context
.
value
}}
%
{{/if}}
",
{{/
each
}}
{{/if}}
},
},
{{/
each
}}
]
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/
public/assets/json/views.json
.hbs
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/
src/app/app-view-config.ts
.hbs
浏览文件 @
3e9e958a
{
{{#
each
app
.
pages
as
|
appView
|
}}
import { IParam } from "@ibiz-core";
export const AppViewConfig:IParam = {
{{#
each
app
.
pages
as
|
appView
|
}}
"
{{
appView
.
codeName
}}
":{
"name": "
{{
appView
.
name
}}
",
"codeName": "
{{
appView
.
codeName
}}
",
...
...
@@ -25,4 +27,4 @@
"fileDir": "@page/
{{#if
psAppDataEntity
}}{{
spinalCase
psAppDataEntity
.
codeName
}}{{else}}
default
{{/if}}
/
{{
spinalCase
appView
.
codeName
}}
"
}
{{#
unless
@last
}}
,
{{/
unless
}}
{{/
each
}}
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/app.ts
0 → 100644
浏览文件 @
3e9e958a
import
{
OpenViewService
}
from
"@/utils"
;
import
{
AppBase
,
IParam
,
ViewDetail
,
IApp
,
IOpenViewService
,
deepCopy
}
from
"@ibiz-core"
;
import
{
AppFuncConfig
}
from
'./app-func-config'
;
import
{
AppViewConfig
}
from
'./app-view-config'
;
export
class
App
extends
AppBase
implements
IApp
{
/**
* 唯一实例
*
* @private
* @static
* @memberof App
*/
private
static
readonly
instance
=
new
App
();
/**
* 获取唯一实例
*
* @static
* @return {*} {App}
* @memberof App
*/
public
static
getInstance
():
App
{
return
App
.
instance
;
}
/**
* 获取所有应用功能
*
* @return {*} {IParam[]}
* @memberof App
*/
public
getAllFuncs
():
IParam
[]
{
return
AppFuncConfig
;
}
/**
* 获取打开视图服务
*
* @return {*} {IOpenViewService}
* @memberof App
*/
public
getOpenViewService
():
IOpenViewService
{
return
OpenViewService
.
getInstance
();
}
/**
* 获取视图信息
*
* @static
* @param codeName 视图codeName
* @return {*}
*/
public
getViewInfo
(
codeName
:
string
):
ViewDetail
|
undefined
{
return
AppViewConfig
[
codeName
]
?
(
deepCopy
(
AppViewConfig
[
codeName
])
as
ViewDetail
)
:
undefined
;;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/app/index.ts
0 → 100644
浏览文件 @
3e9e958a
export
{
App
}
from
'./app'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/custom/style/index.scss
已删除
100644 → 0
浏览文件 @
dc15f466
// todo 用户级样式
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/helper/app-func/app-func-config.ts.hbs
已删除
100644 → 0
浏览文件 @
dc15f466
export const FuncConfig = [
{{#
each
app
.
allPSAppFuncs
as
|
func
|
}}
{
name: "
{{
func
.
name
}}
",
funcTag: "
{{
func
.
codeName
}}
",
appFuncType: "
{{
func
.
appFuncType
}}
",
{{#if
(
eq
func
.
appFuncType
'OPENHTMLPAGE'
)
}}
htmlPageUrl: "
{{
func
.
htmlPageUrl
}}
",
{{/if}}
{{#if
(
eq
func
.
appFuncType
'APPVIEW'
)
}}
openMode: "
{{
func
.
openMode
}}
",
viewName: "
{{
func
.
psAppView
.
name
}}
",
viewCodeName: "
{{
func
.
psAppView
.
codeName
}}
",
{{/if}}
navParam: {
{{#if
func
.
psNavigateParams
}}
{{#
each
func
.
psNavigateParams
as
|
param
|
}}
{{
lowerCase
param
.
key
}}
: "
{{#if
param
.
rawValue
}}{{
param
.
value
}}{{else}}
%
{{
lowerCase
param
.
value
}}
%
{{/if}}
",
{{/
each
}}
{{/if}}
},
navContext: {
{{#if
func
.
psNavigateContexts
}}
{{#
each
func
.
psNavigateContexts
as
|
context
|
}}
{{
lowerCase
context
.
key
}}
: "
{{#if
context
.
rawValue
}}{{
context
.
value
}}{{else}}
%
{{
lowerCase
context
.
value
}}
%
{{/if}}
",
{{/
each
}}
{{/if}}
},
},
{{/
each
}}
]
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/helper/app-func/index.ts
已删除
100644 → 0
浏览文件 @
dc15f466
export
*
from
'./app-func-service'
;
export
*
from
'./app-func-config'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/helper/index.ts
已删除
100644 → 0
浏览文件 @
dc15f466
export
*
from
'./app-func'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/index.ts
浏览文件 @
3e9e958a
export
*
from
'./interface'
;
export
*
from
'./logic'
;
export
*
from
'./modules'
;
export
*
from
'./runtime'
;
export
*
from
'./service'
;
export
*
from
'./utils'
;
export
*
from
'./helper'
;
\ No newline at end of file
export
*
from
'./utils'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/interface/app-logic/i-ui-action.ts
已删除
100644 → 0
浏览文件 @
dc15f466
/**
* @description 界面行为对象
* @export
* @interface IUIAction
*/
export
interface
IUIAction
{
/**
* 界面行为模式
* @description 值模式 [云实体界面行为类型] {SYS:系统预定义、 FRONT:前台调用、 BACKEND:后台调用、 WFFRONT:工作流前台调用、 WFBACKEND:工作流后台调用 }
* @type {( string | 'SYS' | 'FRONT' | 'BACKEND' | 'WFFRONT' | 'WFBACKEND')}
*/
uIActionMode
:
string
|
'SYS'
|
'FRONT'
|
'BACKEND'
|
'WFFRONT'
|
'WFBACKEND'
;
/**
* 界面行为标记
* @type {string}
*/
uIActionTag
:
string
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/interface/app-logic/index.ts
已删除
100644 → 0
浏览文件 @
dc15f466
export
*
from
'./i-ui-action'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/interface/app/i-app.ts
0 → 100644
浏览文件 @
3e9e958a
import
{
IParam
,
ViewDetail
}
from
"../common"
;
import
{
IAppFuncService
,
IOpenViewService
}
from
"../logic"
;
/**
* 应用接口
*
* @export
* @interface IApp
*/
export
interface
IApp
{
/**
* 获取应用所有功能
*
* @return {*} {IParam[]}
* @memberof IApp
*/
getAllFuncs
():
IParam
[];
/**
* 获取应用功能服务
*
* @return {*} {AppFuncService}
* @memberof IApp
*/
getAppFuncService
():
IAppFuncService
;
/**
* 获取打开视图服务
*
* @return {*} {IParam}
* @memberof IApp
*/
getOpenViewService
():
IOpenViewService
;
/**
* 获取指定视图信息
*
* @param {string} codeName
* @return {*} {(ViewDetail | undefined)}
* @memberof IApp
*/
getViewInfo
(
codeName
:
string
):
ViewDetail
|
undefined
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/interface/app/index.ts
0 → 100644
浏览文件 @
3e9e958a
export
*
from
'./i-app'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/interface/common/i-view-detail.ts
浏览文件 @
3e9e958a
...
...
@@ -7,20 +7,20 @@
export
interface
ViewDetail
{
/**
*
视图
名称
*
代码
名称
*
* @type {string}
* @memberof ViewDetail
*/
n
ame
:
string
;
codeN
ame
:
string
;
/**
*
代码
名称
*
视图
名称
*
* @type {string}
* @memberof ViewDetail
*/
codeName
:
string
;
name
?
:
string
;
/**
* 视图宽度
...
...
@@ -60,7 +60,7 @@ export interface ViewDetail {
* @type {boolean}
* @memberof ViewDetail
*/
redirectView
?:
boolean
;
redirectView
?:
boolean
;
/**
* 关系路径
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/interface/index.ts
浏览文件 @
3e9e958a
export
*
from
'./common'
export
*
from
'./app-logic'
\ No newline at end of file
export
*
from
'./app'
;
export
*
from
'./common'
;
export
*
from
'./logic'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/interface/logic/i-app-func-service.ts
0 → 100644
浏览文件 @
3e9e958a
import
{
IContext
,
IParam
}
from
"@ibiz-core"
;
/**
* @description 应用功能服务
* @export
* @interface IAppFuncService
*/
export
interface
IAppFuncService
{
/**
* @description 执行应用功能
* @param {IParam} menu 菜单项
* @param {IParam} context 上下文
* @param {IParam} viewParams 视图参数
* @return {*} {*}
* @memberof IAppFuncService
*/
executeAppFunc
(
menu
:
IParam
,
context
:
IContext
,
viewParams
:
IParam
):
any
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/interface/logic/i-open-view-service.ts
0 → 100644
浏览文件 @
3e9e958a
import
{
IParam
,
ViewDetail
}
from
"@ibiz-core"
;
/**
* @description 打开视图服务接口
* @export
* @interface IOpenViewService
*/
export
interface
IOpenViewService
{
/**
* @description 打开视图
* @param {ViewDetail} view 视图对象参数
* @param {IParam} params 打开视图参数
* @return {*} {*}
* @memberof IOpenViewService
*/
openView
(
view
:
ViewDetail
,
params
:
IParam
):
any
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/interface/logic/index.ts
0 → 100644
浏览文件 @
3e9e958a
export
*
from
'./i-app-func-service'
;
export
*
from
'./i-open-view-service'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/
helper/app-fun
c/app-func-service.ts
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/
logic/app-logi
c/app-func-service.ts
浏览文件 @
3e9e958a
import
{
IParam
,
FuncConfig
,
IContext
}
from
"@ibiz-core"
;
import
{
App
}
from
"@service"
;
import
{
IAppFuncService
,
IParam
}
from
"@ibiz-core"
;
export
class
AppFuncService
{
export
class
AppFuncService
implements
IAppFuncService
{
/**
* @description 唯一实例
...
...
@@ -28,8 +27,8 @@ export class AppFuncService {
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
executeAppFunc
(
menu
:
IParam
,
context
:
I
Context
,
viewParams
:
IParam
)
{
const
appFunc
=
FuncConfig
.
find
((
func
:
IParam
)
=>
Object
.
is
(
func
.
funcTag
,
menu
.
funcTag
));
executeAppFunc
(
menu
:
IParam
,
context
:
I
Param
,
viewParams
:
IParam
)
{
const
appFunc
=
App
.
getAllFuncs
()
.
find
((
func
:
IParam
)
=>
Object
.
is
(
func
.
funcTag
,
menu
.
funcTag
));
if
(
appFunc
)
{
switch
(
appFunc
.
appFuncType
)
{
case
'APPVIEW'
:
...
...
@@ -57,7 +56,7 @@ export class AppFuncService {
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
private
executeCustomFunc
(
appFunc
:
IParam
,
context
:
IContext
,
viewParams
:
IParam
)
{
executeCustomFunc
(
appFunc
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
console
.
warn
(
`
${
appFunc
.
appFuncType
}
类型应用功能暂未支持`
);
}
...
...
@@ -68,7 +67,7 @@ export class AppFuncService {
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
private
executeJavaScript
(
appFunc
:
IParam
,
context
:
IContext
,
viewParams
:
IParam
)
{
executeJavaScript
(
appFunc
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
console
.
warn
(
`
${
appFunc
.
appFuncType
}
类型应用功能暂未支持`
);
}
...
...
@@ -80,7 +79,7 @@ export class AppFuncService {
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
private
executePresetFunc
(
appFunc
:
IParam
,
context
:
IContext
,
viewParams
:
IParam
)
{
executePresetFunc
(
appFunc
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
console
.
warn
(
`
${
appFunc
.
appFuncType
}
类型应用功能暂未支持`
);
}
...
...
@@ -91,7 +90,7 @@ export class AppFuncService {
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
private
openHtmlPage
(
appFunc
:
IParam
,
context
:
IContext
,
viewParams
:
IParam
)
{
openHtmlPage
(
appFunc
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
window
.
open
(
appFunc
.
htmlPageUrl
,
'_blank'
);
}
...
...
@@ -102,9 +101,8 @@ export class AppFuncService {
* @param {IParam} viewParams 视图参数
* @memberof AppFuncService
*/
private
openAppView
(
appFunc
:
IParam
,
context
:
IContext
,
viewParams
:
IParam
)
{
openAppView
(
appFunc
:
IParam
,
context
:
IParam
,
viewParams
:
IParam
)
{
const
view
=
{
name
:
appFunc
.
viewName
,
codeName
:
appFunc
.
viewCodeName
,
openMode
:
appFunc
.
openMode
,
}
...
...
@@ -112,6 +110,6 @@ export class AppFuncService {
context
:
context
,
viewParams
:
viewParams
,
}
App
.
openViewService
.
openView
(
view
,
params
);
App
.
getOpenViewService
()
.
openView
(
view
,
params
);
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/logic/app-logic/index.ts
0 → 100644
浏览文件 @
3e9e958a
export
*
from
'./app-func-service'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/logic/app-ui-action/app-backend-action.ts
0 → 100644
浏览文件 @
3e9e958a
import
{
IContext
,
IParam
}
from
"@ibiz-core"
;
/**
* 后台界面行为
*
* @export
* @class AppBackendAction
*/
export
class
AppBackendAction
{
/**
* 执行后台界面行为
*
* @static
* @param {IParam} uiAction 界面行为对象
* @param {context: IContext, viewParams: IParam, data: IParam, event: MouseEvent, actionEnvironment:IParam} params { context: 上下文对象, viewParams: 视图参数, data: 当前激活数据, event: 事件源对象, actionEnvironment:操作环境}
* @memberof AppBackendAction
*/
public
static
async
execute
(
uiAction
:
IParam
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
})
{
// TODO 执行后台界面行为
console
.
log
(
uiAction
,
params
);
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/logic/app-ui-action/app-front-action.ts
0 → 100644
浏览文件 @
3e9e958a
import
{
IContext
,
IParam
}
from
"@ibiz-core"
;
/**
* 前台界面行为
*
* @export
* @class AppFrontAction
*/
export
class
AppFrontAction
{
/**
* 执行前台界面行为
*
* @static
* @param {IParam} uiAction 界面行为对象
* @param { context: IContext, viewParams: IParam, data: IParam, event: MouseEvent, actionEnvironment:IParam} params { context: 上下文对象, viewParams: 视图参数, data: 当前激活数据, event: 事件源对象, actionEnvironment:操作环境}
* @memberof AppBackendAction
*/
public
static
async
execute
(
uiAction
:
IParam
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
})
{
// TODO 前台界面行为
console
.
log
(
uiAction
,
params
);
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/logic/app-ui-action/app-sys-action.ts
0 → 100644
浏览文件 @
3e9e958a
import
{
IContext
,
IParam
}
from
"@ibiz-core"
;
/**
* 系统预置界面行为
*
* @export
* @class AppSysAction
*/
export
class
AppSysAction
{
/**
* 执行预置界面行为
*
* @static
* @param {IParam} uiAction 界面行为对象
* @param { context: IContext, viewParams: IParam, data: IParam, event: MouseEvent, actionEnvironment:IParam} params { context: 上下文对象, viewParams: 视图参数, data: 当前激活数据, event: 事件源对象, actionEnvironment:操作环境}
* @memberof AppBackendAction
*/
public
static
async
execute
(
uiAction
:
IParam
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
})
{
// TODO 预置界面行为
console
.
log
(
uiAction
,
params
);
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/
modules/app-logic/
ui-action/app-ui-action.ts
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/
logic/app-
ui-action/app-ui-action.ts
浏览文件 @
3e9e958a
import
{
IContext
,
IParam
}
from
'@ibiz-core'
;
import
{
AppBackendAction
}
from
'./app-backend-action'
;
import
{
AppFrontAction
}
from
'./app-front-action'
;
import
{
IUIAction
}
from
"@ibiz-core"
;
import
{
AppSysAction
}
from
'./app-sys-action'
;
/**
...
...
@@ -14,9 +14,9 @@ export class AppUIAction {
* 执行界面行为
*
* @param uiAction 界面行为信息
* @param params 运行参数
* @param params 运行参数
{ context: 上下文对象, viewParams: 视图参数, data: 当前激活数据, event: 事件源对象, actionEnvironment:操作环境}
*/
public
static
execute
UIAction
(
uiAction
:
IUIAction
,
params
:
any
){
public
static
execute
(
uiAction
:
IParam
,
params
:
{
context
:
IContext
,
viewParams
:
IParam
,
data
:
IParam
,
event
:
MouseEvent
,
actionEnvironment
:
IParam
}
){
if
(
uiAction
.
uIActionMode
==
'FRONT'
){
AppFrontAction
.
execute
(
uiAction
,
params
);
}
else
if
(
uiAction
.
uIActionMode
==
'BACKEND'
){
...
...
@@ -24,7 +24,7 @@ export class AppUIAction {
}
else
if
(
uiAction
.
uIActionMode
==
'SYS'
){
AppSysAction
.
execute
(
uiAction
,
params
);
}
else
{
// TODO 工作流界面行为
console
.
warn
(
"非(前台界面行为、后台界面行为、系统预置界面行为)暂未支持"
);
}
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/logic/app-ui-action/index.ts
0 → 100644
浏览文件 @
3e9e958a
export
*
from
'./app-ui-action'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/logic/index.ts
0 → 100644
浏览文件 @
3e9e958a
export
*
from
'./app-logic'
;
export
*
from
'./app-ui-action'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/app-logic/index.ts
已删除
100644 → 0
浏览文件 @
dc15f466
export
*
from
'./ui-action'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/app-logic/ui-action/app-backend-action.ts
已删除
100644 → 0
浏览文件 @
dc15f466
import
{
IUIAction
}
from
'@ibiz-core'
;
/**
* 界面行为参数
* @interface UIActionParams
*/
interface
UIActionParams
{
args
:
any
[],
context
:
any
,
params
:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
,
deUIService
?:
any
,
}
export
class
AppBackendAction
{
/**
* 执行界面行为
*
* @param args
* @param context
* @param params
* @param $event
* @param xData
* @param actionContext
* @param srfParentDeName
*
* @memberof AppBackendAction
*/
public
static
async
execute
(
uiAction
:
IUIAction
,
params
:
any
)
{
// TODO 后台调用
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/app-logic/ui-action/app-front-action.ts
已删除
100644 → 0
浏览文件 @
dc15f466
import
{
IUIAction
}
from
'@ibiz-core'
;
/**
* 界面行为参数
* @interface UIActionParams
*/
interface
UIActionParams
{
args
:
any
[],
context
:
any
,
params
:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
,
deUIService
?:
any
,
}
export
class
AppFrontAction
{
/**
* 执行界面行为
*
* @param args
* @param context
* @param params
* @param $event
* @param xData
* @param actionContext
* @param srfParentDeName
*
* @memberof AppFrontAction
*/
public
static
async
execute
(
uiAction
:
IUIAction
,
params
:
any
)
{
// TODO 前台调用
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/app-logic/ui-action/app-sys-action.ts
已删除
100644 → 0
浏览文件 @
dc15f466
import
{
IUIAction
}
from
'@ibiz-core'
;
/**
* 界面行为参数
* @interface UIActionParams
*/
interface
UIActionParams
{
args
:
any
[],
context
:
any
,
params
:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
,
deUIService
?:
any
,
}
export
class
AppSysAction
{
/**
* 执行界面行为
*
* @param args
* @param context
* @param params
* @param $event
* @param xData
* @param actionContext
* @param srfParentDeName
*
* @memberof AppSysAction
*/
public
static
async
execute
(
uiAction
:
IUIAction
,
params
:
any
)
{
// TODO 系统预置调用
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/app-logic/ui-action/index.ts
已删除
100644 → 0
浏览文件 @
dc15f466
export
*
from
'./app-ui-action'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/app/app-base.ts
0 → 100644
浏览文件 @
3e9e958a
import
{
AppFuncService
,
IApp
,
IAppFuncService
,
IOpenViewService
,
ViewDetail
}
from
"@ibiz-core"
;
import
{
IParam
}
from
"@ibiz-core/interface"
;
/**
* 应用基类
*
* @export
* @class AppBase
*/
export
abstract
class
AppBase
implements
IApp
{
/**
* 应用功能服务
*
* @private
* @type {AppFuncService}
* @memberof AppBase
*/
private
appFuncService
:
AppFuncService
=
AppFuncService
.
getInstance
();
/**
* 获取应用功能服务
*
* @return {IAppFuncService}
* @memberof AppBase
*/
public
getAppFuncService
():
IAppFuncService
{
return
this
.
appFuncService
;
}
/**
* 获取打开视图服务
*
* @return {*} {IOpenViewService}
* @memberof AppBase
*/
public
getOpenViewService
():
IOpenViewService
{
throw
new
Error
(
"Method not implemented."
);
}
/**
* 获取所有应用功能
*
* @return {*} {IParam[]}
* @memberof AppBase
*/
public
getAllFuncs
():
IParam
[]
{
return
[];
}
/**
* 获取视图信息
*
* @param codeName 视图codeName
*/
public
getViewInfo
(
codeName
:
string
):
ViewDetail
|
undefined
{
return
undefined
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/app/index.ts
0 → 100644
浏览文件 @
3e9e958a
export
{
AppBase
}
from
'./app-base'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/editor/editor-base.ts
浏览文件 @
3e9e958a
import
{
computedNavData
,
ControlPropsBase
,
ControlStateBase
,
IParam
,
toOneWayRef
,
useContextParams
}
from
'@ibiz-core'
;
import
{
RouteLocationNormalizedLoaded
,
Router
,
useRoute
,
useRouter
}
from
'vue-router'
;
import
{
toRefs
}
from
'vue'
;
import
{
UIUtil
,
IParam
,
useContextParams
}
from
'@ibiz-core'
;
/**
* @description 部件基类
* @export
...
...
@@ -22,11 +21,11 @@ export class EditorBase {
navViewParam
:
viewParams
.
value
,
}
if
(
localContext
&&
Object
.
keys
(
localContext
).
length
>
0
)
{
const
_context
=
computedNavData
(
data
,
navParams
.
navContext
,
navParams
.
navViewParam
,
localContext
);
const
_context
=
UIUtil
.
computedNavData
(
data
,
navParams
.
navContext
,
navParams
.
navViewParam
,
localContext
);
Object
.
assign
(
navParams
.
navContext
,
_context
);
}
if
(
localParam
&&
Object
.
keys
(
localParam
).
length
>
0
)
{
const
_param
=
computedNavData
(
data
,
navParams
.
navContext
,
navParams
.
navViewParam
,
localParam
);
const
_param
=
UIUtil
.
computedNavData
(
data
,
navParams
.
navContext
,
navParams
.
navViewParam
,
localParam
);
Object
.
assign
(
navParams
.
navViewParam
,
_param
);
}
return
navParams
;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/index.ts
浏览文件 @
3e9e958a
export
*
from
'./common'
export
*
from
'./app'
export
*
from
'./views'
export
*
from
'./widgets'
export
*
from
'./editor'
export
*
from
'./app-logic'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/main-view/main-view.ts
浏览文件 @
3e9e958a
import
{
ViewBase
,
MainViewProps
,
MainViewState
,
IActionParam
}
from
'@ibiz-core'
;
import
{
ViewBase
,
MainViewProps
,
MainViewState
,
IActionParam
,
IParam
,
AppUIAction
}
from
'@ibiz-core'
;
/**
* 实体部件
...
...
@@ -7,17 +7,25 @@ import { ViewBase, MainViewProps, MainViewState, IActionParam } from '@ibiz-core
*/
export
class
MainView
extends
ViewBase
{
/**
*
部件状态
*
视图状态数据
*/
public
declare
viewState
:
MainViewState
;
/**
* 当前视图具有数据能力部件
*
* @type {IParam}
* @memberof MainView
*/
public
declare
xDataControl
:
IParam
;
/**
* 根据props调整设置部件state
* @param props 传入的Props
*/
public
setState
(
props
:
MainViewProps
)
{
super
.
setState
(
props
);
// 只读属性处理:把props的属性的Ref赋给state,以维持响应性。
this
.
xDataControl
=
ref
(
null
);
}
/**
...
...
@@ -25,23 +33,41 @@ export class MainView extends ViewBase {
* @todo
* @param props
*/
public
useOpenData
(
props
:
MainViewProps
)
{}
public
useOpenData
(
props
:
MainViewProps
)
{
}
/**
* 打开新建视图功能模块
* @todo
* @param props
*/
public
useNewData
(
props
:
MainViewProps
)
{}
public
useNewData
(
props
:
MainViewProps
)
{
}
/**
* @description 处理工具栏事件
* @param {IActionParam} actionParam
* @memberof MainView
*/
public
handleToolbarEvent
(
actionParam
:
IActionParam
)
{
/**
* @description 处理工具栏事件
* @param {IActionParam} actionParam
* @memberof MainView
*/
public
handleToolbarEvent
(
actionParam
:
IActionParam
)
{
const
{
tag
,
action
,
data
}
=
actionParam
;
//todo
if
(
!
tag
||
!
action
||
!
data
)
{
console
.
warn
(
"工具栏执行参数不足"
);
return
;
}
const
{
xDataControlName
,
uIAction
}
=
data
;
if
(
!
xDataControlName
||
!
uIAction
)
{
console
.
warn
(
"工具栏执行参数不足"
);
return
;
}
// 准备参数
const
inputParam
=
{
context
:
this
.
viewState
.
context
,
viewParams
:
this
.
viewState
.
viewParams
,
data
:
this
.
xDataControl
?.
value
?.
data
,
event
:
data
.
event
,
actionEnvironment
:
this
};
// 执行行为
AppUIAction
.
execute
(
uIAction
,
inputParam
);
}
public
handleCtrlEvent
(
actionParam
:
IActionParam
)
{
...
...
@@ -64,6 +90,7 @@ export class MainView extends ViewBase {
return
{
...
superParams
,
state
:
this
.
viewState
,
xDataControl
:
this
.
xDataControl
,
handleToolbarEvent
:
this
.
handleToolbarEvent
.
bind
(
this
),
handleCtrlEvent
:
this
.
handleCtrlEvent
.
bind
(
this
),
};
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/view-base/view-prop-base.ts
浏览文件 @
3e9e958a
import
{
Subject
}
from
"rxjs"
;
import
{
IActionParam
,
IParam
,
IContext
}
from
"@ibiz-core"
;
import
{
IActionParam
,
IParam
}
from
"@ibiz-core"
;
/**
* @description 视图props的基类
...
...
@@ -13,7 +13,7 @@ export interface ViewPropsBase {
* @type {IParam}
* @memberof ViewPropsBase
*/
context
?:
I
Context
;
context
?:
I
Param
;
/**
* @description 视图参数(外部传入)
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/view-base/view-state-base.ts
浏览文件 @
3e9e958a
import
{
Subject
}
from
"rxjs"
;
import
{
IActionParam
,
IParam
,
IContext
}
from
'@ibiz-core'
;
import
{
IActionParam
,
IParam
}
from
'@ibiz-core'
;
/**
* @description 视图基类状态
...
...
@@ -24,10 +24,10 @@ export interface ViewStateBase {
/**
* @description 上下文参数
* @type {I
Context
}
* @type {I
Param
}
* @memberof ViewStateBase
*/
context
:
I
Context
;
context
:
I
Param
;
/**
* @description 视图参数
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/control-base/control-prop-base.ts
浏览文件 @
3e9e958a
import
{
Subject
}
from
"rxjs"
;
import
{
IActionParam
,
IParam
,
IContext
}
from
"@ibiz-core"
;
import
{
IActionParam
,
IParam
}
from
"@ibiz-core"
;
/**
* @description 部件props的基类
...
...
@@ -10,10 +10,10 @@ export interface ControlPropsBase {
/**
* @description 上下文参数(外部传入)
* @type {I
Context
}
* @type {I
Param
}
* @memberof ControlPropsBase
*/
context
?:
I
Context
;
context
?:
I
Param
;
/**
* @description 视图参数(外部传入)
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/control-base/control-state-base.ts
浏览文件 @
3e9e958a
import
{
IActionParam
,
IParam
,
IContext
}
from
"@ibiz-core"
;
import
{
IActionParam
,
IParam
}
from
"@ibiz-core"
;
import
{
Subject
}
from
"rxjs"
;
/**
...
...
@@ -27,7 +27,7 @@ export interface ControlStateBase {
* @type {IParam}
* @memberof ControlStateBase
*/
context
:
I
Context
;
context
:
I
Param
;
/**
* @description 视图参数
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/grid-control/grid-control-state.ts
浏览文件 @
3e9e958a
...
...
@@ -13,7 +13,7 @@ export interface GridControlState extends MainControlState {
* @type {IParam[]}
* @memberof GridControlState
*/
data
:
IParam
[];
items
:
IParam
[];
/**
* @description 表格列模型
...
...
@@ -34,7 +34,7 @@ export interface GridControlState extends MainControlState {
* @type {IParam}
* @memberof GridControlState
*/
rules
:
IParam
[]
;
rules
:
IParam
;
/**
* @description 是否多选
...
...
@@ -79,31 +79,93 @@ export interface GridControlState extends MainControlState {
selectFirstDefault
:
boolean
;
/**
* @description
表格聚合
* @type {
IParam
}
* @description
当前页
* @type {
number
}
* @memberof GridControlState
*/
gridAgg
:
IParam
;
current
:
number
;
/**
* @description
表格分组
* @type {
IParam
}
* @description
分页大小
* @type {
number
}
* @memberof GridControlState
*/
gridGroup
:
IParam
;
pageSize
:
number
;
/**
* @description
表格排序
* @type {
IParam
}
* @description
是否启用分页
* @type {
boolean
}
* @memberof GridControlState
*/
gridSort
:
IParam
;
enablePagingBar
:
boolean
;
/**
* @description
表格分页
* @description
数据聚合
* @type {IParam}
* @memberof GridControlState
*/
gridPaging
:
IParam
dataAgg
:
string
[];
/**
* @description 聚合模式
* @type {string}
* @memberof GridControlState
*/
aggMode
:
string
;
/**
* @description 聚合实体
* @type {string}
* @memberof GridControlState
*/
aggEntity
:
string
,
/**
* @description 聚合数据集
* @type {string}
* @memberof GridControlState
*/
aggDataSet
:
string
,
/**
* @description 分组模式
* @type {string}
* @memberof GridControlState
*/
groupMode
:
string
;
/**
* @description 分组属性
* @type {string}
* @memberof GridControlState
*/
groupField
:
string
;
/**
* @description 分组代码表
* @type {*}
* @memberof GridControlState
*/
groupCodeList
:
any
;
/**
* @description 禁用排序
* @type {boolean}
* @memberof GridControlState
*/
noSort
:
boolean
;
/**
* @description 排序方向
* @type {string}
* @memberof GridControlState
*/
minorSortDir
:
string
;
/**
* @description 排序属性
* @type {string}
* @memberof GridControlState
*/
minorSortPSDEF
:
string
;
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/grid-control/grid-control.ts
浏览文件 @
3e9e958a
此差异已折叠。
点击以展开。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/main-control/main-control-state.ts
浏览文件 @
3e9e958a
...
...
@@ -35,11 +35,4 @@ export interface MainControlState extends ControlStateBase {
* @memberof MainControlState
*/
UIService
:
IParam
;
/**
* @description 应用实体codeName
* @type {string}
* @memberof MainControlState
*/
appDeCodeName
:
string
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/menu-control/menu-control.ts
浏览文件 @
3e9e958a
import
{
Ref
}
from
'vue'
;
import
{
MenuControlProps
,
MenuControlState
,
IActionParam
,
ControlBase
,
IParam
,
AppFuncService
,
deepCopy
}
from
'@ibiz-core'
;
import
{
App
}
from
'@service'
;
/**
* @description 菜单部件
...
...
@@ -165,7 +164,7 @@ export class MenuControl extends ControlBase {
*/
public
menuClick
(
item
:
IParam
)
{
const
{
context
,
viewParams
}
=
this
.
controlState
;
App
.
appFuncService
.
executeAppFunc
(
item
,
deepCopy
(
context
),
deepCopy
(
viewParams
));
App
.
getAppFuncService
()
.
executeAppFunc
(
item
,
deepCopy
(
context
),
deepCopy
(
viewParams
));
}
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/service/control-service/grid-service.ts
浏览文件 @
3e9e958a
...
...
@@ -13,7 +13,7 @@ export class GridService<T extends ControlVOBase> extends ControlServiceBase<T>
* @description 加载草稿
* @param {IParam} context 上下文
* @param {IParam} data 行为数据
* @param
\{{ action: string; isLoading?: boolean }
} opts 行为参数
* @param
{ action: string; isLoading?: boolean
} opts 行为参数
* @return {*} {Promise<any>}
* @memberof GridService
*/
...
...
@@ -33,14 +33,14 @@ export class GridService<T extends ControlVOBase> extends ControlServiceBase<T>
* @description 加载数据
* @param {IParam} context 上下文
* @param {IParam} data 行为数据
* @param
\{{ action: string; isLoading?: boolean }
} opts 行为参数
* @param
{ action: string; isLoading?: boolean
} opts 行为参数
* @return {*} {Promise<any>}
* @memberof GridService
*/
public
async
get
(
context
:
IParam
,
data
:
IParam
,
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
:
'
FetchDefault
'
;
const
action
=
hasFunction
(
_entityService
,
opts
.
action
)
?
opts
.
action
:
'
GET
'
;
const
response
=
await
_entityService
[
action
](
Context
,
Data
,
opts
.
isLoading
);
//this.setCopynativeData(response.data);
response
.
data
?.
forEach
((
item
:
IParam
)
=>
{
...
...
@@ -53,7 +53,7 @@ export class GridService<T extends ControlVOBase> extends ControlServiceBase<T>
* @description 新建数据
* @param {IParam} context 上下文
* @param {IParam} data 行为数据
* @param
\{{ action: string; isLoading?: boolean }
} opts 行为参数
* @param
{ action: string; isLoading?: boolean
} opts 行为参数
* @return {*} {Promise<any>}
* @memberof GridService
*/
...
...
@@ -70,7 +70,7 @@ export class GridService<T extends ControlVOBase> extends ControlServiceBase<T>
* @description 删除数据
* @param {IParam} context 上下文
* @param {IParam} data 行为数据
* @param
\{{ action: string; isLoading?: boolean }
} opts 行为参数
* @param
{ action: string; isLoading?: boolean
} opts 行为参数
* @return {*} {Promise<any>}
* @memberof GridService
*/
...
...
@@ -87,7 +87,7 @@ export class GridService<T extends ControlVOBase> extends ControlServiceBase<T>
* @description 更新
* @param {*} context 上下文
* @param {*} data 行为数据
* @param
\{{ action: string; isLoading?: boolean }
} opts 行为参数
* @param
{ action: string; isLoading?: boolean
} opts 行为参数
* @return {*} {Promise<any>}
* @memberof GridService
*/
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/service/entity/entity-service.ts
浏览文件 @
3e9e958a
import
{
Http
,
Route
Too
l
}
from
'@ibiz-core'
;
import
{
Http
,
Route
Uti
l
}
from
'@ibiz-core'
;
/**
* 实体服务基类
* @export
...
...
@@ -30,7 +30,7 @@ export class EntityService{
* @param isSelfAppend 是否拼接实体自身的主键值。
*/
protected
buildDeResPath
(
context
:
any
,
isSelfAppend
:
boolean
){
let
deResPath
=
Route
Too
l
.
buildDeResRequestPath
(
context
,
this
.
deResPaths
);
let
deResPath
=
Route
Uti
l
.
buildDeResRequestPath
(
context
,
this
.
deResPaths
);
// 不需要自身的主键值的删除末尾/xxxx
if
(
!
isSelfAppend
){
deResPath
=
deResPath
.
substring
(
0
,
deResPath
.
lastIndexOf
(
"/"
))
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/utils/index.ts
浏览文件 @
3e9e958a
export
*
from
'./util'
;
export
*
from
'./view-util'
;
export
*
from
'./route-tool'
;
export
{
Http
}
from
'./net/http'
;
\ No newline at end of file
export
*
from
'./ui'
;
export
*
from
'./net'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/utils/net/index.ts
0 → 100644
浏览文件 @
3e9e958a
export
{
Http
}
from
'./http'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/utils/ui/index.ts
0 → 100644
浏览文件 @
3e9e958a
export
{
RouteUtil
}
from
'./route-util'
;
export
{
UIUtil
}
from
'./ui-util'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/utils/
route-too
l.ts
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/utils/
ui/route-uti
l.ts
浏览文件 @
3e9e958a
...
...
@@ -5,9 +5,9 @@ import qs from 'qs';
* 路由相关处理逻辑工具类
*
* @export
* @class Route
Too
l
* @class Route
Uti
l
*/
export
class
Route
Too
l
{
export
class
Route
Uti
l
{
/**
* 处理路由路径
...
...
@@ -31,7 +31,7 @@ export class RouteTool {
* @static
* @param {Route} route 路由对象
* @returns {string}
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
getIndexRoutePath
(
route
:
any
):
string
{
const
parameter
=
route
.
meta
?.
parameters
?.[
0
]
||
{
pathName
:
"apps"
,
parameterName
:
"app"
};
...
...
@@ -54,7 +54,7 @@ export class RouteTool {
* @param {*} [viewParam={}] 视图上下文
* @param {any[]} deResPaths 关系实体参数对象数组
* @returns {string}
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
getDeResRoutePath
(
context
:
any
=
{},
deResPaths
:
any
[]):
string
{
let
routePath
:
string
=
''
;
...
...
@@ -113,7 +113,7 @@ export class RouteTool {
* @param {*} [viewParam={}] 视图上下文
* @param {any[]} deResPaths 关系实体参数对象数组
* @returns {string}
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
buildDeResRequestPath
(
context
:
any
=
{},
deResPaths
:
any
[]):
string
{
let
routePath
:
string
=
''
;
...
...
@@ -186,7 +186,7 @@ export class RouteTool {
* @static
* @param {*} params
* @returns {*}
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
formatRouteParams
(
params
:
any
,
route
:
any
,
context
:
any
,
viewparams
:
any
):
void
{
Object
.
keys
(
params
).
forEach
((
key
:
string
,
index
:
number
)
=>
{
...
...
@@ -218,7 +218,7 @@ export class RouteTool {
* @private
* @static
* @type {any[]}
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
private
static
indexParameters
:
any
[]
=
[];
...
...
@@ -227,7 +227,7 @@ export class RouteTool {
*
* @static
* @param {any[]} parameters
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
setIndexParameters
(
parameters
:
any
[]):
void
{
this
.
indexParameters
=
[...
parameters
];
...
...
@@ -238,7 +238,7 @@ export class RouteTool {
*
* @static
* @returns {any[]}
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
getIndexParameters
():
any
[]
{
return
this
.
indexParameters
;
...
...
@@ -249,7 +249,7 @@ export class RouteTool {
*
* @static
* @type {*}
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
indexViewParam
:
any
=
{};
...
...
@@ -258,7 +258,7 @@ export class RouteTool {
*
* @static
* @param {*} [viewParam={}]
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
setIndexViewParam
(
viewParam
:
any
=
{}):
void
{
Object
.
assign
(
this
.
indexViewParam
,
viewParam
);
...
...
@@ -269,7 +269,7 @@ export class RouteTool {
*
* @static
* @returns {*}
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
getIndexViewParam
():
any
{
return
this
.
indexViewParam
;
...
...
@@ -282,7 +282,7 @@ export class RouteTool {
* @param {*} [data] 传入数据
* @param {*} [ActionModel] 界面行为模型
* @param {*} [UIService] 界面行为服务
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
calcActionItemAuthState
(
data
:
any
,
ActionModel
:
any
,
UIService
:
any
)
{
let
result
:
any
[]
=
[];
...
...
@@ -334,7 +334,7 @@ export class RouteTool {
* @param {*} [data] 传入数据
* @param {*} [ActionModel] 界面行为模型
* @param {*} [UIService] 界面行为服务
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
calcTreeActionItemAuthState
(
data
:
any
,
ActionModel
:
any
,
UIService
:
any
)
{
let
result
:
any
[]
=
[];
...
...
@@ -384,7 +384,7 @@ export class RouteTool {
* @param {*} [tempContext] 上下文
* @param {*} [data] 传入数据
* @param {*} [redirectAppEntity] 应用实体对象
* @memberof Route
Too
l
* @memberof Route
Uti
l
*/
public
static
async
calcRedirectContext
(
tempContext
:
any
,
data
:
any
,
redirectAppEntity
:
any
)
{
if
(
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/utils/ui/ui-util.ts
0 → 100644
浏览文件 @
3e9e958a
import
{
IParam
}
from
"@ibiz-core"
;
/**
* 视图相关处理逻辑工具类
*
* @export
* @class UIUtil
*/
export
class
UIUtil
{
/**
* @description 计算界面行为项权限状态
* @export
* @param {IParam} data 传入数据
* @param {IParam} actionModel 界面行为模型
* @param {*} UIService 界面行为服务
* @return {*}
*/
public
static
calcActionItemAuthState
(
data
:
IParam
,
actionModel
:
IParam
,
UIService
:
any
)
{
const
result
:
any
[]
=
[];
if
(
!
UIService
)
return
;
for
(
const
key
in
actionModel
)
{
if
(
!
actionModel
.
hasOwnProperty
(
key
))
{
return
result
;
}
const
item
=
actionModel
[
key
];
let
dataActionResult
:
any
;
if
(
item
&&
item
[
'dataAccessAction'
])
{
if
(
Object
.
is
(
item
[
'actionTarget'
],
'NONE'
)
||
Object
.
is
(
item
[
'actionTarget'
],
''
))
{
dataActionResult
=
UIService
.
getAllOPPrivs
({},
item
[
'dataAccessAction'
]);
}
else
{
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
)
{
dataActionResult
=
UIService
.
getAllOPPrivs
(
data
,
item
[
'dataAccessAction'
]);
}
}
}
else
{
dataActionResult
=
1
;
}
// 无权限:0;有权限:1
if
(
dataActionResult
===
0
)
{
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if
(
item
.
getNoPrivDisplayMode
===
1
)
{
item
.
disabled
=
true
;
}
if
(
item
.
getNoPrivDisplayMode
===
2
||
item
.
getNoPrivDisplayMode
===
6
)
{
item
.
visabled
=
false
;
}
else
{
item
.
visabled
=
true
;
}
}
if
(
dataActionResult
===
1
)
{
item
.
visabled
=
true
;
item
.
disabled
=
false
;
}
// 返回权限验证的结果
item
.
dataActionResult
=
dataActionResult
;
result
.
push
(
dataActionResult
);
}
return
result
;
}
/**
* @description 计算导航数据
* 先从当前数据目标计算,然后再从当前上下文计算,最后从当前视图参数计算,没有则为null
* @export
* @param {*} data 当前数据目标
* @param {*} parentContext 当前上下文
* @param {*} parentParam 当前视图参数
* @param {*} params 导航参数
* @return {*}
*/
public
static
computedNavData
(
data
:
any
,
parentContext
:
any
,
parentParam
:
any
,
params
:
any
):
any
{
const
_data
:
any
=
{};
if
(
params
&&
Object
.
keys
(
params
).
length
>
0
)
{
Object
.
keys
(
params
).
forEach
((
name
:
string
)
=>
{
if
(
!
name
)
{
return
;
}
let
value
:
string
|
null
=
params
[
name
];
if
(
value
&&
value
.
toString
().
startsWith
(
'%'
)
&&
value
.
toString
().
endsWith
(
'%'
))
{
const
key
=
value
.
substring
(
1
,
value
.
length
-
1
).
toLowerCase
();
if
(
data
&&
data
.
hasOwnProperty
(
key
))
{
value
=
data
[
key
];
}
else
if
(
parentContext
&&
parentContext
[
key
])
{
value
=
parentContext
[
key
];
}
else
if
(
parentParam
&&
parentParam
[
key
])
{
value
=
parentParam
[
key
];
}
else
{
value
=
null
;
}
}
Object
.
assign
(
_data
,
{
[
name
.
toLowerCase
()]:
value
});
});
}
return
_data
;
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/utils/view-util.ts
已删除
100644 → 0
浏览文件 @
dc15f466
import
{
IParam
}
from
"@ibiz-core"
;
/**
* @description 计算界面行为项权限状态
* @export
* @param {IParam} data 传入数据
* @param {IParam} actionModel 界面行为模型
* @param {*} UIService 界面行为服务
* @return {*}
*/
export
function
calcActionItemAuthState
(
data
:
IParam
,
actionModel
:
IParam
,
UIService
:
any
)
{
const
result
:
any
[]
=
[];
if
(
!
UIService
)
return
;
for
(
const
key
in
actionModel
)
{
if
(
!
actionModel
.
hasOwnProperty
(
key
))
{
return
result
;
}
const
item
=
actionModel
[
key
];
let
dataActionResult
:
any
;
if
(
item
&&
item
[
'dataAccessAction'
])
{
if
(
Object
.
is
(
item
[
'actionTarget'
],
'NONE'
)
||
Object
.
is
(
item
[
'actionTarget'
],
''
))
{
dataActionResult
=
UIService
.
getAllOPPrivs
({},
item
[
'dataAccessAction'
]);
}
else
{
if
(
data
&&
Object
.
keys
(
data
).
length
>
0
)
{
dataActionResult
=
UIService
.
getAllOPPrivs
(
data
,
item
[
'dataAccessAction'
]);
}
}
}
else
{
dataActionResult
=
1
;
}
// 无权限:0;有权限:1
if
(
dataActionResult
===
0
)
{
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if
(
item
.
getNoPrivDisplayMode
===
1
)
{
item
.
disabled
=
true
;
}
if
(
item
.
getNoPrivDisplayMode
===
2
||
item
.
getNoPrivDisplayMode
===
6
)
{
item
.
visabled
=
false
;
}
else
{
item
.
visabled
=
true
;
}
}
if
(
dataActionResult
===
1
)
{
item
.
visabled
=
true
;
item
.
disabled
=
false
;
}
// 返回权限验证的结果
item
.
dataActionResult
=
dataActionResult
;
result
.
push
(
dataActionResult
);
}
return
result
;
}
/**
* @description 计算导航数据
* 先从当前数据目标计算,然后再从当前上下文计算,最后从当前视图参数计算,没有则为null
* @export
* @param {*} data 当前数据目标
* @param {*} parentContext 当前上下文
* @param {*} parentParam 当前视图参数
* @param {*} params 导航参数
* @return {*}
*/
export
function
computedNavData
(
data
:
any
,
parentContext
:
any
,
parentParam
:
any
,
params
:
any
):
any
{
const
_data
:
any
=
{};
if
(
params
&&
Object
.
keys
(
params
).
length
>
0
)
{
Object
.
keys
(
params
).
forEach
((
name
:
string
)
=>
{
if
(
!
name
)
{
return
;
}
let
value
:
string
|
null
=
params
[
name
];
if
(
value
&&
value
.
toString
().
startsWith
(
'%'
)
&&
value
.
toString
().
endsWith
(
'%'
))
{
const
key
=
value
.
substring
(
1
,
value
.
length
-
1
).
toLowerCase
();
if
(
data
&&
data
.
hasOwnProperty
(
key
))
{
value
=
data
[
key
];
}
else
if
(
parentContext
&&
parentContext
[
key
])
{
value
=
parentContext
[
key
];
}
else
if
(
parentParam
&&
parentParam
[
key
])
{
value
=
parentParam
[
key
];
}
else
{
value
=
null
;
}
}
Object
.
assign
(
_data
,
{
[
name
.
toLowerCase
()]:
value
});
});
}
return
_data
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/index.d.ts
0 → 100644
浏览文件 @
3e9e958a
import
{
IApp
}
from
"@ibiz-core"
;
declare
global
{
const
App
:
IApp
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages@DEGRIDVIEW}}/{{pages@DEGRIDVIEW}}.vue.hbs
浏览文件 @
3e9e958a
...
...
@@ -29,7 +29,7 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
handleCtrlEvent
}
=
new
GridView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
const
{
state
,
handleCtrlEvent
,
handleToolbarEvent
}
=
new
GridView
(
ViewConfig
).
moduleInstall
(
props
,
emit
);
</script>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/service/app/app.ts
已删除
100644 → 0
浏览文件 @
dc15f466
import
{
AppModal
}
from
'@/utils'
;
import
{
Http
,
deepCopy
,
ViewDetail
}
from
'@ibiz-core'
;
import
{
OpenViewService
}
from
'@service'
;
import
{
AppFuncService
}
from
'@ibiz-core'
;
export
class
App
{
/**
* 打开视图服务
* @static
*/
public
static
openViewService
:
OpenViewService
=
OpenViewService
.
getInstance
();
/**
* 应用功能服务
* @static
*/
public
static
appFuncService
:
AppFuncService
=
AppFuncService
.
getInstance
();
/**
* 打开视图服务
* @static
*/
public
static
modalService
:
AppModal
=
AppModal
.
getInstance
();
/**
* 所有视图信息
*
* @static
*/
public
static
allViewInfos
:
any
;
/**
* 获取视图信息
*
* @static
* @param codeName 视图codeName
* @return {*}
*/
public
static
getViewInfo
(
codeName
:
string
):
ViewDetail
|
undefined
{
return
App
.
allViewInfos
[
codeName
]
?
(
deepCopy
(
App
.
allViewInfos
[
codeName
])
as
ViewDetail
)
:
undefined
;
}
/**
* 初始化
*
* @static
*/
public
static
async
init
()
{
const
response
=
await
Http
.
getInstance
().
get
(
'./assets/json/views.json'
)
App
.
allViewInfos
=
response
.
data
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/service/index.ts
已删除
100644 → 0
浏览文件 @
dc15f466
export
*
from
'./open-view/open-view-service'
;
export
*
from
'./app/app'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/index.scss
浏览文件 @
3e9e958a
...
...
@@ -4,4 +4,4 @@
@use
'./views'
;
@use
'./var'
;
@use
'./theme'
;
@use
'.
./custom/style'
@use
'.
/user'
;
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/user/index.scss
0 → 100644
浏览文件 @
3e9e958a
// 用户自定义样式
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/utils/app-modal/app-modal.scss
已删除
100644 → 0
浏览文件 @
dc15f466
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/utils/index.ts
浏览文件 @
3e9e958a
export
{
AppModal
}
from
'./app-modal/app-modal'
;
export
{
OpenViewService
}
from
'./open-view/open-view-service'
;
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/
service
/open-view/open-view-service.ts
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/
utils
/open-view/open-view-service.ts
浏览文件 @
3e9e958a
import
{
IParam
,
RouteTool
,
ViewDetail
}
from
'@ibiz-core'
;
import
{
App
}
from
'@service'
;
import
{
IContext
,
IOpenViewService
,
IParam
,
RouteUtil
,
ViewDetail
}
from
'@ibiz-core'
;
import
router
from
'@/router'
;
import
{
AppModal
}
from
'@/utils'
;
interface
Params
extends
IParam
{
context
:
any
;
viewParams
:
any
;
context
:
IContext
;
viewParams
:
IParam
;
}
/**
...
...
@@ -14,7 +13,7 @@ interface Params extends IParam {
* @export
* @class OpenViewService
*/
export
class
OpenViewService
{
export
class
OpenViewService
implements
IOpenViewService
{
/**
* 唯一实例
*
...
...
@@ -73,7 +72,7 @@ export class OpenViewService {
// 路由打开视图
if
(
openMode
==
'INDEXVIEWTAB'
||
openMode
==
'POPUPAPP'
)
{
// TODO 视图关系参数处理
const
routePath
=
Route
Too
l
.
buildUpRoutePath
(
view
,
context
,
viewParams
,
router
.
currentRoute
.
value
);
const
routePath
=
Route
Uti
l
.
buildUpRoutePath
(
view
,
context
,
viewParams
,
router
.
currentRoute
.
value
);
if
(
openMode
==
'INDEXVIEWTAB'
)
{
router
.
push
(
routePath
);
}
else
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/yarn.lock
浏览文件 @
3e9e958a
此差异已折叠。
点击以展开。
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录