Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
649a1f1c
提交
649a1f1c
编写于
4年前
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
kuaikuai 发布系统代码 [后台服务,演示应用]
上级
17c51365
变更
46
显示空白字符变更
内嵌
并排
正在显示
46 个修改的文件
包含
3393 行增加
和
42 行删除
+3393
-42
view-config.json
app_Web/public/assets/json/view-config.json
+32
-0
ibizappctrl_en_US.ts
...c/locale/lanres/entities/ibizappctrl/ibizappctrl_en_US.ts
+11
-0
ibizappctrl_zh_CN.ts
...c/locale/lanres/entities/ibizappctrl/ibizappctrl_zh_CN.ts
+11
-0
ibizappeditor_en_US.ts
...cale/lanres/entities/ibizappeditor/ibizappeditor_en_US.ts
+11
-0
ibizappeditor_zh_CN.ts
...cale/lanres/entities/ibizappeditor/ibizappeditor_zh_CN.ts
+11
-0
ibizappview_en_US.ts
...c/locale/lanres/entities/ibizappview/ibizappview_en_US.ts
+11
-0
ibizappview_zh_CN.ts
...c/locale/lanres/entities/ibizappview/ibizappview_zh_CN.ts
+11
-0
ibizorder_en_US.ts
...b/src/locale/lanres/entities/ibizorder/ibizorder_en_US.ts
+11
-0
ibizorder_zh_CN.ts
...b/src/locale/lanres/entities/ibizorder/ibizorder_zh_CN.ts
+11
-0
viewconfig.ts
app_Web/src/mock/viewconfig/viewconfig.ts
+32
-0
ibizappviewlist-view-base.vue
...sample/ibizappviewlist-view/ibizappviewlist-view-base.vue
+887
-0
ibizappviewlist-view.less
...ges/sample/ibizappviewlist-view/ibizappviewlist-view.less
+19
-0
ibizappviewlist-view.vue
...ages/sample/ibizappviewlist-view/ibizappviewlist-view.vue
+24
-0
page-register.ts
app_Web/src/pages/sample/index/page-register.ts
+1
-0
router.ts
app_Web/src/pages/sample/index/router.ts
+27
-0
state.ts
app_Web/src/store/modules/view-action/state.ts
+11
-0
ibizappctrl-ui-service-base.ts
.../src/uiservice/ibizappctrl/ibizappctrl-ui-service-base.ts
+1
-0
ibizappeditor-ui-service-base.ts
.../uiservice/ibizappeditor/ibizappeditor-ui-service-base.ts
+1
-0
ibizappview-ui-service-base.ts
.../src/uiservice/ibizappview/ibizappview-ui-service-base.ts
+1
-0
ibizorder-ui-service-base.ts
app_Web/src/uiservice/ibizorder/ibizorder-ui-service-base.ts
+1
-0
app-portal-view-db-dashboard-base.vue
...l-view-db-dashboard/app-portal-view-db-dashboard-base.vue
+4
-4
app-portal-view-db-dashboard.vue
...portal-view-db-dashboard/app-portal-view-db-dashboard.vue
+2
-2
app-view-list-portlet-base.vue
...view/app-view-list-portlet/app-view-list-portlet-base.vue
+326
-0
app-view-list-portlet-model.ts
...view/app-view-list-portlet/app-view-list-portlet-model.ts
+55
-0
app-view-list-portlet-service.ts
...ew/app-view-list-portlet/app-view-list-portlet-service.ts
+11
-0
app-view-list-portlet.less
...zappview/app-view-list-portlet/app-view-list-portlet.less
+63
-0
app-view-list-portlet.vue
...izappview/app-view-list-portlet/app-view-list-portlet.vue
+15
-0
default-searchform-base.vue
...bizappview/default-searchform/default-searchform-base.vue
+2
-2
view-list-list-base.vue
...idgets/ibizappview/view-list-list/view-list-list-base.vue
+831
-0
view-list-list-model.ts
...idgets/ibizappview/view-list-list/view-list-list-model.ts
+63
-0
view-list-list-service.ts
...gets/ibizappview/view-list-list/view-list-list-service.ts
+163
-0
view-list-list.less
...rc/widgets/ibizappview/view-list-list/view-list-list.less
+81
-0
view-list-list.vue
...src/widgets/ibizappview/view-list-list/view-list-list.vue
+14
-0
custom-calendar-calendar-base.vue
...ustom-calendar-calendar/custom-calendar-calendar-base.vue
+21
-1
custom-calendar-calendar.vue
...ook/custom-calendar-calendar/custom-calendar-calendar.vue
+2
-0
itemlayoutpanel-panel-base.vue
...book/itemlayoutpanel-panel/itemlayoutpanel-panel-base.vue
+519
-0
itemlayoutpanel-panel-model.ts
...book/itemlayoutpanel-panel/itemlayoutpanel-panel-model.ts
+31
-0
itemlayoutpanel-panel-service.ts
...ok/itemlayoutpanel-panel/itemlayoutpanel-panel-service.ts
+11
-0
itemlayoutpanel-panel.less
...ibizbook/itemlayoutpanel-panel/itemlayoutpanel-panel.less
+27
-0
itemlayoutpanel-panel.vue
.../ibizbook/itemlayoutpanel-panel/itemlayoutpanel-panel.vue
+14
-0
tree-table-treegridex-base.vue
...book/tree-table-treegridex/tree-table-treegridex-base.vue
+5
-5
config.xml
config.xml
+0
-5
Dockerfile
demo-app/demo-app-web/src/main/docker/Dockerfile
+1
-1
demo-app-web.yaml
demo-app/demo-app-web/src/main/docker/demo-app-web.yaml
+1
-16
h2_table.xml
demo-core/src/main/resources/liquibase/h2_table.xml
+5
-5
view.xml
demo-core/src/main/resources/liquibase/view.xml
+1
-1
未找到文件。
app_Web/public/assets/json/view-config.json
浏览文件 @
649a1f1c
...
...
@@ -151,6 +151,14 @@
"viewname"
:
"IBIZOrderPickupView"
,
"viewtag"
:
"17770b42972334457baccfe91828bd46"
},
"ibizordertreegridexview"
:
{
"title"
:
"订单实体树表格视图(增强)"
,
"caption"
:
"订单实体树表格视图(增强)"
,
"viewtype"
:
"DETREEGRIDEXVIEW"
,
"viewmodule"
:
"Sample"
,
"viewname"
:
"IBIZOrderTreeGridExView"
,
"viewtag"
:
"17c2991a0bd88cfd2bd6f8651537450b"
},
"ibizsample0003sf4editview"
:
{
"title"
:
"示例实体03编辑视图"
,
"caption"
:
"示例实体03"
,
...
...
@@ -271,6 +279,14 @@
"viewname"
:
"IBIZCustomer_INTFPickupGridView"
,
"viewtag"
:
"2af423d347c22b7d0ed5a3639d87a6a8"
},
"ibizappctrllistview"
:
{
"title"
:
"应用部件列表视图"
,
"caption"
:
"应用部件"
,
"viewtype"
:
"DELISTVIEW"
,
"viewmodule"
:
"Sample"
,
"viewname"
:
"IBIZAPPCTRLListView"
,
"viewtag"
:
"2b2bef1d622cb082cc17c12afe3ed894"
},
"ibizbookautogrouplistview"
:
{
"title"
:
"图书列表视图(自动分组)"
,
"caption"
:
"图书"
,
...
...
@@ -911,6 +927,14 @@
"viewname"
:
"IBIZCustomerUsr2MPickupView"
,
"viewtag"
:
"91b325a01c9c24c60d42df9701221c2f"
},
"ibizappeditorlistview"
:
{
"title"
:
"编辑器列表视图"
,
"caption"
:
"编辑器"
,
"viewtype"
:
"DELISTVIEW"
,
"viewmodule"
:
"Sample"
,
"viewname"
:
"IBIZAPPEDITORListView"
,
"viewtag"
:
"92ba569083866d7476dbada9f26b0371"
},
"ibizorderusr2calendarexpview"
:
{
"title"
:
"订单日历导航视图(时间轴)"
,
"caption"
:
"订单"
,
...
...
@@ -1687,6 +1711,14 @@
"viewname"
:
"IBIZOrderSF20GridView"
,
"viewtag"
:
"f94df735642ce85ebb2fe3816c4dc77b"
},
"ibizappviewlistview"
:
{
"title"
:
"应用视图列表视图"
,
"caption"
:
"应用视图"
,
"viewtype"
:
"DELISTVIEW"
,
"viewmodule"
:
"Sample"
,
"viewname"
:
"IBIZAPPVIEWListView"
,
"viewtag"
:
"fb7a06e43dfa51aaa792146e7df29357"
},
"ibizbooknewdefaultvaluegridview"
:
{
"title"
:
"表格新建默认值"
,
"caption"
:
"表格新建默认值"
,
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/locale/lanres/entities/ibizappctrl/ibizappctrl_en_US.ts
浏览文件 @
649a1f1c
...
...
@@ -13,6 +13,10 @@ export default {
amount
:
"数量"
,
},
views
:
{
listview
:
{
caption
:
"应用部件"
,
title
:
"应用部件列表视图"
,
},
gridview
:
{
caption
:
"应用部件"
,
title
:
"应用部件表格视图"
,
...
...
@@ -61,6 +65,11 @@ export default {
uiactions
:
{
},
},
ctrllist_list
:
{
nodata
:
""
,
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
...
...
@@ -128,4 +137,6 @@ export default {
tip
:
"Save And Close Window"
,
},
},
listviewtoolbar_toolbar
:
{
},
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/locale/lanres/entities/ibizappctrl/ibizappctrl_zh_CN.ts
浏览文件 @
649a1f1c
...
...
@@ -12,6 +12,10 @@ export default {
amount
:
"数量"
,
},
views
:
{
listview
:
{
caption
:
"应用部件"
,
title
:
"应用部件列表视图"
,
},
gridview
:
{
caption
:
"应用部件"
,
title
:
"应用部件表格视图"
,
...
...
@@ -60,6 +64,11 @@ export default {
uiactions
:
{
},
},
ctrllist_list
:
{
nodata
:
""
,
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
...
...
@@ -127,4 +136,6 @@ export default {
tip
:
"保存并关闭"
,
},
},
listviewtoolbar_toolbar
:
{
},
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/locale/lanres/entities/ibizappeditor/ibizappeditor_en_US.ts
浏览文件 @
649a1f1c
...
...
@@ -19,6 +19,10 @@ export default {
caption
:
"编辑器"
,
title
:
"编辑器表格视图"
,
},
listview
:
{
caption
:
"编辑器"
,
title
:
"编辑器列表视图"
,
},
editview
:
{
caption
:
"编辑器"
,
title
:
"编辑器编辑视图"
,
...
...
@@ -66,6 +70,11 @@ export default {
uiactions
:
{
},
},
editorlist_list
:
{
nodata
:
""
,
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
...
...
@@ -133,4 +142,6 @@ export default {
tip
:
"Save And Close Window"
,
},
},
listviewtoolbar_toolbar
:
{
},
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/locale/lanres/entities/ibizappeditor/ibizappeditor_zh_CN.ts
浏览文件 @
649a1f1c
...
...
@@ -18,6 +18,10 @@ export default {
caption
:
"编辑器"
,
title
:
"编辑器表格视图"
,
},
listview
:
{
caption
:
"编辑器"
,
title
:
"编辑器列表视图"
,
},
editview
:
{
caption
:
"编辑器"
,
title
:
"编辑器编辑视图"
,
...
...
@@ -65,6 +69,11 @@ export default {
uiactions
:
{
},
},
editorlist_list
:
{
nodata
:
""
,
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
...
...
@@ -132,4 +141,6 @@ export default {
tip
:
"保存并关闭"
,
},
},
listviewtoolbar_toolbar
:
{
},
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/locale/lanres/entities/ibizappview/ibizappview_en_US.ts
浏览文件 @
649a1f1c
...
...
@@ -22,6 +22,10 @@ export default {
caption
:
"应用视图"
,
title
:
"应用视图表格视图"
,
},
listview
:
{
caption
:
"应用视图"
,
title
:
"应用视图列表视图"
,
},
},
main_form
:
{
details
:
{
...
...
@@ -58,6 +62,11 @@ export default {
uiactions
:
{
},
},
viewlist_list
:
{
nodata
:
""
,
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
...
...
@@ -125,4 +134,6 @@ export default {
tip
:
"Save And Close Window"
,
},
},
listviewtoolbar_toolbar
:
{
},
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/locale/lanres/entities/ibizappview/ibizappview_zh_CN.ts
浏览文件 @
649a1f1c
...
...
@@ -21,6 +21,10 @@ export default {
caption
:
"应用视图"
,
title
:
"应用视图表格视图"
,
},
listview
:
{
caption
:
"应用视图"
,
title
:
"应用视图列表视图"
,
},
},
main_form
:
{
details
:
{
...
...
@@ -57,6 +61,11 @@ export default {
uiactions
:
{
},
},
viewlist_list
:
{
nodata
:
""
,
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
...
...
@@ -124,4 +133,6 @@ export default {
tip
:
"保存并关闭"
,
},
},
listviewtoolbar_toolbar
:
{
},
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/locale/lanres/entities/ibizorder/ibizorder_en_US.ts
浏览文件 @
649a1f1c
...
...
@@ -53,6 +53,10 @@ export default {
caption
:
"订单"
,
title
:
"订单数据选择视图"
,
},
treegridexview
:
{
caption
:
"订单实体树表格视图(增强)"
,
title
:
"订单实体树表格视图(增强)"
,
},
dataviewexpview
:
{
caption
:
"订单"
,
title
:
"订单卡片视图导航视图"
,
...
...
@@ -804,6 +808,11 @@ export default {
usr_chart
:
{
nodata
:
""
,
},
ordertreegrid_treegridex
:
{
nodata
:
""
,
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"订单名称"
,
...
...
@@ -1001,6 +1010,8 @@ export default {
tip
:
"数据导入"
,
},
},
treegridexviewtoolbar_toolbar
:
{
},
sf3gridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"New"
,
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/locale/lanres/entities/ibizorder/ibizorder_zh_CN.ts
浏览文件 @
649a1f1c
...
...
@@ -52,6 +52,10 @@ export default {
caption
:
"订单"
,
title
:
"订单数据选择视图"
,
},
treegridexview
:
{
caption
:
"订单实体树表格视图(增强)"
,
title
:
"订单实体树表格视图(增强)"
,
},
dataviewexpview
:
{
caption
:
"订单"
,
title
:
"订单卡片视图导航视图"
,
...
...
@@ -803,6 +807,11 @@ export default {
usr_chart
:
{
nodata
:
""
,
},
ordertreegrid_treegridex
:
{
nodata
:
""
,
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"订单名称"
,
...
...
@@ -1000,6 +1009,8 @@ export default {
tip
:
"数据导入"
,
},
},
treegridexviewtoolbar_toolbar
:
{
},
sf3gridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"新建"
,
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/mock/viewconfig/viewconfig.ts
浏览文件 @
649a1f1c
...
...
@@ -159,6 +159,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"IBIZOrderPickupView"
,
"viewtag"
:
"17770b42972334457baccfe91828bd46"
},
"ibizordertreegridexview"
:
{
"title"
:
"订单实体树表格视图(增强)"
,
"caption"
:
"订单实体树表格视图(增强)"
,
"viewtype"
:
"DETREEGRIDEXVIEW"
,
"viewmodule"
:
"Sample"
,
"viewname"
:
"IBIZOrderTreeGridExView"
,
"viewtag"
:
"17c2991a0bd88cfd2bd6f8651537450b"
},
"ibizsample0003sf4editview"
:
{
"title"
:
"示例实体03编辑视图"
,
"caption"
:
"示例实体03"
,
...
...
@@ -279,6 +287,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"IBIZCustomer_INTFPickupGridView"
,
"viewtag"
:
"2af423d347c22b7d0ed5a3639d87a6a8"
},
"ibizappctrllistview"
:
{
"title"
:
"应用部件列表视图"
,
"caption"
:
"应用部件"
,
"viewtype"
:
"DELISTVIEW"
,
"viewmodule"
:
"Sample"
,
"viewname"
:
"IBIZAPPCTRLListView"
,
"viewtag"
:
"2b2bef1d622cb082cc17c12afe3ed894"
},
"ibizbookautogrouplistview"
:
{
"title"
:
"图书列表视图(自动分组)"
,
"caption"
:
"图书"
,
...
...
@@ -919,6 +935,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"IBIZCustomerUsr2MPickupView"
,
"viewtag"
:
"91b325a01c9c24c60d42df9701221c2f"
},
"ibizappeditorlistview"
:
{
"title"
:
"编辑器列表视图"
,
"caption"
:
"编辑器"
,
"viewtype"
:
"DELISTVIEW"
,
"viewmodule"
:
"Sample"
,
"viewname"
:
"IBIZAPPEDITORListView"
,
"viewtag"
:
"92ba569083866d7476dbada9f26b0371"
},
"ibizorderusr2calendarexpview"
:
{
"title"
:
"订单日历导航视图(时间轴)"
,
"caption"
:
"订单"
,
...
...
@@ -1695,6 +1719,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"IBIZOrderSF20GridView"
,
"viewtag"
:
"f94df735642ce85ebb2fe3816c4dc77b"
},
"ibizappviewlistview"
:
{
"title"
:
"应用视图列表视图"
,
"caption"
:
"应用视图"
,
"viewtype"
:
"DELISTVIEW"
,
"viewmodule"
:
"Sample"
,
"viewname"
:
"IBIZAPPVIEWListView"
,
"viewtag"
:
"fb7a06e43dfa51aaa792146e7df29357"
},
"ibizbooknewdefaultvaluegridview"
:
{
"title"
:
"表格新建默认值"
,
"caption"
:
"表格新建默认值"
,
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/pages/sample/ibizappviewlist-view/ibizappviewlist-view-base.vue
0 → 100644
浏览文件 @
649a1f1c
<
template
>
<div
class=
'view-container delistview ibizappviewlist-view'
>
<app-studioaction
:viewTitle=
"$t(model.srfCaption)"
viewName=
"ibizappviewlistview"
></app-studioaction>
<card
class=
'view-card view-no-caption '
:bordered=
"false"
:dis-hover=
"true"
>
<div
class=
'view-top-messages'
>
</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=
'pull-left'
placeholder=
"应用视图名称"
style=
'max-width: 400px;margin-top:6px;padding-left: 24px'
/>
<div
class=
'pull-right'
>
<div
class=
'toolbar-container'
>
</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'
>
</div>
<view
_list
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
createAction=
"Create"
removeAction=
"Remove"
updateAction=
"Update"
fetchAction=
"FetchDefault"
:showBusyIndicator=
"true"
:newdata=
"newdata"
:opendata=
"opendata"
name=
"list"
ref=
'list'
@
selectionchange=
"list_selectionchange($event)"
@
beforeload=
"list_beforeload($event)"
@
rowdblclick=
"list_rowdblclick($event)"
@
remove=
"list_remove($event)"
@
load=
"list_load($event)"
@
closeview=
"closeView($event)"
>
</view
_list
>
</div>
<div
class=
'view-bottom-messages'
>
</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
IBIZAPPVIEWService
from
'@/service/ibizappview/ibizappview-service'
;
import
IBIZAPPVIEWAuthService
from
'@/authservice/ibizappview/ibizappview-auth-service'
;
import
ListViewEngine
from
'@engine/view/list-view-engine'
;
import
IBIZAPPVIEWUIService
from
'@/uiservice/ibizappview/ibizappview-ui-service'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
@
Component
({
components
:
{
},
})
export
default
class
IBIZAPPVIEWListViewBase
extends
Vue
{
/**
* 实体服务对象
*
* @type {IBIZAPPVIEWService}
* @memberof IBIZAPPVIEWListViewBase
*/
public
appEntityService
:
IBIZAPPVIEWService
=
new
IBIZAPPVIEWService
;
/**
* 实体UI服务对象
*
* @type IBIZAPPVIEWUIService
* @memberof IBIZAPPVIEWListViewBase
*/
public
appUIService
:
IBIZAPPVIEWUIService
=
new
IBIZAPPVIEWUIService
(
this
.
$store
);
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof IBIZAPPVIEWListViewBase
*/
@
Emit
()
public
viewDatasChange
(
val
:
any
):
any
{
return
val
;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof IBIZAPPVIEWListViewBase
*/
@
Prop
()
public
viewdata
!
:
string
;
/**
* 传入视图参数
*
* @type {string}
* @memberof IBIZAPPVIEWListViewBase
*/
@
Prop
()
public
viewparam
!
:
string
;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof IBIZAPPVIEWListViewBase
*/
@
Prop
({
default
:
true
})
public
viewDefaultUsage
!
:
boolean
;
/**
* 视图默认使用
*
* @type {string}
* @memberof IBIZAPPVIEWListViewBase
*/
@
Inject
({
from
:
'navModel'
,
default
:
'tab'
})
public
navModel
!
:
string
;
/**
* 视图标识
*
* @type {string}
* @memberof IBIZAPPVIEWListViewBase
*/
public
viewtag
:
string
=
'fb7a06e43dfa51aaa792146e7df29357'
;
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof IBIZAPPVIEWListViewBase
*/
public
customViewNavContexts
:
any
=
{
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof IBIZAPPVIEWListViewBase
*/
public
customViewParams
:
any
=
{
};
/**
* 视图模型数据
*
* @type {*}
* @memberof IBIZAPPVIEWListViewBase
*/
public
model
:
any
=
{
srfCaption
:
'entities.ibizappview.views.listview.caption'
,
srfTitle
:
'entities.ibizappview.views.listview.title'
,
srfSubTitle
:
'entities.ibizappview.views.listview.subtitle'
,
dataInfo
:
''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZAPPVIEWListViewBase
*/
@
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 IBIZAPPVIEWListViewBase
*/
@
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 IBIZAPPVIEWListViewBase
*/
public
containerModel
:
any
=
{
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_list
:
{
name
:
'list'
,
type
:
'LIST'
},
view_searchform
:
{
name
:
'searchform'
,
type
:
'SEARCHFORM'
},
};
/**
* 视图刷新
*
* @param {*} args
* @memberof IBIZAPPVIEWListViewBase
*/
public
refresh
(
args
?:
any
):
void
{
const
refs
:
any
=
this
.
$refs
;
if
(
refs
&&
refs
.
list
)
{
refs
.
list
.
refresh
();
}
}
/**
* 计数器刷新
*
* @memberof IBIZAPPVIEWListViewBase
*/
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 IBIZAPPVIEWListViewBase
*/
public
viewState
:
Subject
<
ViewState
>
=
new
Subject
();
/**
* 工具栏模型
*
* @type {*}
* @memberof IBIZAPPVIEWListView
*/
public
toolBarModels
:
any
=
{
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof IBIZAPPVIEWListViewBase
*/
public
engine
:
ListViewEngine
=
new
ListViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof IBIZAPPVIEWListViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
list
:
this
.
$refs
.
list
,
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
);
},
searchform
:
this
.
$refs
.
searchform
,
keyPSDEField
:
'ibizappview'
,
majorPSDEField
:
'ibizappviewname'
,
isLoadDefault
:
true
,
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof IBIZAPPVIEWListViewBase
*/
public
navDataService
=
NavDataService
.
getInstance
(
this
.
$store
);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZAPPVIEWListViewBase
*/
public
serviceStateEvent
:
Subscription
|
undefined
;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof IBIZAPPVIEWListViewBase
*/
@
Prop
()
public
portletState
?:
any
;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZAPPVIEWListViewBase
*/
public
portletStateEvent
:
Subscription
|
undefined
;
/**
* 应用上下文
*
* @type {*}
* @memberof IBIZAPPVIEWListViewBase
*/
public
context
:
any
=
{};
/**
* 视图参数
*
* @type {*}
* @memberof IBIZAPPVIEWListViewBase
*/
public
viewparams
:
any
=
{};
/**
* 视图缓存数据
*
* @type {*}
* @memberof IBIZAPPVIEWListViewBase
*/
public
viewCacheData
:
any
;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof IBIZAPPVIEWListViewBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 解析视图参数
*
* @public
* @memberof IBIZAPPVIEWListViewBase
*/
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
,{
'ibizappview'
:
inputvalue
});
}
//初始化视图唯一标识
Object
.
assign
(
this
.
context
,{
srfsessionid
:
this
.
$util
.
createUUID
()});
this
.
handleCustomViewData
();
//初始化导航数据
this
.
initNavDataWithRoute
();
}
/**
* 处理自定义视图数据
*
* @memberof IBIZAPPVIEWListViewBase
*/
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 IBIZAPPVIEWListViewBase
*/
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 IBIZAPPVIEWListViewBase
*/
public
initNavDataWithRoute
(
data
:
any
=
null
,
isNew
:
boolean
=
false
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavData
({
id
:
'ibizappviewlist-view'
,
tag
:
this
.
viewtag
,
srfkey
:
isNew
?
null
:
this
.
context
.
ibizappview
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof IBIZAPPVIEWListViewBase
*/
public
initNavDataWithTab
(
data
:
any
=
null
,
isOnlyAdd
:
boolean
=
true
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
!
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavDataByOnly
({
id
:
'ibizappviewlist-view'
,
tag
:
this
.
viewtag
,
srfkey
:
this
.
context
.
ibizappview
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
},
isOnlyAdd
);
}
}
/**
* Vue声明周期
*
* @memberof IBIZAPPVIEWListViewBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof IBIZAPPVIEWListViewBase
*/
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
,
'ibizappviewlist-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
,
'IBIZAPPVIEWListView'
)){
return
;
}
if
(
Object
.
is
(
res
.
action
,
'refresh'
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
){
_this
.
refresh
();
}
})
}
}
/**
* 销毁之前
*
* @memberof IBIZAPPVIEWListViewBase
*/
public
beforeDestroy
()
{
this
.
$store
.
commit
(
'viewaction/removeView'
,
this
.
viewtag
);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof IBIZAPPVIEWListViewBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof IBIZAPPVIEWListViewBase
*/
public
afterMounted
(){
const
_this
:
any
=
this
;
_this
.
engineInit
();
if
(
_this
.
loadModel
&&
_this
.
loadModel
instanceof
Function
)
{
_this
.
loadModel
();
}
}
/**
* list 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZAPPVIEWListViewBase
*/
public
list_selectionchange
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'list'
,
'selectionchange'
,
$event
);
}
/**
* list 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZAPPVIEWListViewBase
*/
public
list_beforeload
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'list'
,
'beforeload'
,
$event
);
}
/**
* list 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZAPPVIEWListViewBase
*/
public
list_rowdblclick
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'list'
,
'rowdblclick'
,
$event
);
}
/**
* list 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZAPPVIEWListViewBase
*/
public
list_remove
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'list'
,
'remove'
,
$event
);
}
/**
* list 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZAPPVIEWListViewBase
*/
public
list_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'list'
,
'load'
,
$event
);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZAPPVIEWListViewBase
*/
public
searchform_save
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'save'
,
$event
);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZAPPVIEWListViewBase
*/
public
searchform_search
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'search'
,
$event
);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZAPPVIEWListViewBase
*/
public
searchform_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'load'
,
$event
);
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof IBIZAPPVIEWListView
*/
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
.
ibizappview
;
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'ibizappviews'
,
parameterName
:
'ibizappview'
},
{
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 IBIZAPPVIEWListView
*/
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
:
'ibizappviews'
,
parameterName
:
'ibizappview'
},
{
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
* @memberof IBIZAPPVIEWListViewBase
*/
public
closeView
(
args
:
any
[]):
void
{
let
_view
:
any
=
this
;
if
(
_view
.
viewdata
)
{
_view
.
$emit
(
'viewdataschange'
,
[
args
]);
_view
.
$emit
(
'close'
,
[
args
]);
}
else
if
(
_view
.
$tabPageExp
)
{
_view
.
$tabPageExp
.
onClose
(
_view
.
$route
.
fullPath
);
}
}
/**
* 销毁视图回调
*
* @memberof IBIZAPPVIEWListViewBase
*/
public
destroyed
(){
this
.
afterDestroyed
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBIZAPPVIEWListViewBase
*/
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 {string}
* @memberof IBIZAPPVIEWListView
*/
public
query
:
string
=
''
;
/**
* 是否展开搜索表单
*
* @type {boolean}
* @memberof IBIZAPPVIEWListView
*/
public
isExpandSearchForm
:
boolean
=
false
;
/**
* 快速搜索
*
* @param {*} $event
* @memberof IBIZAPPVIEWListView
*/
public
onSearch
(
$event
:
any
):
void
{
const
refs
:
any
=
this
.
$refs
;
if
(
refs
.
list
)
{
refs
.
list
.
load
({});
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './ibizappviewlist-view.less';
</
style
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/pages/sample/ibizappviewlist-view/ibizappviewlist-view.less
0 → 100644
浏览文件 @
649a1f1c
.ibizappviewlist-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
This diff is collapsed.
Click to expand it.
app_Web/src/pages/sample/ibizappviewlist-view/ibizappviewlist-view.vue
0 → 100644
浏览文件 @
649a1f1c
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
IBIZAPPVIEWListViewBase
from
'./ibizappviewlist-view-base.vue'
;
import
view_list
from
'@widgets/ibizappview/view-list-list/view-list-list.vue'
;
import
view_searchform
from
'@widgets/ibizappview/default-searchform/default-searchform.vue'
;
@
Component
({
components
:
{
view_list
,
view_searchform
,
},
beforeRouteEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
next
((
vm
:
any
)
=>
{
if
(
!
Object
.
is
(
vm
.
navModel
,
"route"
)){
vm
.
initNavDataWithTab
(
vm
.
viewCacheData
);
}
vm
.
$store
.
commit
(
'addCurPageViewtag'
,
{
fullPath
:
to
.
fullPath
,
viewtag
:
vm
.
viewtag
});
});
},
})
export
default
class
IBIZAPPVIEWListView
extends
IBIZAPPVIEWListViewBase
{
}
</
script
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/pages/sample/index/page-register.ts
浏览文件 @
649a1f1c
...
...
@@ -127,6 +127,7 @@ export const PageComponents = {
Vue
.
component
(
'ibizorder-detail-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-detail-edit-view/ibizorder-detail-edit-view.vue'
));
Vue
.
component
(
'ibizbookusr8-grid-view'
,
()
=>
import
(
'@pages/sample/ibizbookusr8-grid-view/ibizbookusr8-grid-view.vue'
));
Vue
.
component
(
'ibizbookusr2-data-view'
,
()
=>
import
(
'@pages/sample/ibizbookusr2-data-view/ibizbookusr2-data-view.vue'
));
Vue
.
component
(
'ibizappviewlist-view'
,
()
=>
import
(
'@pages/sample/ibizappviewlist-view/ibizappviewlist-view.vue'
));
Vue
.
component
(
'ibizbooklist-view'
,
()
=>
import
(
'@pages/sample/ibizbooklist-view/ibizbooklist-view.vue'
));
Vue
.
component
(
'ibizsample0017-form-pickup-view'
,
()
=>
import
(
'@pages/sample/ibizsample0017-form-pickup-view/ibizsample0017-form-pickup-view.vue'
));
Vue
.
component
(
'ibizcustomer-usr2-pickup-view'
,
()
=>
import
(
'@pages/sample/ibizcustomer-usr2-pickup-view/ibizcustomer-usr2-pickup-view.vue'
));
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/pages/sample/index/router.ts
浏览文件 @
649a1f1c
...
...
@@ -2038,6 +2038,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sample/ibizbookusr2-data-view/ibizbookusr2-data-view.vue'
),
},
{
path
:
'ibizappviews/:ibizappview?/listview/:listview?'
,
meta
:
{
caption
:
'entities.ibizappview.views.listview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibizappviews'
,
parameterName
:
'ibizappview'
},
{
pathName
:
'listview'
,
parameterName
:
'listview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizappviewlist-view/ibizappviewlist-view.vue'
),
},
{
path
:
'ibizbooks/:ibizbook?/listview/:listview?'
,
meta
:
{
...
...
@@ -5489,6 +5503,19 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-sf20-grid-view/ibizorder-sf20-grid-view.vue'
),
},
{
path
:
'/ibizappviews/:ibizappview?/listview/:listview?'
,
meta
:
{
caption
:
'entities.ibizappview.views.listview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibizappviews'
,
parameterName
:
'ibizappview'
},
{
pathName
:
'listview'
,
parameterName
:
'listview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizappviewlist-view/ibizappviewlist-view.vue'
),
},
{
path
:
'/ibizbooks/:ibizbook?/newdefaultvaluegridview/:newdefaultvaluegridview?'
,
meta
:
{
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/store/modules/view-action/state.ts
浏览文件 @
649a1f1c
...
...
@@ -1941,6 +1941,16 @@ export const viewstate: any = {
'29b0f2b1cba64fab0a4c1d9e40a62778'
,
],
},
{
viewtag
:
'fb7a06e43dfa51aaa792146e7df29357'
,
viewmodule
:
'Sample'
,
viewname
:
'IBIZAPPVIEWListView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'27425bd0f023912440422d4ee90bb370'
,
],
},
{
viewtag
:
'fdb297cd4b12374534413c3053aec1b8'
,
viewmodule
:
'Sample'
,
...
...
@@ -1988,6 +1998,7 @@ export const viewstate: any = {
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'fb7a06e43dfa51aaa792146e7df29357'
,
],
},
{
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/uiservice/ibizappctrl/ibizappctrl-ui-service-base.ts
浏览文件 @
649a1f1c
...
...
@@ -96,6 +96,7 @@ export default class IBIZAPPCTRLUIServiceBase extends UIService {
* @memberof IBIZAPPCTRLUIServiceBase
*/
public
initViewMap
(){
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'listview'
,
srfappde
:
'ibizappctrls'
,
component
:
'ibizappctrllist-view'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'ibizappctrls'
,
component
:
'ibizappctrlgrid-view'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'ibizappctrls'
,
component
:
'ibizappctrledit-view'
});
}
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/uiservice/ibizappeditor/ibizappeditor-ui-service-base.ts
浏览文件 @
649a1f1c
...
...
@@ -97,6 +97,7 @@ export default class IBIZAPPEDITORUIServiceBase extends UIService {
*/
public
initViewMap
(){
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'ibizappeditors'
,
component
:
'ibizappeditorgrid-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'listview'
,
srfappde
:
'ibizappeditors'
,
component
:
'ibizappeditorlist-view'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'ibizappeditors'
,
component
:
'ibizappeditoredit-view'
});
}
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/uiservice/ibizappview/ibizappview-ui-service-base.ts
浏览文件 @
649a1f1c
...
...
@@ -98,6 +98,7 @@ export default class IBIZAPPVIEWUIServiceBase extends UIService {
public
initViewMap
(){
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'ibizappviews'
,
component
:
'ibizappviewedit-view'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'ibizappviews'
,
component
:
'ibizappviewgrid-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'listview'
,
srfappde
:
'ibizappviews'
,
component
:
'ibizappviewlist-view'
});
}
/**
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/uiservice/ibizorder/ibizorder-ui-service-base.ts
浏览文件 @
649a1f1c
...
...
@@ -103,6 +103,7 @@ export default class IBIZOrderUIServiceBase extends UIService {
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'sf6gridview'
,
srfappde
:
'ibizorders'
,
component
:
'ibizorder-sf6-grid-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'f9editview'
,
srfappde
:
'ibizorders'
,
component
:
'ibizorder-f9-edit-view'
});
this
.
allViewMap
.
set
(
'PICKUPVIEW:'
,{
viewname
:
'pickupview'
,
srfappde
:
'ibizorders'
,
component
:
'ibizorder-pickup-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'treegridexview'
,
srfappde
:
'ibizorders'
,
component
:
'ibizorder-tree-grid-ex-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'dataviewexpview'
,
srfappde
:
'ibizorders'
,
component
:
'ibizorder-data-view-exp-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'wfstartview'
,
srfappde
:
'ibizorders'
,
component
:
'ibizorder-wfstart-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'f19editview'
,
srfappde
:
'ibizorders'
,
component
:
'ibizorder-f19-edit-view'
});
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/app/app-portal-view-db-dashboard/app-portal-view-db-dashboard-base.vue
浏览文件 @
649a1f1c
...
...
@@ -87,16 +87,16 @@
<i-col
:md=
"
{ span: 24, offset: 0 }" :lg="{ span: 12, offset: 0 }">
<card
class=
"portlet-card custom-card"
:bordered=
"false"
dis-hover
:padding=
"10"
>
<span>
<view
_db_
rawitem6
<view
_db_
sysportlet1
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:height=
"400"
:width=
"0"
name=
"db_
rawitem6
"
ref=
'db_
rawitem6
'
name=
"db_
sysportlet1
"
ref=
'db_
sysportlet1
'
@
closeview=
"closeView($event)"
>
</view
_db_
rawitem6
>
</view
_db_
sysportlet1
>
</span>
</card>
</i-col>
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/app/app-portal-view-db-dashboard/app-portal-view-db-dashboard.vue
浏览文件 @
649a1f1c
...
...
@@ -2,7 +2,7 @@
import
{
Component
}
from
'vue-property-decorator'
;
import
AppPortalView_dbBase
from
'./app-portal-view-db-dashboard-base.vue'
;
import
view_db_rawitem1
from
'@widgets/app/db-rawitem1-portlet/db-rawitem1-portlet.vue'
;
import
view_db_
rawitem6
from
'@widgets/app/db-rawitem6-portlet/db-rawitem6
-portlet.vue'
;
import
view_db_
sysportlet1
from
'@widgets/ibizappview/app-view-list-portlet/app-view-list
-portlet.vue'
;
import
view_db_rawitem7
from
'@widgets/app/db-rawitem7-portlet/db-rawitem7-portlet.vue'
;
import
view_db_rawitem4
from
'@widgets/app/db-rawitem4-portlet/db-rawitem4-portlet.vue'
;
import
view_db_rawitem5
from
'@widgets/app/db-rawitem5-portlet/db-rawitem5-portlet.vue'
;
...
...
@@ -13,7 +13,7 @@ import view_db_rawitem3 from '@widgets/app/db-rawitem3-portlet/db-rawitem3-portl
@
Component
({
components
:
{
view_db_rawitem1
,
view_db_
rawitem6
,
view_db_
sysportlet1
,
view_db_rawitem7
,
view_db_rawitem4
,
view_db_rawitem5
,
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/app-view-list-portlet/app-view-list-portlet-base.vue
0 → 100644
浏览文件 @
649a1f1c
<
template
>
<div
class=
'portlet app-view-list '
: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"
>
<ibizappviewlist-view
:portletState=
"viewState"
:viewdata=
"JSON.stringify(context)"
:viewDefaultUsage=
"false"
></ibizappviewlist-view>
</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
IBIZAPPVIEWService
from
'@/service/ibizappview/ibizappview-service'
;
import
AppViewListService
from
'./app-view-list-portlet-service'
;
import
IBIZAPPVIEWUIService
from
'@/uiservice/ibizappview/ibizappview-ui-service'
;
import
UIService
from
'@/uiservice/ui-service'
;
import
{
Environment
}
from
'@/environments/environment'
;
@
Component
({
components
:
{
}
})
export
default
class
IBIZAPPVIEWAppViewListBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof AppViewListBase
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof AppViewListBase
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof AppViewListBase
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof AppViewListBase
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof AppViewListBase
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof AppViewListBase
*/
public
getControlType
():
string
{
return
'PORTLET'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof AppViewListBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {AppViewListService}
* @memberof AppViewListBase
*/
public
service
:
AppViewListService
=
new
AppViewListService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZAPPVIEWService}
* @memberof AppViewListBase
*/
public
appEntityService
:
IBIZAPPVIEWService
=
new
IBIZAPPVIEWService
({
$store
:
this
.
$store
});
/**
* 界面UI服务对象
*
* @type {IBIZAPPVIEWUIService}
* @memberof AppViewListBase
*/
public
appUIService
:
IBIZAPPVIEWUIService
=
new
IBIZAPPVIEWUIService
(
this
.
$store
);
/**
* 关闭视图
*
* @param {any} args
* @memberof AppViewListBase
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof AppViewListBase
*/
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 AppViewListBase
*/
@
Prop
()
public
height
?:
number
;
/**
* 宽度
*
* @type {number}
* @memberof AppViewListBase
*/
@
Prop
()
public
width
?:
number
;
/**
* 门户部件类型
*
* @type {number}
* @memberof AppViewListBase
*/
public
portletType
:
string
=
'view'
;
/**
* 视图默认使用
*
* @type {string}
* @memberof AppViewListBase
*/
@
Inject
({
from
:
'navModel'
,
default
:
'tab'
})
public
navModel
!
:
string
;
/**
* 界面行为模型数据
*
* @memberof AppViewListBase
*/
public
uiactionModel
:
any
=
{
}
/**
* 是否自适应大小
*
* @returns {boolean}
* @memberof AppViewListBase
*/
@
Prop
({
default
:
false
})
public
isAdaptiveSize
!
:
boolean
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof AppViewListBase
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof AppViewListBase
*/
public
getData
():
any
{
return
{};
}
/**
* 获取高度
*
* @returns {any[]}
* @memberof AppViewListBase
*/
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
'400px'
;
}
}
/**
* 刷新
*
* @memberof AppViewListBase
*/
public
refresh
(
args
?:
any
)
{
this
.
viewState
.
next
({
tag
:
'IBIZAPPVIEWListView'
,
action
:
'refresh'
,
data
:
args
});
}
/**
* vue 生命周期
*
* @memberof AppViewListBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof AppViewListBase
*/
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 AppViewListBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof AppViewListBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
/**
* 计算界面行为权限
*
* @memberof AppViewListBase
*/
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-view-list-portlet.less';
</
style
>
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/app-view-list-portlet/app-view-list-portlet-model.ts
0 → 100644
浏览文件 @
649a1f1c
/**
* AppViewList 部件模型
*
* @export
* @class AppViewListModel
*/
export
default
class
AppViewListModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof AppViewListModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'createman'
,
},
{
name
:
'createdate'
,
},
{
name
:
'ibizappviewname'
,
},
{
name
:
'ibizappview'
,
prop
:
'ibizappviewid'
,
},
{
name
:
'updateman'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'ibizappviewtype'
,
},
{
name
:
'documentaddress'
,
},
{
name
:
'instanceaddress'
,
},
{
name
:
'viewdescription'
,
},
{
name
:
'amount'
,
},
]
}
}
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/app-view-list-portlet/app-view-list-portlet-service.ts
0 → 100644
浏览文件 @
649a1f1c
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* AppViewList 部件服务对象
*
* @export
* @class AppViewListService
*/
export
default
class
AppViewListService
extends
ControlService
{
}
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/app-view-list-portlet/app-view-list-portlet.less
0 → 100644
浏览文件 @
649a1f1c
// 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;
}
}
}
}
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/app-view-list-portlet/app-view-list-portlet.vue
0 → 100644
浏览文件 @
649a1f1c
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
IBIZAPPVIEWAppViewListBase
from
'./app-view-list-portlet-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
IBIZAPPVIEWAppViewList
extends
IBIZAPPVIEWAppViewListBase
{
}
</
script
>
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/default-searchform/default-searchform-base.vue
浏览文件 @
649a1f1c
...
...
@@ -590,7 +590,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZAPPVIEW
Grid
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZAPPVIEW
List
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loadAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
};
...
...
@@ -626,7 +626,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*/
public
loadDraft
(
opt
:
any
=
{},
mode
?:
string
):
void
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZAPPVIEW
Grid
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZAPPVIEW
List
View'
+
(
this
.
$t
(
'app.searchForm.notConfig.loaddraftAction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
}
;
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/view-list-list/view-list-list-base.vue
0 → 100644
浏览文件 @
649a1f1c
<
template
>
<div
:class=
"['app-list',this.items.length > 0 ? '' : 'app-list-empty' ]"
>
<div
v-if=
"items.length > 0"
>
<div
v-for =
"item in items"
:key=
"item.srfkey"
:class=
"['app-list-item',
{'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<div
class=
"app-list-item-content"
>
<div
class=
"item-icon"
>
<template
v-if=
"item.srficon"
>
<img
:src=
"item.srficon"
/>
</
template
>
<
template
v-else
>
<img
src=
"/assets/img/noimage.png"
/>
</
template
>
</div>
<
template
>
<div
class=
"item-content-text"
>
<span
class=
"item-text"
>
{{
item
.
srfmajortext
}}
</span>
<span
v-if=
"item.srfdescription"
class=
"item-subtext"
>
{{
item
.
srfdescription
}}
</span>
</div>
</
template
>
</div>
<div
v-if=
"item.srfdate"
class=
"app-list-item-date"
>
<span
class=
"date"
>
{{ item.srfdate }}
</span>
</div>
<div
class=
"app-list-item-action"
>
<
template
v-for=
"(action,index) in Object.keys(ActionModel)"
>
<a
:key=
"index"
style=
"display: inline-block;margin: 0 12px;"
@
click=
"uiAction(item, action, $event)"
>
<i
:class=
"ActionModel[action].icon"
style=
"margin-right:2px;"
></i>
<span>
{{
ActionModel
[
action
].
caption
}}
</span>
</a>
</
template
>
</div>
</div>
<
template
v-if=
"isScrollBar"
>
<div
v-if=
"totalRecord>items.length"
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.loadmore'
)
}}
</div>
<div
v-else
class=
"loadmore"
>
{{
this
.
$t
(
'app.commonWords.nomore'
)
}}
</div>
</
template
>
</div>
<div
v-else
>
{{ $t('entities.ibizappview.viewlist_list.nodata') }}
</div>
<el-backtop
target=
".content-container .app-list"
></el-backtop>
</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
IBIZAPPVIEWService
from
'@/service/ibizappview/ibizappview-service'
;
import
ViewListService
from
'./view-list-list-service'
;
import
IBIZAPPVIEWUIService
from
'@/uiservice/ibizappview/ibizappview-ui-service'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
@
Component
({
components
:
{
}
})
export
default
class
ViewListBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof ViewListBase
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof ViewListBase
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof ViewListBase
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof ViewListBase
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ViewListBase
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof ViewListBase
*/
public
getControlType
():
string
{
return
'LIST'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof ViewListBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {ViewListService}
* @memberof ViewListBase
*/
public
service
:
ViewListService
=
new
ViewListService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZAPPVIEWService}
* @memberof ViewListBase
*/
public
appEntityService
:
IBIZAPPVIEWService
=
new
IBIZAPPVIEWService
({
$store
:
this
.
$store
});
/**
* 转化数据
*
* @param {any} args
* @memberof ViewListBase
*/
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 ViewListBase
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof ViewListBase
*/
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 {CodeListService}
* @memberof ViewListBase
*/
public
codeListService
:
CodeListService
=
new
CodeListService
({
$store
:
this
.
$store
});
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ViewListBase
*/
public
getDatas
():
any
[]
{
return
this
.
selections
;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ViewListBase
*/
public
getData
():
any
{
return
null
;
}
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof ViewListBase
*/
@
Prop
({
default
:
false
})
public
isSelectFirstDefault
!
:
boolean
;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ViewListBase
*/
@
Prop
({
default
:
true
})
public
showBusyIndicator
?:
boolean
;
/**
* 部件行为--create
*
* @type {string}
* @memberof ViewListBase
*/
@
Prop
()
public
createAction
!
:
string
;
/**
* 部件行为--remove
*
* @type {string}
* @memberof ViewListBase
*/
@
Prop
()
public
removeAction
!
:
string
;
/**
* 部件行为--update
*
* @type {string}
* @memberof ViewListBase
*/
@
Prop
()
public
updateAction
!
:
string
;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof ViewListBase
*/
@
Prop
()
public
fetchAction
!
:
string
;
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ViewListBase
*/
@
Prop
()
public
newdata
:
any
;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ViewListBase
*/
@
Prop
()
public
opendata
:
any
;
/**
* this引用
*
* @type {number}
* @memberof ViewListBase
*/
public
thisRef
:
any
=
this
;
/**
* 当前页
*
* @type {number}
* @memberof ViewListBase
*/
public
curPage
:
number
=
1
;
/**
* 数据
*
* @type {any[]}
* @memberof ViewListBase
*/
public
items
:
any
[]
=
[];
/**
* 是否支持分页
*
* @type {boolean}
* @memberof ViewListBase
*/
public
isEnablePagingBar
:
boolean
=
true
;
/**
* 分页条数
*
* @type {number}
* @memberof ViewListBase
*/
public
limit
:
number
=
1000
;
/**
* 总条数
*
* @type {number}
* @memberof ViewListBase
*/
public
totalRecord
:
number
=
0
;
/**
* 加载的数据是否附加在items之后
*
* @type {boolean}
* @memberof ViewListBase
*/
public
isAddBehind
:
boolean
=
false
;
/**
* 是否有滚动条
*
* @type {boolean}
* @memberof ViewListBase
*/
public
isScrollBar
:
boolean
=
false
;
/**
* 排序方向
*
* @type {string}
* @memberof ViewListBase
*/
public
sortDir
:
string
=
''
;
/**
* 排序字段
*
* @type {string}
* @memberof ViewListBase
*/
public
sortField
:
string
=
''
;
/**
* 选中数组
* @type {Array<any>}
* @memberof ViewListBase
*/
public
selections
:
Array
<
any
>
=
[];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ViewListBase
*/
public
appStateEvent
:
Subscription
|
undefined
;
/**
* Vue声明周期,组件挂载完毕
*
* @memberof ViewListBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof ViewListBase
*/
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 ViewListBase
*/
public
created
()
{
this
.
afterCreated
()
}
/**
* 执行created后的逻辑
*
* @memberof ViewListBase
*/
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
,
"IBIZAPPVIEW"
)){
return
;
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
this
.
refresh
([
data
]);
}
})
}
}
/**
* vue 生命周期
*
* @memberof ViewListBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof ViewListBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
if
(
this
.
appStateEvent
){
this
.
appStateEvent
.
unsubscribe
();
}
}
/**
* 加载更多
*
* @memberof ViewListBase
*/
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 ViewListBase
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZAPPVIEWListView'
+
(
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
.
$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 ViewListBase
*/
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 ViewListBase
*/
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 ViewListBase
*/
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZAPPVIEWListView'
+
(
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
,{
ibizappview
:
keys
.
join
(
';'
)
}),
Object
.
assign
({
ibizappview
:
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 ViewListBase
*/
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
:
'IBIZAPPVIEWListView'
+
(
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
:
'IBIZAPPVIEWListView'
+
(
this
.
$t
(
'app.list.notConfig.updateAction'
)
as
string
)
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
if
(
item
.
ibizappview
){
Object
.
assign
(
this
.
context
,{
ibizappview
:
item
.
ibizappview
});
}
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 ViewListBase
*/
public
onPanelDataChange
(
item
:
any
,
$event
:
any
)
{
Object
.
assign
(
item
,
$event
,
{
rowDataState
:
'update'
});
}
/**
* 选择数据
* @memberof ViewListBase
*
*/
public
handleClick
(
args
:
any
)
{
// this.clearSelection();
args
.
isselected
=
!
args
.
isselected
;
this
.
selectchange
();
}
/**
* 双击数据
* @memberof ViewListBase
*
*/
public
handleDblClick
(
args
:
any
)
{
this
.
$emit
(
'rowdblclick'
,
args
);
}
/**
* 触发事件
* @memberof ViewListBase
*
*/
public
selectchange
()
{
this
.
selections
=
[];
this
.
items
.
map
((
item
:
any
)
=>
{
if
(
item
.
isselected
)
{
this
.
selections
.
push
(
item
);
}
});
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
/**
* 清除当前所有选中状态
*
* @memberof ViewListBase
*/
public
clearSelection
(){
this
.
items
.
map
((
item
:
any
)
=>
{
Object
.
assign
(
item
,
{
isselected
:
false
});
});
}
/**
* 操作栏模型数据
*
* @type {*}
* @memberof ViewListBase
*/
public
ActionModel
:
any
=
{
};
/**
* 操作列界面行为
*
* @param {*} data
* @param {*} tag
* @param {*} $event
* @memberof ViewListBase
*/
public
uiAction
(
data
:
any
,
tag
:
any
,
$event
:
any
)
{
$event
.
stopPropagation
();
}
}
</
script
>
<
style
lang=
'less'
>
@import './view-list-list.less';
</
style
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/view-list-list/view-list-list-model.ts
0 → 100644
浏览文件 @
649a1f1c
/**
* ViewList 部件模型
*
* @export
* @class ViewListModel
*/
export
default
class
ViewListModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ViewListListMode
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'srfmajortext'
,
prop
:
'ibizappviewname'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfdescription'
,
prop
:
'viewdescription'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfkey'
,
prop
:
'ibizappviewid'
,
dataType
:
'GUID'
,
},
{
name
:
'ibizappview'
,
prop
:
'ibizappviewid'
,
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
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/view-list-list/view-list-list-service.ts
0 → 100644
浏览文件 @
649a1f1c
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
IBIZAPPVIEWService
from
'@/service/ibizappview/ibizappview-service'
;
import
ViewListModel
from
'./view-list-list-model'
;
/**
* ViewList 部件服务对象
*
* @export
* @class ViewListService
*/
export
default
class
ViewListService
extends
ControlService
{
/**
* 应用视图服务对象
*
* @type {IBIZAPPVIEWService}
* @memberof ViewListService
*/
public
appEntityService
:
IBIZAPPVIEWService
=
new
IBIZAPPVIEWService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof ViewListService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of ViewListService.
*
* @param {*} [opts={}]
* @memberof ViewListService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
ViewListModel
();
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ViewListService
*/
@
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 ViewListService
*/
@
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 ViewListService
*/
@
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 ViewListService
*/
@
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
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/view-list-list/view-list-list.less
0 → 100644
浏览文件 @
649a1f1c
// 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;
.item-text {
font-size: 18px;
font-weight: bold;
}
.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;
}
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizappview/view-list-list/view-list-list.vue
0 → 100644
浏览文件 @
649a1f1c
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
ViewListBase
from
'./view-list-list-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
ViewList
extends
ViewListBase
{
}
</
script
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizbook/custom-calendar-calendar/custom-calendar-calendar-base.vue
浏览文件 @
649a1f1c
...
...
@@ -11,7 +11,17 @@
placement=
"top"
>
<context-menu
:contextMenuStyle=
"
{width: '100%'}" :data="item" :renderContent="renderContextMenu">
<el-card
@
click
.
native=
"onEventClick(item,true,$event)"
:class=
"item.className"
>
<div
v-if=
"false && item.itemType == 'item'"
>
<div
v-if=
"true && item.itemType == 'item'"
>
<layout
_itemlayoutpanel
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:parentRef=
"thisRef"
:inputData=
"item"
@
panelDataChange=
"($event)=>
{onPanelDataChange(item,$event)}"
name="itemlayoutpanel"
ref='itemlayoutpanel'>
</layout
_itemlayoutpanel
>
</div>
<div
v-else
>
<h4>
{{
item
.
title
}}
</h4>
...
...
@@ -453,6 +463,16 @@ export default class CustomCalendarBase extends Vue implements ControlInterface
*/
public
searchArgCache
:
any
=
{};
/**
* 面板数据变化处理事件
* @param {any} item 当前数据
* @param {any} $event 面板事件数据
*
* @memberof CustomCalendarBase
*/
public
onPanelDataChange
(
item
:
any
,
$event
:
any
)
{
Object
.
assign
(
item
,
$event
,
{
rowDataState
:
'update'
});
}
/**
* 搜索获取日程事件
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizbook/custom-calendar-calendar/custom-calendar-calendar.vue
浏览文件 @
649a1f1c
...
...
@@ -2,9 +2,11 @@
import
{
Component
}
from
'vue-property-decorator'
;
import
CustomCalendarBase
from
'./custom-calendar-calendar-base.vue'
;
import
layout_itemlayoutpanel
from
'@widgets/ibizbook/itemlayoutpanel-panel/itemlayoutpanel-panel.vue'
;
@
Component
({
components
:
{
layout_itemlayoutpanel
,
}
})
...
...
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizbook/itemlayoutpanel-panel/itemlayoutpanel-panel-base.vue
0 → 100644
浏览文件 @
649a1f1c
<
template
>
<row
class=
"app-layoutpanel "
style=
"width:100%;height:100%;"
>
<i-col
v-show=
"detailsModel.container1.visible"
:md=
"
{ span: 24, offset: 0 }" class="app-layoutpanel-container" style="width:;height:100%;">
<row
style=
"height:100%;"
>
<i-col
v-show=
"detailsModel.field1.visible"
:md=
"
{ span: 24, offset: 0 }" style="" class="app-layoutpanel-field">
<div
class=
"item-field"
>
<app-panel-field
name=
'field1'
labelPos=
'LEFT'
caption=
"图书名"
:isEmptyCaption=
"false"
:error=
'detailsModel.field1.error'
:data=
'data'
:value=
'data.field1'
:itemRules=
"rules.field1"
>
<app-span
:value=
"data.field1"
name=
"field1"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-panel-field>
</div>
</i-col>
<i-col
v-show=
"detailsModel.field2.visible"
:md=
"
{ span: 24, offset: 0 }" style="" class="app-layoutpanel-field">
<div
class=
"item-field"
>
<app-panel-field
name=
'field2'
labelPos=
'LEFT'
caption=
"借出日期"
:isEmptyCaption=
"false"
:error=
'detailsModel.field2.error'
:data=
'data'
:value=
'data.field2'
:itemRules=
"rules.field2"
>
<app-span
:value=
"data.field2"
name=
"field2"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-panel-field>
</div>
</i-col>
<i-col
v-show=
"detailsModel.field3.visible"
:md=
"
{ span: 24, offset: 0 }" style="" class="app-layoutpanel-field">
<div
class=
"item-field"
>
<app-panel-field
name=
'field3'
labelPos=
'LEFT'
caption=
"归还日期"
:isEmptyCaption=
"false"
:error=
'detailsModel.field3.error'
:data=
'data'
:value=
'data.field3'
:itemRules=
"rules.field3"
>
<app-span
:value=
"data.field3"
name=
"field3"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-panel-field>
</div>
</i-col>
</row>
</i-col>
</row>
</
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
IBIZBOOKService
from
'@/service/ibizbook/ibizbook-service'
;
import
ItemlayoutpanelService
from
'./itemlayoutpanel-panel-service'
;
import
IBIZBOOKUIService
from
'@/uiservice/ibizbook/ibizbook-ui-service'
;
import
{
PanelDetailModel
,
PanelRawitemModel
,
PanelTabPanelModel
,
PanelTabPageModel
,
PanelFieldModel
,
PanelContainerModel
,
PanelControlModel
,
PanelUserControlModel
,
PanelButtonModel
}
from
'@/model/panel-detail'
;
import
ItemlayoutpanelModel
from
'./itemlayoutpanel-panel-model'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
import
UIService
from
'@/uiservice/ui-service'
;
@
Component
({
components
:
{
}
})
export
default
class
ItemlayoutpanelBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof ItemlayoutpanelBase
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof ItemlayoutpanelBase
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof ItemlayoutpanelBase
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof ItemlayoutpanelBase
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ItemlayoutpanelBase
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof ItemlayoutpanelBase
*/
public
getControlType
():
string
{
return
'PANEL'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof ItemlayoutpanelBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {ItemlayoutpanelService}
* @memberof ItemlayoutpanelBase
*/
public
service
:
ItemlayoutpanelService
=
new
ItemlayoutpanelService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZBOOKService}
* @memberof ItemlayoutpanelBase
*/
public
appEntityService
:
IBIZBOOKService
=
new
IBIZBOOKService
({
$store
:
this
.
$store
});
/**
* 转化数据
*
* @param {any} args
* @memberof ItemlayoutpanelBase
*/
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 ItemlayoutpanelBase
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof ItemlayoutpanelBase
*/
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
();
}
})
}
}
/**
* 接口实现
*
* @returns {any[]}
* @memberof ItemlayoutpanelBase
*/
getDatas
():
any
[]
{
if
(
!
this
.
panelData
)
{
return
[];
}
return
[
this
.
panelData
];
}
/**
* 接口实现
*
* @returns {*}
* @memberof ItemlayoutpanelBase
*/
getData
()
{
return
this
.
panelData
;
}
/**
* 父级部件引用
*
* @type {*}
* @memberof ItemlayoutpanelBase
*/
@
Prop
()
public
parentRef
?:
any
;
/**
* 面板数据对象
*
* @type {*}
* @memberof ItemlayoutpanelBase
*/
@
Prop
()
public
inputData
?:
any
;
/**
* UI数据对象
*
* @type {*}
* @memberof ItemlayoutpanelBase
*/
public
data
:
any
=
{};
/**
* 面板数据对象
*
* @type {*}
* @memberof ItemlayoutpanelBase
*/
public
panelData
:
any
=
null
;
/**
* 数据模型对象
*
* @type {ItemlayoutpanelModel}
* @memberof ItemlayoutpanelBase
*/
public
dataModel
:
ItemlayoutpanelModel
=
new
ItemlayoutpanelModel
();
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ItemlayoutpanelBase
*/
public
codeListService
:
CodeListService
=
new
CodeListService
({
$store
:
this
.
$store
});
/**
* 界面UI服务对象
*
* @type {IBIZBOOKUIService}
* @memberof ItemlayoutpanelBase
*/
public
appUIService
:
IBIZBOOKUIService
=
new
IBIZBOOKUIService
(
this
.
$store
);
/**
* 详情模型集合
*
* @type {*}
* @memberof ItemlayoutpanelBase
*/
public
detailsModel
:
any
=
{
field1
:
new
PanelFieldModel
({
caption
:
'图书名'
,
itemType
:
'FIELD'
,
visible
:
true
,
disabled
:
false
,
name
:
'field1'
,
panel
:
this
})
,
field2
:
new
PanelFieldModel
({
caption
:
'借出日期'
,
itemType
:
'FIELD'
,
visible
:
true
,
disabled
:
false
,
name
:
'field2'
,
panel
:
this
})
,
field3
:
new
PanelFieldModel
({
caption
:
'归还日期'
,
itemType
:
'FIELD'
,
visible
:
true
,
disabled
:
false
,
name
:
'field3'
,
panel
:
this
})
,
container1
:
new
PanelContainerModel
({
caption
:
''
,
itemType
:
'CONTAINER'
,
visible
:
true
,
disabled
:
false
,
name
:
'container1'
,
panel
:
this
})
,
};
/**
* 值规则对象
*
* @type {*}
* @memberof ItemlayoutpanelBase
*/
public
rules
:
any
=
{
field1
:[
{
required
:
false
,
type
:
'string'
,
message
:
'图书名 值不能为空'
},
{
required
:
false
,
type
:
'string'
,
message
:
'图书名 值不能为空'
}
],
field2
:[
{
required
:
false
,
type
:
'string'
,
message
:
'借出日期 值不能为空'
},
{
required
:
false
,
type
:
'string'
,
message
:
'借出日期 值不能为空'
}
],
field3
:[
{
required
:
false
,
type
:
'string'
,
message
:
'归还日期 值不能为空'
},
{
required
:
false
,
type
:
'string'
,
message
:
'归还日期 值不能为空'
}
],
};
/**
* 监听数据对象
*
* @memberof ItemlayoutpanelBase
*/
@
Watch
(
'inputData'
,{
immediate
:
true
,
deep
:
true
})
public
onInputDataChange
(
newVal
:
any
,
oldVal
:
any
){
if
(
newVal
){
this
.
computedUIData
(
newVal
);
this
.
panelData
=
Util
.
deepCopy
(
newVal
);
this
.
computeButtonState
(
newVal
);
this
.
panelLogic
({
name
:
''
,
newVal
:
null
,
oldVal
:
null
});
this
.
$forceUpdate
();
}
}
/**
* 计算UI展示数据
*
* @param codelistArray 代码表模型数组
* @memberof ItemlayoutpanelBase
*/
public
computedUIData
(
newVal
:
any
){
if
((
this
.
dataModel
.
getDataItems
instanceof
Function
)
&&
this
.
dataModel
.
getDataItems
().
length
>
0
){
this
.
dataModel
.
getDataItems
().
forEach
((
item
:
any
)
=>
{
this
.
data
[
item
.
name
]
=
newVal
[
item
.
prop
];
})
}
}
/**
* 计算面板按钮权限状态
*
* @param {*} [data] 传入数据
* @memberof ItemlayoutpanelBase
*/
public
computeButtonState
(
data
:
any
){
// 若为项布局面板,存在parentRef
if
(
this
.
parentRef
){
let
targetData
:
any
=
this
.
parentRef
.
transformData
(
data
);
if
(
this
.
detailsModel
&&
Object
.
keys
(
this
.
detailsModel
).
length
>
0
){
Object
.
keys
(
this
.
detailsModel
).
forEach
((
name
:
any
)
=>
{
if
(
this
.
detailsModel
[
name
]
&&
this
.
detailsModel
[
name
].
uiaction
&&
this
.
detailsModel
[
name
].
uiaction
.
dataaccaction
&&
Object
.
is
(
this
.
detailsModel
[
name
].
itemType
,
"BUTTON"
)){
this
.
detailsModel
[
name
].
isPower
=
true
;
let
tempUIAction
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
detailsModel
[
name
].
uiaction
));
let
result
:
any
[]
=
ViewTool
.
calcActionItemAuthState
(
targetData
,[
tempUIAction
],
this
.
appUIService
?
this
.
appUIService
:
null
);
this
.
detailsModel
[
name
].
visible
=
tempUIAction
.
visabled
;
this
.
detailsModel
[
name
].
disabled
=
tempUIAction
.
disabled
;
this
.
detailsModel
[
name
].
isPower
=
result
[
0
]
===
1
?
true
:
false
;
}
})
}
}
}
/**
* 界面行为
*
* @param {*} row
* @param {*} tag
* @param {*} $event
* @memberof ItemlayoutpanelBase
*/
public
uiAction
(
row
:
any
,
tag
:
any
,
$event
:
any
)
{
}
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ItemlayoutpanelBase
*/
public
opendata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
){
if
(
this
.
parentRef
.
opendata
&&
this
.
parentRef
.
opendata
instanceof
Function
)
{
this
.
parentRef
.
opendata
(
args
,
fullargs
,
params
,
$event
,
xData
);
}
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ItemlayoutpanelBase
*/
public
newdata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
if
(
this
.
parentRef
.
newdata
&&
this
.
parentRef
.
newdata
instanceof
Function
)
{
this
.
parentRef
.
newdata
(
args
,
fullargs
,
params
,
$event
,
xData
);
}
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof ItemlayoutpanelBase
*/
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
if
(
this
.
parentRef
.
remove
&&
this
.
parentRef
.
remove
instanceof
Function
)
{
return
this
.
parentRef
.
remove
(
datas
);
}
}
/**
* 刷新
*
* @param {*} [args={}]
* @memberof ItemlayoutpanelBase
*/
public
refresh
(
args
:
any
=
{})
{
if
(
this
.
parentRef
.
refresh
&&
this
.
parentRef
.
refresh
instanceof
Function
)
{
this
.
parentRef
.
refresh
(
args
);
}
}
/**
* 设置变更面板编辑项的值
*
* @param data 面板数据
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof ItemlayoutpanelBase
*/
public
onPanelItemValueChange
(
data
:
any
,
$event
:
{
name
:
string
,
value
:
any
}):
void
{
if
(
!
$event
)
{
return
;
}
if
(
!
$event
.
name
||
Object
.
is
(
$event
.
name
,
''
)
||
!
data
.
hasOwnProperty
(
$event
.
name
))
{
return
;
}
data
[
$event
.
name
]
=
$event
.
value
;
this
.
panelEditItemChange
(
data
,
$event
.
name
,
$event
.
value
);
}
/**
* 面板编辑项值变化后续操作
*
* @public
* @param data 面板数据
* @param property 编辑项名
* @param value 编辑项值
* @returns {void}
* @memberof ItemlayoutpanelBase
*/
public
panelEditItemChange
(
data
:
any
,
property
:
string
,
value
:
any
){
// 面板数据变化事件
if
((
this
.
dataModel
.
getDataItems
instanceof
Function
)
&&
this
.
dataModel
.
getDataItems
().
length
>
0
){
let
modelitem
=
this
.
dataModel
.
getDataItems
().
find
((
item
:
any
)
=>
{
return
item
.
name
===
property
;
})
if
(
modelitem
){
this
.
$emit
(
'panelDataChange'
,{[
modelitem
.
prop
]:
value
});
}
}
}
/**
* 分页切换事件
*
* @memberof ItemlayoutpanelBase
*/
public
handleTabPanelClick
(
name
:
string
,
$event
:
any
){
this
.
detailsModel
[
name
].
clickPage
(
$event
.
name
);
}
/**
* 面板逻辑
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ItemlayoutpanelBase
*/
public
panelLogic
({
name
,
newVal
,
oldVal
}:
{
name
:
string
,
newVal
:
any
,
oldVal
:
any
}):
void
{
}
}
</
script
>
<
style
lang=
'less'
>
@import './itemlayoutpanel-panel.less';
</
style
>
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizbook/itemlayoutpanel-panel/itemlayoutpanel-panel-model.ts
0 → 100644
浏览文件 @
649a1f1c
/**
* Itemlayoutpanel 部件模型
*
* @export
* @class ItemlayoutpanelModel
*/
export
default
class
ItemlayoutpanelModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ItemlayoutpanelModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'field1'
,
prop
:
'title'
},
{
name
:
'field2'
,
prop
:
'start'
},
{
name
:
'field3'
,
prop
:
'end'
}
]
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizbook/itemlayoutpanel-panel/itemlayoutpanel-panel-service.ts
0 → 100644
浏览文件 @
649a1f1c
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* Itemlayoutpanel 部件服务对象
*
* @export
* @class ItemlayoutpanelService
*/
export
default
class
ItemlayoutpanelService
extends
ControlService
{
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizbook/itemlayoutpanel-panel/itemlayoutpanel-panel.less
0 → 100644
浏览文件 @
649a1f1c
// this is less
.app-layoutpanel {
height: 100%;
.app-layoutpanel-container {
padding: 6px;
}
.app-layoutpanel-tabpanel{
>.el-tabs {
>.el-.el-tabs__header{
margin: 0 0 10px;
}
.app-layoutpanel-tabpage{
padding: 6px;
}
}
}
.app-layoutpanel-button,.app-layoutpanel-conctrl,.app-layoutpanel-ctrlpos,.app-layoutpanel-field,.app-layoutpanel-rowitem,.app-layoutpanel-usercontrol{
padding: 6px;
}
.item-field{
padding: 0 4px;
display: flex;
>.item-field-label{
padding: 0 8px;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizbook/itemlayoutpanel-panel/itemlayoutpanel-panel.vue
0 → 100644
浏览文件 @
649a1f1c
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
ItemlayoutpanelBase
from
'./itemlayoutpanel-panel-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
Itemlayoutpanel
extends
ItemlayoutpanelBase
{
}
</
script
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app_Web/src/widgets/ibizbook/tree-table-treegridex/tree-table-treegridex-base.vue
浏览文件 @
649a1f1c
...
...
@@ -15,11 +15,6 @@
<template
slot=
"empty"
>
{{
$t
(
'entities.ibizbook.treetable_treegridex.nodata'
)
}}
</
template
>
<el-table-column
show-overflow-tooltip
prop=
"subtext"
label=
"图书描述"
:width=
"50"
:align=
"''"
>
<
template
v-slot=
"{ row }"
>
<span>
{{
getColumnValue
(
row
,
'subtext'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop=
"ibizbookname"
label=
"图书名称"
:width=
"50"
:align=
"''"
>
<
template
v-slot=
"{ row }"
>
<span>
{{
getColumnValue
(
row
,
'ibizbookname'
)
}}
</span>
...
...
@@ -30,6 +25,11 @@
<span>
{{
getColumnValue
(
row
,
'author'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop=
"subtext"
label=
"图书描述"
:width=
"50"
:align=
"''"
>
<
template
v-slot=
"{ row }"
>
<span>
{{
getColumnValue
(
row
,
'subtext'
)
}}
</span>
</
template
>
</el-table-column>
</el-table>
</template>
...
...
This diff is collapsed.
Click to expand it.
config.xml
浏览文件 @
649a1f1c
...
...
@@ -37,11 +37,6 @@
git clone -b master $para2 demosys/
export NODE_OPTIONS=--max-old-space-size=4096
cd demosys/
mvn clean package -Pweb
cd demo-app/demo-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/demo-app-web.yaml iBizDemo --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
This diff is collapsed.
Click to expand it.
demo-app/demo-app-web/src/main/docker/Dockerfile
浏览文件 @
649a1f1c
...
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /demo-app-web.jar
EXPOSE
51001
EXPOSE
8080
ADD
demo-app-web.jar /demo-app-web.jar
This diff is collapsed.
Click to expand it.
demo-app/demo-app-web/src/main/docker/demo-app-web.yaml
浏览文件 @
649a1f1c
...
...
@@ -3,24 +3,9 @@ services:
demo-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/demo-app-web:latest
ports
:
-
"
51001:51001
"
-
"
8080:8080
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
-
SERVER_PORT=51001
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
-
SPRING_REDIS_HOST=172.16.240.110
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_LAB01_df847bdfd
-
SPRING_DATASOURCE_PASSWORD=3d6@460A
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_df847bdfd?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_df847bdfd
-
NACOS=172.16.240.110:8848
-
SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
-
SEATA_ENABLED=true
deploy
:
resources
:
limits
:
...
...
This diff is collapsed.
Click to expand it.
demo-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
649a1f1c
...
...
@@ -4,7 +4,7 @@
<!--输出实体[IBIZAPPCTRL]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizappctrl-
29
-1"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizappctrl-
38
-1"
>
<createTable
tableName=
"T_IBIZAPPCTRL"
>
<column
name=
"IBIZAPPCTRLNAME"
remarks=
""
type=
"VARCHAR(200)"
>
</column>
...
...
@@ -32,7 +32,7 @@
<!--输出实体[IBIZAPPEDITOR]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizappeditor-
3
1-2"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizappeditor-
4
1-2"
>
<createTable
tableName=
"T_IBIZAPPEDITOR"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
...
...
@@ -64,7 +64,7 @@
<!--输出实体[IBIZAPPVIEW]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizappview-
23
-3"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizappview-
32
-3"
>
<createTable
tableName=
"T_IBIZAPPVIEW"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
...
...
@@ -118,7 +118,7 @@
<!--输出实体[IBIZBOOK]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-82
3
-5"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-82
8
-5"
>
<createTable
tableName=
"T_IBIZBOOK"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
...
...
@@ -290,7 +290,7 @@
<!--输出实体[IBIZORDER]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizorder-41
4
-12"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizorder-41
8
-12"
>
<createTable
tableName=
"T_IBIZORDER"
>
<column
name=
"TP"
remarks=
""
type=
"TEXT(1048576)"
>
</column>
...
...
This diff is collapsed.
Click to expand it.
demo-core/src/main/resources/liquibase/view.xml
浏览文件 @
649a1f1c
...
...
@@ -37,7 +37,7 @@
</createView>
</changeSet>
<!--输出实体[IBIZORDER]视图结构信息 runOnChange="true" 当视图发生变更时,通过liquibase强刷prod的视图,实现视图的同步-->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"view-ibizorder-41
4
-8"
runOnChange=
"true"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"view-ibizorder-41
8
-8"
runOnChange=
"true"
>
<createView
fullDefinition=
"false"
replaceIfExists=
"true"
viewName=
"V_IBIZORDER"
>
<![CDATA[ SELECT t1.[AMOUNT], t1.[CREATEDATE], t1.[CREATEMAN], t1.[DETAILNUM], t1.[IBIZCUSTOMERID], t11.[IBIZCUSTOMERNAME], t1.[IBIZORDERID], t1.[IBIZORDERNAME], t1.[MEMO], t1.[ORDERSTATE], t1.[ORDERTIME], t1.[ORDERTYPE], t1.[ORDERUID], t1.[UPDATEDATE], t1.[UPDATEMAN], t1.[WFINSTANCEID], t1.[WFSTATE], t1.[WFSTEP] FROM [T_IBIZORDER] t1 LEFT JOIN T_IBIZCUSTOMER t11 ON t1.IBIZCUSTOMERID = t11.IBIZCUSTOMERID ]]>
</createView>
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录