Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzrt
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzrt
提交
90138f50
提交
90138f50
编写于
5月 27, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
71ffc6c5
变更
47
显示空白字符变更
内嵌
并排
正在显示
47 个修改的文件
包含
10839 行增加
和
10 行删除
+10839
-10
data-dictionary.json
app_Web/public/assets/json/data-dictionary.json
+27
-0
view-config.json
app_Web/public/assets/json/view-config.json
+16
-0
en-US.ts
app_Web/src/locale/lang/en-US.ts
+3
-0
zh-CN.ts
app_Web/src/locale/lang/zh-CN.ts
+3
-0
codelist_en_US.ts
app_Web/src/locale/lanres/codelist/codelist_en_US.ts
+5
-0
codelist_zh_CN.ts
app_Web/src/locale/lanres/codelist/codelist_zh_CN.ts
+5
-0
wfprocess-definition_en_US.ts
...lanres/wfprocess-definition/wfprocess-definition_en_US.ts
+190
-0
wfprocess-definition_zh_CN.ts
...lanres/wfprocess-definition/wfprocess-definition_zh_CN.ts
+189
-0
index-appmenu.ts
app_Web/src/mock/app/index-appmenu/index-appmenu.ts
+18
-0
codelist.ts
app_Web/src/mock/codelist/codelist.ts
+27
-0
wfprocess-definitions.ts
...ock/entity/wfprocess-definitions/wfprocess-definitions.ts
+380
-0
index.ts
app_Web/src/mock/index.ts
+1
-0
viewconfig.ts
app_Web/src/mock/viewconfig/viewconfig.ts
+16
-0
page-register.ts
app_Web/src/pages/rt/index/page-register.ts
+3
-1
router.ts
app_Web/src/pages/rt/index/router.ts
+518
-8
wfprocess-definition-edit-view-base.vue
...inition-edit-view/wfprocess-definition-edit-view-base.vue
+1425
-0
wfprocess-definition-edit-view.less
...-definition-edit-view/wfprocess-definition-edit-view.less
+26
-0
wfprocess-definition-edit-view.vue
...s-definition-edit-view/wfprocess-definition-edit-view.vue
+19
-0
wfprocess-definition-grid-view-base.vue
...inition-grid-view/wfprocess-definition-grid-view-base.vue
+1604
-0
wfprocess-definition-grid-view.less
...-definition-grid-view/wfprocess-definition-grid-view.less
+19
-0
wfprocess-definition-grid-view.vue
...s-definition-grid-view/wfprocess-definition-grid-view.vue
+21
-0
entity-service-register.ts
app_Web/src/service/entity-service-register.ts
+1
-0
wfprocess-definition-service-base.ts
...wfprocess-definition/wfprocess-definition-service-base.ts
+179
-0
wfprocess-definition-service.ts
...vice/wfprocess-definition/wfprocess-definition-service.ts
+25
-0
state.ts
app_Web/src/store/modules/view-action/state.ts
+366
-0
ui-service-register.ts
app_Web/src/uiservice/ui-service-register.ts
+1
-0
wfprocess-definition-ui-service-base.ts
...rocess-definition/wfprocess-definition-ui-service-base.ts
+212
-0
wfprocess-definition-ui-service.ts
...e/wfprocess-definition/wfprocess-definition-ui-service.ts
+21
-0
index-appmenu-base.vue
app_Web/src/widgets/app/index-appmenu/index-appmenu-base.vue
+21
-0
index-appmenu-model.ts
app_Web/src/widgets/app/index-appmenu/index-appmenu-model.ts
+18
-0
default-searchform-base.vue
...definition/default-searchform/default-searchform-base.vue
+759
-0
default-searchform-model.ts
...definition/default-searchform/default-searchform-model.ts
+41
-0
default-searchform-service.ts
...finition/default-searchform/default-searchform-service.ts
+371
-0
default-searchform.less
...ess-definition/default-searchform/default-searchform.less
+47
-0
default-searchform.vue
...cess-definition/default-searchform/default-searchform.vue
+14
-0
main-form-base.vue
...widgets/wfprocess-definition/main-form/main-form-base.vue
+1692
-0
main-form-model.ts
...widgets/wfprocess-definition/main-form/main-form-model.ts
+101
-0
main-form-service.ts
...dgets/wfprocess-definition/main-form/main-form-service.ts
+371
-0
main-form.less
...src/widgets/wfprocess-definition/main-form/main-form.less
+49
-0
main-form.vue
.../src/widgets/wfprocess-definition/main-form/main-form.vue
+14
-0
main-grid-base.vue
...widgets/wfprocess-definition/main-grid/main-grid-base.vue
+1467
-0
main-grid-model.ts
...widgets/wfprocess-definition/main-grid/main-grid-model.ts
+114
-0
main-grid-service.ts
...dgets/wfprocess-definition/main-grid/main-grid-service.ts
+318
-0
main-grid.less
...src/widgets/wfprocess-definition/main-grid/main-grid.less
+95
-0
main-grid.vue
.../src/widgets/wfprocess-definition/main-grid/main-grid.vue
+14
-0
application-web-prod.yml
...ibzrt-app-web/src/main/resources/application-web-prod.yml
+4
-0
systemResource.json
ibzrt-core/src/main/resources/permission/systemResource.json
+9
-1
未找到文件。
app_Web/public/assets/json/data-dictionary.json
浏览文件 @
90138f50
[
[
{
"srfkey"
:
"YesNo"
,
"emptytext"
:
"未定义"
,
"codelisttype"
:
"static"
,
"items"
:
[
{
"id"
:
"1"
,
"label"
:
"是"
,
"text"
:
"是"
,
"data"
:
""
,
"codename"
:
"Item_1"
,
"value"
:
"1"
,
"disabled"
:
false
}
,
{
"id"
:
"0"
,
"label"
:
"否"
,
"text"
:
"否"
,
"data"
:
""
,
"codename"
:
"Item_0"
,
"value"
:
"0"
,
"disabled"
:
false
}
]
},
{
{
"srfkey"
:
"CLIBZSex"
,
"srfkey"
:
"CLIBZSex"
,
"emptytext"
:
""
,
"emptytext"
:
""
,
...
...
app_Web/public/assets/json/view-config.json
浏览文件 @
90138f50
...
@@ -55,6 +55,14 @@
...
@@ -55,6 +55,14 @@
"viewname"
:
"SysUserPickupView"
,
"viewname"
:
"SysUserPickupView"
,
"viewtag"
:
"32fe9ab4a9e1b8d62b9ee802e4746965"
"viewtag"
:
"32fe9ab4a9e1b8d62b9ee802e4746965"
},
},
"wfprocessdefinitioneditview"
:
{
"title"
:
"实体编辑视图"
,
"caption"
:
"流程定义"
,
"viewtype"
:
"DEEDITVIEW"
,
"viewmodule"
:
"workflow"
,
"viewname"
:
"WFProcessDefinitionEditView"
,
"viewtag"
:
"3fcd491c13d05ab7dcce8d2c920d0aec"
},
"ibzemployeegridview"
:
{
"ibzemployeegridview"
:
{
"title"
:
"人员表格视图"
,
"title"
:
"人员表格视图"
,
"caption"
:
"人员"
,
"caption"
:
"人员"
,
...
@@ -207,6 +215,14 @@
...
@@ -207,6 +215,14 @@
"viewname"
:
"IBZDeptMemberEditView"
,
"viewname"
:
"IBZDeptMemberEditView"
,
"viewtag"
:
"bf5e850471bab461fbb6739578e510c5"
"viewtag"
:
"bf5e850471bab461fbb6739578e510c5"
},
},
"wfprocessdefinitiongridview"
:
{
"title"
:
"实体表格视图"
,
"caption"
:
"流程定义"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"workflow"
,
"viewname"
:
"WFProcessDefinitionGridView"
,
"viewtag"
:
"bfa86be8c02420f87d5cf4ff9a768948"
},
"ibzdepartmenttreeexpview"
:
{
"ibzdepartmenttreeexpview"
:
{
"title"
:
"部门树导航视图"
,
"title"
:
"部门树导航视图"
,
"caption"
:
"人员管理"
,
"caption"
:
"人员管理"
,
...
...
app_Web/src/locale/lang/en-US.ts
浏览文件 @
90138f50
...
@@ -5,6 +5,7 @@ import wfuser_en_US from '@locale/lanres/wfuser/wfuser_en_US';
...
@@ -5,6 +5,7 @@ import wfuser_en_US from '@locale/lanres/wfuser/wfuser_en_US';
import
ibzorganization_en_US
from
'@locale/lanres/ibzorganization/ibzorganization_en_US'
;
import
ibzorganization_en_US
from
'@locale/lanres/ibzorganization/ibzorganization_en_US'
;
import
wfgroup_en_US
from
'@locale/lanres/wfgroup/wfgroup_en_US'
;
import
wfgroup_en_US
from
'@locale/lanres/wfgroup/wfgroup_en_US'
;
import
sysuserrole_en_US
from
'@locale/lanres/sys-user-role/sys-user-role_en_US'
;
import
sysuserrole_en_US
from
'@locale/lanres/sys-user-role/sys-user-role_en_US'
;
import
wfprocessdefinition_en_US
from
'@locale/lanres/wfprocess-definition/wfprocess-definition_en_US'
;
import
sysrole_en_US
from
'@locale/lanres/sys-role/sys-role_en_US'
;
import
sysrole_en_US
from
'@locale/lanres/sys-role/sys-role_en_US'
;
import
ibzdeptmember_en_US
from
'@locale/lanres/ibzdept-member/ibzdept-member_en_US'
;
import
ibzdeptmember_en_US
from
'@locale/lanres/ibzdept-member/ibzdept-member_en_US'
;
import
ibzdepartment_en_US
from
'@locale/lanres/ibzdepartment/ibzdepartment_en_US'
;
import
ibzdepartment_en_US
from
'@locale/lanres/ibzdepartment/ibzdepartment_en_US'
;
...
@@ -71,6 +72,7 @@ export default {
...
@@ -71,6 +72,7 @@ export default {
menuitem3
:
'人员管理'
,
menuitem3
:
'人员管理'
,
menuitem4
:
'用户角色'
,
menuitem4
:
'用户角色'
,
menuitem5
:
'流程角色'
,
menuitem5
:
'流程角色'
,
menuitem6
:
'流程定义'
,
},
},
},
},
},
},
...
@@ -82,6 +84,7 @@ export default {
...
@@ -82,6 +84,7 @@ export default {
ibzorganization
:
ibzorganization_en_US
,
ibzorganization
:
ibzorganization_en_US
,
wfgroup
:
wfgroup_en_US
,
wfgroup
:
wfgroup_en_US
,
sysuserrole
:
sysuserrole_en_US
,
sysuserrole
:
sysuserrole_en_US
,
wfprocessdefinition
:
wfprocessdefinition_en_US
,
sysrole
:
sysrole_en_US
,
sysrole
:
sysrole_en_US
,
ibzdeptmember
:
ibzdeptmember_en_US
,
ibzdeptmember
:
ibzdeptmember_en_US
,
ibzdepartment
:
ibzdepartment_en_US
,
ibzdepartment
:
ibzdepartment_en_US
,
...
...
app_Web/src/locale/lang/zh-CN.ts
浏览文件 @
90138f50
...
@@ -5,6 +5,7 @@ import wfuser_zh_CN from '@locale/lanres/wfuser/wfuser_zh_CN';
...
@@ -5,6 +5,7 @@ import wfuser_zh_CN from '@locale/lanres/wfuser/wfuser_zh_CN';
import
ibzorganization_zh_CN
from
'@locale/lanres/ibzorganization/ibzorganization_zh_CN'
;
import
ibzorganization_zh_CN
from
'@locale/lanres/ibzorganization/ibzorganization_zh_CN'
;
import
wfgroup_zh_CN
from
'@locale/lanres/wfgroup/wfgroup_zh_CN'
;
import
wfgroup_zh_CN
from
'@locale/lanres/wfgroup/wfgroup_zh_CN'
;
import
sysuserrole_zh_CN
from
'@locale/lanres/sys-user-role/sys-user-role_zh_CN'
;
import
sysuserrole_zh_CN
from
'@locale/lanres/sys-user-role/sys-user-role_zh_CN'
;
import
wfprocessdefinition_zh_CN
from
'@locale/lanres/wfprocess-definition/wfprocess-definition_zh_CN'
;
import
sysrole_zh_CN
from
'@locale/lanres/sys-role/sys-role_zh_CN'
;
import
sysrole_zh_CN
from
'@locale/lanres/sys-role/sys-role_zh_CN'
;
import
ibzdeptmember_zh_CN
from
'@locale/lanres/ibzdept-member/ibzdept-member_zh_CN'
;
import
ibzdeptmember_zh_CN
from
'@locale/lanres/ibzdept-member/ibzdept-member_zh_CN'
;
import
ibzdepartment_zh_CN
from
'@locale/lanres/ibzdepartment/ibzdepartment_zh_CN'
;
import
ibzdepartment_zh_CN
from
'@locale/lanres/ibzdepartment/ibzdepartment_zh_CN'
;
...
@@ -71,6 +72,7 @@ export default {
...
@@ -71,6 +72,7 @@ export default {
menuitem3
:
'人员管理'
,
menuitem3
:
'人员管理'
,
menuitem4
:
'用户角色'
,
menuitem4
:
'用户角色'
,
menuitem5
:
'流程角色'
,
menuitem5
:
'流程角色'
,
menuitem6
:
'流程定义'
,
},
},
},
},
},
},
...
@@ -82,6 +84,7 @@ export default {
...
@@ -82,6 +84,7 @@ export default {
ibzorganization
:
ibzorganization_zh_CN
,
ibzorganization
:
ibzorganization_zh_CN
,
wfgroup
:
wfgroup_zh_CN
,
wfgroup
:
wfgroup_zh_CN
,
sysuserrole
:
sysuserrole_zh_CN
,
sysuserrole
:
sysuserrole_zh_CN
,
wfprocessdefinition
:
wfprocessdefinition_zh_CN
,
sysrole
:
sysrole_zh_CN
,
sysrole
:
sysrole_zh_CN
,
ibzdeptmember
:
ibzdeptmember_zh_CN
,
ibzdeptmember
:
ibzdeptmember_zh_CN
,
ibzdepartment
:
ibzdepartment_zh_CN
,
ibzdepartment
:
ibzdepartment_zh_CN
,
...
...
app_Web/src/locale/lanres/codelist/codelist_en_US.ts
浏览文件 @
90138f50
export
default
{
export
default
{
YesNo
:
{
'1'
:
'是'
,
'0'
:
'否'
,
empty
:
''
,
},
CLIBZSex
:
{
CLIBZSex
:
{
'男'
:
'男性'
,
'男'
:
'男性'
,
'女'
:
'女性'
,
'女'
:
'女性'
,
...
...
app_Web/src/locale/lanres/codelist/codelist_zh_CN.ts
浏览文件 @
90138f50
export
default
{
export
default
{
YesNo
:
{
'1'
:
'是'
,
'0'
:
'否'
,
empty
:
''
,
},
CLIBZSex
:
{
CLIBZSex
:
{
'男'
:
'男性'
,
'男'
:
'男性'
,
'女'
:
'女性'
,
'女'
:
'女性'
,
...
...
app_Web/src/locale/lanres/wfprocess-definition/wfprocess-definition_en_US.ts
0 → 100644
浏览文件 @
90138f50
export
default
{
fields
:
{
definitionkey
:
'DefinitionKey'
,
definitionname
:
'流程定义名称'
,
modelversion
:
'模型版本'
,
modelenable
:
'模型是否启用'
,
pssystemid
:
'系统标识'
,
md5check
:
'校验'
,
bpmnfile
:
'BPMN'
,
deploykey
:
'DeployKey'
,
},
views
:
{
editview
:
{
caption
:
"流程定义"
,
title
:
'流程定义'
,
},
gridview
:
{
caption
:
"流程定义"
,
title
:
'流程定义'
,
},
},
main_form
:
{
details
:
{
group1
:
"模型基本信息"
,
formpage1
:
"基本信息"
,
srforikey
:
""
,
srfkey
:
"DefinitionKey"
,
srfmajortext
:
"流程定义名称"
,
srftempmode
:
""
,
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
definitionkey
:
"DefinitionKey"
,
deploykey
:
"DefinitionKey"
,
definitionname
:
"流程定义名称"
,
pssystemid
:
"系统标识"
,
modelversion
:
"模型版本"
,
modelenable
:
"模型是否启用"
,
bpmnfile
:
"BPMN"
,
md5check
:
"校验"
,
},
uiactions
:
{
},
},
main_grid
:
{
columns
:
{
definitionkey
:
"DefinitionKey"
,
definitionname
:
"流程定义名称"
,
pssystemid
:
"系统标识"
,
modelversion
:
"模型版本"
,
modelenable
:
"模型是否启用"
,
},
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
"常规条件"
,
n_deploykey_like
:
"DefinitionKey"
,
n_definitionname_like
:
"流程定义名称"
,
},
uiactions
:
{
},
},
editviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"Save"
,
tip
:
"Save"
,
},
tbitem4
:
{
caption
:
"Save And New"
,
tip
:
"Save And New"
,
},
tbitem5
:
{
caption
:
"Save And Close"
,
tip
:
"Save And Close Window"
,
},
tbitem6
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem7
:
{
caption
:
"Remove And Close"
,
tip
:
"Remove And Close Window"
,
},
tbitem8
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem12
:
{
caption
:
"New"
,
tip
:
"New"
,
},
tbitem13
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem14
:
{
caption
:
"Copy"
,
tip
:
"Copy {0}"
,
},
tbitem16
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem23
:
{
caption
:
"第一个记录"
,
tip
:
"第一个记录"
,
},
tbitem24
:
{
caption
:
"上一个记录"
,
tip
:
"上一个记录"
,
},
tbitem25
:
{
caption
:
"下一个记录"
,
tip
:
"下一个记录"
,
},
tbitem26
:
{
caption
:
"最后一个记录"
,
tip
:
"最后一个记录"
,
},
tbitem21
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem22
:
{
caption
:
"Help"
,
tip
:
"Help"
,
},
},
gridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
"New"
,
tip
:
"New"
,
},
tbitem4
:
{
caption
:
"Edit"
,
tip
:
"Edit {0}"
,
},
tbitem6
:
{
caption
:
"Copy"
,
tip
:
"Copy {0}"
,
},
tbitem7
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem8
:
{
caption
:
"Remove"
,
tip
:
"Remove {0}"
,
},
tbitem9
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem13
:
{
caption
:
"Export"
,
tip
:
"Export {0} Data To Excel"
,
},
tbitem10
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem16
:
{
caption
:
"其它"
,
tip
:
"其它"
,
},
tbitem21
:
{
caption
:
"Export Data Model"
,
tip
:
"导出数据模型"
,
},
tbitem23
:
{
caption
:
"数据导入"
,
tip
:
"数据导入"
,
},
tbitem17
:
{
caption
:
"-"
,
tip
:
""
,
},
tbitem19
:
{
caption
:
"Filter"
,
tip
:
"Filter"
,
},
tbitem18
:
{
caption
:
"Help"
,
tip
:
"Help"
,
},
},
};
\ No newline at end of file
app_Web/src/locale/lanres/wfprocess-definition/wfprocess-definition_zh_CN.ts
0 → 100644
浏览文件 @
90138f50
export
default
{
fields
:
{
definitionkey
:
'DefinitionKey'
,
definitionname
:
'流程定义名称'
,
modelversion
:
'模型版本'
,
modelenable
:
'模型是否启用'
,
pssystemid
:
'系统标识'
,
md5check
:
'校验'
,
bpmnfile
:
'BPMN'
,
deploykey
:
'DeployKey'
,
},
views
:
{
editview
:
{
caption
:
'流程定义'
,
title
:
'流程定义'
,
},
gridview
:
{
caption
:
'流程定义'
,
title
:
'流程定义'
,
},
},
main_form
:
{
details
:
{
group1
:
'模型基本信息'
,
formpage1
:
'基本信息'
,
srforikey
:
''
,
srfkey
:
'DefinitionKey'
,
srfmajortext
:
'流程定义名称'
,
srftempmode
:
''
,
srfuf
:
''
,
srfdeid
:
''
,
srfsourcekey
:
''
,
definitionkey
:
'DefinitionKey'
,
deploykey
:
'DefinitionKey'
,
definitionname
:
'流程定义名称'
,
pssystemid
:
'系统标识'
,
modelversion
:
'模型版本'
,
modelenable
:
'模型是否启用'
,
bpmnfile
:
'BPMN'
,
md5check
:
'校验'
,
},
uiactions
:
{
},
},
main_grid
:
{
columns
:
{
definitionkey
:
'DefinitionKey'
,
definitionname
:
'流程定义名称'
,
pssystemid
:
'系统标识'
,
modelversion
:
'模型版本'
,
modelenable
:
'模型是否启用'
,
},
uiactions
:
{
},
},
default_searchform
:
{
details
:
{
formpage1
:
'常规条件'
,
n_deploykey_like
:
'DefinitionKey'
,
n_definitionname_like
:
'流程定义名称'
,
},
uiactions
:
{
},
},
editviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
'保存'
,
tip
:
'保存'
,
},
tbitem4
:
{
caption
:
'保存并新建'
,
tip
:
'保存并新建'
,
},
tbitem5
:
{
caption
:
'保存并关闭'
,
tip
:
'保存并关闭'
,
},
tbitem6
:
{
caption
:
'-'
,
tip
:
''
,
},
tbitem7
:
{
caption
:
'删除并关闭'
,
tip
:
'删除并关闭'
,
},
tbitem8
:
{
caption
:
'-'
,
tip
:
''
,
},
tbitem12
:
{
caption
:
'新建'
,
tip
:
'新建'
,
},
tbitem13
:
{
caption
:
'-'
,
tip
:
''
,
},
tbitem14
:
{
caption
:
'拷贝'
,
tip
:
'拷贝'
,
},
tbitem16
:
{
caption
:
'-'
,
tip
:
''
,
},
tbitem23
:
{
caption
:
'第一个记录'
,
tip
:
'第一个记录'
,
},
tbitem24
:
{
caption
:
'上一个记录'
,
tip
:
'上一个记录'
,
},
tbitem25
:
{
caption
:
'下一个记录'
,
tip
:
'下一个记录'
,
},
tbitem26
:
{
caption
:
'最后一个记录'
,
tip
:
'最后一个记录'
,
},
tbitem21
:
{
caption
:
'-'
,
tip
:
''
,
},
tbitem22
:
{
caption
:
'帮助'
,
tip
:
'帮助'
,
},
},
gridviewtoolbar_toolbar
:
{
tbitem3
:
{
caption
:
'新建'
,
tip
:
'新建'
,
},
tbitem4
:
{
caption
:
'编辑'
,
tip
:
'编辑'
,
},
tbitem6
:
{
caption
:
'拷贝'
,
tip
:
'拷贝'
,
},
tbitem7
:
{
caption
:
'-'
,
tip
:
''
,
},
tbitem8
:
{
caption
:
'删除'
,
tip
:
'删除'
,
},
tbitem9
:
{
caption
:
'-'
,
tip
:
''
,
},
tbitem13
:
{
caption
:
'导出'
,
tip
:
'导出'
,
},
tbitem10
:
{
caption
:
'-'
,
tip
:
''
,
},
tbitem16
:
{
caption
:
'其它'
,
tip
:
'其它'
,
},
tbitem21
:
{
caption
:
'导出数据模型'
,
tip
:
'导出数据模型'
,
},
tbitem23
:
{
caption
:
'数据导入'
,
tip
:
'数据导入'
,
},
tbitem17
:
{
caption
:
'-'
,
tip
:
''
,
},
tbitem19
:
{
caption
:
'过滤'
,
tip
:
'过滤'
,
},
tbitem18
:
{
caption
:
'帮助'
,
tip
:
'帮助'
,
},
},
};
\ No newline at end of file
app_Web/src/mock/app/index-appmenu/index-appmenu.ts
浏览文件 @
90138f50
...
@@ -99,6 +99,24 @@ mock.onGet('v7/indexappmenu').reply((config: any) => {
...
@@ -99,6 +99,24 @@ mock.onGet('v7/indexappmenu').reply((config: any) => {
textcls
:
''
,
textcls
:
''
,
appfunctag
:
'Auto1'
,
appfunctag
:
'Auto1'
,
resourcetag
:
''
,
resourcetag
:
''
,
},
{
id
:
'6DFB635D-1B8E-47E7-9869-1B7BC2B844C0'
,
name
:
'menuitem6'
,
text
:
'流程定义'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'流程定义'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
'fa fa-random'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'_2'
,
resourcetag
:
''
,
},
},
],
],
}];
}];
...
...
app_Web/src/mock/codelist/codelist.ts
浏览文件 @
90138f50
...
@@ -7,6 +7,33 @@ import Mock from 'mockjs'
...
@@ -7,6 +7,33 @@ import Mock from 'mockjs'
mock
.
onGet
(
'./assets/json/data-dictionary.json'
).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
'./assets/json/data-dictionary.json'
).
reply
((
config
:
any
)
=>
{
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
return
[
status
,
[
return
[
status
,
[
{
srfkey
:
'YesNo'
,
emptytext
:
'未定义'
,
"codelisttype"
:
"static"
,
items
:
[
{
id
:
'1'
,
label
:
'是'
,
text
:
'是'
,
"data"
:
""
,
"codename"
:
"Item_1"
,
value
:
'1'
,
disabled
:
false
,
},
{
id
:
'0'
,
label
:
'否'
,
text
:
'否'
,
"data"
:
""
,
"codename"
:
"Item_0"
,
value
:
'0'
,
disabled
:
false
,
},
]
},
{
{
srfkey
:
'CLIBZSex'
,
srfkey
:
'CLIBZSex'
,
emptytext
:
''
,
emptytext
:
''
,
...
...
app_Web/src/mock/entity/wfprocess-definitions/wfprocess-definitions.ts
0 → 100644
浏览文件 @
90138f50
import
qs
from
'qs'
;
import
{
MockAdapter
}
from
'@/mock/mock-adapter'
;
const
mock
=
MockAdapter
.
getInstance
();
// 模拟数据
const
mockDatas
:
Array
<
any
>
=
[
];
//getwflink
mock
.
onGet
(
new
RegExp
(
/^
\/
wfcore
\/
ibzrt-app-web
\/
wfprocessdefinitions
\/[
a-zA-Z0-9
\-\;]
+
\/
usertasks
\/[
a-zA-Z0-9
\-\;]
+
\/
ways$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: getwflink"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
groupEnd
();
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
{}];
}
return
[
status
,[
{
"sequenceFlowId"
:
"dfdsfdsfdsfdsfds"
,
"sequenceFlowName"
:
"同意"
,
"taskId"
:
"aaaaddddccccddddd"
,
"processDefinitionKey"
:
"support-workorders-approve-v1"
,
"processInstanceId"
:
"ddlfldldfldsfds"
,
"refViewKey"
:
""
},
{
"sequenceFlowId"
:
"ddssdfdfdfdfsfdf"
,
"sequenceFlowName"
:
"不同意"
,
"taskId"
:
"aaaaddddccccddddd"
,
"processDefinitionKey"
:
"support-workorders-approve-v1"
,
"processInstanceId"
:
"ddfdsldlfdlldsf"
,
"refViewKey"
:
"workorder_ltform_editview"
}
]];
});
// getwfstep
mock
.
onGet
(
new
RegExp
(
/^
\/
wfcore
\/
ibzrt-app-web
\/
wfprocessdefinitions
\/
process-definitions-nodes$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: getwfstep"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
groupEnd
();
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
{}];
}
return
[
status
,
[
{
"userTaskId"
:
"sddfddfd-dfdf-fdfd-fdf-dfdfd"
,
"userTaskName"
:
"待审"
,
"cnt"
:
0
,
"processDefinitionKey"
:
"support-workorders-approve-v1"
,
"processDefinitionName"
:
"工单审批流程v1"
},
{
"userTaskId"
:
"sddfddfd-dfdf-fdfd-fdf-87927"
,
"userTaskName"
:
"待分配"
,
"cnt"
:
3
,
"processDefinitionKey"
:
"support-workorders-approve-v1"
,
"processDefinitionName"
:
"工单审批流程v1"
}
]];
});
// createBatch
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/
batch$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: createBatch"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
groupEnd
();
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
{}];
}
return
[
status
,
{}];
});
// updateBatch
mock
.
onPut
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/
batch$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: updateBatch"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
groupEnd
();
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
{}];
}
return
[
status
,
{}];
});
// removeBatch
mock
.
onDelete
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/
batch$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: removeBatch"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
groupEnd
();
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
{}];
}
return
[
status
,
{}];
});
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: Select"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
definitionkey
,
tempValue
.
definitionkey
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: CheckKey"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.definitionkey, tempValue.definitionkey));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'definitionkey'
]
==
tempValue
[
'definitionkey'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: Save"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.definitionkey, tempValue.definitionkey));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'definitionkey'
]
==
tempValue
[
'definitionkey'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: Create"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
[
0
]);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: Update"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.definitionkey, tempValue.definitionkey));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'definitionkey'
]
==
tempValue
[
'definitionkey'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: FetchDefault"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
?
mockDatas
:
[]];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/
fetchdefault
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: FetchDefault"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
if
(
config
.
url
.
includes
(
'page'
)){
let
url
=
config
.
url
.
split
(
'?'
)[
1
];
let
params
=
qs
.
parse
(
url
);
Object
.
assign
(
config
,
params
);
}
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
let
total
=
mockDatas
.
length
;
let
records
:
Array
<
any
>
=
[];
if
(
!
config
.
page
||
!
config
.
size
){
records
=
mockDatas
;
}
else
{
if
((
config
.
page
-
1
)
*
config
.
size
<
total
){
records
=
mockDatas
.
slice
(
config
.
page
,
config
.
size
);
}
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
records
?
records
:
[]);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
records
?
records
:
[]];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: Remove"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
definitionkey
,
tempValue
.
definitionkey
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
?
_items
:{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
// Get
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
definitionkey
,
tempValue
.
definitionkey
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
?
_items
:{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
app_Web/src/mock/index.ts
浏览文件 @
90138f50
...
@@ -14,6 +14,7 @@ import './entity/wfusers/wfusers';
...
@@ -14,6 +14,7 @@ import './entity/wfusers/wfusers';
import
'./entity/ibzorganizations/ibzorganizations'
;
import
'./entity/ibzorganizations/ibzorganizations'
;
import
'./entity/wfgroups/wfgroups'
;
import
'./entity/wfgroups/wfgroups'
;
import
'./entity/sys-user-roles/sys-user-roles'
;
import
'./entity/sys-user-roles/sys-user-roles'
;
import
'./entity/wfprocess-definitions/wfprocess-definitions'
;
import
'./entity/sys-roles/sys-roles'
;
import
'./entity/sys-roles/sys-roles'
;
import
'./entity/ibzdept-members/ibzdept-members'
;
import
'./entity/ibzdept-members/ibzdept-members'
;
import
'./entity/ibzdepartments/ibzdepartments'
;
import
'./entity/ibzdepartments/ibzdepartments'
;
...
...
app_Web/src/mock/viewconfig/viewconfig.ts
浏览文件 @
90138f50
...
@@ -63,6 +63,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
...
@@ -63,6 +63,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"SysUserPickupView"
,
"viewname"
:
"SysUserPickupView"
,
"viewtag"
:
"32fe9ab4a9e1b8d62b9ee802e4746965"
"viewtag"
:
"32fe9ab4a9e1b8d62b9ee802e4746965"
},
},
"wfprocessdefinitioneditview"
:
{
"title"
:
"实体编辑视图"
,
"caption"
:
"流程定义"
,
"viewtype"
:
"DEEDITVIEW"
,
"viewmodule"
:
"workflow"
,
"viewname"
:
"WFProcessDefinitionEditView"
,
"viewtag"
:
"3fcd491c13d05ab7dcce8d2c920d0aec"
},
"ibzemployeegridview"
:
{
"ibzemployeegridview"
:
{
"title"
:
"人员表格视图"
,
"title"
:
"人员表格视图"
,
"caption"
:
"人员"
,
"caption"
:
"人员"
,
...
@@ -215,6 +223,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
...
@@ -215,6 +223,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"IBZDeptMemberEditView"
,
"viewname"
:
"IBZDeptMemberEditView"
,
"viewtag"
:
"bf5e850471bab461fbb6739578e510c5"
"viewtag"
:
"bf5e850471bab461fbb6739578e510c5"
},
},
"wfprocessdefinitiongridview"
:
{
"title"
:
"实体表格视图"
,
"caption"
:
"流程定义"
,
"viewtype"
:
"DEGRIDVIEW"
,
"viewmodule"
:
"workflow"
,
"viewname"
:
"WFProcessDefinitionGridView"
,
"viewtag"
:
"bfa86be8c02420f87d5cf4ff9a768948"
},
"ibzdepartmenttreeexpview"
:
{
"ibzdepartmenttreeexpview"
:
{
"title"
:
"部门树导航视图"
,
"title"
:
"部门树导航视图"
,
"caption"
:
"人员管理"
,
"caption"
:
"人员管理"
,
...
...
app_Web/src/pages/rt/index/page-register.ts
浏览文件 @
90138f50
...
@@ -6,6 +6,7 @@ export const PageComponents = {
...
@@ -6,6 +6,7 @@ export const PageComponents = {
Vue
.
component
(
'ibzorganization-edit-view'
,
()
=>
import
(
'@pages/ou/ibzorganization-edit-view/ibzorganization-edit-view.vue'
));
Vue
.
component
(
'ibzorganization-edit-view'
,
()
=>
import
(
'@pages/ou/ibzorganization-edit-view/ibzorganization-edit-view.vue'
));
Vue
.
component
(
'ibzemployee-option-view'
,
()
=>
import
(
'@pages/ou/ibzemployee-option-view/ibzemployee-option-view.vue'
));
Vue
.
component
(
'ibzemployee-option-view'
,
()
=>
import
(
'@pages/ou/ibzemployee-option-view/ibzemployee-option-view.vue'
));
Vue
.
component
(
'sys-user-pickup-view'
,
()
=>
import
(
'@pages/uaa/sys-user-pickup-view/sys-user-pickup-view.vue'
));
Vue
.
component
(
'sys-user-pickup-view'
,
()
=>
import
(
'@pages/uaa/sys-user-pickup-view/sys-user-pickup-view.vue'
));
Vue
.
component
(
'wfprocess-definition-grid-view'
,
()
=>
import
(
'@pages/workflow/wfprocess-definition-grid-view/wfprocess-definition-grid-view.vue'
));
Vue
.
component
(
'ibzemployee-grid-view'
,
()
=>
import
(
'@pages/ou/ibzemployee-grid-view/ibzemployee-grid-view.vue'
));
Vue
.
component
(
'ibzemployee-grid-view'
,
()
=>
import
(
'@pages/ou/ibzemployee-grid-view/ibzemployee-grid-view.vue'
));
Vue
.
component
(
'ibzdept-member-grid-view'
,
()
=>
import
(
'@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'
));
Vue
.
component
(
'ibzdept-member-grid-view'
,
()
=>
import
(
'@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'
));
Vue
.
component
(
'ibzdepartment-pickup-grid-view'
,
()
=>
import
(
'@pages/ou/ibzdepartment-pickup-grid-view/ibzdepartment-pickup-grid-view.vue'
));
Vue
.
component
(
'ibzdepartment-pickup-grid-view'
,
()
=>
import
(
'@pages/ou/ibzdepartment-pickup-grid-view/ibzdepartment-pickup-grid-view.vue'
));
...
@@ -15,14 +16,15 @@ export const PageComponents = {
...
@@ -15,14 +16,15 @@ export const PageComponents = {
Vue
.
component
(
'wfmember-edit-view'
,
()
=>
import
(
'@pages/workflow/wfmember-edit-view/wfmember-edit-view.vue'
));
Vue
.
component
(
'wfmember-edit-view'
,
()
=>
import
(
'@pages/workflow/wfmember-edit-view/wfmember-edit-view.vue'
));
Vue
.
component
(
'sys-role-pickup-grid-view'
,
()
=>
import
(
'@pages/uaa/sys-role-pickup-grid-view/sys-role-pickup-grid-view.vue'
));
Vue
.
component
(
'sys-role-pickup-grid-view'
,
()
=>
import
(
'@pages/uaa/sys-role-pickup-grid-view/sys-role-pickup-grid-view.vue'
));
Vue
.
component
(
'wfmember-grid-view'
,
()
=>
import
(
'@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'
));
Vue
.
component
(
'wfmember-grid-view'
,
()
=>
import
(
'@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'
));
Vue
.
component
(
'wfprocess-definition-edit-view'
,
()
=>
import
(
'@pages/workflow/wfprocess-definition-edit-view/wfprocess-definition-edit-view.vue'
));
Vue
.
component
(
'wfuser-pickup-grid-view'
,
()
=>
import
(
'@pages/workflow/wfuser-pickup-grid-view/wfuser-pickup-grid-view.vue'
));
Vue
.
component
(
'wfuser-pickup-grid-view'
,
()
=>
import
(
'@pages/workflow/wfuser-pickup-grid-view/wfuser-pickup-grid-view.vue'
));
Vue
.
component
(
'sys-role-edit-view'
,
()
=>
import
(
'@pages/uaa/sys-role-edit-view/sys-role-edit-view.vue'
));
Vue
.
component
(
'sys-role-edit-view'
,
()
=>
import
(
'@pages/uaa/sys-role-edit-view/sys-role-edit-view.vue'
));
Vue
.
component
(
'ibzemployee-edit-view'
,
()
=>
import
(
'@pages/ou/ibzemployee-edit-view/ibzemployee-edit-view.vue'
));
Vue
.
component
(
'ibzemployee-edit-view'
,
()
=>
import
(
'@pages/ou/ibzemployee-edit-view/ibzemployee-edit-view.vue'
));
Vue
.
component
(
'ibzorganization-tree-exp-view'
,
()
=>
import
(
'@pages/ou/ibzorganization-tree-exp-view/ibzorganization-tree-exp-view.vue'
));
Vue
.
component
(
'ibzorganization-tree-exp-view'
,
()
=>
import
(
'@pages/ou/ibzorganization-tree-exp-view/ibzorganization-tree-exp-view.vue'
));
Vue
.
component
(
'ibzdepartment-option-view'
,
()
=>
import
(
'@pages/ou/ibzdepartment-option-view/ibzdepartment-option-view.vue'
));
Vue
.
component
(
'ibzdepartment-option-view'
,
()
=>
import
(
'@pages/ou/ibzdepartment-option-view/ibzdepartment-option-view.vue'
));
Vue
.
component
(
'ibzdepartment-edit-view'
,
()
=>
import
(
'@pages/ou/ibzdepartment-edit-view/ibzdepartment-edit-view.vue'
));
Vue
.
component
(
'ibzdepartment-edit-view'
,
()
=>
import
(
'@pages/ou/ibzdepartment-edit-view/ibzdepartment-edit-view.vue'
));
Vue
.
component
(
'wfgroup-edit-view'
,
()
=>
import
(
'@pages/workflow/wfgroup-edit-view/wfgroup-edit-view.vue'
));
Vue
.
component
(
'sys-user-role-edit-view'
,
()
=>
import
(
'@pages/uaa/sys-user-role-edit-view/sys-user-role-edit-view.vue'
));
Vue
.
component
(
'sys-user-role-edit-view'
,
()
=>
import
(
'@pages/uaa/sys-user-role-edit-view/sys-user-role-edit-view.vue'
));
Vue
.
component
(
'wfgroup-edit-view'
,
()
=>
import
(
'@pages/workflow/wfgroup-edit-view/wfgroup-edit-view.vue'
));
Vue
.
component
(
'sys-role-permission-custom-view'
,
()
=>
import
(
'@pages/uaa/sys-role-permission-custom-view/sys-role-permission-custom-view.vue'
));
Vue
.
component
(
'sys-role-permission-custom-view'
,
()
=>
import
(
'@pages/uaa/sys-role-permission-custom-view/sys-role-permission-custom-view.vue'
));
Vue
.
component
(
'ibzdepartment-tree-exp-view'
,
()
=>
import
(
'@pages/ou/ibzdepartment-tree-exp-view/ibzdepartment-tree-exp-view.vue'
));
Vue
.
component
(
'ibzdepartment-tree-exp-view'
,
()
=>
import
(
'@pages/ou/ibzdepartment-tree-exp-view/ibzdepartment-tree-exp-view.vue'
));
Vue
.
component
(
'ibzdept-member-edit-view'
,
()
=>
import
(
'@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'
));
Vue
.
component
(
'ibzdept-member-edit-view'
,
()
=>
import
(
'@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'
));
...
...
app_Web/src/pages/rt/index/router.ts
浏览文件 @
90138f50
...
@@ -112,6 +112,19 @@ const router = new Router({
...
@@ -112,6 +112,19 @@ const router = new Router({
},
},
component
:
()
=>
import
(
'@pages/uaa/sys-user-pickup-view/sys-user-pickup-view.vue'
),
component
:
()
=>
import
(
'@pages/uaa/sys-user-pickup-view/sys-user-pickup-view.vue'
),
},
},
{
path
:
'wfprocessdefinitions/:wfprocessdefinition?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.wfprocessdefinition.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'wfprocessdefinitions'
,
parameterName
:
'wfprocessdefinition'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfprocess-definition-grid-view/wfprocess-definition-grid-view.vue'
),
},
{
{
path
:
'ibzemployees/:ibzemployee?/gridview/:gridview?'
,
path
:
'ibzemployees/:ibzemployee?/gridview/:gridview?'
,
meta
:
{
meta
:
{
...
@@ -285,6 +298,19 @@ const router = new Router({
...
@@ -285,6 +298,19 @@ const router = new Router({
},
},
component
:
()
=>
import
(
'@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'
),
component
:
()
=>
import
(
'@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'
),
},
},
{
path
:
'wfprocessdefinitions/:wfprocessdefinition?/editview/:editview?'
,
meta
:
{
caption
:
'entities.wfprocessdefinition.views.editview.caption'
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'wfprocessdefinitions'
,
parameterName
:
'wfprocessdefinition'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfprocess-definition-edit-view/wfprocess-definition-edit-view.vue'
),
},
{
{
path
:
'wfusers/:wfuser?/pickupgridview/:pickupgridview?'
,
path
:
'wfusers/:wfuser?/pickupgridview/:pickupgridview?'
,
meta
:
{
meta
:
{
...
@@ -364,30 +390,30 @@ const router = new Router({
...
@@ -364,30 +390,30 @@ const router = new Router({
component
:
()
=>
import
(
'@pages/ou/ibzdepartment-edit-view/ibzdepartment-edit-view.vue'
),
component
:
()
=>
import
(
'@pages/ou/ibzdepartment-edit-view/ibzdepartment-edit-view.vue'
),
},
},
{
{
path
:
'
wfgroups/:wfgroup
?/editview/:editview?'
,
path
:
'
sysuserroles/:sysuserrole
?/editview/:editview?'
,
meta
:
{
meta
:
{
caption
:
'entities.
wfgroup
.views.editview.caption'
,
caption
:
'entities.
sysuserrole
.views.editview.caption'
,
parameters
:
[
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'
wfgroups'
,
parameterName
:
'wfgroup
'
},
{
pathName
:
'
sysuserroles'
,
parameterName
:
'sysuserrole
'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
],
requireAuth
:
true
,
requireAuth
:
true
,
},
},
component
:
()
=>
import
(
'@pages/
workflow/wfgroup-edit-view/wfgroup
-edit-view.vue'
),
component
:
()
=>
import
(
'@pages/
uaa/sys-user-role-edit-view/sys-user-role
-edit-view.vue'
),
},
},
{
{
path
:
'
sysuserroles/:sysuserrole
?/editview/:editview?'
,
path
:
'
wfgroups/:wfgroup
?/editview/:editview?'
,
meta
:
{
meta
:
{
caption
:
'entities.
sysuserrole
.views.editview.caption'
,
caption
:
'entities.
wfgroup
.views.editview.caption'
,
parameters
:
[
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'
sysuserroles'
,
parameterName
:
'sysuserrole
'
},
{
pathName
:
'
wfgroups'
,
parameterName
:
'wfgroup
'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
],
requireAuth
:
true
,
requireAuth
:
true
,
},
},
component
:
()
=>
import
(
'@pages/
uaa/sys-user-role-edit-view/sys-user-role
-edit-view.vue'
),
component
:
()
=>
import
(
'@pages/
workflow/wfgroup-edit-view/wfgroup
-edit-view.vue'
),
},
},
{
{
path
:
'sysrolepermissions/:sysrolepermission?/customview/:customview?'
,
path
:
'sysrolepermissions/:sysrolepermission?/customview/:customview?'
,
...
@@ -535,6 +561,490 @@ const router = new Router({
...
@@ -535,6 +561,490 @@ const router = new Router({
...
indexRoutes
,
...
indexRoutes
,
],
],
},
},
{
path
:
'/ibzdepartments/:ibzdepartment?/pickupview/:pickupview?'
,
meta
:
{
caption
:
'entities.ibzdepartment.views.pickupview.caption'
,
parameters
:
[
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'pickupview'
,
parameterName
:
'pickupview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzdepartment-pickup-view/ibzdepartment-pickup-view.vue'
),
},
{
path
:
'/ibzemployees/:ibzemployee?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzemployee.views.editview.caption'
,
parameters
:
[
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzemployee-edit-view/ibzemployee-edit-view.vue'
),
},
{
path
:
'/wfusers/:wfuser?/wfmembers/:wfmember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.wfmember.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'wfusers'
,
parameterName
:
'wfuser'
},
{
pathName
:
'wfmembers'
,
parameterName
:
'wfmember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'
),
},
{
path
:
'/wfgroups/:wfgroup?/wfmembers/:wfmember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.wfmember.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'wfgroups'
,
parameterName
:
'wfgroup'
},
{
pathName
:
'wfmembers'
,
parameterName
:
'wfmember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'
),
},
{
path
:
'/wfmembers/:wfmember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.wfmember.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'wfmembers'
,
parameterName
:
'wfmember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfmember-grid-view/wfmember-grid-view.vue'
),
},
{
path
:
'/sysroles/:sysrole?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.sysrole.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'sysroles'
,
parameterName
:
'sysrole'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-rolegrid-view/sys-rolegrid-view.vue'
),
},
{
path
:
'/sysroles/:sysrole?/pickupview/:pickupview?'
,
meta
:
{
caption
:
'entities.sysrole.views.pickupview.caption'
,
parameters
:
[
{
pathName
:
'sysroles'
,
parameterName
:
'sysrole'
},
{
pathName
:
'pickupview'
,
parameterName
:
'pickupview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-role-pickup-view/sys-role-pickup-view.vue'
),
},
{
path
:
'/ibzorganizations/:ibzorganization?/optionview/:optionview?'
,
meta
:
{
caption
:
'entities.ibzorganization.views.optionview.caption'
,
parameters
:
[
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'optionview'
,
parameterName
:
'optionview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzorganization-option-view/ibzorganization-option-view.vue'
),
},
{
path
:
'/sysusers/:sysuser?/pickupview/:pickupview?'
,
meta
:
{
caption
:
'entities.sysuser.views.pickupview.caption'
,
parameters
:
[
{
pathName
:
'sysusers'
,
parameterName
:
'sysuser'
},
{
pathName
:
'pickupview'
,
parameterName
:
'pickupview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-user-pickup-view/sys-user-pickup-view.vue'
),
},
{
path
:
'/wfprocessdefinitions/:wfprocessdefinition?/editview/:editview?'
,
meta
:
{
caption
:
'entities.wfprocessdefinition.views.editview.caption'
,
parameters
:
[
{
pathName
:
'wfprocessdefinitions'
,
parameterName
:
'wfprocessdefinition'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfprocess-definition-edit-view/wfprocess-definition-edit-view.vue'
),
},
{
path
:
'/ibzemployees/:ibzemployee?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzemployee.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzemployee-grid-view/ibzemployee-grid-view.vue'
),
},
{
path
:
'/ibzdeptmembers/:ibzdeptmember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzdeptmember.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'ibzdeptmembers'
,
parameterName
:
'ibzdeptmember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzdept-member-grid-view/ibzdept-member-grid-view.vue'
),
},
{
path
:
'/wfusers/:wfuser?/pickupview/:pickupview?'
,
meta
:
{
caption
:
'entities.wfuser.views.pickupview.caption'
,
parameters
:
[
{
pathName
:
'wfusers'
,
parameterName
:
'wfuser'
},
{
pathName
:
'pickupview'
,
parameterName
:
'pickupview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfuser-pickup-view/wfuser-pickup-view.vue'
),
},
{
path
:
'/ibzorganizations/:ibzorganization?/treeexpview/:treeexpview?'
,
meta
:
{
caption
:
'entities.ibzorganization.views.treeexpview.caption'
,
parameters
:
[
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'treeexpview'
,
parameterName
:
'treeexpview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzorganization-tree-exp-view/ibzorganization-tree-exp-view.vue'
),
},
{
path
:
'/sysuserroles/:sysuserrole?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.sysuserrole.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'sysuserroles'
,
parameterName
:
'sysuserrole'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-user-role-grid-view/sys-user-role-grid-view.vue'
),
},
{
path
:
'/sysusers/:sysuser?/pickupgridview/:pickupgridview?'
,
meta
:
{
caption
:
'entities.sysuser.views.pickupgridview.caption'
,
parameters
:
[
{
pathName
:
'sysusers'
,
parameterName
:
'sysuser'
},
{
pathName
:
'pickupgridview'
,
parameterName
:
'pickupgridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-user-pickup-grid-view/sys-user-pickup-grid-view.vue'
),
},
{
path
:
'/sysroles/:sysrole?/editview/:editview?'
,
meta
:
{
caption
:
'entities.sysrole.views.editview.caption'
,
parameters
:
[
{
pathName
:
'sysroles'
,
parameterName
:
'sysrole'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-role-edit-view/sys-role-edit-view.vue'
),
},
{
path
:
'/wfusers/:wfuser?/wfmembers/:wfmember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.wfmember.views.editview.caption'
,
parameters
:
[
{
pathName
:
'wfusers'
,
parameterName
:
'wfuser'
},
{
pathName
:
'wfmembers'
,
parameterName
:
'wfmember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfmember-edit-view/wfmember-edit-view.vue'
),
},
{
path
:
'/wfgroups/:wfgroup?/wfmembers/:wfmember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.wfmember.views.editview.caption'
,
parameters
:
[
{
pathName
:
'wfgroups'
,
parameterName
:
'wfgroup'
},
{
pathName
:
'wfmembers'
,
parameterName
:
'wfmember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfmember-edit-view/wfmember-edit-view.vue'
),
},
{
path
:
'/wfmembers/:wfmember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.wfmember.views.editview.caption'
,
parameters
:
[
{
pathName
:
'wfmembers'
,
parameterName
:
'wfmember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfmember-edit-view/wfmember-edit-view.vue'
),
},
{
path
:
'/ibzdepartments/:ibzdepartment?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzdepartment.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzdepartment-grid-view/ibzdepartment-grid-view.vue'
),
},
{
path
:
'/sysroles/:sysrole?/pickupgridview/:pickupgridview?'
,
meta
:
{
caption
:
'entities.sysrole.views.pickupgridview.caption'
,
parameters
:
[
{
pathName
:
'sysroles'
,
parameterName
:
'sysrole'
},
{
pathName
:
'pickupgridview'
,
parameterName
:
'pickupgridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-role-pickup-grid-view/sys-role-pickup-grid-view.vue'
),
},
{
path
:
'/ibzdepartments/:ibzdepartment?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzdepartment.views.editview.caption'
,
parameters
:
[
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzdepartment-edit-view/ibzdepartment-edit-view.vue'
),
},
{
path
:
'/ibzorganizations/:ibzorganization?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzorganization.views.editview.caption'
,
parameters
:
[
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzorganization-edit-view/ibzorganization-edit-view.vue'
),
},
{
path
:
'/sysrolepermissions/:sysrolepermission?/customview/:customview?'
,
meta
:
{
caption
:
'entities.sysrolepermission.views.customview.caption'
,
parameters
:
[
{
pathName
:
'sysrolepermissions'
,
parameterName
:
'sysrolepermission'
},
{
pathName
:
'customview'
,
parameterName
:
'customview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-role-permission-custom-view/sys-role-permission-custom-view.vue'
),
},
{
path
:
'/ibzdepartments/:ibzdepartment?/optionview/:optionview?'
,
meta
:
{
caption
:
'entities.ibzdepartment.views.optionview.caption'
,
parameters
:
[
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'optionview'
,
parameterName
:
'optionview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzdepartment-option-view/ibzdepartment-option-view.vue'
),
},
{
path
:
'/ibzemployees/:ibzemployee?/optionview/:optionview?'
,
meta
:
{
caption
:
'entities.ibzemployee.views.optionview.caption'
,
parameters
:
[
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'optionview'
,
parameterName
:
'optionview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzemployee-option-view/ibzemployee-option-view.vue'
),
},
{
path
:
'/ibzemployees/:ibzemployee?/pickupview/:pickupview?'
,
meta
:
{
caption
:
'entities.ibzemployee.views.pickupview.caption'
,
parameters
:
[
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'pickupview'
,
parameterName
:
'pickupview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzemployee-pickup-view/ibzemployee-pickup-view.vue'
),
},
{
path
:
'/wfgroups/:wfgroup?/editview/:editview?'
,
meta
:
{
caption
:
'entities.wfgroup.views.editview.caption'
,
parameters
:
[
{
pathName
:
'wfgroups'
,
parameterName
:
'wfgroup'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfgroup-edit-view/wfgroup-edit-view.vue'
),
},
{
path
:
'/ibzdeptmembers/:ibzdeptmember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzdeptmember.views.editview.caption'
,
parameters
:
[
{
pathName
:
'ibzdeptmembers'
,
parameterName
:
'ibzdeptmember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzdept-member-edit-view/ibzdept-member-edit-view.vue'
),
},
{
path
:
'/wfprocessdefinitions/:wfprocessdefinition?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.wfprocessdefinition.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'wfprocessdefinitions'
,
parameterName
:
'wfprocessdefinition'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfprocess-definition-grid-view/wfprocess-definition-grid-view.vue'
),
},
{
path
:
'/ibzdepartments/:ibzdepartment?/treeexpview/:treeexpview?'
,
meta
:
{
caption
:
'entities.ibzdepartment.views.treeexpview.caption'
,
parameters
:
[
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'treeexpview'
,
parameterName
:
'treeexpview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzdepartment-tree-exp-view/ibzdepartment-tree-exp-view.vue'
),
},
{
path
:
'/ibzorganizations/:ibzorganization?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzorganization.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzorganization-grid-view/ibzorganization-grid-view.vue'
),
},
{
path
:
'/ibzemployees/:ibzemployee?/pickupgridview/:pickupgridview?'
,
meta
:
{
caption
:
'entities.ibzemployee.views.pickupgridview.caption'
,
parameters
:
[
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'pickupgridview'
,
parameterName
:
'pickupgridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzemployee-pickup-grid-view/ibzemployee-pickup-grid-view.vue'
),
},
{
path
:
'/wfusers/:wfuser?/pickupgridview/:pickupgridview?'
,
meta
:
{
caption
:
'entities.wfuser.views.pickupgridview.caption'
,
parameters
:
[
{
pathName
:
'wfusers'
,
parameterName
:
'wfuser'
},
{
pathName
:
'pickupgridview'
,
parameterName
:
'pickupgridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfuser-pickup-grid-view/wfuser-pickup-grid-view.vue'
),
},
{
path
:
'/ibzorganizations/:ibzorganization?/pickupview/:pickupview?'
,
meta
:
{
caption
:
'entities.ibzorganization.views.pickupview.caption'
,
parameters
:
[
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'pickupview'
,
parameterName
:
'pickupview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzorganization-pickup-view/ibzorganization-pickup-view.vue'
),
},
{
path
:
'/ibzorganizations/:ibzorganization?/pickupgridview/:pickupgridview?'
,
meta
:
{
caption
:
'entities.ibzorganization.views.pickupgridview.caption'
,
parameters
:
[
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'pickupgridview'
,
parameterName
:
'pickupgridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzorganization-pickup-grid-view/ibzorganization-pickup-grid-view.vue'
),
},
{
path
:
'/ibzdepartments/:ibzdepartment?/pickupgridview/:pickupgridview?'
,
meta
:
{
caption
:
'entities.ibzdepartment.views.pickupgridview.caption'
,
parameters
:
[
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'pickupgridview'
,
parameterName
:
'pickupgridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzdepartment-pickup-grid-view/ibzdepartment-pickup-grid-view.vue'
),
},
{
path
:
'/sysuserroles/:sysuserrole?/editview/:editview?'
,
meta
:
{
caption
:
'entities.sysuserrole.views.editview.caption'
,
parameters
:
[
{
pathName
:
'sysuserroles'
,
parameterName
:
'sysuserrole'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-user-role-edit-view/sys-user-role-edit-view.vue'
),
},
{
path
:
'/wfgroups/:wfgroup?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.wfgroup.views.gridview.caption'
,
parameters
:
[
{
pathName
:
'wfgroups'
,
parameterName
:
'wfgroup'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/workflow/wfgroup-grid-view/wfgroup-grid-view.vue'
),
},
...
globalRoutes
,
...
globalRoutes
,
{
{
path
:
'/login/:login?'
,
path
:
'/login/:login?'
,
...
...
app_Web/src/pages/workflow/wfprocess-definition-edit-view/wfprocess-definition-edit-view-base.vue
0 → 100644
浏览文件 @
90138f50
<
template
>
<div
class=
"view-container deeditview wfprocess-definition-edit-view"
>
<app-studioaction
:viewTitle=
"$t(model.srfTitle)"
viewName=
"wfprocessdefinitioneditview"
></app-studioaction>
<card
class=
'view-card '
:disHover=
"true"
:bordered=
"false"
>
<p
slot=
'title'
>
<span
class=
'caption-info'
>
{{
$t
(
model
.
srfTitle
)
}}
</span>
</p>
<div
slot=
"extra"
>
<div
class=
'toolbar-container'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem3.visabled"
:disabled=
"toolBarModels.tbitem3.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem3' }, $event)">
<i
class=
'fa fa-save'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem3.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem3.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem4.visabled"
:disabled=
"toolBarModels.tbitem4.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem4' }, $event)">
<i
class=
'sx-tb-saveandnew'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem4.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem4.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem5.visabled"
:disabled=
"toolBarModels.tbitem5.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem5' }, $event)">
<i
class=
'sx-tb-saveandclose'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem5.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem5.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem7.visabled"
:disabled=
"toolBarModels.tbitem7.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem7' }, $event)">
<i
class=
'fa fa-remove'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem7.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem7.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem12.visabled"
:disabled=
"toolBarModels.tbitem12.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem12' }, $event)">
<i
class=
'fa fa-file-text-o'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem12.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem12.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem14.visabled"
:disabled=
"toolBarModels.tbitem14.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem14' }, $event)">
<i
class=
'fa fa-copy'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem14.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem14.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem23.visabled"
:disabled=
"toolBarModels.tbitem23.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem23' }, $event)">
<i
class=
'fa fa-fast-backward'
></i>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem23.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem24.visabled"
:disabled=
"toolBarModels.tbitem24.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem24' }, $event)">
<i
class=
'fa fa-step-backward'
></i>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem24.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem25.visabled"
:disabled=
"toolBarModels.tbitem25.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem25' }, $event)">
<i
class=
'fa fa-step-forward'
></i>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem25.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem26.visabled"
:disabled=
"toolBarModels.tbitem26.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem26' }, $event)">
<i
class=
'fa fa-fast-forward'
></i>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem26.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem22.visabled"
:disabled=
"toolBarModels.tbitem22.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem22' }, $event)">
<i
class=
'fa fa-question'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem22.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.editviewtoolbar_toolbar.tbitem22.tip'
)
}}
</div>
</tooltip>
</div>
</div>
<div
class=
"content-container"
>
<div
class=
'view-top-messages'
>
</div>
<view
_form
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:autosave=
"false"
:viewtag=
"viewtag"
:showBusyIndicator=
"true"
updateAction=
"Update"
removeAction=
"Remove"
loaddraftAction=
"GetDraft"
loadAction=
"Get"
createAction=
"Create"
WFSubmitAction=
""
WFStartAction=
""
style=
''
name=
"form"
ref=
'form'
@
save=
"form_save($event)"
@
remove=
"form_remove($event)"
@
load=
"form_load($event)"
@
closeview=
"closeView($event)"
>
</view
_form
>
<div
class=
'view-bottom-messages'
>
</div>
</div>
</card>
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
}
from
'vue-property-decorator'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
{
Subject
}
from
'rxjs'
;
import
WFProcessDefinitionService
from
'@/service/wfprocess-definition/wfprocess-definition-service'
;
import
EditViewEngine
from
'@engine/view/edit-view-engine'
;
@
Component
({
components
:
{
},
})
export
default
class
WFProcessDefinitionEditViewBase
extends
Vue
{
/**
* 实体服务对象
*
* @type {WFProcessDefinitionService}
* @memberof WFProcessDefinitionEditViewBase
*/
public
appEntityService
:
WFProcessDefinitionService
=
new
WFProcessDefinitionService
;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof WFProcessDefinitionEditViewBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof WFProcessDefinitionEditViewBase
*/
@
Emit
()
public
viewDatasChange
(
val
:
any
):
any
{
return
val
;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof WFProcessDefinitionEditViewBase
*/
@
Prop
()
public
viewdata
!
:
string
;
/**
* 传入视图参数
*
* @type {string}
* @memberof WFProcessDefinitionEditViewBase
*/
@
Prop
()
public
viewparam
!
:
string
;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof WFProcessDefinitionEditViewBase
*/
@
Prop
({
default
:
true
})
public
viewDefaultUsage
!
:
boolean
;
/**
* 视图标识
*
* @type {string}
* @memberof WFProcessDefinitionEditViewBase
*/
public
viewtag
:
string
=
'3fcd491c13d05ab7dcce8d2c920d0aec'
;
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof WFProcessDefinitionEditViewBase
*/
public
customViewNavContexts
:
any
=
{
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof WFProcessDefinitionEditViewBase
*/
public
customViewParams
:
any
=
{
};
/**
* 视图模型数据
*
* @type {*}
* @memberof WFProcessDefinitionEditViewBase
*/
public
model
:
any
=
{
srfCaption
:
'entities.wfprocessdefinition.views.editview.caption'
,
srfTitle
:
'entities.wfprocessdefinition.views.editview.title'
,
srfSubTitle
:
'entities.wfprocessdefinition.views.editview.subtitle'
,
dataInfo
:
''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof WFProcessDefinitionEditViewBase
*/
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
for
(
let
key
in
this
.
viewparams
){
delete
this
.
viewparams
[
key
];
}
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof WFProcessDefinitionEditViewBase
*/
@
Watch
(
'viewdata'
)
onViewData
(
newVal
:
any
,
oldVal
:
any
)
{
const
_this
:
any
=
this
;
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
engine
)
{
_this
.
parseViewParam
();
_this
.
engine
.
load
();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof WFProcessDefinitionEditViewBase
*/
public
containerModel
:
any
=
{
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_form
:
{
name
:
'form'
,
type
:
'FORM'
},
};
/**
* 计数器刷新
*
* @memberof WFProcessDefinitionEditViewBase
*/
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 WFProcessDefinitionEditViewBase
*/
public
viewState
:
Subject
<
ViewState
>
=
new
Subject
();
/**
* 工具栏模型
*
* @type {*}
* @memberof WFProcessDefinitionEditView
*/
public
toolBarModels
:
any
=
{
tbitem3
:
{
name
:
'tbitem3'
,
caption
:
'保存'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Save'
,
target
:
''
}
},
tbitem4
:
{
name
:
'tbitem4'
,
caption
:
'保存并新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'SaveAndNew'
,
target
:
''
}
},
tbitem5
:
{
name
:
'tbitem5'
,
caption
:
'保存并关闭'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'SaveAndExit'
,
target
:
''
}
},
tbitem6
:
{
name
:
'tbitem6'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem7
:
{
name
:
'tbitem7'
,
caption
:
'删除并关闭'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'RemoveAndExit'
,
target
:
'SINGLEKEY'
}
},
tbitem8
:
{
name
:
'tbitem8'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem12
:
{
name
:
'tbitem12'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem13
:
{
name
:
'tbitem13'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem14
:
{
name
:
'tbitem14'
,
caption
:
'拷贝'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
}
},
tbitem16
:
{
name
:
'tbitem16'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem23
:
{
name
:
'tbitem23'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'FirstRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem24
:
{
name
:
'tbitem24'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'PrevRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem25
:
{
name
:
'tbitem25'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'NextRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem26
:
{
name
:
'tbitem26'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'LastRecord'
,
target
:
'SINGLEKEY'
}
},
tbitem21
:
{
name
:
'tbitem21'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem22
:
{
name
:
'tbitem22'
,
caption
:
'帮助'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Help'
,
target
:
''
}
},
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof WFProcessDefinitionEditViewBase
*/
public
engine
:
EditViewEngine
=
new
EditViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof WFProcessDefinitionEditViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
form
:
this
.
$refs
.
form
,
p2k
:
'0'
,
keyPSDEField
:
'wfprocessdefinition'
,
majorPSDEField
:
'definitionname'
,
isLoadDefault
:
true
,
});
}
/**
* 应用上下文
*
* @type {*}
* @memberof WFProcessDefinitionEditViewBase
*/
public
context
:
any
=
{};
/**
* 视图参数
*
* @type {*}
* @memberof WFProcessDefinitionEditViewBase
*/
public
viewparams
:
any
=
{};
/**
* 解析视图参数
*
* @public
* @memberof WFProcessDefinitionEditViewBase
*/
public
parseViewParam
():
void
{
for
(
let
key
in
this
.
context
){
delete
this
.
context
[
key
];
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
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
(
this
.
$store
.
getters
.
getAppData
()
&&
this
.
$store
.
getters
.
getAppData
().
context
){
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
//初始化视图唯一标识
Object
.
assign
(
this
.
context
,{
srfsessionid
:
this
.
$util
.
createUUID
()});
this
.
handleCustomViewData
();
}
/**
* 处理自定义视图数据
*
* @memberof WFProcessDefinitionEditViewBase
*/
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 WFProcessDefinitionEditViewBase
*/
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
()]){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
this
.
context
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
if
(
this
.
viewparams
[(
curNavData
.
value
).
toLowerCase
()]){
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
});
}
}
}
}
/**
* Vue声明周期
*
* @memberof WFProcessDefinitionEditViewBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof WFProcessDefinitionEditViewBase
*/
public
afterCreated
(){
const
secondtag
=
this
.
$util
.
createUUID
();
this
.
$store
.
commit
(
'viewaction/createdView'
,
{
viewtag
:
this
.
viewtag
,
secondtag
:
secondtag
});
this
.
viewtag
=
secondtag
;
this
.
parseViewParam
();
}
/**
* 销毁之前
*
* @memberof WFProcessDefinitionEditViewBase
*/
public
beforeDestroy
()
{
this
.
$store
.
commit
(
'viewaction/removeView'
,
this
.
viewtag
);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof WFProcessDefinitionEditViewBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof WFProcessDefinitionEditViewBase
*/
public
afterMounted
(){
const
_this
:
any
=
this
;
_this
.
engineInit
();
if
(
_this
.
loadModel
&&
_this
.
loadModel
instanceof
Function
)
{
_this
.
loadModel
();
}
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionEditViewBase
*/
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
)
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem3'
))
{
this
.
toolbar_tbitem3_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem4'
))
{
this
.
toolbar_tbitem4_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem5'
))
{
this
.
toolbar_tbitem5_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem7'
))
{
this
.
toolbar_tbitem7_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem9'
))
{
this
.
toolbar_tbitem9_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem10'
))
{
this
.
toolbar_tbitem10_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem12'
))
{
this
.
toolbar_tbitem12_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem14'
))
{
this
.
toolbar_tbitem14_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem15'
))
{
this
.
toolbar_tbitem15_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem23'
))
{
this
.
toolbar_tbitem23_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem24'
))
{
this
.
toolbar_tbitem24_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem25'
))
{
this
.
toolbar_tbitem25_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem26'
))
{
this
.
toolbar_tbitem26_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem22'
))
{
this
.
toolbar_tbitem22_click
(
null
,
''
,
$event2
);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionEditViewBase
*/
public
form_save
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'save'
,
$event
);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionEditViewBase
*/
public
form_remove
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'remove'
,
$event
);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionEditViewBase
*/
public
form_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'load'
,
$event
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem3_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Save
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem4_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
SaveAndNew
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem5_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
SaveAndExit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem7_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
RemoveAndExit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem9_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
SaveAndStart
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem10_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ViewWFStep
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem12_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
New
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem14_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Copy
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem15_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Print
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem23_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
FirstRecord
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem24_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
PrevRecord
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem25_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
NextRecord
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem26_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
LastRecord
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem22_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
form
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Help
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
Save
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
// 界面行为容器对象 _this
const
_this
:
any
=
this
;
if
(
xData
&&
xData
.
save
instanceof
Function
)
{
xData
.
save
().
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
return
;
}
_this
.
$emit
(
'viewdataschange'
,
[{
...
response
.
data
}]);
});
}
else
if
(
_this
.
save
&&
_this
.
save
instanceof
Function
)
{
_this
.
save
();
}
}
/**
* 保存并新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
SaveAndNew
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
saveAndNew
instanceof
Function
))
{
return
;
}
xData
.
saveAndNew
().
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
_this
.
$emit
(
'viewdataschange'
,
JSON
.
stringify
({
status
:
'error'
,
action
:
'saveAndNew'
}));
return
;
}
_this
.
$emit
(
'viewdataschange'
,
JSON
.
stringify
({
status
:
'success'
,
action
:
'saveAndNew'
,
data
:
response
.
data
}));
if
(
xData
.
autoLoad
instanceof
Function
)
{
xData
.
autoLoad
();
}
});
}
/**
* 保存并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
SaveAndExit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
xData
&&
xData
.
saveAndExit
instanceof
Function
)
{
xData
.
saveAndExit
().
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
return
;
}
if
(
window
.
parent
){
window
.
parent
.
postMessage
([{
...
response
.
data
}],
'*'
);
}
});
}
else
if
(
_this
.
saveAndExit
&&
_this
.
saveAndExit
instanceof
Function
)
{
_this
.
saveAndExit
().
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
return
;
}
if
(
window
.
parent
){
window
.
parent
.
postMessage
([{
...
response
.
data
}],
'*'
);
}
});
}
}
/**
* 删除并关闭
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
RemoveAndExit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
xData
&&
xData
.
removeAndExit
instanceof
Function
)
{
xData
.
removeAndExit
().
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
return
;
}
if
(
window
.
parent
){
window
.
parent
.
postMessage
([{
...
response
.
data
}],
'*'
);
}
});
}
else
if
(
_this
.
removeAndExit
&&
_this
.
removeAndExit
instanceof
Function
)
{
_this
.
removeAndExit
().
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
return
;
}
if
(
window
.
parent
){
window
.
parent
.
postMessage
([{
...
response
.
data
}],
'*'
);
}
});
}
}
/**
* 开始流程
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
SaveAndStart
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
wfstart
instanceof
Function
))
{
return
;
}
xData
.
wfstart
(
args
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
return
;
}
const
{
data
:
_data
}
=
response
;
if
(
window
.
parent
){
window
.
parent
.
postMessage
({
...
_data
},
'*'
);
}
if
(
_this
.
viewdata
)
{
_this
.
$emit
(
'viewdataschange'
,
[{
...
_data
}]);
_this
.
$emit
(
'close'
);
}
else
if
(
this
.
$tabPageExp
)
{
this
.
$tabPageExp
.
onClose
(
this
.
$route
.
fullPath
);
}
});
}
/**
* 当前流程步骤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
ViewWFStep
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
let
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
wfsubmit
instanceof
Function
))
{
return
;
}
xData
.
wfsubmit
(
args
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
return
;
}
const
{
data
:
_data
}
=
response
;
if
(
_this
.
viewdata
)
{
_this
.
$emit
(
'viewdataschange'
,
[{
...
_data
}]);
_this
.
$emit
(
'close'
);
}
else
if
(
_this
.
$tabPageExp
)
{
_this
.
$tabPageExp
.
onClose
(
_this
.
$route
.
fullPath
);
}
});
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
New
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
_this
.
newdata
&&
_this
.
newdata
instanceof
Function
)
{
const
data
:
any
=
{};
_this
.
newdata
([{
...
data
}],[{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'newdata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
Copy
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
newdata
&&
_this
.
newdata
instanceof
Function
)
{
const
data
:
any
=
{};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
srfsourcekey
:
args
[
0
].
srfkey
})
actionContext
.
$store
.
commit
(
'addCopyData'
,
{
srfkey
:
args
[
0
].
srfkey
,
copyData
:
args
[
0
]
});
}
_this
.
newdata
([{
...
data
}],[{
...
data
}],
params
,
$event
,
xData
);
}
else
if
(
xData
&&
xData
.
copy
instanceof
Function
)
{
if
(
args
.
length
>
0
)
{
actionContext
.
$store
.
commit
(
'addCopyData'
,
{
srfkey
:
args
[
0
].
srfkey
,
copyData
:
args
[
0
]
});
}
xData
.
copy
(
args
[
0
].
srfkey
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'opendata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
Print
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
let
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
print
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
print
();
}
/**
* 第一个记录
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
FirstRecord
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'暂不支持此项操作'
});
}
/**
* 上一个记录
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
PrevRecord
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'暂不支持此项操作'
});
}
/**
* 下一个记录
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
NextRecord
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'暂不支持此项操作'
});
}
/**
* 最后一个记录
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
LastRecord
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'暂不支持此项操作'
});
}
/**
* 帮助
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionEditViewBase
*/
public
Help
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'帮助未支持'
});
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof WFProcessDefinitionEditViewBase
*/
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 WFProcessDefinitionEditViewBase
*/
public
destroyed
(){
this
.
afterDestroyed
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof WFProcessDefinitionEditViewBase
*/
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
);
}
})
}
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './wfprocess-definition-edit-view.less';
</
style
>
\ No newline at end of file
app_Web/src/pages/workflow/wfprocess-definition-edit-view/wfprocess-definition-edit-view.less
0 → 100644
浏览文件 @
90138f50
.view-card {
>.ivu-card-extra {
top: 5px;
right: 0px;
}
}
.wfprocess-definition-edit-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
app_Web/src/pages/workflow/wfprocess-definition-edit-view/wfprocess-definition-edit-view.vue
0 → 100644
浏览文件 @
90138f50
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
WFProcessDefinitionEditViewBase
from
'./wfprocess-definition-edit-view-base.vue'
;
import
view_form
from
'@widgets/wfprocess-definition/main-form/main-form.vue'
;
@
Component
({
components
:
{
view_form
,
},
beforeRouteEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
next
((
vm
:
any
)
=>
{
vm
.
$store
.
commit
(
'addCurPageViewtag'
,
{
fullPath
:
to
.
fullPath
,
viewtag
:
vm
.
viewtag
});
});
},
})
export
default
class
WFProcessDefinitionEditView
extends
WFProcessDefinitionEditViewBase
{
}
</
script
>
\ No newline at end of file
app_Web/src/pages/workflow/wfprocess-definition-grid-view/wfprocess-definition-grid-view-base.vue
0 → 100644
浏览文件 @
90138f50
<
template
>
<div
class=
'view-container degridview wfprocess-definition-grid-view'
>
<app-studioaction
:viewTitle=
"$t(model.srfTitle)"
viewName=
"wfprocessdefinitiongridview"
></app-studioaction>
<card
class=
'view-card '
:dis-hover=
"true"
:bordered=
"false"
>
<p
slot=
'title'
>
<span
class=
'caption-info'
>
{{
$t
(
model
.
srfTitle
)
}}
</span>
</p>
<div
class=
'content-container'
>
<div
class=
'view-top-messages'
>
</div>
<div
style=
'margin-bottom: 6px;'
>
<i-input
v-show=
"!isExpandSearchForm"
v-model=
"query"
search
enter-button
@
on-search=
"onSearch($event)"
class=
'quick-search-input'
style=
'max-width: 400px;'
placeholder=
"流程定义名称"
/>
<div
class=
'pull-right'
>
<div
class=
'toolbar-container'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem3.visabled"
:disabled=
"toolBarModels.tbitem3.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem3' }, $event)">
<i
class=
'fa fa-file-text-o'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem3.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem3.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem4.visabled"
:disabled=
"toolBarModels.tbitem4.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem4' }, $event)">
<i
class=
'fa fa-edit'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem4.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem4.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem6.visabled"
:disabled=
"toolBarModels.tbitem6.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem6' }, $event)">
<i
class=
'fa fa-copy'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem6.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem6.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem8.visabled"
:disabled=
"toolBarModels.tbitem8.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem8' }, $event)">
<i
class=
'fa fa-remove'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem8.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem8.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<app-export-excel
:item=
"toolBarModels.tbitem13"
:caption=
"$t('entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem13.caption')"
@
exportexcel=
"toolbar_click(
{ tag: 'tbitem13' }, $event)">
</app-export-excel>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem13.tip'
)
}}
</div>
</tooltip>
<span
class=
'seperator'
>
|
</span>
<dropdown
v-show=
"toolBarModels.tbitem16.visabled"
trigger=
'click'
>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
class=
''
>
<i
class=
''
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem16.caption'
)
}}
</span>
<icon
type=
"ios-arrow-down"
></icon>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem16.tip'
)
}}
</div>
</tooltip>
<dropdown-menu
slot=
'list'
>
<dropdown-item>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem21.visabled"
:disabled=
"toolBarModels.tbitem21.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem21' }, $event)">
<i
class=
'fa fa-download'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem21.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem21.tip'
)
}}
</div>
</tooltip>
</dropdown-item>
<dropdown-item>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem23.visabled"
:disabled=
"toolBarModels.tbitem23.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem23' }, $event)">
<i
class=
'fa fa-upload'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem23.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem23.tip'
)
}}
</div>
</tooltip>
</dropdown-item>
</dropdown-menu>
</dropdown>
<span
class=
'seperator'
>
|
</span>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem19.visabled"
:disabled=
"toolBarModels.tbitem19.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem19' }, $event)">
<i
class=
'fa fa-filter'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem19.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem19.tip'
)
}}
</div>
</tooltip>
<tooltip
:transfer=
"true"
:max-width=
"600"
>
<i-button
v-show=
"toolBarModels.tbitem18.visabled"
:disabled=
"toolBarModels.tbitem18.disabled"
class=
''
@
click=
"toolbar_click(
{ tag: 'tbitem18' }, $event)">
<i
class=
'fa fa-question'
></i>
<span
class=
'caption'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem18.caption'
)
}}
</span>
</i-button>
<div
slot=
'content'
>
{{
$t
(
'entities.wfprocessdefinition.gridviewtoolbar_toolbar.tbitem18.tip'
)
}}
</div>
</tooltip>
</div>
</div>
</div>
<view
_searchform
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:showBusyIndicator=
"true"
v-show=
"isExpandSearchForm"
loaddraftAction=
"FilterGetDraft"
loadAction=
"FilterGet"
name=
"searchform"
ref=
'searchform'
@
save=
"searchform_save($event)"
@
search=
"searchform_search($event)"
@
load=
"searchform_load($event)"
@
closeview=
"closeView($event)"
>
</view
_searchform
>
<view
_grid
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:isSingleSelect=
"isSingleSelect"
:showBusyIndicator=
"true"
:isOpenEdit=
"false"
:gridRowActiveMode=
"gridRowActiveMode"
@
save=
"onSave"
updateAction=
""
removeAction=
"Remove"
loaddraftAction=
""
loadAction=
""
createAction=
""
fetchAction=
"FetchDefault"
:newdata=
"newdata"
:opendata=
"opendata"
name=
"grid"
ref=
'grid'
@
selectionchange=
"grid_selectionchange($event)"
@
beforeload=
"grid_beforeload($event)"
@
rowdblclick=
"grid_rowdblclick($event)"
@
remove=
"grid_remove($event)"
@
load=
"grid_load($event)"
@
closeview=
"closeView($event)"
>
</view
_grid
>
<div
class=
'view-bottom-messages'
>
</div>
</div>
</card>
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
}
from
'vue-property-decorator'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
{
Subject
}
from
'rxjs'
;
import
WFProcessDefinitionService
from
'@/service/wfprocess-definition/wfprocess-definition-service'
;
import
GridViewEngine
from
'@engine/view/grid-view-engine'
;
import
CodeListService
from
"@service/app/codelist-service"
;
@
Component
({
components
:
{
},
})
export
default
class
WFProcessDefinitionGridViewBase
extends
Vue
{
/**
* 实体服务对象
*
* @type {WFProcessDefinitionService}
* @memberof WFProcessDefinitionGridViewBase
*/
public
appEntityService
:
WFProcessDefinitionService
=
new
WFProcessDefinitionService
;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof WFProcessDefinitionGridViewBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof WFProcessDefinitionGridViewBase
*/
@
Emit
()
public
viewDatasChange
(
val
:
any
):
any
{
return
val
;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof WFProcessDefinitionGridViewBase
*/
@
Prop
()
public
viewdata
!
:
string
;
/**
* 传入视图参数
*
* @type {string}
* @memberof WFProcessDefinitionGridViewBase
*/
@
Prop
()
public
viewparam
!
:
string
;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof WFProcessDefinitionGridViewBase
*/
@
Prop
({
default
:
true
})
public
viewDefaultUsage
!
:
boolean
;
/**
* 视图标识
*
* @type {string}
* @memberof WFProcessDefinitionGridViewBase
*/
public
viewtag
:
string
=
'bfa86be8c02420f87d5cf4ff9a768948'
;
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof WFProcessDefinitionGridViewBase
*/
public
customViewNavContexts
:
any
=
{
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof WFProcessDefinitionGridViewBase
*/
public
customViewParams
:
any
=
{
};
/**
* 视图模型数据
*
* @type {*}
* @memberof WFProcessDefinitionGridViewBase
*/
public
model
:
any
=
{
srfCaption
:
'entities.wfprocessdefinition.views.gridview.caption'
,
srfTitle
:
'entities.wfprocessdefinition.views.gridview.title'
,
srfSubTitle
:
'entities.wfprocessdefinition.views.gridview.subtitle'
,
dataInfo
:
''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof WFProcessDefinitionGridViewBase
*/
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
for
(
let
key
in
this
.
viewparams
){
delete
this
.
viewparams
[
key
];
}
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof WFProcessDefinitionGridViewBase
*/
@
Watch
(
'viewdata'
)
onViewData
(
newVal
:
any
,
oldVal
:
any
)
{
const
_this
:
any
=
this
;
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
engine
)
{
_this
.
parseViewParam
();
_this
.
engine
.
load
();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof WFProcessDefinitionGridViewBase
*/
public
containerModel
:
any
=
{
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_grid
:
{
name
:
'grid'
,
type
:
'GRID'
},
view_searchform
:
{
name
:
'searchform'
,
type
:
'SEARCHFORM'
},
};
/**
* 计数器刷新
*
* @memberof WFProcessDefinitionGridViewBase
*/
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 WFProcessDefinitionGridViewBase
*/
public
viewState
:
Subject
<
ViewState
>
=
new
Subject
();
/**
* 工具栏模型
*
* @type {*}
* @memberof WFProcessDefinitionGridView
*/
public
toolBarModels
:
any
=
{
tbitem3
:
{
name
:
'tbitem3'
,
caption
:
'新建'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
}
},
tbitem4
:
{
name
:
'tbitem4'
,
caption
:
'编辑'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
}
},
tbitem6
:
{
name
:
'tbitem6'
,
caption
:
'拷贝'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
}
},
tbitem7
:
{
name
:
'tbitem7'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem8
:
{
name
:
'tbitem8'
,
caption
:
'删除'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Remove'
,
target
:
'MULTIKEY'
}
},
tbitem9
:
{
name
:
'tbitem9'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem13
:
{
name
:
'tbitem13'
,
caption
:
'导出'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ExportExcel'
,
target
:
''
},
MaxRowCount
:
1000
},
tbitem10
:
{
name
:
'tbitem10'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem16
:
{
name
:
'tbitem16'
,
caption
:
'其它'
,
disabled
:
false
,
type
:
'ITEMS'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem21
:
{
name
:
'tbitem21'
,
caption
:
'导出数据模型'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ExportModel'
,
target
:
''
}
},
tbitem23
:
{
name
:
'tbitem23'
,
caption
:
'数据导入'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Import'
,
target
:
''
}
},
tbitem17
:
{
name
:
'tbitem17'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem19
:
{
name
:
'tbitem19'
,
caption
:
'过滤'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'ToggleFilter'
,
target
:
''
}
},
tbitem18
:
{
name
:
'tbitem18'
,
caption
:
'帮助'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Help'
,
target
:
''
}
},
};
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof WFProcessDefinitionGridViewBase
*/
public
engine
:
GridViewEngine
=
new
GridViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof WFProcessDefinitionGridViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
opendata
:
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
=>
{
this
.
opendata
(
args
,
fullargs
,
params
,
$event
,
xData
);
},
newdata
:
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
=>
{
this
.
newdata
(
args
,
fullargs
,
params
,
$event
,
xData
);
},
grid
:
this
.
$refs
.
grid
,
searchform
:
this
.
$refs
.
searchform
,
keyPSDEField
:
'wfprocessdefinition'
,
majorPSDEField
:
'definitionname'
,
isLoadDefault
:
true
,
});
}
/**
* 应用上下文
*
* @type {*}
* @memberof WFProcessDefinitionGridViewBase
*/
public
context
:
any
=
{};
/**
* 视图参数
*
* @type {*}
* @memberof WFProcessDefinitionGridViewBase
*/
public
viewparams
:
any
=
{};
/**
* 解析视图参数
*
* @public
* @memberof WFProcessDefinitionGridViewBase
*/
public
parseViewParam
():
void
{
for
(
let
key
in
this
.
context
){
delete
this
.
context
[
key
];
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
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
(
this
.
$store
.
getters
.
getAppData
()
&&
this
.
$store
.
getters
.
getAppData
().
context
){
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
//初始化视图唯一标识
Object
.
assign
(
this
.
context
,{
srfsessionid
:
this
.
$util
.
createUUID
()});
this
.
handleCustomViewData
();
}
/**
* 处理自定义视图数据
*
* @memberof WFProcessDefinitionGridViewBase
*/
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 WFProcessDefinitionGridViewBase
*/
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
()]){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
this
.
context
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
if
(
this
.
viewparams
[(
curNavData
.
value
).
toLowerCase
()]){
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
});
}
}
}
}
/**
* Vue声明周期
*
* @memberof WFProcessDefinitionGridViewBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof WFProcessDefinitionGridViewBase
*/
public
afterCreated
(){
const
secondtag
=
this
.
$util
.
createUUID
();
this
.
$store
.
commit
(
'viewaction/createdView'
,
{
viewtag
:
this
.
viewtag
,
secondtag
:
secondtag
});
this
.
viewtag
=
secondtag
;
this
.
parseViewParam
();
if
(
this
.
formDruipart
){
this
.
formDruipart
.
subscribe
((
res
:
any
)
=>
{
if
(
Object
.
is
(
res
.
action
,
'save'
)){
this
.
viewState
.
next
({
tag
:
'grid'
,
action
:
'save'
,
data
:
this
.
viewparams
});
}
if
(
Object
.
is
(
res
.
action
,
'load'
)){
const
_this
:
any
=
this
;
_this
.
engine
.
load
(
res
.
data
,
true
);
}
});
}
}
/**
* 销毁之前
*
* @memberof WFProcessDefinitionGridViewBase
*/
public
beforeDestroy
()
{
this
.
$store
.
commit
(
'viewaction/removeView'
,
this
.
viewtag
);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof WFProcessDefinitionGridViewBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof WFProcessDefinitionGridViewBase
*/
public
afterMounted
(){
const
_this
:
any
=
this
;
_this
.
engineInit
();
if
(
_this
.
loadModel
&&
_this
.
loadModel
instanceof
Function
)
{
_this
.
loadModel
();
}
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionGridViewBase
*/
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
)
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem3'
))
{
this
.
toolbar_tbitem3_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem4'
))
{
this
.
toolbar_tbitem4_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem5'
))
{
this
.
toolbar_tbitem5_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem6'
))
{
this
.
toolbar_tbitem6_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem24'
))
{
this
.
toolbar_tbitem24_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem25'
))
{
this
.
toolbar_tbitem25_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem8'
))
{
this
.
toolbar_tbitem8_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem13'
))
{
this
.
toolbar_tbitem13_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem11'
))
{
this
.
toolbar_tbitem11_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem21'
))
{
this
.
toolbar_tbitem21_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem23'
))
{
this
.
toolbar_tbitem23_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem19'
))
{
this
.
toolbar_tbitem19_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem18'
))
{
this
.
toolbar_tbitem18_click
(
null
,
''
,
$event2
);
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionGridViewBase
*/
public
grid_selectionchange
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'selectionchange'
,
$event
);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionGridViewBase
*/
public
grid_beforeload
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'beforeload'
,
$event
);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionGridViewBase
*/
public
grid_rowdblclick
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'rowdblclick'
,
$event
);
}
/**
* grid 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionGridViewBase
*/
public
grid_remove
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'remove'
,
$event
);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionGridViewBase
*/
public
grid_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'load'
,
$event
);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionGridViewBase
*/
public
searchform_save
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'save'
,
$event
);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionGridViewBase
*/
public
searchform_search
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'search'
,
$event
);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof WFProcessDefinitionGridViewBase
*/
public
searchform_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'load'
,
$event
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem3_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
New
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem4_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Edit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem5_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
View
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem6_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Copy
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem24_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ToggleRowEdit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem25_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
NewRow
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem8_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Remove
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem13_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ExportExcel
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem11_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Print
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem21_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ExportModel
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem23_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Import
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem19_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
ToggleFilter
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem18_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
xData
=
this
.
$refs
.
grid
;
if
(
xData
.
getDatas
&&
xData
.
getDatas
instanceof
Function
)
{
datas
=
[...
xData
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Help
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"WFProcessDefinition"
);
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof WFProcessDefinitionGridView
*/
public
newdata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
const
data
:
any
=
{};
if
(
args
[
0
].
srfsourcekey
){
data
.
srfsourcekey
=
args
[
0
].
srfsourcekey
;
}
let
curViewParam
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
if
(
args
.
length
>
0
){
Object
.
assign
(
curViewParam
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'wfprocessdefinitions'
,
parameterName
:
'wfprocessdefinition'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
];
const
_this
:
any
=
this
;
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
_data
:
any
=
{
w
:
(
new
Date
().
getTime
())
};
Object
.
assign
(
_data
,
data
);
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
curViewParam
,
deResParameters
,
parameters
,
args
,
_data
);
this
.
$router
.
push
(
routePath
);
}
openIndexViewTab
(
data
);
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof WFProcessDefinitionGridView
*/
public
opendata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
const
data
:
any
=
{};
let
curViewParam
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
if
(
args
.
length
>
0
){
Object
.
assign
(
curViewParam
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'wfprocessdefinitions'
,
parameterName
:
'wfprocessdefinition'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
];
const
_this
:
any
=
this
;
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
curViewParam
,
deResParameters
,
parameters
,
args
,
data
);
this
.
$router
.
push
(
routePath
);
}
openIndexViewTab
(
data
);
}
/**
* 新建
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
New
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
_this
.
newdata
&&
_this
.
newdata
instanceof
Function
)
{
const
data
:
any
=
{};
_this
.
newdata
([{
...
data
}],[{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'newdata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
Edit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
opendata
&&
_this
.
opendata
instanceof
Function
)
{
const
data
:
any
=
{
};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
wfprocessdefinition
:
args
[
0
].
wfprocessdefinition
})
}
_this
.
opendata
([{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'opendata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 查看
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
View
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
opendata
&&
_this
.
opendata
instanceof
Function
)
{
const
data
:
any
=
{
};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
wfprocessdefinition
:
args
[
0
].
wfprocessdefinition
})
}
_this
.
opendata
([{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'opendata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 拷贝
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
Copy
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
newdata
&&
_this
.
newdata
instanceof
Function
)
{
const
data
:
any
=
{};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
srfsourcekey
:
args
[
0
].
srfkey
})
actionContext
.
$store
.
commit
(
'addCopyData'
,
{
srfkey
:
args
[
0
].
srfkey
,
copyData
:
args
[
0
]
});
}
_this
.
newdata
([{
...
data
}],[{
...
data
}],
params
,
$event
,
xData
);
}
else
if
(
xData
&&
xData
.
copy
instanceof
Function
)
{
if
(
args
.
length
>
0
)
{
actionContext
.
$store
.
commit
(
'addCopyData'
,
{
srfkey
:
args
[
0
].
srfkey
,
copyData
:
args
[
0
]
});
}
xData
.
copy
(
args
[
0
].
srfkey
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'opendata 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 行编辑
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
ToggleRowEdit
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
xData
.
actualIsOpenEdit
=
!
xData
.
actualIsOpenEdit
;
}
/**
* 新建行
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
NewRow
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
const
data
:
any
=
{};
if
(
_this
.
newRow
&&
_this
.
newRow
instanceof
Function
)
{
_this
.
newRow
([{
...
data
}],
params
,
$event
,
xData
);
}
else
if
(
xData
.
newRow
&&
xData
.
newRow
instanceof
Function
)
{
xData
.
newRow
([{
...
data
}],
params
,
$event
,
xData
);
}
else
{
_this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'newRow 视图处理逻辑不存在,请添加!'
});
}
}
/**
* 删除
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
Remove
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
remove
instanceof
Function
))
{
return
;
}
xData
.
remove
(
args
);
}
/**
* 导出
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
ExportExcel
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
exportExcel
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
exportExcel
(
$event
.
exportparms
);
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
Print
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
let
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
print
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
print
();
}
/**
* 导出数据模型
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
ExportModel
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'导出数据模型未支持'
});
}
/**
* 数据导入
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
Import
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
!
xData
||
!
(
xData
.
importExcel
instanceof
Function
)
||
!
$event
)
{
return
;
}
xData
.
importExcel
(
params
);
}
/**
* 过滤
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
ToggleFilter
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
const
_this
:
any
=
this
;
if
(
_this
.
hasOwnProperty
(
'isExpandSearchForm'
))
{
_this
.
isExpandSearchForm
=
!
_this
.
isExpandSearchForm
;
}
}
/**
* 帮助
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof WFProcessDefinitionGridViewBase
*/
public
Help
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'帮助未支持'
});
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof WFProcessDefinitionGridViewBase
*/
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 WFProcessDefinitionGridViewBase
*/
public
destroyed
(){
this
.
afterDestroyed
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof WFProcessDefinitionGridViewBase
*/
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
);
}
})
}
}
}
/**
* 是否单选
*
* @type {boolean}
* @memberof WFProcessDefinitionGridViewBase
*/
public
isSingleSelect
:
boolean
=
false
;
/**
* 是否嵌入关系界面
*
* @type {boolean}
* @memberof WFProcessDefinitionGridViewBase
*/
@
Prop
({
default
:
false
})
public
isformDruipart
?:
boolean
;
/**
* 界面关系通讯对象
*
* @type {Subject<ViewState>}
* @memberof WFProcessDefinitionGridViewBase
*/
@
Prop
()
public
formDruipart
?:
Subject
<
ViewState
>
;
/**
* 搜索值
*
* @type {string}
* @memberof WFProcessDefinitionGridViewBase
*/
public
query
:
string
=
''
;
/**
* 是否展开搜索表单
*
* @type {boolean}
* @memberof WFProcessDefinitionGridViewBase
*/
public
isExpandSearchForm
:
boolean
=
false
;
/**
* 表格行数据默认激活模式
* 0 不激活
* 1 单击激活
* 2 双击激活
*
* @type {(number | 0 | 1 | 2)}
* @memberof WFProcessDefinitionGridViewBase
*/
public
gridRowActiveMode
:
number
|
0
|
1
|
2
=
2
;
/**
* 快速搜索
*
* @param {*} $event
* @memberof WFProcessDefinitionGridViewBase
*/
public
onSearch
(
$event
:
any
):
void
{
const
grid
:
any
=
this
.
$refs
.
grid
;
if
(
grid
)
{
grid
.
load
(
this
.
context
,
true
);
}
}
/**
* grid 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ENTITYTEST1Usr2GridViewBase
*/
public
onSave
(
$event
:
any
)
{
this
.
$emit
(
'drdatasaved'
,
$event
);
}
/**
* 刷新数据
*
* @readonly
* @type {(number | null)}
* @memberof WFProcessDefinitionGridViewBase
*/
get
refreshdata
():
number
|
null
{
return
this
.
$store
.
getters
[
'viewaction/getRefreshData'
](
this
.
viewtag
);
}
/**
* 监控数据变化
*
* @param {*} newVal
* @param {*} oldVal
* @returns
* @memberof WFProcessDefinitionGridViewBase
*/
@
Watch
(
'refreshdata'
)
onRefreshData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
===
null
||
newVal
===
undefined
)
{
return
;
}
if
(
newVal
===
0
)
{
return
;
}
const
grid
:
any
=
this
.
$refs
.
grid
;
if
(
grid
)
{
grid
.
load
({});
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './wfprocess-definition-grid-view.less';
</
style
>
\ No newline at end of file
app_Web/src/pages/workflow/wfprocess-definition-grid-view/wfprocess-definition-grid-view.less
0 → 100644
浏览文件 @
90138f50
.wfprocess-definition-grid-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
app_Web/src/pages/workflow/wfprocess-definition-grid-view/wfprocess-definition-grid-view.vue
0 → 100644
浏览文件 @
90138f50
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
WFProcessDefinitionGridViewBase
from
'./wfprocess-definition-grid-view-base.vue'
;
import
view_grid
from
'@widgets/wfprocess-definition/main-grid/main-grid.vue'
;
import
view_searchform
from
'@widgets/wfprocess-definition/default-searchform/default-searchform.vue'
;
@
Component
({
components
:
{
view_grid
,
view_searchform
,
},
beforeRouteEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
next
((
vm
:
any
)
=>
{
vm
.
$store
.
commit
(
'addCurPageViewtag'
,
{
fullPath
:
to
.
fullPath
,
viewtag
:
vm
.
viewtag
});
});
},
})
export
default
class
WFProcessDefinitionGridView
extends
WFProcessDefinitionGridViewBase
{
}
</
script
>
\ No newline at end of file
app_Web/src/service/entity-service-register.ts
浏览文件 @
90138f50
...
@@ -46,6 +46,7 @@ export class EntityServiceRegister {
...
@@ -46,6 +46,7 @@ export class EntityServiceRegister {
this
.
allEntityService
.
set
(
'ibzorganization'
,
()
=>
import
(
'@/service/ibzorganization/ibzorganization-service'
));
this
.
allEntityService
.
set
(
'ibzorganization'
,
()
=>
import
(
'@/service/ibzorganization/ibzorganization-service'
));
this
.
allEntityService
.
set
(
'wfgroup'
,
()
=>
import
(
'@/service/wfgroup/wfgroup-service'
));
this
.
allEntityService
.
set
(
'wfgroup'
,
()
=>
import
(
'@/service/wfgroup/wfgroup-service'
));
this
.
allEntityService
.
set
(
'sysuserrole'
,
()
=>
import
(
'@/service/sys-user-role/sys-user-role-service'
));
this
.
allEntityService
.
set
(
'sysuserrole'
,
()
=>
import
(
'@/service/sys-user-role/sys-user-role-service'
));
this
.
allEntityService
.
set
(
'wfprocessdefinition'
,
()
=>
import
(
'@/service/wfprocess-definition/wfprocess-definition-service'
));
this
.
allEntityService
.
set
(
'sysrole'
,
()
=>
import
(
'@/service/sys-role/sys-role-service'
));
this
.
allEntityService
.
set
(
'sysrole'
,
()
=>
import
(
'@/service/sys-role/sys-role-service'
));
this
.
allEntityService
.
set
(
'ibzdeptmember'
,
()
=>
import
(
'@/service/ibzdept-member/ibzdept-member-service'
));
this
.
allEntityService
.
set
(
'ibzdeptmember'
,
()
=>
import
(
'@/service/ibzdept-member/ibzdept-member-service'
));
this
.
allEntityService
.
set
(
'ibzdepartment'
,
()
=>
import
(
'@/service/ibzdepartment/ibzdepartment-service'
));
this
.
allEntityService
.
set
(
'ibzdepartment'
,
()
=>
import
(
'@/service/ibzdepartment/ibzdepartment-service'
));
...
...
app_Web/src/service/wfprocess-definition/wfprocess-definition-service-base.ts
0 → 100644
浏览文件 @
90138f50
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 流程定义服务对象基类
*
* @export
* @class WFProcessDefinitionServiceBase
* @extends {EntityServie}
*/
export
default
class
WFProcessDefinitionServiceBase
extends
EntityService
{
/**
* Creates an instance of WFProcessDefinitionServiceBase.
*
* @param {*} [opts={}]
* @memberof WFProcessDefinitionServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof WFProcessDefinitionServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'wfprocessdefinition'
;
this
.
APPDEKEY
=
'definitionkey'
;
this
.
APPDENAME
=
'wfprocessdefinitions'
;
this
.
APPDETEXT
=
'definitionname'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzrt'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/select`
,
isloading
);
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/checkkey`
,
data
,
isloading
);
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
isloading
);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfprocessdefinitions`
,
data
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfprocessdefinitions/getdraft`
,
isloading
);
res
.
data
.
wfprocessdefinition
=
data
.
wfprocessdefinition
;
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/wfprocessdefinitions/fetchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_Web/src/service/wfprocess-definition/wfprocess-definition-service.ts
0 → 100644
浏览文件 @
90138f50
import
{
Http
,
Util
}
from
'@/utils'
;
import
WFProcessDefinitionServiceBase
from
'./wfprocess-definition-service-base'
;
/**
* 流程定义服务对象
*
* @export
* @class WFProcessDefinitionService
* @extends {WFProcessDefinitionServiceBase}
*/
export
default
class
WFProcessDefinitionService
extends
WFProcessDefinitionServiceBase
{
/**
* Creates an instance of WFProcessDefinitionService.
*
* @param {*} [opts={}]
* @memberof WFProcessDefinitionService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_Web/src/store/modules/view-action/state.ts
浏览文件 @
90138f50
...
@@ -3,6 +3,260 @@
...
@@ -3,6 +3,260 @@
*/
*/
export
const
viewstate
:
any
=
{
export
const
viewstate
:
any
=
{
appviews
:
[
appviews
:
[
{
viewtag
:
'10dd7f45f36233049c4af9ca417089f5'
,
viewmodule
:
'ou'
,
viewname
:
'IBZDepartmentPickupView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'e3284e895913f7d38d1bcbe898bda0b7'
,
],
},
{
viewtag
:
'119fe650e7efd26bd14bd413cae37ded'
,
viewmodule
:
'ou'
,
viewname
:
'IBZEmployeeEditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'61541167ccebbc3f174242ce73e436dd'
,
'10dd7f45f36233049c4af9ca417089f5'
,
'ccff36439eacae953f85ff636c9dac74'
,
],
},
{
viewtag
:
'135872676ba63d430b2f20bd20364286'
,
viewmodule
:
'workflow'
,
viewname
:
'WFMemberGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'6e1b35989dd6470b5c890369ab87b545'
,
],
},
{
viewtag
:
'13c174556f45e9b10b66dc51834a6ab5'
,
viewmodule
:
'uaa'
,
viewname
:
'SYS_ROLEGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'6bd0981f6dd67a59f211b5cf97ac8f30'
,
],
},
{
viewtag
:
'26cc2d5c69f1525eaa415b7de1a0d4a6'
,
viewmodule
:
'uaa'
,
viewname
:
'SysRolePickupView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'7c25865f5864a734477c7cb987632f4f'
,
],
},
{
viewtag
:
'2ed85bebb69b8d23388420b95163228a'
,
viewmodule
:
'ou'
,
viewname
:
'IBZOrganizationOptionView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'ccff36439eacae953f85ff636c9dac74'
,
],
},
{
viewtag
:
'32fe9ab4a9e1b8d62b9ee802e4746965'
,
viewmodule
:
'uaa'
,
viewname
:
'SysUserPickupView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'6869875c7409bd1dddd3d0fc62c502db'
,
],
},
{
viewtag
:
'3fcd491c13d05ab7dcce8d2c920d0aec'
,
viewmodule
:
'workflow'
,
viewname
:
'WFProcessDefinitionEditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'40fe6b28b9f7902341da46bb74a02d59'
,
viewmodule
:
'ou'
,
viewname
:
'IBZEmployeeGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'119fe650e7efd26bd14bd413cae37ded'
,
'9cf7a70099bff83a10f6ae65c4d54692'
,
],
},
{
viewtag
:
'61541167ccebbc3f174242ce73e436dd'
,
viewmodule
:
'ou'
,
viewname
:
'IBZDeptMemberGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'bf5e850471bab461fbb6739578e510c5'
,
],
},
{
viewtag
:
'61c5bff70bcf56e1dc0bb0900df9c98c'
,
viewmodule
:
'workflow'
,
viewname
:
'WFUserPickupView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'c9c73c8d2e61bd29a304622f3d39b522'
,
],
},
{
viewtag
:
'6435e95f9bd03acceda6b7fd610873db'
,
viewmodule
:
'ou'
,
viewname
:
'IBZOrganizationTreeExpView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'7362390ee25dac238b23fa9ab05ea4ac'
,
],
},
{
viewtag
:
'6736591aca71edc23df760e278378566'
,
viewmodule
:
'uaa'
,
viewname
:
'SysUserRoleGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'edde313015e1db7c366028307d88d20c'
,
],
},
{
viewtag
:
'6869875c7409bd1dddd3d0fc62c502db'
,
viewmodule
:
'uaa'
,
viewname
:
'SysUserPickupGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'6bd0981f6dd67a59f211b5cf97ac8f30'
,
viewmodule
:
'uaa'
,
viewname
:
'SysRoleEditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'6736591aca71edc23df760e278378566'
,
'983f3ae1533a5cd62619dedb79bb4b28'
,
],
},
{
viewtag
:
'6e1b35989dd6470b5c890369ab87b545'
,
viewmodule
:
'workflow'
,
viewname
:
'WFMemberEditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'61c5bff70bcf56e1dc0bb0900df9c98c'
,
],
},
{
viewtag
:
'7362390ee25dac238b23fa9ab05ea4ac'
,
viewmodule
:
'ou'
,
viewname
:
'IBZDepartmentGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'90c0ced2720b85d5e051e7935a93d3c5'
,
'9cdad5e2bed51cdcd90b4b7fb3104a5a'
,
],
},
{
viewtag
:
'7c25865f5864a734477c7cb987632f4f'
,
viewmodule
:
'uaa'
,
viewname
:
'SysRolePickupGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'90c0ced2720b85d5e051e7935a93d3c5'
,
viewmodule
:
'ou'
,
viewname
:
'IBZDepartmentEditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'10dd7f45f36233049c4af9ca417089f5'
,
'ccff36439eacae953f85ff636c9dac74'
,
],
},
{
viewtag
:
'95e33ff2469ba40d3e0c00f5c3f61501'
,
viewmodule
:
'ou'
,
viewname
:
'IBZOrganizationEditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'ccff36439eacae953f85ff636c9dac74'
,
],
},
{
viewtag
:
'983f3ae1533a5cd62619dedb79bb4b28'
,
viewmodule
:
'uaa'
,
viewname
:
'SysRolePermissionCustomView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'9cdad5e2bed51cdcd90b4b7fb3104a5a'
,
viewmodule
:
'ou'
,
viewname
:
'IBZDepartmentOptionView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'10dd7f45f36233049c4af9ca417089f5'
,
'ccff36439eacae953f85ff636c9dac74'
,
],
},
{
viewtag
:
'9cf7a70099bff83a10f6ae65c4d54692'
,
viewmodule
:
'ou'
,
viewname
:
'IBZEmployeeOptionView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'10dd7f45f36233049c4af9ca417089f5'
,
'ccff36439eacae953f85ff636c9dac74'
,
],
},
{
viewtag
:
'9ffa35efe3d70cf4b9fa4e83dd1979c6'
,
viewmodule
:
'ou'
,
viewname
:
'IBZEmployeePickupView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'c84df2684f29705ac6c5dec67df9f217'
,
],
},
{
viewtag
:
'b23a721ca159ac2490b768d795e85d17'
,
viewmodule
:
'workflow'
,
viewname
:
'WFGroupEditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'135872676ba63d430b2f20bd20364286'
,
],
},
{
{
viewtag
:
'b50d665e5fb8a9da01406754e0ab5f15'
,
viewtag
:
'b50d665e5fb8a9da01406754e0ab5f15'
,
viewmodule
:
'rt'
,
viewmodule
:
'rt'
,
...
@@ -15,6 +269,118 @@ export const viewstate: any = {
...
@@ -15,6 +269,118 @@ export const viewstate: any = {
'6435e95f9bd03acceda6b7fd610873db'
,
'6435e95f9bd03acceda6b7fd610873db'
,
'13c174556f45e9b10b66dc51834a6ab5'
,
'13c174556f45e9b10b66dc51834a6ab5'
,
'f498dfb24e88df7c70a5c09ecb587647'
,
'f498dfb24e88df7c70a5c09ecb587647'
,
'bfa86be8c02420f87d5cf4ff9a768948'
,
],
},
{
viewtag
:
'bf5e850471bab461fbb6739578e510c5'
,
viewmodule
:
'ou'
,
viewname
:
'IBZDeptMemberEditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'9ffa35efe3d70cf4b9fa4e83dd1979c6'
,
'10dd7f45f36233049c4af9ca417089f5'
,
],
},
{
viewtag
:
'bfa86be8c02420f87d5cf4ff9a768948'
,
viewmodule
:
'workflow'
,
viewname
:
'WFProcessDefinitionGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'3fcd491c13d05ab7dcce8d2c920d0aec'
,
],
},
{
viewtag
:
'c0cdac5d5b5691ae8a326f5972aec67f'
,
viewmodule
:
'ou'
,
viewname
:
'IBZDepartmentTreeExpView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'40fe6b28b9f7902341da46bb74a02d59'
,
],
},
{
viewtag
:
'c42bc30741bd6add20b00494231dfa24'
,
viewmodule
:
'ou'
,
viewname
:
'IBZOrganizationGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'2ed85bebb69b8d23388420b95163228a'
,
'95e33ff2469ba40d3e0c00f5c3f61501'
,
'ccff36439eacae953f85ff636c9dac74'
,
],
},
{
viewtag
:
'c84df2684f29705ac6c5dec67df9f217'
,
viewmodule
:
'ou'
,
viewname
:
'IBZEmployeePickupGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'c9c73c8d2e61bd29a304622f3d39b522'
,
viewmodule
:
'workflow'
,
viewname
:
'WFUserPickupGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'ccff36439eacae953f85ff636c9dac74'
,
viewmodule
:
'ou'
,
viewname
:
'IBZOrganizationPickupView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'cf8e6d455f8e88e66bbbe1bdb4c84274'
,
],
},
{
viewtag
:
'cf8e6d455f8e88e66bbbe1bdb4c84274'
,
viewmodule
:
'ou'
,
viewname
:
'IBZOrganizationPickupGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'ccff36439eacae953f85ff636c9dac74'
,
],
},
{
viewtag
:
'e3284e895913f7d38d1bcbe898bda0b7'
,
viewmodule
:
'ou'
,
viewname
:
'IBZDepartmentPickupGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'edde313015e1db7c366028307d88d20c'
,
viewmodule
:
'uaa'
,
viewname
:
'SysUserRoleEditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'26cc2d5c69f1525eaa415b7de1a0d4a6'
,
'32fe9ab4a9e1b8d62b9ee802e4746965'
,
],
},
{
viewtag
:
'f498dfb24e88df7c70a5c09ecb587647'
,
viewmodule
:
'workflow'
,
viewname
:
'WFGroupGridView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'b23a721ca159ac2490b768d795e85d17'
,
],
],
},
},
],
],
...
...
app_Web/src/uiservice/ui-service-register.ts
浏览文件 @
90138f50
...
@@ -46,6 +46,7 @@ export class UIServiceRegister {
...
@@ -46,6 +46,7 @@ export class UIServiceRegister {
this
.
allUIService
.
set
(
'ibzorganization'
,
()
=>
import
(
'@/uiservice/ibzorganization/ibzorganization-ui-service'
));
this
.
allUIService
.
set
(
'ibzorganization'
,
()
=>
import
(
'@/uiservice/ibzorganization/ibzorganization-ui-service'
));
this
.
allUIService
.
set
(
'wfgroup'
,
()
=>
import
(
'@/uiservice/wfgroup/wfgroup-ui-service'
));
this
.
allUIService
.
set
(
'wfgroup'
,
()
=>
import
(
'@/uiservice/wfgroup/wfgroup-ui-service'
));
this
.
allUIService
.
set
(
'sysuserrole'
,
()
=>
import
(
'@/uiservice/sys-user-role/sys-user-role-ui-service'
));
this
.
allUIService
.
set
(
'sysuserrole'
,
()
=>
import
(
'@/uiservice/sys-user-role/sys-user-role-ui-service'
));
this
.
allUIService
.
set
(
'wfprocessdefinition'
,
()
=>
import
(
'@/uiservice/wfprocess-definition/wfprocess-definition-ui-service'
));
this
.
allUIService
.
set
(
'sysrole'
,
()
=>
import
(
'@/uiservice/sys-role/sys-role-ui-service'
));
this
.
allUIService
.
set
(
'sysrole'
,
()
=>
import
(
'@/uiservice/sys-role/sys-role-ui-service'
));
this
.
allUIService
.
set
(
'ibzdeptmember'
,
()
=>
import
(
'@/uiservice/ibzdept-member/ibzdept-member-ui-service'
));
this
.
allUIService
.
set
(
'ibzdeptmember'
,
()
=>
import
(
'@/uiservice/ibzdept-member/ibzdept-member-ui-service'
));
this
.
allUIService
.
set
(
'ibzdepartment'
,
()
=>
import
(
'@/uiservice/ibzdepartment/ibzdepartment-ui-service'
));
this
.
allUIService
.
set
(
'ibzdepartment'
,
()
=>
import
(
'@/uiservice/ibzdepartment/ibzdepartment-ui-service'
));
...
...
app_Web/src/uiservice/wfprocess-definition/wfprocess-definition-ui-service-base.ts
0 → 100644
浏览文件 @
90138f50
import
{
Environment
}
from
'@/environments/environment'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
UIService
from
'../ui-service'
;
import
{
Subject
}
from
'rxjs'
;
import
WFProcessDefinitionService
from
'@/service/wfprocess-definition/wfprocess-definition-service'
;
/**
* 流程定义UI服务对象基类
*
* @export
* @class WFProcessDefinitionUIServiceBase
*/
export
default
class
WFProcessDefinitionUIServiceBase
extends
UIService
{
/**
* 是否支持工作流
*
* @memberof WFProcessDefinitionUIServiceBase
*/
public
isEnableWorkflow
:
boolean
=
false
;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof WFProcessDefinitionUIServiceBase
*/
public
dataService
:
WFProcessDefinitionService
=
new
WFProcessDefinitionService
();
/**
* 所有关联视图
*
* @memberof WFProcessDefinitionUIServiceBase
*/
public
allViewMap
:
Map
<
string
,
Object
>
=
new
Map
();
/**
* 状态值
*
* @memberof WFProcessDefinitionUIServiceBase
*/
public
stateValue
:
number
=
0
;
/**
* 状态属性
*
* @memberof WFProcessDefinitionUIServiceBase
*/
public
stateField
:
string
=
""
;
/**
* 主状态属性集合
*
* @memberof WFProcessDefinitionUIServiceBase
*/
public
mainStateFields
:
Array
<
any
>
=
[];
/**
* 主状态集合Map
*
* @memberof WFProcessDefinitionUIServiceBase
*/
public
allDeMainStateMap
:
Map
<
string
,
string
>
=
new
Map
();
/**
* Creates an instance of WFProcessDefinitionUIServiceBase.
*
* @param {*} [opts={}]
* @memberof WFProcessDefinitionUIServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
initViewMap
();
this
.
initDeMainStateMap
();
}
/**
* 初始化视图Map
*
* @memberof WFProcessDefinitionUIServiceBase
*/
public
initViewMap
(){
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'wfprocessdefinitions'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'wfprocessdefinitions'
});
}
/**
* 初始化主状态集合
*
* @memberof WFProcessDefinitionUIServiceBase
*/
public
initDeMainStateMap
(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof WFProcessDefinitionUIServiceBase
*/
public
async
getRDAppView
(
srfkey
:
string
,
isEnableWorkflow
:
boolean
){
this
.
isEnableWorkflow
=
isEnableWorkflow
;
// 进行数据查询
let
result
:
any
=
await
this
.
dataService
.
Get
({
wfprocessdefinition
:
srfkey
});
const
curData
:
any
=
result
.
data
;
//判断当前数据模式,默认为true,todo
const
iRealDEModel
:
boolean
=
true
;
let
bDataInWF
:
boolean
=
false
;
let
bWFMode
:
any
=
false
;
// 计算数据模式
if
(
this
.
isEnableWorkflow
)
{
bDataInWF
=
await
this
.
dataService
.
testDataInWF
({
stateValue
:
this
.
stateValue
,
stateField
:
this
.
stateField
},
curData
);
if
(
bDataInWF
)
{
bDataInWF
=
true
;
bWFMode
=
await
this
.
dataService
.
testUserExistWorklist
(
null
,
curData
);
}
}
let
strPDTViewParam
:
string
=
await
this
.
getDESDDEViewPDTParam
(
curData
,
bDataInWF
,
bWFMode
);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return
this
.
allViewMap
.
get
(
strPDTViewParam
);
}
/**
* 获取实际的数据类型
*
* @memberof WFProcessDefinitionUIServiceBase
*/
public
getRealDEType
(
entity
:
any
){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof WFProcessDefinitionUIServiceBase
*/
public
async
getDESDDEViewPDTParam
(
curData
:
any
,
bDataInWF
:
boolean
,
bWFMode
:
boolean
){
let
strPDTParam
:
string
=
''
;
if
(
bDataInWF
)
{
// 判断数据是否在流程中
}
//多表单,todo
const
isEnableMultiForm
:
boolean
=
false
;
const
multiFormDEField
:
string
|
null
=
null
;
if
(
isEnableMultiForm
&&
multiFormDEField
)
{
const
objFormValue
:
string
=
curData
[
multiFormDEField
];
if
(
!
Environment
.
isAppMode
){
return
'MOBEDITVIEW'
+
objFormValue
;
}
return
'EDITVIEW'
+
objFormValue
;
}
if
(
!
Environment
.
isAppMode
){
if
(
this
.
getDEMainStateTag
(
curData
)){
return
`MOBEDITVIEW:MSTAG:
${
await
this
.
getDEMainStateTag
(
curData
)}
`
;
}
return
'MOBEDITVIEW:'
;
}
if
(
this
.
getDEMainStateTag
(
curData
)){
return
`EDITVIEW:MSTAG:
${
await
this
.
getDEMainStateTag
(
curData
)}
`
;
}
return
'EDITVIEW:'
;
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof WFProcessDefinitionUIServiceBase
*/
public
async
getDEMainStateTag
(
curData
:
any
){
if
(
this
.
mainStateFields
.
length
===
0
)
return
null
;
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
if
(
!
(
singleMainField
in
curData
)){
console
.
error
(
`当前数据对象不包含属性singleMainField,可能会发生错误`
);
}
})
let
strTag
:
String
=
""
;
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
curData
[
this
.
mainStateFields
[
0
]]
:
""
:
""
;
if
(
this
.
mainStateFields
.
length
>=
2
)
{
for
(
let
j
=
0
;
j
<=
1
;
j
++
)
{
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
curData
[
this
.
mainStateFields
[
1
]]
:
""
}
`
:
strTag
;
if
(
this
.
mainStateFields
.
length
>=
3
)
{
for
(
let
k
=
0
;
k
<=
1
;
k
++
)
{
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
curData
[
this
.
mainStateFields
[
2
]]
:
""
}
`
:
strTag2
;
// 判断是否存在
return
this
.
allDeMainStateMap
.
get
(
strTag3
);
}
}
else
{
return
this
.
allDeMainStateMap
.
get
(
strTag2
);
}
}
}
else
{
return
this
.
allDeMainStateMap
.
get
(
strTag
);
}
}
return
null
;
}
}
\ No newline at end of file
app_Web/src/uiservice/wfprocess-definition/wfprocess-definition-ui-service.ts
0 → 100644
浏览文件 @
90138f50
import
WFProcessDefinitionUIServiceBase
from
'./wfprocess-definition-ui-service-base'
;
/**
* 流程定义UI服务对象
*
* @export
* @class WFProcessDefinitionUIService
*/
export
default
class
WFProcessDefinitionUIService
extends
WFProcessDefinitionUIServiceBase
{
/**
* Creates an instance of WFProcessDefinitionUIService.
*
* @param {*} [opts={}]
* @memberof WFProcessDefinitionUIService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_Web/src/widgets/app/index-appmenu/index-appmenu-base.vue
浏览文件 @
90138f50
...
@@ -489,6 +489,9 @@ export default class IndexBase extends Vue implements ControlInterface {
...
@@ -489,6 +489,9 @@ export default class IndexBase extends Vue implements ControlInterface {
case
'Auto2'
:
case
'Auto2'
:
this
.
clickAuto2
(
item
);
this
.
clickAuto2
(
item
);
return
;
return
;
case
'_2'
:
this
.
click_2
(
item
);
return
;
case
'Auto1'
:
case
'Auto1'
:
this
.
clickAuto1
(
item
);
this
.
clickAuto1
(
item
);
return
;
return
;
...
@@ -556,6 +559,24 @@ export default class IndexBase extends Vue implements ControlInterface {
...
@@ -556,6 +559,24 @@ export default class IndexBase extends Vue implements ControlInterface {
this
.
$router
.
push
(
path
);
this
.
$router
.
push
(
path
);
}
}
/**
* 流程定义
*
* @param {*} [item={}]
* @memberof Index
*/
public
click_2
(
item
:
any
=
{})
{
const
viewparam
:
any
=
{};
Object
.
assign
(
viewparam
,
{});
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'wfprocessdefinitions'
,
parameterName
:
'wfprocessdefinition'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
];
const
path
:
string
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
{},
deResParameters
,
parameters
,
[],
viewparam
);
this
.
$router
.
push
(
path
);
}
/**
/**
* 流程角色
* 流程角色
*
*
...
...
app_Web/src/widgets/app/index-appmenu/index-appmenu-model.ts
浏览文件 @
90138f50
...
@@ -103,6 +103,24 @@ export default class IndexModel {
...
@@ -103,6 +103,24 @@ export default class IndexModel {
textcls
:
''
,
textcls
:
''
,
appfunctag
:
'Auto1'
,
appfunctag
:
'Auto1'
,
resourcetag
:
''
,
resourcetag
:
''
,
},
{
id
:
'6DFB635D-1B8E-47E7-9869-1B7BC2B844C0'
,
name
:
'menuitem6'
,
text
:
'流程定义'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'流程定义'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
'fa fa-random'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'_2'
,
resourcetag
:
''
,
},
},
];
];
...
...
app_Web/src/widgets/wfprocess-definition/default-searchform/default-searchform-base.vue
0 → 100644
浏览文件 @
90138f50
<
template
>
<i-form
:model=
"this.data"
class=
'app-search-form'
ref=
'searchform'
style=
""
>
<input
style=
"display:none;"
/>
<row>
<i-col
span=
"20"
class=
"form-content"
>
<row>
<i-col
v-show=
"detailsModel.n_deploykey_like.visible"
:style=
"
{}" :sm="{ span: 12, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item
name=
'n_deploykey_like'
:itemRules=
"this.rules.n_deploykey_like"
class=
''
:caption=
"$t('entities.wfprocessdefinition.default_searchform.details.n_deploykey_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_deploykey_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_deploykey_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_deploykey_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.n_definitionname_like.visible"
:style=
"
{}" :sm="{ span: 12, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item
name=
'n_definitionname_like'
:itemRules=
"this.rules.n_definitionname_like"
class=
''
:caption=
"$t('entities.wfprocessdefinition.default_searchform.details.n_definitionname_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_definitionname_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_definitionname_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_definitionname_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
</row>
</i-col>
<i-col
span=
"4"
class=
"search-button"
>
<row
v-show=
"Object.keys(data).length>0"
>
<i-button
class=
'search_reset'
size=
"default"
type=
"primary"
@
click=
"onSearch"
>
{{
$t
(
'app.searchButton.search'
)
}}
</i-button>
<i-button
class=
'search_reset'
size=
"default"
@
click=
"onReset"
>
{{
this
.
$t
(
'app.searchButton.reset'
)
}}
</i-button>
</row>
</i-col>
</row>
</i-form>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Model
}
from
'vue-property-decorator'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
ControlInterface
}
from
'@/interface/control'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
WFProcessDefinitionService
from
'@/service/wfprocess-definition/wfprocess-definition-service'
;
import
DefaultService
from
'./default-searchform-service'
;
import
{
FormButtonModel
,
FormPageModel
,
FormItemModel
,
FormDRUIPartModel
,
FormPartModel
,
FormGroupPanelModel
,
FormIFrameModel
,
FormRowItemModel
,
FormTabPageModel
,
FormTabPanelModel
,
FormUserControlModel
}
from
'@/model/form-detail'
;
import
{
debounceTime
,
distinctUntilChanged
}
from
'rxjs/operators'
;
@
Component
({
components
:
{
}
})
export
default
class
DefaultBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof Default
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Default
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof Default
*/
@
Prop
()
public
context
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof Default
*/
@
Prop
()
public
viewparams
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Default
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Default
*/
public
getControlType
():
string
{
return
'SEARCHFORM'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Default
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof Default
*/
public
service
:
DefaultService
=
new
DefaultService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {WFProcessDefinitionService}
* @memberof Default
*/
public
appEntityService
:
WFProcessDefinitionService
=
new
WFProcessDefinitionService
({
$store
:
this
.
$store
});
/**
* 关闭视图
*
* @param {any} args
* @memberof Default
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof Default
*/
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 DefaultBase
*/
public
getDatas
():
any
[]
{
return
[
this
.
data
];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof DefaultBase
*/
public
getData
():
any
{
return
this
.
data
;
}
/**
* 显示处理提示
*
* @type {boolean}
* @memberof DefaultBase
*/
@
Prop
({
default
:
true
})
public
showBusyIndicator
?:
boolean
;
/**
* 部件行为--loaddraft
*
* @type {string}
* @memberof DefaultBase
*/
@
Prop
()
public
loaddraftAction
!
:
string
;
/**
* 部件行为--load
*
* @type {string}
* @memberof DefaultBase
*/
@
Prop
()
public
loadAction
!
:
string
;
/**
* 视图标识
*
* @type {string}
* @memberof DefaultBase
*/
@
Prop
()
public
viewtag
!
:
string
;
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof DefaultBase
*/
public
formState
:
Subject
<
any
>
=
new
Subject
();
/**
* 忽略表单项值变化
*
* @type {boolean}
* @memberof DefaultBase
*/
public
ignorefieldvaluechange
:
boolean
=
false
;
/**
* 数据变化
*
* @public
* @type {Subject<any>}
* @memberof DefaultBase
*/
public
dataChang
:
Subject
<
any
>
=
new
Subject
();
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof DefaultBase
*/
public
dataChangEvent
:
Subscription
|
undefined
;
/**
* 原始数据
*
* @public
* @type {*}
* @memberof DefaultBase
*/
public
oldData
:
any
=
{};
/**
* 表单数据对象
*
* @type {*}
* @memberof DefaultBase
*/
public
data
:
any
=
{
n_deploykey_like
:
null
,
n_definitionname_like
:
null
,
};
/**
* 属性值规则
*
* @type {*}
* @memberof DefaultBase
*/
public
rules
:
any
=
{
n_deploykey_like
:
[
{
type
:
'string'
,
message
:
'DefinitionKey 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'DefinitionKey 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'DefinitionKey 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'DefinitionKey 值不能为空'
,
trigger
:
'blur'
},
],
n_definitionname_like
:
[
{
type
:
'string'
,
message
:
'流程定义名称 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'流程定义名称 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'流程定义名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'流程定义名称 值不能为空'
,
trigger
:
'blur'
},
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultBase
*/
public
detailsModel
:
any
=
{
formpage1
:
new
FormPageModel
({
caption
:
'常规条件'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
n_deploykey_like
:
new
FormItemModel
({
caption
:
'DefinitionKey'
,
detailType
:
'FORMITEM'
,
name
:
'n_deploykey_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
n_definitionname_like
:
new
FormItemModel
({
caption
:
'流程定义名称'
,
detailType
:
'FORMITEM'
,
name
:
'n_definitionname_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
};
/**
* 监控表单属性 n_deploykey_like 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof DefaultBase
*/
@
Watch
(
'data.n_deploykey_like'
)
onN_deploykey_likeChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'n_deploykey_like'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 n_definitionname_like 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof DefaultBase
*/
@
Watch
(
'data.n_definitionname_like'
)
onN_definitionname_likeChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'n_definitionname_like'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 重置表单项值
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof DefaultBase
*/
public
resetFormData
({
name
,
newVal
,
oldVal
}:
{
name
:
string
,
newVal
:
any
,
oldVal
:
any
}):
void
{
}
/**
* 表单逻辑
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof DefaultBase
*/
public
formLogic
({
name
,
newVal
,
oldVal
}:
{
name
:
string
,
newVal
:
any
,
oldVal
:
any
}):
void
{
}
/**
* 表单值变化
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @returns {void}
* @memberof DefaultBase
*/
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={}]
* @memberof DefaultBase
*/
public
onFormLoad
(
data
:
any
=
{}):
void
{
this
.
setFormEnableCond
(
data
);
this
.
fillForm
(
data
);
this
.
formLogic
({
name
:
''
,
newVal
:
null
,
oldVal
:
null
});
}
/**
* 值填充
*
* @param {*} [_datas={}]
* @memberof DefaultBase
*/
public
fillForm
(
_datas
:
any
=
{}):
void
{
this
.
ignorefieldvaluechange
=
true
;
Object
.
keys
(
_datas
).
forEach
((
name
:
string
)
=>
{
if
(
this
.
data
.
hasOwnProperty
(
name
))
{
this
.
data
[
name
]
=
_datas
[
name
];
}
});
this
.
$nextTick
(
function
()
{
this
.
ignorefieldvaluechange
=
false
;
})
}
/**
* 设置表单项是否启用
*
* @public
* @param {*} data
* @memberof DefaultBase
*/
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 DefaultBase
*/
public
resetDraftFormStates
():
void
{
const
form
:
any
=
this
.
$refs
.
form
;
if
(
form
)
{
form
.
resetFields
();
}
}
/**
* 重置校验结果
*
* @memberof DefaultBase
*/
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 DefaultBase
*/
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 DefaultBase
*/
public
formValidateStatus
():
boolean
{
const
form
:
any
=
this
.
$refs
.
searchform
;
let
validatestate
:
boolean
=
true
;
form
.
validate
((
valid
:
boolean
)
=>
{
validatestate
=
valid
?
true
:
false
;
});
return
validatestate
}
/**
* 获取全部值
*
* @returns {*}
* @memberof DefaultBase
*/
public
getValues
():
any
{
return
this
.
data
;
}
/**
* 表单项值变更
*
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof DefaultBase
*/
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 {string} name
* @param {*} value
* @returns {void}
* @memberof DefaultBase
*/
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 {*} $event
* @memberof DefaultBase
*/
public
groupUIActionClick
(
$event
:
any
):
void
{
if
(
!
$event
)
{
return
;
}
const
item
:
any
=
$event
.
item
;
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof DefaultBase
*/
public
created
():
void
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof DefaultBase
*/
public
afterCreated
(){
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
);
}
});
}
}
/**
* vue 生命周期
*
* @memberof DefaultBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof DefaultBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
if
(
this
.
dataChangEvent
)
{
this
.
dataChangEvent
.
unsubscribe
();
}
}
/**
* 自动加载
*
* @param {*} [arg={}]
* @returns {void}
* @memberof DefaultBase
*/
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 DefaultBase
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'WFProcessDefinitionGridView视图搜索表单loadAction参数未配置'
});
return
;
}
const
arg
:
any
=
{
...
opt
};
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
const
get
:
Promise
<
any
>
=
this
.
service
.
get
(
this
.
loadAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
);
this
.
$emit
(
'load'
,
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
});
}
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
return
;
}
const
{
data
:
_data
}
=
response
;
this
.
$Notice
.
error
({
title
:
_data
.
title
,
desc
:
_data
.
message
});
});
}
/**
* 加载草稿
*
* @param {*} [opt={}]
* @memberof DefaultBase
*/
public
loadDraft
(
opt
:
any
=
{},
mode
?:
string
):
void
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'WFProcessDefinitionGridView视图搜索表单loaddraftAction参数未配置'
});
return
;
}
const
arg
:
any
=
{
...
opt
}
;
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorMessage
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
errorMessage
});
}
return
;
}
const
data
=
response
.
data
;
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
);
setTimeout
(()
=>
{
const
form
:
any
=
this
.
$refs
.
form
;
if
(
form
)
{
form
.
fields
.
forEach
((
field
:
any
)
=>
{
field
.
validateMessage
=
""
;
field
.
validateState
=
""
;
field
.
validateStatus
=
false
;
});
}
});
if
(
Object
.
is
(
mode
,
'RESET'
)){
if
(
!
this
.
formValidateStatus
())
{
return
;
}
}
this
.
$emit
(
'load'
,
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
return
;
}
const
{
data
:
_data
}
=
response
;
this
.
$Notice
.
error
({
title
:
_data
.
title
,
desc
:
_data
.
message
});
});
}
/**
* 表单项更新
*
* @param {string} mode 界面行为名称
* @param {*} [data={}] 请求数据
* @param {string[]} updateDetails 更新项
* @param {boolean} [showloading] 是否显示加载状态
* @returns {void}
* @memberof DefaultBase
*/
public
updateFormItems
(
mode
:
string
,
data
:
any
=
{},
updateDetails
:
string
[],
showloading
?:
boolean
):
void
{
}
/**
* 回车事件
*
* @param {*} $event
* @memberof DefaultBase
*/
public
onEnter
(
$event
:
any
):
void
{
if
(
!
this
.
formValidateStatus
())
{
return
;
}
this
.
$emit
(
'search'
,
this
.
data
);
}
/**
* 搜索
*
* @memberof DefaultBase
*/
public
onSearch
()
{
if
(
!
this
.
formValidateStatus
())
{
return
;
}
this
.
$emit
(
'search'
,
this
.
data
);
}
/**
* 重置
*
* @memberof DefaultBase
*/
public
onReset
()
{
this
.
loadDraft
({},
'RESET'
);
}
}
</
script
>
<
style
lang=
'less'
>
@import './default-searchform.less';
</
style
>
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/default-searchform/default-searchform-model.ts
0 → 100644
浏览文件 @
90138f50
/**
* Default 部件模型
*
* @export
* @class DefaultModel
*/
export
default
class
DefaultModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof DefaultModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'srfwfmemo'
,
prop
:
'srfwfmemo'
,
dataType
:
'TEXT'
,
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
{
name
:
'n_deploykey_like'
,
prop
:
'deploykey'
,
dataType
:
'TEXT'
,
},
{
name
:
'n_definitionname_like'
,
prop
:
'definitionname'
,
dataType
:
'TEXT'
,
},
]
}
}
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/default-searchform/default-searchform-service.ts
0 → 100644
浏览文件 @
90138f50
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
WFProcessDefinitionService
from
'@/service/wfprocess-definition/wfprocess-definition-service'
;
import
DefaultModel
from
'./default-searchform-model'
;
/**
* Default 部件服务对象
*
* @export
* @class DefaultService
*/
export
default
class
DefaultService
extends
ControlService
{
/**
* 流程定义服务对象
*
* @type {WFProcessDefinitionService}
* @memberof DefaultService
*/
public
appEntityService
:
WFProcessDefinitionService
=
new
WFProcessDefinitionService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof DefaultService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of DefaultService.
*
* @param {*} [opts={}]
* @memberof DefaultService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
DefaultModel
();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof DefaultService
*/
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 DefaultService
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
return
Promise
.
reject
([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
wfstart
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
data
=
this
.
handleWFData
(
data
);
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 DefaultService
*/
@
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
).
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]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
add
(
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
.
Create
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
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]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
Errorlog
public
update
(
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
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
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
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DefaultService
*/
@
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
.
definitionkey
=
PrimaryKey
;
Data
.
wfprocessdefinition
=
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
)
=>
{
response
.
data
.
definitionkey
=
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 DefaultService
*/
@
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 DefaultService
*/
public
handleRequestData
(
action
:
string
,
context
:
any
,
data
:
any
=
{}){
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
let
requestData
:
any
=
{};
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
];
}
}
});
if
(
data
&&
data
.
viewparams
){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/default-searchform/default-searchform.less
0 → 100644
浏览文件 @
90138f50
.ivu-tabs-no-animation>.ivu-tabs-content{
padding: 0 16px;
}
.ivu-card-head{
padding: 14px 0;
}
.app-search-form {
padding: 8px 14px 0;
.ivu-form-item{
margin-bottom: 8px;
}
.search_reset {
margin-right: 12px;
margin-bottom: 8px;
}
.search-button{
text-align: right;
}
}
.app-search-form-flex {
height: 100%;
> .ivu-row {
height: 100%;
> .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%;
}
}
}
// this is less
app_Web/src/widgets/wfprocess-definition/default-searchform/default-searchform.vue
0 → 100644
浏览文件 @
90138f50
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
DefaultBase
from
'./default-searchform-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
Default
extends
DefaultBase
{
}
</
script
>
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/main-form/main-form-base.vue
0 → 100644
浏览文件 @
90138f50
<
template
>
<i-form
:model=
"this.data"
class=
'app-form'
ref=
'form'
id=
'wfprocessdefinition_main'
style=
""
>
<input
style=
"display:none;"
/>
<row
>
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.wfprocessdefinition.main_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<i-col
v-show=
"detailsModel.deploykey.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'deploykey'
:itemRules=
"this.rules.deploykey"
class=
''
:caption=
"$t('entities.wfprocessdefinition.main_form.details.deploykey')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.deploykey.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.deploykey"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.deploykey.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.definitionname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'definitionname'
:itemRules=
"this.rules.definitionname"
class=
''
:caption=
"$t('entities.wfprocessdefinition.main_form.details.definitionname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.definitionname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.definitionname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.definitionname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.pssystemid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'pssystemid'
:itemRules=
"this.rules.pssystemid"
class=
''
:caption=
"$t('entities.wfprocessdefinition.main_form.details.pssystemid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.pssystemid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.pssystemid"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.pssystemid.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.modelversion.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'modelversion'
:itemRules=
"this.rules.modelversion"
class=
''
:caption=
"$t('entities.wfprocessdefinition.main_form.details.modelversion')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.modelversion.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.modelversion"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.modelversion.disabled"
type=
'number'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.modelenable.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'modelenable'
:itemRules=
"this.rules.modelenable"
class=
''
:caption=
"$t('entities.wfprocessdefinition.main_form.details.modelenable')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.modelenable.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<dropdown-list
v-model=
"data.modelenable"
:data=
"data"
:itemParam=
"
{}" :disabled="detailsModel.modelenable.disabled" style="width:100px;width: 100px;" tag='YesNo' codelistType='STATIC' placeholder='请选择...'>
</dropdown-list>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.bpmnfile.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'bpmnfile'
:itemRules=
"this.rules.bpmnfile"
class=
''
:caption=
"$t('entities.wfprocessdefinition.main_form.details.bpmnfile')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.bpmnfile.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-file-upload
:formState=
"formState"
:ignorefieldvaluechange=
"ignorefieldvaluechange"
@
formitemvaluechange=
"onFormItemValueChange"
:data=
"JSON.stringify(this.data)"
name=
'bpmnfile'
:value=
"data.bpmnfile"
:disabled=
"detailsModel.bpmnfile.disabled"
uploadparams=
''
exportparams=
''
:customparams=
"
{}" style="overflow: auto;">
</app-file-upload>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.md5check.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'md5check'
:itemRules=
"this.rules.md5check"
class=
''
:caption=
"$t('entities.wfprocessdefinition.main_form.details.md5check')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.md5check.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.md5check"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.md5check.disabled"
type=
'text'
style=
""
></input-box>
</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
}
from
'vue-property-decorator'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
ControlInterface
}
from
'@/interface/control'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
WFProcessDefinitionService
from
'@/service/wfprocess-definition/wfprocess-definition-service'
;
import
MainService
from
'./main-form-service'
;
import
{
FormButtonModel
,
FormPageModel
,
FormItemModel
,
FormDRUIPartModel
,
FormPartModel
,
FormGroupPanelModel
,
FormIFrameModel
,
FormRowItemModel
,
FormTabPageModel
,
FormTabPanelModel
,
FormUserControlModel
}
from
'@/model/form-detail'
;
import
{
debounceTime
,
distinctUntilChanged
}
from
'rxjs/operators'
;
@
Component
({
components
:
{
}
})
export
default
class
MainBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Main
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof Main
*/
@
Prop
()
public
context
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof Main
*/
@
Prop
()
public
viewparams
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Main
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Main
*/
public
getControlType
():
string
{
return
'FORM'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Main
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof Main
*/
public
service
:
MainService
=
new
MainService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {WFProcessDefinitionService}
* @memberof Main
*/
public
appEntityService
:
WFProcessDefinitionService
=
new
WFProcessDefinitionService
({
$store
:
this
.
$store
});
/**
* 关闭视图
*
* @param {any} args
* @memberof Main
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof Main
*/
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
();
}
})
}
}
/**
* 工作流审批意见控件绑定值
*
* @memberof Main
*/
public
srfwfmemo
:
string
=
""
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Main
*/
public
getDatas
():
any
[]
{
return
[
this
.
data
];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Main
*/
public
getData
():
any
{
return
this
.
data
;
}
/**
* 是否默认保存
*
* @type {boolean}
* @memberof Main
*/
@
Prop
({
default
:
false
})
public
autosave
?:
boolean
;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof Main
*/
@
Prop
({
default
:
true
})
public
showBusyIndicator
?:
boolean
;
/**
* 部件行为--submit
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
WFSubmitAction
!
:
string
;
/**
* 部件行为--start
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
WFStartAction
!
:
string
;
/**
* 部件行为--update
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
updateAction
!
:
string
;
/**
* 部件行为--remove
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
removeAction
!
:
string
;
/**
* 部件行为--loaddraft
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
loaddraftAction
!
:
string
;
/**
* 部件行为--load
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
loadAction
!
:
string
;
/**
* 部件行为--create
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
createAction
!
:
string
;
/**
* 部件行为--create
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
searchAction
!
:
string
;
/**
* 视图标识
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
viewtag
!
:
string
;
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof Main
*/
public
formState
:
Subject
<
any
>
=
new
Subject
();
/**
* 忽略表单项值变化
*
* @type {boolean}
* @memberof Main
*/
public
ignorefieldvaluechange
:
boolean
=
false
;
/**
* 数据变化
*
* @public
* @type {Subject<any>}
* @memberof Main
*/
public
dataChang
:
Subject
<
any
>
=
new
Subject
();
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Main
*/
public
dataChangEvent
:
Subscription
|
undefined
;
/**
* 原始数据
*
* @public
* @type {*}
* @memberof Main
*/
public
oldData
:
any
=
{};
/**
* 表单数据对象
*
* @type {*}
* @memberof Main
*/
public
data
:
any
=
{
srforikey
:
null
,
srfkey
:
null
,
srfmajortext
:
null
,
srftempmode
:
null
,
srfuf
:
null
,
srfdeid
:
null
,
srfsourcekey
:
null
,
definitionkey
:
null
,
deploykey
:
null
,
definitionname
:
null
,
pssystemid
:
null
,
modelversion
:
null
,
modelenable
:
null
,
bpmnfile
:
null
,
md5check
:
null
,
wfprocessdefinition
:
null
,
};
/**
* 当前执行的行为逻辑
*
* @type {string}
* @memberof Main
*/
public
currentAction
:
string
=
""
;
/**
* 关系界面计数器
*
* @type {number}
* @memberof Main
*/
public
drcounter
:
number
=
0
;
/**
* 需要等待关系界面保存时,第一次调用save参数的备份
*
* @type {number}
* @memberof Main
*/
public
drsaveopt
:
any
=
{};
/**
* 表单保存回调存储对象
*
* @type {any}
* @memberof Main
*/
public
saveState
:
any
;
/**
* 属性值规则
*
* @type {*}
* @memberof Main
*/
public
rules
:
any
=
{
srforikey
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfkey
:
[
{
type
:
'string'
,
message
:
'DefinitionKey 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'DefinitionKey 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'DefinitionKey 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'DefinitionKey 值不能为空'
,
trigger
:
'blur'
},
],
srfmajortext
:
[
{
type
:
'string'
,
message
:
'流程定义名称 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'流程定义名称 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'流程定义名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'流程定义名称 值不能为空'
,
trigger
:
'blur'
},
],
srftempmode
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfuf
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfdeid
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
srfsourcekey
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
definitionkey
:
[
{
type
:
'string'
,
message
:
'DefinitionKey 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'DefinitionKey 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'DefinitionKey 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'DefinitionKey 值不能为空'
,
trigger
:
'blur'
},
],
deploykey
:
[
{
type
:
'string'
,
message
:
'DefinitionKey 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'DefinitionKey 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
true
,
type
:
'string'
,
message
:
'DefinitionKey 值不能为空'
,
trigger
:
'change'
},
{
required
:
true
,
type
:
'string'
,
message
:
'DefinitionKey 值不能为空'
,
trigger
:
'blur'
},
],
definitionname
:
[
{
type
:
'string'
,
message
:
'流程定义名称 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'流程定义名称 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
true
,
type
:
'string'
,
message
:
'流程定义名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
true
,
type
:
'string'
,
message
:
'流程定义名称 值不能为空'
,
trigger
:
'blur'
},
],
pssystemid
:
[
{
type
:
'string'
,
message
:
'系统标识 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'系统标识 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'系统标识 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'系统标识 值不能为空'
,
trigger
:
'blur'
},
],
modelversion
:
[
{
type
:
'number'
,
message
:
'模型版本 值必须为数值类型'
,
trigger
:
'change'
},
{
type
:
'number'
,
message
:
'模型版本 值必须为数值类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'number'
,
message
:
'模型版本 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'number'
,
message
:
'模型版本 值不能为空'
,
trigger
:
'blur'
},
],
modelenable
:
[
{
type
:
'number'
,
message
:
'模型是否启用 值必须为数值类型'
,
trigger
:
'change'
},
{
type
:
'number'
,
message
:
'模型是否启用 值必须为数值类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'number'
,
message
:
'模型是否启用 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'number'
,
message
:
'模型是否启用 值不能为空'
,
trigger
:
'blur'
},
],
bpmnfile
:
[
{
type
:
'string'
,
message
:
'BPMN 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'BPMN 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
true
,
type
:
'string'
,
message
:
'BPMN 值不能为空'
,
trigger
:
'change'
},
{
required
:
true
,
type
:
'string'
,
message
:
'BPMN 值不能为空'
,
trigger
:
'blur'
},
],
md5check
:
[
{
type
:
'string'
,
message
:
'校验 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'校验 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'校验 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'校验 值不能为空'
,
trigger
:
'blur'
},
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof Main
*/
public
detailsModel
:
any
=
{
group1
:
new
FormGroupPanelModel
({
caption
:
'模型基本信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.wfprocessdefinition.main_form'
,
extractMode
:
'ITEM'
,
details
:
[]
}
})
,
formpage1
:
new
FormPageModel
({
caption
:
'基本信息'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
srforikey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srforikey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
srfkey
:
new
FormItemModel
({
caption
:
'DefinitionKey'
,
detailType
:
'FORMITEM'
,
name
:
'srfkey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
srfmajortext
:
new
FormItemModel
({
caption
:
'流程定义名称'
,
detailType
:
'FORMITEM'
,
name
:
'srfmajortext'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
srftempmode
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srftempmode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
srfuf
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfuf'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
srfdeid
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfdeid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
srfsourcekey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfsourcekey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
definitionkey
:
new
FormItemModel
({
caption
:
'DefinitionKey'
,
detailType
:
'FORMITEM'
,
name
:
'definitionkey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
deploykey
:
new
FormItemModel
({
caption
:
'DefinitionKey'
,
detailType
:
'FORMITEM'
,
name
:
'deploykey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
1
})
,
definitionname
:
new
FormItemModel
({
caption
:
'流程定义名称'
,
detailType
:
'FORMITEM'
,
name
:
'definitionname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
pssystemid
:
new
FormItemModel
({
caption
:
'系统标识'
,
detailType
:
'FORMITEM'
,
name
:
'pssystemid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
modelversion
:
new
FormItemModel
({
caption
:
'模型版本'
,
detailType
:
'FORMITEM'
,
name
:
'modelversion'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
modelenable
:
new
FormItemModel
({
caption
:
'模型是否启用'
,
detailType
:
'FORMITEM'
,
name
:
'modelenable'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
bpmnfile
:
new
FormItemModel
({
caption
:
'BPMN'
,
detailType
:
'FORMITEM'
,
name
:
'bpmnfile'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
md5check
:
new
FormItemModel
({
caption
:
'校验'
,
detailType
:
'FORMITEM'
,
name
:
'md5check'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
};
/**
* 监控表单属性 srforikey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.srforikey'
)
onSrforikeyChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srforikey'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srfkey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.srfkey'
)
onSrfkeyChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfkey'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srfmajortext 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.srfmajortext'
)
onSrfmajortextChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfmajortext'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srftempmode 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.srftempmode'
)
onSrftempmodeChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srftempmode'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srfuf 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.srfuf'
)
onSrfufChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfuf'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srfdeid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.srfdeid'
)
onSrfdeidChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfdeid'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 srfsourcekey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.srfsourcekey'
)
onSrfsourcekeyChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'srfsourcekey'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 definitionkey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.definitionkey'
)
onDefinitionkeyChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'definitionkey'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 deploykey 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.deploykey'
)
onDeploykeyChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'deploykey'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 definitionname 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.definitionname'
)
onDefinitionnameChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'definitionname'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 pssystemid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.pssystemid'
)
onPssystemidChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'pssystemid'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 modelversion 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.modelversion'
)
onModelversionChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'modelversion'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 modelenable 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.modelenable'
)
onModelenableChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'modelenable'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 bpmnfile 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.bpmnfile'
)
onBpmnfileChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'bpmnfile'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 md5check 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.md5check'
)
onMd5checkChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'md5check'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 重置表单项值
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof Main
*/
public
resetFormData
({
name
,
newVal
,
oldVal
}:
{
name
:
string
,
newVal
:
any
,
oldVal
:
any
}):
void
{
}
/**
* 置空对象
*
* @param {any[]} args
* @memberof EditForm
*/
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 Main
*/
public
formLogic
({
name
,
newVal
,
oldVal
}:
{
name
:
string
,
newVal
:
any
,
oldVal
:
any
}):
void
{
}
/**
* 表单值变化
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @returns {void}
* @memberof Main
*/
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 Main
*/
public
onFormLoad
(
data
:
any
=
{},
action
:
string
):
void
{
if
(
Object
.
is
(
action
,
"save"
)
||
Object
.
is
(
action
,
"autoSave"
)
||
Object
.
is
(
action
,
"submit"
))
// 更新context的实体主键
if
(
data
.
wfprocessdefinition
){
Object
.
assign
(
this
.
context
,{
wfprocessdefinition
:
data
.
wfprocessdefinition
})
}
this
.
setFormEnableCond
(
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 Main
*/
public
fillForm
(
_datas
:
any
=
{},
action
:
string
):
void
{
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 Main
*/
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 Main
*/
public
resetDraftFormStates
():
void
{
const
form
:
any
=
this
.
$refs
.
form
;
if
(
form
)
{
form
.
resetFields
();
}
}
/**
* 重置校验结果
*
* @memberof Main
*/
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 Main
*/
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 Main
*/
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 Main
*/
public
getValues
():
any
{
return
this
.
data
;
}
/**
* 表单项值变更
*
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof Main
*/
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 {string} name
* @param {*} value
* @returns {void}
* @memberof Main
*/
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 {*} $event
* @memberof Main
*/
public
groupUIActionClick
(
$event
:
any
):
void
{
if
(
!
$event
)
{
return
;
}
const
item
:
any
=
$event
.
item
;
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof Main
*/
public
created
():
void
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof Main
*/
public
afterCreated
(){
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
))
{
if
(
this
.
context
.
srfsourcekey
){
this
.
copy
(
this
.
context
.
srfsourcekey
);
}
else
{
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
);
}
});
}
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 Main
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Main
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
if
(
this
.
dataChangEvent
)
{
this
.
dataChangEvent
.
unsubscribe
();
}
}
/**
* 拷贝内容
*
* @param {*} [arg={}]
* @memberof @memberof Main
*/
public
copy
(
srfkey
:
string
):
void
{
let
copyData
=
this
.
$store
.
getters
.
getCopyData
(
srfkey
);
copyData
.
srfkey
=
Util
.
createUUID
();
copyData
.
wfprocessdefinition
=
copyData
.
srfkey
;
copyData
.
definitionkey
=
copyData
.
srfkey
;
Object
.
assign
(
this
.
context
,{
wfprocessdefinition
:
copyData
.
wfprocessdefinition
})
this
.
data
=
copyData
;
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
copyData
});
this
.
data
.
srfuf
=
'0'
;
this
.
setFormEnableCond
(
this
.
data
);
});
}
/**
*打印
*@memberof @memberof Main
*/
public
print
(){
let
_this
:
any
=
this
;
_this
.
$print
({
id
:
'wfprocessdefinition_main'
,
popTitle
:
'主编辑表单'
});
}
/**
* 部件刷新
*
* @param {any[]} args
* @memberof Main
*/
public
refresh
(
args
:
any
[]):
void
{
let
arg
:
any
=
{};
Object
.
assign
(
arg
,
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 Main
*/
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 Main
*/
public
load
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loadAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'WFProcessDefinitionEditView视图表单loadAction参数未配置'
});
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
:
'错误'
,
desc
:
response
.
data
.
message
});
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
return
;
}
});
}
/**
* 加载草稿
*
* @param {*} [opt={}]
* @memberof Main
*/
public
loadDraft
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
loaddraftAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'WFProcessDefinitionEditView视图表单loaddraftAction参数未配置'
});
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
:
'错误'
,
desc
:
response
.
data
.
message
});
}
return
;
}
const
data
=
response
.
data
;
if
(
data
.
wfprocessdefinition
){
Object
.
assign
(
this
.
context
,{
wfprocessdefinition
:
data
.
wfprocessdefinition
})
}
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
,
'loadDraft'
);
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
:
'错误'
,
desc
:
response
.
data
.
message
});
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
return
;
}
});
}
/**
* 自动保存
*
* @param {*} [opt={}]
* @memberof Main
*/
public
autoSave
(
opt
:
any
=
{}):
void
{
if
(
!
this
.
formValidateStatus
())
{
return
;
}
const
arg
:
any
=
{
...
opt
};
const
data
=
this
.
getValues
();
Object
.
assign
(
arg
,
data
);
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
:
'错误'
,
desc
:
'WFProcessDefinitionEditView视图表单'
+
actionName
+
'参数未配置'
});
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
:
'错误'
,
desc
:
response
.
data
.
message
});
}
return
;
}
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'autoSave'
);
this
.
$emit
(
'save'
,
data
);
this
.
$store
.
dispatch
(
'viewaction/datasaved'
,
{
viewtag
:
this
.
viewtag
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
data
});
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
data
.
message
});
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
return
;
}
});
}
/**
* 保存
*
* @param {*} [opt={}]
* @param {boolean} [showResultInfo]
* @param {boolean} [ifStateNext] formState是否下发通知
* @returns {Promise<any>}
* @memberof Main
*/
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
())
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'值规则校验异常'
});
return
;
}
const
arg
:
any
=
{
...
opt
};
const
data
=
this
.
getValues
();
Object
.
assign
(
arg
,
data
);
Object
.
assign
(
arg
,
this
.
context
);
if
(
ifStateNext
)
{
this
.
drcounter
=
0
;
if
(
this
.
drcounter
!==
0
){
this
.
drsaveopt
=
opt
;
this
.
formState
.
next
({
type
:
'beforesave'
,
data
:
arg
});
//先通知关系界面保存
this
.
saveState
=
resolve
;
return
;
}
}
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
:
'错误'
,
desc
:
'WFProcessDefinitionEditView视图表单'
+
actionName
+
'参数未配置'
});
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
:
'错误'
,
desc
:
response
.
data
.
message
});
}
return
;
}
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'save'
);
this
.
$emit
(
'save'
,
data
);
this
.
$store
.
dispatch
(
'viewaction/datasaved'
,
{
viewtag
:
this
.
viewtag
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
data
});
});
if
(
showResultInfo
)
{
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
data
.
srfmajortext
?
data
.
srfmajortext
:
''
)
+
' 保存成功!'
});
}
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
data
.
message
});
reject
(
response
);
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
reject
(
response
);
return
;
}
reject
(
response
);
});
})
}
/**
* 删除
*
* @public
* @param {*} [opt={}]
* @memberof EditForm
*/
public
remove
(
opt
:
Array
<
any
>
=
[],
showResultInfo
?:
boolean
):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'WFProcessDefinitionEditView视图表单removeAction参数未配置'
});
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
:
''
)
+
' 删除成功!'
});
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 Main
*/
public
async
wfstart
(
data
:
any
,
localdata
?:
any
):
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_this
:
any
=
this
;
const
post
:
Promise
<
any
>
=
_this
.
save
({},
false
);
post
.
then
((
response
:
any
)
=>
{
const
arg
:
any
=
response
.
data
;
if
(
this
.
viewparams
){
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
}
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
:
'工作流启动失败, '
+
response
.
data
.
message
});
}
return
;
}
this
.
$Notice
.
info
({
title
:
''
,
desc
:
'工作流启动成功'
});
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
data
.
message
});
reject
(
response
);
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
reject
(
response
);
return
;
}
reject
(
response
);
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
data
.
message
});
reject
(
response
);
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
reject
(
response
);
return
;
}
reject
(
response
);
})
});
}
/**
* 工作流提交
*
* @param {*} [data={}]
* @param {*} [localdata={}]
* @returns {Promise<any>}
* @memberof Main
*/
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
];
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
if
(
!
arg
.
wfprocessdefinition
||
Object
.
is
(
arg
.
wfprocessdefinition
,
''
))
{
return
;
}
const
post
:
Promise
<
any
>
=
Object
.
is
(
arg
.
srfuf
,
'1'
)?
this
.
service
.
update
(
this
.
updateAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
):
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
const
arg
:
any
=
response
.
data
;
// 保存完成UI处理
this
.
onFormLoad
(
arg
,
'save'
);
this
.
$emit
(
'save'
,
arg
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
arg
});
});
// 准备提交参数
if
(
this
.
viewparams
){
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
}
// 强制补充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
:
'工作流提交失败, '
+
response
.
data
.
message
});
}
return
;
}
this
.
onFormLoad
(
arg
,
'submit'
);
this
.
$store
.
dispatch
(
'viewaction/datasaved'
,
{
viewtag
:
this
.
viewtag
});
this
.
$Notice
.
info
({
title
:
''
,
desc
:
'工作流提交成功'
});
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
data
.
message
});
reject
(
response
);
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
reject
(
response
);
return
;
}
reject
(
response
);
});
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
&&
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
data
.
message
});
reject
(
response
);
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
reject
(
response
);
return
;
}
reject
(
response
);
})
})
}
/**
* 表单项更新
*
* @param {string} mode 界面行为名称
* @param {*} [data={}] 请求数据
* @param {string[]} updateDetails 更新项
* @param {boolean} [showloading] 是否显示加载状态
* @returns {void}
* @memberof Main
*/
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
:
'错误'
,
desc
:
'表单项更新失败'
});
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
));
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
:
'错误'
,
desc
:
response
.
data
.
message
});
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
return
;
}
});
}
/**
* 回车事件
*
* @param {*} $event
* @memberof Main
*/
public
onEnter
(
$event
:
any
):
void
{
}
/**
* 保存并退出
*
* @param {any[]} args
* @memberof Main
*/
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 Main
*/
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 Main
*/
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 Main
*/
public
drdatasaved
(
$event
:
any
){
let
_this
=
this
;
this
.
drcounter
--
;
if
(
this
.
drcounter
>
0
){
return
;
}
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 Main
*/
public
createDefault
(){
}
/**
* 更新默认值
* @memberof Main
*/
public
updateDefault
(){
}
}
</
script
>
<
style
lang=
'less'
>
@import './main-form.less';
</
style
>
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/main-form/main-form-model.ts
0 → 100644
浏览文件 @
90138f50
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export
default
class
MainModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'srfwfmemo'
,
prop
:
'srfwfmemo'
,
dataType
:
'TEXT'
,
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
{
name
:
'srforikey'
,
},
{
name
:
'srfkey'
,
prop
:
'definitionkey'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfmajortext'
,
prop
:
'definitionname'
,
dataType
:
'TEXT'
,
},
{
name
:
'srftempmode'
,
},
{
name
:
'srfuf'
,
},
{
name
:
'srfdeid'
,
},
{
name
:
'srfsourcekey'
,
},
{
name
:
'definitionkey'
,
prop
:
'definitionkey'
,
dataType
:
'TEXT'
,
},
{
name
:
'deploykey'
,
prop
:
'deploykey'
,
dataType
:
'TEXT'
,
},
{
name
:
'definitionname'
,
prop
:
'definitionname'
,
dataType
:
'TEXT'
,
},
{
name
:
'pssystemid'
,
prop
:
'pssystemid'
,
dataType
:
'TEXT'
,
},
{
name
:
'modelversion'
,
prop
:
'modelversion'
,
dataType
:
'INT'
,
},
{
name
:
'modelenable'
,
prop
:
'modelenable'
,
dataType
:
'YESNO'
,
},
{
name
:
'bpmnfile'
,
prop
:
'bpmnfile'
,
dataType
:
'TEXT'
,
},
{
name
:
'md5check'
,
prop
:
'md5check'
,
dataType
:
'TEXT'
,
},
{
name
:
'wfprocessdefinition'
,
prop
:
'definitionkey'
,
dataType
:
'FONTKEY'
,
},
]
}
}
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/main-form/main-form-service.ts
0 → 100644
浏览文件 @
90138f50
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
WFProcessDefinitionService
from
'@/service/wfprocess-definition/wfprocess-definition-service'
;
import
MainModel
from
'./main-form-model'
;
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export
default
class
MainService
extends
ControlService
{
/**
* 流程定义服务对象
*
* @type {WFProcessDefinitionService}
* @memberof MainService
*/
public
appEntityService
:
WFProcessDefinitionService
=
new
WFProcessDefinitionService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
MainModel
();
}
/**
* 处理数据
*
* @private
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
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 MainService
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
return
Promise
.
reject
([])
}
/**
* 启动工作流
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
wfstart
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
,
localdata
?:
any
):
Promise
<
any
>
{
data
=
this
.
handleWFData
(
data
);
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 MainService
*/
@
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
).
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]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
add
(
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
.
Create
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
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]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
update
(
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
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
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
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
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
.
definitionkey
=
PrimaryKey
;
Data
.
wfprocessdefinition
=
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
)
=>
{
response
.
data
.
definitionkey
=
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 MainService
*/
@
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 MainService
*/
public
handleRequestData
(
action
:
string
,
context
:
any
,
data
:
any
=
{}){
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
let
requestData
:
any
=
{};
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
];
}
}
});
if
(
data
&&
data
.
viewparams
){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/main-form/main-form.less
0 → 100644
浏览文件 @
90138f50
.ivu-tabs-no-animation>.ivu-tabs-content{
padding: 0 16px;
}
.ivu-card-head{
padding: 14px 0;
}
.app-form {
overflow: auto;
> .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;
}
}
// this is less
app_Web/src/widgets/wfprocess-definition/main-form/main-form.vue
0 → 100644
浏览文件 @
90138f50
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
MainBase
from
'./main-form-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
Main
extends
MainBase
{
}
</
script
>
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/main-grid/main-grid-base.vue
0 → 100644
浏览文件 @
90138f50
<
template
>
<div
class=
'grid'
style=
"height:100%;"
>
<i-form>
<el-table
v-if=
"isDisplay === true"
:default-sort=
"
{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)"
:border="isDragendCol"
:height="isEnablePagingBar
&&
items.length > 0 ? 'calc(100% - 50px)' : '100%'"
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
@row-class-name="onRowClassName($event)"
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template
slot=
"empty"
>
无数据
<span
class=
"quick-toolbar"
>
</span>
</
template
>
<
template
v-if=
"!isSingleSelect"
>
<el-table-column
align=
"center"
type=
'selection'
:width=
"checkboxColWidth"
></el-table-column>
</
template
>
<
template
v-if=
"getColumnState('definitionkey')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'definitionkey'"
:label=
"$t('entities.wfprocessdefinition.main_grid.columns.definitionkey')"
:width=
"250"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"
{column}">
<span
class=
"column-header "
>
{{
$t
(
'entities.wfprocessdefinition.main_grid.columns.definitionkey'
)
}}
</span>
</
template
>
<
template
v-slot=
"{row,column,$index}"
>
<span>
{{
row
.
definitionkey
}}
</span>
</
template
>
</el-table-column>
</template>
<
template
v-if=
"getColumnState('definitionname')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'definitionname'"
:label=
"$t('entities.wfprocessdefinition.main_grid.columns.definitionname')"
:width=
"250"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"
{column}">
<span
class=
"column-header "
>
{{
$t
(
'entities.wfprocessdefinition.main_grid.columns.definitionname'
)
}}
</span>
</
template
>
<
template
v-slot=
"{row,column,$index}"
>
<span>
{{
row
.
definitionname
}}
</span>
</
template
>
</el-table-column>
</template>
<
template
v-if=
"getColumnState('pssystemid')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'pssystemid'"
:label=
"$t('entities.wfprocessdefinition.main_grid.columns.pssystemid')"
:width=
"250"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"
{column}">
<span
class=
"column-header "
>
{{
$t
(
'entities.wfprocessdefinition.main_grid.columns.pssystemid'
)
}}
</span>
</
template
>
<
template
v-slot=
"{row,column,$index}"
>
<span>
{{
row
.
pssystemid
}}
</span>
</
template
>
</el-table-column>
</template>
<
template
v-if=
"getColumnState('modelversion')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'modelversion'"
:label=
"$t('entities.wfprocessdefinition.main_grid.columns.modelversion')"
:width=
"150"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"
{column}">
<span
class=
"column-header "
>
{{
$t
(
'entities.wfprocessdefinition.main_grid.columns.modelversion'
)
}}
</span>
</
template
>
<
template
v-slot=
"{row,column,$index}"
>
<span>
{{
row
.
modelversion
}}
</span>
</
template
>
</el-table-column>
</template>
<
template
v-if=
"getColumnState('modelenable')"
>
<el-table-column
show-overflow-tooltip
:prop=
"'modelenable'"
:label=
"$t('entities.wfprocessdefinition.main_grid.columns.modelenable')"
:width=
"250"
:align=
"'left'"
:sortable=
"'custom'"
>
<template
v-slot:header=
"
{column}">
<span
class=
"column-header "
>
{{
$t
(
'entities.wfprocessdefinition.main_grid.columns.modelenable'
)
}}
</span>
</
template
>
<
template
v-slot=
"{row,column,$index}"
>
<template
>
<codelist
:value=
"row.modelenable"
tag=
'YesNo'
codelistType=
'STATIC'
></codelist>
</
template
>
</template>
</el-table-column>
</template>
<
template
v-if=
"adaptiveState"
>
<el-table-column></el-table-column>
</
template
>
</el-table>
</i-form>
<row
class=
'grid-pagination'
v-show=
"items.length > 0"
>
<page
class=
'pull-right'
@
on-change=
"pageOnChange($event)"
@
on-page-size-change=
"onPageSizeChange($event)"
:transfer=
"true"
:total=
"totalrow"
show-sizer
:current=
"curPage"
:page-size=
"limit"
:page-size-opts=
"[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]"
show-elevator
show-total
>
<span>
<span
class=
"page-column"
>
<poptip
transfer
placement=
"top-start"
>
<i-button
icon=
"md-menu"
>
{{$t('app.gridpage.choicecolumns')}}
</i-button>
<div
slot=
"content"
>
<
template
v-for=
"col in allColumns"
>
<div
:key=
"col.name"
><el-checkbox
v-model=
"col.show"
@
change=
"onColChange()"
>
{{
$t
(
col
.
langtag
)
}}
</el-checkbox></div>
</
template
>
</div>
</poptip>
</span>
<span
v-if=
"selections.length > 0"
class=
"batch-toolbar"
>
</span>
<span
class=
"page-button"
><i-button
icon=
"md-refresh"
:title=
"$t('app.gridpage.refresh')"
@
click=
"pageRefresh()"
></i-button></span>
<span>
{{$t('app.gridpage.show')}}
<span>
<
template
v-if=
"items.length === 1"
>
1
</
template
>
<
template
v-else
>
<span>
{{
(
curPage
-
1
)
*
limit
+
1
}}
-
{{
totalrow
>
curPage
*
limit
?
curPage
*
limit
:
totalrow
}}
</span>
</
template
>
</span>
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}
{{totalrow}}
{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</div>
</template>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Model
}
from
'vue-property-decorator'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
ControlInterface
}
from
'@/interface/control'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
WFProcessDefinitionService
from
'@/service/wfprocess-definition/wfprocess-definition-service'
;
import
MainService
from
'./main-grid-service'
;
import
CodeListService
from
"@service/app/codelist-service"
;
import
{
FormItemModel
}
from
'@/model/form-detail'
;
@
Component
({
components
:
{
}
})
export
default
class
MainBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Main
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof Main
*/
@
Prop
()
public
context
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof Main
*/
@
Prop
()
public
viewparams
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Main
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof Main
*/
public
getControlType
():
string
{
return
'GRID'
}
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Main
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof Main
*/
public
service
:
MainService
=
new
MainService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {WFProcessDefinitionService}
* @memberof Main
*/
public
appEntityService
:
WFProcessDefinitionService
=
new
WFProcessDefinitionService
({
$store
:
this
.
$store
});
/**
* 关闭视图
*
* @param {any} args
* @memberof Main
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof Main
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof Main
*/
public
codeListService
:
CodeListService
=
new
CodeListService
({
$store
:
this
.
$store
});
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof Main
*/
public
getDatas
():
any
[]
{
return
this
.
selections
;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof Main
*/
public
getData
():
any
{
return
this
.
selections
[
0
];
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof Main
*/
@
Prop
()
public
newdata
:
any
;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof Main
*/
@
Prop
()
public
opendata
:
any
;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof Main
*/
@
Prop
({
default
:
true
})
public
showBusyIndicator
?:
boolean
;
/**
* 部件行为--update
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
updateAction
!
:
string
;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
fetchAction
!
:
string
;
/**
* 部件行为--remove
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
removeAction
!
:
string
;
/**
* 部件行为--load
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
loadAction
!
:
string
;
/**
* 部件行为--loaddraft
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
loaddraftAction
!
:
string
;
/**
* 部件行为--create
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
createAction
!
:
string
;
/**
* 当前页
*
* @type {number}
* @memberof Main
*/
public
curPage
:
number
=
1
;
/**
* 数据
*
* @type {any[]}
* @memberof Main
*/
public
items
:
any
[]
=
[];
/**
* 是否支持分页
*
* @type {boolean}
* @memberof Main
*/
public
isEnablePagingBar
:
boolean
=
true
;
/**
* 是否禁用排序
*
* @type {boolean}
* @memberof Main
*/
public
isNoSort
:
boolean
=
false
;
/**
* 排序方向
*
* @type {string}
* @memberof Main
*/
public
minorSortDir
:
string
=
''
;
/**
* 排序字段
*
* @type {string}
* @memberof Main
*/
public
minorSortPSDEF
:
string
=
''
;
/**
* 分页条数
*
* @type {number}
* @memberof Main
*/
public
limit
:
number
=
20
;
/**
* 是否显示标题
*
* @type {boolean}
* @memberof Main
*/
public
isHideHeader
:
boolean
=
false
;
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof Main
*/
@
Prop
({
default
:
false
})
public
isSelectFirstDefault
!
:
boolean
;
/**
* 是否单选
*
* @type {boolean}
* @memberof Main
*/
@
Prop
()
public
isSingleSelect
?:
boolean
;
/**
* 选中数据字符串
*
* @type {string}
* @memberof Main
*/
@
Prop
()
public
selectedData
?:
string
;
/**
* 选中值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainTree
*/
@
Watch
(
'selectedData'
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
selections
=
[];
if
(
this
.
selectedData
){
const
refs
:
any
=
this
.
$refs
;
if
(
refs
.
multipleTable
)
{
refs
.
multipleTable
.
clearSelection
();
JSON
.
parse
(
this
.
selectedData
).
forEach
((
selection
:
any
)
=>
{
let
selectedItem
=
this
.
items
.
find
((
item
:
any
)
=>
{
return
Object
.
is
(
item
.
srfkey
,
selection
.
srfkey
);
});
if
(
selectedItem
){
this
.
rowClick
(
selectedItem
);
}
});
}
}
}
/**
* 表格行数据默认激活模式
* 0 不激活
* 1 单击激活
* 2 双击激活
*
* @type {(number | 0 | 1 | 2)}
* @memberof Main
*/
@
Prop
({
default
:
2
})
public
gridRowActiveMode
!
:
number
;
/**
* 是否开启行编辑
*
* @type {boolean}
* @memberof Main
*/
@
Prop
({
default
:
false
})
public
isOpenEdit
!
:
boolean
;
/**
* 实际是否开启行编辑
*
* @type {boolean}
* @memberof Main
*/
public
actualIsOpenEdit
:
boolean
=
this
.
isOpenEdit
;
/**
* 总条数
*
* @type {number}
* @memberof Main
*/
public
totalrow
:
number
=
0
;
/**
* 选中行数据
*
* @type {any[]}
* @memberof Main
*/
public
selections
:
any
[]
=
[];
/**
* 拦截行选中
*
* @type {boolean}
* @memberof Main
*/
public
stopRowClick
:
boolean
=
false
;
/**
* 表格是否显示
*
* @type {boolean}
* @memberof Main
*/
public
isDisplay
:
boolean
=
true
;
/**
* 部件刷新
*
* @param {any[]} args
* @memberof Main
*/
public
refresh
(
args
:
any
[]):
void
{
this
.
load
();
}
/**
* 选项框列宽
*
* @type {number}
* @memberof AppIndex
*/
public
checkboxColWidth
:
number
=
50
;
/**
* 是否允许拖动列宽
*
* @type {boolean}
* @memberof AppEmbedPicker
*/
public
isDragendCol
:
boolean
=
false
;
/**
* 所有列成员
*
* @type {any[]}
* @memberof Main
*/
public
allColumns
:
any
[]
=
[
{
name
:
'definitionkey'
,
label
:
'DefinitionKey'
,
langtag
:
'entities.wfprocessdefinition.main_grid.columns.definitionkey'
,
show
:
true
,
util
:
'PX'
},
{
name
:
'definitionname'
,
label
:
'流程定义名称'
,
langtag
:
'entities.wfprocessdefinition.main_grid.columns.definitionname'
,
show
:
true
,
util
:
'PX'
},
{
name
:
'pssystemid'
,
label
:
'系统标识'
,
langtag
:
'entities.wfprocessdefinition.main_grid.columns.pssystemid'
,
show
:
true
,
util
:
'PX'
},
{
name
:
'modelversion'
,
label
:
'模型版本'
,
langtag
:
'entities.wfprocessdefinition.main_grid.columns.modelversion'
,
show
:
true
,
util
:
'PX'
},
{
name
:
'modelenable'
,
label
:
'模型是否启用'
,
langtag
:
'entities.wfprocessdefinition.main_grid.columns.modelenable'
,
show
:
true
,
util
:
'PX'
},
]
/**
* 表格模型集合
*
* @type {*}
* @memberof Main
*/
public
gridItemsModel
:
any
[]
=
[];
/**
* 获取表格行模型
*
* @type {*}
* @memberof Main
*/
public
getGridRowModel
(){
return
{
srfkey
:
new
FormItemModel
(),
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof Main
*/
public
rules
:
any
=
{
srfkey
:
[
{
required
:
false
,
validator
:
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
return
(
rule
.
required
&&
(
value
===
null
||
value
===
undefined
||
value
===
""
))
?
false
:
true
;},
message
:
'DefinitionKey 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
validator
:
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
return
(
rule
.
required
&&
(
value
===
null
||
value
===
undefined
||
value
===
""
))
?
false
:
true
;},
message
:
'DefinitionKey 值不能为空'
,
trigger
:
'blur'
},
],
}
/**
* 表格行编辑项校验
*
* @param {string} property 属性名
* @param {*} data 行数据
* @param {number} rowIndex 行索引
* @returns Promise<any>
*
* @memberof Main
*/
public
validate
(
property
:
string
,
data
:
any
,
rowIndex
:
number
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$util
.
validateItem
(
property
,
data
,
this
.
rules
).
then
(()
=>
{
this
.
gridItemsModel
[
rowIndex
][
property
].
setError
(
null
);
resolve
(
true
);
}).
catch
(({
errors
,
fields
})
=>
{
this
.
gridItemsModel
[
rowIndex
][
property
].
setError
(
errors
[
0
].
message
);
resolve
(
false
);
});
});
}
/**
* 校验所有修改过的编辑项
*
* @returns Promise<any>
* @memberof Main
*/
public
async
validateAll
(){
let
validateState
=
true
;
let
index
=
-
1
;
for
(
let
item
of
this
.
items
){
index
++
;
if
(
item
.
rowDataState
===
"create"
||
item
.
rowDataState
===
"update"
){
for
(
let
property
of
Object
.
keys
(
this
.
rules
)){
if
(
!
await
this
.
validate
(
property
,
item
,
index
)){
validateState
=
false
;
}
}
}
}
return
validateState
;
}
/**
* 表格数据加载
*
* @param {*} [arg={}]
* @memberof Main
*/
public
load
(
opt
:
any
=
{},
pageReset
:
boolean
=
false
):
void
{
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'WFProcessDefinitionGridView视图表格fetchAction参数未配置'
});
return
;
}
if
(
pageReset
){
this
.
curPage
=
1
;
}
const
arg
:
any
=
{...
opt
};
const
page
:
any
=
{};
if
(
this
.
isEnablePagingBar
)
{
Object
.
assign
(
page
,
{
page
:
this
.
curPage
-
1
,
size
:
this
.
limit
});
}
// 设置排序
if
(
!
this
.
isNoSort
&&
!
Object
.
is
(
this
.
minorSortDir
,
''
)
&&
!
Object
.
is
(
this
.
minorSortPSDEF
,
''
))
{
const
sort
:
string
=
this
.
minorSortPSDEF
+
","
+
this
.
minorSortDir
;
Object
.
assign
(
page
,
{
sort
:
sort
});
}
Object
.
assign
(
arg
,
page
);
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorMessage
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
errorMessage
});
}
return
;
}
const
data
:
any
=
response
.
data
;
this
.
totalrow
=
response
.
total
;
this
.
items
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 清空selections,gridItemsModel
this
.
selections
=
[];
this
.
gridItemsModel
=
[];
this
.
items
.
forEach
(()
=>
{
this
.
gridItemsModel
.
push
(
this
.
getGridRowModel
())});
this
.
$emit
(
'load'
,
this
.
items
);
// 设置默认选中
let
_this
=
this
;
setTimeout
(()
=>
{
if
(
_this
.
isSelectFirstDefault
){
_this
.
rowClick
(
_this
.
items
[
0
]);
}
if
(
_this
.
selectedData
){
const
refs
:
any
=
_this
.
$refs
;
if
(
refs
.
multipleTable
)
{
refs
.
multipleTable
.
clearSelection
();
JSON
.
parse
(
_this
.
selectedData
).
forEach
((
selection
:
any
)
=>
{
let
selectedItem
=
_this
.
items
.
find
((
item
:
any
)
=>
{
return
Object
.
is
(
item
.
srfkey
,
selection
.
srfkey
);
});
if
(
selectedItem
){
_this
.
rowClick
(
selectedItem
);
}
});
}
}
},
300
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
errorMessage
});
});
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof Main
*/
public
async
remove
(
datas
:
any
[]):
Promise
<
any
>
{
if
(
!
this
.
removeAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'WFProcessDefinitionGridView视图表格removeAction参数未配置'
});
return
;
}
let
_datas
:
any
[]
=
[];
datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
if
(
!
record
.
srfkey
)
{
this
.
items
.
some
((
val
:
any
,
num
:
number
)
=>
{
if
(
JSON
.
stringify
(
val
)
==
JSON
.
stringify
(
record
)){
this
.
items
.
splice
(
num
,
1
);
this
.
gridItemsModel
.
splice
(
num
,
1
);
return
true
;
}
});
}
else
{
_datas
.
push
(
datas
[
index
]);
}
});
if
(
_datas
.
length
===
0
)
{
return
;
}
let
dataInfo
=
''
;
_datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
let
srfmajortext
=
record
.
definitionname
;
if
(
index
<
5
)
{
if
(
!
Object
.
is
(
dataInfo
,
''
))
{
dataInfo
+=
'、'
;
}
dataInfo
+=
srfmajortext
;
}
else
{
return
false
;
}
});
if
(
_datas
.
length
<
5
)
{
dataInfo
=
dataInfo
+
' 共'
+
_datas
.
length
+
'条数据'
;
}
else
{
dataInfo
=
dataInfo
+
'...'
+
' 共'
+
_datas
.
length
+
'条数据'
;
}
const
removeData
=
()
=>
{
let
keys
:
any
[]
=
[];
_datas
.
forEach
((
data
:
any
)
=>
{
keys
.
push
(
data
.
srfkey
);
});
let
_removeAction
=
keys
.
length
>
1
?
'removeBatch'
:
this
.
removeAction
;
let
_keys
=
keys
.
length
>
1
?
keys
:
keys
[
0
]
;
const
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
const
post
:
Promise
<
any
>
=
this
.
service
.
delete
(
_removeAction
,
Object
.
assign
(
context
,{
wfprocessdefinition
:
_keys
}),
Object
.
assign
({
wfprocessdefinition
:
_keys
},{
viewparams
:
this
.
viewparams
}),
this
.
showBusyIndicator
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
''
,
desc
:
'删除数据失败,'
+
response
.
info
});
return
;
}
else
{
this
.
$Notice
.
success
({
title
:
''
,
desc
:
'删除成功!'
});
}
//删除items中已删除的项
console
.
log
(
this
.
items
);
_datas
.
forEach
((
data
:
any
)
=>
{
this
.
items
.
some
((
item
:
any
,
index
:
number
)
=>
{
if
(
Object
.
is
(
item
.
srfkey
,
data
.
srfkey
)){
this
.
items
.
splice
(
index
,
1
);
this
.
gridItemsModel
.
splice
(
index
,
1
);
return
true
;
}
});
});
this
.
totalrow
-=
_datas
.
length
;
this
.
$emit
(
'remove'
,
null
);
this
.
selections
=
[];
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常'
});
reject
(
response
);
return
;
}
reject
(
response
);
});
});
}
dataInfo
=
dataInfo
.
replace
(
/
[
null
]
/g
,
''
).
replace
(
/
[
undefined
]
/g
,
''
);
this
.
$Modal
.
confirm
({
title
:
'警告'
,
content
:
'确认要删除 '
+
dataInfo
+
',删除操作将不可恢复?'
,
onOk
:
()
=>
{
removeData
();
},
onCancel
:
()
=>
{
}
});
return
removeData
;
}
/**
* 批量添加
*
* @param {*} [arg={}]
* @memberof Main
*/
public
addBatch
(
arg
:
any
=
{}):
void
{
if
(
!
this
.
fetchAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'WFProcessDefinitionGridView视图表格fetchAction参数未配置'
});
return
;
}
if
(
!
arg
){
arg
=
{};
}
console
.
error
(
"批量添加未实现"
);
}
/**
* 数据导入
*
* @param {*} data
* @memberof Main
*/
public
importExcel
(
data
:
any
=
{}):
void
{
//导入excel
const
importDataModel
:
any
=
{
}
if
(
Object
.
keys
(
importDataModel
).
length
==
0
){
this
.
$Notice
.
warning
({
'title'
:
(
this
.
$t
(
"app.utilview.warning"
)
as
string
),
'desc'
:
(
this
.
$t
(
"app.utilview.info"
)
as
string
)
});
return
;
}
const
view
:
any
=
{
viewname
:
'app-data-upload'
,
title
:
this
.
$t
(
"app.utilview.importview"
),
width
:
900
,
height
:
700
}
let
container
:
Subject
<
any
>
=
this
.
$appmodal
.
openModal
(
view
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
importDataModel
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
Object
.
is
(
result
.
ret
,
'OK'
)){
this
.
refresh
(
result
.
datas
);
}
});
}
/**
* 数据导出
*
* @param {*} data
* @memberof Main
*/
public
exportExcel
(
data
:
any
=
{}):
void
{
// 导出Excel
const
doExport
=
async
(
_data
:
any
)
=>
{
const
tHeader
:
Array
<
any
>
=
[];
const
filterVal
:
Array
<
any
>
=
[];
this
.
allColumns
.
forEach
((
item
:
any
)
=>
{
item
.
show
&&
item
.
label
?
tHeader
.
push
(
this
.
$t
(
item
.
langtag
))
:
""
;
item
.
show
&&
item
.
name
?
filterVal
.
push
(
item
.
name
)
:
""
;
});
const
data
=
await
this
.
formatExcelData
(
filterVal
,
_data
);
this
.
$export
.
exportExcel
().
then
((
excel
:
any
)
=>
{
excel
.
export_json_to_excel
({
header
:
tHeader
,
//表头 必填
data
,
//具体数据 必填
filename
:
"流程定义表"
,
//非必填
autoWidth
:
true
,
//非必填
bookType
:
"xlsx"
//非必填
});
});
};
const
page
:
any
=
{};
// 设置page,size
if
(
Object
.
is
(
data
.
type
,
'maxRowCount'
))
{
Object
.
assign
(
page
,
{
page
:
0
,
size
:
data
.
maxRowCount
});
}
else
if
(
Object
.
is
(
data
.
type
,
'activatedPage'
))
{
try
{
doExport
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
items
)));
}
catch
(
error
)
{
console
.
error
(
error
);
}
return
;
}
// 设置排序
if
(
!
this
.
isNoSort
&&
!
Object
.
is
(
this
.
minorSortDir
,
''
)
&&
!
Object
.
is
(
this
.
minorSortPSDEF
,
''
))
{
const
sort
:
string
=
this
.
minorSortPSDEF
+
","
+
this
.
minorSortDir
;
Object
.
assign
(
page
,
{
sort
:
sort
});
}
const
arg
:
any
=
{};
Object
.
assign
(
arg
,
page
);
// 获取query,搜索表单,viewparams等父数据
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
''
,
desc
:
'数据导出失败,'
+
response
.
info
});
return
;
}
try
{
doExport
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)));
}
catch
(
error
)
{
console
.
error
(
error
);
}
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
''
,
desc
:
'数据导出失败'
});
});
}
/**
* 导出数据格式化
*
* @param {*} filterVal
* @param {*} jsonData
* @returns {[]}
* @memberof Main
*/
public
async
formatExcelData
(
filterVal
:
any
,
jsonData
:
any
)
{
let
codelistColumns
:
Array
<
any
>
=
[
{
name
:
'modelenable'
,
srfkey
:
'YesNo'
,
codelistType
:
'STATIC'
,
renderMode
:
'other'
,
textSeparator
:
'、'
,
valueSeparator
:
','
,
},
];
let
_this
=
this
;
for
(
const
codelist
of
codelistColumns
)
{
// 动态代码表处理
if
(
Object
.
is
(
codelist
.
codelistType
,
"DYNAMIC"
))
{
let
items
=
await
_this
.
codeListService
.
getItems
(
codelist
.
srfkey
);
jsonData
.
forEach
((
row
:
any
)
=>
{
row
[
codelist
.
name
]
=
_this
.
getCodelistValue
(
items
,
row
[
codelist
.
name
],
codelist
);
});
// 静态处理
}
else
if
(
Object
.
is
(
codelist
.
codelistType
,
"STATIC"
)){
let
items
=
await
_this
.
$store
.
getters
.
getCodeListItems
(
codelist
.
srfkey
);
jsonData
.
forEach
((
row
:
any
)
=>
{
row
[
codelist
.
name
]
=
_this
.
getCodelistValue
(
items
,
row
[
codelist
.
name
],
codelist
);
});
}
}
return
jsonData
.
map
((
v
:
any
)
=>
filterVal
.
map
((
j
:
any
)
=>
v
[
j
]))
}
/**
* 解析代码表和vlaue,设置items
*
* @public
* @param {any[]} items 代码表数据
* @param {*} value
* @returns {*}
* @memberof Main
*/
public
getCodelistValue
(
items
:
any
[],
value
:
any
,
codelist
:
any
,){
if
(
!
value
){
return
this
.
$t
(
'codelist.'
+
codelist
.
srfkey
+
'.empty'
);
}
if
(
items
)
{
let
result
:
any
=
[];
if
(
Object
.
is
(
codelist
.
renderMode
,
"number"
)){
items
.
map
((
_item
:
any
,
index
:
number
)
=>
{
const
nValue
=
parseInt
((
value
as
any
),
10
);
const
codevalue
=
_item
.
value
;
if
((
parseInt
(
codevalue
,
10
)
&
nValue
)
>
0
){
result
.
push
(
_item
);
}
});
}
else
if
(
Object
.
is
(
codelist
.
renderMode
,
"string"
)){
const
arrayValue
:
Array
<
any
>
=
(
value
as
any
).
split
(
codelist
.
valueSeparator
);
arrayValue
.
map
((
value
:
any
,
index
:
number
)
=>
{
result
.
push
([]);
let
values
:
any
[]
=
Object
.
is
(
this
.
$util
.
typeOf
(
value
),
'number'
)
?
[
value
]
:
[...(
value
as
any
).
split
(
codelist
.
valueSeparator
)];
values
.
map
((
val
:
any
,
num
:
number
)
=>
{
const
item
=
this
.
getItem
(
items
,
val
,
codelist
);
if
(
item
){
result
[
index
].
push
(
item
);
}
});
});
}
else
{
let
values
:
any
[]
=
Object
.
is
(
this
.
$util
.
typeOf
(
value
),
'number'
)
?
[
value
]
:
[...(
value
as
any
).
split
(
codelist
.
valueSeparator
)];
values
.
map
((
value
:
any
,
index
:
number
)
=>
{
const
item
=
this
.
getItem
(
items
,
value
,
codelist
);
if
(
item
){
result
.
push
(
item
);
}
});
}
// 设置items
if
(
result
.
length
!=
0
){
return
result
.
join
(
codelist
.
valueSeparator
);
}
else
{
return
value
;
}
}
}
/**
* 获取代码项
*
* @public
* @param {any[]} items
* @param {*} value
* @returns {*}
* @memberof Main
*/
public
getItem
(
items
:
any
[],
value
:
any
,
codelist
:
any
):
any
{
const
arr
:
Array
<
any
>
=
items
.
filter
(
item
=>
{
return
item
.
value
==
value
});
if
(
arr
.
length
!==
1
)
{
return
undefined
;
}
if
(
Object
.
is
(
codelist
.
codelistType
,
'STATIC'
)){
return
this
.
$t
(
'codelist.'
+
codelist
.
srfkey
+
'.'
+
arr
[
0
].
value
);
}
else
{
return
arr
[
0
].
text
;
}
}
/**
* 生命周期
*
* @memberof Main
*/
public
created
():
void
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof Main
*/
public
afterCreated
(){
this
.
setColState
();
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
load
(
data
);
}
if
(
Object
.
is
(
'remove'
,
action
))
{
this
.
remove
(
data
);
}
if
(
Object
.
is
(
'save'
,
action
))
{
this
.
save
(
data
);
}
});
}
}
/**
* vue 生命周期
*
* @memberof Main
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof Main
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
/**
* 获取选中行胡数据
*
* @returns {any[]}
* @memberof Main
*/
public
getSelection
():
any
[]
{
return
this
.
selections
;
}
/**
* 行双击事件
*
* @param {*} $event
* @returns {void}
* @memberof Main
*/
public
rowDBLClick
(
$event
:
any
):
void
{
if
(
!
$event
||
this
.
actualIsOpenEdit
||
Object
.
is
(
this
.
gridRowActiveMode
,
0
))
{
return
;
}
this
.
selections
=
[];
this
.
selections
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
$event
)));
const
refs
:
any
=
this
.
$refs
;
if
(
refs
.
multipleTable
)
{
refs
.
multipleTable
.
clearSelection
();
refs
.
multipleTable
.
toggleRowSelection
(
$event
);
}
this
.
$emit
(
'rowdblclick'
,
this
.
selections
);
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
/**
* 复选框数据选中
*
* @param {*} $event
* @returns {void}
* @memberof Main
*/
public
select
(
$event
:
any
):
void
{
if
(
!
$event
)
{
return
;
}
this
.
selections
=
[];
this
.
selections
=
[...
JSON
.
parse
(
JSON
.
stringify
(
$event
))];
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
/**
* 复选框数据全部选中
*
* @param {*} $event
* @memberof Main
*/
public
selectAll
(
$event
:
any
):
void
{
if
(
!
$event
)
{
return
;
}
this
.
selections
=
[];
this
.
selections
=
[...
JSON
.
parse
(
JSON
.
stringify
(
$event
))];
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
/**
* 行单击选中
*
* @param {*} $event
* @returns {void}
* @memberof Main
*/
public
rowClick
(
$event
:
any
,
ifAlways
:
boolean
=
false
):
void
{
if
(
!
ifAlways
&&
(
!
$event
||
this
.
actualIsOpenEdit
))
{
return
;
}
if
(
this
.
stopRowClick
)
{
this
.
stopRowClick
=
false
;
return
;
}
if
(
this
.
isSingleSelect
){
this
.
selections
=
[];
}
// 已选中则删除,没选中则添加
let
selectIndex
=
this
.
selections
.
findIndex
((
item
:
any
)
=>
{
return
Object
.
is
(
item
.
wf_definition
,
$event
.
wf_definition
);
});
if
(
Object
.
is
(
selectIndex
,
-
1
)){
this
.
selections
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
$event
)));
}
else
{
this
.
selections
.
splice
(
selectIndex
,
1
);
}
const
refs
:
any
=
this
.
$refs
;
if
(
refs
.
multipleTable
)
{
if
(
this
.
isSingleSelect
){
refs
.
multipleTable
.
clearSelection
();
refs
.
multipleTable
.
setCurrentRow
(
$event
);
}
else
{
refs
.
multipleTable
.
toggleRowSelection
(
$event
);
}
}
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
/**
* 页面变化
*
* @param {*} $event
* @returns {void}
* @memberof Main
*/
public
pageOnChange
(
$event
:
any
):
void
{
if
(
!
$event
)
{
return
;
}
if
(
$event
===
this
.
curPage
)
{
return
;
}
this
.
curPage
=
$event
;
this
.
load
({});
}
/**
* 分页条数变化
*
* @param {*} $event
* @returns {void}
* @memberof Main
*/
public
onPageSizeChange
(
$event
:
any
):
void
{
if
(
!
$event
)
{
return
;
}
if
(
$event
===
this
.
limit
)
{
return
;
}
this
.
limit
=
$event
;
if
(
this
.
curPage
===
1
)
{
this
.
load
({});
}
}
/**
* 分页刷新
*
* @memberof Main
*/
public
pageRefresh
():
void
{
this
.
load
({});
}
/**
* 排序变化
*
* @param {{ column: any, prop: any, order: any }} { column, prop, order }
* @memberof Main
*/
public
onSortChange
({
column
,
prop
,
order
}:
{
column
:
any
,
prop
:
any
,
order
:
any
}):
void
{
const
dir
=
Object
.
is
(
order
,
'ascending'
)
?
'asc'
:
Object
.
is
(
order
,
'descending'
)
?
'desc'
:
''
;
if
(
Object
.
is
(
dir
,
this
.
minorSortDir
)
&&
Object
.
is
(
this
.
minorSortPSDEF
,
prop
))
{
return
;
}
this
.
minorSortDir
=
dir
;
this
.
minorSortPSDEF
=
prop
?
prop
:
''
;
this
.
load
({});
}
/**
* 表格行选中样式
*
* @param {{ row: any, rowIndex: any }} { row, rowIndex }
* @returns {string}
* @memberof Main
*/
public
onRowClassName
({
row
,
rowIndex
}:
{
row
:
any
,
rowIndex
:
any
}):
string
{
const
index
=
this
.
selections
.
findIndex
((
select
:
any
)
=>
Object
.
is
(
select
.
srfkey
,
row
.
srfkey
));
return
index
!==
-
1
?
'grid-row-select'
:
''
;
}
/**
* 界面行为
*
* @param {*} row
* @param {*} tag
* @param {*} $event
* @memberof Main
*/
public
uiAction
(
row
:
any
,
tag
:
any
,
$event
:
any
)
{
// this.rowClick(row, true);
}
/**
* 设置列状态
*
* @memberof Main
*/
public
setColState
()
{
const
_data
:
any
=
localStorage
.
getItem
(
'wf_definition_main_grid'
);
if
(
_data
)
{
let
columns
=
JSON
.
parse
(
_data
);
columns
.
forEach
((
col
:
any
)
=>
{
let
column
=
this
.
allColumns
.
find
((
item
)
=>
Object
.
is
(
col
.
name
,
item
.
name
));
if
(
column
)
{
Object
.
assign
(
column
,
col
);
}
});
}
}
/**
* 列变化
*
* @memberof Main
*/
public
onColChange
()
{
localStorage
.
setItem
(
'wf_definition_main_grid'
,
JSON
.
stringify
(
this
.
allColumns
));
}
/**
* 获取列状态
*
* @param {string} name
* @returns {boolean}
* @memberof Main
*/
public
getColumnState
(
name
:
string
):
boolean
{
let
column
=
this
.
allColumns
.
find
((
col
:
any
)
=>
Object
.
is
(
name
,
col
.
name
)
);
return
column
.
show
?
true
:
false
;
}
/**
* 表格列是否自适应布局
*
* @readonly
* @type {boolean}
* @memberof Main
*/
get
adaptiveState
():
boolean
{
return
!
this
.
allColumns
.
find
((
column
:
any
)
=>
column
.
show
&&
Object
.
is
(
column
.
util
,
'STAR'
));
}
/**
* 保存
*
* @param {*} $event
* @returns {Promise<any>}
* @memberof Main
*/
public
async
save
(
args
:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
){
let
_this
=
this
;
if
(
!
await
this
.
validateAll
()){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'值规则校验异常'
});
return
[];
}
let
successItems
:
any
=
[];
let
errorItems
:
any
=
[];
let
errorMessage
:
any
=
[];
for
(
const
item
of
_this
.
items
)
{
try
{
if
(
Object
.
is
(
item
.
rowDataState
,
'create'
)){
if
(
!
this
.
createAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'WFProcessDefinitionGridView视图表格createAction参数未配置'
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
let
response
=
await
this
.
service
.
add
(
this
.
createAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
successItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)));
}
}
else
if
(
Object
.
is
(
item
.
rowDataState
,
'update'
)){
if
(
!
this
.
updateAction
){
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'WFProcessDefinitionGridView视图表格updateAction参数未配置'
});
}
else
{
Object
.
assign
(
item
,{
viewparams
:
this
.
viewparams
});
if
(
item
.
wfprocessdefinition
){
Object
.
assign
(
this
.
context
,{
wfprocessdefinition
:
item
.
wfprocessdefinition
});
}
let
response
=
await
this
.
service
.
add
(
this
.
updateAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
item
,
this
.
showBusyIndicator
);
successItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
response
.
data
)));
}
}
}
catch
(
error
)
{
errorItems
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
item
)));
errorMessage
.
push
(
error
);
}
}
this
.
$emit
(
'save'
,
successItems
);
this
.
refresh
([]);
if
(
errorItems
.
length
===
0
){
this
.
$Notice
.
success
({
title
:
''
,
desc
:
'保存成功!'
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
$Notice
.
error
({
title
:
'保存失败'
,
desc
:
item
.
majorentityname
+
'保存失败!'
});
console
.
error
(
errorMessage
[
index
]);
});
}
return
successItems
;
}
/**
* 获取对应行class
*
* @param {*} $args row 行数据,rowIndex 行索引
* @returns {void}
* @memberof Main
*/
public
getRowClassName
(
args
:{
row
:
any
,
rowIndex
:
number
}){
let
isSelected
=
this
.
selections
.
some
((
item
:
any
)
=>
{
return
Object
.
is
(
item
.
wfprocessdefinition
,
args
.
row
.
wfprocessdefinition
);
});
return
isSelected
?
"grid-selected-row"
:
""
;
}
}
</
script
>
<
style
lang=
'less'
>
@import './main-grid.less';
</
style
>
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/main-grid/main-grid-model.ts
0 → 100644
浏览文件 @
90138f50
/**
* Main 部件模型
*
* @export
* @class MainModel
*/
export
default
class
MainModel
{
/**
* 是否是实体数据导出
*
* @returns {any[]}
* @memberof MainGridMode
*/
public
isDEExport
:
boolean
=
false
;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof MainGridMode
*/
public
getDataItems
():
any
[]
{
if
(
this
.
isDEExport
){
return
[
]
}
else
{
return
[
{
name
:
'definitionname'
,
prop
:
'definitionname'
,
dataType
:
'TEXT'
,
},
{
name
:
'modelenable'
,
prop
:
'modelenable'
,
dataType
:
'YESNO'
,
},
{
name
:
'definitionkey'
,
prop
:
'definitionkey'
,
dataType
:
'TEXT'
,
},
{
name
:
'pssystemid'
,
prop
:
'pssystemid'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfmajortext'
,
prop
:
'definitionname'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfdataaccaction'
,
prop
:
'definitionkey'
,
dataType
:
'TEXT'
,
},
{
name
:
'srfkey'
,
prop
:
'definitionkey'
,
dataType
:
'TEXT'
,
},
{
name
:
'modelversion'
,
prop
:
'modelversion'
,
dataType
:
'INT'
,
},
{
name
:
'wfprocessdefinition'
,
prop
:
'definitionkey'
,
},
{
name
:
'n_deploykey_like'
,
prop
:
'n_deploykey_like'
,
dataType
:
'TEXT'
,
},
{
name
:
'n_definitionname_like'
,
prop
:
'n_definitionname_like'
,
dataType
:
'TEXT'
,
},
{
name
:
'size'
,
prop
:
'size'
},
{
name
:
'query'
,
prop
:
'query'
},
{
name
:
'page'
,
prop
:
'page'
},
{
name
:
'sort'
,
prop
:
'sort'
},
{
name
:
'srfparentdata'
,
prop
:
'srfparentdata'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name
:
'srffrontuf'
,
prop
:
'srffrontuf'
,
dataType
:
'TEXT'
,
},
]
}
}
}
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/main-grid/main-grid-service.ts
0 → 100644
浏览文件 @
90138f50
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
WFProcessDefinitionService
from
'@/service/wfprocess-definition/wfprocess-definition-service'
;
import
MainModel
from
'./main-grid-model'
;
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export
default
class
MainService
extends
ControlService
{
/**
* 流程定义服务对象
*
* @type {WFProcessDefinitionService}
* @memberof MainService
*/
public
appEntityService
:
WFProcessDefinitionService
=
new
WFProcessDefinitionService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof MainService
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of MainService.
*
* @param {*} [opts={}]
* @memberof MainService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
MainModel
();
}
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof MainService
*/
public
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 MainService
*/
@
Errorlog
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
return
Promise
.
reject
([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Create
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 删除数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
delete
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Remove
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 修改数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Data
,
Context
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Data
,
Context
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 获取数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
get
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
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
)
=>
{
//处理返回数据,补充判断标识
if
(
response
.
data
){
Object
.
assign
(
response
.
data
,{
srfuf
:
0
});
}
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
search
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
FetchDefault
(
Context
,
Data
,
isloading
);
}
result
.
then
((
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 MainService
*/
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
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
)
=>
{
//处理返回数据,补充判断标识
if
(
response
.
data
){
Object
.
assign
(
response
.
data
,{
srfuf
:
'0'
});
//仿真主键数据
response
.
data
.
definitionkey
=
Util
.
createUUID
();
}
this
.
handleResponse
(
action
,
response
,
true
);
this
.
mergeDefaults
(
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 合并配置的默认值
* @param {*}
* @memberof MainService
*/
public
mergeDefaults
(
response
:
any
=
{}){
if
(
response
.
data
){
}
}
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
*/
@
Errorlog
public
frontLogic
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
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
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
})
}
}
\ No newline at end of file
app_Web/src/widgets/wfprocess-definition/main-grid/main-grid.less
0 → 100644
浏览文件 @
90138f50
.grid {
flex-grow: 1;
height: 100%;
overflow: auto;
.el-table__body-wrapper::-webkit-scrollbar {
/*滚动条整体样式*/
width : 10px !important; /*高宽分别对应横竖滚动条的尺寸*/
height: 10px !important;
}
.el-table__body-wrapper::-webkit-scrollbar-thumb {
/*滚动条颜色*/
border-radius : 10px !important;
background-color: #cecece !important;
}
.el-table__body-wrapper::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
background : #ededed !important;
border-radius: 10px !important;
}
/*表格文字过长省略*/
.el-table th>.cell, .el-table td>.cell{
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}
.el-table-column--selection .cell {
padding-left: 0px;
padding-right: 0px;
}
.app-column-link, .app-format-data{
display: inline;
}
.el-table {
.quick-toolbar{
display: inline-block;
button{
background: #ebf3fb;
color: #2575ca;
border: 0;
}
}
.el-tooltip{
.ivu-form-item{
margin-bottom: unset !important;
}
}
}
.grid-pagination {
height: 50px;
padding: 6px 0px;
.page-button {
button {
padding: 0;
font-size: 16px;
min-width: 32px;
height: 32px;
margin-right: 4px;
}
}
.page-column {
position: absolute;
left: 0;
}
.batch-toolbar{
position: absolute;
left: 105px;
>.toolbar-container{
button {
font-size: 16px;
min-width: 32px;
height: 32px;
margin-right: 4px;
margin-top: 0;
margin-bottom: 0;
}
}
}
}
.el-table__body-wrapper{
height: calc(100% - 45px) !important;
}
}
.ivu-modal-content{
.footer{
.ivu-row{
text-align: right;
}
}
}
// this is less
app_Web/src/widgets/wfprocess-definition/main-grid/main-grid.vue
0 → 100644
浏览文件 @
90138f50
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
MainBase
from
'./main-grid-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
Main
extends
MainBase
{
}
</
script
>
\ No newline at end of file
ibzrt-app/ibzrt-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
90138f50
...
@@ -31,6 +31,10 @@ zuul:
...
@@ -31,6 +31,10 @@ zuul:
path
:
/sysuserroles/**
path
:
/sysuserroles/**
serviceId
:
ibzuaa-api
serviceId
:
ibzuaa-api
stripPrefix
:
false
stripPrefix
:
false
wf_definition
:
path
:
/wfprocessdefinitions/**
serviceId
:
ibzwf-api
stripPrefix
:
false
sys_role
:
sys_role
:
path
:
/sysroles/**
path
:
/sysroles/**
serviceId
:
ibzuaa-api
serviceId
:
ibzuaa-api
...
...
ibzrt-core/src/main/resources/permission/systemResource.json
浏览文件 @
90138f50
...
@@ -60,6 +60,14 @@
...
@@ -60,6 +60,14 @@
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
,
{
,
{
"dename"
:
"WFProcessDefinition"
,
"delogicname"
:
"流程定义"
,
"sysmoudle"
:{
"id"
:
"WORKFLOW"
,
"name"
:
"workflow"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
"dename"
:
"SysRole"
,
"dename"
:
"SysRole"
,
"delogicname"
:
"系统角色"
,
"delogicname"
:
"系统角色"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
...
@@ -97,7 +105,7 @@
...
@@ -97,7 +105,7 @@
{
{
"appid"
:
"Web"
,
"appid"
:
"Web"
,
"appname"
:
"iBizRT"
,
"appname"
:
"iBizRT"
,
"appmenu"
:[{
"menuid"
:
"Index"
,
"menuname"
:
"Index"
,
"menuitem"
:[{
"id"
:
"menuitem1"
,
"name"
:
"单位管理"
},{
"id"
:
"menuitem2"
,
"name"
:
"部门管理"
},{
"id"
:
"menuitem3"
,
"name"
:
"人员管理"
},{
"id"
:
"menuitem4"
,
"name"
:
"用户角色"
},{
"id"
:
"menuitem5"
,
"name"
:
"流程角色"
}]
}]
"appmenu"
:[{
"menuid"
:
"Index"
,
"menuname"
:
"Index"
,
"menuitem"
:[{
"id"
:
"menuitem1"
,
"name"
:
"单位管理"
},{
"id"
:
"menuitem2"
,
"name"
:
"部门管理"
},{
"id"
:
"menuitem3"
,
"name"
:
"人员管理"
},{
"id"
:
"menuitem4"
,
"name"
:
"用户角色"
},{
"id"
:
"menuitem5"
,
"name"
:
"流程角色"
}
,{
"id"
:
"menuitem6"
,
"name"
:
"流程定义"
}
]
}]
}
}
]
]
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录