Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
c66d4ba5
提交
c66d4ba5
编写于
12月 14, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
kuaikuai 发布系统代码 [后台服务,演示应用]
上级
02058628
变更
28
隐藏空白字符变更
内嵌
并排
正在显示
28 个修改的文件
包含
3413 行增加
和
58 行删除
+3413
-58
portlet-data.json
app_Web/public/assets/json/portlet-data.json
+12
-12
view-config.json
app_Web/public/assets/json/view-config.json
+10
-2
en-US-base.ts
app_Web/src/locale/lang/en-US-base.ts
+2
-2
zh-CN-base.ts
app_Web/src/locale/lang/zh-CN-base.ts
+2
-2
ibizappeditor_en_US_base.ts
...lanres/entities/ibizappeditor/ibizappeditor_en_US_base.ts
+0
-5
ibizappeditor_zh_CN_base.ts
...lanres/entities/ibizappeditor/ibizappeditor_zh_CN_base.ts
+0
-5
ibizappextendeditor_en_US_base.ts
...ies/ibizappextendeditor/ibizappextendeditor_en_US_base.ts
+25
-0
ibizappextendeditor_zh_CN_base.ts
...ies/ibizappextendeditor/ibizappextendeditor_zh_CN_base.ts
+25
-0
micro-component_en_US_base.ts
...es/entities/micro-component/micro-component_en_US_base.ts
+10
-0
micro-component_zh_CN_base.ts
...es/entities/micro-component/micro-component_zh_CN_base.ts
+10
-0
portlet.ts
app_Web/src/mock/portlet/portlet.ts
+12
-12
viewconfig.ts
app_Web/src/mock/viewconfig/viewconfig.ts
+10
-2
micro-component-grid-view-base.vue
...ro-component-grid-view/micro-component-grid-view-base.vue
+1645
-5
micro-component-grid-view.vue
...e/micro-component-grid-view/micro-component-grid-view.vue
+2
-2
portlet-register.ts
app_Web/src/portlet-register.ts
+3
-3
ibizappextendeditor-ui-service-base.ts
...bizappextendeditor/ibizappextendeditor-ui-service-base.ts
+1
-0
app-portal-view-db-dashboard.vue
...portal-view-db-dashboard/app-portal-view-db-dashboard.vue
+1
-1
app-extend-editor-amount-portlet-base.vue
...-amount-portlet/app-extend-editor-amount-portlet-base.vue
+339
-0
app-extend-editor-amount-portlet-model.ts
...-amount-portlet/app-extend-editor-amount-portlet-model.ts
+55
-0
app-extend-editor-amount-portlet-service.ts
...mount-portlet/app-extend-editor-amount-portlet-service.ts
+11
-0
app-extend-editor-amount-portlet.less
...itor-amount-portlet/app-extend-editor-amount-portlet.less
+63
-0
app-extend-editor-amount-portlet.vue
...ditor-amount-portlet/app-extend-editor-amount-portlet.vue
+17
-0
extend-editor-amount-list-base.vue
...end-editor-amount-list/extend-editor-amount-list-base.vue
+826
-0
extend-editor-amount-list-model.ts
...end-editor-amount-list/extend-editor-amount-list-model.ts
+62
-0
extend-editor-amount-list-service.ts
...d-editor-amount-list/extend-editor-amount-list-service.ts
+163
-0
extend-editor-amount-list.less
.../extend-editor-amount-list/extend-editor-amount-list.less
+88
-0
extend-editor-amount-list.vue
...r/extend-editor-amount-list/extend-editor-amount-list.vue
+14
-0
main-form-base.vue
.../src/widgets/micro-component/main-form/main-form-base.vue
+5
-5
未找到文件。
app_Web/public/assets/json/portlet-data.json
浏览文件 @
c66d4ba5
...
...
@@ -90,14 +90,6 @@
{
"type"
:
"appde"
,
"appCodeName"
:
"IBIZAPPEDITOR"
,
"appName"
:
"编辑器"
,
"portletCodeName"
:
"appExtendEditor"
,
"portletName"
:
"扩展编辑器数量"
,
"groupCodeName"
:
"Ungroup"
,
"groupName"
:
"(未分类)"
,
"portletTYpe"
:
"LIST"
,
"componentName"
:
"ibizappeditor-app-extend-editor-portlet"
},
{
"type"
:
"appde"
,
"appCodeName"
:
"IBIZAPPEDITOR"
,
"appName"
:
"编辑器"
,
"portletCodeName"
:
"EditorList"
,
"portletName"
:
"编辑器列表"
,
"groupCodeName"
:
"PortletCat4"
,
...
...
@@ -159,6 +151,14 @@
"groupCodeName"
:
"Ungroup"
,
"groupName"
:
"(未分类)"
,
"portletTYpe"
:
"LIST"
,
"componentName"
:
"ibizappctrl-app-ctrl-amount-portlet"
},
{
"type"
:
"appde"
,
"appCodeName"
:
"IBIZAPPEXTENDEDITOR"
,
"appName"
:
"扩展编辑器"
,
"portletCodeName"
:
"appExtendEditorAmount"
,
"portletName"
:
"扩展编辑器数量"
,
"groupCodeName"
:
"Ungroup"
,
"groupName"
:
"(未分类)"
,
"portletTYpe"
:
"LIST"
,
"componentName"
:
"ibizappextendeditor-app-extend-editor-amount-portlet"
},
{
"type"
:
"app"
,
"appCodeName"
:
"IBIZBOOK"
,
"appName"
:
"图书"
,
...
...
@@ -320,11 +320,11 @@
"groupName"
:
"(未分类)"
,
"portletTYpe"
:
"LIST"
,
"componentName"
:
"app-ibizappeditor-app-editor-amount-portlet"
},
{
"type"
:
"app"
,
"appCodeName"
:
"IBIZAPPEDITOR"
,
"appName"
:
"编辑器"
,
"portletCodeName"
:
"appExtendEditor"
,
"appCodeName"
:
"IBIZAPPE
XTENDE
DITOR"
,
"appName"
:
"
扩展
编辑器"
,
"portletCodeName"
:
"appExtendEditor
Amount
"
,
"portletName"
:
"扩展编辑器数量"
,
"groupCodeName"
:
"Ungroup"
,
"groupName"
:
"(未分类)"
,
"portletTYpe"
:
"LIST"
,
"componentName"
:
"app-ibizappe
ditor-app-extend-editor
-portlet"
}
"portletTYpe"
:
"LIST"
,
"componentName"
:
"app-ibizappe
xtendeditor-app-extend-editor-amount
-portlet"
}
]
\ No newline at end of file
app_Web/public/assets/json/view-config.json
浏览文件 @
c66d4ba5
...
...
@@ -7,6 +7,14 @@
"viewname"
:
"IBIZSample0003STabExpView"
,
"viewtag"
:
"00a0716a2029a7fe79fe03b6f74c7c90"
},
"ibizappextendeditorlistview"
:
{
"title"
:
"扩展编辑器列表视图"
,
"caption"
:
"扩展编辑器"
,
"viewtype"
:
"DELISTVIEW"
,
"viewmodule"
:
"Sample"
,
"viewname"
:
"IBIZAPPEXTENDEDITORListView"
,
"viewtag"
:
"029cd8673e5bf4681a772c6110467f63"
},
"ibizorderdetailsmeditview9"
:
{
"title"
:
"订单明细多表单编辑视图"
,
"caption"
:
"订单明细"
,
...
...
@@ -1880,8 +1888,8 @@
"viewtag"
:
"ffedffb9c57cb200c275ba15e9100da4"
},
"appportalview"
:
{
"title"
:
"
应用门户视图
"
,
"caption"
:
"
应用门户视图
"
,
"title"
:
"
工作台
"
,
"caption"
:
"
工作台
"
,
"viewtype"
:
"APPPORTALVIEW"
,
"viewmodule"
:
"Ungroup"
,
"viewname"
:
"AppPortalView"
,
...
...
app_Web/src/locale/lang/en-US-base.ts
浏览文件 @
c66d4ba5
...
...
@@ -165,8 +165,8 @@ function getAppLocale(){
title
:
commonLogic
.
appcommonhandle
(
"可定制应用看板"
,
null
),
},
appportalview
:
{
caption
:
commonLogic
.
appcommonhandle
(
"
应用门户视图
"
,
null
),
title
:
commonLogic
.
appcommonhandle
(
"
应用门户视图
"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"
工作台
"
,
null
),
title
:
commonLogic
.
appcommonhandle
(
"
工作台
"
,
null
),
},
apppanelview
:
{
caption
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
app_Web/src/locale/lang/zh-CN-base.ts
浏览文件 @
c66d4ba5
...
...
@@ -165,8 +165,8 @@ function getAppLocale(){
title
:
commonLogic
.
appcommonhandle
(
"可定制应用看板"
,
null
),
},
appportalview
:
{
caption
:
commonLogic
.
appcommonhandle
(
"
应用门户视图
"
,
null
),
title
:
commonLogic
.
appcommonhandle
(
"
应用门户视图
"
,
null
),
caption
:
commonLogic
.
appcommonhandle
(
"
工作台
"
,
null
),
title
:
commonLogic
.
appcommonhandle
(
"
工作台
"
,
null
),
},
apppanelview
:
{
caption
:
commonLogic
.
appcommonhandle
(
""
,
null
),
...
...
app_Web/src/locale/lanres/entities/ibizappeditor/ibizappeditor_en_US_base.ts
浏览文件 @
c66d4ba5
...
...
@@ -72,11 +72,6 @@ function getLocaleResourceBase(){
uiactions
:
{
},
},
extendeditoramount_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
editorlist_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
...
...
app_Web/src/locale/lanres/entities/ibizappeditor/ibizappeditor_zh_CN_base.ts
浏览文件 @
c66d4ba5
...
...
@@ -72,11 +72,6 @@ function getLocaleResourceBase(){
uiactions
:
{
},
},
extendeditoramount_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
editorlist_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
...
...
app_Web/src/locale/lanres/entities/ibizappextendeditor/ibizappextendeditor_en_US_base.ts
浏览文件 @
c66d4ba5
...
...
@@ -15,6 +15,31 @@ function getLocaleResourceBase(){
amount
:
commonLogic
.
appcommonhandle
(
"数量"
,
null
),
extendeditortype
:
commonLogic
.
appcommonhandle
(
"扩展编辑器类型"
,
null
),
},
views
:
{
listview
:
{
caption
:
commonLogic
.
appcommonhandle
(
"扩展编辑器"
,
null
),
title
:
commonLogic
.
appcommonhandle
(
"扩展编辑器列表视图"
,
null
),
},
},
extendeditorlist_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
extendeditoramount_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
commonLogic
.
appcommonhandle
(
"常规条件"
,
null
),
},
uiactions
:
{
},
},
listviewtoolbar_toolbar
:
{
},
};
return
data
;
}
...
...
app_Web/src/locale/lanres/entities/ibizappextendeditor/ibizappextendeditor_zh_CN_base.ts
浏览文件 @
c66d4ba5
...
...
@@ -15,6 +15,31 @@ function getLocaleResourceBase(){
amount
:
commonLogic
.
appcommonhandle
(
"数量"
,
null
),
extendeditortype
:
commonLogic
.
appcommonhandle
(
"扩展编辑器类型"
,
null
),
},
views
:
{
listview
:
{
caption
:
commonLogic
.
appcommonhandle
(
"扩展编辑器"
,
null
),
title
:
commonLogic
.
appcommonhandle
(
"扩展编辑器列表视图"
,
null
),
},
},
extendeditorlist_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
extendeditoramount_list
:
{
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
commonLogic
.
appcommonhandle
(
"常规条件"
,
null
),
},
uiactions
:
{
},
},
listviewtoolbar_toolbar
:
{
},
};
return
data
;
}
...
...
app_Web/src/locale/lanres/entities/micro-component/micro-component_en_US_base.ts
浏览文件 @
c66d4ba5
...
...
@@ -119,6 +119,16 @@ function getLocaleResourceBase(){
uiactions
:
{
},
},
main_grid
:
{
columns
:
{
microcomponentname
:
commonLogic
.
appcommonhandle
(
"微组件名称"
,
null
),
updateman
:
commonLogic
.
appcommonhandle
(
"更新人"
,
null
),
updatedate
:
commonLogic
.
appcommonhandle
(
"更新时间"
,
null
),
},
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
commonLogic
.
appcommonhandle
(
"常规条件"
,
null
),
...
...
app_Web/src/locale/lanres/entities/micro-component/micro-component_zh_CN_base.ts
浏览文件 @
c66d4ba5
...
...
@@ -119,6 +119,16 @@ function getLocaleResourceBase(){
uiactions
:
{
},
},
main_grid
:
{
columns
:
{
microcomponentname
:
commonLogic
.
appcommonhandle
(
"微组件名称"
,
null
),
updateman
:
commonLogic
.
appcommonhandle
(
"更新人"
,
null
),
updatedate
:
commonLogic
.
appcommonhandle
(
"更新时间"
,
null
),
},
nodata
:
commonLogic
.
appcommonhandle
(
""
,
null
),
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
commonLogic
.
appcommonhandle
(
"常规条件"
,
null
),
...
...
app_Web/src/mock/portlet/portlet.ts
浏览文件 @
c66d4ba5
...
...
@@ -100,14 +100,6 @@ mock.onGet('./assets/json/portlet-data.json').reply((config: any) => {
{
"type"
:
"appde"
,
"appCodeName"
:
"IBIZAPPEDITOR"
,
"appName"
:
"编辑器"
,
"portletCodeName"
:
"appExtendEditor"
,
"portletName"
:
"扩展编辑器数量"
,
"groupCodeName"
:
"Ungroup"
,
"groupName"
:
"(未分类)"
,
"portletTYpe"
:
"LIST"
,
"componentName"
:
"ibizappeditor-app-extend-editor-portlet"
},
{
"type"
:
"appde"
,
"appCodeName"
:
"IBIZAPPEDITOR"
,
"appName"
:
"编辑器"
,
"portletCodeName"
:
"EditorList"
,
"portletName"
:
"编辑器列表"
,
"groupCodeName"
:
"PortletCat4"
,
...
...
@@ -169,6 +161,14 @@ mock.onGet('./assets/json/portlet-data.json').reply((config: any) => {
"groupCodeName"
:
"Ungroup"
,
"groupName"
:
"(未分类)"
,
"portletTYpe"
:
"LIST"
,
"componentName"
:
"ibizappctrl-app-ctrl-amount-portlet"
},
{
"type"
:
"appde"
,
"appCodeName"
:
"IBIZAPPEXTENDEDITOR"
,
"appName"
:
"扩展编辑器"
,
"portletCodeName"
:
"appExtendEditorAmount"
,
"portletName"
:
"扩展编辑器数量"
,
"groupCodeName"
:
"Ungroup"
,
"groupName"
:
"(未分类)"
,
"portletTYpe"
:
"LIST"
,
"componentName"
:
"ibizappextendeditor-app-extend-editor-amount-portlet"
},
{
"type"
:
"app"
,
"appCodeName"
:
"IBIZBOOK"
,
"appName"
:
"图书"
,
...
...
@@ -330,12 +330,12 @@ mock.onGet('./assets/json/portlet-data.json').reply((config: any) => {
"groupName"
:
"(未分类)"
,
"portletTYpe"
:
"LIST"
,
"componentName"
:
"app-ibizappeditor-app-editor-amount-portlet"
},
{
"type"
:
"app"
,
"appCodeName"
:
"IBIZAPPEDITOR"
,
"appName"
:
"编辑器"
,
"portletCodeName"
:
"appExtendEditor"
,
"appCodeName"
:
"IBIZAPPE
XTENDE
DITOR"
,
"appName"
:
"
扩展
编辑器"
,
"portletCodeName"
:
"appExtendEditor
Amount
"
,
"portletName"
:
"扩展编辑器数量"
,
"groupCodeName"
:
"Ungroup"
,
"groupName"
:
"(未分类)"
,
"portletTYpe"
:
"LIST"
,
"componentName"
:
"app-ibizappe
ditor-app-extend-editor
-portlet"
}
"portletTYpe"
:
"LIST"
,
"componentName"
:
"app-ibizappe
xtendeditor-app-extend-editor-amount
-portlet"
}
]];
});
\ No newline at end of file
app_Web/src/mock/viewconfig/viewconfig.ts
浏览文件 @
c66d4ba5
...
...
@@ -15,6 +15,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"IBIZSample0003STabExpView"
,
"viewtag"
:
"00a0716a2029a7fe79fe03b6f74c7c90"
},
"ibizappextendeditorlistview"
:
{
"title"
:
"扩展编辑器列表视图"
,
"caption"
:
"扩展编辑器"
,
"viewtype"
:
"DELISTVIEW"
,
"viewmodule"
:
"Sample"
,
"viewname"
:
"IBIZAPPEXTENDEDITORListView"
,
"viewtag"
:
"029cd8673e5bf4681a772c6110467f63"
},
"ibizorderdetailsmeditview9"
:
{
"title"
:
"订单明细多表单编辑视图"
,
"caption"
:
"订单明细"
,
...
...
@@ -1888,8 +1896,8 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag"
:
"ffedffb9c57cb200c275ba15e9100da4"
},
"appportalview"
:
{
"title"
:
"
应用门户视图
"
,
"caption"
:
"
应用门户视图
"
,
"title"
:
"
工作台
"
,
"caption"
:
"
工作台
"
,
"viewtype"
:
"APPPORTALVIEW"
,
"viewmodule"
:
"Ungroup"
,
"viewname"
:
"AppPortalView"
,
...
...
app_Web/src/pages/sample/micro-component-grid-view/micro-component-grid-view-base.vue
浏览文件 @
c66d4ba5
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: #if view.getXDataPSControl??
&&
view... [in template "TEMPLCODE_en_US" at line 246, column 1]
----
视图[Sample.microComponentGridView]无法获取部件[grid]
\ No newline at end of file
<
template
>
<div
class=
'view-container degridview micro-component-grid-view'
>
<app-studioaction
:viewTitle=
"$t(model.srfCaption)"
viewName=
"microcomponentgridview"
></app-studioaction>
<card
class=
'view-card view-no-caption'
:dis-hover=
"true"
:bordered=
"false"
>
<div
class=
'view-top-messages'
>
<app-alert-group
position=
'TOP'
:context=
"context"
:viewparam=
"viewparams"
infoGroup=
'VMGroup69'
viewname=
'microcomponentgridview'
></app-alert-group>
</div>
<div
class=
'content-container'
>
<div
style=
'margin-bottom: 6px;'
>
<i-input
v-show=
"!isExpandSearchForm"
v-model=
"query"
search
enter-button
@
on-search=
"onSearch($event)"
class=
'quick-search-input'
style=
'max-width: 400px;padding-left: 24px'
placeholder=
"微组件名称"
/>
<div
class=
'pull-right'
>
<div
class=
'toolbar-container'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem3.visabled"
:disabled=
"toolBarModels.tbitem3.disabled"
class=
' deepskyblueToolBar'
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem3' }, $event)">
<i
class=
'fa fa-file-text-o'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem3.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem3.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem4.visabled"
:disabled=
"toolBarModels.tbitem4.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem4' }, $event)">
<span
class=
'caption'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem4.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem4.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.deuiaction1.visabled"
:disabled=
"toolBarModels.deuiaction1.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'deuiaction1' }, $event)">
<i
class=
'fa fa-refresh'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.deuiaction1.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.deuiaction1.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem6.visabled"
:disabled=
"toolBarModels.tbitem6.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem6' }, $event)">
<span
class=
'caption'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem6.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem6.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem8.visabled"
:disabled=
"toolBarModels.tbitem8.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem8' }, $event)">
<span
class=
'caption'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem8.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem8.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<app-export-excel
:item=
"toolBarModels.tbitem13"
:caption=
"$t('entities.microcomponent.gridviewtoolbar_toolbar.tbitem13.caption')"
@
exportexcel=
"toolbar_click(
{ tag: 'tbitem13' }, $event)">
</app-export-excel>
<div
slot=
'content'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem13.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<dropdown
v-show=
"toolBarModels.tbitem16.visabled"
trigger=
'click'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
class=
''
>
<i
class=
''
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem16.caption'
)
}}
</span>
<icon
type=
"ios-arrow-down"
></icon>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem16.tip'
)
}}
</div>
</tooltip>
<dropdown-menu
slot=
'list'
>
<dropdown-item>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem21.visabled"
:disabled=
"toolBarModels.tbitem21.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem21' }, $event)">
<i
class=
'fa fa-download'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem21.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem21.tip'
)
}}
</div>
</tooltip>
</dropdown-item>
<dropdown-item>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem23.visabled"
:disabled=
"toolBarModels.tbitem23.disabled"
class=
''
v-loading:i-button
@
click=
"toolbar_click(
{ tag: 'tbitem23' }, $event)">
<i
class=
'fa fa-upload'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem23.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.microcomponent.gridviewtoolbar_toolbar.tbitem23.tip'
)
}}
</div>
</tooltip>
</dropdown-item>
</dropdown-menu>
</dropdown>
</div>
</div>
</div>
<view
_searchform
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:showBusyIndicator=
"true"
v-show=
"isExpandSearchForm"
loaddraftAction=
"FilterGetDraft"
loadAction=
"FilterGet"
name=
"searchform"
ref=
'searchform'
@
save=
"searchform_save($event)"
@
search=
"searchform_search($event)"
@
load=
"searchform_load($event)"
@
closeview=
"closeView($event)"
>
</view
_searchform
>
<div
class=
'view-body-messages'
>
<app-alert-group
position=
'BODY'
:context=
"context"
:viewparam=
"viewparams"
infoGroup=
'VMGroup69'
viewname=
'microcomponentgridview'
></app-alert-group>
</div>
<view
_grid
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:isSingleSelect=
"isSingleSelect"
:showBusyIndicator=
"true"
:isOpenEdit=
"false"
:gridRowActiveMode=
"gridRowActiveMode"
:isformDruipart=
"isformDruipart"
@
save=
"onSave"
updateAction=
""
removeAction=
"Remove"
loaddraftAction=
""
loadAction=
""
createAction=
""
fetchAction=
"FetchDefault"
:newdata=
"newdata"
:opendata=
"opendata"
name=
"grid"
ref=
'grid'
@
selectionchange=
"grid_selectionchange($event)"
@
beforeload=
"grid_beforeload($event)"
@
rowdblclick=
"grid_rowdblclick($event)"
@
remove=
"grid_remove($event)"
@
load=
"grid_load($event)"
@
closeview=
"closeView($event)"
>
</view
_grid
>
</div>
<div
class=
'view-bottom-messages'
>
<app-alert-group
position=
'BOTTOM'
:context=
"context"
:viewparam=
"viewparams"
infoGroup=
'VMGroup69'
viewname=
'microcomponentgridview'
></app-alert-group>
</div>
</card>
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Inject
}
from
'vue-property-decorator'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
MicroComponentService
from
'@/service/micro-component/micro-component-service'
;
import
MicroComponentAuthService
from
'@/authservice/micro-component/micro-component-auth-service'
;
import
GridViewEngine
from
'@engine/view/grid-view-engine'
;
import
MicroComponentUIService
from
'@/uiservice/micro-component/micro-component-ui-service'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
@
Component
({
components
:
{
},
})
export
default
class
MicroComponentGridViewBase
extends
Vue
{
/**
* 实体服务对象
*
* @type {MicroComponentService}
* @memberof MicroComponentGridViewBase
*/
public
appEntityService
:
MicroComponentService
=
new
MicroComponentService
;
/**
* 实体UI服务对象
*
* @type MicroComponentUIService
* @memberof MicroComponentGridViewBase
*/
public
appUIService
:
MicroComponentUIService
=
new
MicroComponentUIService
(
this
.
$store
);
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof MicroComponentGridViewBase
*/
@
Emit
()
public
viewDatasChange
(
val
:
any
):
any
{
return
val
;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof MicroComponentGridViewBase
*/
@
Prop
()
public
viewdata
!
:
string
;
/**
* 传入视图参数
*
* @type {string}
* @memberof MicroComponentGridViewBase
*/
@
Prop
()
public
viewparam
!
:
string
;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof MicroComponentGridViewBase
*/
@
Prop
({
default
:
true
})
public
viewDefaultUsage
!
:
boolean
;
/**
* 视图默认使用
*
* @type {string}
* @memberof MicroComponentGridViewBase
*/
@
Inject
({
from
:
'navModel'
,
default
:
'tab'
})
public
navModel
!
:
string
;
/**
* 视图标识
*
* @type {string}
* @memberof MicroComponentGridViewBase
*/
public
viewtag
:
string
=
'af77190352cccc001b8f3dcd60436512'
;
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof MicroComponentGridViewBase
*/
public
customViewNavContexts
:
any
=
{
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof MicroComponentGridViewBase
*/
public
customViewParams
:
any
=
{
};
/**
* 视图模型数据
*
* @type {*}
* @memberof MicroComponentGridViewBase
*/
public
model
:
any
=
{
srfCaption
:
'entities.microcomponent.views.gridview.caption'
,
srfTitle
:
'entities.microcomponent.views.gridview.title'
,
srfSubTitle
:
'entities.microcomponent.views.gridview.subtitle'
,
dataInfo
:
''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MicroComponentGridViewBase
*/
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
this
.
viewparams
=
{};
if
(
typeof
newVal
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
else
{
this
.
viewparams
=
Util
.
deepCopy
(
this
.
viewparam
);
}
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MicroComponentGridViewBase
*/
@
Watch
(
'viewdata'
)
onViewData
(
newVal
:
any
,
oldVal
:
any
)
{
const
_this
:
any
=
this
;
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
engine
)
{
this
.
$nextTick
(()
=>
{
_this
.
parseViewParam
();
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof MicroComponentGridViewBase
*/
public
containerModel
:
any
=
{
view_grid
:
{
name
:
'grid'
,
type
:
'GRID'
},
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_searchform
:
{
name
:
'searchform'
,
type
:
'SEARCHFORM'
},
};
/**
* 视图刷新
*
* @param {*} args
* @memberof MicroComponentGridViewBase
*/
public
refresh
(
args
?:
any
):
void
{
const
refs
:
any
=
this
.
$refs
;
if
(
refs
&&
refs
.
grid
)
{
refs
.
grid
.
refresh
();
}
}
/**
* 计数器刷新
*
* @memberof MicroComponentGridViewBase
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 视图状态订阅对象
*
* @public
* @type {Subject<{action: string, data: any}>}
* @memberof MicroComponentGridViewBase
*/
public
viewState
:
Subject
<
ViewState
>
=
new
Subject
();
/**
* 工具栏模型
*
* @type {*}
* @memberof MicroComponentGridView
*/
public
toolBarModels
:
any
=
{
tbitem3
:
{
name
:
'tbitem3'
,
actiontarget
:
'NONE'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem4
:
{
name
:
'tbitem4'
,
actiontarget
:
'NONE'
,
caption
:
'编辑'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
}
},
deuiaction1
:
{
name
:
'deuiaction1'
,
actiontarget
:
'NONE'
,
caption
:
'刷新'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Refresh'
,
target
:
''
}
},
tbitem6
:
{
name
:
'tbitem6'
,
actiontarget
:
'NONE'
,
caption
:
'拷贝'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
}
},
tbitem7
:
{
name
:
'tbitem7'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem8
:
{
name
:
'tbitem8'
,
actiontarget
:
'NONE'
,
caption
:
'删除'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Remove'
,
target
:
'MULTIKEY'
}
},
tbitem9
:
{
name
:
'tbitem9'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem13
:
{
name
:
'tbitem13'
,
actiontarget
:
'NONE'
,
caption
:
'导出'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ExportExcel'
,
target
:
''
},
MaxRowCount
:
1000
},
tbitem10
:
{
name
:
'tbitem10'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem16
:
{
name
:
'tbitem16'
,
caption
:
'其它'
,
disabled
:
false
,
type
:
'ITEMS'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem21
:
{
name
:
'tbitem21'
,
actiontarget
:
'NONE'
,
caption
:
'导出数据模型'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ExportModel'
,
target
:
''
}
},
tbitem23
:
{
name
:
'tbitem23'
,
actiontarget
:
'NONE'
,
caption
:
'数据导入'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Import'
,
target
:
''
}
},
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof MicroComponentGridViewBase
*/
public
engine
:
GridViewEngine
=
new
GridViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof MicroComponentGridViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
opendata
:
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
=>
{
this
.
opendata
(
args
,
fullargs
,
params
,
$event
,
xData
);
},
newdata
:
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
=>
{
this
.
newdata
(
args
,
fullargs
,
params
,
$event
,
xData
);
},
grid
:
this
.
$refs
.
grid
,
searchform
:
this
.
$refs
.
searchform
,
keyPSDEField
:
'microcomponent'
,
majorPSDEField
:
'microcomponentname'
,
isLoadDefault
:
true
,
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof MicroComponentGridViewBase
*/
public
navDataService
=
NavDataService
.
getInstance
(
this
.
$store
);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof MicroComponentGridViewBase
*/
public
serviceStateEvent
:
Subscription
|
undefined
;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof MicroComponentGridViewBase
*/
@
Prop
()
public
portletState
?:
any
;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof MicroComponentGridViewBase
*/
public
portletStateEvent
:
Subscription
|
undefined
;
/**
* 应用上下文
*
* @type {*}
* @memberof MicroComponentGridViewBase
*/
public
context
:
any
=
{};
/**
* 视图参数
*
* @type {*}
* @memberof MicroComponentGridViewBase
*/
public
viewparams
:
any
=
{};
/**
* 视图缓存数据
*
* @type {*}
* @memberof MicroComponentGridViewBase
*/
public
viewCacheData
:
any
;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof MicroComponentGridViewBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 解析视图参数
*
* @public
* @memberof MicroComponentGridViewBase
*/
public
parseViewParam
(
inputvalue
:
any
=
null
):
void
{
for
(
let
key
in
this
.
context
){
delete
this
.
context
[
key
];
}
if
(
this
.
$store
.
getters
.
getAppData
()
&&
this
.
$store
.
getters
.
getAppData
().
context
){
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
if
(
this
.
context
&&
this
.
context
.
srfparentkey
){
Object
.
assign
(
this
.
viewparams
,{
srfparentkey
:
this
.
context
.
srfparentkey
});
}
this
.
handleCustomViewData
();
return
;
}
const
path
=
(
this
.
$route
.
matched
[
this
.
$route
.
matched
.
length
-
1
]).
path
;
const
keys
:
Array
<
any
>
=
[];
const
curReg
=
this
.
$pathToRegExp
.
pathToRegexp
(
path
,
keys
);
const
matchArray
=
curReg
.
exec
(
this
.
$route
.
path
);
let
tempValue
:
Object
=
{};
keys
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
.
name
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
this
.
$viewTool
.
formatRouteParams
(
tempValue
,
this
.
$route
,
this
.
context
,
this
.
viewparams
);
if
(
inputvalue
){
Object
.
assign
(
this
.
context
,{
'microcomponent'
:
inputvalue
});
}
//初始化视图唯一标识
Object
.
assign
(
this
.
context
,{
srfsessionid
:
this
.
$util
.
createUUID
()});
this
.
handleCustomViewData
();
//初始化导航数据
this
.
initNavDataWithRoute
();
}
/**
* 处理自定义视图数据
*
* @memberof MicroComponentGridViewBase
*/
public
handleCustomViewData
(){
if
(
Object
.
keys
(
this
.
customViewNavContexts
).
length
>
0
){
Object
.
keys
(
this
.
customViewNavContexts
).
forEach
((
item
:
any
)
=>
{
let
tempContext
:
any
=
{};
let
curNavContext
:
any
=
this
.
customViewNavContexts
[
item
];
this
.
handleCustomDataLogic
(
curNavContext
,
tempContext
,
item
);
Object
.
assign
(
this
.
context
,
tempContext
);
})
}
if
(
Object
.
keys
(
this
.
customViewParams
).
length
>
0
){
Object
.
keys
(
this
.
customViewParams
).
forEach
((
item
:
any
)
=>
{
let
tempParam
:
any
=
{};
let
curNavParam
:
any
=
this
.
customViewParams
[
item
];
this
.
handleCustomDataLogic
(
curNavParam
,
tempParam
,
item
);
Object
.
assign
(
this
.
viewparams
,
tempParam
);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof MicroComponentGridViewBase
*/
public
handleCustomDataLogic
(
curNavData
:
any
,
tempData
:
any
,
item
:
string
){
// 直接值直接赋值
if
(
curNavData
.
isRawValue
){
if
(
Object
.
is
(
curNavData
.
value
,
"null"
)
||
Object
.
is
(
curNavData
.
value
,
""
)){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
curNavData
.
value
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
else
{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if
(
this
.
context
[(
curNavData
.
value
).
toLowerCase
()]
!=
null
){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
this
.
context
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
if
(
this
.
viewparams
[(
curNavData
.
value
).
toLowerCase
()]
!=
null
){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
this
.
viewparams
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
}
}
/**
* 初始化导航数据(路由模式)
*
* @memberof MicroComponentGridViewBase
*/
public
initNavDataWithRoute
(
data
:
any
=
null
,
isNew
:
boolean
=
false
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavData
({
id
:
'micro-component-grid-view'
,
tag
:
this
.
viewtag
,
srfkey
:
isNew
?
null
:
this
.
context
.
microcomponent
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof MicroComponentGridViewBase
*/
public
initNavDataWithTab
(
data
:
any
=
null
,
isOnlyAdd
:
boolean
=
true
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
!
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavDataByOnly
({
id
:
'micro-component-grid-view'
,
tag
:
this
.
viewtag
,
srfkey
:
this
.
context
.
microcomponent
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
},
isOnlyAdd
);
}
}
/**
* Vue声明周期
*
* @memberof MicroComponentGridViewBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof MicroComponentGridViewBase
*/
public
afterCreated
(){
let
_this
:
any
=
this
;
const
secondtag
=
_this
.
$util
.
createUUID
();
_this
.
$store
.
commit
(
'viewaction/createdView'
,
{
viewtag
:
_this
.
viewtag
,
secondtag
:
secondtag
});
_this
.
viewtag
=
secondtag
;
_this
.
parseViewParam
();
_this
.
serviceStateEvent
=
_this
.
navDataService
.
serviceState
.
subscribe
(({
action
,
name
,
data
}:{
action
:
string
,
name
:
any
,
data
:
any
})
=>
{
if
(
!
Object
.
is
(
name
,
'micro-component-grid-view'
)){
return
;
}
if
(
Object
.
is
(
action
,
'viewrefresh'
))
{
_this
.
$nextTick
(()
=>
{
_this
.
parseViewParam
(
data
);
if
(
_this
.
engine
){
_this
.
engine
.
load
();
}
});
}
});
if
(
_this
.
portletState
){
_this
.
portletStateEvent
=
_this
.
portletState
.
subscribe
((
res
:
any
)
=>
{
if
(
!
Object
.
is
(
res
.
name
,
'microComponentGridView'
)){
return
;
}
if
(
Object
.
is
(
res
.
action
,
'refresh'
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
){
_this
.
refresh
();
}
})
}
if
(
this
.
formDruipart
){
this
.
formDruipart
.
subscribe
((
res
:
any
)
=>
{
if
(
Object
.
is
(
res
.
action
,
'save'
)){
this
.
viewState
.
next
({
tag
:
'grid'
,
action
:
'save'
,
data
:
this
.
viewparams
});
}
if
(
Object
.
is
(
res
.
action
,
'load'
)){
const
_this
:
any
=
this
;
_this
.
engine
.
load
(
res
.
data
,
true
);
}
});
}
}
/**
* 销毁之前
*
* @memberof MicroComponentGridViewBase
*/
public
beforeDestroy
()
{
this
.
$store
.
commit
(
'viewaction/removeView'
,
this
.
viewtag
);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof MicroComponentGridViewBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof MicroComponentGridViewBase
*/
public
afterMounted
(){
const
_this
:
any
=
this
;
_this
.
engineInit
();
if
(
_this
.
loadModel
&&
_this
.
loadModel
instanceof
Function
)
{
_this
.
loadModel
();
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public
grid_selectionchange
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'selectionchange'
,
$event
);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public
grid_beforeload
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'beforeload'
,
$event
);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public
grid_rowdblclick
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'rowdblclick'
,
$event
);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public
grid_remove
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'remove'
,
$event
);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public
grid_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'load'
,
$event
);
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
)
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem3'
))
{
this
.
toolbar_tbitem3_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem4'
))
{
this
.
toolbar_tbitem4_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'deuiaction1'
))
{
this
.
toolbar_deuiaction1_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem6'
))
{
this
.
toolbar_tbitem6_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem24'
))
{
this
.
toolbar_tbitem24_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem25'
))
{
this
.
toolbar_tbitem25_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem8'
))
{
this
.
toolbar_tbitem8_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem13'
))
{
this
.
toolbar_tbitem13_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem11'
))
{
this
.
toolbar_tbitem11_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem21'
))
{
this
.
toolbar_tbitem21_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem23'
))
{
this
.
toolbar_tbitem23_click
(
null
,
''
,
$event2
);
}
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public
searchform_save
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'save'
,
$event
);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public
searchform_search
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'search'
,
$event
);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public
searchform_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'load'
,
$event
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem3_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
New
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem4_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Edit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_deuiaction1_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Refresh
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem6_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Copy
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem24_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ToggleRowEdit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem25_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
NewRow
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem8_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Remove
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem13_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ExportExcel
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem11_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Print
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem21_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ExportModel
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem23_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Import
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"MicroComponent"
);
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof MicroComponentGridView
*/
public
newdata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
let
localContext
:
any
=
null
;
let
localViewParam
:
any
=
null
;
const
data
:
any
=
{};
if
(
args
[
0
].
srfsourcekey
){
data
.
srfsourcekey
=
args
[
0
].
srfsourcekey
;
}
let
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
delete
tempContext
.
microcomponent
;
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'microcomponents'
,
parameterName
:
'microcomponent'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
];
const
_this
:
any
=
this
;
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
_data
:
any
=
{
w
:
(
new
Date
().
getTime
())
};
Object
.
assign
(
_data
,
data
);
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
tempContext
,
deResParameters
,
parameters
,
args
,
_data
);
this
.
$router
.
push
(
routePath
);
}
openIndexViewTab
(
data
);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof MicroComponentGridView
*/
public
opendata
(
args
:
any
[],
fullargs
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
if
(
!
this
.
viewDefaultUsage
){
if
(
Object
.
is
(
this
.
navModel
,
"route"
)){
this
.
initNavDataWithRoute
(
this
.
viewCacheData
,
false
,
true
);
}
else
{
this
.
initNavDataWithTab
(
this
.
viewCacheData
,
false
,
true
);
}
}
let
localContext
:
any
=
null
;
let
localViewParam
:
any
=
null
;
const
data
:
any
=
{};
let
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'microcomponents'
,
parameterName
:
'microcomponent'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
];
const
_this
:
any
=
this
;
if
(
fullargs
&&
fullargs
.
copymode
){
Object
.
assign
(
data
,{
copymode
:
true
});
}
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
tempContext
,
deResParameters
,
parameters
,
args
,
data
);
this
.
$router
.
push
(
routePath
);
}
openIndexViewTab
(
data
);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
New
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
_this
.
newdata
&&
_this
.
newdata
instanceof
Function
)
{
const
data
:
any
=
{};
_this
.
newdata
([{
...
data
}],[{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'newdata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
Edit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
opendata
&&
_this
.
opendata
instanceof
Function
)
{
const
data
:
any
=
{
};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
microcomponent
:
args
[
0
].
microcomponent
})
}
_this
.
opendata
([{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'opendata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 刷新
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
Refresh
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
xData
&&
xData
.
refresh
&&
xData
.
refresh
instanceof
Function
)
{
xData
.
refresh
(
args
);
}
else
if
(
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
(
args
);
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
Copy
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
opendata
&&
_this
.
opendata
instanceof
Function
)
{
const
data
:
any
=
{
};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
microcomponent
:
args
[
0
].
microcomponent
});
}
if
(
!
params
)
params
=
{};
Object
.
assign
(
params
,{
copymode
:
true
});
_this
.
opendata
([{
...
data
}],
params
,
$event
,
xData
);
}
else
{
Object
.
assign
(
this
.
viewparams
,{
copymode
:
true
});
}
}
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
ToggleRowEdit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
xData
.
actualIsOpenEdit
=
!
xData
.
actualIsOpenEdit
;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
NewRow
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
const
data
:
any
=
{};
if
(
_this
.
hasOwnProperty
(
'newRow'
)
&&
_this
.
newRow
instanceof
Function
)
{
_this
.
newRow
([{
...
data
}],
params
,
$event
,
xData
);
}
else
if
(
xData
.
newRow
&&
xData
.
newRow
instanceof
Function
)
{
xData
.
newRow
([{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'newRow 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
Remove
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
remove
instanceof
Function
))
{
return
;
}
xData
.
remove
(
args
);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
ExportExcel
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
exportExcel
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
exportExcel
(
$event
.
exportparms
);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
Print
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
let
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
print
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
print
();
}
/**
* 导出数据模型
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
ExportModel
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'导出数据模型未支持'
});
}
/**
* 数据导入
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof MicroComponentGridViewBase
*/
public
Import
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
importExcel
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
importExcel
(
params
);
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof MicroComponentGridViewBase
*/
public
closeView
(
args
:
any
[]):
void
{
let
_view
:
any
=
this
;
if
(
_view
.
viewdata
)
{
_view
.
$emit
(
'viewdataschange'
,
Array
.
isArray
(
args
)?
args
:[
args
]);
_view
.
$emit
(
'close'
,
Array
.
isArray
(
args
)?
args
:[
args
]);
}
else
if
(
_view
.
$tabPageExp
)
{
_view
.
$tabPageExp
.
onClose
(
_view
.
$route
.
fullPath
);
}
}
/**
* 销毁视图回调
*
* @memberof MicroComponentGridViewBase
*/
public
destroyed
(){
this
.
afterDestroyed
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof MicroComponentGridViewBase
*/
public
afterDestroyed
(){
if
(
this
.
viewDefaultUsage
){
let
localStoreLength
=
Object
.
keys
(
localStorage
);
if
(
localStoreLength
.
length
>
0
){
localStoreLength
.
forEach
((
item
:
string
)
=>
{
if
(
item
.
startsWith
(
this
.
context
.
srfsessionid
)){
localStorage
.
removeItem
(
item
);
}
})
}
if
(
Object
.
is
(
this
.
navModel
,
"tab"
)){
this
.
navDataService
.
removeNavDataByTag
(
this
.
viewtag
);
}
if
(
this
.
serviceStateEvent
)
{
this
.
serviceStateEvent
.
unsubscribe
();
}
}
// 销毁计数器定时器
if
(
this
.
counterServiceArray
&&
this
.
counterServiceArray
.
length
>
0
){
this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
destroyCounter
&&
item
.
destroyCounter
instanceof
Function
){
item
.
destroyCounter
();
}
})
}
if
(
this
.
portletStateEvent
){
this
.
portletStateEvent
.
unsubscribe
();
}
}
/**
* 是否单选
*
* @type {boolean}
* @memberof MicroComponentGridViewBase
*/
public
isSingleSelect
:
boolean
=
false
;
/**
* 是否嵌入关系界面
*
* @type {boolean}
* @memberof MicroComponentGridViewBase
*/
@
Prop
({
default
:
false
})
public
isformDruipart
?:
boolean
;
/**
* 界面关系通讯对象
*
* @type {Subject<ViewState>}
* @memberof MicroComponentGridViewBase
*/
@
Prop
()
public
formDruipart
?:
Subject
<
ViewState
>
;
/**
* 搜索值
*
* @type {string}
* @memberof MicroComponentGridViewBase
*/
public
query
:
string
=
''
;
/**
* 是否展开搜索表单
*
* @type {boolean}
* @memberof MicroComponentGridViewBase
*/
public
isExpandSearchForm
:
boolean
=
false
;
/**
* 表格行数据默认激活模式
* 0 不激活
* 1 单击激活
* 2 双击激活
*
* @type {(number | 0 | 1 | 2)}
* @memberof MicroComponentGridViewBase
*/
public
gridRowActiveMode
:
number
|
0
|
1
|
2
=
2
;
/**
* 快速搜索
*
* @param {*} $event
* @memberof MicroComponentGridViewBase
*/
public
onSearch
(
$event
:
any
):
void
{
const
grid
:
any
=
this
.
$refs
.
grid
;
if
(
grid
)
{
grid
.
load
(
this
.
context
,
true
);
}
}
/**
* grid 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ENTITYTEST1Usr2GridViewBase
*/
public
onSave
(
$event
:
any
)
{
this
.
$emit
(
'drdatasaved'
,
$event
);
}
/**
* 刷新数据
*
* @readonly
* @type {(number | null)}
* @memberof MicroComponentGridViewBase
*/
get
refreshdata
():
number
|
null
{
return
this
.
$store
.
getters
[
'viewaction/getRefreshData'
](
this
.
viewtag
);
}
/**
* 监控数据变化
*
* @param {*} newVal
* @param {*} oldVal
* @returns
* @memberof MicroComponentGridViewBase
*/
@
Watch
(
'refreshdata'
)
onRefreshData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
===
null
||
newVal
===
undefined
)
{
return
;
}
if
(
newVal
===
0
)
{
return
;
}
const
grid
:
any
=
this
.
$refs
.
grid
;
if
(
grid
)
{
grid
.
load
({});
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './micro-component-grid-view.less';
</
style
>
\ No newline at end of file
app_Web/src/pages/sample/micro-component-grid-view/micro-component-grid-view.vue
浏览文件 @
c66d4ba5
...
...
@@ -2,11 +2,11 @@
import
{
Component
}
from
'vue-property-decorator'
;
import
MicroComponentGridViewBase
from
'./micro-component-grid-view-base.vue'
;
import
view_
form
from
'@widgets/micro-component/main-form/main-form
.vue'
;
import
view_
grid
from
'@widgets/micro-component/main-grid/main-grid
.vue'
;
import
view_searchform
from
'@widgets/micro-component/default-searchform/default-searchform.vue'
;
@
Component
({
components
:
{
view_
form
,
view_
grid
,
view_searchform
,
},
beforeRouteEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
...
...
app_Web/src/portlet-register.ts
浏览文件 @
c66d4ba5
...
...
@@ -10,7 +10,6 @@ import IBIZOrderDetailPortalComponentsList3 from '@/widgets/ibizorder-detail/por
import
IBIZOrderPortalComponentsOperation
from
'@/widgets/ibizorder/portal-components-operation-portlet/portal-components-operation-portlet.vue'
;
import
IBIZOrderPortalComponentsList2
from
'@/widgets/ibizorder/portal-components-list2-portlet/portal-components-list2-portlet.vue'
;
import
IBIZOrderPortalComponentsChart
from
'@/widgets/ibizorder/portal-components-chart-portlet/portal-components-chart-portlet.vue'
;
import
IBIZAPPEDITORAppExtendEditor
from
'@/widgets/ibizappeditor/app-extend-editor-portlet/app-extend-editor-portlet.vue'
;
import
IBIZAPPEDITORAppEditorListView
from
'@/widgets/ibizappeditor/app-editor-list-view-portlet/app-editor-list-view-portlet.vue'
;
import
IBIZAPPEDITOREditorChart
from
'@/widgets/ibizappeditor/editor-chart-portlet/editor-chart-portlet.vue'
;
import
IBIZAPPEDITORAppEditorAmount
from
'@/widgets/ibizappeditor/app-editor-amount-portlet/app-editor-amount-portlet.vue'
;
...
...
@@ -19,6 +18,7 @@ import IBIZBOOKPortalComponentsView from '@/widgets/ibizbook/portal-components-v
import
IBIZAPPCTRLAppCtrlListView
from
'@/widgets/ibizappctrl/app-ctrl-list-view-portlet/app-ctrl-list-view-portlet.vue'
;
import
IBIZAPPCTRLCtrlChart
from
'@/widgets/ibizappctrl/ctrl-chart-portlet/ctrl-chart-portlet.vue'
;
import
IBIZAPPCTRLAppCtrlAmount
from
'@/widgets/ibizappctrl/app-ctrl-amount-portlet/app-ctrl-amount-portlet.vue'
;
import
IBIZAPPEXTENDEDITORAppExtendEditorAmount
from
'@/widgets/ibizappextendeditor/app-extend-editor-amount-portlet/app-extend-editor-amount-portlet.vue'
;
export
const
PortletComponent
=
{
install
(
v
:
any
,
opt
:
any
)
{
...
...
@@ -42,7 +42,7 @@ export const PortletComponent = {
v
.
component
(
'app-ibizappview-app-view-amount-portlet'
,
IBIZAPPVIEWAppViewAmount
);
v
.
component
(
'app-ibizappctrl-app-ctrl-amount-portlet'
,
IBIZAPPCTRLAppCtrlAmount
);
v
.
component
(
'app-ibizappeditor-app-editor-amount-portlet'
,
IBIZAPPEDITORAppEditorAmount
);
v
.
component
(
'app-ibizappe
ditor-app-extend-editor-portlet'
,
IBIZAPPEDITORAppExtendEditor
);
v
.
component
(
'app-ibizappe
xtendeditor-app-extend-editor-amount-portlet'
,
IBIZAPPEXTENDEDITORAppExtendEditorAmount
);
v
.
component
(
'ibizappview-app-view-list-portlet'
,
IBIZAPPVIEWAppViewList
);
v
.
component
(
'ibizappview-view-chart-portlet'
,
IBIZAPPVIEWViewChart
);
v
.
component
(
'ibizappview-app-view-amount-portlet'
,
IBIZAPPVIEWAppViewAmount
);
...
...
@@ -54,7 +54,6 @@ export const PortletComponent = {
v
.
component
(
'ibizorder-portal-components-operation-portlet'
,
IBIZOrderPortalComponentsOperation
);
v
.
component
(
'ibizorder-portal-components-list2-portlet'
,
IBIZOrderPortalComponentsList2
);
v
.
component
(
'ibizorder-portal-components-chart-portlet'
,
IBIZOrderPortalComponentsChart
);
v
.
component
(
'ibizappeditor-app-extend-editor-portlet'
,
IBIZAPPEDITORAppExtendEditor
);
v
.
component
(
'ibizappeditor-app-editor-list-view-portlet'
,
IBIZAPPEDITORAppEditorListView
);
v
.
component
(
'ibizappeditor-editor-chart-portlet'
,
IBIZAPPEDITOREditorChart
);
v
.
component
(
'ibizappeditor-app-editor-amount-portlet'
,
IBIZAPPEDITORAppEditorAmount
);
...
...
@@ -63,5 +62,6 @@ export const PortletComponent = {
v
.
component
(
'ibizappctrl-app-ctrl-list-view-portlet'
,
IBIZAPPCTRLAppCtrlListView
);
v
.
component
(
'ibizappctrl-ctrl-chart-portlet'
,
IBIZAPPCTRLCtrlChart
);
v
.
component
(
'ibizappctrl-app-ctrl-amount-portlet'
,
IBIZAPPCTRLAppCtrlAmount
);
v
.
component
(
'ibizappextendeditor-app-extend-editor-amount-portlet'
,
IBIZAPPEXTENDEDITORAppExtendEditorAmount
);
}
};
\ No newline at end of file
app_Web/src/uiservice/ibizappextendeditor/ibizappextendeditor-ui-service-base.ts
浏览文件 @
c66d4ba5
...
...
@@ -96,6 +96,7 @@ export default class IBIZAPPEXTENDEDITORUIServiceBase extends UIService {
* @memberof IBIZAPPEXTENDEDITORUIServiceBase
*/
public
initViewMap
(){
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'listview'
,
srfappde
:
'ibizappextendeditors'
,
component
:
'ibizappextendeditorlist-view'
});
}
/**
...
...
app_Web/src/widgets/app/app-portal-view-db-dashboard/app-portal-view-db-dashboard.vue
浏览文件 @
c66d4ba5
...
...
@@ -4,7 +4,7 @@ import AppPortalView_dbBase from './app-portal-view-db-dashboard-base.vue';
import
view_db_sysportlet5
from
'@widgets/ibizappview/app-view-amount-portlet/app-view-amount-portlet.vue'
;
import
view_db_sysportlet4
from
'@widgets/ibizappeditor/editor-chart-portlet/editor-chart-portlet.vue'
;
import
view_db_sysportlet3
from
'@widgets/ibizappctrl/ctrl-chart-portlet/ctrl-chart-portlet.vue'
;
import
view_db_sysportlet10
from
'@widgets/ibizappe
ditor/app-extend-editor-portlet/app-extend-editor
-portlet.vue'
;
import
view_db_sysportlet10
from
'@widgets/ibizappe
xtendeditor/app-extend-editor-amount-portlet/app-extend-editor-amount
-portlet.vue'
;
import
view_db_sysportlet2
from
'@widgets/ibizappview/view-chart-portlet/view-chart-portlet.vue'
;
import
view_db_sysportlet1
from
'@widgets/ibizappview/app-view-list-portlet/app-view-list-portlet.vue'
;
import
view_db_sysportlet9
from
'@widgets/ibizappeditor/app-editor-list-view-portlet/app-editor-list-view-portlet.vue'
;
...
...
app_Web/src/widgets/ibizappextendeditor/app-extend-editor-amount-portlet/app-extend-editor-amount-portlet-base.vue
0 → 100644
浏览文件 @
c66d4ba5
<
template
>
<div
class=
'portlet app-extend-editor-amount '
:style=
"
{'height': isAdaptiveSize ? 'calc(100% - 16px)' : getHeight,}">
<p
class=
'portlet-title'
>
<span>
扩展编辑器数量
</span>
</p>
<el-divider
class=
"divider"
></el-divider>
<div
class=
"portlet-with-title"
>
<!-- 测试 -->
<view
_db_sysportlet10_list
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
createAction=
"Create"
removeAction=
"Remove"
updateAction=
"Update"
fetchAction=
"FetchDefault"
:showBusyIndicator=
"true"
name=
"db_sysportlet10_list"
ref=
'db_sysportlet10_list'
@
closeview=
"closeView($event)"
>
</view
_db_sysportlet10_list
>
</div>
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Model
,
Inject
}
from
'vue-property-decorator'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
ControlInterface
}
from
'@/interface/control'
;
import
{
UIActionTool
,
Util
,
ViewTool
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
IBIZAPPEXTENDEDITORService
from
'@/service/ibizappextendeditor/ibizappextendeditor-service'
;
import
AppExtendEditorAmountService
from
'./app-extend-editor-amount-portlet-service'
;
import
IBIZAPPEXTENDEDITORUIService
from
'@/uiservice/ibizappextendeditor/ibizappextendeditor-ui-service'
;
import
UIService
from
'@/uiservice/ui-service'
;
import
{
Environment
}
from
'@/environments/environment'
;
@
Component
({
components
:
{
}
})
export
default
class
IBIZAPPEXTENDEDITORAppExtendEditorAmountBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof AppExtendEditorAmountBase
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof AppExtendEditorAmountBase
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof AppExtendEditorAmountBase
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof AppExtendEditorAmountBase
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof AppExtendEditorAmountBase
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof AppExtendEditorAmountBase
*/
public
getControlType
():
string
{
return
'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof AppExtendEditorAmountBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {AppExtendEditorAmountService}
* @memberof AppExtendEditorAmountBase
*/
public
service
:
AppExtendEditorAmountService
=
new
AppExtendEditorAmountService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZAPPEXTENDEDITORService}
* @memberof AppExtendEditorAmountBase
*/
public
appEntityService
:
IBIZAPPEXTENDEDITORService
=
new
IBIZAPPEXTENDEDITORService
({
$store
:
this
.
$store
});
/**
* 界面UI服务对象
*
* @type {IBIZAPPEXTENDEDITORUIService}
* @memberof AppExtendEditorAmountBase
*/
public
appUIService
:
IBIZAPPEXTENDEDITORUIService
=
new
IBIZAPPEXTENDEDITORUIService
(
this
.
$store
);
/**
* 关闭视图
*
* @param {any} args
* @memberof AppExtendEditorAmountBase
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof AppExtendEditorAmountBase
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 长度
*
* @type {number}
* @memberof AppExtendEditorAmountBase
*/
@
Prop
()
public
height
?:
number
;
/**
* 宽度
*
* @type {number}
* @memberof AppExtendEditorAmountBase
*/
@
Prop
()
public
width
?:
number
;
/**
* 门户部件类型
*
* @type {number}
* @memberof AppExtendEditorAmountBase
*/
public
portletType
:
string
=
'list'
;
/**
* 视图默认使用
*
* @type {string}
* @memberof AppExtendEditorAmountBase
*/
@
Inject
({
from
:
'navModel'
,
default
:
'tab'
})
public
navModel
!
:
string
;
/**
* 界面行为模型数据
*
* @memberof AppExtendEditorAmountBase
*/
public
uiactionModel
:
any
=
{
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof AppExtendEditorAmountBase
*/
@
Prop
({
default
:
false
})
public
isAdaptiveSize
!
:
boolean
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof AppExtendEditorAmountBase
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof AppExtendEditorAmountBase
*/
public
getData
():
any
{
return
{};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof AppExtendEditorAmountBase
*/
get
getHeight
(){
if
(
!
this
.
$util
.
isEmpty
(
this
.
height
)
&&
!
this
.
$util
.
isNumberNaN
(
this
.
height
)){
if
(
this
.
height
==
0
){
return
'auto'
;
}
else
{
return
this
.
height
+
'px'
;
}
}
else
{
return
'100px'
;
}
}
/**
* 刷新
*
* @memberof AppExtendEditorAmountBase
*/
public
refresh
(
args
?:
any
)
{
this
.
viewState
.
next
({
tag
:
'db_sysportlet10_list'
,
action
:
'refresh'
,
data
:
args
});
}
/**
* vue 生命周期
*
* @memberof AppExtendEditorAmountBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof AppExtendEditorAmountBase
*/
public
afterCreated
(){
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
Object
.
is
(
tag
,
"all-portlet"
)
&&
Object
.
is
(
action
,
'loadmodel'
)){
this
.
calcUIActionAuthState
(
data
);
}
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
const
refs
:
any
=
this
.
$refs
;
Object
.
keys
(
refs
).
forEach
((
_name
:
string
)
=>
{
this
.
viewState
.
next
({
tag
:
_name
,
action
:
action
,
data
:
data
});
});
});
}
}
/**
* vue 生命周期
*
* @memberof AppExtendEditorAmountBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof AppExtendEditorAmountBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
/**
* 计算界面行为权限
*
* @memberof AppExtendEditorAmountBase
*/
public
calcUIActionAuthState
(
data
:
any
=
{})
{
// 如果是操作栏,不计算权限
if
(
this
.
portletType
&&
Object
.
is
(
'actionbar'
,
this
.
portletType
))
{
return
;
}
let
_this
:
any
=
this
;
let
uiservice
:
any
=
_this
.
appUIService
?
_this
.
appUIService
:
new
UIService
(
_this
.
$store
);
if
(
_this
.
uiactionModel
){
ViewTool
.
calcActionItemAuthState
(
data
,
_this
.
uiactionModel
,
uiservice
);
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './app-extend-editor-amount-portlet.less';
</
style
>
app_Web/src/widgets/ibizappextendeditor/app-extend-editor-amount-portlet/app-extend-editor-amount-portlet-model.ts
0 → 100644
浏览文件 @
c66d4ba5
/**
* AppExtendEditorAmount 部件模型
*
* @export
* @class AppExtendEditorAmountModel
*/
export
default
class
AppExtendEditorAmountModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof AppExtendEditorAmountModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'createman'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'createdate'
,
},
{
name
:
'updateman'
,
},
{
name
:
'ibizappextendeditorname'
,
},
{
name
:
'ibizappextendeditor'
,
prop
:
'ibizappextendeditorid'
,
},
{
name
:
'extensionflag'
,
},
{
name
:
'documentaddress'
,
},
{
name
:
'extendeditordescription'
,
},
{
name
:
'amount'
,
},
{
name
:
'extendeditortype'
,
},
]
}
}
app_Web/src/widgets/ibizappextendeditor/app-extend-editor-amount-portlet/app-extend-editor-amount-portlet-service.ts
0 → 100644
浏览文件 @
c66d4ba5
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* AppExtendEditorAmount 部件服务对象
*
* @export
* @class AppExtendEditorAmountService
*/
export
default
class
AppExtendEditorAmountService
extends
ControlService
{
}
app_Web/src/widgets/ibizappextendeditor/app-extend-editor-amount-portlet/app-extend-editor-amount-portlet.less
0 → 100644
浏览文件 @
c66d4ba5
// this is less
.portlet{
height: 100%;
width: 100%;
> .portlet-title{
padding: 14px 16px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
height: 52px;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
justify-content: space-between;
width:100%;
line-height: 22px;
font-size: 16px;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #304265;
font-weight: 600;
i{
margin-right: 5px;
}
>.portlet-action{
margin-left: 12px;
font-size: 14px;
>a{
padding: 6px;
}
}
}
> .divider {
margin: 0px 0px 11px 0px;
}
> .portlet-with-title{
width:100%;
height:calc(100% - 58px);
overflow:auto;
padding:0px 12px;
}
> .portlet-without-title{
width:100%;
height:100%;
overflow:auto;
padding:0px 12px;
}
.app-charts{
height: 100%!important;
}
.toolbar-container {
button{
margin: 6px 0px 4px 16px;
}
.ivu-badge{
.ivu-badge-count{
top: 0;
}
}
}
}
app_Web/src/widgets/ibizappextendeditor/app-extend-editor-amount-portlet/app-extend-editor-amount-portlet.vue
0 → 100644
浏览文件 @
c66d4ba5
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
IBIZAPPEXTENDEDITORAppExtendEditorAmountBase
from
'./app-extend-editor-amount-portlet-base.vue'
;
import
view_db_sysportlet10_list
from
'@widgets/ibizappextendeditor/extend-editor-amount-list/extend-editor-amount-list.vue'
;
@
Component
({
components
:
{
view_db_sysportlet10_list
,
}
})
export
default
class
IBIZAPPEXTENDEDITORAppExtendEditorAmount
extends
IBIZAPPEXTENDEDITORAppExtendEditorAmountBase
{
}
</
script
>
app_Web/src/widgets/ibizappextendeditor/extend-editor-amount-list/extend-editor-amount-list-base.vue
0 → 100644
浏览文件 @
c66d4ba5
<
#<
template
>
<div
:class=
"['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"
>
<div
style=
"display: flex;justify-content: space-between;align-items: center;height: 100%;"
>
<div
style=
"height: 80px;width: 80px;display: flex;align-items: center;justify-content: center;"
>
<i
class=
"el-icon-s-operation"
style=
"font-size: 50px;color: #34bfa3"
/>
</div>
<div
style=
"height: 80px;width: 165px;display: flex;flex-direction: column;justify-content: center;text-align: center;"
>
<div
style=
"margin-bottom: 8px;color: rgba(0,0,0,.45);font-size: 18px;font-weight: 700;"
>
<span>
支持扩展编辑器总数
</span>
</div>
<div
style=
"color: #666;font-size: 24px;font-weight: 700;"
>
<span>
{{ calculation() }}
</span>
</div>
</div>
</div>
</div>
</template>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Model
,
Inject
}
from
'vue-property-decorator'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
ControlInterface
}
from
'@/interface/control'
;
import
{
UIActionTool
,
Util
,
ViewTool
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
AppCenterService
from
"@service/app/app-center-service"
;
import
IBIZAPPEXTENDEDITORService
from
'@/service/ibizappextendeditor/ibizappextendeditor-service'
;
import
ExtendEditorAmountService
from
'./extend-editor-amount-list-service'
;
import
IBIZAPPEXTENDEDITORUIService
from
'@/uiservice/ibizappextendeditor/ibizappextendeditor-ui-service'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
@
Component
({
components
:
{
}
})
export
default
class
ExtendEditorAmountBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof ExtendEditorAmountBase
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof ExtendEditorAmountBase
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof ExtendEditorAmountBase
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof ExtendEditorAmountBase
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ExtendEditorAmountBase
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof ExtendEditorAmountBase
*/
public
getControlType
():
string
{
return
'LIST'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof ExtendEditorAmountBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {ExtendEditorAmountService}
* @memberof ExtendEditorAmountBase
*/
public
service
:
ExtendEditorAmountService
=
new
ExtendEditorAmountService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZAPPEXTENDEDITORService}
* @memberof ExtendEditorAmountBase
*/
public
appEntityService
:
IBIZAPPEXTENDEDITORService
=
new
IBIZAPPEXTENDEDITORService
({
$store
:
this
.
$store
});
/**
* 转化数据
*
* @param {any} args
* @memberof ExtendEditorAmountBase
*/
public
transformData
(
args
:
any
)
{
let
_this
:
any
=
this
;
if
(
_this
.
service
&&
_this
.
service
.
handleRequestData
instanceof
Function
&&
_this
.
service
.
handleRequestData
(
'transform'
,
_this
.
context
,
args
)){
return
_this
.
service
.
handleRequestData
(
'transform'
,
_this
.
context
,
args
)[
'data'
];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof ExtendEditorAmountBase
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof ExtendEditorAmountBase
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
public
calculation
(){
let
total
=
0
;
if
(
this
.
items
.
length
>
0
){
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srfamount
){
total
+=
item
.
srfamount
;
}
})
}
return
total
;
}
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ExtendEditorAmountBase
*/
public
codeListService
:
CodeListService
=
new
CodeListService
({
$store
:
this
.
$store
});
/**
* 界面UI服务对象
*
* @type {IBIZAPPEXTENDEDITORUIService}
* @memberof ExtendEditorAmountBase
*/
public
appUIService
:
IBIZAPPEXTENDEDITORUIService
=
new
IBIZAPPEXTENDEDITORUIService
(
this
.
$store
);
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ExtendEditorAmountBase
*/
public
getDatas
():
any
[]
{
return
this
.
selections
;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ExtendEditorAmountBase
*/
public
getData
():
any
{
return
null
;
}
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof ExtendEditorAmountBase
*/
@
Prop
({
default
:
false
})
public
isSelectFirstDefault
!
:
boolean
;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ExtendEditorAmountBase
*/
@
Prop
({
default
:
true
})
public
showBusyIndicator
?:
boolean
;
/**
* 部件行为--create
*
* @type {string}
* @memberof ExtendEditorAmountBase
*/
@
Prop
()
public
createAction
!
:
string
;
/**
* 部件行为--remove
*
* @type {string}
* @memberof ExtendEditorAmountBase
*/
@
Prop
()
public
removeAction
!
:
string
;
/**
* 部件行为--update
*
* @type {string}
* @memberof ExtendEditorAmountBase
*/
@
Prop
()
public
updateAction
!
:
string
;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof ExtendEditorAmountBase
*/
@
Prop
()
public
fetchAction
!
:
string
;
/**
* this引用
*
* @type {number}
* @memberof ExtendEditorAmountBase
*/
public
thisRef
:
any
=
this
;
/**
* 当前页
*
* @type {number}
* @memberof ExtendEditorAmountBase
*/
public
curPage
:
number
=
1
;
/**
* 数据
*
* @type {any[]}
* @memberof ExtendEditorAmountBase
*/
public
items
:
any
[]
=
[];
/**
* 是否支持分页
*
* @type {boolean}
* @memberof ExtendEditorAmountBase
*/
public
isEnablePagingBar
:
boolean
=
true
;
/**
* 分页条数
*
* @type {number}
* @memberof ExtendEditorAmountBase
*/
public
limit
:
number
=
1000
;
/**
* 总条数
*
* @type {number}
* @memberof ExtendEditorAmountBase
*/
public
totalRecord
:
number
=
0
;
/**
* 加载的数据是否附加在items之后
*
* @type {boolean}
* @memberof ExtendEditorAmountBase
*/
public
isAddBehind
:
boolean
=
false
;
/**
* 是否有滚动条
*
* @type {boolean}
* @memberof ExtendEditorAmountBase
*/
public
isScrollBar
:
boolean
=
false
;
/**
* 排序方向
*
* @type {string}
* @memberof ExtendEditorAmountBase
*/
public
sortDir
:
string
=
''
;
/**
* 排序字段
*
* @type {string}
* @memberof ExtendEditorAmountBase
*/
public
sortField
:
string
=
''
;
/**
* 选中数组
* @type {Array<any>}
* @memberof ExtendEditorAmountBase
*/
public
selections
:
Array
<
any
>
=
[];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ExtendEditorAmountBase
*/
public
appStateEvent
:
Subscription
|
undefined
;
/**
* Vue声明周期,组件挂载完毕
*
* @memberof ExtendEditorAmountBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof ExtendEditorAmountBase
*/
public
afterMounted
()
{
const
loadMoreCallBack
:
any
=
this
.
throttle
(
this
.
loadMore
,
3000
);
this
.
$el
.
addEventListener
(
'scroll'
,
()
=>
{
if
(
this
.
$el
.
scrollHeight
>
this
.
$el
.
clientHeight
)
{
this
.
isScrollBar
=
true
;
}
else
{
this
.
isScrollBar
=
false
;
}
if
(
this
.
$el
.
scrollTop
+
this
.
$el
.
clientHeight
>=
this
.
$el
.
scrollHeight
)
{
loadMoreCallBack
();
}
})
}
/**
* Vue声明周期,组件创建完毕
*
* @memberof ExtendEditorAmountBase
*/
public
created
()
{
this
.
afterCreated
()
}
/**
* 执行created后的逻辑
*
* @memberof ExtendEditorAmountBase
*/
public
afterCreated
(){
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
this
.
name
,
tag
))
{
return
;
}
if
(
Object
.
is
(
action
,
'load'
))
{
this
.
curPage
=
1
;
this
.
items
=
[];
this
.
load
(
data
);
}
if
(
Object
.
is
(
action
,
'refresh'
))
{
this
.
refresh
(
data
);
}
});
}
if
(
AppCenterService
&&
AppCenterService
.
getMessageCenter
()){
this
.
appStateEvent
=
AppCenterService
.
getMessageCenter
().
subscribe
(({
name
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
name
,
"IBIZAPPEXTENDEDITOR"
)){
return
;
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
this
.
refresh
([
data
]);
}
})
}
}
/**
* vue 生命周期
*
* @memberof ExtendEditorAmountBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof ExtendEditorAmountBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
if
(
this
.
appStateEvent
){
this
.
appStateEvent
.
unsubscribe
();
}
}
/**
* 加载更多
*
* @memberof ExtendEditorAmountBase
*/
public
loadMore
(){
if
(
this
.
totalRecord
>
this
.
items
.
length
){
this
.
curPage
=
++
this
.
curPage
;
this
.
isAddBehind
=
true
;
this
.
load
({});
}
}
/**
* 刷新
*
* @param {*} [args={}]
* @memberof Main
*/
public
refresh
(
args
?:
any
)
{
this
.
isAddBehind
=
true
;
this
.
load
(
args
);
}
/**
* 列表数据加载
*
* @public
* @param {*} [arg={}]
* @memberof ExtendEditorAmountBase
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'AppPortalView'
+
(
this
.
$t
(
'app.list.notConfig.fetchAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{...
opt
};
const
page
:
any
=
{};
if
(
this
.
isEnablePagingBar
)
{
Object
.
assign
(
page
,
{
page
:
this
.
curPage
-
1
,
size
:
this
.
limit
});
}
// 设置排序
if
(
!
Object
.
is
(
this
.
sortDir
,
''
)
&&
!
Object
.
is
(
this
.
sortField
,
''
))
{
const
sort
:
string
=
this
.
sortField
+
","
+
this
.
sortDir
;
Object
.
assign
(
page
,
{
sort
:
sort
});
}
Object
.
assign
(
arg
,
page
);
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
if
(
this
.
viewparams
){
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
}
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
this
.
context
?
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)):{},
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
errorMessage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
}
return
;
}
const
data
:
any
=
response
.
data
;
if
(
!
this
.
isAddBehind
){
this
.
items
=
[];
}
if
(
data
&&
data
.
length
>
0
)
{
let
datas
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
datas
.
map
((
item
:
any
)
=>
{
Object
.
assign
(
item
,
{
isselected
:
false
});
});
this
.
totalRecord
=
response
.
total
;
this
.
items
.
push
(...
datas
);
this
.
items
=
this
.
arrayNonRepeatfy
(
this
.
items
);
}
this
.
isAddBehind
=
false
;
this
.
items
.
forEach
((
item
:
any
)
=>
{
Object
.
assign
(
item
,
this
.
getActionState
(
item
));
})
this
.
$emit
(
'load'
,
this
.
items
);
//在导航视图中,如已有选中数据,则右侧展开已选中数据的视图,如无选中数据则默认选中第一条
if
(
this
.
isSelectFirstDefault
){
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
){
this
.
selections
.
forEach
((
select
:
any
)
=>
{
const
index
=
this
.
items
.
findIndex
((
item
:
any
)
=>
Object
.
is
(
item
.
srfkey
,
select
.
srfkey
));
if
(
index
!=
-
1
){
this
.
handleClick
(
this
.
items
[
index
]);
}
})
}
else
{
this
.
handleClick
(
this
.
items
[
0
]);
}
}
},
(
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
});
}
/**
* 列表数据去重
*
* @param {Array<any>} [arr]
* @returns {void}
* @memberof ExtendEditorAmountBase
*/
public
arrayNonRepeatfy
(
arr
:
Array
<
any
>
)
{
let
map
=
new
Map
();
let
array
=
new
Array
();
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
map
.
set
(
arr
[
i
].
srfkey
,
arr
[
i
]);
}
map
.
forEach
((
value
:
any
,
key
:
string
,
map
:
any
)
=>
{
array
.
push
(
value
);
});
return
array
;
}
/**
* 节流
*
* @param {Array<any>} [arr]
* @returns {void}
* @memberof ExtendEditorAmountBase
*/
public
throttle
(
fn
:
any
,
wait
:
number
){
let
time
=
0
;
return
()
=>
{
let
now
=
Date
.
now
()
let
args
=
arguments
;
if
(
now
-
time
>
wait
){
fn
.
apply
(
this
,
args
)
time
=
now
;
}
}
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof ExtendEditorAmountBase
*/
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'AppPortalView'
+
(
this
.
$t
(
'app.list.notConfig.removeAction'
)
as
string
)
});
return
;
}
if
(
datas
.
length
===
0
)
{
return
;
}
let
dataInfo
=
''
;
datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
let
srfmajortext
=
record
.
srfmajortext
;
if
(
index
<
5
)
{
if
(
!
Object
.
is
(
dataInfo
,
''
))
{
dataInfo
+=
'、'
;
}
dataInfo
+=
srfmajortext
;
}
else
{
return
false
;
}
});
if
(
datas
.
length
<
5
)
{
dataInfo
=
dataInfo
+
' 共'
+
datas
.
length
+
'条数据'
;
}
else
{
dataInfo
=
dataInfo
+
'...'
+
' 共'
+
datas
.
length
+
'条数据'
;
}
const
removeData
=
()
=>
{
let
keys
:
any
[]
=
[];
datas
.
forEach
((
data
:
any
)
=>
{
keys
.
push
(
data
.
srfkey
);
});
let
_removeAction
=
keys
.
length
>
1
?
'removeBatch'
:
this
.
removeAction
;
const
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
const
post
:
Promise
<
any
>
=
this
.
service
.
delete
(
_removeAction
,
Object
.
assign
(
context
,{
ibizappextendeditor
:
keys
.
join
(
';'
)
}),
Object
.
assign
({
ibizappextendeditor
:
keys
.
join
(
';'
)
},{
viewparams
:
this
.
viewparams
}),
this
.
showBusyIndicator
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.delDataFail'
)
as
string
)
+
','
+
response
.
info
});
return
;
}
else
{
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.deleteSuccess'
)
as
string
)
});
}
//删除items中已删除的项
datas
.
forEach
((
data
:
any
)
=>
{
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
this
.
items
.
splice
(
index
,
1
);
return
true
;
}
});
});
this
.
$emit
(
'remove'
,
null
);
this
.
selections
=
[];
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
reject
(
response
);
return
;
}
reject
(
response
);
});
});
}
dataInfo
=
dataInfo
.
replace
(
/
[
null
]
/g
,
''
).
replace
(
/
[
undefined
]
/g
,
''
).
replace
(
/
[
]
/g
,
''
);
this
.
$Modal
.
confirm
({
title
:
(
this
.
$t
(
'app.commonWords.warning'
)
as
string
),
content
:
(
this
.
$t
(
'app.list.confirmDel'
)
as
string
)
+
' '
+
dataInfo
+
','
+
(
this
.
$t
(
'app.list.notRecoverable'
)
as
string
)
,
onOk
:
()
=>
{
removeData
();
},
onCancel
:
()
=>
{
}
});
return
removeData
;
}
/**
* 保存
*
* @param {*} $event
* @returns {Promise<any>}
* @memberof ExtendEditorAmountBase
*/
public
async
save
(
args
:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
){
let
_this
=
this
;
let
successItems
:
any
=
[];
let
errorItems
:
any
=
[];
let
errorMessage
:
any
=
[];
for
(
const
item
of
_this
.
items
)
{
try
{
if
(
Object
.
is
(
item
.
rowDataState
,
'create'
)){
if
(
!
this
.
createAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'AppPortalView'
+
(
this
.
$t
(
'app.list.notConfig.createAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
let
response
=
await
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
successItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)));
}
}
else
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
)){
if
(
!
this
.
updateAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.warning'
)
as
string
),
desc
:
'AppPortalView'
+
(
this
.
$t
(
'app.list.notConfig.updateAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
if
(
item
.
ibizappextendeditor
){
Object
.
assign
(
this
.
context
,{
ibizappextendeditor
:
item
.
ibizappextendeditor
});
}
let
response
=
await
this
.
service
.
add
(
this
.
updateAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
successItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)));
}
}
}
catch
(
error
)
{
errorItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
item
)));
errorMessage
.
push
(
error
);
}
}
this
.
$emit
(
'save'
,
successItems
);
this
.
refresh
();
if
(
errorItems
.
length
===
0
){
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
),
desc
:
item
.
majorentityname
+
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
)
+
'!'
});
console
.
error
(
errorMessage
[
index
]);
});
}
return
successItems
;
}
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof ExtendEditorAmountBase
*/
public
onPanelDataChange
(
item
:
any
,
$event
:
any
)
{
Object
.
assign
(
item
,
$event
,
{
rowDataState
:
'update'
});
}
/**
* 选择数据
* @memberof ExtendEditorAmountBase
*
*/
public
handleClick
(
args
:
any
)
{
// this.clearSelection();
args
.
isselected
=
!
args
.
isselected
;
this
.
selectchange
();
}
/**
* 双击数据
* @memberof ExtendEditorAmountBase
*
*/
public
handleDblClick
(
args
:
any
)
{
this
.
$emit
(
'rowdblclick'
,
args
);
}
/**
* 触发事件
* @memberof ExtendEditorAmountBase
*
*/
public
selectchange
()
{
this
.
selections
=
[];
this
.
items
.
map
((
item
:
any
)
=>
{
if
(
item
.
isselected
)
{
this
.
selections
.
push
(
item
);
}
});
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
/**
* 清除当前所有选中状态
*
* @memberof ExtendEditorAmountBase
*/
public
clearSelection
(){
this
.
items
.
map
((
item
:
any
)
=>
{
Object
.
assign
(
item
,
{
isselected
:
false
});
});
}
/**
* 操作栏模型数据
*
* @type {*}
* @memberof ExtendEditorAmountBase
*/
public
actionModel
:
any
=
{
};
/**
* 操作列界面行为
*
* @param {*} data
* @param {*} tag
* @param {*} $event
* @memberof ExtendEditorAmountBase
*/
public
uiAction
(
data
:
any
,
tag
:
any
,
$event
:
any
)
{
$event
.
stopPropagation
();
}
/**
* 获取界面行为权限状态
*
* @param {*} data 当前列表行数据
* @memberof ExtendEditorAmountBase
*/
public
getActionState
(
data
:
any
){
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
actionModel
));
let
targetData
:
any
=
this
.
transformData
(
data
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
return
tempActionModel
;
}
}
</
script
>
<
style
lang=
'less'
>
@import './extend-editor-amount-list.less';
</
style
>
\ No newline at end of file
app_Web/src/widgets/ibizappextendeditor/extend-editor-amount-list/extend-editor-amount-list-model.ts
0 → 100644
浏览文件 @
c66d4ba5
/**
* ExtendEditorAmount 部件模型
*
* @export
* @class ExtendEditorAmountModel
*/
export
default
class
ExtendEditorAmountModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ExtendEditorAmountDb_sysportlet10_listMode
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'srfamount'
,
prop
:
'amount'
,
dataType
:
'INT'
,
},
{
name
:
'srfkey'
,
prop
:
'ibizappextendeditorid'
,
dataType
:
'GUID'
,
},
{
name
:
'srfmajortext'
,
prop
:
'ibizappextendeditorname'
,
dataType
:
'TEXT'
,
},
{
name
:
'ibizappextendeditor'
,
prop
:
'ibizappextendeditorid'
,
dataType
:
'FONTKEY'
,
},
{
name
:
'size'
,
prop
:
'size'
},
{
name
:
'query'
,
prop
:
'query'
},
{
name
:
'sort'
,
prop
:
'sort'
},
{
name
:
'page'
,
prop
:
'page'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
]
}
}
\ No newline at end of file
app_Web/src/widgets/ibizappextendeditor/extend-editor-amount-list/extend-editor-amount-list-service.ts
0 → 100644
浏览文件 @
c66d4ba5
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
IBIZAPPEXTENDEDITORService
from
'@/service/ibizappextendeditor/ibizappextendeditor-service'
;
import
ExtendEditorAmountModel
from
'./extend-editor-amount-list-model'
;
/**
* ExtendEditorAmount 部件服务对象
*
* @export
* @class ExtendEditorAmountService
*/
export
default
class
ExtendEditorAmountService
extends
ControlService
{
/**
* 扩展编辑器服务对象
*
* @type {IBIZAPPEXTENDEDITORService}
* @memberof ExtendEditorAmountService
*/
public
appEntityService
:
IBIZAPPEXTENDEDITORService
=
new
IBIZAPPEXTENDEDITORService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof ExtendEditorAmountService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of ExtendEditorAmountService.
*
* @param {*} [opts={}]
* @memberof ExtendEditorAmountService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
ExtendEditorAmountModel
();
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExtendEditorAmountService
*/
@
Errorlog
public
search
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
FetchDefault
(
Context
,
Data
,
isloading
);
}
result
.
then
(
async
(
response
)
=>
{
await
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExtendEditorAmountService
*/
@
Errorlog
public
delete
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
remove
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExtendEditorAmountService
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Create
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExtendEditorAmountService
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
}
\ No newline at end of file
app_Web/src/widgets/ibizappextendeditor/extend-editor-amount-list/extend-editor-amount-list.less
0 → 100644
浏览文件 @
c66d4ba5
// this is less
.app-list {
height:100%;
flex-grow: 1;
overflow-y: auto;
.el-collapse-item__header.is-active{
color: #409eff;
background-color: #ecf5ff;
}
.el-collapse{
.el-collapse-item{
.el-collapse-item__wrap{
.el-collapse-item__content{
padding: 10px 0 10px 0;
}
}
}
}
.app-list-item {
line-height: 34px;
padding: 12px 6px;
min-height: 24px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #f0f0f0;
.app-list-item-content {
width: 70%;
display: flex;
align-items: center;
.item-icon {
width: 40px;
height: 40px;
margin-right: 14px;
img {
width: 40px;
height: 40px;
border-radius: 50%;
}
}
.item-content-text {
display: flex;
flex-direction: column;
width: 80%;
.item-title {
font-size: 18px;
font-weight: bold;
}
.item-description{
height: 34px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.item-subtext {
color: #8c8c8c;
}
}
}
.app-list-item-date {
position: relative;
color: #8c8c8c;
}
}
.app-list-item.isSelect {
background: #ecf5ff;
border-radius: 2px;
border-color: rgb(197, 197, 197);
}
.app-list-item:hover {
background: #ecf5ff;
}
.loadmore {
text-align: center;
padding: 10px;
text-decoration: underline;
color: #82bff7;
cursor: default;
}
}
.app-list-empty {
height:100%;
color: #909399;
display: flex;
justify-content: center;
align-items: center;
}
app_Web/src/widgets/ibizappextendeditor/extend-editor-amount-list/extend-editor-amount-list.vue
0 → 100644
浏览文件 @
c66d4ba5
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
ExtendEditorAmountBase
from
'./extend-editor-amount-list-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
ExtendEditorAmount
extends
ExtendEditorAmountBase
{
}
</
script
>
\ No newline at end of file
app_Web/src/widgets/micro-component/main-form/main-form-base.vue
浏览文件 @
c66d4ba5
...
...
@@ -2202,7 +2202,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'microComponent
Grid
View'
+
(
this
.
$t
(
'app.formpage.notconfig.loadaction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'microComponent
Edit
View'
+
(
this
.
$t
(
'app.formpage.notconfig.loadaction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
};
...
...
@@ -2237,7 +2237,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public
loadDraft
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'microComponent
Grid
View'
+
(
this
.
$t
(
'app.formpage.notconfig.loaddraftaction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'microComponent
Edit
View'
+
(
this
.
$t
(
'app.formpage.notconfig.loaddraftaction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
}
;
...
...
@@ -2298,7 +2298,7 @@ export default class MainBase extends Vue implements ControlInterface {
const
action
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)
?
this
.
updateAction
:
this
.
createAction
;
if
(
!
action
){
let
actionName
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)?
"updateAction"
:
"createAction"
;
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'microComponent
Grid
View'
+
(
this
.
$t
(
'app.formpage.notconfig.actionname'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'microComponent
Edit
View'
+
(
this
.
$t
(
'app.formpage.notconfig.actionname'
)
as
string
)
});
return
;
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
...
...
@@ -2406,7 +2406,7 @@ export default class MainBase extends Vue implements ControlInterface {
const
action
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)
?
this
.
updateAction
:
this
.
createAction
;
if
(
!
action
){
let
actionName
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)?
"updateAction"
:
"createAction"
;
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'microComponent
Grid
View'
+
(
this
.
$t
(
'app.formpage.notconfig.actionname'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'microComponent
Edit
View'
+
(
this
.
$t
(
'app.formpage.notconfig.actionname'
)
as
string
)
});
return
;
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
...
...
@@ -2483,7 +2483,7 @@ export default class MainBase extends Vue implements ControlInterface {
public
remove
(
opt
:
Array
<
any
>
=
[],
showResultInfo
?:
boolean
):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'microComponent
Grid
View'
+
(
this
.
$t
(
'app.formpage.notconfig.removeaction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'microComponent
Edit
View'
+
(
this
.
$t
(
'app.formpage.notconfig.removeaction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
opt
[
0
];
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录