Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
d063b250
提交
d063b250
编写于
12月 03, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ShineKOT 发布系统代码 [后台服务,演示应用]
上级
daa23477
变更
28
隐藏空白字符变更
内嵌
并排
正在显示
28 个修改的文件
包含
5900 行增加
和
66 行删除
+5900
-66
en-US.ts
app_Web/src/locale/lang/en-US.ts
+1
-0
zh-CN.ts
app_Web/src/locale/lang/zh-CN.ts
+1
-0
ibizorder-detail_en_US.ts
...anres/entities/ibizorder-detail/ibizorder-detail_en_US.ts
+18
-18
ibizorder-detail_zh_CN.ts
...anres/entities/ibizorder-detail/ibizorder-detail_zh_CN.ts
+18
-18
ibizorder_en_US.ts
...b/src/locale/lanres/entities/ibizorder/ibizorder_en_US.ts
+8
-8
ibizorder_zh_CN.ts
...b/src/locale/lanres/entities/ibizorder/ibizorder_zh_CN.ts
+8
-8
main-menu-appmenu.ts
app_Web/src/mock/app/main-menu-appmenu/main-menu-appmenu.ts
+18
-0
ibizorder-detail-usr2-edit-view-base.vue
...l-usr2-edit-view/ibizorder-detail-usr2-edit-view-base.vue
+1
-1
ibizorder-detail-usr2-edit-view.vue
...detail-usr2-edit-view/ibizorder-detail-usr2-edit-view.vue
+1
-1
ibizorder-pickup-tree-view-base.vue
...rder-pickup-tree-view/ibizorder-pickup-tree-view-base.vue
+704
-0
ibizorder-pickup-tree-view.less
...bizorder-pickup-tree-view/ibizorder-pickup-tree-view.less
+17
-0
ibizorder-pickup-tree-view.vue
...ibizorder-pickup-tree-view/ibizorder-pickup-tree-view.vue
+22
-0
page-register.ts
app_Web/src/pages/sample/index/page-register.ts
+3
-1
router.ts
app_Web/src/pages/sample/index/router.ts
+93
-10
state.ts
app_Web/src/store/modules/view-action/state.ts
+21
-0
main-menu-appmenu-base.vue
.../widgets/app/main-menu-appmenu/main-menu-appmenu-base.vue
+26
-0
main-menu-appmenu-model.ts
.../widgets/app/main-menu-appmenu/main-menu-appmenu-model.ts
+19
-0
ui-0007-2-form-base.vue
...s/ibizorder-detail/ui-0007-2-form/ui-0007-2-form-base.vue
+2196
-0
ui-0007-2-form-model.ts
...s/ibizorder-detail/ui-0007-2-form/ui-0007-2-form-model.ts
+121
-0
ui-0007-2-form-service.ts
...ibizorder-detail/ui-0007-2-form/ui-0007-2-form-service.ts
+496
-0
ui-0007-2-form.less
...dgets/ibizorder-detail/ui-0007-2-form/ui-0007-2-form.less
+54
-0
ui-0007-2-form.vue
...idgets/ibizorder-detail/ui-0007-2-form/ui-0007-2-form.vue
+14
-0
select-tree-treeview-base.vue
...zorder/select-tree-treeview/select-tree-treeview-base.vue
+909
-0
select-tree-treeview-model.ts
...zorder/select-tree-treeview/select-tree-treeview-model.ts
+88
-0
select-tree-treeview-service.ts
...rder/select-tree-treeview/select-tree-treeview-service.ts
+992
-0
select-tree-treeview.less
.../ibizorder/select-tree-treeview/select-tree-treeview.less
+36
-0
select-tree-treeview.vue
...s/ibizorder/select-tree-treeview/select-tree-treeview.vue
+14
-0
systemResource.json
demo-core/src/main/resources/permission/systemResource.json
+1
-1
未找到文件。
app_Web/src/locale/lang/en-US.ts
浏览文件 @
d063b250
...
...
@@ -261,6 +261,7 @@ export default {
menuitem131
:
"表格选项操作"
,
menuitem142
:
"选择视图"
,
menuitem143
:
"数据选择视图"
,
menuitem130
:
"订单明细数据选择"
,
menuitem5
:
"视图"
,
menuitem9
:
"列表视图"
,
menuitem19
:
"常规表格视图"
,
...
...
app_Web/src/locale/lang/zh-CN.ts
浏览文件 @
d063b250
...
...
@@ -261,6 +261,7 @@ export default {
menuitem131
:
"表格选项操作"
,
menuitem142
:
"选择视图"
,
menuitem143
:
"数据选择视图"
,
menuitem130
:
"订单明细数据选择"
,
menuitem5
:
"视图"
,
menuitem9
:
"列表视图"
,
menuitem19
:
"常规表格视图"
,
...
...
app_Web/src/locale/lanres/entities/ibizorder-detail/ibizorder-detail_en_US.ts
浏览文件 @
d063b250
...
...
@@ -153,7 +153,7 @@ export default {
uiactions
:
{
},
},
logic_0007
_form
:
{
ui_0007_2
_form
:
{
details
:
{
group1
:
"订单明细基本信息"
,
formpage1
:
"基本信息"
,
...
...
@@ -165,20 +165,22 @@ export default {
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
ibizuniproductname
:
"产品名称"
,
quantity
:
"数量"
,
ibizorderdetailname
:
"订单明细名称"
,
ibizorderdetailid
:
"订单明细标识"
,
orderuid
:
"订单编号"
,
ibizorderid
:
"订单标识"
,
ibizordername
:
"订单名称"
,
ibizuniproductname
:
"产品(查询计数检查)
"
,
amount
:
"小计
"
,
unit
:
"单位"
,
unitprice
:
"单价"
,
quantity
:
"数量"
,
amount
:
"小计"
,
ibizuniproductid
:
"统一产品标识"
,
ibizorderid
:
"订单标识"
,
ibizorderdetailid
:
"订单明细标识"
,
},
uiactions
:
{
},
},
main3
_form
:
{
logic_0007
_form
:
{
details
:
{
group1
:
"订单明细基本信息"
,
formpage1
:
"基本信息"
,
...
...
@@ -191,9 +193,11 @@ export default {
srfdeid
:
""
,
srfsourcekey
:
""
,
ibizordername
:
"订单名称"
,
ibizuniproductname
:
"产品
名称
"
,
ibizuniproductname
:
"产品
(查询计数检查)
"
,
unit
:
"单位"
,
unitprice
:
"单价"
,
quantity
:
"数量"
,
amount
:
"小计"
,
ibizuniproductid
:
"统一产品标识"
,
ibizorderid
:
"订单标识"
,
ibizorderdetailid
:
"订单明细标识"
,
...
...
@@ -201,7 +205,7 @@ export default {
uiactions
:
{
},
},
ui_0007_2
_form
:
{
main3
_form
:
{
details
:
{
group1
:
"订单明细基本信息"
,
formpage1
:
"基本信息"
,
...
...
@@ -213,17 +217,13 @@ export default {
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
ibizuniproductname
:
"产品名称"
,
quantity
:
"数量"
,
ibizorderdetailname
:
"订单明细名称"
,
ibizorderdetailid
:
"订单明细标识"
,
orderuid
:
"订单编号"
,
ibizorderid
:
"订单标识"
,
ibizordername
:
"订单名称"
,
amount
:
"小计
"
,
ibizuniproductname
:
"产品名称
"
,
unit
:
"单位"
,
unitprice
:
"单价"
,
ibizuniproductid
:
"统一产品标识"
,
ibizorderid
:
"订单标识"
,
ibizorderdetailid
:
"订单明细标识"
,
},
uiactions
:
{
},
...
...
@@ -398,6 +398,8 @@ export default {
tip
:
"Save And Close Window"
,
},
},
usr2editviewtoolbar_toolbar
:
{
},
sgridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"New"
,
...
...
@@ -562,6 +564,4 @@ export default {
tip
:
"刷新"
,
},
},
usr2editviewtoolbar_toolbar
:
{
},
};
\ No newline at end of file
app_Web/src/locale/lanres/entities/ibizorder-detail/ibizorder-detail_zh_CN.ts
浏览文件 @
d063b250
...
...
@@ -152,7 +152,7 @@ export default {
uiactions
:
{
},
},
logic_0007
_form
:
{
ui_0007_2
_form
:
{
details
:
{
group1
:
"订单明细基本信息"
,
formpage1
:
"基本信息"
,
...
...
@@ -164,20 +164,22 @@ export default {
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
ibizuniproductname
:
"产品名称"
,
quantity
:
"数量"
,
ibizorderdetailname
:
"订单明细名称"
,
ibizorderdetailid
:
"订单明细标识"
,
orderuid
:
"订单编号"
,
ibizorderid
:
"订单标识"
,
ibizordername
:
"订单名称"
,
ibizuniproductname
:
"产品(查询计数检查)
"
,
amount
:
"小计
"
,
unit
:
"单位"
,
unitprice
:
"单价"
,
quantity
:
"数量"
,
amount
:
"小计"
,
ibizuniproductid
:
"统一产品标识"
,
ibizorderid
:
"订单标识"
,
ibizorderdetailid
:
"订单明细标识"
,
},
uiactions
:
{
},
},
main3
_form
:
{
logic_0007
_form
:
{
details
:
{
group1
:
"订单明细基本信息"
,
formpage1
:
"基本信息"
,
...
...
@@ -190,9 +192,11 @@ export default {
srfdeid
:
""
,
srfsourcekey
:
""
,
ibizordername
:
"订单名称"
,
ibizuniproductname
:
"产品
名称
"
,
ibizuniproductname
:
"产品
(查询计数检查)
"
,
unit
:
"单位"
,
unitprice
:
"单价"
,
quantity
:
"数量"
,
amount
:
"小计"
,
ibizuniproductid
:
"统一产品标识"
,
ibizorderid
:
"订单标识"
,
ibizorderdetailid
:
"订单明细标识"
,
...
...
@@ -200,7 +204,7 @@ export default {
uiactions
:
{
},
},
ui_0007_2
_form
:
{
main3
_form
:
{
details
:
{
group1
:
"订单明细基本信息"
,
formpage1
:
"基本信息"
,
...
...
@@ -212,17 +216,13 @@ export default {
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
ibizuniproductname
:
"产品名称"
,
quantity
:
"数量"
,
ibizorderdetailname
:
"订单明细名称"
,
ibizorderdetailid
:
"订单明细标识"
,
orderuid
:
"订单编号"
,
ibizorderid
:
"订单标识"
,
ibizordername
:
"订单名称"
,
amount
:
"小计
"
,
ibizuniproductname
:
"产品名称
"
,
unit
:
"单位"
,
unitprice
:
"单价"
,
ibizuniproductid
:
"统一产品标识"
,
ibizorderid
:
"订单标识"
,
ibizorderdetailid
:
"订单明细标识"
,
},
uiactions
:
{
},
...
...
@@ -397,6 +397,8 @@ export default {
tip
:
"保存并关闭"
,
},
},
usr2editviewtoolbar_toolbar
:
{
},
sgridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"新建"
,
...
...
@@ -561,6 +563,4 @@ export default {
tip
:
"刷新"
,
},
},
usr2editviewtoolbar_toolbar
:
{
},
};
\ No newline at end of file
app_Web/src/locale/lanres/entities/ibizorder/ibizorder_en_US.ts
浏览文件 @
d063b250
...
...
@@ -2051,24 +2051,24 @@ export default {
tip
:
"数据导入"
,
},
},
treeexp
_treeview
:
{
selecttree
_treeview
:
{
nodata
:
""
,
nodes
:
{
orderstatus
:
"订单状态"
,
orderdata
:
"所有订单"
,
ordertype
:
"订单类型"
,
root
:
"默认根节点"
,
orderdata
:
"订单数据"
,
ordertype
:
"订单类型"
,
orderstate
:
"订单状态"
,
},
uiactions
:
{
},
},
selecttree
_treeview
:
{
treeexp
_treeview
:
{
nodata
:
""
,
nodes
:
{
root
:
"默认根节点
"
,
orderdata
:
"
订单数据
"
,
orderstatus
:
"订单状态
"
,
orderdata
:
"
所有订单
"
,
ordertype
:
"订单类型"
,
orderstate
:
"订单状态
"
,
root
:
"默认根节点
"
,
},
uiactions
:
{
},
...
...
app_Web/src/locale/lanres/entities/ibizorder/ibizorder_zh_CN.ts
浏览文件 @
d063b250
...
...
@@ -2050,24 +2050,24 @@ export default {
tip
:
"数据导入"
,
},
},
treeexp
_treeview
:
{
selecttree
_treeview
:
{
nodata
:
""
,
nodes
:
{
orderstatus
:
"订单状态"
,
orderdata
:
"所有订单"
,
ordertype
:
"订单类型"
,
root
:
"默认根节点"
,
orderdata
:
"订单数据"
,
ordertype
:
"订单类型"
,
orderstate
:
"订单状态"
,
},
uiactions
:
{
},
},
selecttree
_treeview
:
{
treeexp
_treeview
:
{
nodata
:
""
,
nodes
:
{
root
:
"默认根节点
"
,
orderdata
:
"
订单数据
"
,
orderstatus
:
"订单状态
"
,
orderdata
:
"
所有订单
"
,
ordertype
:
"订单类型"
,
orderstate
:
"订单状态
"
,
root
:
"默认根节点
"
,
},
uiactions
:
{
},
...
...
app_Web/src/mock/app/main-menu-appmenu/main-menu-appmenu.ts
浏览文件 @
d063b250
...
...
@@ -1809,6 +1809,24 @@ mock.onGet('v7/main-menuappmenu').reply((config: any) => {
textcls
:
''
,
appfunctag
:
'AppFunc61'
,
resourcetag
:
''
,
},
{
id
:
'25393E3D-100C-4CEF-BC2F-17B586F30A93'
,
name
:
'menuitem130'
,
text
:
'订单明细数据选择'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'订单明细数据选择'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'AppFunc63'
,
resourcetag
:
''
,
},
],
},
...
...
app_Web/src/pages/sample/ibizorder-detail-usr2-edit-view/ibizorder-detail-usr2-edit-view-base.vue
浏览文件 @
d063b250
...
...
@@ -129,7 +129,7 @@ export default class IBIZOrderDetailUsr2EditViewBase extends Vue {
* @type {string}
* @memberof IBIZOrderDetailUsr2EditViewBase
*/
public
viewtag
:
string
=
'
319d79a4f05cde44a1a7751b3ffe68ef
'
;
public
viewtag
:
string
=
'
f5fd15132c21e606b626206e0081ec9d
'
;
/**
* 自定义视图导航上下文集合
...
...
app_Web/src/pages/sample/ibizorder-detail-usr2-edit-view/ibizorder-detail-usr2-edit-view.vue
浏览文件 @
d063b250
...
...
@@ -2,7 +2,7 @@
import
{
Component
}
from
'vue-property-decorator'
;
import
IBIZOrderDetailUsr2EditViewBase
from
'./ibizorder-detail-usr2-edit-view-base.vue'
;
import
view_form
from
'@widgets/ibizorder-detail/
main4-form/main4
-form.vue'
;
import
view_form
from
'@widgets/ibizorder-detail/
ui-0007-2-form/ui-0007-2
-form.vue'
;
@
Component
({
components
:
{
view_form
,
...
...
app_Web/src/pages/sample/ibizorder-pickup-tree-view/ibizorder-pickup-tree-view-base.vue
0 → 100644
浏览文件 @
d063b250
<
template
>
<div
class=
'view-container depickuptreeview ibizorder-pickup-tree-view'
>
<app-studioaction
:viewTitle=
"$t(model.srfCaption)"
viewName=
"ibizorderpickuptreeview"
></app-studioaction>
<card
class=
'view-card view-no-caption view-no-toolbar'
:dis-hover=
"true"
:bordered=
"false"
>
<div
class=
'content-container'
>
<div
class=
"tree-contant"
>
<view
_tree
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:showBusyIndicator=
"true"
updateAction=
'Update'
removeAction=
'Remove'
loadAction=
'Get'
createAction=
'Create'
:isSingleSelect=
"isSingleSelect"
:selectedData=
"selectedData"
@
nodedblclick=
"tree_nodedblclick($event)"
name=
"tree"
ref=
'tree'
@
selectionchange=
"tree_selectionchange($event)"
@
load=
"tree_load($event)"
@
closeview=
"closeView($event)"
>
</view
_tree
>
</div>
</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
IBIZOrderService
from
'@/service/ibizorder/ibizorder-service'
;
import
IBIZOrderAuthService
from
'@/authservice/ibizorder/ibizorder-auth-service'
;
import
PickupTreeViewEngine
from
'@engine/view/pickup-tree-view-engine'
;
import
IBIZOrderUIService
from
'@/uiservice/ibizorder/ibizorder-ui-service'
;
@
Component
({
components
:
{
},
})
export
default
class
IBIZOrderPickupTreeViewBase
extends
Vue
{
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
appEntityService
:
IBIZOrderService
=
new
IBIZOrderService
;
/**
* 实体UI服务对象
*
* @type IBIZOrderUIService
* @memberof IBIZOrderPickupTreeViewBase
*/
public
appUIService
:
IBIZOrderUIService
=
new
IBIZOrderUIService
(
this
.
$store
);
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof IBIZOrderPickupTreeViewBase
*/
@
Emit
()
public
viewDatasChange
(
val
:
any
):
any
{
return
val
;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof IBIZOrderPickupTreeViewBase
*/
@
Prop
()
public
viewdata
!
:
string
;
/**
* 传入视图参数
*
* @type {string}
* @memberof IBIZOrderPickupTreeViewBase
*/
@
Prop
()
public
viewparam
!
:
string
;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof IBIZOrderPickupTreeViewBase
*/
@
Prop
({
default
:
true
})
public
viewDefaultUsage
!
:
boolean
;
/**
* 视图默认使用
*
* @type {string}
* @memberof IBIZOrderPickupTreeViewBase
*/
@
Inject
({
from
:
'navModel'
,
default
:
'tab'
})
public
navModel
!
:
string
;
/**
* 视图标识
*
* @type {string}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
viewtag
:
string
=
'bfdb44ab2995bfb452478242183ea4c0'
;
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
customViewNavContexts
:
any
=
{
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
customViewParams
:
any
=
{
};
/**
* 视图模型数据
*
* @type {*}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
model
:
any
=
{
srfCaption
:
'entities.ibizorder.views.pickuptreeview.caption'
,
srfTitle
:
'entities.ibizorder.views.pickuptreeview.title'
,
srfSubTitle
:
'entities.ibizorder.views.pickuptreeview.subtitle'
,
dataInfo
:
''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof IBIZOrderPickupTreeViewBase
*/
@
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 IBIZOrderPickupTreeViewBase
*/
@
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 IBIZOrderPickupTreeViewBase
*/
public
containerModel
:
any
=
{
view_tree
:
{
name
:
'tree'
,
type
:
'TREEVIEW'
},
wflinks
:
[],
};
/**
* 视图刷新
*
* @param {*} args
* @memberof IBIZOrderPickupTreeViewBase
*/
public
refresh
(
args
?:
any
):
void
{
const
refs
:
any
=
this
.
$refs
;
if
(
refs
&&
refs
.
tree
)
{
refs
.
tree
.
refresh
();
}
}
/**
* 计数器刷新
*
* @memberof IBIZOrderPickupTreeViewBase
*/
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 IBIZOrderPickupTreeViewBase
*/
public
viewState
:
Subject
<
ViewState
>
=
new
Subject
();
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
engine
:
PickupTreeViewEngine
=
new
PickupTreeViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof IBIZOrderPickupTreeViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
tree
:
this
.
$refs
.
tree
,
keyPSDEField
:
'ibizorder'
,
majorPSDEField
:
'ibizordername'
,
isLoadDefault
:
true
,
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
navDataService
=
NavDataService
.
getInstance
(
this
.
$store
);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
serviceStateEvent
:
Subscription
|
undefined
;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof IBIZOrderPickupTreeViewBase
*/
@
Prop
()
public
portletState
?:
any
;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
portletStateEvent
:
Subscription
|
undefined
;
/**
* 应用上下文
*
* @type {*}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
context
:
any
=
{};
/**
* 视图参数
*
* @type {*}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
viewparams
:
any
=
{};
/**
* 视图缓存数据
*
* @type {*}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
viewCacheData
:
any
;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 解析视图参数
*
* @public
* @memberof IBIZOrderPickupTreeViewBase
*/
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
,{
'ibizorder'
:
inputvalue
});
}
//初始化视图唯一标识
Object
.
assign
(
this
.
context
,{
srfsessionid
:
this
.
$util
.
createUUID
()});
this
.
handleCustomViewData
();
//初始化导航数据
this
.
initNavDataWithRoute
();
}
/**
* 处理自定义视图数据
*
* @memberof IBIZOrderPickupTreeViewBase
*/
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 IBIZOrderPickupTreeViewBase
*/
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 IBIZOrderPickupTreeViewBase
*/
public
initNavDataWithRoute
(
data
:
any
=
null
,
isNew
:
boolean
=
false
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavData
({
id
:
'ibizorder-pickup-tree-view'
,
tag
:
this
.
viewtag
,
srfkey
:
isNew
?
null
:
this
.
context
.
ibizorder
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof IBIZOrderPickupTreeViewBase
*/
public
initNavDataWithTab
(
data
:
any
=
null
,
isOnlyAdd
:
boolean
=
true
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
!
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavDataByOnly
({
id
:
'ibizorder-pickup-tree-view'
,
tag
:
this
.
viewtag
,
srfkey
:
this
.
context
.
ibizorder
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
},
isOnlyAdd
);
}
}
/**
* Vue声明周期
*
* @memberof IBIZOrderPickupTreeViewBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof IBIZOrderPickupTreeViewBase
*/
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
,
'ibizorder-pickup-tree-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
,
'IBIZOrderPickupTreeView'
)){
return
;
}
if
(
Object
.
is
(
res
.
action
,
'refresh'
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
){
_this
.
refresh
();
}
})
}
}
/**
* 销毁之前
*
* @memberof IBIZOrderPickupTreeViewBase
*/
public
beforeDestroy
()
{
this
.
$store
.
commit
(
'viewaction/removeView'
,
this
.
viewtag
);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof IBIZOrderPickupTreeViewBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof IBIZOrderPickupTreeViewBase
*/
public
afterMounted
(){
const
_this
:
any
=
this
;
_this
.
engineInit
();
if
(
_this
.
loadModel
&&
_this
.
loadModel
instanceof
Function
)
{
_this
.
loadModel
();
}
}
/**
* tree 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderPickupTreeViewBase
*/
public
tree_selectionchange
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'tree'
,
'selectionchange'
,
$event
);
}
/**
* tree 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderPickupTreeViewBase
*/
public
tree_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'tree'
,
'load'
,
$event
);
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof IBIZOrderPickupTreeViewBase
*/
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 IBIZOrderPickupTreeViewBase
*/
public
destroyed
(){
this
.
afterDestroyed
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof IBIZOrderPickupTreeViewBase
*/
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 IBIZOrderPickupTreeViewBase
*/
@
Prop
()
public
selectedData
?:
string
;
/**
* 是否单选
*
* @type {boolean}
* @memberof IBIZOrderPickupTreeViewBase
*/
@
Prop
()
public
isSingleSelect
?:
boolean
;
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof IBIZOrderPickupTreeViewBase
*/
@
Prop
({
default
:
true
})
public
isShowButton
!
:
boolean
;
/**
* 节点过滤值
*
* @type {string}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
srfnodefilter
:
string
=
''
;
/**
* 快速搜索
*
* @returns {void}
* @memberof IBIZOrderPickupTreeViewBase
*/
public
onSearch
():
void
{
if
(
!
this
.
viewState
)
{
return
;
}
this
.
viewState
.
next
({
tag
:
'tree'
,
action
:
'filter'
,
data
:
{
srfnodefilter
:
this
.
srfnodefilter
}
});
}
/**
* tree 部件 nodedblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof IBIZOrderPickupTreeViewBase
*/
public
tree_nodedblclick
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'tree'
,
'nodedblclick'
,
$event
);
}
}
</
script
>
<
style
lang=
'less'
>
@import './ibizorder-pickup-tree-view.less';
</
style
>
\ No newline at end of file
app_Web/src/pages/sample/ibizorder-pickup-tree-view/ibizorder-pickup-tree-view.less
0 → 100644
浏览文件 @
d063b250
.ibizorder-pickup-tree-view{
position: relative;
}
.search-contant {
height: 40px;
.ivu-input-wrapper {
max-width: 400px;
padding-top: 6px;
}
}
.tree-contant {
height: 100%;
margin: 0px 0px 16px 0;
overflow: auto;
}
\ No newline at end of file
app_Web/src/pages/sample/ibizorder-pickup-tree-view/ibizorder-pickup-tree-view.vue
0 → 100644
浏览文件 @
d063b250
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
IBIZOrderPickupTreeViewBase
from
'./ibizorder-pickup-tree-view-base.vue'
;
import
view_tree
from
'@widgets/ibizorder/select-tree-treeview/select-tree-treeview.vue'
;
@
Component
({
components
:
{
view_tree
,
},
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
IBIZOrderPickupTreeView
extends
IBIZOrderPickupTreeViewBase
{
}
</
script
>
\ No newline at end of file
app_Web/src/pages/sample/index/page-register.ts
浏览文件 @
d063b250
...
...
@@ -5,6 +5,7 @@ export const PageComponents = {
Vue
.
component
(
'ibizsample0003-smpickup-view2'
,
()
=>
import
(
'@pages/sample/ibizsample0003-smpickup-view2/ibizsample0003-smpickup-view2.vue'
));
Vue
.
component
(
'ibizorder-detail-sedit-view9'
,
()
=>
import
(
'@pages/sample/ibizorder-detail-sedit-view9/ibizorder-detail-sedit-view9.vue'
));
Vue
.
component
(
'ibizorder-detail-smedit-view9'
,
()
=>
import
(
'@pages/sample/ibizorder-detail-smedit-view9/ibizorder-detail-smedit-view9.vue'
));
Vue
.
component
(
'ibizorder-pickup-tree-view'
,
()
=>
import
(
'@pages/sample/ibizorder-pickup-tree-view/ibizorder-pickup-tree-view.vue'
));
Vue
.
component
(
'ibizsample0003-edit-view'
,
()
=>
import
(
'@pages/sample/ibizsample0003-edit-view/ibizsample0003-edit-view.vue'
));
Vue
.
component
(
'ibizuniproduct-pickup-view'
,
()
=>
import
(
'@pages/sample/ibizuniproduct-pickup-view/ibizuniproduct-pickup-view.vue'
));
Vue
.
component
(
'ibizorder-sgrid-view'
,
()
=>
import
(
'@pages/sample/ibizorder-sgrid-view/ibizorder-sgrid-view.vue'
));
...
...
@@ -73,8 +74,8 @@ export const PageComponents = {
Vue
.
component
(
'ibizorder-usr2-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-usr2-edit-view/ibizorder-usr2-edit-view.vue'
));
Vue
.
component
(
'ibizorder-sf4-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-sf4-edit-view/ibizorder-sf4-edit-view.vue'
));
Vue
.
component
(
'ibizorder-sf1-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-sf1-edit-view/ibizorder-sf1-edit-view.vue'
));
Vue
.
component
(
'ibizbookusr3-calendar-view'
,
()
=>
import
(
'@pages/sample/ibizbookusr3-calendar-view/ibizbookusr3-calendar-view.vue'
));
Vue
.
component
(
'ibizsample0017-grid-view'
,
()
=>
import
(
'@pages/sample/ibizsample0017-grid-view/ibizsample0017-grid-view.vue'
));
Vue
.
component
(
'ibizbookusr3-calendar-view'
,
()
=>
import
(
'@pages/sample/ibizbookusr3-calendar-view/ibizbookusr3-calendar-view.vue'
));
Vue
.
component
(
'ibizorder-f8-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-f8-edit-view/ibizorder-f8-edit-view.vue'
));
Vue
.
component
(
'ibizorder-f19-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-f19-edit-view/ibizorder-f19-edit-view.vue'
));
Vue
.
component
(
'ibizsample0003-f1-tree-exp-view'
,
()
=>
import
(
'@pages/sample/ibizsample0003-f1-tree-exp-view/ibizsample0003-f1-tree-exp-view.vue'
));
...
...
@@ -130,6 +131,7 @@ export const PageComponents = {
Vue
.
component
(
'ibizorder-sf3-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-sf3-edit-view/ibizorder-sf3-edit-view.vue'
));
Vue
.
component
(
'ibizorder-f13-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-f13-edit-view/ibizorder-f13-edit-view.vue'
));
Vue
.
component
(
'ibizorder-detail-f6-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-detail-f6-edit-view/ibizorder-detail-f6-edit-view.vue'
));
Vue
.
component
(
'ibizorder-detail-usr2-edit-view'
,
()
=>
import
(
'@pages/sample/ibizorder-detail-usr2-edit-view/ibizorder-detail-usr2-edit-view.vue'
));
Vue
.
component
(
'ibizbookusr4-grid-view'
,
()
=>
import
(
'@pages/sample/ibizbookusr4-grid-view/ibizbookusr4-grid-view.vue'
));
Vue
.
component
(
'ibizbookusr2-medit-view9'
,
()
=>
import
(
'@pages/sample/ibizbookusr2-medit-view9/ibizbookusr2-medit-view9.vue'
));
Vue
.
component
(
'ibizorder-sedit-view3'
,
()
=>
import
(
'@pages/sample/ibizorder-sedit-view3/ibizorder-sedit-view3.vue'
));
...
...
app_Web/src/pages/sample/index/router.ts
浏览文件 @
d063b250
...
...
@@ -150,6 +150,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-detail-smedit-view9/ibizorder-detail-smedit-view9.vue'
),
},
{
path
:
'ibizorders/:ibizorder?/pickuptreeview/:pickuptreeview?'
,
meta
:
{
caption
:
'entities.ibizorder.views.pickuptreeview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibizorders'
,
parameterName
:
'ibizorder'
},
{
pathName
:
'pickuptreeview'
,
parameterName
:
'pickuptreeview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-pickup-tree-view/ibizorder-pickup-tree-view.vue'
),
},
{
path
:
'ibizsample0003s/:ibizsample0003?/editview/:editview?'
,
meta
:
{
...
...
@@ -1208,32 +1222,32 @@ const router = new Router({
component
:
()
=>
import
(
'@pages/sample/ibizorder-sf1-edit-view/ibizorder-sf1-edit-view.vue'
),
},
{
path
:
'ibiz
books/:ibizbook?/usr3calendarview/:usr3calendar
view?'
,
path
:
'ibiz
sample0017s/:ibizsample0017?/gridview/:grid
view?'
,
meta
:
{
caption
:
'entities.ibiz
book.views.usr3calendar
view.caption'
,
caption
:
'entities.ibiz
sample0017.views.grid
view.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibiz
books'
,
parameterName
:
'ibizbook
'
},
{
pathName
:
'
usr3calendarview'
,
parameterName
:
'usr3calendar
view'
},
{
pathName
:
'ibiz
sample0017s'
,
parameterName
:
'ibizsample0017
'
},
{
pathName
:
'
gridview'
,
parameterName
:
'grid
view'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibiz
bookusr3-calendar-view/ibizbookusr3-calendar
-view.vue'
),
component
:
()
=>
import
(
'@pages/sample/ibiz
sample0017-grid-view/ibizsample0017-grid
-view.vue'
),
},
{
path
:
'ibiz
sample0017s/:ibizsample0017?/gridview/:grid
view?'
,
path
:
'ibiz
books/:ibizbook?/usr3calendarview/:usr3calendar
view?'
,
meta
:
{
caption
:
'entities.ibiz
sample0017.views.grid
view.caption'
,
caption
:
'entities.ibiz
book.views.usr3calendar
view.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibiz
sample0017s'
,
parameterName
:
'ibizsample0017
'
},
{
pathName
:
'
gridview'
,
parameterName
:
'grid
view'
},
{
pathName
:
'ibiz
books'
,
parameterName
:
'ibizbook
'
},
{
pathName
:
'
usr3calendarview'
,
parameterName
:
'usr3calendar
view'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibiz
sample0017-grid-view/ibizsample0017-grid
-view.vue'
),
component
:
()
=>
import
(
'@pages/sample/ibiz
bookusr3-calendar-view/ibizbookusr3-calendar
-view.vue'
),
},
{
path
:
'ibizorders/:ibizorder?/f8editview/:f8editview?'
,
...
...
@@ -2095,6 +2109,35 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-detail-f6-edit-view/ibizorder-detail-f6-edit-view.vue'
),
},
{
path
:
'ibizorders/:ibizorder?/ibizorderdetails/:ibizorderdetail?/usr2editview/:usr2editview?'
,
meta
:
{
caption
:
'entities.ibizorderdetail.views.usr2editview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibizorders'
,
parameterName
:
'ibizorder'
},
{
pathName
:
'ibizorderdetails'
,
parameterName
:
'ibizorderdetail'
},
{
pathName
:
'usr2editview'
,
parameterName
:
'usr2editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-detail-usr2-edit-view/ibizorder-detail-usr2-edit-view.vue'
),
},
{
path
:
'ibizorderdetails/:ibizorderdetail?/usr2editview/:usr2editview?'
,
meta
:
{
caption
:
'entities.ibizorderdetail.views.usr2editview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibizorderdetails'
,
parameterName
:
'ibizorderdetail'
},
{
pathName
:
'usr2editview'
,
parameterName
:
'usr2editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-detail-usr2-edit-view/ibizorder-detail-usr2-edit-view.vue'
),
},
{
path
:
'ibizbooks/:ibizbook?/usr4gridview/:usr4gridview?'
,
meta
:
{
...
...
@@ -4548,6 +4591,19 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sample/ibizbookusr6-grid-view/ibizbookusr6-grid-view.vue'
),
},
{
path
:
'/ibizorders/:ibizorder?/pickuptreeview/:pickuptreeview?'
,
meta
:
{
caption
:
'entities.ibizorder.views.pickuptreeview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibizorders'
,
parameterName
:
'ibizorder'
},
{
pathName
:
'pickuptreeview'
,
parameterName
:
'pickuptreeview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-pickup-tree-view/ibizorder-pickup-tree-view.vue'
),
},
{
path
:
'/ibizorders/:ibizorder?/ibizorderdetails/:ibizorderdetail?/editview/:editview?'
,
meta
:
{
...
...
@@ -5057,6 +5113,33 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-edit-view/ibizorder-edit-view.vue'
),
},
{
path
:
'/ibizorders/:ibizorder?/ibizorderdetails/:ibizorderdetail?/usr2editview/:usr2editview?'
,
meta
:
{
caption
:
'entities.ibizorderdetail.views.usr2editview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibizorders'
,
parameterName
:
'ibizorder'
},
{
pathName
:
'ibizorderdetails'
,
parameterName
:
'ibizorderdetail'
},
{
pathName
:
'usr2editview'
,
parameterName
:
'usr2editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-detail-usr2-edit-view/ibizorder-detail-usr2-edit-view.vue'
),
},
{
path
:
'/ibizorderdetails/:ibizorderdetail?/usr2editview/:usr2editview?'
,
meta
:
{
caption
:
'entities.ibizorderdetail.views.usr2editview.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibizorderdetails'
,
parameterName
:
'ibizorderdetail'
},
{
pathName
:
'usr2editview'
,
parameterName
:
'usr2editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/sample/ibizorder-detail-usr2-edit-view/ibizorder-detail-usr2-edit-view.vue'
),
},
{
path
:
'/ibizbooks/:ibizbook?/internalfuncgridview/:internalfuncgridview?'
,
meta
:
{
...
...
app_Web/src/store/modules/view-action/state.ts
浏览文件 @
d063b250
...
...
@@ -270,6 +270,7 @@ export const viewstate: any = {
'bc76c982dd2264463427eb57e9ed3fba'
,
'e92ac401e96f4e17763322eca8355c30'
,
'9f80ed66360fbbb9bc57c575fdd8814f'
,
'f5fd15132c21e606b626206e0081ec9d'
,
'94e6694a65d9cacb171b6e0b581216ba'
,
'5686558064d641b7ff599746970461cd'
,
'3bbf72a3e5b59fed0dee362a9b1384a8'
,
...
...
@@ -1407,6 +1408,15 @@ export const viewstate: any = {
'efbe72fe207c5bb7ada28b278a9ea920'
,
],
},
{
viewtag
:
'bfdb44ab2995bfb452478242183ea4c0'
,
viewmodule
:
'Sample'
,
viewname
:
'IBIZOrderPickupTreeView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'c153da73d5d5b62475f4213de51a25e0'
,
viewmodule
:
'Sample'
,
...
...
@@ -1776,6 +1786,17 @@ export const viewstate: any = {
'2640aa1ca02649c8831b43023d449945'
,
],
},
{
viewtag
:
'f5fd15132c21e606b626206e0081ec9d'
,
viewmodule
:
'Sample'
,
viewname
:
'IBIZOrderDetailUsr2EditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'bfdb44ab2995bfb452478242183ea4c0'
,
'26707fe400fb3e535f06015ab393793b'
,
],
},
{
viewtag
:
'f73da4cb47a88d3fe5b92716e0137741'
,
viewmodule
:
'Sample'
,
...
...
app_Web/src/widgets/app/main-menu-appmenu/main-menu-appmenu-base.vue
浏览文件 @
d063b250
...
...
@@ -623,6 +623,9 @@ export default class MainMenuBase extends Vue implements ControlInterface {
case
'Auto408'
:
this
.
clickAuto408
(
item
);
return
;
case
'AppFunc63'
:
this
.
clickAppFunc63
(
item
);
return
;
case
'Auto222'
:
this
.
clickAuto222
(
item
);
return
;
...
...
@@ -1662,6 +1665,29 @@ export default class MainMenuBase extends Vue implements ControlInterface {
})
}
/**
* 订单明细数据选择
*
* @param {*} [item={}]
* @memberof MainMenu
*/
public
clickAppFunc63
(
item
:
any
=
{})
{
const
viewparam
:
any
=
{};
Object
.
assign
(
viewparam
,
{});
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'ibizorderdetails'
,
parameterName
:
'ibizorderdetail'
},
{
pathName
:
'usr2editview'
,
parameterName
:
'usr2editview'
},
];
const
path
:
string
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
{},
deResParameters
,
parameters
,
[],
viewparam
);
if
(
Object
.
is
(
this
.
$route
.
fullPath
,
path
)){
return
;
}
this
.
$nextTick
(
function
(){
this
.
$router
.
push
(
path
);
})
}
/**
* 编辑器类型
*
...
...
app_Web/src/widgets/app/main-menu-appmenu/main-menu-appmenu-model.ts
浏览文件 @
d063b250
...
...
@@ -1911,6 +1911,25 @@ export default class MainMenuModel {
appfunctag
:
'AppFunc61'
,
resourcetag
:
''
,
authtag
:
'Web-MainMenu-menuitem143'
,
},
{
id
:
'25393E3D-100C-4CEF-BC2F-17B586F30A93'
,
name
:
'menuitem130'
,
text
:
'订单明细数据选择'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'订单明细数据选择'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'AppFunc63'
,
resourcetag
:
''
,
authtag
:
'Web-MainMenu-menuitem130'
,
},
],
},
...
...
app_Web/src/widgets/ibizorder-detail/ui-0007-2-form/ui-0007-2-form-base.vue
0 → 100644
浏览文件 @
d063b250
<
template
>
<i-form
:model=
"this.data"
class=
'app-form'
ref=
'form'
id=
'ibizorderdetail_ui_0007_2'
style=
""
@
on-validate=
"formItemValidate"
>
<input
style=
"display:none;"
/>
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-group
:uiService=
"appUIService"
:data=
"transformData(data)"
:manageContainerStatus=
"detailsModel.group1.manageContainerStatus"
:isManageContainer=
"detailsModel.group1.isManageContainer"
@
managecontainerclick=
"manageContainerClick('group1')"
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.ibizorderdetail.ui_0007_2_form.details.group1')"
:isShowCaption=
"false"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<i-col
v-show=
"detailsModel.ibizuniproductname.visible"
:style=
"
{}" :sm="{ span: 4, offset: 0 }" :md="{ span: 4, offset: 0 }" :lg="{ span: 4, offset: 0 }">
<app-form-item
name=
'ibizuniproductname'
:itemRules=
"this.rules().ibizuniproductname"
class=
''
:caption=
"$t('entities.ibizorderdetail.ui_0007_2_form.details.ibizuniproductname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.ibizuniproductname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-picker
:formState=
"formState"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }'
:localParam ='{ }'
:disabled="detailsModel.ibizuniproductname.disabled"
name='ibizuniproductname'
deMajorField='ibizuniproductname'
deKeyField='ibizuniproduct'
valueitem='ibizuniproductid'
:value="data.ibizuniproductname"
editortype="pickup-no-ac"
:pickupView="{ viewname: 'ibizuniproduct-index-pickup-data-view', title: $t('entities.ibizuniproduct.views.indexpickupdataview.title'), deResParameters: [], parameters: [{ pathName: 'ibizuniproducts', parameterName: 'ibizuniproduct' }, { pathName: 'indexpickupdataview', parameterName: 'indexpickupdataview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange">
</app-picker>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.quantity.visible"
:style=
"
{}" :sm="{ span: 4, offset: 0 }" :md="{ span: 4, offset: 0 }" :lg="{ span: 4, offset: 0 }">
<app-form-item
name=
'quantity'
:itemRules=
"this.rules().quantity"
class=
''
:caption=
"$t('entities.ibizorderdetail.ui_0007_2_form.details.quantity')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.quantity.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.quantity"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.quantity.disabled"
type=
'number'
style=
""
>
</input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.ibizorderdetailname.visible"
:style=
"
{}" :sm="{ span: 4, offset: 0 }" :md="{ span: 4, offset: 0 }" :lg="{ span: 4, offset: 0 }">
<app-form-item
name=
'ibizorderdetailname'
:itemRules=
"this.rules().ibizorderdetailname"
class=
''
:caption=
"$t('entities.ibizorderdetail.ui_0007_2_form.details.ibizorderdetailname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.ibizorderdetailname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.ibizorderdetailname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.ibizorderdetailname.disabled"
type=
'text'
style=
""
>
</input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.orderuid.visible"
:style=
"
{}" :sm="{ span: 4, offset: 0 }" :md="{ span: 4, offset: 0 }" :lg="{ span: 4, offset: 0 }">
<app-form-item
name=
'orderuid'
:itemRules=
"this.rules().orderuid"
class=
''
:caption=
"$t('entities.ibizorderdetail.ui_0007_2_form.details.orderuid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.orderuid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'orderuid'
:value=
"data.orderuid"
dataType=
"PICKUPDATA"
:precision=
"0"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.ibizordername.visible"
:style=
"
{}" :sm="{ span: 4, offset: 0 }" :md="{ span: 4, offset: 0 }" :lg="{ span: 4, offset: 0 }">
<app-form-item
name=
'ibizordername'
:itemRules=
"this.rules().ibizordername"
class=
''
:caption=
"$t('entities.ibizorderdetail.ui_0007_2_form.details.ibizordername')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.ibizordername.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-picker
:formState=
"formState"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }'
:localParam ='{ }'
:disabled="detailsModel.ibizordername.disabled"
name='ibizordername'
deMajorField='ibizordername'
deKeyField='ibizorder'
valueitem='ibizorderid'
:value="data.ibizordername"
editortype="pickup-no-ac"
:pickupView="{ viewname: 'ibizorder-pickup-tree-view', title: $t('entities.ibizorder.views.pickuptreeview.title'), deResParameters: [], parameters: [{ pathName: 'ibizorders', parameterName: 'ibizorder' }, { pathName: 'pickuptreeview', parameterName: 'pickuptreeview' } ], placement:'' }"
style=""
@formitemvaluechange="onFormItemValueChange">
</app-picker>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.amount.visible"
:style=
"
{}" :sm="{ span: 4, offset: 0 }" :md="{ span: 4, offset: 0 }" :lg="{ span: 4, offset: 0 }">
<app-form-item
name=
'amount'
:itemRules=
"this.rules().amount"
class=
''
:caption=
"$t('entities.ibizorderdetail.ui_0007_2_form.details.amount')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.amount.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'amount'
:value=
"data.amount"
dataType=
"FLOAT"
:precision=
"2"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.unit.visible"
:style=
"
{}" :sm="{ span: 4, offset: 0 }" :md="{ span: 4, offset: 0 }" :lg="{ span: 4, offset: 0 }">
<app-form-item
name=
'unit'
:itemRules=
"this.rules().unit"
class=
''
:caption=
"$t('entities.ibizorderdetail.ui_0007_2_form.details.unit')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.unit.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'unit'
:value=
"data.unit"
dataType=
"PICKUPDATA"
:precision=
"0"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.unitprice.visible"
:style=
"
{}" :sm="{ span: 4, offset: 0 }" :md="{ span: 4, offset: 0 }" :lg="{ span: 4, offset: 0 }">
<app-form-item
name=
'unitprice'
:itemRules=
"this.rules().unitprice"
class=
''
:caption=
"$t('entities.ibizorderdetail.ui_0007_2_form.details.unitprice')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.unitprice.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'unitprice'
:value=
"data.unitprice"
dataType=
"PICKUPDATA"
:precision=
"0"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</row>
</i-form>
</
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
IBIZOrderDetailService
from
'@/service/ibizorder-detail/ibizorder-detail-service'
;
import
UI_0007_2Service
from
'./ui-0007-2-form-service'
;
import
IBIZOrderDetailUIService
from
'@/uiservice/ibizorder-detail/ibizorder-detail-ui-service'
;
import
{
FormButtonModel
,
FormPageModel
,
FormItemModel
,
FormDRUIPartModel
,
FormPartModel
,
FormGroupPanelModel
,
FormIFrameModel
,
FormRowItemModel
,
FormTabPageModel
,
FormTabPanelModel
,
FormUserControlModel
}
from
'@/model/form-detail'
;
import
{
debounceTime
,
distinctUntilChanged
}
from
'rxjs/operators'
;
import
schema
from
'async-validator'
;
import
{
Environment
}
from
'@/environments/environment'
;
@
Component
({
components
:
{
}
})
export
default
class
UI_0007_2Base
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof UI_0007_2Base
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof UI_0007_2Base
*/
public
getControlType
():
string
{
return
'FORM'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof UI_0007_2Base
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {UI_0007_2Service}
* @memberof UI_0007_2Base
*/
public
service
:
UI_0007_2Service
=
new
UI_0007_2Service
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZOrderDetailService}
* @memberof UI_0007_2Base
*/
public
appEntityService
:
IBIZOrderDetailService
=
new
IBIZOrderDetailService
({
$store
:
this
.
$store
});
/**
* 转化数据
*
* @param {any} args
* @memberof UI_0007_2Base
*/
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 UI_0007_2Base
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof UI_0007_2Base
*/
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 {string}
* @memberof UI_0007_2Base
*/
@
Inject
({
from
:
'navModel'
,
default
:
'tab'
})
public
navModel
!
:
string
;
/**
* 主键表单项名称
*
* @protected
* @type {string}
* @memberof UI_0007_2Base
*/
public
formKeyItemName
:
string
=
''
;
/**
* 是否自动加载
*
* @type {boolean}
* @memberof UI_0007_2Base
*/
@
Prop
({
default
:
false
})
public
isautoload
?:
boolean
;
/**
* 界面UI服务对象
*
* @type {IBIZOrderDetailUIService}
* @memberof UI_0007_2Base
*/
public
appUIService
:
IBIZOrderDetailUIService
=
new
IBIZOrderDetailUIService
(
this
.
$store
);
/**
* 工作流审批意见控件绑定值
*
* @memberof UI_0007_2Base
*/
public
srfwfmemo
:
string
=
""
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof UI_0007_2Base
*/
public
getDatas
():
any
[]
{
return
[
this
.
data
];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof UI_0007_2Base
*/
public
getData
():
any
{
return
this
.
data
;
}
/**
* 是否默认保存
*
* @type {boolean}
* @memberof UI_0007_2Base
*/
@
Prop
({
default
:
false
})
public
autosave
?:
boolean
;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof UI_0007_2Base
*/
@
Prop
({
default
:
true
})
public
showBusyIndicator
?:
boolean
;
/**
* 部件行为--submit
*
* @type {string}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
WFSubmitAction
!
:
string
;
/**
* 部件行为--start
*
* @type {string}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
WFStartAction
!
:
string
;
/**
* 部件行为--update
*
* @type {string}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
updateAction
!
:
string
;
/**
* 部件行为--remove
*
* @type {string}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
removeAction
!
:
string
;
/**
* 部件行为--loaddraft
*
* @type {string}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
loaddraftAction
!
:
string
;
/**
* 部件行为--load
*
* @type {string}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
loadAction
!
:
string
;
/**
* 部件行为--create
*
* @type {string}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
createAction
!
:
string
;
/**
* 部件行为--create
*
* @type {string}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
searchAction
!
:
string
;
/**
* 视图标识
*
* @type {string}
* @memberof UI_0007_2Base
*/
@
Prop
()
public
viewtag
!
:
string
;
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof UI_0007_2Base
*/
public
formState
:
Subject
<
any
>
=
new
Subject
();
/**
* 忽略表单项值变化
*
* @type {boolean}
* @memberof UI_0007_2Base
*/
public
ignorefieldvaluechange
:
boolean
=
false
;
/**
* 数据变化
*
* @public
* @type {Subject<any>}
* @memberof UI_0007_2Base
*/
public
dataChang
:
Subject
<
any
>
=
new
Subject
();
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof UI_0007_2Base
*/
public
dataChangEvent
:
Subscription
|
undefined
;
/**
* 原始数据
*
* @public
* @type {*}
* @memberof UI_0007_2Base
*/
public
oldData
:
any
=
{};
/**
* 混入表单数据对象
*
* @type {*}
* @memberof UI_0007_2Base
*/
public
mixinData
:
any
=
{};
/**
* 表单项校验错误提示信息
*
* @memberof UI_0007_2Base
*/
public
errorMessages
:
Array
<
any
>
=
[];
/**
* 设置表单项错误提示信息
*
* @param {*} prop 表单项字段名
* @param {*} status 校验状态
* @param {*} error 错误信息
* @memberof UI_0007_2Base
*/
public
formItemValidate
(
prop
:
string
,
status
:
boolean
,
error
:
string
){
error
=
error
?
error
:
''
;
if
(
this
.
errorMessages
&&
this
.
errorMessages
.
length
>
0
){
const
index
=
this
.
errorMessages
.
findIndex
((
errorMessage
:
any
)
=>
Object
.
is
(
errorMessage
.
prop
,
prop
));
if
(
index
!=
-
1
){
this
.
errorMessages
[
index
].
error
=
error
;
}
else
{
this
.
errorMessages
.
push
({
prop
:
prop
,
error
:
error
});
}
}
else
{
this
.
errorMessages
.
push
({
prop
:
prop
,
error
:
error
});
}
}
/**
* 表单数据对象
*
* @type {*}
* @memberof UI_0007_2Base
*/
public
data
:
any
=
{
srfupdatedate
:
null
,
srforikey
:
null
,
srfkey
:
null
,
srfmajortext
:
null
,
srftempmode
:
null
,
srfuf
:
null
,
srfdeid
:
null
,
srfsourcekey
:
null
,
ibizuniproductname
:
null
,
quantity
:
null
,
ibizorderdetailname
:
null
,
ibizorderdetailid
:
null
,
orderuid
:
null
,
ibizorderid
:
null
,
ibizordername
:
null
,
amount
:
null
,
unit
:
null
,
unitprice
:
null
,
ibizuniproductid
:
null
,
ibizorderdetail
:
null
,
};
/**
* 当前执行的行为逻辑
*
* @type {string}
* @memberof UI_0007_2Base
*/
public
currentAction
:
string
=
""
;
/**
* 关系界面计数器
*
* @type {number}
* @memberof UI_0007_2Base
*/
public
drcounter
:
number
=
0
;
/**
* 需要等待关系界面保存时,第一次调用save参数的备份
*
* @type {number}
* @memberof UI_0007_2Base
*/
public
drsaveopt
:
any
=
{};
/**
* 表单保存回调存储对象
*
* @type {any}
* @memberof UI_0007_2Base
*/
public
saveState
:
any
;
/**
* 主信息属性映射表单项名称
*
* @type {string}
* @memberof UI_0007_2Base
*/
public
majorMessageField
:
string
=
"ibizorderdetailname"
;
/**
* 值规则
*
* @type {*}
* @memberof UI_0007_2Base
*/
public
rules
()
:
any
{
return
{
ibizuniproductname
:
[
{
required
:
this
.
detailsModel
.
ibizuniproductname
.
required
,
type
:
'string'
,
message
:
'产品名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
ibizuniproductname
.
required
,
type
:
'string'
,
message
:
'产品名称 值不能为空'
,
trigger
:
'blur'
},
],
quantity
:
[
{
required
:
this
.
detailsModel
.
quantity
.
required
,
type
:
'number'
,
message
:
'数量 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
quantity
.
required
,
type
:
'number'
,
message
:
'数量 值不能为空'
,
trigger
:
'blur'
},
],
ibizorderdetailname
:
[
{
required
:
this
.
detailsModel
.
ibizorderdetailname
.
required
,
type
:
'string'
,
message
:
'订单明细名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
ibizorderdetailname
.
required
,
type
:
'string'
,
message
:
'订单明细名称 值不能为空'
,
trigger
:
'blur'
},
],
orderuid
:
[
{
required
:
this
.
detailsModel
.
orderuid
.
required
,
type
:
'string'
,
message
:
'订单编号 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
orderuid
.
required
,
type
:
'string'
,
message
:
'订单编号 值不能为空'
,
trigger
:
'blur'
},
],
ibizordername
:
[
{
required
:
this
.
detailsModel
.
ibizordername
.
required
,
type
:
'string'
,
message
:
'订单名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
ibizordername
.
required
,
type
:
'string'
,
message
:
'订单名称 值不能为空'
,
trigger
:
'blur'
},
],
amount
:
[
{
required
:
this
.
detailsModel
.
amount
.
required
,
type
:
'number'
,
message
:
'小计 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
amount
.
required
,
type
:
'number'
,
message
:
'小计 值不能为空'
,
trigger
:
'blur'
},
],
unit
:
[
{
required
:
this
.
detailsModel
.
unit
.
required
,
type
:
'string'
,
message
:
'单位 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
unit
.
required
,
type
:
'string'
,
message
:
'单位 值不能为空'
,
trigger
:
'blur'
},
],
unitprice
:
[
{
required
:
this
.
detailsModel
.
unitprice
.
required
,
type
:
'number'
,
message
:
'单价 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
unitprice
.
required
,
type
:
'number'
,
message
:
'单价 值不能为空'
,
trigger
:
'blur'
},
],
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof UI_0007_2Base
*/
public
deRules
:
any
=
{
};
/**
* 校验属性值规则
*
* @public
* @param {{ name: string }} { name }
* @memberof UI_0007_2Base
*/
public
verifyDeRules
(
name
:
string
,
rule
:
any
=
this
.
deRules
,
op
:
string
=
"AND"
)
:{
isPast
:
boolean
,
infoMessage
:
string
}{
let
falg
:
any
=
{
infoMessage
:
""
};
if
(
!
rule
[
name
]){
return
falg
;
}
let
opValue
=
op
==
'AND'
?
true
:
false
;
let
startOp
=
(
val
:
boolean
)
=>
{
if
(
falg
.
isPast
){
if
(
opValue
){
falg
.
isPast
=
falg
.
isPast
&&
val
;
}
else
{
falg
.
isPast
=
falg
.
isPast
||
val
;
}
}
else
{
falg
.
isPast
=
val
;
}
}
for
(
let
i
=
0
;
i
<
rule
[
name
].
length
;
i
++
){
let
item
:
any
=
rule
[
name
][
i
];
let
dataValue
=
item
.
deName
?
this
.
data
[
this
.
service
.
getItemNameByDeName
(
item
.
deName
)]:
""
;
item
.
ruleInfo
=
item
.
ruleInfo
?
item
.
ruleInfo
:
this
.
$t
(
'app.formpage.valuecheckex'
);
if
((
dataValue
===
null
||
dataValue
===
undefined
||
dataValue
===
""
)
&&
(
item
.
type
!=
'GROUP'
)){
startOp
(
true
);
return
falg
;
}
try
{
// 常规规则
if
(
item
.
type
==
'SIMPLE'
){
startOp
(
!
this
.
$verify
.
checkFieldSimpleRule
(
dataValue
,
item
.
condOP
,
item
.
paramValue
,
item
.
ruleInfo
,
item
.
paramType
,
this
.
data
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
// 数值范围
if
(
item
.
type
==
'VALUERANGE2'
){
startOp
(
!
this
.
$verify
.
checkFieldValueRangeRule
(
dataValue
,
item
.
minValue
,
item
.
isIncludeMinValue
,
item
.
maxValue
,
item
.
isIncludeMaxValue
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
// 正则式
if
(
item
.
type
==
"REGEX"
)
{
startOp
(
!
this
.
$verify
.
checkFieldRegExRule
(
dataValue
,
item
.
regExCode
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
// 长度
if
(
item
.
type
==
"STRINGLENGTH"
)
{
startOp
(
!
this
.
$verify
.
checkFieldStringLengthRule
(
dataValue
,
item
.
minValue
,
item
.
isIncludeMinValue
,
item
.
maxValue
,
item
.
isIncludeMaxValue
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
// 系统值规则
if
(
item
.
type
==
"SYSVALUERULE"
)
{
startOp
(
!
this
.
$verify
.
checkFieldSysValueRule
(
dataValue
,
item
.
sysRule
.
regExCode
,
item
.
ruleInfo
,
item
.
isKeyCond
));
falg
.
infoMessage
=
item
.
ruleInfo
;
if
(
!
falg
.
isPast
)
return
falg
;
}
}
catch
(
error
)
{
falg
.
infoMessage
=
item
.
ruleInfo
;
startOp
(
false
);
if
(
!
falg
.
isPast
)
return
falg
;
}
// 分组
if
(
item
.
type
==
'GROUP'
){
falg
=
this
.
verifyDeRules
(
'group'
,
item
,
item
.
condOP
?
item
.
condOP
:
"AND"
);
if
(
item
.
isNotMode
){
falg
.
isPast
=
!
falg
.
isPast
;
}
if
(
!
falg
.
isPast
)
return
falg
;
}
}
if
(
!
falg
.
hasOwnProperty
(
"isPast"
)){
falg
.
isPast
=
true
;
}
if
(
!
this
.
data
[
name
]
&&
this
.
data
[
name
]
!=
0
){
falg
.
isPast
=
true
;
}
return
falg
;
}
/**
* 详情模型集合
*
* @type {*}
* @memberof UI_0007_2Base
*/
public
detailsModel
:
any
=
{
group1
:
new
FormGroupPanelModel
({
caption
:
'订单明细基本信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
false
,
form
:
this
,
isControlledContent
:
false
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.ibizorderdetail.ui_0007_2_form'
,
extractMode
:
'ITEM'
,
details
:
[]
},
isManageContainer
:
false
,
showMoreModeItems
:
[]
})
,
formpage1
:
new
FormPageModel
({
caption
:
'基本信息'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
})
,
srfupdatedate
:
new
FormItemModel
({
caption
:
'更新时间'
,
detailType
:
'FORMITEM'
,
name
:
'srfupdatedate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
srforikey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srforikey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
srfkey
:
new
FormItemModel
({
caption
:
'订单明细标识'
,
detailType
:
'FORMITEM'
,
name
:
'srfkey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
srfmajortext
:
new
FormItemModel
({
caption
:
'订单明细名称'
,
detailType
:
'FORMITEM'
,
name
:
'srfmajortext'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
srftempmode
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srftempmode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
srfuf
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfuf'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
srfdeid
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfdeid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
srfsourcekey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfsourcekey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
ibizuniproductname
:
new
FormItemModel
({
caption
:
'产品名称'
,
detailType
:
'FORMITEM'
,
name
:
'ibizuniproductname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
quantity
:
new
FormItemModel
({
caption
:
'数量'
,
detailType
:
'FORMITEM'
,
name
:
'quantity'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
ibizorderdetailname
:
new
FormItemModel
({
caption
:
'订单明细名称'
,
detailType
:
'FORMITEM'
,
name
:
'ibizorderdetailname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
ibizorderdetailid
:
new
FormItemModel
({
caption
:
'订单明细标识'
,
detailType
:
'FORMITEM'
,
name
:
'ibizorderdetailid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
orderuid
:
new
FormItemModel
({
caption
:
'订单编号'
,
detailType
:
'FORMITEM'
,
name
:
'orderuid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
ibizorderid
:
new
FormItemModel
({
caption
:
'订单标识'
,
detailType
:
'FORMITEM'
,
name
:
'ibizorderid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
ibizordername
:
new
FormItemModel
({
caption
:
'订单名称'
,
detailType
:
'FORMITEM'
,
name
:
'ibizordername'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
amount
:
new
FormItemModel
({
caption
:
'小计'
,
detailType
:
'FORMITEM'
,
name
:
'amount'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
unit
:
new
FormItemModel
({
caption
:
'单位'
,
detailType
:
'FORMITEM'
,
name
:
'unit'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
unitprice
:
new
FormItemModel
({
caption
:
'单价'
,
detailType
:
'FORMITEM'
,
name
:
'unitprice'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
ibizuniproductid
:
new
FormItemModel
({
caption
:
'统一产品标识'
,
detailType
:
'FORMITEM'
,
name
:
'ibizuniproductid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
isControlledContent
:
false
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
};
/**
* 监控表单属性 srfupdatedate 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.srfupdatedate'
)
onSrfupdatedateChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfupdatedate'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srforikey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.srforikey'
)
onSrforikeyChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srforikey'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srfkey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.srfkey'
)
onSrfkeyChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfkey'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srfmajortext 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.srfmajortext'
)
onSrfmajortextChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfmajortext'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srftempmode 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.srftempmode'
)
onSrftempmodeChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srftempmode'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srfuf 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.srfuf'
)
onSrfufChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfuf'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srfdeid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.srfdeid'
)
onSrfdeidChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfdeid'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srfsourcekey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.srfsourcekey'
)
onSrfsourcekeyChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfsourcekey'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 ibizuniproductname 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.ibizuniproductname'
)
onIbizuniproductnameChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'ibizuniproductname'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 quantity 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.quantity'
)
onQuantityChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'quantity'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 ibizorderdetailname 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.ibizorderdetailname'
)
onIbizorderdetailnameChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'ibizorderdetailname'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 ibizorderdetailid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.ibizorderdetailid'
)
onIbizorderdetailidChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'ibizorderdetailid'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 orderuid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.orderuid'
)
onOrderuidChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'orderuid'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 ibizorderid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.ibizorderid'
)
onIbizorderidChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'ibizorderid'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 ibizordername 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.ibizordername'
)
onIbizordernameChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'ibizordername'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 amount 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.amount'
)
onAmountChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'amount'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 unit 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.unit'
)
onUnitChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'unit'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 unitprice 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.unitprice'
)
onUnitpriceChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'unitprice'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 ibizuniproductid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof UI_0007_2Base
*/
@
Watch
(
'data.ibizuniproductid'
)
onIbizuniproductidChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'ibizuniproductid'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 显示更多模式切换操作
*
* @type {string}
* @memberof UI_0007_2Base
*/
public
manageContainerClick
(
name
:
string
){
let
model
=
this
.
detailsModel
[
name
];
if
(
model
.
isManageContainer
){
model
.
setManageContainerStatus
(
!
model
.
manageContainerStatus
);
model
.
showMoreModeItems
.
forEach
((
item
:
any
)
=>
{
if
(
this
.
detailsModel
[
item
].
isControlledContent
){
this
.
detailsModel
[
item
].
setVisible
(
model
.
manageContainerStatus
?
this
.
detailsModel
[
item
].
oldVisible
:
false
);
}
});
}
}
/**
* 重置表单项值
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof UI_0007_2Base
*/
public
resetFormData
({
name
,
newVal
,
oldVal
}:
{
name
:
string
,
newVal
:
any
,
oldVal
:
any
}):
void
{
if
(
Object
.
is
(
name
,
'IBIZuniproductname'
))
{
this
.
onFormItemValueChange
({
name
:
'quantity'
,
value
:
null
});
}
}
/**
* 置空对象
*
* @param {any[]} args
* @memberof UI_0007_2Base
*/
public
ResetData
(
_datas
:
any
){
if
(
Object
.
keys
(
_datas
).
length
>
0
){
Object
.
keys
(
_datas
).
forEach
((
name
:
string
)
=>
{
if
(
this
.
data
.
hasOwnProperty
(
name
))
{
this
.
data
[
name
]
=
null
;
}
});
}
}
/**
* 表单逻辑
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof UI_0007_2Base
*/
public
async
formLogic
({
name
,
newVal
,
oldVal
}:
{
name
:
string
,
newVal
:
any
,
oldVal
:
any
}){
if
(
Object
.
is
(
name
,
'ibizuniproductname'
)){
const
details
:
string
[]
=
[
'unitprice'
,
'unit'
];
if
(
await
this
.
checkItem
(
'ibizuniproductname'
)){
this
.
updateFormItems
(
'GetUnitAndPrice'
,
this
.
data
,
details
,
true
);
}
}
if
(
Object
.
is
(
name
,
'quantity'
)){
const
details
:
string
[]
=
[
'amount'
];
if
(
await
this
.
checkItem
(
'quantity'
)){
this
.
updateFormItems
(
'CountMoney'
,
this
.
data
,
details
,
true
);
}
}
}
/**
* 表单项检查逻辑
*
* @public
* @param name 属性名
* @memberof UI_0007_2Base
*/
public
checkItem
(
name
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
validator
=
new
schema
({[
name
]:
this
.
rules
()[
name
]});
validator
.
validate
({[
name
]:
this
.
data
[
name
]}).
then
(()
=>
{
resolve
(
true
);
})
.
catch
(()
=>
{
resolve
(
false
);
});;
})
}
/**
* 表单值变化
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @returns {void}
* @memberof UI_0007_2Base
*/
public
formDataChange
({
name
,
newVal
,
oldVal
}:
{
name
:
string
,
newVal
:
any
,
oldVal
:
any
}):
void
{
if
(
this
.
ignorefieldvaluechange
)
{
return
;
}
this
.
resetFormData
({
name
:
name
,
newVal
:
newVal
,
oldVal
:
oldVal
});
this
.
formLogic
({
name
:
name
,
newVal
:
newVal
,
oldVal
:
oldVal
});
this
.
dataChang
.
next
(
JSON
.
stringify
(
this
.
data
));
}
/**
* 表单加载完成
*
* @public
* @param {*} [data={}]
* @param {string} [action]
* @memberof UI_0007_2Base
*/
public
onFormLoad
(
data
:
any
=
{},
action
:
string
):
void
{
if
(
Object
.
is
(
action
,
"save"
)
||
Object
.
is
(
action
,
"autoSave"
)
||
Object
.
is
(
action
,
"submit"
))
// 更新context的实体主键
if
(
data
.
ibizorderdetail
){
Object
.
assign
(
this
.
context
,{
ibizorderdetail
:
data
.
ibizorderdetail
})
}
this
.
setFormEnableCond
(
data
);
this
.
computeButtonState
(
data
);
this
.
fillForm
(
data
,
action
);
this
.
oldData
=
{};
Object
.
assign
(
this
.
oldData
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
)));
this
.
$store
.
commit
(
'viewaction/setViewDataChange'
,
{
viewtag
:
this
.
viewtag
,
viewdatachange
:
false
});
this
.
formLogic
({
name
:
''
,
newVal
:
null
,
oldVal
:
null
});
}
/**
* 值填充
*
* @param {*} [_datas={}]
* @param {string} [action]
* @memberof UI_0007_2Base
*/
public
fillForm
(
_datas
:
any
=
{},
action
:
string
):
void
{
this
.
mixinData
=
_datas
;
this
.
ignorefieldvaluechange
=
true
;
Object
.
keys
(
_datas
).
forEach
((
name
:
string
)
=>
{
if
(
this
.
data
.
hasOwnProperty
(
name
))
{
this
.
data
[
name
]
=
_datas
[
name
];
}
});
if
(
Object
.
is
(
action
,
'loadDraft'
)){
this
.
createDefault
();
}
if
(
Object
.
is
(
action
,
'load'
)){
this
.
updateDefault
();
}
this
.
$nextTick
(
function
()
{
this
.
ignorefieldvaluechange
=
false
;
})
}
/**
* 设置表单项是否启用
*
* @public
* @param {*} data
* @memberof UI_0007_2Base
*/
public
setFormEnableCond
(
data
:
any
):
void
{
Object
.
values
(
this
.
detailsModel
).
forEach
((
detail
:
any
)
=>
{
if
(
!
Object
.
is
(
detail
.
detailType
,
'FORMITEM'
))
{
return
;
}
const
formItem
:
FormItemModel
=
detail
;
formItem
.
setEnableCond
(
data
.
srfuf
);
});
}
/**
* 重置草稿表单状态
*
* @public
* @memberof UI_0007_2Base
*/
public
resetDraftFormStates
():
void
{
const
form
:
any
=
this
.
$refs
.
form
;
if
(
form
)
{
form
.
resetFields
();
}
}
/**
* 重置校验结果
*
* @memberof UI_0007_2Base
*/
public
resetValidates
():
void
{
Object
.
values
(
this
.
detailsModel
).
forEach
((
detail
:
any
)
=>
{
if
(
!
Object
.
is
(
detail
.
detailType
,
'FORMITEM'
))
{
return
;
}
const
formItem
:
FormItemModel
=
detail
;
formItem
.
setError
(
''
);
});
}
/**
* 填充校验结果 (后台)
*
* @param {any[]} fieldErrors
* @memberof UI_0007_2Base
*/
public
fillValidates
(
fieldErrors
:
any
[]):
void
{
fieldErrors
.
forEach
((
error
:
any
)
=>
{
const
formItem
:
FormItemModel
=
this
.
detailsModel
[
error
.
field
];
if
(
!
formItem
)
{
return
;
}
this
.
$nextTick
(()
=>
{
formItem
.
setError
(
error
.
message
);
});
});
}
/**
* 表单校验状态
*
* @returns {boolean}
* @memberof UI_0007_2Base
*/
public
formValidateStatus
():
boolean
{
const
form
:
any
=
this
.
$refs
.
form
;
let
validatestate
:
boolean
=
true
;
form
.
validate
((
valid
:
boolean
)
=>
{
validatestate
=
valid
?
true
:
false
;
});
return
validatestate
}
/**
* 获取全部值
*
* @returns {*}
* @memberof UI_0007_2Base
*/
public
getValues
():
any
{
return
this
.
data
;
}
/**
* 表单项值变更
*
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof UI_0007_2Base
*/
public
onFormItemValueChange
(
$event
:
{
name
:
string
,
value
:
any
}):
void
{
if
(
!
$event
)
{
return
;
}
if
(
!
$event
.
name
||
Object
.
is
(
$event
.
name
,
''
)
||
!
this
.
data
.
hasOwnProperty
(
$event
.
name
))
{
return
;
}
this
.
data
[
$event
.
name
]
=
$event
.
value
;
}
/**
* 编辑器行为触发
*
* @param {*} arg
* @returns {void}
* @memberof UI_0007_2Base
*/
public
onFormItemActionClick
(
arg
:
any
){
if
(
arg
&&
(
arg
instanceof
Function
))
arg
();
}
/**
* 设置数据项值
*
* @param {string} name
* @param {*} value
* @returns {void}
* @memberof UI_0007_2Base
*/
public
setDataItemValue
(
name
:
string
,
value
:
any
):
void
{
if
(
!
name
||
Object
.
is
(
name
,
''
)
||
!
this
.
data
.
hasOwnProperty
(
name
))
{
return
;
}
if
(
Object
.
is
(
this
.
data
[
name
],
value
))
{
return
;
}
this
.
data
[
name
]
=
value
;
}
/**
* 计算表单按钮权限状态
*
* @param {*} [data] 传入数据
* @memberof UI_0007_2Base
*/
public
computeButtonState
(
data
:
any
){
let
targetData
:
any
=
this
.
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
].
detailType
,
"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
.
detailsModel
[
name
].
visible
=
tempUIAction
.
visabled
;
this
.
detailsModel
[
name
].
disabled
=
tempUIAction
.
disabled
;
this
.
detailsModel
[
name
].
isPower
=
result
[
0
]
===
1
?
true
:
false
;
}
})
}
}
/**
* 分组界面行为事件
*
* @param {*} $event
* @memberof UI_0007_2Base
*/
public
groupUIActionClick
(
$event
:
any
):
void
{
if
(
!
$event
)
{
return
;
}
const
item
:
any
=
$event
.
item
;
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof UI_0007_2Base
*/
public
created
():
void
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof UI_0007_2Base
*/
public
afterCreated
(){
if
(
this
.
isautoload
){
this
.
autoLoad
({
srfkey
:
this
.
context
.
documentcenter
});
}
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
if
(
Object
.
is
(
'autoload'
,
action
))
{
this
.
autoLoad
(
data
);
}
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
load
(
data
);
}
if
(
Object
.
is
(
'loaddraft'
,
action
))
{
this
.
loadDraft
(
data
);
}
if
(
Object
.
is
(
'save'
,
action
))
{
this
.
save
(
data
,
data
.
showResultInfo
);
}
if
(
Object
.
is
(
'remove'
,
action
))
{
this
.
remove
(
data
);
}
if
(
Object
.
is
(
'saveandexit'
,
action
))
{
this
.
saveAndExit
(
data
);
}
if
(
Object
.
is
(
'saveandnew'
,
action
))
{
this
.
saveAndNew
(
data
);
}
if
(
Object
.
is
(
'removeandexit'
,
action
))
{
this
.
removeAndExit
(
data
);
}
if
(
Object
.
is
(
'refresh'
,
action
))
{
this
.
refresh
(
data
);
}
if
(
Object
.
is
(
'panelaction'
,
action
))
{
this
.
panelAction
(
data
.
action
,
data
.
emitAction
,
data
.
data
);
}
});
}
this
.
dataChang
.
pipe
(
debounceTime
(
300
),
distinctUntilChanged
()
).
subscribe
((
data
:
any
)
=>
{
if
(
this
.
autosave
)
{
this
.
autoSave
();
}
const
state
=
!
Object
.
is
(
JSON
.
stringify
(
this
.
oldData
),
JSON
.
stringify
(
this
.
data
))
?
true
:
false
;
this
.
$store
.
commit
(
'viewaction/setViewDataChange'
,
{
viewtag
:
this
.
viewtag
,
viewdatachange
:
state
});
});
}
/**
* vue 生命周期
*
* @memberof UI_0007_2Base
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof UI_0007_2Base
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
if
(
this
.
dataChangEvent
)
{
this
.
dataChangEvent
.
unsubscribe
();
}
}
/**
*打印
*@memberof @memberof UI_0007_2Base
*/
public
print
(){
let
_this
:
any
=
this
;
_this
.
$print
({
id
:
'ibizorderdetail_ui_0007_2'
,
popTitle
:
'数据选择'
});
}
/**
* 部件刷新
*
* @param {any} args
* @memberof UI_0007_2Base
*/
public
refresh
(
args
?:
any
):
void
{
let
arg
:
any
=
{};
Object
.
assign
(
arg
,
args
?
args
[
0
]:{});
if
(
this
.
data
.
srfkey
&&
!
Object
.
is
(
this
.
data
.
srfkey
,
''
))
{
Object
.
assign
(
arg
,
{
srfkey
:
this
.
data
.
srfkey
});
this
.
load
(
arg
);
return
;
}
if
(
this
.
data
.
srfkeys
&&
!
Object
.
is
(
this
.
data
.
srfkeys
,
''
))
{
Object
.
assign
(
arg
,
{
srfkey
:
this
.
data
.
srfkeys
});
this
.
load
(
arg
);
return
;
}
}
/**
* 自动加载
*
* @param {*} [arg={}]
* @returns {void}
* @memberof UI_0007_2Base
*/
public
autoLoad
(
arg
:
any
=
{}):
void
{
if
(
arg
.
srfkey
&&
!
Object
.
is
(
arg
.
srfkey
,
''
))
{
Object
.
assign
(
arg
,
{
srfkey
:
arg
.
srfkey
});
this
.
load
(
arg
);
return
;
}
if
(
arg
.
srfkeys
&&
!
Object
.
is
(
arg
.
srfkeys
,
''
))
{
Object
.
assign
(
arg
,
{
srfkey
:
arg
.
srfkeys
});
this
.
load
(
arg
);
return
;
}
this
.
loadDraft
(
arg
);
}
/**
* 加载
*
* @public
* @param {*} [opt={}]
* @memberof UI_0007_2Base
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailUsr2EditView'
+
(
this
.
$t
(
'app.formpage.notconfig.loadaction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
};
let
viewparamResult
:
any
=
Object
.
assign
(
arg
,
this
.
viewparams
);
const
get
:
Promise
<
any
>
=
this
.
service
.
get
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),{
viewparams
:
viewparamResult
},
this
.
showBusyIndicator
);
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'load'
);
this
.
$emit
(
'load'
,
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
});
}
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
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
)
});
return
;
}
});
}
/**
* 加载草稿
*
* @param {*} [opt={}]
* @memberof UI_0007_2Base
*/
public
loadDraft
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailUsr2EditView'
+
(
this
.
$t
(
'app.formpage.notconfig.loaddraftaction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
{
...
opt
}
;
let
viewparamResult
:
any
=
Object
.
assign
(
arg
,
this
.
viewparams
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),{
viewparams
:
viewparamResult
},
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
const
data
=
response
.
data
;
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
,
'loadDraft'
);
data
.
ibizorderdetail
=
null
;
this
.
$emit
(
'load'
,
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
});
setTimeout
(()
=>
{
const
form
:
any
=
this
.
$refs
.
form
;
if
(
form
)
{
form
.
fields
.
forEach
((
field
:
any
)
=>
{
field
.
validateMessage
=
""
;
field
.
validateState
=
""
;
field
.
validateStatus
=
false
;
});
}
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
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
)
});
return
;
}
});
}
/**
* 自动保存
*
* @param {*} [opt={}]
* @memberof UI_0007_2Base
*/
public
autoSave
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
formValidateStatus
())
{
return
;
}
const
arg
:
any
=
{
...
opt
};
const
data
=
this
.
getValues
();
Object
.
assign
(
arg
,
data
);
Object
.
assign
(
arg
,{
srfmajortext
:
data
[
this
.
majorMessageField
]});
const
action
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)
?
this
.
updateAction
:
this
.
createAction
;
if
(
!
action
){
let
actionName
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)?
"updateAction"
:
"createAction"
;
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailUsr2EditView'
+
(
this
.
$t
(
'app.formpage.notconfig.actionname'
)
as
string
)
});
return
;
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
add
(
action
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'autoSave'
);
this
.
$emit
(
'save'
,
data
);
AppCenterService
.
notifyMessage
({
name
:
"IBIZOrderDetail"
,
action
:
'appRefresh'
,
data
:
data
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
data
});
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
if
(
response
.
data
.
errorKey
)
{
if
(
Object
.
is
(
response
.
data
.
errorKey
,
"versionCheck"
))
{
this
.
$Modal
.
confirm
({
title
:
(
this
.
$t
(
'app.formpage.saveerror'
)
as
string
),
content
:
(
this
.
$t
(
'app.formpage.savecontent'
)
as
string
),
onOk
:
()
=>
{
this
.
refresh
([]);
},
onCancel
:
()
=>
{
}
});
}
else
if
(
Object
.
is
(
response
.
data
.
errorKey
,
'DupCheck'
))
{
let
errorProp
:
string
=
response
.
data
.
message
.
match
(
/
\[[
a-zA-Z
]
*
\]
/
)[
0
];
let
name
:
string
=
this
.
service
.
getNameByProp
(
errorProp
.
substr
(
1
,
errorProp
.
length
-
2
));
if
(
name
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.createFailed'
)
as
string
),
desc
:
this
.
detailsModel
[
name
].
caption
+
" : "
+
arg
[
name
]
+
(
this
.
$t
(
'app.commonWords.isExist'
)
as
string
)
+
'!'
,
});
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.createFailed'
)
as
string
),
desc
:
response
.
data
.
message
?
response
.
data
.
message
:(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
),
})
}
}
else
if
(
Object
.
is
(
response
.
data
.
errorKey
,
'DuplicateKeyException'
)){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.createFailed'
)
as
string
),
desc
:
this
.
detailsModel
[
this
.
formKeyItemName
].
caption
+
" : "
+
arg
[
this
.
formKeyItemName
]
+
(
this
.
$t
(
'app.commonWords.isExist'
)
as
string
)
+
'!'
,
});
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
?
response
.
data
.
message
:(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
}
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
?
response
.
data
.
message
:(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
}
return
;
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
}
});
}
/**
* 保存
*
* @param {*} [opt={}]
* @param {boolean} [showResultInfo]
* @param {boolean} [ifStateNext] formState是否下发通知
* @returns {Promise<any>}
* @memberof UI_0007_2Base
*/
public
async
save
(
opt
:
any
=
{},
showResultInfo
?:
boolean
,
ifStateNext
:
boolean
=
true
):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
showResultInfo
=
showResultInfo
===
undefined
?
true
:
false
;
if
(
!
this
.
formValidateStatus
())
{
if
(
this
.
errorMessages
&&
this
.
errorMessages
.
length
>
0
)
{
let
descMessage
:
string
=
''
;
this
.
errorMessages
.
forEach
((
message
:
any
)
=>
{
descMessage
=
descMessage
+
'<p>'
+
message
.
error
+
'<p>'
;
})
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
descMessage
});
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.formpage.valuecheckex'
)
as
string
)
});
}
return
;
}
const
arg
:
any
=
{
...
opt
};
const
data
=
this
.
getValues
();
Object
.
assign
(
arg
,
this
.
context
);
Object
.
assign
(
arg
,
data
);
Object
.
assign
(
arg
,{
srfmajortext
:
data
[
this
.
majorMessageField
]});
if
(
ifStateNext
)
{
this
.
drcounter
=
0
;
if
(
this
.
drcounter
!==
0
){
this
.
drsaveopt
=
opt
;
this
.
formState
.
next
({
type
:
'beforesave'
,
data
:
arg
});
//先通知关系界面保存
this
.
saveState
=
resolve
;
return
;
}
}
if
(
this
.
viewparams
&&
this
.
viewparams
.
copymode
){
data
.
srfuf
=
'0'
;
}
const
action
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)
?
this
.
updateAction
:
this
.
createAction
;
if
(
!
action
){
let
actionName
:
any
=
Object
.
is
(
data
.
srfuf
,
'1'
)?
"updateAction"
:
"createAction"
;
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailUsr2EditView'
+
(
this
.
$t
(
'app.formpage.notconfig.actionname'
)
as
string
)
});
return
;
}
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
const
post
:
Promise
<
any
>
=
Object
.
is
(
data
.
srfuf
,
'1'
)?
this
.
service
.
update
(
action
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
):
this
.
service
.
add
(
action
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
this
.
viewparams
.
copymode
=
false
;
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'save'
);
this
.
$emit
(
'save'
,
data
);
AppCenterService
.
notifyMessage
({
name
:
"IBIZOrderDetail"
,
action
:
'appRefresh'
,
data
:
data
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
data
});
});
if
(
showResultInfo
)
{
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
data
.
srfmajortext
?
data
.
srfmajortext
:
''
)
+
' '
+
(
this
.
$t
(
'app.formpage.savesuccess'
)
as
string
)
});
}
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
if
(
response
.
data
.
errorKey
)
{
if
(
Object
.
is
(
response
.
data
.
errorKey
,
"versionCheck"
))
{
this
.
$Modal
.
confirm
({
title
:
(
this
.
$t
(
'app.formpage.saveerror'
)
as
string
),
content
:
(
this
.
$t
(
'app.formpage.savecontent'
)
as
string
),
onOk
:
()
=>
{
this
.
refresh
([]);
},
onCancel
:
()
=>
{
}
});
}
else
if
(
Object
.
is
(
response
.
data
.
errorKey
,
'DupCheck'
))
{
let
errorProp
:
string
=
response
.
data
.
message
.
match
(
/
\[[
a-zA-Z
]
*
\]
/
)[
0
];
let
name
:
string
=
this
.
service
.
getNameByProp
(
errorProp
.
substr
(
1
,
errorProp
.
length
-
2
));
if
(
name
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.createFailed'
)
as
string
),
desc
:
this
.
detailsModel
[
name
].
caption
+
" : "
+
arg
[
name
]
+
(
this
.
$t
(
'app.commonWords.isExist'
)
as
string
)
+
'!'
,
});
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.createFailed'
)
as
string
),
desc
:
response
.
data
.
message
,
})
}
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
reject
(
response
);
}
return
;
}
else
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.commonWords.sysException'
)
as
string
)
});
reject
(
response
);
}
reject
(
response
);
});
})
}
/**
* 删除
*
* @public
* @param {*} [opt={}]
* @memberof UI_0007_2Base
*/
public
remove
(
opt
:
Array
<
any
>
=
[],
showResultInfo
?:
boolean
):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
'IBIZOrderDetailUsr2EditView'
+
(
this
.
$t
(
'app.formpage.notconfig.removeaction'
)
as
string
)
});
return
;
}
const
arg
:
any
=
opt
[
0
];
const
_this
:
any
=
this
;
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
this
.
service
.
delete
(
_this
.
removeAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
showResultInfo
).
then
((
response
:
any
)
=>
{
if
(
response
)
{
const
data
=
response
.
data
;
this
.
$emit
(
'remove'
,
data
);
this
.
formState
.
next
({
type
:
'remove'
,
data
:
data
});
this
.
data
.
ismodify
=
false
;
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
data
.
srfmajortext
?
data
.
srfmajortext
:
''
)
+
' '
+
(
this
.
$t
(
'app.formpage.deletesuccess'
)
as
string
)
});
AppCenterService
.
notifyMessage
({
name
:
"IBIZOrderDetail"
,
action
:
'appRefresh'
,
data
:
data
});
resolve
(
response
);
}
}).
catch
((
error
:
any
)
=>
{
const
{
data
:
_data
}
=
error
;
this
.
$Notice
.
error
({
title
:
_data
.
title
,
desc
:
_data
.
message
});
reject
(
error
);
});
});
}
/**
* 工作流启动
*
* @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>}
* @memberof UI_0007_2Base
*/
public
async
wfstart
(
data
:
any
,
localdata
?:
any
):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_this
:
any
=
this
;
const
formData
:
any
=
this
.
getData
();
const
copyData
:
any
=
Util
.
deepCopy
(
formData
);
const
post
:
Promise
<
any
>
=
Object
.
is
(
formData
.
srfuf
,
'1'
)?
this
.
service
.
update
(
this
.
updateAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
formData
,
this
.
showBusyIndicator
,
true
):
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
formData
,
this
.
showBusyIndicator
,
true
);
post
.
then
((
response
:
any
)
=>
{
const
responseData
:
any
=
response
.
data
;
let
tempResponseData
:
any
=
Util
.
deepCopy
(
response
);
this
.
service
.
handleResponse
(
'save'
,
tempResponseData
);
const
arg
:
any
=
tempResponseData
.
data
;
// 保存完成UI处理
this
.
onFormLoad
(
arg
,
'save'
);
this
.
$emit
(
'save'
,
arg
);
AppCenterService
.
notifyMessage
({
name
:
"IBIZOrderDetail"
,
action
:
'appRefresh'
,
data
:
data
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
arg
});
});
// 准备工作流数据,填充未存库数据
Object
.
assign
(
arg
,
copyData
);
// 准备提交参数
if
(
this
.
viewparams
){
let
copyViewParams
:
any
=
Util
.
deepCopy
(
this
.
viewparams
);
if
(
copyViewParams
.
w
){
delete
copyViewParams
.
w
;
}
Object
.
assign
(
responseData
,
copyViewParams
);
}
Object
.
assign
(
arg
,{
viewparams
:
responseData
});
// 强制补充srfwfmemo
if
(
this
.
srfwfmemo
){
Object
.
assign
(
arg
,{
srfwfmemo
:
this
.
srfwfmemo
});
}
const
result
:
Promise
<
any
>
=
this
.
service
.
wfstart
(
_this
.
WFStartAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
,
localdata
);
result
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
){
this
.
$Notice
.
error
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.formpage.workflow.starterror'
)
as
string
)
+
', '
+
response
.
data
.
message
});
}
return
;
}
this
.
$Notice
.
info
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.formpage.workflow.startsuccess'
)
as
string
)
});
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
reject
(
response
);
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
);
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
reject
(
response
);
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
);
})
});
}
/**
* 工作流提交
*
* @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>}
* @memberof UI_0007_2Base
*/
public
async
wfsubmit
(
data
:
any
,
localdata
?:
any
):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_this
:
any
=
this
;
const
arg
:
any
=
data
[
0
];
const
copyData
:
any
=
Util
.
deepCopy
(
arg
);
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
if
(
!
arg
.
ibizorderdetail
||
Object
.
is
(
arg
.
ibizorderdetail
,
''
))
{
return
;
}
const
post
:
Promise
<
any
>
=
Object
.
is
(
arg
.
srfuf
,
'1'
)?
this
.
service
.
update
(
this
.
updateAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
,
true
):
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
,
true
);
post
.
then
((
response
:
any
)
=>
{
const
responseData
:
any
=
response
.
data
;
let
tempResponseData
:
any
=
Util
.
deepCopy
(
response
);
this
.
service
.
handleResponse
(
'save'
,
tempResponseData
);
const
arg
:
any
=
tempResponseData
.
data
;
// 保存完成UI处理
this
.
onFormLoad
(
arg
,
'save'
);
this
.
$emit
(
'save'
,
arg
);
AppCenterService
.
notifyMessage
({
name
:
"IBIZOrderDetail"
,
action
:
'appRefresh'
,
data
:
data
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
arg
});
});
// 准备工作流数据,填充未存库数据
Object
.
assign
(
arg
,
copyData
);
// 准备提交参数
if
(
this
.
viewparams
){
Object
.
assign
(
responseData
,
this
.
viewparams
);
}
Object
.
assign
(
arg
,{
viewparams
:
responseData
});
// 强制补充srfwfmemo
if
(
this
.
srfwfmemo
){
Object
.
assign
(
arg
,{
srfwfmemo
:
this
.
srfwfmemo
});
}
const
result
:
Promise
<
any
>
=
this
.
service
.
wfsubmit
(
_this
.
WFSubmitAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
,
localdata
);
result
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
response
.
data
){
this
.
$Notice
.
error
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.formpage.workflow.submiterror'
)
as
string
)
+
', '
+
response
.
data
.
message
});
}
return
;
}
this
.
onFormLoad
(
arg
,
'submit'
);
this
.
$store
.
dispatch
(
'viewaction/datasaved'
,
{
viewtag
:
this
.
viewtag
});
this
.
$Notice
.
info
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.formpage.workflow.submitsuccess'
)
as
string
)
});
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
reject
(
response
);
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
);
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
reject
(
response
);
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
);
})
})
}
/**
* 面板行为
*
* @param {string} [action] 调用的实体行为
* @param {string} [emitAction] 抛出行为
* @param {*} [data={}] 传入数据
* @param {boolean} [showloading] 是否显示加载状态
*
* @memberof UI_0007_2Base
*/
public
panelAction
(
action
:
string
,
emitAction
:
string
,
data
:
any
=
{},
showloading
?:
boolean
):
void
{
if
(
!
action
||
(
action
&&
Object
.
is
(
action
,
''
)))
{
return
;
}
const
arg
:
any
=
{
...
data
};
const
formdata
=
this
.
getValues
();
Object
.
assign
(
arg
,
formdata
);
Object
.
assign
(
arg
,
this
.
viewparams
);
const
post
:
Promise
<
any
>
=
this
.
service
.
frontLogic
(
action
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
showloading
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
}
return
;
}
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
emitAction
);
this
.
$emit
(
emitAction
,
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
emitAction
,
data
:
data
});
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
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
)
});
return
;
}
});
}
/**
* 表单项更新
*
* @param {string} mode 界面行为名称
* @param {*} [data={}] 请求数据
* @param {string[]} updateDetails 更新项
* @param {boolean} [showloading] 是否显示加载状态
* @returns {void}
* @memberof UI_0007_2Base
*/
public
updateFormItems
(
mode
:
string
,
data
:
any
=
{},
updateDetails
:
string
[],
showloading
?:
boolean
):
void
{
if
(
!
mode
||
(
mode
&&
Object
.
is
(
mode
,
''
)))
{
return
;
}
const
arg
:
any
=
{
...
data
};
Object
.
assign
(
arg
,
this
.
viewparams
);
const
post
:
Promise
<
any
>
=
this
.
service
.
frontLogic
(
mode
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
showloading
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
(
this
.
$t
(
'app.formpage.updateerror'
)
as
string
)
});
return
;
}
const
data
=
response
.
data
;
const
_data
:
any
=
{};
updateDetails
.
forEach
((
name
:
string
)
=>
{
if
(
!
data
.
hasOwnProperty
(
name
))
{
return
;
}
Object
.
assign
(
_data
,
{
[
name
]:
data
[
name
]
});
});
this
.
setFormEnableCond
(
_data
);
this
.
fillForm
(
_data
,
'updateFormItem'
);
this
.
formLogic
({
name
:
''
,
newVal
:
null
,
oldVal
:
null
});
this
.
dataChang
.
next
(
JSON
.
stringify
(
this
.
data
));
AppCenterService
.
notifyMessage
({
name
:
"IBIZOrderDetail"
,
action
:
'appRefresh'
,
data
:
data
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'updateformitem'
,
ufimode
:
arg
.
srfufimode
,
data
:
_data
});
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
message
});
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
)
});
return
;
}
});
}
/**
* 回车事件
*
* @param {*} $event
* @memberof UI_0007_2Base
*/
public
onEnter
(
$event
:
any
):
void
{
}
/**
* 保存并退出
*
* @param {any[]} args
* @memberof UI_0007_2Base
*/
public
saveAndExit
(
data
:
any
[]):
Promise
<
any
>
{
let
_this
=
this
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
arg
:
any
=
{};
if
(
data
&&
data
.
length
>
0
){
Object
.
assign
(
arg
,
data
[
0
]);
}
_this
.
currentAction
=
"saveAndExit"
;
_this
.
save
([
arg
]).
then
((
res
)
=>
{
if
(
res
){
_this
.
closeView
(
res
.
data
);
}
resolve
(
res
);
}).
catch
((
error
)
=>
{
reject
(
error
);
})
})
}
/**
* 保存并新建
*
* @param {any[]} args
* @memberof UI_0007_2Base
*/
public
saveAndNew
(
data
:
any
[]):
Promise
<
any
>
{
let
_this
=
this
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
arg
:
any
=
{};
if
(
data
&&
data
.
length
>
0
){
Object
.
assign
(
arg
,
data
[
0
]);
}
_this
.
currentAction
=
"saveAndNew"
;
_this
.
save
([
arg
]).
then
((
res
)
=>
{
_this
.
ResetData
(
res
);
_this
.
loadDraft
({});
}).
catch
((
error
)
=>
{
reject
(
error
);
})
})
}
/**
* 删除并退出
*
* @param {any[]} args
* @memberof UI_0007_2Base
*/
public
removeAndExit
(
data
:
any
[]):
Promise
<
any
>
{
let
_this
=
this
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
arg
:
any
=
{};
if
(
data
&&
data
.
length
>
0
){
Object
.
assign
(
arg
,
data
[
0
]);
}
_this
.
remove
([
arg
]).
then
((
res
)
=>
{
if
(
res
){
_this
.
closeView
(
res
.
data
);
}
resolve
(
res
);
}).
catch
((
error
)
=>
{
reject
(
error
);
})
})
}
/**
* 关系界面数据保存完成
*
* @param {any} $event
* @memberof UI_0007_2Base
*/
public
drdatasaved
(
$event
:
any
){
let
_this
=
this
;
this
.
drcounter
--
;
if
(
this
.
drcounter
===
0
){
this
.
save
(
this
.
drsaveopt
,
undefined
,
false
).
then
((
res
)
=>
{
this
.
saveState
(
res
);
this
.
drsaveopt
=
{};
if
(
Object
.
is
(
_this
.
currentAction
,
"saveAndNew"
)){
_this
.
ResetData
(
res
);
_this
.
loadDraft
({});
}
else
if
(
Object
.
is
(
_this
.
currentAction
,
"saveAndExit"
)){
if
(
res
){
_this
.
closeView
(
res
.
data
);
}
}
});
}
}
/**
* 新建默认值
* @memberof UI_0007_2Base
*/
public
createDefault
(){
}
/**
* 更新默认值
* @memberof UI_0007_2Base
*/
public
updateDefault
(){
}
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof UI_0007_2Base
*/
public
onPanelDataChange
(
item
:
any
,
$event
:
any
)
{
Object
.
assign
(
item
,
$event
,
{
rowDataState
:
'update'
});
}
}
</
script
>
<
style
lang=
'less'
>
@import './ui-0007-2-form.less';
</
style
>
\ No newline at end of file
app_Web/src/widgets/ibizorder-detail/ui-0007-2-form/ui-0007-2-form-model.ts
0 → 100644
浏览文件 @
d063b250
/**
* UI_0007_2 部件模型
*
* @export
* @class UI_0007_2Model
*/
export
default
class
UI_0007_2Model
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof UI_0007_2Model
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'srfwfmemo'
,
prop
:
'srfwfmemo'
,
dataType
:
'TEXT'
,
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfupdatedate'
,
prop
:
'updatedate'
,
dataType
:
'DATETIME'
,
},
{
name
:
'srforikey'
,
},
{
name
:
'srfkey'
,
prop
:
'ibizorderdetailid'
,
dataType
:
'GUID'
,
},
{
name
:
'srfmajortext'
,
prop
:
'ibizorderdetailname'
,
dataType
:
'TEXT'
,
},
{
name
:
'srftempmode'
,
},
{
name
:
'srfuf'
,
},
{
name
:
'srfdeid'
,
},
{
name
:
'srfsourcekey'
,
},
{
name
:
'ibizuniproductname'
,
prop
:
'ibizuniproductname'
,
dataType
:
'PICKUPTEXT'
,
},
{
name
:
'quantity'
,
prop
:
'quantity'
,
dataType
:
'INT'
,
},
{
name
:
'ibizorderdetailname'
,
prop
:
'ibizorderdetailname'
,
dataType
:
'TEXT'
,
},
{
name
:
'ibizorderdetailid'
,
prop
:
'ibizorderdetailid'
,
dataType
:
'GUID'
,
},
{
name
:
'orderuid'
,
prop
:
'orderuid'
,
dataType
:
'PICKUPDATA'
,
},
{
name
:
'ibizorderid'
,
prop
:
'ibizorderid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'ibizordername'
,
prop
:
'ibizordername'
,
dataType
:
'PICKUPTEXT'
,
},
{
name
:
'amount'
,
prop
:
'amount'
,
dataType
:
'FLOAT'
,
},
{
name
:
'unit'
,
prop
:
'unit'
,
dataType
:
'PICKUPDATA'
,
},
{
name
:
'unitprice'
,
prop
:
'unitprice'
,
dataType
:
'PICKUPDATA'
,
},
{
name
:
'ibizuniproductid'
,
prop
:
'ibizuniproductid'
,
dataType
:
'PICKUP'
,
},
{
name
:
'ibizorderdetail'
,
prop
:
'ibizorderdetailid'
,
dataType
:
'FONTKEY'
,
},
]
}
}
\ No newline at end of file
app_Web/src/widgets/ibizorder-detail/ui-0007-2-form/ui-0007-2-form-service.ts
0 → 100644
浏览文件 @
d063b250
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
IBIZOrderDetailService
from
'@/service/ibizorder-detail/ibizorder-detail-service'
;
import
UI_0007_2Model
from
'./ui-0007-2-form-model'
;
import
IBIZUNIProductService
from
'@/service/ibizuniproduct/ibizuniproduct-service'
;
import
IBIZOrderService
from
'@/service/ibizorder/ibizorder-service'
;
/**
* UI_0007_2 部件服务对象
*
* @export
* @class UI_0007_2Service
*/
export
default
class
UI_0007_2Service
extends
ControlService
{
/**
* 订单明细服务对象
*
* @type {IBIZOrderDetailService}
* @memberof UI_0007_2Service
*/
public
appEntityService
:
IBIZOrderDetailService
=
new
IBIZOrderDetailService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof UI_0007_2Service
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of UI_0007_2Service.
*
* @param {*} [opts={}]
* @memberof UI_0007_2Service
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
UI_0007_2Model
();
}
/**
* 统一产品(索引主实体)服务对象
*
* @type {IBIZUNIProductService}
* @memberof UI_0007_2Service
*/
public
ibizuniproductService
:
IBIZUNIProductService
=
new
IBIZUNIProductService
();
/**
* 订单服务对象
*
* @type {IBIZOrderService}
* @memberof UI_0007_2Service
*/
public
ibizorderService
:
IBIZOrderService
=
new
IBIZOrderService
();
/**
* 远端数据
*
* @type {*}
* @memberof UI_0007_2Service
*/
private
remoteCopyData
:
any
=
{};
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof UI_0007_2Service
*/
private
doItems
(
promise
:
Promise
<
any
>
,
deKeyField
:
string
,
deName
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
promise
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
data
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
item
[
deName
]
=
item
[
deKeyField
];
data
[
index
]
=
item
;
});
resolve
(
data
);
}
else
{
reject
([])
}
}).
catch
((
response
:
any
)
=>
{
reject
([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof UI_0007_2Service
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
data
.
page
=
data
.
page
?
data
.
page
:
0
;
data
.
size
=
data
.
size
?
data
.
size
:
1000
;
if
(
Object
.
is
(
serviceName
,
'IBIZUNIProductService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
ibizuniproductService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'ibizuniproductid'
,
'ibizuniproduct'
);
}
if
(
Object
.
is
(
serviceName
,
'IBIZOrderService'
)
&&
Object
.
is
(
interfaceName
,
'FetchDefault'
))
{
return
this
.
doItems
(
this
.
ibizorderService
.
FetchDefault
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'ibizorderid'
,
'ibizorder'
);
}
return
Promise
.
reject
([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof UI_0007_2Service
*/
@
Errorlog
public
wfstart
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
data
=
this
.
handleWFData
(
data
,
true
);
context
=
this
.
handleRequestData
(
action
,
context
,
data
).
context
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
context
,
data
,
isloading
,
localdata
);
}
else
{
result
=
this
.
appEntityService
.
WFStart
(
context
,
data
,
isloading
,
localdata
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 提交工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof UI_0007_2Service
*/
@
Errorlog
public
wfsubmit
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
data
=
this
.
handleWFData
(
data
,
true
);
context
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
).
context
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
context
,
data
,
isloading
,
localdata
);
}
else
{
result
=
this
.
appEntityService
.
WFSubmit
(
context
,
data
,
isloading
,
localdata
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {boolean} [isWorkflow] 是否在工作流中添加数据
* @returns {Promise<any>}
* @memberof UI_0007_2Service
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
isWorkflow
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Create
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
if
(
isWorkflow
){
resolve
(
response
);
}
else
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UI_0007_2Service
*/
@
Errorlog
public
delete
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Remove
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {boolean} [isWorkflow] 是否在工作流中修改数据
* @returns {Promise<any>}
* @memberof UI_0007_2Service
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
isWorkflow
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
if
(
isWorkflow
){
resolve
(
response
);
}
else
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UI_0007_2Service
*/
@
Errorlog
public
get
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
Get
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
setRemoteCopyData
(
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 UI_0007_2Service
*/
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
//仿真主键数据
const
PrimaryKey
=
Util
.
createUUID
();
Data
.
ibizorderdetailid
=
PrimaryKey
;
Data
.
ibizorderdetail
=
PrimaryKey
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
this
.
appEntityService
.
GetDraft
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
setRemoteCopyData
(
response
);
response
.
data
.
ibizorderdetailid
=
PrimaryKey
;
this
.
handleResponse
(
action
,
response
,
true
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof UI_0007_2Service
*/
@
Errorlog
public
frontLogic
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
return
Promise
.
reject
({
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
'系统异常'
}
});
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
,
true
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
})
}
/**
* 处理请求数据
*
* @param action 行为
* @param data 数据
* @memberof UI_0007_2Service
*/
public
handleRequestData
(
action
:
string
,
context
:
any
,
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
else
{
if
(
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
"FORMPART"
)){
Object
.
assign
(
requestData
,
data
[
item
.
name
]);
}
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof UI_0007_2Service
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
/**
* 重写处理返回数据
*
* @param {string} action
* @param {*} response
* @memberof UI_0007_2Service
*/
public
handleResponseData
(
action
:
string
,
data
:
any
=
{},
isCreate
?:
boolean
,
codelistArray
?:
any
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
item
:
any
=
{};
let
dataItems
:
any
[]
=
model
.
getDataItems
();
dataItems
.
forEach
(
dataitem
=>
{
let
val
=
data
.
hasOwnProperty
(
dataitem
.
prop
)
?
data
[
dataitem
.
prop
]
:
null
;
if
(
val
===
null
)
{
val
=
data
.
hasOwnProperty
(
dataitem
.
name
)
?
data
[
dataitem
.
name
]
:
null
;
}
if
((
isCreate
===
undefined
||
isCreate
===
null
)
&&
Object
.
is
(
dataitem
.
dataType
,
'GUID'
)
&&
Object
.
is
(
dataitem
.
name
,
'srfkey'
)
&&
(
val
&&
!
Object
.
is
(
val
,
''
))){
isCreate
=
true
;
}
item
[
dataitem
.
name
]
=
val
;
// 转化代码表
if
(
codelistArray
&&
dataitem
.
codelist
){
if
(
codelistArray
.
get
(
dataitem
.
codelist
.
tag
)
&&
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
)){
item
[
dataitem
.
name
]
=
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
);
}
}
});
item
.
srfuf
=
data
.
srfuf
?
data
.
srfuf
:
(
isCreate
?
"0"
:
"1"
);
item
=
Object
.
assign
(
data
,
item
);
return
item
;
}
/**
* 设置远端数据
*
* @param result 远端请求结果
* @memberof UI_0007_2Service
*/
public
setRemoteCopyData
(
result
:
any
){
if
(
result
&&
result
.
status
===
200
)
{
this
.
remoteCopyData
=
Util
.
deepCopy
(
result
.
data
);
}
}
/**
* 获取远端数据
*
* @memberof UI_0007_2Service
*/
public
getRemoteCopyData
(){
return
this
.
remoteCopyData
;
}
}
\ No newline at end of file
app_Web/src/widgets/ibizorder-detail/ui-0007-2-form/ui-0007-2-form.less
0 → 100644
浏览文件 @
d063b250
.ivu-tabs-no-animation>.ivu-tabs-content{
padding: 0 16px;
}
.ivu-card-head{
padding: 14px 0;
}
.app-form {
overflow: auto;
padding: 6px;
> .ivu-row {
> .ivu-tabs {
height: 100%;
display: flex;
flex-direction: column;
> .ivu-tabs-content {
flex-grow: 1;
overflow: auto;
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
}
}
.app-tabpanel-flex {
height: 100%;
> .ivu-tabs-content {
height: calc(100% - 52px);
> .ivu-tabs-tabpane {
height: 100%;
}
}
}
.app-form {
>.ivu-row:nth-child(2) {
>.ivu-col:nth-child(1) {
>.ivu-row.app-form-group.app-group-hiddden-caption:nth-child(1) {
margin-top: 12px;
}
}
}
}
.app-form{
// 表单行间距
.app-form-item{
margin-bottom: 20px;
}
// 表单按钮margin
.app-form-button{
margin:0 6px;
}
}
// this is less
app_Web/src/widgets/ibizorder-detail/ui-0007-2-form/ui-0007-2-form.vue
0 → 100644
浏览文件 @
d063b250
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
UI_0007_2Base
from
'./ui-0007-2-form-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
UI_0007_2
extends
UI_0007_2Base
{
}
</
script
>
\ No newline at end of file
app_Web/src/widgets/ibizorder/select-tree-treeview/select-tree-treeview-base.vue
0 → 100644
浏览文件 @
d063b250
<
template
>
<div
class=
"design-tree-container"
>
<context-menu-container>
<el-tree
v-if=
"inited"
ref=
"tree"
class=
"design-tree"
node-key=
"id"
lazy
:show-checkbox=
"!isSingleSelect"
:check-on-click-node=
"!isSingleSelect"
:default-expanded-keys=
"expandedKeys"
:props=
"
{
label: 'text',
isLeaf: 'leaf',
children: 'children'
}"
:load="load"
:highlight-current="true"
:expand-on-click-node="false"
@check="onCheck"
@current-change="selectionChange"
:filter-node-method="filterNode"
:empty-text="$t('entities.ibizorder.selecttree_treeview.nodata')"
>
<template
slot-scope=
"
{ node, data }">
<context-menu
:ref=
'data.id'
:isBlocked=
"true"
:contextMenuStyle=
"
{width: '100%'}" :data="node" :renderContent="renderContextMenu" @showContext="showContext(data,$event)">
<tooltip
transfer
style=
"width: 100%;"
max-width=
"2000"
placement=
"right"
>
<div
class=
"tree-node"
@
dblclick=
"doDefaultAction(node)"
>
<span
class=
"icon"
>
<i
v-if=
" data.iconcls && !Object.is(data.iconcls, '')"
:class=
"data.iconcls"
></i>
<img
v-else-if=
"data.icon && !Object.is(data.icon, '')"
:src=
"data.icon"
/>
<icon
v-else-if=
"isOutputIconDefault"
type=
"ios-paper-outline"
></icon>
</span>
<span
class=
"text"
>
<span
v-if=
"data.html"
v-html=
"data.html"
></span>
<span
v-else
>
{{
data
.
isUseLangRes
?
$t
(
data
.
text
)
:
data
.
text
}}
</span>
</span>
</div>
<template
slot=
"content"
>
<span
v-if=
"data.html"
v-html=
"data.html"
></span>
<span
v-else
>
{{
data
.
isUseLangRes
?
$t
(
data
.
text
)
:
data
.
text
}}
</span>
</
template
>
</tooltip>
</context-menu>
</template>
</el-tree>
</context-menu-container>
</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
IBIZOrderService
from
'@/service/ibizorder/ibizorder-service'
;
import
SelectTreeService
from
'./select-tree-treeview-service'
;
import
IBIZOrderUIService
from
'@/uiservice/ibizorder/ibizorder-ui-service'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
UIService
from
'@/uiservice/ui-service'
;
@
Component
({
components
:
{
}
})
export
default
class
SelectTreeBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof SelectTreeBase
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof SelectTreeBase
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof SelectTreeBase
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof SelectTreeBase
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SelectTreeBase
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof SelectTreeBase
*/
public
getControlType
():
string
{
return
'TREEVIEW'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof SelectTreeBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {SelectTreeService}
* @memberof SelectTreeBase
*/
public
service
:
SelectTreeService
=
new
SelectTreeService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {IBIZOrderService}
* @memberof SelectTreeBase
*/
public
appEntityService
:
IBIZOrderService
=
new
IBIZOrderService
({
$store
:
this
.
$store
});
/**
* 转化数据
*
* @param {any} args
* @memberof SelectTreeBase
*/
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 SelectTreeBase
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof SelectTreeBase
*/
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 SelectTreeBase
*/
public
getDatas
():
any
[]
{
return
[
this
.
currentselectedNode
];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof SelectTreeBase
*/
public
getData
():
any
{
return
this
.
currentselectedNode
;
}
/**
* 是否单选
*
* @type {boolean}
* @memberof SelectTreeBase
*/
@
Prop
({
default
:
true
})
public
isSingleSelect
!
:
boolean
;
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof SelectTreeBase
*/
@
Prop
({
default
:
false
})
public
isSelectFirstDefault
!
:
boolean
;
/**
* 枝干节点是否可用(具有数据能力,可抛出)
*
* @type {string}
* @memberof SelectTreeBase
*/
@
Prop
({
default
:
true
})
public
isBranchAvailable
!
:
boolean
;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof SelectTreeBase
*/
@
Prop
({
default
:
true
})
public
showBusyIndicator
?:
boolean
;
/**
* 初始化完成
*
* @type {boolean}
* @memberof SelectTreeBase
*/
public
inited
:
boolean
=
false
;
/**
* 已选中数据集合
*
* @type {*}
* @memberof SelectTreeBase
*/
public
selectedNodes
:
any
=
[];
/**
* 当前选中数据项
*
* @type {*}
* @memberof SelectTreeBase
*/
public
currentselectedNode
:
any
=
{};
/**
* 选中数据字符串
*
* @type {string}
* @memberof SelectTreeBase
*/
@
Prop
()
public
selectedData
!
:
string
;
/**
* 选中值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof SelectTreeBase
*/
@
Watch
(
'selectedData'
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
echoselectedNodes
=
newVal
?
this
.
isSingleSelect
?
[
JSON
.
parse
(
newVal
)[
0
]]
:
JSON
.
parse
(
newVal
)
:
[];
this
.
selectedNodes
=
[];
if
(
this
.
echoselectedNodes
.
length
>
0
){
let
AllnodesObj
=
(
this
.
$refs
.
treeexpbar_tree
as
any
).
store
.
nodesMap
;
let
AllnodesArray
:
any
[]
=
[];
for
(
const
key
in
AllnodesObj
)
{
if
(
AllnodesObj
.
hasOwnProperty
(
key
))
{
AllnodesArray
.
push
(
AllnodesObj
[
key
].
data
);
}
}
this
.
setDefaultSelection
(
AllnodesArray
);
}
}
/**
* 回显选中数据集合
*
* @type {*}
* @memberof SelectTreeBase
*/
public
echoselectedNodes
:
any
[]
=
this
.
selectedData
?
(
this
.
isSingleSelect
?
[
JSON
.
parse
(
this
.
selectedData
)[
0
]]
:
JSON
.
parse
(
this
.
selectedData
))
:
[];
/**
* 部件行为--update
*
* @type {string}
* @memberof SelectTreeBase
*/
@
Prop
()
public
updateAction
!
:
string
;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof SelectTreeBase
*/
@
Prop
()
public
fetchAction
!
:
string
;
/**
* 部件行为--remove
*
* @type {string}
* @memberof SelectTreeBase
*/
@
Prop
()
public
removeAction
!
:
string
;
/**
* 部件行为--load
*
* @type {string}
* @memberof SelectTreeBase
*/
@
Prop
()
public
loadAction
!
:
string
;
/**
* 部件行为--create
*
* @type {string}
* @memberof SelectTreeBase
*/
@
Prop
()
public
createAction
!
:
string
;
/**
* 过滤属性
*
* @type {string}
* @memberof SelectTreeBase
*/
public
srfnodefilter
:
string
=
''
;
/**
* 默认输出图标
*
* @type {boolean}
* @memberof SelectTreeBase
*/
public
isOutputIconDefault
:
boolean
=
true
;
/**
* 数据展开主键
*
* @type {string[]}
* @memberof SelectTreeBase
*/
@
Provide
()
public
expandedKeys
:
string
[]
=
[];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SelectTreeBase
*/
public
appStateEvent
:
Subscription
|
undefined
;
/**
* 树节点上下文菜单集合
*
* @type {string[]}
* @memberof SelectTreeBase
*/
public
actionModel
:
any
=
{
}
/**
* 备份树节点上下文菜单
*
* @type any
* @memberof MainTreeBase
*/
public
copyActionModel
:
any
;
/**
* 选中数据变更事件
*
* @public
* @param {*} data
* @param {*} data 当前节点对应传入对象
* @param {*} checkedState 树目前选中状态对象
* @memberof SelectTreeBase
*/
public
onCheck
(
data
:
any
,
checkedState
:
any
)
{
// 处理多选数据
if
(
!
this
.
isSingleSelect
){
let
leafNodes
=
checkedState
.
checkedNodes
.
filter
((
item
:
any
)
=>
item
.
leaf
);
this
.
selectedNodes
=
JSON
.
parse
(
JSON
.
stringify
(
leafNodes
));
this
.
$emit
(
'selectionchange'
,
this
.
selectedNodes
);
}
}
/**
* 选中数据变更事件
*
* @public
* @param {*} data 节点对应传入对象
* @param {*} node 节点对应node对象
* @memberof SelectTreeBase
*/
public
selectionChange
(
data
:
any
,
node
:
any
)
{
// 禁用项处理
if
(
data
.
disabled
){
node
.
isCurrent
=
false
;
return
;
}
// 只处理最底层子节点
if
(
this
.
isBranchAvailable
||
data
.
leaf
){
this
.
currentselectedNode
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 单选直接替换
if
(
this
.
isSingleSelect
){
this
.
selectedNodes
=
[
this
.
currentselectedNode
];
this
.
$emit
(
'selectionchange'
,
this
.
selectedNodes
);
}
// 多选用check方法
}
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof SelectTreeBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof SelectTreeBase
*/
public
afterCreated
(){
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
inited
=
false
;
this
.
$nextTick
(()
=>
{
this
.
inited
=
true
;
});
}
if
(
Object
.
is
(
'filter'
,
action
))
{
this
.
srfnodefilter
=
data
.
srfnodefilter
;
this
.
refresh_all
();
}
if
(
Object
.
is
(
'refresh_parent'
,
action
))
{
this
.
refresh_parent
();
}
if
(
Object
.
is
(
'refresh_current'
,
action
))
{
this
.
refresh_current
();
}
});
}
if
(
AppCenterService
&&
AppCenterService
.
getMessageCenter
()){
this
.
appStateEvent
=
AppCenterService
.
getMessageCenter
().
subscribe
(({
name
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
name
,
"IBIZOrder"
)){
return
;
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
this
.
refresh
([
data
]);
}
})
}
}
/**
* 对树节点进行筛选操作
* @memberof OrderTree
*/
public
filterNode
(
value
:
any
,
data
:
any
)
{
if
(
!
value
)
return
true
;
return
data
.
text
.
indexOf
(
value
)
!==
-
1
;
}
/**
* vue 生命周期
*
* @memberof SelectTreeBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof SelectTreeBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
if
(
this
.
appStateEvent
){
this
.
appStateEvent
.
unsubscribe
();
}
}
/**
* 刷新数据
*
* @memberof SelectTreeBase
*/
public
refresh_all
():
void
{
this
.
inited
=
false
;
this
.
$nextTick
(()
=>
{
this
.
inited
=
true
;
});
}
/**
* 刷新当前节点
*
* @memberof SelectTreeBase
*/
public
refresh_current
():
void
{
if
(
Object
.
keys
(
this
.
currentselectedNode
).
length
===
0
)
{
return
;
}
const
tree
:
any
=
this
.
$refs
.
tree
;
const
node
:
any
=
tree
.
getNode
(
this
.
currentselectedNode
.
id
);
if
(
!
node
||
!
node
.
parent
)
{
return
;
}
let
curNode
:
any
=
{};
curNode
=
Util
.
deepObjectMerge
(
curNode
,
node
);
let
tempContext
:
any
=
{};
if
(
curNode
.
data
&&
curNode
.
data
.
srfappctx
){
Object
.
assign
(
tempContext
,
curNode
.
data
.
srfappctx
);
}
else
{
Object
.
assign
(
tempContext
,
this
.
context
);
}
const
id
:
string
=
node
.
key
?
node
.
key
:
'#'
;
const
param
:
any
=
{
srfnodeid
:
id
};
this
.
refresh_node
(
tempContext
,
param
,
false
);
}
/**
* 刷新父节点
*
* @memberof SelectTreeBase
*/
public
refresh_parent
():
void
{
if
(
Object
.
keys
(
this
.
currentselectedNode
).
length
===
0
)
{
return
;
}
const
tree
:
any
=
this
.
$refs
.
tree
;
const
node
:
any
=
tree
.
getNode
(
this
.
currentselectedNode
.
id
);
if
(
!
node
||
!
node
.
parent
)
{
return
;
}
let
curNode
:
any
=
{};
const
{
parent
:
_parent
}
=
node
;
curNode
=
Util
.
deepObjectMerge
(
curNode
,
_parent
);
let
tempContext
:
any
=
{};
if
(
curNode
.
data
&&
curNode
.
data
.
srfappctx
){
Object
.
assign
(
tempContext
,
curNode
.
data
.
srfappctx
);
}
else
{
Object
.
assign
(
tempContext
,
this
.
context
);
}
const
id
:
string
=
_parent
.
key
?
_parent
.
key
:
'#'
;
const
param
:
any
=
{
srfnodeid
:
id
};
this
.
refresh_node
(
tempContext
,
param
,
true
);
}
/**
* 数据加载
*
* @param {*} node
* @memberof SelectTreeBase
*/
public
load
(
node
:
any
=
{},
resolve
?:
any
)
{
if
(
node
.
data
&&
node
.
data
.
children
)
{
resolve
(
node
.
data
.
children
);
return
;
}
const
params
:
any
=
{
srfnodeid
:
node
.
data
&&
node
.
data
.
id
?
node
.
data
.
id
:
"#"
,
srfnodefilter
:
this
.
srfnodefilter
};
let
tempViewParams
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
let
curNode
:
any
=
{};
curNode
=
Util
.
deepObjectMerge
(
curNode
,
node
);
let
tempContext
:
any
=
this
.
computecurNodeContext
(
curNode
);
if
(
curNode
.
data
&&
curNode
.
data
.
srfparentdename
){
Object
.
assign
(
tempContext
,{
srfparentdename
:
curNode
.
data
.
srfparentdename
});
Object
.
assign
(
tempViewParams
,{
srfparentdename
:
curNode
.
data
.
srfparentdename
});
}
if
(
curNode
.
data
&&
curNode
.
data
.
srfparentkey
){
Object
.
assign
(
tempContext
,{
srfparentkey
:
curNode
.
data
.
srfparentkey
});
Object
.
assign
(
tempViewParams
,{
srfparentkey
:
curNode
.
data
.
srfparentkey
});
}
Object
.
assign
(
params
,{
viewparams
:
tempViewParams
});
this
.
service
.
getNodes
(
tempContext
,
params
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
info
});
resolve
([]);
return
;
}
const
_items
=
response
.
data
;
this
.
formatExpanded
(
_items
);
resolve
([...
_items
]);
let
isRoot
=
Object
.
is
(
node
.
level
,
0
);
let
isSelectedAll
=
node
.
checked
;
this
.
setDefaultSelection
(
_items
,
isRoot
,
isSelectedAll
);
this
.
$emit
(
"load"
,
_items
);
}).
catch
((
response
:
any
)
=>
{
resolve
([]);
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
info
});
});
}
/**
* 计算当前节点的上下文
*
* @param {*} curNode 当前节点
* @memberof SelectTreeBase
*/
public
computecurNodeContext
(
curNode
:
any
){
let
tempContext
:
any
=
{};
if
(
curNode
&&
curNode
.
data
&&
curNode
.
data
.
srfappctx
){
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
curNode
.
data
.
srfappctx
));
}
else
{
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
}
return
tempContext
;
}
/**
* 刷新功能
*
* @param {any} args
* @memberof SelectTreeBase
*/
public
refresh
(
args
?:
any
):
void
{
this
.
refresh_all
();
}
/**
* 刷新节点
*
* @public
* @param {*} [curContext] 当前节点上下文
* @param {*} [arg={}] 当前节点附加参数
* @param {boolean} parentnode 是否是刷新父节点
* @memberof SelectTreeBase
*/
public
refresh_node
(
curContext
:
any
,
arg
:
any
=
{},
parentnode
:
boolean
):
void
{
const
{
srfnodeid
:
id
}
=
arg
;
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
const
get
:
Promise
<
any
>
=
this
.
service
.
getNodes
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
);
get
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
info
});
return
;
}
const
_items
=
[...
response
.
data
];
this
.
formatExpanded
(
_items
);
const
tree
:
any
=
this
.
$refs
.
tree
;
tree
.
updateKeyChildren
(
id
,
_items
);
if
(
parentnode
)
{
this
.
currentselectedNode
=
{};
}
this
.
$forceUpdate
();
this
.
setDefaultSelection
(
_items
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
info
});
});
}
/**
* 默认展开节点
*
* @public
* @param {any[]} items
* @returns {any[]}
* @memberof SelectTreeBase
*/
public
formatExpanded
(
items
:
any
[]):
any
[]
{
const
data
:
any
[]
=
[];
items
.
forEach
((
item
)
=>
{
if
(
item
.
expanded
||
(
item
.
children
&&
item
.
children
.
length
>
0
))
{
this
.
expandedKeys
.
push
(
item
.
id
);
}
});
return
data
;
}
/**
* 设置默认选中,回显数项,选中所有子节点
*
* @param {any[]} items 当前节点所有子节点集合
* @param {boolean} isRoot 是否是加载根节点
* @param {boolean} isSelectedAll 是否选中所有子节点
* @memberof SelectTreeBase
*/
public
setDefaultSelection
(
items
:
any
[],
isRoot
:
boolean
=
false
,
isSelectedAll
:
boolean
=
false
):
void
{
if
(
items
.
length
==
0
){
return
;
}
let
defaultData
:
any
;
//在导航视图中,如已有选中数据,则右侧展开已选中数据的视图,如无选中数据则默认选中第一条
if
(
this
.
isSelectFirstDefault
){
if
(
this
.
isSingleSelect
){
let
index
:
number
=
-
1
;
if
(
this
.
selectedNodes
&&
this
.
selectedNodes
.
length
>
0
){
this
.
selectedNodes
.
forEach
((
select
:
any
)
=>
{
index
=
items
.
findIndex
((
item
:
any
)
=>
Object
.
is
(
select
.
srfkey
,
item
.
srfkey
));
});
}
if
(
index
===
-
1
)
{
if
(
isRoot
){
index
=
0
;
}
else
{
return
;
}
}
defaultData
=
items
[
index
];
this
.
setTreeNodeHighLight
(
defaultData
);
this
.
currentselectedNode
=
JSON
.
parse
(
JSON
.
stringify
(
defaultData
));
if
(
this
.
isBranchAvailable
||
defaultData
.
leaf
){
this
.
selectedNodes
=
[
this
.
currentselectedNode
];
this
.
$emit
(
'selectionchange'
,
this
.
selectedNodes
);
}
}
}
// 已选数据的回显
if
(
this
.
echoselectedNodes
&&
this
.
echoselectedNodes
.
length
>
0
){
let
checkedNodes
=
items
.
filter
((
item
:
any
)
=>
{
return
this
.
echoselectedNodes
.
some
((
val
:
any
)
=>
{
if
(
Object
.
is
(
item
.
srfkey
,
val
.
srfkey
)
&&
Object
.
is
(
item
.
srfmajortext
,
val
.
srfmajortext
)){
val
.
used
=
true
;
this
.
selectedNodes
.
push
(
val
);
this
.
$emit
(
'selectionchange'
,
this
.
selectedNodes
);
return
true
;
}
});
});
if
(
checkedNodes
.
length
>
0
){
this
.
echoselectedNodes
=
this
.
echoselectedNodes
.
filter
((
item
:
any
)
=>
!
item
.
used
);
// 父节点选中时,不需要执行这段,会选中所有子节点
if
(
!
isSelectedAll
){
if
(
this
.
isSingleSelect
){
this
.
setTreeNodeHighLight
(
checkedNodes
[
0
]);
this
.
currentselectedNode
=
JSON
.
parse
(
JSON
.
stringify
(
checkedNodes
[
0
]));
this
.
selectedNodes
=
[
this
.
currentselectedNode
];
}
else
{
this
.
selectedNodes
=
this
.
selectedNodes
.
concat
(
checkedNodes
);
const
tree
:
any
=
this
.
$refs
.
treeexpbar_tree
;
tree
.
setCheckedNodes
(
this
.
selectedNodes
);
}
}
}
}
// 父节点选中时,选中所有子节点
if
(
isSelectedAll
){
let
leafNodes
=
items
.
filter
((
item
:
any
)
=>
item
.
leaf
);
this
.
selectedNodes
=
this
.
selectedNodes
.
concat
(
leafNodes
);
this
.
$emit
(
'selectionchange'
,
this
.
selectedNodes
);
}
}
/**
* 绘制右击菜单
*
* @param {*} node
* @returns
* @memberof SelectTreeBase
*/
public
renderContextMenu
(
node
:
any
)
{
let
content
;
if
(
node
&&
node
.
data
)
{
const
data
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
node
.
data
));
this
.
currentselectedNode
=
{
...
data
};
const
tags
:
string
[]
=
data
.
id
.
split
(
';'
);
let
copyActionModel
:
any
=
Util
.
deepCopy
(
this
.
actionModel
);
}
return
content
;
}
/**
* 显示上下文菜单
*
* @param data 节点数据
* @param event 事件源
* @memberof SelectTreeBase
*/
public
showContext
(
data
:
any
,
event
:
any
){
let
_this
:
any
=
this
;
this
.
copyActionModel
=
{};
const
tags
:
string
[]
=
data
.
id
.
split
(
';'
);
Object
.
values
(
this
.
actionModel
).
forEach
((
item
:
any
)
=>
{
if
(
Object
.
is
(
item
.
nodeOwner
,
tags
[
0
])){
this
.
copyActionModel
[
item
.
name
]
=
item
;
}
})
if
(
Object
.
keys
(
this
.
copyActionModel
).
length
===
0
){
return
;
}
this
.
computeNodeState
(
data
,
data
.
nodeType
,
data
.
appEntityName
).
then
((
result
:
any
)
=>
{
let
flag
:
boolean
=
false
;
if
(
Object
.
values
(
result
).
length
>
0
){
flag
=
Object
.
values
(
result
).
some
((
item
:
any
)
=>
{
return
item
.
visabled
===
true
;
})
}
if
(
flag
){
(
_this
.
$refs
[
data
.
id
]
as
any
).
showContextMenu
(
event
.
clientX
,
event
.
clientY
);
}
});
}
/**
* 计算节点右键权限
*
* @param {*} node 节点数据
* @param {*} nodeType 节点类型
* @param {*} appEntityName 应用实体名称
* @returns
* @memberof SelectTreeBase
*/
public
async
computeNodeState
(
node
:
any
,
nodeType
:
string
,
appEntityName
:
string
)
{
if
(
Object
.
is
(
nodeType
,
"STATIC"
)){
return
this
.
copyActionModel
;
}
let
service
:
any
=
await
this
.
appEntityService
.
getService
(
appEntityName
);
if
(
this
.
copyActionModel
&&
Object
.
keys
(
this
.
copyActionModel
).
length
>
0
)
{
if
(
service
[
'Get'
]
&&
service
[
'Get'
]
instanceof
Function
){
let
tempContext
:
any
=
Util
.
deepCopy
(
this
.
context
);
tempContext
[
appEntityName
]
=
node
.
srfkey
;
let
targetData
=
await
service
.
Get
(
tempContext
,{},
false
);
let
uiservice
:
any
=
await
new
UIService
().
getService
(
appEntityName
);
let
result
:
any
[]
=
ViewTool
.
calcActionItemAuthState
(
targetData
.
data
,
this
.
copyActionModel
,
uiservice
);
return
this
.
copyActionModel
;
}
else
{
console
.
warn
(
"获取数据异常"
);
return
this
.
copyActionModel
;
}
}
}
/**
* 设置选中高亮
*
* @param {*} data
* @memberof SelectTreeBase
*/
public
setTreeNodeHighLight
(
data
:
any
):
void
{
const
tree
:
any
=
this
.
$refs
.
tree
;
tree
.
setCurrentKey
(
data
.
id
);
}
/**
* 执行默认界面行为
*
* @param {*} node
* @memberof SelectTreeBase
*/
public
doDefaultAction
(
node
:
any
)
{
if
(
node
&&
node
.
data
)
{
const
data
:
any
=
node
.
data
;
const
tags
:
string
[]
=
data
.
id
.
split
(
';'
);
}
this
.
$emit
(
'nodedblclick'
,
this
.
selectedNodes
);
}
}
</
script
>
<
style
lang=
'less'
>
@import './select-tree-treeview.less';
</
style
>
\ No newline at end of file
app_Web/src/widgets/ibizorder/select-tree-treeview/select-tree-treeview-model.ts
0 → 100644
浏览文件 @
d063b250
/**
* SelectTree 部件模型
*
* @export
* @class SelectTreeModel
*/
export
default
class
SelectTreeModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof SelectTreeModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'tp'
,
},
{
name
:
'endtime'
,
},
{
name
:
'wfstate'
,
},
{
name
:
'createdate'
,
},
{
name
:
'opinion'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'ordertype'
,
},
{
name
:
'detailnum'
,
},
{
name
:
'wfinstanceid'
,
},
{
name
:
'amount'
,
},
{
name
:
'orderuid'
,
},
{
name
:
'ibizorder'
,
prop
:
'ibizorderid'
,
},
{
name
:
'orderstate'
,
},
{
name
:
'starttime'
,
},
{
name
:
'updateman'
,
},
{
name
:
'wfstep'
,
},
{
name
:
'createman'
,
},
{
name
:
'ibizordername'
,
},
{
name
:
'ordertime'
,
},
{
name
:
'memo'
,
},
{
name
:
'ibizcustomername'
,
},
{
name
:
'ibizcustomerid'
,
},
]
}
}
\ No newline at end of file
app_Web/src/widgets/ibizorder/select-tree-treeview/select-tree-treeview-service.ts
0 → 100644
浏览文件 @
d063b250
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
IBIZOrderService
from
'@/service/ibizorder/ibizorder-service'
;
import
SelectTreeModel
from
'./select-tree-treeview-model'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
import
i18n
from
'@/locale'
;
/**
* SelectTree 部件服务对象
*
* @export
* @class SelectTreeService
*/
export
default
class
SelectTreeService
extends
ControlService
{
/**
* 订单服务对象
*
* @type {IBIZOrderService}
* @memberof SelectTreeService
*/
public
appEntityService
:
IBIZOrderService
=
new
IBIZOrderService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof SelectTreeService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of SelectTreeService.
*
* @param {*} [opts={}]
* @memberof SelectTreeService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
SelectTreeModel
();
}
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof SelectTreeService
*/
public
codeListService
:
CodeListService
=
new
CodeListService
({
$store
:
this
.
getStore
()
});
/**
* 节点分隔符号
*
* @public
* @type {string}
* @memberof SelectTreeService
*/
public
TREENODE_SEPARATOR
:
string
=
';'
;
/**
* 订单实体数据节点分隔符号
*
* @public
* @type {string}
* @memberof SelectTreeService
*/
public
TREENODE_ORDERENTITYDATA
:
string
=
'OrderEntityData'
;
/**
* 订单类型数据节点分隔符号
*
* @public
* @type {string}
* @memberof SelectTreeService
*/
public
TREENODE_ORDERTYPECODELIST
:
string
=
'OrderTypeCodelist'
;
/**
* 默认根节点节点分隔符号
*
* @public
* @type {string}
* @memberof SelectTreeService
*/
public
TREENODE_ROOT
:
string
=
'ROOT'
;
/**
* 订单数据节点分隔符号
*
* @public
* @type {string}
* @memberof SelectTreeService
*/
public
TREENODE_ORDERDATA
:
string
=
'OrderData'
;
/**
* 订单类型节点分隔符号
*
* @public
* @type {string}
* @memberof SelectTreeService
*/
public
TREENODE_ORDERTYPE
:
string
=
'OrderType'
;
/**
* 订单状态节点分隔符号
*
* @public
* @type {string}
* @memberof SelectTreeService
*/
public
TREENODE_ORDERSTATE
:
string
=
'OrderState'
;
/**
* 订单业务状态节点分隔符号
*
* @public
* @type {string}
* @memberof SelectTreeService
*/
public
TREENODE_ORDERSTATECODELIST
:
string
=
'OrderStateCodelist'
;
/**
* 获取节点数据
*
* @param {string} action
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
async
getNodes
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
{
srfparentkey
,
srfcat
,
srfnodeid
,
srfnodefilter
,
query
}:
{
srfparentkey
:
string
,
srfcat
:
string
,
srfnodeid
:
string
,
srfnodefilter
:
string
,
query
:
string
}
=
data
;
srfnodefilter
=
query
?
query
:
srfnodefilter
;
let
list
:
any
[]
=
[];
let
filter
:
any
=
{};
if
(
!
srfnodeid
||
Object
.
is
(
srfnodeid
,
'#'
))
{
srfnodeid
=
this
.
TREENODE_ROOT
;
}
let
strTreeNodeId
:
string
=
srfnodeid
;
let
strRealNodeId
:
string
=
''
;
let
bRootSelect
:
boolean
=
false
;
let
strNodeType
:
string
|
null
=
null
;
let
strRootSelectNode
:
string
=
''
;
if
(
Object
.
is
(
strTreeNodeId
,
this
.
TREENODE_ROOT
))
{
strNodeType
=
this
.
TREENODE_ROOT
;
if
(
srfparentkey
)
{
strRealNodeId
=
srfparentkey
;
}
}
else
{
let
nPos
=
strTreeNodeId
.
indexOf
(
this
.
TREENODE_SEPARATOR
);
if
(
nPos
===
-
1
)
{
return
Promise
.
reject
({
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
`树节点
${
strTreeNodeId
}
标识无效`
}
});
}
strNodeType
=
strTreeNodeId
.
substring
(
0
,
nPos
);
strRealNodeId
=
strTreeNodeId
.
substring
(
nPos
+
1
);
}
Object
.
assign
(
filter
,
{
srfparentkey
:
srfparentkey
,
srfcat
:
srfcat
,
srfnodefilter
:
srfnodefilter
,
strRealNodeId
:
strRealNodeId
,
srfnodeid
:
srfnodeid
,
strNodeType
:
strNodeType
,
viewparams
:
JSON
.
parse
(
JSON
.
stringify
(
data
)).
viewparams
}
);
// 分解节点标识
let
nodeid
:
string
[]
=
strRealNodeId
.
split
(
this
.
TREENODE_SEPARATOR
);
for
(
let
i
=
0
;
i
<
nodeid
.
length
;
i
++
)
{
switch
(
i
)
{
case
0
:
Object
.
assign
(
filter
,
{
nodeid
:
nodeid
[
0
]
});
break
;
case
1
:
Object
.
assign
(
filter
,
{
nodeid2
:
nodeid
[
1
]
});
break
;
case
2
:
Object
.
assign
(
filter
,
{
nodeid3
:
nodeid
[
2
]
});
break
;
case
3
:
Object
.
assign
(
filter
,
{
nodeid4
:
nodeid
[
3
]
});
break
;
default
:
break
;
}
}
if
(
Object
.
is
(
strNodeType
,
this
.
TREENODE_ORDERENTITYDATA
))
{
await
this
.
fillOrderentitydataNodeChilds
(
context
,
filter
,
list
);
return
Promise
.
resolve
({
status
:
200
,
data
:
list
});
}
if
(
Object
.
is
(
strNodeType
,
this
.
TREENODE_ORDERTYPECODELIST
))
{
await
this
.
fillOrdertypecodelistNodeChilds
(
context
,
filter
,
list
);
return
Promise
.
resolve
({
status
:
200
,
data
:
list
});
}
if
(
Object
.
is
(
strNodeType
,
this
.
TREENODE_ROOT
))
{
await
this
.
fillRootNodeChilds
(
context
,
filter
,
list
);
return
Promise
.
resolve
({
status
:
200
,
data
:
list
});
}
if
(
Object
.
is
(
strNodeType
,
this
.
TREENODE_ORDERDATA
))
{
await
this
.
fillOrderdataNodeChilds
(
context
,
filter
,
list
);
return
Promise
.
resolve
({
status
:
200
,
data
:
list
});
}
if
(
Object
.
is
(
strNodeType
,
this
.
TREENODE_ORDERTYPE
))
{
await
this
.
fillOrdertypeNodeChilds
(
context
,
filter
,
list
);
return
Promise
.
resolve
({
status
:
200
,
data
:
list
});
}
if
(
Object
.
is
(
strNodeType
,
this
.
TREENODE_ORDERSTATE
))
{
await
this
.
fillOrderstateNodeChilds
(
context
,
filter
,
list
);
return
Promise
.
resolve
({
status
:
200
,
data
:
list
});
}
if
(
Object
.
is
(
strNodeType
,
this
.
TREENODE_ORDERSTATECODELIST
))
{
await
this
.
fillOrderstatecodelistNodeChilds
(
context
,
filter
,
list
);
return
Promise
.
resolve
({
status
:
200
,
data
:
list
});
}
return
Promise
.
resolve
({
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
`树节点
${
strTreeNodeId
}
标识无效`
}
});
}
/**
* 填充 树视图节点[订单实体数据]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
fillOrderentitydataNodes
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[],
rsNavContext
?:
any
,
rsNavParams
?:
any
,
rsParams
?:
any
):
Promise
<
any
>
{
context
=
this
.
handleResNavContext
(
context
,
filter
,
rsNavContext
);
filter
=
this
.
handleResNavParams
(
context
,
filter
,
rsNavParams
,
rsParams
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
searchFilter
:
any
=
{};
Object
.
assign
(
searchFilter
,
{
total
:
false
});
let
bFirst
:
boolean
=
true
;
let
records
:
any
[]
=
[];
try
{
this
.
searchOrderentitydata
(
context
,
searchFilter
,
filter
).
then
((
records
:
any
)
=>
{
if
(
records
&&
records
.
length
>
0
){
records
.
forEach
((
entity
:
any
)
=>
{
let
treeNode
:
any
=
{};
// 整理context
let
strId
:
string
=
entity
.
ibizorderid
;
let
strText
:
string
=
entity
.
ibizordername
;
Object
.
assign
(
treeNode
,{
srfparentdename
:
'IBIZOrder'
,
srfparentkey
:
entity
.
ibizorderid
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
Object
.
assign
(
tempContext
,{
srfparentdename
:
'IBIZOrder'
,
srfparentkey
:
entity
.
ibizorderid
,
ibizorder
:
strId
})
Object
.
assign
(
treeNode
,{
srfappctx
:
tempContext
});
Object
.
assign
(
treeNode
,{
'ibizorder'
:
strId
});
Object
.
assign
(
treeNode
,
{
srfkey
:
strId
});
Object
.
assign
(
treeNode
,
{
text
:
strText
,
srfmajortext
:
strText
});
let
strNodeId
:
string
=
'OrderEntityData'
;
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
strId
;
Object
.
assign
(
treeNode
,
{
id
:
strNodeId
});
Object
.
assign
(
treeNode
,
{
expanded
:
filter
.
isautoexpand
});
Object
.
assign
(
treeNode
,
{
leaf
:
true
});
Object
.
assign
(
treeNode
,
{
curData
:
entity
});
Object
.
assign
(
treeNode
,
{
nodeid
:
treeNode
.
srfkey
});
Object
.
assign
(
treeNode
,
{
nodeid2
:
filter
.
strRealNodeId
});
Object
.
assign
(
treeNode
,
{
nodeType
:
"DE"
,
appEntityName
:
"ibizorder"
});
list
.
push
(
treeNode
);
resolve
(
list
);
bFirst
=
false
;
});
}
else
{
resolve
(
list
);
}
});
}
catch
(
error
)
{
console
.
error
(
error
);
}
});
}
/**
* 获取查询集合
*
* @public
* @param {any{}} context
* @param {*} searchFilter
* @param {*} filter
* @returns {any[]}
* @memberof TestEnetityDatasService
*/
@
Errorlog
public
searchOrderentitydata
(
context
:
any
=
{},
searchFilter
:
any
,
filter
:
any
):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
if
(
filter
.
viewparams
){
Object
.
assign
(
searchFilter
,
filter
.
viewparams
);
}
if
(
!
searchFilter
.
page
){
Object
.
assign
(
searchFilter
,{
page
:
0
});
}
if
(
!
searchFilter
.
size
){
Object
.
assign
(
searchFilter
,{
size
:
1000
});
}
if
(
context
&&
context
.
srfparentdename
){
Object
.
assign
(
searchFilter
,{
srfparentdename
:
JSON
.
parse
(
JSON
.
stringify
(
context
)).
srfparentdename
});
}
if
(
context
&&
context
.
srfparentkey
){
Object
.
assign
(
searchFilter
,{
srfparentkey
:
JSON
.
parse
(
JSON
.
stringify
(
context
)).
srfparentkey
});
}
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
list
:
any
[]
=
[];
if
(
_appEntityService
[
'FetchDefault'
]
&&
_appEntityService
[
'FetchDefault'
]
instanceof
Function
)
{
const
response
:
Promise
<
any
>
=
_appEntityService
[
'FetchDefault'
](
context
,
searchFilter
,
false
);
response
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
resolve
([]);
console
.
log
(
JSON
.
stringify
(
context
));
console
.
error
(
'查询FetchDefault数据集异常!'
);
}
const
data
:
any
=
response
.
data
;
if
(
Object
.
keys
(
data
).
length
>
0
)
{
list
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
resolve
(
list
);
}
else
{
resolve
([]);
}
}).
catch
((
response
:
any
)
=>
{
resolve
([]);
console
.
log
(
JSON
.
stringify
(
context
));
console
.
error
(
'查询FetchDefault数据集异常!'
);
});
}
})
}
/**
* 填充 树视图节点[订单实体数据]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
async
fillOrderentitydataNodeChilds
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[]):
Promise
<
any
>
{
if
(
filter
.
srfnodefilter
&&
!
Object
.
is
(
filter
.
srfnodefilter
,
""
))
{
}
else
{
}
}
/**
* 填充 树视图节点[订单类型数据]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
fillOrdertypecodelistNodes
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[],
rsNavContext
?:
any
,
rsNavParams
?:
any
,
rsParams
?:
any
):
Promise
<
any
>
{
context
=
this
.
handleResNavContext
(
context
,
filter
,
rsNavContext
);
filter
=
this
.
handleResNavParams
(
context
,
filter
,
rsNavParams
,
rsParams
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
this
.
codeListService
.
getItems
(
'ORDERTYPE'
,
context
).
then
((
codeListIems
:
any
)
=>
{
if
(
codeListIems
&&
codeListIems
.
length
>
0
){
const
handleChildData
=
(
context
:
any
,
item
:
any
,)
=>
{
Object
.
assign
(
item
,{
srfappctx
:
context
});
Object
.
assign
(
item
,
{
text
:
item
.
text
});
Object
.
assign
(
item
,
{
srfmajortext
:
item
.
text
});
let
strNodeId
:
string
=
"OrderTypeCodelist"
;
Object
.
assign
(
item
,
{
srfkey
:
item
.
value
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
item
.
value
;
Object
.
assign
(
item
,
{
id
:
strNodeId
});
Object
.
assign
(
item
,
{
expanded
:
filter
.
isautoexpand
});
Object
.
assign
(
item
,
{
nodeid
:
item
.
srfkey
});
Object
.
assign
(
item
,
{
nodeid2
:
item
.
pvalue
});
Object
.
assign
(
item
,
{
nodeType
:
"CODELIST"
,
appEntityName
:
"ibizorder"
});
}
codeListIems
=
this
.
handleDataSet
(
JSON
.
parse
(
JSON
.
stringify
(
codeListIems
)),
context
,
handleChildData
);
codeListIems
.
forEach
((
item
:
any
)
=>
{
let
treeNode
:
any
=
{};
Object
.
assign
(
treeNode
,{
srfappctx
:
context
});
Object
.
assign
(
treeNode
,
{
text
:
item
.
text
});
Object
.
assign
(
treeNode
,
{
srfmajortext
:
treeNode
.
text
});
let
strNodeId
:
string
=
"OrderTypeCodelist"
;
Object
.
assign
(
treeNode
,
{
srfkey
:
item
.
value
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
item
.
value
;
Object
.
assign
(
treeNode
,
{
id
:
strNodeId
});
Object
.
assign
(
treeNode
,
{
expanded
:
filter
.
isautoexpand
});
Object
.
assign
(
treeNode
,
{
leaf
:
true
});
if
(
item
.
children
&&
item
.
children
.
length
>
0
){
Object
.
assign
(
treeNode
,
{
children
:
item
.
children
});
}
Object
.
assign
(
treeNode
,
{
nodeid
:
treeNode
.
srfkey
});
Object
.
assign
(
treeNode
,
{
nodeid2
:
filter
.
strRealNodeId
});
Object
.
assign
(
treeNode
,
{
nodeType
:
"CODELIST"
,
appEntityName
:
"ibizorder"
});
list
.
push
(
treeNode
);
resolve
(
list
);
})
}
else
{
resolve
(
list
);
}
});
});
}
/**
* 填充 树视图节点[订单类型数据]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
async
fillOrdertypecodelistNodeChilds
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[]):
Promise
<
any
>
{
if
(
filter
.
srfnodefilter
&&
!
Object
.
is
(
filter
.
srfnodefilter
,
""
))
{
}
else
{
}
}
/**
* 填充 树视图节点[默认根节点]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
fillRootNodes
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[],
rsNavContext
?:
any
,
rsNavParams
?:
any
,
rsParams
?:
any
):
Promise
<
any
>
{
context
=
this
.
handleResNavContext
(
context
,
filter
,
rsNavContext
);
filter
=
this
.
handleResNavParams
(
context
,
filter
,
rsNavParams
,
rsParams
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
treeNode
:
any
=
{};
Object
.
assign
(
treeNode
,
{
text
:
i18n
.
t
(
'entities.ibizorder.selecttree_treeview.nodes.root'
)
});
Object
.
assign
(
treeNode
,
{
isUseLangRes
:
true
});
Object
.
assign
(
treeNode
,{
srfappctx
:
context
});
Object
.
assign
(
treeNode
,
{
srfmajortext
:
treeNode
.
text
});
let
strNodeId
:
string
=
'ROOT'
;
Object
.
assign
(
treeNode
,
{
srfkey
:
'root'
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
'root'
;
Object
.
assign
(
treeNode
,
{
id
:
strNodeId
});
Object
.
assign
(
treeNode
,
{
expanded
:
filter
.
isAutoexpand
});
Object
.
assign
(
treeNode
,
{
leaf
:
false
});
Object
.
assign
(
treeNode
,
{
nodeid
:
treeNode
.
srfkey
});
Object
.
assign
(
treeNode
,
{
nodeid2
:
filter
.
strRealNodeId
});
Object
.
assign
(
treeNode
,
{
nodeType
:
"STATIC"
});
list
.
push
(
treeNode
);
resolve
(
list
);
});
}
/**
* 填充 树视图节点[默认根节点]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
async
fillRootNodeChilds
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[]):
Promise
<
any
>
{
if
(
filter
.
srfnodefilter
&&
!
Object
.
is
(
filter
.
srfnodefilter
,
""
))
{
// 填充订单数据
let
OrderdataRsNavContext
:
any
=
{};
let
OrderdataRsNavParams
:
any
=
{};
let
OrderdataRsParams
:
any
=
{};
await
this
.
fillOrderdataNodes
(
context
,
filter
,
list
,
OrderdataRsNavContext
,
OrderdataRsNavParams
,
OrderdataRsParams
);
}
else
{
// 填充订单数据
let
OrderdataRsNavContext
:
any
=
{};
let
OrderdataRsNavParams
:
any
=
{};
let
OrderdataRsParams
:
any
=
{};
await
this
.
fillOrderdataNodes
(
context
,
filter
,
list
,
OrderdataRsNavContext
,
OrderdataRsNavParams
,
OrderdataRsParams
);
}
}
/**
* 填充 树视图节点[订单数据]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
fillOrderdataNodes
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[],
rsNavContext
?:
any
,
rsNavParams
?:
any
,
rsParams
?:
any
):
Promise
<
any
>
{
context
=
this
.
handleResNavContext
(
context
,
filter
,
rsNavContext
);
filter
=
this
.
handleResNavParams
(
context
,
filter
,
rsNavParams
,
rsParams
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
treeNode
:
any
=
{};
Object
.
assign
(
treeNode
,
{
text
:
i18n
.
t
(
'entities.ibizorder.selecttree_treeview.nodes.orderdata'
)
});
Object
.
assign
(
treeNode
,
{
isUseLangRes
:
true
});
Object
.
assign
(
treeNode
,{
srfappctx
:
context
});
Object
.
assign
(
treeNode
,
{
srfmajortext
:
treeNode
.
text
});
let
strNodeId
:
string
=
'OrderData'
;
// 没有指定节点值,直接使用父节点值
Object
.
assign
(
treeNode
,
{
srfkey
:
filter
.
strRealNodeId
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
filter
.
strRealNodeId
;
Object
.
assign
(
treeNode
,
{
id
:
strNodeId
});
Object
.
assign
(
treeNode
,
{
expanded
:
filter
.
isAutoexpand
});
Object
.
assign
(
treeNode
,
{
leaf
:
false
});
Object
.
assign
(
treeNode
,
{
nodeid
:
treeNode
.
srfkey
});
Object
.
assign
(
treeNode
,
{
nodeid2
:
filter
.
strRealNodeId
});
Object
.
assign
(
treeNode
,
{
nodeType
:
"STATIC"
});
list
.
push
(
treeNode
);
resolve
(
list
);
});
}
/**
* 填充 树视图节点[订单数据]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
async
fillOrderdataNodeChilds
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[]):
Promise
<
any
>
{
if
(
filter
.
srfnodefilter
&&
!
Object
.
is
(
filter
.
srfnodefilter
,
""
))
{
// 填充订单实体数据
let
OrderentitydataRsNavContext
:
any
=
{};
let
OrderentitydataRsNavParams
:
any
=
{};
let
OrderentitydataRsParams
:
any
=
{};
await
this
.
fillOrderentitydataNodes
(
context
,
filter
,
list
,
OrderentitydataRsNavContext
,
OrderentitydataRsNavParams
,
OrderentitydataRsParams
);
}
else
{
// 填充订单实体数据
let
OrderentitydataRsNavContext
:
any
=
{};
let
OrderentitydataRsNavParams
:
any
=
{};
let
OrderentitydataRsParams
:
any
=
{};
await
this
.
fillOrderentitydataNodes
(
context
,
filter
,
list
,
OrderentitydataRsNavContext
,
OrderentitydataRsNavParams
,
OrderentitydataRsParams
);
}
}
/**
* 填充 树视图节点[订单类型]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
fillOrdertypeNodes
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[],
rsNavContext
?:
any
,
rsNavParams
?:
any
,
rsParams
?:
any
):
Promise
<
any
>
{
context
=
this
.
handleResNavContext
(
context
,
filter
,
rsNavContext
);
filter
=
this
.
handleResNavParams
(
context
,
filter
,
rsNavParams
,
rsParams
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
treeNode
:
any
=
{};
Object
.
assign
(
treeNode
,
{
text
:
i18n
.
t
(
'entities.ibizorder.selecttree_treeview.nodes.ordertype'
)
});
Object
.
assign
(
treeNode
,
{
isUseLangRes
:
true
});
Object
.
assign
(
treeNode
,{
srfappctx
:
context
});
Object
.
assign
(
treeNode
,
{
srfmajortext
:
treeNode
.
text
});
let
strNodeId
:
string
=
'OrderType'
;
// 没有指定节点值,直接使用父节点值
Object
.
assign
(
treeNode
,
{
srfkey
:
filter
.
strRealNodeId
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
filter
.
strRealNodeId
;
Object
.
assign
(
treeNode
,
{
id
:
strNodeId
});
Object
.
assign
(
treeNode
,
{
expanded
:
filter
.
isAutoexpand
});
Object
.
assign
(
treeNode
,
{
leaf
:
false
});
Object
.
assign
(
treeNode
,
{
nodeid
:
treeNode
.
srfkey
});
Object
.
assign
(
treeNode
,
{
nodeid2
:
filter
.
strRealNodeId
});
Object
.
assign
(
treeNode
,
{
nodeType
:
"STATIC"
});
list
.
push
(
treeNode
);
resolve
(
list
);
});
}
/**
* 填充 树视图节点[订单类型]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
async
fillOrdertypeNodeChilds
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[]):
Promise
<
any
>
{
if
(
filter
.
srfnodefilter
&&
!
Object
.
is
(
filter
.
srfnodefilter
,
""
))
{
// 填充订单类型数据
let
OrdertypecodelistRsNavContext
:
any
=
{};
let
OrdertypecodelistRsNavParams
:
any
=
{};
let
OrdertypecodelistRsParams
:
any
=
{};
await
this
.
fillOrdertypecodelistNodes
(
context
,
filter
,
list
,
OrdertypecodelistRsNavContext
,
OrdertypecodelistRsNavParams
,
OrdertypecodelistRsParams
);
}
else
{
// 填充订单类型数据
let
OrdertypecodelistRsNavContext
:
any
=
{};
let
OrdertypecodelistRsNavParams
:
any
=
{};
let
OrdertypecodelistRsParams
:
any
=
{};
await
this
.
fillOrdertypecodelistNodes
(
context
,
filter
,
list
,
OrdertypecodelistRsNavContext
,
OrdertypecodelistRsNavParams
,
OrdertypecodelistRsParams
);
}
}
/**
* 填充 树视图节点[订单状态]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
fillOrderstateNodes
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[],
rsNavContext
?:
any
,
rsNavParams
?:
any
,
rsParams
?:
any
):
Promise
<
any
>
{
context
=
this
.
handleResNavContext
(
context
,
filter
,
rsNavContext
);
filter
=
this
.
handleResNavParams
(
context
,
filter
,
rsNavParams
,
rsParams
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
treeNode
:
any
=
{};
Object
.
assign
(
treeNode
,
{
text
:
i18n
.
t
(
'entities.ibizorder.selecttree_treeview.nodes.orderstate'
)
});
Object
.
assign
(
treeNode
,
{
isUseLangRes
:
true
});
Object
.
assign
(
treeNode
,{
srfappctx
:
context
});
Object
.
assign
(
treeNode
,
{
srfmajortext
:
treeNode
.
text
});
let
strNodeId
:
string
=
'OrderState'
;
// 没有指定节点值,直接使用父节点值
Object
.
assign
(
treeNode
,
{
srfkey
:
filter
.
strRealNodeId
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
filter
.
strRealNodeId
;
Object
.
assign
(
treeNode
,
{
id
:
strNodeId
});
Object
.
assign
(
treeNode
,
{
expanded
:
filter
.
isAutoexpand
});
Object
.
assign
(
treeNode
,
{
leaf
:
false
});
Object
.
assign
(
treeNode
,
{
nodeid
:
treeNode
.
srfkey
});
Object
.
assign
(
treeNode
,
{
nodeid2
:
filter
.
strRealNodeId
});
Object
.
assign
(
treeNode
,
{
nodeType
:
"STATIC"
});
list
.
push
(
treeNode
);
resolve
(
list
);
});
}
/**
* 填充 树视图节点[订单状态]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
async
fillOrderstateNodeChilds
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[]):
Promise
<
any
>
{
if
(
filter
.
srfnodefilter
&&
!
Object
.
is
(
filter
.
srfnodefilter
,
""
))
{
// 填充订单业务状态
let
OrderstatecodelistRsNavContext
:
any
=
{};
let
OrderstatecodelistRsNavParams
:
any
=
{};
let
OrderstatecodelistRsParams
:
any
=
{};
await
this
.
fillOrderstatecodelistNodes
(
context
,
filter
,
list
,
OrderstatecodelistRsNavContext
,
OrderstatecodelistRsNavParams
,
OrderstatecodelistRsParams
);
}
else
{
// 填充订单业务状态
let
OrderstatecodelistRsNavContext
:
any
=
{};
let
OrderstatecodelistRsNavParams
:
any
=
{};
let
OrderstatecodelistRsParams
:
any
=
{};
await
this
.
fillOrderstatecodelistNodes
(
context
,
filter
,
list
,
OrderstatecodelistRsNavContext
,
OrderstatecodelistRsNavParams
,
OrderstatecodelistRsParams
);
}
}
/**
* 填充 树视图节点[订单业务状态]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
fillOrderstatecodelistNodes
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[],
rsNavContext
?:
any
,
rsNavParams
?:
any
,
rsParams
?:
any
):
Promise
<
any
>
{
context
=
this
.
handleResNavContext
(
context
,
filter
,
rsNavContext
);
filter
=
this
.
handleResNavParams
(
context
,
filter
,
rsNavParams
,
rsParams
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
codeListIems
:
Array
<
any
>
=
[];
if
(
this
.
getStore
())
{
codeListIems
=
(
this
.
getStore
()
as
any
).
getters
.
getCodeListItems
(
'ORDERSTATE'
);
}
if
(
codeListIems
&&
codeListIems
.
length
>
0
){
const
handleChildData
=
(
context
:
any
,
item
:
any
,)
=>
{
Object
.
assign
(
item
,{
srfappctx
:
context
});
Object
.
assign
(
item
,
{
text
:
i18n
.
t
(
'codelist.ORDERSTATE.'
+
item
.
value
)
});
Object
.
assign
(
item
,
{
isUseLangRes
:
true
});
Object
.
assign
(
item
,
{
srfmajortext
:
item
.
text
});
let
strNodeId
:
string
=
"OrderStateCodelist"
;
Object
.
assign
(
item
,
{
srfkey
:
item
.
value
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
item
.
value
;
Object
.
assign
(
item
,
{
id
:
strNodeId
});
Object
.
assign
(
item
,
{
expanded
:
filter
.
isautoexpand
});
Object
.
assign
(
item
,
{
nodeid
:
item
.
srfkey
});
Object
.
assign
(
item
,
{
nodeid2
:
item
.
pvalue
});
Object
.
assign
(
item
,
{
nodeType
:
'STATIC'
});
}
codeListIems
=
this
.
handleDataSet
(
JSON
.
parse
(
JSON
.
stringify
(
codeListIems
)),
context
,
handleChildData
);
codeListIems
.
forEach
((
item
:
any
)
=>
{
let
treeNode
:
any
=
{};
Object
.
assign
(
treeNode
,{
srfappctx
:
context
});
Object
.
assign
(
treeNode
,
{
text
:
i18n
.
t
(
'codelist.ORDERSTATE.'
+
item
.
value
)
});
Object
.
assign
(
treeNode
,
{
isUseLangRes
:
true
});
Object
.
assign
(
treeNode
,
{
srfmajortext
:
treeNode
.
text
});
let
strNodeId
:
string
=
"OrderStateCodelist"
;
Object
.
assign
(
treeNode
,
{
srfkey
:
item
.
value
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
item
.
value
;
Object
.
assign
(
treeNode
,
{
id
:
strNodeId
});
Object
.
assign
(
treeNode
,
{
expanded
:
filter
.
isautoexpand
});
Object
.
assign
(
treeNode
,
{
leaf
:
true
});
if
(
item
.
children
&&
item
.
children
.
length
>
0
){
Object
.
assign
(
treeNode
,
{
children
:
item
.
children
});
}
Object
.
assign
(
treeNode
,
{
nodeid
:
treeNode
.
srfkey
});
Object
.
assign
(
treeNode
,
{
nodeid2
:
filter
.
strRealNodeId
});
Object
.
assign
(
treeNode
,
{
nodeType
:
'STATIC'
});
list
.
push
(
treeNode
);
resolve
(
list
);
})
}
else
{
resolve
(
list
);
}
});
}
/**
* 填充 树视图节点[订单业务状态]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof SelectTreeService
*/
@
Errorlog
public
async
fillOrderstatecodelistNodeChilds
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[]):
Promise
<
any
>
{
if
(
filter
.
srfnodefilter
&&
!
Object
.
is
(
filter
.
srfnodefilter
,
""
))
{
}
else
{
}
}
/**
* 处理代码表返回数据(树状结构)
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof SelectTreeService
*/
public
handleDataSet
(
result
:
Array
<
any
>
,
context
:
any
,
callBack
:
any
){
let
list
:
Array
<
any
>
=
[];
if
(
result
.
length
===
0
){
return
list
;
}
result
.
forEach
((
codeItem
:
any
)
=>
{
if
(
!
codeItem
.
pvalue
){
let
valueField
:
string
=
codeItem
.
value
;
this
.
setChildCodeItems
(
valueField
,
result
,
codeItem
);
list
.
push
(
codeItem
);
}
})
this
.
setNodeData
(
list
,
context
,
callBack
);
return
list
;
}
/**
* 处理非根节点数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof SelectTreeService
*/
public
setChildCodeItems
(
pValue
:
string
,
result
:
Array
<
any
>
,
codeItem
:
any
){
result
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
pvalue
==
pValue
){
let
valueField
:
string
=
item
.
value
;
this
.
setChildCodeItems
(
valueField
,
result
,
item
);
if
(
!
codeItem
.
children
){
codeItem
.
children
=
[];
}
codeItem
.
children
.
push
(
item
);
}
})
}
/**
* 设置节点UI数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof SelectTreeService
*/
public
setNodeData
(
result
:
Array
<
any
>
,
context
:
any
,
callBack
:
any
){
result
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
children
){
item
.
leaf
=
false
;
this
.
setNodeData
(
item
.
children
,
context
,
callBack
);
}
else
{
item
.
leaf
=
true
;
}
callBack
(
context
,
item
);
})
}
/**
* 处理节点关系导航上下文
*
* @param context 应用上下文
* @param filter 参数
* @param resNavContext 节点关系导航上下文
*
* @memberof SelectTreeService
*/
public
handleResNavContext
(
context
:
any
,
filter
:
any
,
resNavContext
:
any
){
if
(
resNavContext
&&
Object
.
keys
(
resNavContext
).
length
>
0
){
let
tempContextData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempViewParams
:
any
=
{};
if
(
filter
&&
filter
.
viewparams
){
tempViewParams
=
filter
.
viewparams
;
}
Object
.
keys
(
resNavContext
).
forEach
((
item
:
any
)
=>
{
let
curDataObj
:
any
=
resNavContext
[
item
];
this
.
handleCustomDataLogic
(
context
,
tempViewParams
,
curDataObj
,
tempContextData
,
item
);
})
return
tempContextData
;
}
else
{
return
context
;
}
}
/**
* 处理关系导航参数
*
* @param context 应用上下文
* @param filter 参数
* @param resNavParams 节点关系导航参数
* @param resParams 节点关系参数
*
* @memberof SelectTreeService
*/
public
handleResNavParams
(
context
:
any
,
filter
:
any
,
resNavParams
:
any
,
resParams
:
any
){
if
((
resNavParams
&&
Object
.
keys
(
resNavParams
).
length
>
0
)
||
(
resParams
&&
Object
.
keys
(
resParams
).
length
>
0
)){
let
tempViewParamData
:
any
=
{};
let
tempViewParams
:
any
=
{};
if
(
filter
&&
filter
.
viewparams
){
tempViewParams
=
filter
.
viewparams
;
tempViewParamData
=
JSON
.
parse
(
JSON
.
stringify
(
filter
.
viewparams
));
}
if
(
Object
.
keys
(
resNavParams
).
length
>
0
){
Object
.
keys
(
resNavParams
).
forEach
((
item
:
any
)
=>
{
let
curDataObj
:
any
=
resNavParams
[
item
];
this
.
handleCustomDataLogic
(
context
,
tempViewParams
,
curDataObj
,
tempViewParamData
,
item
);
})
}
if
(
Object
.
keys
(
resParams
).
length
>
0
){
Object
.
keys
(
resParams
).
forEach
((
item
:
any
)
=>
{
let
curDataObj
:
any
=
resParams
[
item
];
tempViewParamData
[
item
.
toLowerCase
()]
=
curDataObj
.
value
;
})
}
Object
.
assign
(
filter
,{
viewparams
:
tempViewParamData
});
return
filter
;
}
else
{
return
filter
;
}
}
/**
* 处理自定义节点关系导航数据
*
* @param context 应用上下文
* @param viewparams 参数
* @param curNavData 节点关系导航参数对象
* @param tempData 返回数据
* @param item 节点关系导航参数键值
*
* @memberof SelectTreeService
*/
public
handleCustomDataLogic
(
context
:
any
,
viewparams
:
any
,
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
(
context
[(
curNavData
.
value
).
toLowerCase
()]
!=
null
){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
context
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
if
(
viewparams
[(
curNavData
.
value
).
toLowerCase
()]
!=
null
){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
viewparams
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
}
}
}
\ No newline at end of file
app_Web/src/widgets/ibizorder/select-tree-treeview/select-tree-treeview.less
0 → 100644
浏览文件 @
d063b250
.tree-right-menu {
.ivu-divider-horizontal {
width: 100%;
min-width: 100%;
margin: 0 auto;
}
.ivu-dropdown-item {
position: relative;
padding-left: 32px;
> i {
position: absolute;
left: 16px;
top: 10px;
}
.ivu-icon-ios-arrow-forward {
left: initial;
right: 4px;
}
}
.ivu-dropdown {
.ivu-select-dropdown {
margin: 0;
}
}
}
.el-tree .context-menu-component .tree-node{
width: calc(100% - 15px);
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
.icon{
padding-right: 10px;
}
}
// this is less
app_Web/src/widgets/ibizorder/select-tree-treeview/select-tree-treeview.vue
0 → 100644
浏览文件 @
d063b250
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
SelectTreeBase
from
'./select-tree-treeview-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
SelectTree
extends
SelectTreeBase
{
}
</
script
>
\ No newline at end of file
demo-core/src/main/resources/permission/systemResource.json
浏览文件 @
d063b250
...
...
@@ -302,7 +302,7 @@
{
"appid"
:
"Web"
,
"appname"
:
"演示应用"
,
"appmenu"
:[{
"menuid"
:
"MainMenu"
,
"menuname"
:
"MainMenu"
,
"menuitem"
:[{
"id"
:
"menuitem1"
,
"name"
:
"工作台"
},{
"id"
:
"menuitem3"
,
"name"
:
"控件"
,
"items"
:[{
"id"
:
"menuitem6"
,
"name"
:
"默认数据类型"
},{
"id"
:
"menuitem7"
,
"name"
:
"默认编辑器类型"
},{
"id"
:
"menuitem15"
,
"name"
:
"基础表单项"
},{
"id"
:
"menuitem72"
,
"name"
:
"扩展编辑器"
}]},{
"id"
:
"menuitem4"
,
"name"
:
"部件"
,
"items"
:[{
"id"
:
"menuitem12"
,
"name"
:
"编辑表单"
,
"items"
:[{
"id"
:
"menuitem107"
,
"name"
:
"内置功能"
},{
"id"
:
"menuitem47"
,
"name"
:
"新建默认值"
},{
"id"
:
"menuitem99"
,
"name"
:
"更新默认值"
},{
"id"
:
"menuitem48"
,
"name"
:
"输入提示"
},{
"id"
:
"menuitem49"
,
"name"
:
"辅助输入"
},{
"id"
:
"menuitem50"
,
"name"
:
"自动填充"
},{
"id"
:
"menuitem51"
,
"name"
:
"超链接"
},{
"id"
:
"menuitem52"
,
"name"
:
"表单值重置"
},{
"id"
:
"menuitem55"
,
"name"
:
"动态显示"
},{
"id"
:
"menuitem53"
,
"name"
:
"动态启用"
},{
"id"
:
"menuitem54"
,
"name"
:
"动态空输入"
},{
"id"
:
"menuitem56"
,
"name"
:
"表单项更新"
},{
"id"
:
"menuitem108"
,
"name"
:
"表单值规则"
}]},{
"id"
:
"menuitem16"
,
"name"
:
"搜索表单"
},{
"id"
:
"menuitem13"
,
"name"
:
"表格"
,
"items"
:[{
"id"
:
"menuitem57"
,
"name"
:
"禁用排序"
},{
"id"
:
"menuitem59"
,
"name"
:
"行操作"
},{
"id"
:
"menuitem58"
,
"name"
:
"行编辑"
},{
"id"
:
"menuitem73"
,
"name"
:
"内置功能"
},{
"id"
:
"menuitem74"
,
"name"
:
"表格行编辑"
},{
"id"
:
"menuitem75"
,
"name"
:
"新建默认值"
},{
"id"
:
"menuitem76"
,
"name"
:
"更新默认值"
},{
"id"
:
"menuitem77"
,
"name"
:
"表格值规则"
},{
"id"
:
"menuitem132"
,
"name"
:
"表格列更新"
},{
"id"
:
"menuitem133"
,
"name"
:
"表格列重置"
},{
"id"
:
"menuitem78"
,
"name"
:
"自动分组"
},{
"id"
:
"menuitem80"
,
"name"
:
"代码表分组"
},{
"id"
:
"menuitem81"
,
"name"
:
"当前页聚合"
},{
"id"
:
"menuitem82"
,
"name"
:
"远程聚合"
}]},{
"id"
:
"menuitem83"
,
"name"
:
"列表"
,
"items"
:[{
"id"
:
"menuitem84"
,
"name"
:
"列表内置功能"
},{
"id"
:
"menuitem85"
,
"name"
:
"列表自动分组"
},{
"id"
:
"menuitem86"
,
"name"
:
"代码表分组"
},{
"id"
:
"menuitem91"
,
"name"
:
"列表嵌入面板"
}]},{
"id"
:
"menuitem14"
,
"name"
:
"树视图"
,
"items"
:[{
"id"
:
"menuitem60"
,
"name"
:
"静态节点"
},{
"id"
:
"menuitem61"
,
"name"
:
"动态节点(代码表)"
},{
"id"
:
"menuitem62"
,
"name"
:
"动态节点(实体)"
},{
"id"
:
"menuitem63"
,
"name"
:
"右键操作"
},{
"id"
:
"menuitem64"
,
"name"
:
"动态参数过滤"
},{
"id"
:
"menuitem110"
,
"name"
:
"树表格"
}]},{
"id"
:
"menuitem37"
,
"name"
:
"图表"
,
"items"
:[{
"id"
:
"menuitem38"
,
"name"
:
"柱状图"
},{
"id"
:
"menuitem39"
,
"name"
:
"折线图"
},{
"id"
:
"menuitem40"
,
"name"
:
"饼图"
},{
"id"
:
"menuitem41"
,
"name"
:
"区域图"
},{
"id"
:
"menuitem42"
,
"name"
:
"雷达图"
}]},{
"id"
:
"menuitem17"
,
"name"
:
"向导"
,
"items"
:[{
"id"
:
"menuitem134"
,
"name"
:
"向导视图"
},{
"id"
:
"menuitem135"
,
"name"
:
"状态向导"
}]},{
"id"
:
"menuitem18"
,
"name"
:
"界面行为"
,
"items"
:[{
"id"
:
"menuitem65"
,
"name"
:
"前端界面行为"
},{
"id"
:
"menuitem66"
,
"name"
:
"后台界面行为"
}]},{
"id"
:
"menuitem87"
,
"name"
:
"数据视图"
,
"items"
:[{
"id"
:
"menuitem88"
,
"name"
:
"内置功能"
},{
"id"
:
"menuitem89"
,
"name"
:
"自动分组"
},{
"id"
:
"menuitem90"
,
"name"
:
"代码表分组"
},{
"id"
:
"menuitem94"
,
"name"
:
"项布局面板"
}]},{
"id"
:
"menuitem95"
,
"name"
:
"日历"
,
"items"
:[{
"id"
:
"menuitem96"
,
"name"
:
"内置功能"
},{
"id"
:
"menuitem97"
,
"name"
:
"时间轴样式"
},{
"id"
:
"menuitem109"
,
"name"
:
"项布局面板"
}]},{
"id"
:
"menuitem101"
,
"name"
:
"看板"
,
"items"
:[{
"id"
:
"menuitem102"
,
"name"
:
"看板内置功能"
},{
"id"
:
"menuitem104"
,
"name"
:
"代码表分组"
},{
"id"
:
"menuitem105"
,
"name"
:
"嵌入视图面板"
}]},{
"id"
:
"menuitem111"
,
"name"
:
"甘特图"
,
"items"
:[{
"id"
:
"menuitem112"
,
"name"
:
"甘特图"
}]},{
"id"
:
"menuitem119"
,
"name"
:
"分页视图"
,
"items"
:[{
"id"
:
"menuitem120"
,
"name"
:
"分页导航"
}]},{
"id"
:
"menuitem121"
,
"name"
:
"多编辑视图"
,
"items"
:[{
"id"
:
"menuitem115"
,
"name"
:
"多表单(行记录)"
},{
"id"
:
"menuitem123"
,
"name"
:
"多表单(上分页)"
}]},{
"id"
:
"menuitem122"
,
"name"
:
"数据关系栏"
,
"items"
:[{
"id"
:
"menuitem116"
,
"name"
:
"编辑视图(左右关系)"
},{
"id"
:
"menuitem117"
,
"name"
:
"编辑视图(上下关系)"
},{
"id"
:
"menuitem118"
,
"name"
:
"编辑视图(分页关系)"
}]},{
"id"
:
"menuitem125"
,
"name"
:
"数据看板"
,
"items"
:[{
"id"
:
"menuitem126"
,
"name"
:
"实体数据看板"
}]},{
"id"
:
"menuitem127"
,
"name"
:
"导航视图"
,
"items"
:[{
"id"
:
"menuitem128"
,
"name"
:
"表格导航"
},{
"id"
:
"menuitem114"
,
"name"
:
"列表导航"
},{
"id"
:
"menuitem136"
,
"name"
:
"树导航"
},{
"id"
:
"menuitem137"
,
"name"
:
"卡片导航"
},{
"id"
:
"menuitem138"
,
"name"
:
"日历导航"
},{
"id"
:
"menuitem139"
,
"name"
:
"时间轴导航"
}]},{
"id"
:
"menuitem129"
,
"name"
:
"选项操作"
,
"items"
:[{
"id"
:
"menuitem131"
,
"name"
:
"表格选项操作"
}]},{
"id"
:
"menuitem142"
,
"name"
:
"选择视图"
,
"items"
:[{
"id"
:
"menuitem143"
,
"name"
:
"数据选择视图"
}]}]},{
"id"
:
"menuitem5"
,
"name"
:
"视图"
,
"items"
:[{
"id"
:
"menuitem9"
,
"name"
:
"列表视图"
,
"items"
:[{
"id"
:
"menuitem19"
,
"name"
:
"常规表格视图"
},{
"id"
:
"menuitem21"
,
"name"
:
"左右表格视图"
},{
"id"
:
"menuitem20"
,
"name"
:
"嵌入表格视图"
}]},{
"id"
:
"menuitem8"
,
"name"
:
"编辑视图"
,
"items"
:[{
"id"
:
"menuitem22"
,
"name"
:
"常规编辑视图"
},{
"id"
:
"menuitem23"
,
"name"
:
"左右编辑视图"
},{
"id"
:
"menuitem24"
,
"name"
:
"分页编辑视图"
},{
"id"
:
"menuitem25"
,
"name"
:
"嵌入编辑视图"
}]},{
"id"
:
"menuitem26"
,
"name"
:
"选择视图"
,
"items"
:[{
"id"
:
"menuitem27"
,
"name"
:
"单选视图"
},{
"id"
:
"menuitem28"
,
"name"
:
"多选视图"
},{
"id"
:
"menuitem29"
,
"name"
:
"树形选择视图"
},{
"id"
:
"menuitem30"
,
"name"
:
"左右单选视图"
},{
"id"
:
"menuitem31"
,
"name"
:
"左右多选视图"
}]},{
"id"
:
"menuitem10"
,
"name"
:
"导航视图"
,
"items"
:[{
"id"
:
"menuitem32"
,
"name"
:
"常规导航视图"
},{
"id"
:
"menuitem33"
,
"name"
:
"分页导航视图"
},{
"id"
:
"menuitem34"
,
"name"
:
"嵌入导航视图"
}]},{
"id"
:
"menuitem11"
,
"name"
:
"其他视图"
,
"items"
:[{
"id"
:
"menuitem35"
,
"name"
:
"图表视图"
},{
"id"
:
"menuitem36"
,
"name"
:
"报表视图"
},{
"id"
:
"menuitem98"
,
"name"
:
"自定义视图"
}]},{
"id"
:
"menuitem79"
,
"name"
:
"表格视图"
},{
"id"
:
"menuitem140"
,
"name"
:
"单数据视图"
},{
"id"
:
"menuitem141"
,
"name"
:
"多数据视图"
}]},{
"id"
:
"menuitem69"
,
"name"
:
"工作流"
},{
"id"
:
"menuitem2"
,
"name"
:
"更多"
,
"items"
:[{
"id"
:
"menuitem46"
,
"name"
:
"数据导出导入"
},{
"id"
:
"menuitem45"
,
"name"
:
"数据打印"
},{
"id"
:
"menuitem67"
,
"name"
:
"索引实体"
},{
"id"
:
"menuitem68"
,
"name"
:
"继承实体"
},{
"id"
:
"menuitem70"
,
"name"
:
"主状态"
},{
"id"
:
"menuitem71"
,
"name"
:
"多表单"
}]},{
"id"
:
"menuitem92"
,
"name"
:
"其他"
,
"items"
:[{
"id"
:
"menuitem93"
,
"name"
:
"示例实体02示例数据补充"
},{
"id"
:
"menuitem100"
,
"name"
:
"订单示例数据补充"
},{
"id"
:
"menuitem103"
,
"name"
:
"产品示例数据补充"
},{
"id"
:
"menuitem106"
,
"name"
:
"示例实体03示例数据补充"
},{
"id"
:
"menuitem113"
,
"name"
:
"订单类型添加"
},{
"id"
:
"menuitem124"
,
"name"
:
"示例实体01数据补充"
},{
"id"
:
"menuitem144"
,
"name"
:
"客户实体示例数据补充"
}]}]
}]
"appmenu"
:[{
"menuid"
:
"MainMenu"
,
"menuname"
:
"MainMenu"
,
"menuitem"
:[{
"id"
:
"menuitem1"
,
"name"
:
"工作台"
},{
"id"
:
"menuitem3"
,
"name"
:
"控件"
,
"items"
:[{
"id"
:
"menuitem6"
,
"name"
:
"默认数据类型"
},{
"id"
:
"menuitem7"
,
"name"
:
"默认编辑器类型"
},{
"id"
:
"menuitem15"
,
"name"
:
"基础表单项"
},{
"id"
:
"menuitem72"
,
"name"
:
"扩展编辑器"
}]},{
"id"
:
"menuitem4"
,
"name"
:
"部件"
,
"items"
:[{
"id"
:
"menuitem12"
,
"name"
:
"编辑表单"
,
"items"
:[{
"id"
:
"menuitem107"
,
"name"
:
"内置功能"
},{
"id"
:
"menuitem47"
,
"name"
:
"新建默认值"
},{
"id"
:
"menuitem99"
,
"name"
:
"更新默认值"
},{
"id"
:
"menuitem48"
,
"name"
:
"输入提示"
},{
"id"
:
"menuitem49"
,
"name"
:
"辅助输入"
},{
"id"
:
"menuitem50"
,
"name"
:
"自动填充"
},{
"id"
:
"menuitem51"
,
"name"
:
"超链接"
},{
"id"
:
"menuitem52"
,
"name"
:
"表单值重置"
},{
"id"
:
"menuitem55"
,
"name"
:
"动态显示"
},{
"id"
:
"menuitem53"
,
"name"
:
"动态启用"
},{
"id"
:
"menuitem54"
,
"name"
:
"动态空输入"
},{
"id"
:
"menuitem56"
,
"name"
:
"表单项更新"
},{
"id"
:
"menuitem108"
,
"name"
:
"表单值规则"
}]},{
"id"
:
"menuitem16"
,
"name"
:
"搜索表单"
},{
"id"
:
"menuitem13"
,
"name"
:
"表格"
,
"items"
:[{
"id"
:
"menuitem57"
,
"name"
:
"禁用排序"
},{
"id"
:
"menuitem59"
,
"name"
:
"行操作"
},{
"id"
:
"menuitem58"
,
"name"
:
"行编辑"
},{
"id"
:
"menuitem73"
,
"name"
:
"内置功能"
},{
"id"
:
"menuitem74"
,
"name"
:
"表格行编辑"
},{
"id"
:
"menuitem75"
,
"name"
:
"新建默认值"
},{
"id"
:
"menuitem76"
,
"name"
:
"更新默认值"
},{
"id"
:
"menuitem77"
,
"name"
:
"表格值规则"
},{
"id"
:
"menuitem132"
,
"name"
:
"表格列更新"
},{
"id"
:
"menuitem133"
,
"name"
:
"表格列重置"
},{
"id"
:
"menuitem78"
,
"name"
:
"自动分组"
},{
"id"
:
"menuitem80"
,
"name"
:
"代码表分组"
},{
"id"
:
"menuitem81"
,
"name"
:
"当前页聚合"
},{
"id"
:
"menuitem82"
,
"name"
:
"远程聚合"
}]},{
"id"
:
"menuitem83"
,
"name"
:
"列表"
,
"items"
:[{
"id"
:
"menuitem84"
,
"name"
:
"列表内置功能"
},{
"id"
:
"menuitem85"
,
"name"
:
"列表自动分组"
},{
"id"
:
"menuitem86"
,
"name"
:
"代码表分组"
},{
"id"
:
"menuitem91"
,
"name"
:
"列表嵌入面板"
}]},{
"id"
:
"menuitem14"
,
"name"
:
"树视图"
,
"items"
:[{
"id"
:
"menuitem60"
,
"name"
:
"静态节点"
},{
"id"
:
"menuitem61"
,
"name"
:
"动态节点(代码表)"
},{
"id"
:
"menuitem62"
,
"name"
:
"动态节点(实体)"
},{
"id"
:
"menuitem63"
,
"name"
:
"右键操作"
},{
"id"
:
"menuitem64"
,
"name"
:
"动态参数过滤"
},{
"id"
:
"menuitem110"
,
"name"
:
"树表格"
}]},{
"id"
:
"menuitem37"
,
"name"
:
"图表"
,
"items"
:[{
"id"
:
"menuitem38"
,
"name"
:
"柱状图"
},{
"id"
:
"menuitem39"
,
"name"
:
"折线图"
},{
"id"
:
"menuitem40"
,
"name"
:
"饼图"
},{
"id"
:
"menuitem41"
,
"name"
:
"区域图"
},{
"id"
:
"menuitem42"
,
"name"
:
"雷达图"
}]},{
"id"
:
"menuitem17"
,
"name"
:
"向导"
,
"items"
:[{
"id"
:
"menuitem134"
,
"name"
:
"向导视图"
},{
"id"
:
"menuitem135"
,
"name"
:
"状态向导"
}]},{
"id"
:
"menuitem18"
,
"name"
:
"界面行为"
,
"items"
:[{
"id"
:
"menuitem65"
,
"name"
:
"前端界面行为"
},{
"id"
:
"menuitem66"
,
"name"
:
"后台界面行为"
}]},{
"id"
:
"menuitem87"
,
"name"
:
"数据视图"
,
"items"
:[{
"id"
:
"menuitem88"
,
"name"
:
"内置功能"
},{
"id"
:
"menuitem89"
,
"name"
:
"自动分组"
},{
"id"
:
"menuitem90"
,
"name"
:
"代码表分组"
},{
"id"
:
"menuitem94"
,
"name"
:
"项布局面板"
}]},{
"id"
:
"menuitem95"
,
"name"
:
"日历"
,
"items"
:[{
"id"
:
"menuitem96"
,
"name"
:
"内置功能"
},{
"id"
:
"menuitem97"
,
"name"
:
"时间轴样式"
},{
"id"
:
"menuitem109"
,
"name"
:
"项布局面板"
}]},{
"id"
:
"menuitem101"
,
"name"
:
"看板"
,
"items"
:[{
"id"
:
"menuitem102"
,
"name"
:
"看板内置功能"
},{
"id"
:
"menuitem104"
,
"name"
:
"代码表分组"
},{
"id"
:
"menuitem105"
,
"name"
:
"嵌入视图面板"
}]},{
"id"
:
"menuitem111"
,
"name"
:
"甘特图"
,
"items"
:[{
"id"
:
"menuitem112"
,
"name"
:
"甘特图"
}]},{
"id"
:
"menuitem119"
,
"name"
:
"分页视图"
,
"items"
:[{
"id"
:
"menuitem120"
,
"name"
:
"分页导航"
}]},{
"id"
:
"menuitem121"
,
"name"
:
"多编辑视图"
,
"items"
:[{
"id"
:
"menuitem115"
,
"name"
:
"多表单(行记录)"
},{
"id"
:
"menuitem123"
,
"name"
:
"多表单(上分页)"
}]},{
"id"
:
"menuitem122"
,
"name"
:
"数据关系栏"
,
"items"
:[{
"id"
:
"menuitem116"
,
"name"
:
"编辑视图(左右关系)"
},{
"id"
:
"menuitem117"
,
"name"
:
"编辑视图(上下关系)"
},{
"id"
:
"menuitem118"
,
"name"
:
"编辑视图(分页关系)"
}]},{
"id"
:
"menuitem125"
,
"name"
:
"数据看板"
,
"items"
:[{
"id"
:
"menuitem126"
,
"name"
:
"实体数据看板"
}]},{
"id"
:
"menuitem127"
,
"name"
:
"导航视图"
,
"items"
:[{
"id"
:
"menuitem128"
,
"name"
:
"表格导航"
},{
"id"
:
"menuitem114"
,
"name"
:
"列表导航"
},{
"id"
:
"menuitem136"
,
"name"
:
"树导航"
},{
"id"
:
"menuitem137"
,
"name"
:
"卡片导航"
},{
"id"
:
"menuitem138"
,
"name"
:
"日历导航"
},{
"id"
:
"menuitem139"
,
"name"
:
"时间轴导航"
}]},{
"id"
:
"menuitem129"
,
"name"
:
"选项操作"
,
"items"
:[{
"id"
:
"menuitem131"
,
"name"
:
"表格选项操作"
}]},{
"id"
:
"menuitem142"
,
"name"
:
"选择视图"
,
"items"
:[{
"id"
:
"menuitem143"
,
"name"
:
"数据选择视图"
}
,{
"id"
:
"menuitem130"
,
"name"
:
"订单明细数据选择"
}
]}]},{
"id"
:
"menuitem5"
,
"name"
:
"视图"
,
"items"
:[{
"id"
:
"menuitem9"
,
"name"
:
"列表视图"
,
"items"
:[{
"id"
:
"menuitem19"
,
"name"
:
"常规表格视图"
},{
"id"
:
"menuitem21"
,
"name"
:
"左右表格视图"
},{
"id"
:
"menuitem20"
,
"name"
:
"嵌入表格视图"
}]},{
"id"
:
"menuitem8"
,
"name"
:
"编辑视图"
,
"items"
:[{
"id"
:
"menuitem22"
,
"name"
:
"常规编辑视图"
},{
"id"
:
"menuitem23"
,
"name"
:
"左右编辑视图"
},{
"id"
:
"menuitem24"
,
"name"
:
"分页编辑视图"
},{
"id"
:
"menuitem25"
,
"name"
:
"嵌入编辑视图"
}]},{
"id"
:
"menuitem26"
,
"name"
:
"选择视图"
,
"items"
:[{
"id"
:
"menuitem27"
,
"name"
:
"单选视图"
},{
"id"
:
"menuitem28"
,
"name"
:
"多选视图"
},{
"id"
:
"menuitem29"
,
"name"
:
"树形选择视图"
},{
"id"
:
"menuitem30"
,
"name"
:
"左右单选视图"
},{
"id"
:
"menuitem31"
,
"name"
:
"左右多选视图"
}]},{
"id"
:
"menuitem10"
,
"name"
:
"导航视图"
,
"items"
:[{
"id"
:
"menuitem32"
,
"name"
:
"常规导航视图"
},{
"id"
:
"menuitem33"
,
"name"
:
"分页导航视图"
},{
"id"
:
"menuitem34"
,
"name"
:
"嵌入导航视图"
}]},{
"id"
:
"menuitem11"
,
"name"
:
"其他视图"
,
"items"
:[{
"id"
:
"menuitem35"
,
"name"
:
"图表视图"
},{
"id"
:
"menuitem36"
,
"name"
:
"报表视图"
},{
"id"
:
"menuitem98"
,
"name"
:
"自定义视图"
}]},{
"id"
:
"menuitem79"
,
"name"
:
"表格视图"
},{
"id"
:
"menuitem140"
,
"name"
:
"单数据视图"
},{
"id"
:
"menuitem141"
,
"name"
:
"多数据视图"
}]},{
"id"
:
"menuitem69"
,
"name"
:
"工作流"
},{
"id"
:
"menuitem2"
,
"name"
:
"更多"
,
"items"
:[{
"id"
:
"menuitem46"
,
"name"
:
"数据导出导入"
},{
"id"
:
"menuitem45"
,
"name"
:
"数据打印"
},{
"id"
:
"menuitem67"
,
"name"
:
"索引实体"
},{
"id"
:
"menuitem68"
,
"name"
:
"继承实体"
},{
"id"
:
"menuitem70"
,
"name"
:
"主状态"
},{
"id"
:
"menuitem71"
,
"name"
:
"多表单"
}]},{
"id"
:
"menuitem92"
,
"name"
:
"其他"
,
"items"
:[{
"id"
:
"menuitem93"
,
"name"
:
"示例实体02示例数据补充"
},{
"id"
:
"menuitem100"
,
"name"
:
"订单示例数据补充"
},{
"id"
:
"menuitem103"
,
"name"
:
"产品示例数据补充"
},{
"id"
:
"menuitem106"
,
"name"
:
"示例实体03示例数据补充"
},{
"id"
:
"menuitem113"
,
"name"
:
"订单类型添加"
},{
"id"
:
"menuitem124"
,
"name"
:
"示例实体01数据补充"
},{
"id"
:
"menuitem144"
,
"name"
:
"客户实体示例数据补充"
}]}]
}]
}
]
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录