Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz人力资源
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz人力资源
提交
15e99894
提交
15e99894
编写于
8月 08, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
jackwang 部署微服务应用
上级
2b27c1a2
变更
23
隐藏空白字符变更
内嵌
并排
正在显示
23 个修改的文件
包含
2381 行增加
和
62 行删除
+2381
-62
view-config.json
app_PIM/public/assets/json/view-config.json
+10
-0
hremployee_en_US.ts
...src/locale/lanres/entities/hremployee/hremployee_en_US.ts
+13
-0
hremployee_zh_CN.ts
...src/locale/lanres/entities/hremployee/hremployee_zh_CN.ts
+13
-0
viewconfig.ts
app_PIM/src/mock/viewconfig/viewconfig.ts
+8
-0
hremployee-grid-view-base.tsx
...source/hremployee-grid-view/hremployee-grid-view-base.tsx
+1
-1
hremployee-tree-exp-view-base.tsx
...remployee-tree-exp-view/hremployee-tree-exp-view-base.tsx
+205
-0
hremployee-tree-exp-view.html
...ce/hremployee-tree-exp-view/hremployee-tree-exp-view.html
+19
-0
hremployee-tree-exp-view.vue
...rce/hremployee-tree-exp-view/hremployee-tree-exp-view.vue
+22
-0
page-register.ts
app_PIM/src/pages/ungroup/pim/page-register.ts
+4
-4
router.ts
app_PIM/src/pages/ungroup/pim/router.ts
+43
-43
state.ts
app_PIM/src/store/modules/view-action/state.ts
+12
-10
hremployee-ui-service-base.ts
...IM/src/uiservice/hremployee/hremployee-ui-service-base.ts
+1
-0
tree-001-treeview-base.tsx
...s/hremployee/tree-001-treeview/tree-001-treeview-base.tsx
+630
-0
tree-001-treeview-model.ts
...s/hremployee/tree-001-treeview/tree-001-treeview-model.ts
+139
-0
tree-001-treeview-service.ts
...hremployee/tree-001-treeview/tree-001-treeview-service.ts
+565
-0
tree-001-treeview.html
...dgets/hremployee/tree-001-treeview/tree-001-treeview.html
+47
-0
tree-001-treeview.vue
...idgets/hremployee/tree-001-treeview/tree-001-treeview.vue
+22
-0
tree-exp-viewtreeexpbar-treeexpbar-base.tsx
...ar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar-base.tsx
+410
-0
tree-exp-viewtreeexpbar-treeexpbar-model.ts
...ar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar-model.ts
+139
-0
tree-exp-viewtreeexpbar-treeexpbar-service.ts
...-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar-service.ts
+11
-0
tree-exp-viewtreeexpbar-treeexpbar.html
...expbar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar.html
+39
-0
tree-exp-viewtreeexpbar-treeexpbar.vue
...eexpbar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar.vue
+24
-0
h2_table.xml
humanresource-core/src/main/resources/liquibase/h2_table.xml
+4
-4
未找到文件。
app_PIM/public/assets/json/view-config.json
浏览文件 @
15e99894
...
...
@@ -619,6 +619,16 @@
"viewtag"
:
"b932c0eb66409c638c29ee27ba4fda37"
,
"memo"
:
"系统自动添加"
},
"hremployeetreeexpview"
:
{
"title"
:
"员工树导航编辑"
,
"caption"
:
"员工信息"
,
"viewtype"
:
"DETREEEXPVIEW"
,
"viewmodule"
:
"HumanResource"
,
"viewname"
:
"HREmployeeTreeExpView"
,
"viewfilename"
:
"hremployee-tree-exp-view"
,
"viewtag"
:
"ba512ad6a392dc170b1959cebd038fb8"
,
"memo"
:
""
},
"hrposttabexpview"
:
{
"title"
:
"职位"
,
"caption"
:
"职位"
,
...
...
app_PIM/src/locale/lanres/entities/hremployee/hremployee_en_US.ts
浏览文件 @
15e99894
...
...
@@ -58,6 +58,10 @@ export default {
caption
:
"员工"
,
title
:
"员工编辑视图"
,
},
treeexpview
:
{
caption
:
"员工信息"
,
title
:
"员工树导航编辑"
,
},
pickupview
:
{
caption
:
"员工"
,
title
:
"员工数据选择视图"
,
...
...
@@ -230,4 +234,13 @@ export default {
tip
:
"Remove {0}"
,
},
},
tree_001_treeview
:
{
nodes
:
{
root
:
"默认根节点"
,
tr0
:
"员工信息"
,
tr01
:
"分配信息"
,
},
uiactions
:
{
},
},
};
\ No newline at end of file
app_PIM/src/locale/lanres/entities/hremployee/hremployee_zh_CN.ts
浏览文件 @
15e99894
...
...
@@ -57,6 +57,10 @@ export default {
caption
:
"员工"
,
title
:
"员工编辑视图"
,
},
treeexpview
:
{
caption
:
"员工信息"
,
title
:
"员工树导航编辑"
,
},
pickupview
:
{
caption
:
"员工"
,
title
:
"员工数据选择视图"
,
...
...
@@ -229,4 +233,13 @@ export default {
tip
:
"删除"
,
},
},
tree_001_treeview
:
{
nodes
:
{
root
:
"默认根节点"
,
tr0
:
"员工信息"
,
tr01
:
"分配信息"
,
},
uiactions
:
{
},
},
};
\ No newline at end of file
app_PIM/src/mock/viewconfig/viewconfig.ts
浏览文件 @
15e99894
...
...
@@ -503,6 +503,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"HREmployeeEditView"
,
"viewtag"
:
"b932c0eb66409c638c29ee27ba4fda37"
},
"hremployeetreeexpview"
:
{
"title"
:
"员工树导航编辑"
,
"caption"
:
"员工信息"
,
"viewtype"
:
"DETREEEXPVIEW"
,
"viewmodule"
:
"HumanResource"
,
"viewname"
:
"HREmployeeTreeExpView"
,
"viewtag"
:
"ba512ad6a392dc170b1959cebd038fb8"
},
"hrposttabexpview"
:
{
"title"
:
"职位"
,
"caption"
:
"职位"
,
...
...
app_PIM/src/pages/human-resource/hremployee-grid-view/hremployee-grid-view-base.tsx
浏览文件 @
15e99894
...
...
@@ -598,7 +598,7 @@ export class HREmployeeGridViewBase extends GridViewBase {
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'hremployees'
,
parameterName
:
'hremployee'
},
{
pathName
:
'
listexpview'
,
parameterName
:
'list
expview'
},
{
pathName
:
'
treeexpview'
,
parameterName
:
'tree
expview'
},
];
const
_this
:
any
=
this
;
const
openIndexViewTab
=
(
data
:
any
)
=>
{
...
...
app_PIM/src/pages/human-resource/hremployee-tree-exp-view/hremployee-tree-exp-view-base.tsx
0 → 100644
浏览文件 @
15e99894
import
{
Subject
}
from
'rxjs'
;
import
{
TreeExpViewBase
}
from
'@/studio-core'
;
import
HREmployeeService
from
'@/service/hremployee/hremployee-service'
;
import
HREmployeeAuthService
from
'@/authservice/hremployee/hremployee-auth-service'
;
import
TreeExpViewEngine
from
'@engine/view/tree-exp-view-engine'
;
import
HREmployeeUIService
from
'@/uiservice/hremployee/hremployee-ui-service'
;
/**
* 员工树导航编辑视图基类
*
* @export
* @class HREmployeeTreeExpViewBase
* @extends {TreeExpViewBase}
*/
export
class
HREmployeeTreeExpViewBase
extends
TreeExpViewBase
{
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HREmployeeTreeExpViewBase
*/
protected
appDeName
:
string
=
'hremployee'
;
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HREmployeeTreeExpViewBase
*/
protected
appDeKey
:
string
=
'employeeid'
;
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HREmployeeTreeExpViewBase
*/
protected
appDeMajor
:
string
=
'employeename'
;
/**
* 实体服务对象
*
* @type {HREmployeeService}
* @memberof HREmployeeTreeExpViewBase
*/
protected
appEntityService
:
HREmployeeService
=
new
HREmployeeService
;
/**
* 实体权限服务对象
*
* @type HREmployeeUIService
* @memberof HREmployeeTreeExpViewBase
*/
public
appUIService
:
HREmployeeUIService
=
new
HREmployeeUIService
(
this
.
$store
);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HREmployeeTreeExpViewBase
*/
protected
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HREmployeeTreeExpViewBase
*/
protected
model
:
any
=
{
srfCaption
:
'entities.hremployee.views.treeexpview.caption'
,
srfTitle
:
'entities.hremployee.views.treeexpview.title'
,
srfSubTitle
:
'entities.hremployee.views.treeexpview.subtitle'
,
dataInfo
:
''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HREmployeeTreeExpViewBase
*/
protected
containerModel
:
any
=
{
view_treeexpbar
:
{
name
:
'treeexpbar'
,
type
:
'TREEEXPBAR'
},
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected
viewtag
:
string
=
'ba512ad6a392dc170b1959cebd038fb8'
;
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HREmployeeTreeExpViewBase
*/
public
engine
:
TreeExpViewEngine
=
new
TreeExpViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof HREmployeeTreeExpViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
treeexpbar
:
this
.
$refs
.
treeexpbar
,
keyPSDEField
:
'hremployee'
,
majorPSDEField
:
'employeename'
,
isLoadDefault
:
true
,
});
}
/**
* treeexpbar 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HREmployeeTreeExpViewBase
*/
public
treeexpbar_selectionchange
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'treeexpbar'
,
'selectionchange'
,
$event
);
}
/**
* treeexpbar 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HREmployeeTreeExpViewBase
*/
public
treeexpbar_activated
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'treeexpbar'
,
'activated'
,
$event
);
}
/**
* treeexpbar 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HREmployeeTreeExpViewBase
*/
public
treeexpbar_load
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'treeexpbar'
,
'load'
,
$event
);
}
/**
* 打开新建数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HREmployeeTreeExpView
*/
public
newdata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
let
localContext
:
any
=
null
;
let
localViewParam
:
any
=
null
;
this
.
$Notice
.
warning
({
title
:
'错误'
,
desc
:
'未指定关系视图'
});
}
/**
* 打开编辑数据视图
*
* @param {any[]} args
* @param {*} [params]
* @param {*} [fullargs]
* @param {*} [$event]
* @param {*} [xData]
* @memberof HREmployeeTreeExpView
*/
public
opendata
(
args
:
any
[],
fullargs
?:
any
[],
params
?:
any
,
$event
?:
any
,
xData
?:
any
)
{
this
.
$Notice
.
warning
({
title
:
'错误'
,
desc
:
'未指定关系视图'
});
}
/**
* 视图唯一标识
*
* @type {string}
* @memberof HREmployeeTreeExpView
*/
public
viewUID
:
string
=
'human-resource-hremployee-tree-exp-view'
;
}
\ No newline at end of file
app_PIM/src/pages/human-resource/hremployee-tree-exp-view/hremployee-tree-exp-view.html
0 → 100644
浏览文件 @
15e99894
<studio-view-style2
viewName=
"hremployeetreeexpview"
viewTitle=
"员工树导航编辑"
class=
'detreeexpview hremployee-tree-exp-view'
>
<template
slot=
'title'
>
<span
class=
'caption-info'
>
{{$t(model.srfTitle)}}
</span>
</template>
<view
_treeexpbar
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:viewUID=
"viewUID"
:newdata=
"newdata"
:opendata=
"opendata"
name=
"treeexpbar"
ref=
'treeexpbar'
@
selectionchange=
"treeexpbar_selectionchange($event)"
@
activated=
"treeexpbar_activated($event)"
@
load=
"treeexpbar_load($event)"
@
closeview=
"closeView($event)"
>
</view
_treeexpbar
>
</studio-view-style2>
\ No newline at end of file
app_PIM/src/pages/human-resource/hremployee-tree-exp-view/hremployee-tree-exp-view.vue
0 → 100644
浏览文件 @
15e99894
<
template
src=
"./hremployee-tree-exp-view.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HREmployeeTreeExpViewBase } from './hremployee-tree-exp-view-base';
import view_treeexpbar from '@widgets/hremployee/tree-exp-viewtreeexpbar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar.vue';
/**
* 员工树导航编辑视图
*
* @export
* @class HREmployeeTreeExpView
* @extends {HREmployeeTreeExpViewBase}
*/
@Component({
components: {
view_treeexpbar,
}
})
@VueLifeCycleProcessing()
export default class HREmployeeTreeExpView extends HREmployeeTreeExpViewBase { }
</script>
app_PIM/src/pages/ungroup/pim/page-register.ts
浏览文件 @
15e99894
export
const
PageComponents
=
{
install
(
Vue
:
any
,
opt
:
any
)
{
Vue
.
component
(
'hr
employee-pickup-view'
,
()
=>
import
(
'@pages/human-resource/hremployee-pickup-view/hremployee-pickup-view
.vue'
));
Vue
.
component
(
'hr
post-v-004'
,
()
=>
import
(
'@pages/human-resource/hrpost-v-004/hrpost-v-004
.vue'
));
Vue
.
component
(
'hr
post-v-004'
,
()
=>
import
(
'@pages/human-resource/hrpost-v-004/hrpost-v-004
.vue'
));
Vue
.
component
(
'hr
employee-pickup-view'
,
()
=>
import
(
'@pages/human-resource/hremployee-pickup-view/hremployee-pickup-view
.vue'
));
Vue
.
component
(
'hroperation-unit-edit-view'
,
()
=>
import
(
'@pages/base/hroperation-unit-edit-view/hroperation-unit-edit-view.vue'
));
Vue
.
component
(
'hrpost-grid-view'
,
()
=>
import
(
'@pages/human-resource/hrpost-grid-view/hrpost-grid-view.vue'
));
Vue
.
component
(
'hrduty-v-001'
,
()
=>
import
(
'@pages/human-resource/hrduty-v-001/hrduty-v-001.vue'
));
...
...
@@ -21,6 +21,7 @@ export const PageComponents = {
Vue
.
component
(
'hrduty-cert-grid-view'
,
()
=>
import
(
'@pages/human-resource/hrduty-cert-grid-view/hrduty-cert-grid-view.vue'
));
Vue
.
component
(
'hrduty-skill-v-002'
,
()
=>
import
(
'@pages/human-resource/hrduty-skill-v-002/hrduty-skill-v-002.vue'
));
Vue
.
component
(
'hrpost-rel-v-002'
,
()
=>
import
(
'@pages/human-resource/hrpost-rel-v-002/hrpost-rel-v-002.vue'
));
Vue
.
component
(
'hremployee-tree-exp-view'
,
()
=>
import
(
'@pages/human-resource/hremployee-tree-exp-view/hremployee-tree-exp-view.vue'
));
Vue
.
component
(
'hremployee-pickup-grid-view'
,
()
=>
import
(
'@pages/human-resource/hremployee-pickup-grid-view/hremployee-pickup-grid-view.vue'
));
Vue
.
component
(
'hrorganization-pickup-view'
,
()
=>
import
(
'@pages/base/hrorganization-pickup-view/hrorganization-pickup-view.vue'
));
Vue
.
component
(
'hromhierarchy-cat-dashboard-view'
,
()
=>
import
(
'@pages/base/hromhierarchy-cat-dashboard-view/hromhierarchy-cat-dashboard-view.vue'
));
...
...
@@ -39,7 +40,6 @@ export const PageComponents = {
Vue
.
component
(
'hrlegal-v-001'
,
()
=>
import
(
'@pages/base/hrlegal-v-001/hrlegal-v-001.vue'
));
Vue
.
component
(
'hrpost-pickup-grid-view'
,
()
=>
import
(
'@pages/human-resource/hrpost-pickup-grid-view/hrpost-pickup-grid-view.vue'
));
Vue
.
component
(
'hrduty-skill-grid-view'
,
()
=>
import
(
'@pages/human-resource/hrduty-skill-grid-view/hrduty-skill-grid-view.vue'
));
Vue
.
component
(
'hremployee-list-exp-view'
,
()
=>
import
(
'@pages/human-resource/hremployee-list-exp-view/hremployee-list-exp-view.vue'
));
Vue
.
component
(
'hrduty-edu-v-001'
,
()
=>
import
(
'@pages/human-resource/hrduty-edu-v-001/hrduty-edu-v-001.vue'
));
Vue
.
component
(
'hrpost-dashboard-view'
,
()
=>
import
(
'@pages/human-resource/hrpost-dashboard-view/hrpost-dashboard-view.vue'
));
Vue
.
component
(
'hrorg-address-edit-view'
,
()
=>
import
(
'@pages/base/hrorg-address-edit-view/hrorg-address-edit-view.vue'
));
...
...
@@ -61,9 +61,9 @@ export const PageComponents = {
Vue
.
component
(
'hrpost-v-005'
,
()
=>
import
(
'@pages/human-resource/hrpost-v-005/hrpost-v-005.vue'
));
Vue
.
component
(
'hrlegal-edit-view'
,
()
=>
import
(
'@pages/base/hrlegal-edit-view/hrlegal-edit-view.vue'
));
Vue
.
component
(
'hromhierarchy-edit-view'
,
()
=>
import
(
'@pages/base/hromhierarchy-edit-view/hromhierarchy-edit-view.vue'
));
Vue
.
component
(
'hrpost-rel-grid-view'
,
()
=>
import
(
'@pages/human-resource/hrpost-rel-grid-view/hrpost-rel-grid-view.vue'
));
Vue
.
component
(
'hrorganization-grid-view'
,
()
=>
import
(
'@pages/base/hrorganization-grid-view/hrorganization-grid-view.vue'
));
Vue
.
component
(
'hrduty-pickup-view'
,
()
=>
import
(
'@pages/human-resource/hrduty-pickup-view/hrduty-pickup-view.vue'
));
Vue
.
component
(
'hrpost-rel-grid-view'
,
()
=>
import
(
'@pages/human-resource/hrpost-rel-grid-view/hrpost-rel-grid-view.vue'
));
Vue
.
component
(
'hromhierarchy-cat-edit-view'
,
()
=>
import
(
'@pages/base/hromhierarchy-cat-edit-view/hromhierarchy-cat-edit-view.vue'
));
Vue
.
component
(
'hrorg-contact-edit-view'
,
()
=>
import
(
'@pages/base/hrorg-contact-edit-view/hrorg-contact-edit-view.vue'
));
Vue
.
component
(
'hromhierarchy-cat-v-002'
,
()
=>
import
(
'@pages/base/hromhierarchy-cat-v-002/hromhierarchy-cat-v-002.vue'
));
...
...
app_PIM/src/pages/ungroup/pim/router.ts
浏览文件 @
15e99894
...
...
@@ -44,32 +44,32 @@ const router = new Router({
component
:
()
=>
import
(
'@pages/ungroup/pim/pim.vue'
),
children
:
[
{
path
:
'hr
employees/:hremployee?/pickupview/:pickupview
?'
,
path
:
'hr
posts/:hrpost?/v_004/:v_004
?'
,
meta
:
{
caption
:
'entities.hr
employee.views.pickupview
.title'
,
caption
:
'entities.hr
post.views.v_004
.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'pim'
,
parameterName
:
'pim'
},
{
pathName
:
'hr
employees'
,
parameterName
:
'hremployee
'
},
{
pathName
:
'
pickupview'
,
parameterName
:
'pickupview
'
},
{
pathName
:
'hr
posts'
,
parameterName
:
'hrpost
'
},
{
pathName
:
'
v_004'
,
parameterName
:
'v_004
'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/human-resource/hr
employee-pickup-view/hremployee-pickup-view
.vue'
),
component
:
()
=>
import
(
'@pages/human-resource/hr
post-v-004/hrpost-v-004
.vue'
),
},
{
path
:
'hr
posts/:hrpost?/v_004/:v_004
?'
,
path
:
'hr
employees/:hremployee?/pickupview/:pickupview
?'
,
meta
:
{
caption
:
'entities.hr
post.views.v_004
.title'
,
caption
:
'entities.hr
employee.views.pickupview
.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'pim'
,
parameterName
:
'pim'
},
{
pathName
:
'hr
posts'
,
parameterName
:
'hrpost
'
},
{
pathName
:
'
v_004'
,
parameterName
:
'v_004
'
},
{
pathName
:
'hr
employees'
,
parameterName
:
'hremployee
'
},
{
pathName
:
'
pickupview'
,
parameterName
:
'pickupview
'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/human-resource/hr
post-v-004/hrpost-v-004
.vue'
),
component
:
()
=>
import
(
'@pages/human-resource/hr
employee-pickup-view/hremployee-pickup-view
.vue'
),
},
{
path
:
'hroperationunits/:hroperationunit?/editview/:editview?'
,
...
...
@@ -517,6 +517,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/human-resource/hrpost-rel-v-002/hrpost-rel-v-002.vue'
),
},
{
path
:
'hremployees/:hremployee?/treeexpview/:treeexpview?'
,
meta
:
{
caption
:
'entities.hremployee.views.treeexpview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'pim'
,
parameterName
:
'pim'
},
{
pathName
:
'hremployees'
,
parameterName
:
'hremployee'
},
{
pathName
:
'treeexpview'
,
parameterName
:
'treeexpview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/human-resource/hremployee-tree-exp-view/hremployee-tree-exp-view.vue'
),
},
{
path
:
'hremployees/:hremployee?/pickupgridview/:pickupgridview?'
,
meta
:
{
...
...
@@ -859,20 +873,6 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/human-resource/hrduty-skill-grid-view/hrduty-skill-grid-view.vue'
),
},
{
path
:
'hremployees/:hremployee?/listexpview/:listexpview?'
,
meta
:
{
caption
:
'entities.hremployee.views.listexpview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'pim'
,
parameterName
:
'pim'
},
{
pathName
:
'hremployees'
,
parameterName
:
'hremployee'
},
{
pathName
:
'listexpview'
,
parameterName
:
'listexpview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/human-resource/hremployee-list-exp-view/hremployee-list-exp-view.vue'
),
},
{
path
:
'hrduties/:hrduty?/hrdutyedus/:hrdutyedu?/v_001/:v_001?'
,
meta
:
{
...
...
@@ -1288,61 +1288,61 @@ const router = new Router({
component
:
()
=>
import
(
'@pages/base/hromhierarchy-edit-view/hromhierarchy-edit-view.vue'
),
},
{
path
:
'hr
organizations/:hrorganization
?/gridview/:gridview?'
,
path
:
'hr
posts/:hrpost?/hrpostrels/:hrpostrel
?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.hr
organization
.views.gridview.title'
,
caption
:
'entities.hr
postrel
.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'pim'
,
parameterName
:
'pim'
},
{
pathName
:
'hrorganizations'
,
parameterName
:
'hrorganization'
},
{
pathName
:
'hrposts'
,
parameterName
:
'hrpost'
},
{
pathName
:
'hrpostrels'
,
parameterName
:
'hrpostrel'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/
base/hrorganization-grid-view/hrorganization
-grid-view.vue'
),
component
:
()
=>
import
(
'@pages/
human-resource/hrpost-rel-grid-view/hrpost-rel
-grid-view.vue'
),
},
{
path
:
'hr
duties/:hrduty?/pickupview/:pickup
view?'
,
path
:
'hr
postrels/:hrpostrel?/gridview/:grid
view?'
,
meta
:
{
caption
:
'entities.hr
duty.views.pickup
view.title'
,
caption
:
'entities.hr
postrel.views.grid
view.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'pim'
,
parameterName
:
'pim'
},
{
pathName
:
'hr
duties'
,
parameterName
:
'hrduty
'
},
{
pathName
:
'
pickupview'
,
parameterName
:
'pickup
view'
},
{
pathName
:
'hr
postrels'
,
parameterName
:
'hrpostrel
'
},
{
pathName
:
'
gridview'
,
parameterName
:
'grid
view'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/human-resource/hr
duty-pickup-view/hrduty-pickup
-view.vue'
),
component
:
()
=>
import
(
'@pages/human-resource/hr
post-rel-grid-view/hrpost-rel-grid
-view.vue'
),
},
{
path
:
'hr
posts/:hrpost?/hrpostrels/:hrpostrel
?/gridview/:gridview?'
,
path
:
'hr
organizations/:hrorganization
?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.hr
postrel
.views.gridview.title'
,
caption
:
'entities.hr
organization
.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'pim'
,
parameterName
:
'pim'
},
{
pathName
:
'hrposts'
,
parameterName
:
'hrpost'
},
{
pathName
:
'hrpostrels'
,
parameterName
:
'hrpostrel'
},
{
pathName
:
'hrorganizations'
,
parameterName
:
'hrorganization'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/
human-resource/hrpost-rel-grid-view/hrpost-rel
-grid-view.vue'
),
component
:
()
=>
import
(
'@pages/
base/hrorganization-grid-view/hrorganization
-grid-view.vue'
),
},
{
path
:
'hr
postrels/:hrpostrel?/gridview/:grid
view?'
,
path
:
'hr
duties/:hrduty?/pickupview/:pickup
view?'
,
meta
:
{
caption
:
'entities.hr
postrel.views.grid
view.title'
,
caption
:
'entities.hr
duty.views.pickup
view.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'pim'
,
parameterName
:
'pim'
},
{
pathName
:
'hr
postrels'
,
parameterName
:
'hrpostrel
'
},
{
pathName
:
'
gridview'
,
parameterName
:
'grid
view'
},
{
pathName
:
'hr
duties'
,
parameterName
:
'hrduty
'
},
{
pathName
:
'
pickupview'
,
parameterName
:
'pickup
view'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/human-resource/hr
post-rel-grid-view/hrpost-rel-grid
-view.vue'
),
component
:
()
=>
import
(
'@pages/human-resource/hr
duty-pickup-view/hrduty-pickup
-view.vue'
),
},
{
path
:
'hromhierarchycats/:hromhierarchycat?/editview/:editview?'
,
...
...
app_PIM/src/store/modules/view-action/state.ts
浏览文件 @
15e99894
...
...
@@ -465,15 +465,6 @@ export const viewstate: any = {
refviews
:
[
],
},
{
viewtag
:
'92826c47e3d2b905845fe1ad5c30be62'
,
viewmodule
:
'HumanResource'
,
viewname
:
'HREmployeeListExpView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
viewtag
:
'9420eeffff765c2a6e4ac27dfae7fb2d'
,
viewmodule
:
'Base'
,
...
...
@@ -492,8 +483,8 @@ export const viewstate: any = {
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'ba512ad6a392dc170b1959cebd038fb8'
,
'b932c0eb66409c638c29ee27ba4fda37'
,
'92826c47e3d2b905845fe1ad5c30be62'
,
],
},
{
...
...
@@ -589,6 +580,17 @@ export const viewstate: any = {
'e7ba37699bd458dc8dd5c02abac8dadd'
,
],
},
{
viewtag
:
'ba512ad6a392dc170b1959cebd038fb8'
,
viewmodule
:
'HumanResource'
,
viewname
:
'HREmployeeTreeExpView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'6395cba44e6d6151f19e543b55d88845'
,
'b932c0eb66409c638c29ee27ba4fda37'
,
],
},
{
viewtag
:
'bae1de77dc5bd2584e2dcf7201a06495'
,
viewmodule
:
'HumanResource'
,
...
...
app_PIM/src/uiservice/hremployee/hremployee-ui-service-base.ts
浏览文件 @
15e99894
...
...
@@ -93,6 +93,7 @@ export default class HREmployeeUIServiceBase extends UIService {
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'listexpview'
,
srfappde
:
'hremployees'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'hremployees'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'hremployees'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'treeexpview'
,
srfappde
:
'hremployees'
});
this
.
allViewMap
.
set
(
'PICKUPVIEW:'
,{
viewname
:
'pickupview'
,
srfappde
:
'hremployees'
});
}
...
...
app_PIM/src/widgets/hremployee/tree-001-treeview/tree-001-treeview-base.tsx
0 → 100644
浏览文件 @
15e99894
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
MainControlBase
}
from
'@/studio-core'
;
import
HREmployeeService
from
'@/service/hremployee/hremployee-service'
;
import
TREE_001Service
from
'./tree-001-treeview-service'
;
import
HREmployeeUIService
from
'@/uiservice/hremployee/hremployee-ui-service'
;
/**
* treeexpbar_tree部件基类
*
* @export
* @class MainControlBase
* @extends {TREE_001TreeBase}
*/
export
class
TREE_001TreeBase
extends
MainControlBase
{
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof TREE_001TreeBase
*/
protected
controlType
:
string
=
'TREEVIEW'
;
/**
* 建构部件服务对象
*
* @type {TREE_001Service}
* @memberof TREE_001TreeBase
*/
public
service
:
TREE_001Service
=
new
TREE_001Service
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {HREmployeeService}
* @memberof TREE_001TreeBase
*/
public
appEntityService
:
HREmployeeService
=
new
HREmployeeService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof TREE_001TreeBase
*/
protected
appDeName
:
string
=
'hremployee'
;
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof TREE_001TreeBase
*/
protected
appDeLogicName
:
string
=
'员工'
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof TREE_001Base
*/
public
getDatas
():
any
[]
{
return
[
this
.
currentselectedNode
];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof TREE_001Base
*/
public
getData
():
any
{
return
this
.
currentselectedNode
;
}
/**
* 是否单选
*
* @type {boolean}
* @memberof TREE_001Base
*/
@
Prop
({
default
:
true
})
public
isSingleSelect
!
:
boolean
;
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof TREE_001Base
*/
@
Prop
({
default
:
false
})
public
isSelectFirstDefault
!
:
boolean
;
/**
* 枝干节点是否可用(具有数据能力,可抛出)
*
* @type {string}
* @memberof TREE_001Base
*/
@
Prop
({
default
:
true
})
public
isBranchAvailable
!
:
boolean
;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof TREE_001Base
*/
@
Prop
({
default
:
true
})
public
showBusyIndicator
?:
boolean
;
/**
* 初始化完成
*
* @type {boolean}
* @memberof TREE_001Base
*/
public
inited
:
boolean
=
false
;
/**
* 已选中数据集合
*
* @type {*}
* @memberof TREE_001Base
*/
public
selectedNodes
:
any
=
[];
/**
* 当前选中数据项
*
* @type {*}
* @memberof TREE_001Base
*/
public
currentselectedNode
:
any
=
{};
/**
* 选中数据字符串
*
* @type {string}
* @memberof TREE_001Base
*/
@
Prop
()
public
selectedData
?:
string
;
/**
* 选中值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof TREE_001Base
*/
@
Watch
(
'selectedData'
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
echoselectedNodes
=
newVal
?
this
.
isSingleSelect
?
JSON
.
parse
(
newVal
)[
0
]
:
JSON
.
parse
(
newVal
)
:
[];
this
.
selectedNodes
=
[];
if
(
this
.
echoselectedNodes
.
length
>
0
){
let
AllnodesObj
=
(
this
.
$refs
.
treeexpbar_tree
as
any
).
store
.
nodesMap
;
let
AllnodesArray
:
any
[]
=
[];
for
(
const
key
in
AllnodesObj
)
{
if
(
AllnodesObj
.
hasOwnProperty
(
key
))
{
AllnodesArray
.
push
(
AllnodesObj
[
key
].
data
);
}
}
this
.
setDefaultSelection
(
AllnodesArray
);
}
}
/**
* 回显选中数据集合
*
* @type {*}
* @memberof TREE_001Base
*/
public
echoselectedNodes
:
any
[]
=
this
.
selectedData
?
(
this
.
isSingleSelect
?
[
JSON
.
parse
(
this
.
selectedData
)[
0
]]
:
JSON
.
parse
(
this
.
selectedData
))
:
[];
/**
* 部件行为--update
*
* @type {string}
* @memberof TREE_001Base
*/
@
Prop
()
public
updateAction
!
:
string
;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof TREE_001Base
*/
@
Prop
()
public
fetchAction
!
:
string
;
/**
* 部件行为--remove
*
* @type {string}
* @memberof TREE_001Base
*/
@
Prop
()
public
removeAction
!
:
string
;
/**
* 部件行为--load
*
* @type {string}
* @memberof TREE_001Base
*/
@
Prop
()
public
loadAction
!
:
string
;
/**
* 部件行为--create
*
* @type {string}
* @memberof TREE_001Base
*/
@
Prop
()
public
createAction
!
:
string
;
/**
* 过滤属性
*
* @type {string}
* @memberof TREE_001Base
*/
public
srfnodefilter
:
string
=
''
;
/**
* 默认输出图标
*
* @type {boolean}
* @memberof TREE_001Base
*/
public
isOutputIconDefault
:
boolean
=
true
;
/**
* 数据展开主键
*
* @type {string[]}
* @memberof TREE_001Base
*/
@
Provide
()
public
expandedKeys
:
string
[]
=
[];
/**
* 选中数据变更事件
*
* @public
* @param {*} data
* @param {*} data 当前节点对应传入对象
* @param {*} checkedState 树目前选中状态对象
* @memberof TREE_001Base
*/
public
onCheck
(
data
:
any
,
checkedState
:
any
)
{
// 处理多选数据
if
(
!
this
.
isSingleSelect
){
let
leafNodes
=
checkedState
.
checkedNodes
.
filter
((
item
:
any
)
=>
item
.
leaf
);
this
.
selectedNodes
=
JSON
.
parse
(
JSON
.
stringify
(
leafNodes
));
this
.
$emit
(
'selectionchange'
,
this
.
selectedNodes
);
}
}
/**
* 选中数据变更事件
*
* @public
* @param {*} data 节点对应传入对象
* @param {*} node 节点对应node对象
* @memberof TREE_001Base
*/
public
selectionChange
(
data
:
any
,
node
:
any
)
{
// 禁用项处理
if
(
data
.
disabled
){
node
.
isCurrent
=
false
;
return
;
}
// 只处理最底层子节点
if
(
this
.
isBranchAvailable
||
data
.
leaf
){
this
.
currentselectedNode
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 单选直接替换
if
(
this
.
isSingleSelect
){
this
.
selectedNodes
=
[
this
.
currentselectedNode
];
this
.
$emit
(
'selectionchange'
,
this
.
selectedNodes
);
}
// 多选用check方法
}
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof TREE_001Base
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof TREE_001Base
*/
public
afterCreated
(){
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
inited
=
false
;
this
.
$nextTick
(()
=>
{
this
.
inited
=
true
;
});
}
if
(
Object
.
is
(
'filter'
,
action
))
{
this
.
srfnodefilter
=
data
.
srfnodefilter
;
this
.
refresh_all
();
}
if
(
Object
.
is
(
'refresh_parent'
,
action
))
{
this
.
refresh_parent
();
}
});
}
}
/**
* 对树节点进行筛选操作
* @memberof OrderTree
*/
public
filterNode
(
value
:
any
,
data
:
any
)
{
if
(
!
value
)
return
true
;
return
data
.
text
.
indexOf
(
value
)
!==
-
1
;
}
/**
* vue 生命周期
*
* @memberof TREE_001Base
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof TREE_001Base
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
/**
* 刷新数据
*
* @memberof TREE_001Base
*/
public
refresh_all
():
void
{
this
.
inited
=
false
;
this
.
$nextTick
(()
=>
{
this
.
inited
=
true
;
});
}
/**
* 刷新父节点
*
* @memberof TREE_001Base
*/
public
refresh_parent
():
void
{
if
(
Object
.
keys
(
this
.
currentselectedNode
).
length
===
0
)
{
return
;
}
const
tree
:
any
=
this
.
$refs
.
treeexpbar_tree
;
const
node
:
any
=
tree
.
getNode
(
this
.
currentselectedNode
.
id
);
if
(
!
node
||
!
node
.
parent
)
{
return
;
}
let
curNode
:
any
=
{};
const
{
parent
:
_parent
}
=
node
;
curNode
=
this
.
$util
.
deepObjectMerge
(
curNode
,
_parent
);
let
tempContext
:
any
=
{};
if
(
curNode
.
data
&&
curNode
.
data
.
srfappctx
){
Object
.
assign
(
tempContext
,
curNode
.
data
.
srfappctx
);
}
else
{
Object
.
assign
(
tempContext
,
this
.
context
);
}
const
id
:
string
=
_parent
.
key
?
_parent
.
key
:
'#'
;
const
param
:
any
=
{
srfnodeid
:
id
};
this
.
refresh_node
(
tempContext
,
param
,
true
);
}
/**
* 数据加载
*
* @param {*} node
* @memberof TREE_001Base
*/
public
load
(
node
:
any
=
{},
resolve
?:
any
)
{
if
(
node
.
data
&&
node
.
data
.
children
)
{
resolve
(
node
.
data
.
children
);
return
;
}
const
params
:
any
=
{
srfnodeid
:
node
.
data
&&
node
.
data
.
id
?
node
.
data
.
id
:
"#"
,
srfnodefilter
:
this
.
srfnodefilter
};
let
tempViewParams
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
));
let
curNode
:
any
=
{};
curNode
=
this
.
$util
.
deepObjectMerge
(
curNode
,
node
);
let
tempContext
:
any
=
this
.
computecurNodeContext
(
curNode
);
if
(
curNode
.
data
&&
curNode
.
data
.
srfparentdename
){
Object
.
assign
(
tempContext
,{
srfparentdename
:
curNode
.
data
.
srfparentdename
});
Object
.
assign
(
tempViewParams
,{
srfparentdename
:
curNode
.
data
.
srfparentdename
});
}
if
(
curNode
.
data
&&
curNode
.
data
.
srfparentkey
){
Object
.
assign
(
tempContext
,{
srfparentkey
:
curNode
.
data
.
srfparentkey
});
Object
.
assign
(
tempViewParams
,{
srfparentkey
:
curNode
.
data
.
srfparentkey
});
}
Object
.
assign
(
params
,{
viewparams
:
tempViewParams
});
this
.
service
.
getNodes
(
tempContext
,
params
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
info
});
resolve
([]);
return
;
}
const
_items
=
response
.
data
;
this
.
formatExpanded
(
_items
);
resolve
([...
_items
]);
let
isRoot
=
Object
.
is
(
node
.
level
,
0
);
let
isSelectedAll
=
node
.
checked
;
this
.
setDefaultSelection
(
_items
,
isRoot
,
isSelectedAll
);
this
.
$emit
(
"load"
,
_items
);
}).
catch
((
response
:
any
)
=>
{
resolve
([]);
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
info
});
});
}
/**
* 计算当前节点的上下文
*
* @param {*} curNode 当前节点
* @memberof TREE_001Base
*/
public
computecurNodeContext
(
curNode
:
any
){
let
tempContext
:
any
=
{};
if
(
curNode
&&
curNode
.
data
&&
curNode
.
data
.
srfappctx
){
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
curNode
.
data
.
srfappctx
));
}
else
{
tempContext
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
}
return
tempContext
;
}
/**
* 刷新功能
*
* @param {any[]} args
* @memberof TREE_001Base
*/
public
refresh
(
args
:
any
[]):
void
{
this
.
refresh_all
();
}
/**
* 刷新节点
*
* @public
* @param {*} [curContext] 当前节点上下文
* @param {*} [arg={}] 当前节点附加参数
* @param {boolean} parentnode 是否是刷新父节点
* @memberof TREE_001Base
*/
public
refresh_node
(
curContext
:
any
,
arg
:
any
=
{},
parentnode
:
boolean
):
void
{
const
{
srfnodeid
:
id
}
=
arg
;
Object
.
assign
(
arg
,{
viewparams
:
this
.
viewparams
});
const
get
:
Promise
<
any
>
=
this
.
service
.
getNodes
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
);
get
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
info
});
return
;
}
const
_items
=
[...
response
.
data
];
this
.
formatExpanded
(
_items
);
const
tree
:
any
=
this
.
$refs
.
treeexpbar_tree
;
tree
.
updateKeyChildren
(
id
,
_items
);
if
(
parentnode
)
{
this
.
currentselectedNode
=
{};
}
this
.
setDefaultSelection
(
_items
);
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
info
});
});
}
/**
* 默认展开节点
*
* @public
* @param {any[]} items
* @returns {any[]}
* @memberof TREE_001Base
*/
public
formatExpanded
(
items
:
any
[]):
any
[]
{
const
data
:
any
[]
=
[];
items
.
forEach
((
item
)
=>
{
if
(
item
.
expanded
||
(
item
.
children
&&
item
.
children
.
length
>
0
))
{
this
.
expandedKeys
.
push
(
item
.
id
);
}
});
return
data
;
}
/**
* 设置默认选中,回显数项,选中所有子节点
*
* @param {any[]} items 当前节点所有子节点集合
* @param {boolean} isRoot 是否是加载根节点
* @param {boolean} isSelectedAll 是否选中所有子节点
* @memberof TREE_001Base
*/
public
setDefaultSelection
(
items
:
any
[],
isRoot
:
boolean
=
false
,
isSelectedAll
:
boolean
=
false
):
void
{
if
(
items
.
length
==
0
){
return
;
}
let
defaultData
:
any
;
// 导航中选中第一条配置的默认选中,没有选中第一条
if
(
this
.
isSelectFirstDefault
){
if
(
this
.
isSingleSelect
){
let
index
=
items
.
findIndex
((
item
:
any
)
=>
item
.
selected
);
if
(
index
===
-
1
)
{
if
(
isRoot
){
index
=
0
;
}
else
{
return
;
}
}
defaultData
=
items
[
index
];
this
.
setTreeNodeHighLight
(
defaultData
);
this
.
currentselectedNode
=
JSON
.
parse
(
JSON
.
stringify
(
defaultData
));
if
(
this
.
isBranchAvailable
||
defaultData
.
leaf
){
this
.
selectedNodes
=
[
this
.
currentselectedNode
];
this
.
$emit
(
'selectionchange'
,
this
.
selectedNodes
);
}
}
}
// 已选数据的回显
if
(
this
.
echoselectedNodes
&&
this
.
echoselectedNodes
.
length
>
0
){
let
checkedNodes
=
items
.
filter
((
item
:
any
)
=>
{
return
this
.
echoselectedNodes
.
some
((
val
:
any
)
=>
{
if
(
Object
.
is
(
item
.
srfkey
,
val
.
srfkey
)
&&
Object
.
is
(
item
.
srfmajortext
,
val
.
srfmajortext
)){
val
.
used
=
true
;
return
true
;
}
});
});
if
(
checkedNodes
.
length
>
0
){
this
.
echoselectedNodes
=
this
.
echoselectedNodes
.
filter
((
item
:
any
)
=>
!
item
.
used
);
// 父节点选中时,不需要执行这段,会选中所有子节点
if
(
!
isSelectedAll
){
if
(
this
.
isSingleSelect
){
this
.
setTreeNodeHighLight
(
checkedNodes
[
0
]);
this
.
currentselectedNode
=
JSON
.
parse
(
JSON
.
stringify
(
checkedNodes
[
0
]));
this
.
selectedNodes
=
[
this
.
currentselectedNode
];
}
else
{
this
.
selectedNodes
=
this
.
selectedNodes
.
concat
(
checkedNodes
);
const
tree
:
any
=
this
.
$refs
.
treeexpbar_tree
;
tree
.
setCheckedNodes
(
this
.
selectedNodes
);
}
}
}
}
// 父节点选中时,选中所有子节点
if
(
isSelectedAll
){
let
leafNodes
=
items
.
filter
((
item
:
any
)
=>
item
.
leaf
);
this
.
selectedNodes
=
this
.
selectedNodes
.
concat
(
leafNodes
);
this
.
$emit
(
'selectionchange'
,
this
.
selectedNodes
);
}
}
/**
* 绘制右击菜单
*
* @param {*} node
* @returns
* @memberof TREE_001Base
*/
public
renderContextMenu
(
node
:
any
)
{
let
content
;
if
(
node
&&
node
.
data
)
{
const
data
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
node
.
data
));
this
.
currentselectedNode
=
{
...
data
};
const
tags
:
string
[]
=
data
.
id
.
split
(
';'
);
}
return
content
;
}
/**
* 设置选中高亮
*
* @param {*} data
* @memberof TREE_001Base
*/
public
setTreeNodeHighLight
(
data
:
any
):
void
{
const
tree
:
any
=
this
.
$refs
.
treeexpbar_tree
;
tree
.
setCurrentKey
(
data
.
id
);
}
/**
* 执行默认界面行为
*
* @param {*} node
* @memberof TREE_001Base
*/
public
doDefaultAction
(
node
:
any
)
{
if
(
node
&&
node
.
data
)
{
const
data
:
any
=
node
.
data
;
const
tags
:
string
[]
=
data
.
id
.
split
(
';'
);
}
this
.
$emit
(
'nodedblclick'
,
this
.
selectedNodes
);
}
}
\ No newline at end of file
app_PIM/src/widgets/hremployee/tree-001-treeview/tree-001-treeview-model.ts
0 → 100644
浏览文件 @
15e99894
/**
* TREE_001 部件模型
*
* @export
* @class TREE_001Model
*/
export
default
class
TREE_001Model
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof TREE_001Model
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'employeename'
,
},
{
name
:
'updateman'
,
},
{
name
:
'createman'
,
},
{
name
:
'hremployee'
,
prop
:
'employeeid'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'createdate'
,
},
{
name
:
'organizationid'
,
},
{
name
:
'employeecode'
,
},
{
name
:
'certtype'
,
},
{
name
:
'certnum'
,
},
{
name
:
'birthday'
,
},
{
name
:
'age'
,
},
{
name
:
'organizationname'
,
},
{
name
:
'sex'
,
},
{
name
:
'bloodtype'
,
},
{
name
:
'telephone'
,
},
{
name
:
'mobile'
,
},
{
name
:
'email'
,
},
{
name
:
'marriage'
,
},
{
name
:
'nation'
,
},
{
name
:
'nativetype'
,
},
{
name
:
'nativeaddress'
,
},
{
name
:
'birthaddress'
,
},
{
name
:
'postaladdress'
,
},
{
name
:
'hobby'
,
},
{
name
:
'health'
,
},
{
name
:
'political'
,
},
{
name
:
'startworktime'
,
},
{
name
:
'startorgtime'
,
},
{
name
:
'photo'
,
},
{
name
:
'firstdegree'
,
},
{
name
:
'highestdegree'
,
},
{
name
:
'technicaltitle'
,
},
{
name
:
'certificates'
,
},
{
name
:
'entrytype'
,
},
{
name
:
'politicaltime'
,
},
{
name
:
'empstate'
,
},
{
name
:
'jobstate'
,
},
{
name
:
'nativeplace'
,
},
]
}
}
\ No newline at end of file
app_PIM/src/widgets/hremployee/tree-001-treeview/tree-001-treeview-service.ts
0 → 100644
浏览文件 @
15e99894
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
HREmployeeService
from
'@/service/hremployee/hremployee-service'
;
import
TREE_001Model
from
'./tree-001-treeview-model'
;
import
CodeListService
from
'@service/app/codelist-service'
;
import
i18n
from
'@/locale'
;
/**
* TREE_001 部件服务对象
*
* @export
* @class TREE_001Service
*/
export
default
class
TREE_001Service
extends
ControlService
{
/**
* 员工服务对象
*
* @type {HREmployeeService}
* @memberof TREE_001Service
*/
public
appEntityService
:
HREmployeeService
=
new
HREmployeeService
({
$store
:
this
.
getStore
()
});
/**
* 设置从数据模式
*
* @type {boolean}
* @memberof TREE_001Service
*/
public
setTempMode
(){
this
.
isTempMode
=
false
;
}
/**
* Creates an instance of TREE_001Service.
*
* @param {*} [opts={}]
* @memberof TREE_001Service
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
model
=
new
TREE_001Model
();
}
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof TREE_001Service
*/
public
codeListService
:
CodeListService
=
new
CodeListService
({
$store
:
this
.
getStore
()
});
/**
* 节点分隔符号
*
* @public
* @type {string}
* @memberof TREE_001Service
*/
public
TREENODE_SEPARATOR
:
string
=
';'
;
/**
* 默认根节点节点分隔符号
*
* @public
* @type {string}
* @memberof TREE_001Service
*/
public
TREENODE_ROOT
:
string
=
'ROOT'
;
/**
* 员工信息节点分隔符号
*
* @public
* @type {string}
* @memberof TREE_001Service
*/
public
TREENODE_TR0
:
string
=
'tr0'
;
/**
* 分配信息节点分隔符号
*
* @public
* @type {string}
* @memberof TREE_001Service
*/
public
TREENODE_TR01
:
string
=
'tr01'
;
/**
* 获取节点数据
*
* @param {string} action
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof TREE_001Service
*/
@
Errorlog
public
async
getNodes
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
{
srfparentkey
,
srfcat
,
srfnodeid
,
srfnodefilter
,
query
}:
{
srfparentkey
:
string
,
srfcat
:
string
,
srfnodeid
:
string
,
srfnodefilter
:
string
,
query
:
string
}
=
data
;
srfnodefilter
=
query
?
query
:
srfnodefilter
;
let
list
:
any
[]
=
[];
let
filter
:
any
=
{};
if
(
!
srfnodeid
||
Object
.
is
(
srfnodeid
,
'#'
))
{
srfnodeid
=
this
.
TREENODE_ROOT
;
}
let
strTreeNodeId
:
string
=
srfnodeid
;
let
strRealNodeId
:
string
=
''
;
let
bRootSelect
:
boolean
=
false
;
let
strNodeType
:
string
|
null
=
null
;
let
strRootSelectNode
:
string
=
''
;
if
(
Object
.
is
(
strTreeNodeId
,
this
.
TREENODE_ROOT
))
{
strNodeType
=
this
.
TREENODE_ROOT
;
if
(
srfparentkey
)
{
strRealNodeId
=
srfparentkey
;
}
}
else
{
let
nPos
=
strTreeNodeId
.
indexOf
(
this
.
TREENODE_SEPARATOR
);
if
(
nPos
===
-
1
)
{
return
Promise
.
reject
({
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
`树节点
${
strTreeNodeId
}
标识无效`
}
});
}
strNodeType
=
strTreeNodeId
.
substring
(
0
,
nPos
);
strRealNodeId
=
strTreeNodeId
.
substring
(
nPos
+
1
);
}
Object
.
assign
(
filter
,
{
srfparentkey
:
srfparentkey
,
srfcat
:
srfcat
,
srfnodefilter
:
srfnodefilter
,
strRealNodeId
:
strRealNodeId
,
srfnodeid
:
srfnodeid
,
strNodeType
:
strNodeType
,
viewparams
:
JSON
.
parse
(
JSON
.
stringify
(
data
)).
viewparams
}
);
// 分解节点标识
let
nodeid
:
string
[]
=
strRealNodeId
.
split
(
this
.
TREENODE_SEPARATOR
);
for
(
let
i
=
0
;
i
<
nodeid
.
length
;
i
++
)
{
switch
(
i
)
{
case
0
:
Object
.
assign
(
filter
,
{
nodeid
:
nodeid
[
0
]
});
break
;
case
1
:
Object
.
assign
(
filter
,
{
nodeid2
:
nodeid
[
1
]
});
break
;
case
2
:
Object
.
assign
(
filter
,
{
nodeid3
:
nodeid
[
2
]
});
break
;
case
3
:
Object
.
assign
(
filter
,
{
nodeid4
:
nodeid
[
3
]
});
break
;
default
:
break
;
}
}
if
(
Object
.
is
(
strNodeType
,
this
.
TREENODE_ROOT
))
{
await
this
.
fillRootNodeChilds
(
context
,
filter
,
list
);
return
Promise
.
resolve
({
status
:
200
,
data
:
list
});
}
if
(
Object
.
is
(
strNodeType
,
this
.
TREENODE_TR0
))
{
await
this
.
fillTr0NodeChilds
(
context
,
filter
,
list
);
return
Promise
.
resolve
({
status
:
200
,
data
:
list
});
}
if
(
Object
.
is
(
strNodeType
,
this
.
TREENODE_TR01
))
{
await
this
.
fillTr01NodeChilds
(
context
,
filter
,
list
);
return
Promise
.
resolve
({
status
:
200
,
data
:
list
});
}
return
Promise
.
resolve
({
status
:
500
,
data
:
{
title
:
'失败'
,
message
:
`树节点
${
strTreeNodeId
}
标识无效`
}
});
}
/**
* 填充 树视图节点[默认根节点]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof TREE_001Service
*/
@
Errorlog
public
fillRootNodes
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[],
rsNavContext
?:
any
,
rsNavParams
?:
any
,
rsParams
?:
any
):
Promise
<
any
>
{
context
=
this
.
handleResNavContext
(
context
,
filter
,
rsNavContext
);
filter
=
this
.
handleResNavParams
(
context
,
filter
,
rsNavParams
,
rsParams
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
treeNode
:
any
=
{};
Object
.
assign
(
treeNode
,
{
text
:
i18n
.
t
(
'entities.hremployee.tree_001_treeview.nodes.root'
)
});
Object
.
assign
(
treeNode
,
{
isUseLangRes
:
true
});
Object
.
assign
(
treeNode
,{
srfappctx
:
context
});
Object
.
assign
(
treeNode
,
{
srfmajortext
:
treeNode
.
text
});
let
strNodeId
:
string
=
'ROOT'
;
Object
.
assign
(
treeNode
,
{
srfkey
:
'root'
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
'root'
;
Object
.
assign
(
treeNode
,
{
id
:
strNodeId
});
Object
.
assign
(
treeNode
,
{
expanded
:
filter
.
isAutoexpand
});
Object
.
assign
(
treeNode
,
{
leaf
:
false
});
Object
.
assign
(
treeNode
,
{
nodeid
:
treeNode
.
srfkey
});
Object
.
assign
(
treeNode
,
{
nodeid2
:
filter
.
strRealNodeId
});
list
.
push
(
treeNode
);
resolve
(
list
);
});
}
/**
* 填充 树视图节点[默认根节点]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof TREE_001Service
*/
@
Errorlog
public
async
fillRootNodeChilds
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[]):
Promise
<
any
>
{
if
(
filter
.
srfnodefilter
&&
!
Object
.
is
(
filter
.
srfnodefilter
,
""
))
{
// 填充员工信息
let
Tr0RsNavContext
:
any
=
{};
let
Tr0RsNavParams
:
any
=
{};
let
Tr0RsParams
:
any
=
{};
await
this
.
fillTr0Nodes
(
context
,
filter
,
list
,
Tr0RsNavContext
,
Tr0RsNavParams
,
Tr0RsParams
);
// 填充分配信息
let
Tr01RsNavContext
:
any
=
{};
let
Tr01RsNavParams
:
any
=
{};
let
Tr01RsParams
:
any
=
{};
await
this
.
fillTr01Nodes
(
context
,
filter
,
list
,
Tr01RsNavContext
,
Tr01RsNavParams
,
Tr01RsParams
);
}
else
{
// 填充员工信息
let
Tr0RsNavContext
:
any
=
{};
let
Tr0RsNavParams
:
any
=
{};
let
Tr0RsParams
:
any
=
{};
await
this
.
fillTr0Nodes
(
context
,
filter
,
list
,
Tr0RsNavContext
,
Tr0RsNavParams
,
Tr0RsParams
);
// 填充分配信息
let
Tr01RsNavContext
:
any
=
{};
let
Tr01RsNavParams
:
any
=
{};
let
Tr01RsParams
:
any
=
{};
await
this
.
fillTr01Nodes
(
context
,
filter
,
list
,
Tr01RsNavContext
,
Tr01RsNavParams
,
Tr01RsParams
);
}
}
/**
* 填充 树视图节点[员工信息]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof TREE_001Service
*/
@
Errorlog
public
fillTr0Nodes
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[],
rsNavContext
?:
any
,
rsNavParams
?:
any
,
rsParams
?:
any
):
Promise
<
any
>
{
context
=
this
.
handleResNavContext
(
context
,
filter
,
rsNavContext
);
filter
=
this
.
handleResNavParams
(
context
,
filter
,
rsNavParams
,
rsParams
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
treeNode
:
any
=
{};
Object
.
assign
(
treeNode
,
{
text
:
i18n
.
t
(
'entities.hremployee.tree_001_treeview.nodes.tr0'
)
});
Object
.
assign
(
treeNode
,
{
isUseLangRes
:
true
});
Object
.
assign
(
treeNode
,{
srfappctx
:
context
});
Object
.
assign
(
treeNode
,
{
srfmajortext
:
treeNode
.
text
});
let
strNodeId
:
string
=
'tr0'
;
// 没有指定节点值,直接使用父节点值
Object
.
assign
(
treeNode
,
{
srfkey
:
filter
.
strRealNodeId
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
filter
.
strRealNodeId
;
Object
.
assign
(
treeNode
,
{
id
:
strNodeId
});
Object
.
assign
(
treeNode
,
{
iconcls
:
'fa fa-user'
});
Object
.
assign
(
treeNode
,
{
expanded
:
filter
.
isAutoexpand
});
Object
.
assign
(
treeNode
,
{
leaf
:
true
});
Object
.
assign
(
treeNode
,
{
nodeid
:
treeNode
.
srfkey
});
Object
.
assign
(
treeNode
,
{
nodeid2
:
filter
.
strRealNodeId
});
list
.
push
(
treeNode
);
resolve
(
list
);
});
}
/**
* 填充 树视图节点[员工信息]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof TREE_001Service
*/
@
Errorlog
public
async
fillTr0NodeChilds
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[]):
Promise
<
any
>
{
if
(
filter
.
srfnodefilter
&&
!
Object
.
is
(
filter
.
srfnodefilter
,
""
))
{
}
else
{
}
}
/**
* 填充 树视图节点[分配信息]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof TREE_001Service
*/
@
Errorlog
public
fillTr01Nodes
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[],
rsNavContext
?:
any
,
rsNavParams
?:
any
,
rsParams
?:
any
):
Promise
<
any
>
{
context
=
this
.
handleResNavContext
(
context
,
filter
,
rsNavContext
);
filter
=
this
.
handleResNavParams
(
context
,
filter
,
rsNavParams
,
rsParams
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
treeNode
:
any
=
{};
Object
.
assign
(
treeNode
,
{
text
:
i18n
.
t
(
'entities.hremployee.tree_001_treeview.nodes.tr01'
)
});
Object
.
assign
(
treeNode
,
{
isUseLangRes
:
true
});
Object
.
assign
(
treeNode
,{
srfappctx
:
context
});
Object
.
assign
(
treeNode
,
{
srfmajortext
:
treeNode
.
text
});
let
strNodeId
:
string
=
'tr01'
;
// 没有指定节点值,直接使用父节点值
Object
.
assign
(
treeNode
,
{
srfkey
:
filter
.
strRealNodeId
});
strNodeId
+=
this
.
TREENODE_SEPARATOR
;
strNodeId
+=
filter
.
strRealNodeId
;
Object
.
assign
(
treeNode
,
{
id
:
strNodeId
});
Object
.
assign
(
treeNode
,
{
iconcls
:
'fa fa-qrcode'
});
Object
.
assign
(
treeNode
,
{
expanded
:
filter
.
isAutoexpand
});
Object
.
assign
(
treeNode
,
{
leaf
:
true
});
Object
.
assign
(
treeNode
,
{
nodeid
:
treeNode
.
srfkey
});
Object
.
assign
(
treeNode
,
{
nodeid2
:
filter
.
strRealNodeId
});
list
.
push
(
treeNode
);
resolve
(
list
);
});
}
/**
* 填充 树视图节点[分配信息]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof TREE_001Service
*/
@
Errorlog
public
async
fillTr01NodeChilds
(
context
:
any
=
{},
filter
:
any
,
list
:
any
[]):
Promise
<
any
>
{
if
(
filter
.
srfnodefilter
&&
!
Object
.
is
(
filter
.
srfnodefilter
,
""
))
{
}
else
{
}
}
/**
* 处理代码表返回数据(树状结构)
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof TREE_001Service
*/
public
handleDataSet
(
result
:
Array
<
any
>
,
context
:
any
,
callBack
:
any
){
let
list
:
Array
<
any
>
=
[];
if
(
result
.
length
===
0
){
return
list
;
}
result
.
forEach
((
codeItem
:
any
)
=>
{
if
(
!
codeItem
.
pvalue
){
let
valueField
:
string
=
codeItem
.
value
;
this
.
setChildCodeItems
(
valueField
,
result
,
codeItem
);
list
.
push
(
codeItem
);
}
})
this
.
setNodeData
(
list
,
context
,
callBack
);
return
list
;
}
/**
* 处理非根节点数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof TREE_001Service
*/
public
setChildCodeItems
(
pValue
:
string
,
result
:
Array
<
any
>
,
codeItem
:
any
){
result
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
pvalue
==
pValue
){
let
valueField
:
string
=
item
.
value
;
this
.
setChildCodeItems
(
valueField
,
result
,
item
);
if
(
!
codeItem
.
children
){
codeItem
.
children
=
[];
}
codeItem
.
children
.
push
(
item
);
}
})
}
/**
* 设置节点UI数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof TREE_001Service
*/
public
setNodeData
(
result
:
Array
<
any
>
,
context
:
any
,
callBack
:
any
){
result
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
children
){
item
.
leaf
=
false
;
this
.
setNodeData
(
item
.
children
,
context
,
callBack
);
}
else
{
item
.
leaf
=
true
;
}
callBack
(
context
,
item
);
})
}
/**
* 处理节点关系导航上下文
*
* @param context 应用上下文
* @param filter 参数
* @param resNavContext 节点关系导航上下文
*
* @memberof TREE_001Service
*/
public
handleResNavContext
(
context
:
any
,
filter
:
any
,
resNavContext
:
any
){
if
(
resNavContext
&&
Object
.
keys
(
resNavContext
).
length
>
0
){
let
tempContextData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
tempViewParams
:
any
=
{};
if
(
filter
&&
filter
.
viewparams
){
tempViewParams
=
filter
.
viewparams
;
}
Object
.
keys
(
resNavContext
).
forEach
((
item
:
any
)
=>
{
let
curDataObj
:
any
=
resNavContext
[
item
];
this
.
handleCustomDataLogic
(
context
,
tempViewParams
,
curDataObj
,
tempContextData
,
item
);
})
return
tempContextData
;
}
else
{
return
context
;
}
}
/**
* 处理关系导航参数
*
* @param context 应用上下文
* @param filter 参数
* @param resNavParams 节点关系导航参数
* @param resParams 节点关系参数
*
* @memberof TREE_001Service
*/
public
handleResNavParams
(
context
:
any
,
filter
:
any
,
resNavParams
:
any
,
resParams
:
any
){
if
((
resNavParams
&&
Object
.
keys
(
resNavParams
).
length
>
0
)
||
(
resParams
&&
Object
.
keys
(
resParams
).
length
>
0
)){
let
tempViewParamData
:
any
=
{};
let
tempViewParams
:
any
=
{};
if
(
filter
&&
filter
.
viewparams
){
tempViewParams
=
filter
.
viewparams
;
tempViewParamData
=
JSON
.
parse
(
JSON
.
stringify
(
filter
.
viewparams
));
}
if
(
Object
.
keys
(
resNavParams
).
length
>
0
){
Object
.
keys
(
resNavParams
).
forEach
((
item
:
any
)
=>
{
let
curDataObj
:
any
=
resNavParams
[
item
];
this
.
handleCustomDataLogic
(
context
,
tempViewParams
,
curDataObj
,
tempViewParamData
,
item
);
})
}
if
(
Object
.
keys
(
resParams
).
length
>
0
){
Object
.
keys
(
resParams
).
forEach
((
item
:
any
)
=>
{
let
curDataObj
:
any
=
resParams
[
item
];
tempViewParamData
[
item
.
toLowerCase
()]
=
curDataObj
.
value
;
})
}
Object
.
assign
(
filter
,{
viewparams
:
tempViewParamData
});
return
filter
;
}
else
{
return
filter
;
}
}
/**
* 处理自定义节点关系导航数据
*
* @param context 应用上下文
* @param viewparams 参数
* @param curNavData 节点关系导航参数对象
* @param tempData 返回数据
* @param item 节点关系导航参数键值
*
* @memberof TREE_001Service
*/
public
handleCustomDataLogic
(
context
:
any
,
viewparams
:
any
,
curNavData
:
any
,
tempData
:
any
,
item
:
string
){
// 直接值直接赋值
if
(
curNavData
.
isRawValue
){
if
(
Object
.
is
(
curNavData
.
value
,
"null"
)
||
Object
.
is
(
curNavData
.
value
,
""
)){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
curNavData
.
value
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
else
{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if
(
context
[(
curNavData
.
value
).
toLowerCase
()]){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
context
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
if
(
viewparams
[(
curNavData
.
value
).
toLowerCase
()]){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
viewparams
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
}
}
}
\ No newline at end of file
app_PIM/src/widgets/hremployee/tree-001-treeview/tree-001-treeview.html
0 → 100644
浏览文件 @
15e99894
<div
class=
"design-tree-container"
>
<context-menu-container>
<el-tree
v-if=
"inited"
ref=
"treeexpbar_tree"
class=
"design-tree"
node-key=
"id"
lazy
:show-checkbox=
"!isSingleSelect"
:check-on-click-node=
"!isSingleSelect"
:default-expanded-keys=
"expandedKeys"
:props=
"{
label: 'text',
isLeaf: 'leaf',
children: 'children'
}"
:load=
"load.bind(_self)"
:highlight-current=
"true"
:expand-on-click-node=
"false"
@
check=
"onCheck.apply(_self, arguments)"
@
current-change=
"selectionChange.apply(_self, arguments)"
:filter-node-method=
"filterNode"
>
<template
slot-scope=
"{ node, data }"
>
<context-menu
:contextMenuStyle=
"{width: '100%'}"
:data=
"node"
:renderContent=
"renderContextMenu.bind(_self)"
>
<tooltip
transfer
style=
"width: 100%;"
max-width=
"2000"
placement=
"right"
>
<div
class=
"tree-node"
@
dblclick=
"doDefaultAction(node)"
>
<span
class=
"icon"
>
<i
v-if=
" data.iconcls && !Object.is(data.iconcls, '')"
:class=
"data.iconcls"
></i>
<img
v-else-if=
"data.icon && !Object.is(data.icon, '')"
:src=
"data.icon"
/>
<icon
v-else-if=
"isOutputIconDefault"
type=
"ios-paper-outline"
></icon>
</span>
<span
class=
"text"
>
<span
v-if=
"data.html"
v-html=
"data.html"
></span>
<span
v-else
>
{{ data.isUseLangRes ? $t(data.text) : data.text }}
</span>
</span>
</div>
<template
slot=
"content"
>
<span
v-if=
"data.html"
v-html=
"data.html"
></span>
<span
v-else
>
{{ data.isUseLangRes ? $t(data.text) : data.text }}
</span>
</template>
</tooltip>
</context-menu>
</template>
</el-tree>
</context-menu-container>
</div>
\ No newline at end of file
app_PIM/src/widgets/hremployee/tree-001-treeview/tree-001-treeview.vue
0 → 100644
浏览文件 @
15e99894
<
template
src=
"./tree-001-treeview.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { TREE_001TreeBase } from './tree-001-treeview-base';
/**
* treeexpbar_tree部件
*
* @export
* @class TREE_001Tree
* @extends {TREE_001TreeBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class TREE_001Tree extends TREE_001TreeBase { }
</script>
app_PIM/src/widgets/hremployee/tree-exp-viewtreeexpbar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar-base.tsx
0 → 100644
浏览文件 @
15e99894
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
MainControlBase
}
from
'@/studio-core'
;
import
HREmployeeService
from
'@/service/hremployee/hremployee-service'
;
import
TreeExpViewtreeexpbarService
from
'./tree-exp-viewtreeexpbar-treeexpbar-service'
;
import
HREmployeeUIService
from
'@/uiservice/hremployee/hremployee-ui-service'
;
/**
* treeexpbar部件基类
*
* @export
* @class MainControlBase
* @extends {TreeExpViewtreeexpbarTreeExpBarBase}
*/
export
class
TreeExpViewtreeexpbarTreeExpBarBase
extends
MainControlBase
{
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
protected
controlType
:
string
=
'TREEEXPBAR'
;
/**
* 建构部件服务对象
*
* @type {TreeExpViewtreeexpbarService}
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
public
service
:
TreeExpViewtreeexpbarService
=
new
TreeExpViewtreeexpbarService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {HREmployeeService}
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
public
appEntityService
:
HREmployeeService
=
new
HREmployeeService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
protected
appDeName
:
string
=
'hremployee'
;
/**
* 应用实体中文名称
*
* @protected
* @type {string}
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
protected
appDeLogicName
:
string
=
'员工'
;
/**
* treeexpbar_tree 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
public
treeexpbar_tree_selectionchange
(
$event
:
any
,
$event2
?:
any
)
{
this
.
treeexpbar_selectionchange
(
$event
,
'treeexpbar_tree'
,
$event2
);
}
/**
* treeexpbar_tree 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof TreeExpViewtreeexpbarTreeExpBarBase
*/
public
treeexpbar_tree_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
treeexpbar_load
(
$event
,
'treeexpbar_tree'
,
$event2
);
}
/**
* 打开新建数据视图
*
* @type {any}
* @memberof TreeExpViewtreeexpbarBase
*/
@
Prop
()
public
newdata
:
any
;
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof TreeExpViewtreeexpbarBase
*/
@
Prop
()
public
opendata
:
any
;
/**
* 视图唯一标识
*
* @type {boolean}
* @memberof TreeExpViewtreeexpbarBase
*/
@
Prop
()
public
viewUID
!
:
string
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof TreeExpViewtreeexpbarBase
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof TreeExpViewtreeexpbarBase
*/
public
getData
():
any
{
return
{};
}
/**
* 选中数据
*
* @type {*}
* @memberof TreeExpViewtreeexpbarBase
*/
public
selection
:
any
=
{};
/**
* 控件宽度
*
* @type {number}
* @memberof TreeExpViewtreeexpbarBase
*/
public
ctrlWidth
:
number
=
250
;
/**
* 过滤值
*
* @type {string}
* @memberof TreeExpViewtreeexpbarBase
*/
public
srfnodefilter
:
string
=
''
;
/**
* 刷新标识
*
* @public
* @type {number}
* @memberof TreeExpViewtreeexpbarBase
*/
public
counter
:
number
=
0
;
/**
* 是否加载默认关联视图
*
* @public
* @type {boolean}
* @memberof TreeExpViewtreeexpbarBase
*/
public
istLoadDefaultRefView
:
boolean
=
false
;
/**
* 分割宽度
*
* @type {number}
* @memberof TreeExpViewtreeexpbarBase
*/
public
split
:
number
=
0.15
;
/**
* split值变化事件
*
* @memberof TreeExpViewtreeexpbarBase
*/
public
onSplitChange
()
{
if
(
this
.
split
){
this
.
$store
.
commit
(
"setViewSplit"
,{
viewUID
:
this
.
viewUID
,
viewSplit
:
this
.
split
});
}
}
/**
* 获取关系项视图
*
* @param {*} [arg={}]
* @returns {*}
* @memberof TreeExpViewtreeexpbarBase
*/
public
getExpItemView
(
arg
:
any
=
{}):
any
{
let
expmode
=
arg
.
nodetype
.
toUpperCase
();
if
(
!
expmode
)
{
expmode
=
''
;
}
if
(
Object
.
is
(
expmode
,
'TR01'
))
{
return
{
viewname
:
'hrdistribution-grid-view'
,
parentdata
:
{},
deKeyField
:
'hrdistribution'
};
}
if
(
Object
.
is
(
expmode
,
'TR0'
))
{
return
{
viewname
:
'hremployee-edit-view'
,
parentdata
:
{},
deKeyField
:
'hremployee'
};
}
return
null
;
}
/**
* 树导航选中
*
* @param {any []} args
* @param {string} [tag]
* @param {*} [$event2]
* @returns {void}
* @memberof TreeExpViewtreeexpbarBase
*/
public
treeexpbar_selectionchange
(
args
:
any
[],
tag
?:
string
,
$event2
?:
any
):
void
{
if
(
args
.
length
===
0
)
{
return
;
}
const
arg
:
any
=
args
[
0
];
if
(
!
arg
.
id
)
{
return
;
}
const
nodetype
=
arg
.
id
.
split
(
';'
)[
0
];
const
refview
=
this
.
getExpItemView
({
nodetype
:
nodetype
});
if
(
!
refview
)
{
return
;
}
let
tempViewparam
:
any
=
{};
let
tempContext
:
any
=
{};
if
(
arg
&&
arg
.
navfilter
){
this
.
counter
+=
1
;
Object
.
defineProperty
(
tempViewparam
,
arg
.
navfilter
,
{
value
:
arg
.
srfkey
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
})
Object
.
assign
(
tempContext
,{
srfcounter
:
this
.
counter
});
}
Object
.
assign
(
tempContext
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)));
if
(
arg
.
srfappctx
){
Object
.
assign
(
tempContext
,
JSON
.
parse
(
JSON
.
stringify
(
arg
.
srfappctx
)));
}
// 计算导航上下文
if
(
arg
&&
arg
.
navigateContext
&&
Object
.
keys
(
arg
.
navigateContext
).
length
>
0
){
let
tempData
:
any
=
arg
.
curData
?
JSON
.
parse
(
JSON
.
stringify
(
arg
.
curData
)):{};
Object
.
assign
(
tempData
,
arg
);
let
_context
=
this
.
$util
.
computedNavData
(
tempData
,
tempContext
,
tempViewparam
,
arg
.
navigateContext
);
Object
.
assign
(
tempContext
,
_context
);
}
if
(
arg
.
srfparentdename
){
Object
.
assign
(
tempContext
,{
srfparentdename
:
arg
.
srfparentdename
});
}
if
(
arg
.
srfparentkey
){
Object
.
assign
(
tempContext
,{
srfparentkey
:
arg
.
srfparentkey
});
}
// 计算导航参数
if
(
arg
&&
arg
.
navigateParams
&&
Object
.
keys
(
arg
.
navigateParams
).
length
>
0
){
let
tempData
:
any
=
arg
.
curData
?
JSON
.
parse
(
JSON
.
stringify
(
arg
.
curData
)):{};
Object
.
assign
(
tempData
,
arg
);
let
_params
=
this
.
$util
.
computedNavData
(
tempData
,
tempContext
,
tempViewparam
,
arg
.
navigateParams
);
Object
.
assign
(
tempViewparam
,
_params
);
this
.
counter
+=
1
;
Object
.
assign
(
tempContext
,{
srfcounter
:
this
.
counter
});
}
this
.
selection
=
{};
Object
.
assign
(
this
.
selection
,
{
view
:
{
viewname
:
refview
.
viewname
}
});
Object
.
assign
(
this
.
selection
,{
'viewparam'
:
tempViewparam
,
'context'
:
tempContext
});
this
.
$forceUpdate
();
}
/**
* 树加载完成
*
* @param {any[]} args
* @param {string} [tag]
* @param {*} [$event2]
* @returns {void}
* @memberof TreeExpViewtreeexpbarBase
*/
public
treeexpbar_load
(
args
:
any
[],
tag
?:
string
,
$event2
?:
any
):
void
{
this
.
$emit
(
'load'
,
args
);
}
/**
* 执行搜索
*
* @memberof TreeExpViewtreeexpbarBase
*/
public
onSearch
():
void
{
if
(
!
this
.
viewState
)
{
return
;
}
this
.
istLoadDefaultRefView
=
false
;
this
.
viewState
.
next
({
tag
:
'treeexpbar_tree'
,
action
:
'filter'
,
data
:
{
srfnodefilter
:
this
.
srfnodefilter
}
});
}
/**
* vue 声明周期
*
* @memberof @memberof TreeExpViewtreeexpbarBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof TreeExpViewtreeexpbarBase
*/
public
afterCreated
(){
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
this
.
istLoadDefaultRefView
=
false
;
this
.
viewState
.
next
({
tag
:
'treeexpbar_tree'
,
action
:
action
,
data
:
data
});
});
}
}
/**
* Vue声明周期(组件渲染完毕)
*
* @memberof TreeExpViewtreeexpbarBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof TreeExpViewtreeexpbarBase
*/
public
afterMounted
(){
if
(
this
.
$store
.
getters
.
getViewSplit
(
this
.
viewUID
)){
this
.
split
=
this
.
$store
.
getters
.
getViewSplit
(
this
.
viewUID
);
}
else
{
let
containerWidth
:
number
=
(
document
.
getElementById
(
"treeexpviewtreeexpbar"
)
as
any
).
offsetWidth
;
if
(
this
.
ctrlWidth
){
this
.
split
=
this
.
ctrlWidth
/
containerWidth
;
}
this
.
$store
.
commit
(
"setViewSplit"
,{
viewUID
:
this
.
viewUID
,
viewSplit
:
this
.
split
});
}
}
/**
* vue 生命周期
*
* @memberof TreeExpViewtreeexpbarBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof TreeExpViewtreeexpbarBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
/**
* 视图数据变化
*
* @param {*} $event
* @memberof TreeExpViewtreeexpbarBase
*/
public
onViewDatasChange
(
$event
:
any
):
void
{
this
.
$emit
(
'selectionchange'
,
$event
);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof TreeExpViewtreeexpbarBase
*/
public
viewDatasActivated
(
$event
:
any
):
void
{
this
.
$emit
(
'activated'
,
$event
);
}
/**
* 视图数据加载完成
*
* @param {*} $event
* @memberof TreeExpViewtreeexpbarBase
*/
public
onViewLoad
(
$event
:
any
):
void
{
this
.
$emit
(
'load'
,
$event
);
}
}
\ No newline at end of file
app_PIM/src/widgets/hremployee/tree-exp-viewtreeexpbar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar-model.ts
0 → 100644
浏览文件 @
15e99894
/**
* TreeExpViewtreeexpbar 部件模型
*
* @export
* @class TreeExpViewtreeexpbarModel
*/
export
default
class
TreeExpViewtreeexpbarModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof TreeExpViewtreeexpbarModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'employeename'
,
},
{
name
:
'updateman'
,
},
{
name
:
'createman'
,
},
{
name
:
'hremployee'
,
prop
:
'employeeid'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'createdate'
,
},
{
name
:
'organizationid'
,
},
{
name
:
'employeecode'
,
},
{
name
:
'certtype'
,
},
{
name
:
'certnum'
,
},
{
name
:
'birthday'
,
},
{
name
:
'age'
,
},
{
name
:
'organizationname'
,
},
{
name
:
'sex'
,
},
{
name
:
'bloodtype'
,
},
{
name
:
'telephone'
,
},
{
name
:
'mobile'
,
},
{
name
:
'email'
,
},
{
name
:
'marriage'
,
},
{
name
:
'nation'
,
},
{
name
:
'nativetype'
,
},
{
name
:
'nativeaddress'
,
},
{
name
:
'birthaddress'
,
},
{
name
:
'postaladdress'
,
},
{
name
:
'hobby'
,
},
{
name
:
'health'
,
},
{
name
:
'political'
,
},
{
name
:
'startworktime'
,
},
{
name
:
'startorgtime'
,
},
{
name
:
'photo'
,
},
{
name
:
'firstdegree'
,
},
{
name
:
'highestdegree'
,
},
{
name
:
'technicaltitle'
,
},
{
name
:
'certificates'
,
},
{
name
:
'entrytype'
,
},
{
name
:
'politicaltime'
,
},
{
name
:
'empstate'
,
},
{
name
:
'jobstate'
,
},
{
name
:
'nativeplace'
,
},
]
}
}
\ No newline at end of file
app_PIM/src/widgets/hremployee/tree-exp-viewtreeexpbar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar-service.ts
0 → 100644
浏览文件 @
15e99894
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* TreeExpViewtreeexpbar 部件服务对象
*
* @export
* @class TreeExpViewtreeexpbarService
*/
export
default
class
TreeExpViewtreeexpbarService
extends
ControlService
{
}
\ No newline at end of file
app_PIM/src/widgets/hremployee/tree-exp-viewtreeexpbar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar.html
0 → 100644
浏览文件 @
15e99894
<split
id=
"treeexpviewtreeexpbar"
class=
'app-tree-exp-bar'
v-model=
"split"
mode=
"horizontal"
@
on-move-end=
"onSplitChange.apply(_self, arguments)"
>
<div
class=
"app-tree-exp-bar-left show-title-bar"
slot=
'left'
>
<div
class=
'tree-exp-bar-header'
>
<div
class=
"tree-exp-bar-title"
>
员工信息
</div>
</div>
<div
class=
'tree-exp-content'
>
<view
_treeexpbar_tree
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:showBusyIndicator=
"true"
updateAction=
'Update'
removeAction=
'Remove'
loadAction=
'Get'
createAction=
'Create'
:isSelectFirstDefault=
"true"
:isBranchAvailable=
"true"
name=
"treeexpbar_tree"
ref=
'treeexpbar_tree'
@
selectionchange=
"treeexpbar_tree_selectionchange($event)"
@
load=
"treeexpbar_tree_load($event)"
@
closeview=
"closeView($event)"
>
</view
_treeexpbar_tree
>
</div>
</div>
<div
class=
"app-tree-exp-bar-right"
slot=
'right'
>
<component
v-if=
"selection.view && !Object.is(this.selection.view.viewname, '')"
:is=
"selection.view.viewname"
class=
"viewcontainer2"
:viewDefaultUsage=
"false"
:viewdata=
"JSON.stringify(selection.context)"
:viewparam=
"JSON.stringify(selection.viewparam)"
@
viewdataschange=
"onViewDatasChange.apply(_self, arguments)"
@
viewdatasactivated=
"viewDatasActivated.apply(_self, arguments)"
@
viewload=
"onViewLoad.apply(_self, arguments)"
>
</component>
</div>
</split>
app_PIM/src/widgets/hremployee/tree-exp-viewtreeexpbar-treeexpbar/tree-exp-viewtreeexpbar-treeexpbar.vue
0 → 100644
浏览文件 @
15e99894
<
template
src=
"./tree-exp-viewtreeexpbar-treeexpbar.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { TreeExpViewtreeexpbarTreeExpBarBase } from './tree-exp-viewtreeexpbar-treeexpbar-base';
import view_treeexpbar_tree from '@widgets/hremployee/tree-001-treeview/tree-001-treeview.vue';
/**
* treeexpbar部件
*
* @export
* @class TreeExpViewtreeexpbarTreeExpBar
* @extends {TreeExpViewtreeexpbarTreeExpBarBase}
*/
@Component({
components: {
view_treeexpbar_tree,
}
})
@VueLifeCycleProcessing()
export default class TreeExpViewtreeexpbarTreeExpBar extends TreeExpViewtreeexpbarTreeExpBarBase { }
</script>
humanresource-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
15e99894
...
...
@@ -178,7 +178,7 @@
<!--输出实体[HREMPLOYEE]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hremployee-1
0
5-8"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hremployee-1
1
5-8"
>
<createTable
tableName=
"EMPLOYEE"
>
<column
name=
"EMPLOYEENAME"
remarks=
""
type=
"VARCHAR(200)"
>
</column>
...
...
@@ -278,7 +278,7 @@
<!--输出实体[HRLEGAL]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hrlegal-
88
-10"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-hrlegal-
90
-10"
>
<createTable
tableName=
"LEGAL"
>
<column
name=
"LEGALNAME"
remarks=
""
type=
"VARCHAR(200)"
>
</column>
...
...
@@ -593,10 +593,10 @@
</changeSet>
<!--输出实体[HREMPSTATE]外键关系 -->
<!--输出实体[HREMPLOYEE]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hremployee-1
0
5-26"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hremployee-1
1
5-26"
>
<addForeignKeyConstraint
baseColumnNames=
"ORGANIZATIONID"
baseTableName=
"EMPLOYEE"
constraintName=
"DER1N_EMPLOYEE_ORGANIZATION_OR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ORGANIZATIONID"
referencedTableName=
"ORGANIZATION"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hremployee-1
0
5-27"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-hremployee-1
1
5-27"
>
<addForeignKeyConstraint
baseColumnNames=
"EMPSTATE"
baseTableName=
"EMPLOYEE"
constraintName=
"DER1N_HREMPLOYEE_HREMPSTATE_EM"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"HREMPSTATEID"
referencedTableName=
"T_HREMPSTATE"
validate=
"true"
/>
</changeSet>
<!--输出实体[HRLEAVE]外键关系 -->
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录