Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz人力资源
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz人力资源
提交
3525e7f8
提交
3525e7f8
编写于
8月 04, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
jackwang 部署微服务应用
上级
0b1ebbed
变更
16
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
1759 行增加
和
112 行删除
+1759
-112
view-config.json
app_PIM/public/assets/json/view-config.json
+10
-0
hrorg-contact_en_US.ts
...cale/lanres/entities/hrorg-contact/hrorg-contact_en_US.ts
+50
-46
hrorg-contact_zh_CN.ts
...cale/lanres/entities/hrorg-contact/hrorg-contact_zh_CN.ts
+50
-46
viewconfig.ts
app_PIM/src/mock/viewconfig/viewconfig.ts
+9
-1
hrlegal-grid-view-base.tsx
...c/pages/base/hrlegal-grid-view/hrlegal-grid-view-base.tsx
+19
-7
hrorg-contact-edit-view-base.tsx
.../hrorg-contact-edit-view/hrorg-contact-edit-view-base.tsx
+775
-0
hrorg-contact-edit-view.html
...base/hrorg-contact-edit-view/hrorg-contact-edit-view.html
+29
-0
hrorg-contact-edit-view.vue
.../base/hrorg-contact-edit-view/hrorg-contact-edit-view.vue
+22
-0
state.ts
app_PIM/src/store/modules/view-action/state.ts
+9
-0
hrlegal-ui-service-base.ts
app_PIM/src/uiservice/hrlegal/hrlegal-ui-service-base.ts
+22
-12
hrorg-contact-ui-service-base.ts
.../uiservice/hrorg-contact/hrorg-contact-ui-service-base.ts
+1
-0
main-form-base.tsx
...IM/src/widgets/hrorg-contact/main-form/main-form-base.tsx
+148
-0
main-form-model.ts
...IM/src/widgets/hrorg-contact/main-form/main-form-model.ts
+96
-0
main-form-service.ts
.../src/widgets/hrorg-contact/main-form/main-form-service.ts
+393
-0
main-form.html
app_PIM/src/widgets/hrorg-contact/main-form/main-form.html
+104
-0
main-form.vue
app_PIM/src/widgets/hrorg-contact/main-form/main-form.vue
+22
-0
未找到文件。
app_PIM/public/assets/json/view-config.json
浏览文件 @
3525e7f8
{
{
"hrorgcontacteditview"
:
{
"title"
:
"组织联系信息编辑视图"
,
"caption"
:
"组织联系信息"
,
"viewtype"
:
"DEEDITVIEW"
,
"viewmodule"
:
"Base"
,
"viewname"
:
"HROrgContactEditView"
,
"viewfilename"
:
"hrorg-contact-edit-view"
,
"viewtag"
:
"0515a652f1ba4326ef610f1d98be95c8"
,
"memo"
:
"系统自动添加"
},
"hrorganizationgridview"
:
{
"hrorganizationgridview"
:
{
"title"
:
"组织"
,
"title"
:
"组织"
,
"caption"
:
"组织"
,
"caption"
:
"组织"
,
...
...
app_PIM/src/locale/lanres/entities/hrorg-contact/hrorg-contact_en_US.ts
浏览文件 @
3525e7f8
...
@@ -12,6 +12,10 @@ export default {
...
@@ -12,6 +12,10 @@ export default {
maincontact
:
"主要"
,
maincontact
:
"主要"
,
},
},
views
:
{
views
:
{
editview
:
{
caption
:
"组织联系信息"
,
title
:
"组织联系信息编辑视图"
,
},
gridview
:
{
gridview
:
{
caption
:
"组织联系信息"
,
caption
:
"组织联系信息"
,
title
:
"组织联系信息表格视图"
,
title
:
"组织联系信息表格视图"
,
...
@@ -57,6 +61,52 @@ export default {
...
@@ -57,6 +61,52 @@ export default {
uiactions
:
{
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
:
""
,
},
tbitem22
:
{
caption
:
"Help"
,
tip
:
"Help"
,
},
},
gridviewtoolbar_toolbar
:
{
gridviewtoolbar_toolbar
:
{
tbitem3
:
{
tbitem3
:
{
caption
:
"New"
,
caption
:
"New"
,
...
@@ -115,50 +165,4 @@ export default {
...
@@ -115,50 +165,4 @@ export default {
tip
:
"Help"
,
tip
:
"Help"
,
},
},
},
},
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
:
""
,
},
tbitem22
:
{
caption
:
"Help"
,
tip
:
"Help"
,
},
},
};
};
\ No newline at end of file
app_PIM/src/locale/lanres/entities/hrorg-contact/hrorg-contact_zh_CN.ts
浏览文件 @
3525e7f8
...
@@ -11,6 +11,10 @@ export default {
...
@@ -11,6 +11,10 @@ export default {
maincontact
:
"主要"
,
maincontact
:
"主要"
,
},
},
views
:
{
views
:
{
editview
:
{
caption
:
"组织联系信息"
,
title
:
"组织联系信息编辑视图"
,
},
gridview
:
{
gridview
:
{
caption
:
"组织联系信息"
,
caption
:
"组织联系信息"
,
title
:
"组织联系信息表格视图"
,
title
:
"组织联系信息表格视图"
,
...
@@ -56,6 +60,52 @@ export default {
...
@@ -56,6 +60,52 @@ export default {
uiactions
:
{
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
:
""
,
},
tbitem22
:
{
caption
:
"帮助"
,
tip
:
"帮助"
,
},
},
gridviewtoolbar_toolbar
:
{
gridviewtoolbar_toolbar
:
{
tbitem3
:
{
tbitem3
:
{
caption
:
"新建"
,
caption
:
"新建"
,
...
@@ -114,50 +164,4 @@ export default {
...
@@ -114,50 +164,4 @@ export default {
tip
:
"帮助"
,
tip
:
"帮助"
,
},
},
},
},
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
:
""
,
},
tbitem22
:
{
caption
:
"帮助"
,
tip
:
"帮助"
,
},
},
};
};
\ No newline at end of file
app_PIM/src/mock/viewconfig/viewconfig.ts
浏览文件 @
3525e7f8
...
@@ -7,6 +7,14 @@ import Mock from 'mockjs'
...
@@ -7,6 +7,14 @@ import Mock from 'mockjs'
mock
.
onGet
(
'./assets/json/view-config.json'
).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
'./assets/json/view-config.json'
).
reply
((
config
:
any
)
=>
{
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
return
[
status
,{
return
[
status
,{
"hrorgcontacteditview"
:
{
"title"
:
"组织联系信息编辑视图"
,
"caption"
:
"组织联系信息"
,
"viewtype"
:
"DEEDITVIEW"
,
"viewmodule"
:
"Base"
,
"viewname"
:
"HROrgContactEditView"
,
"viewtag"
:
"0515a652f1ba4326ef610f1d98be95c8"
},
"hrorganizationgridview"
:
{
"hrorganizationgridview"
:
{
"title"
:
"组织"
,
"title"
:
"组织"
,
"caption"
:
"组织"
,
"caption"
:
"组织"
,
...
...
app_PIM/src/pages/base/hrlegal-grid-view/hrlegal-grid-view-base.tsx
浏览文件 @
3525e7f8
...
@@ -506,16 +506,28 @@ export class HRLegalGridViewBase extends GridViewBase {
...
@@ -506,16 +506,28 @@ export class HRLegalGridViewBase extends GridViewBase {
const
deResParameters
:
any
[]
=
[];
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
const
parameters
:
any
[]
=
[
{
pathName
:
'hrlegals'
,
parameterName
:
'hrlegal'
},
{
pathName
:
'hrlegals'
,
parameterName
:
'hrlegal'
},
{
pathName
:
'v_001'
,
parameterName
:
'v_001'
},
];
];
const
_this
:
any
=
this
;
const
_this
:
any
=
this
;
const
open
IndexViewTab
=
(
data
:
any
)
=>
{
const
open
Drawer
=
(
view
:
any
,
data
:
any
)
=>
{
const
_data
:
any
=
{
w
:
(
new
Date
().
getTime
())
}
;
let
container
:
Subject
<
any
>
=
this
.
$appdrawer
.
openDrawer
(
view
,
tempContext
,
data
)
;
Object
.
assign
(
_data
,
data
);
container
.
subscribe
((
result
:
any
)
=>
{
const
routePath
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
tempContext
,
deResParameters
,
parameters
,
args
,
_data
);
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
this
.
$router
.
push
(
routePath
)
;
return
;
}
}
openIndexViewTab
(
data
);
if
(
!
xData
||
!
(
xData
.
refresh
instanceof
Function
))
{
return
;
}
xData
.
refresh
(
result
.
datas
);
});
}
const
view
:
any
=
{
viewname
:
'hrlegal-v-001'
,
height
:
0
,
width
:
800
,
title
:
this
.
$t
(
'entities.hrlegal.views.v_001.title'
),
placement
:
'DRAWER_RIGHT'
,
};
openDrawer
(
view
,
data
);
}
}
...
...
app_PIM/src/pages/base/hrorg-contact-edit-view/hrorg-contact-edit-view-base.tsx
0 → 100644
浏览文件 @
3525e7f8
import
{
Subject
}
from
'rxjs'
;
import
{
EditViewBase
}
from
'@/studio-core'
;
import
HROrgContactService
from
'@/service/hrorg-contact/hrorg-contact-service'
;
import
HROrgContactAuthService
from
'@/authservice/hrorg-contact/hrorg-contact-auth-service'
;
import
EditViewEngine
from
'@engine/view/edit-view-engine'
;
import
HROrgContactUIService
from
'@/uiservice/hrorg-contact/hrorg-contact-ui-service'
;
/**
* 组织联系信息编辑视图视图基类
*
* @export
* @class HROrgContactEditViewBase
* @extends {EditViewBase}
*/
export
class
HROrgContactEditViewBase
extends
EditViewBase
{
/**
* 视图对应应用实体名称
*
* @protected
* @type {string}
* @memberof HROrgContactEditViewBase
*/
protected
appDeName
:
string
=
'hrorgcontact'
;
/**
* 应用实体主键
*
* @protected
* @type {string}
* @memberof HROrgContactEditViewBase
*/
protected
appDeKey
:
string
=
'hrorgcontactid'
;
/**
* 应用实体主信息
*
* @protected
* @type {string}
* @memberof HROrgContactEditViewBase
*/
protected
appDeMajor
:
string
=
'hrorgcontactname'
;
/**
* 实体服务对象
*
* @type {HROrgContactService}
* @memberof HROrgContactEditViewBase
*/
protected
appEntityService
:
HROrgContactService
=
new
HROrgContactService
;
/**
* 实体权限服务对象
*
* @type HROrgContactUIService
* @memberof HROrgContactEditViewBase
*/
public
appUIService
:
HROrgContactUIService
=
new
HROrgContactUIService
(
this
.
$store
);
/**
* 计数器服务对象集合
*
* @protected
* @type {Array<*>}
* @memberof HROrgContactEditViewBase
*/
protected
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 视图模型数据
*
* @protected
* @type {*}
* @memberof HROrgContactEditViewBase
*/
protected
model
:
any
=
{
srfCaption
:
'entities.hrorgcontact.views.editview.caption'
,
srfTitle
:
'entities.hrorgcontact.views.editview.title'
,
srfSubTitle
:
'entities.hrorgcontact.views.editview.subtitle'
,
dataInfo
:
''
}
/**
* 容器模型
*
* @protected
* @type {*}
* @memberof HROrgContactEditViewBase
*/
protected
containerModel
:
any
=
{
view_toolbar
:
{
name
:
'toolbar'
,
type
:
'TOOLBAR'
},
view_form
:
{
name
:
'form'
,
type
:
'FORM'
},
};
/**
* 工具栏模型
*
* @type {*}
* @memberof HROrgContactEditView
*/
public
toolBarModels
:
any
=
{
tbitem3
:
{
name
:
'tbitem3'
,
caption
:
'保存'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'保存'
,
iconcls
:
'fa fa-save'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Save'
,
target
:
''
,
class
:
''
}
},
tbitem4
:
{
name
:
'tbitem4'
,
caption
:
'保存并新建'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'保存并新建'
,
iconcls
:
'sx-tb-saveandnew'
,
icon
:
'../sasrfex/images/default/icon_saveandnew.png'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'SaveAndNew'
,
target
:
''
,
class
:
''
}
},
tbitem5
:
{
name
:
'tbitem5'
,
caption
:
'保存并关闭'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'保存并关闭'
,
iconcls
:
'fa fa-power-off'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'SaveAndExit'
,
target
:
''
,
class
:
''
}
},
tbitem6
:
{
name
:
'tbitem6'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem7
:
{
name
:
'tbitem7'
,
caption
:
'删除并关闭'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'删除并关闭'
,
iconcls
:
'fa fa-remove'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'RemoveAndExit'
,
target
:
'SINGLEKEY'
,
class
:
''
}
},
tbitem8
:
{
name
:
'tbitem8'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem12
:
{
name
:
'tbitem12'
,
caption
:
'新建'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'新建'
,
iconcls
:
'fa fa-file-text-o'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'New'
,
target
:
''
,
class
:
''
}
},
tbitem13
:
{
name
:
'tbitem13'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem14
:
{
name
:
'tbitem14'
,
caption
:
'拷贝'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'拷贝'
,
iconcls
:
'fa fa-copy'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Copy'
,
target
:
'SINGLEKEY'
,
class
:
''
}
},
tbitem16
:
{
name
:
'tbitem16'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem22
:
{
name
:
'tbitem22'
,
caption
:
'帮助'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'帮助'
,
iconcls
:
'fa fa-question'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
noprivdisplaymode
:
2
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Help'
,
target
:
''
,
class
:
''
}
},
};
/**
* 视图唯一标识
*
* @protected
* @type {string}
* @memberof ViewBase
*/
protected
viewtag
:
string
=
'0515a652f1ba4326ef610f1d98be95c8'
;
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof HROrgContactEditViewBase
*/
public
engine
:
EditViewEngine
=
new
EditViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof HROrgContactEditViewBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
form
:
this
.
$refs
.
form
,
p2k
:
'0'
,
keyPSDEField
:
'hrorgcontact'
,
majorPSDEField
:
'hrorgcontactname'
,
isLoadDefault
:
true
,
});
}
/**
* toolbar 部件 click 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HROrgContactEditViewBase
*/
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
):
void
{
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
,
'tbitem22'
))
{
this
.
toolbar_tbitem22_click
(
null
,
''
,
$event2
);
}
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HROrgContactEditViewBase
*/
public
form_save
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'save'
,
$event
);
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HROrgContactEditViewBase
*/
public
form_remove
(
$event
:
any
,
$event2
?:
any
):
void
{
this
.
engine
.
onCtrlEvent
(
'form'
,
'remove'
,
$event
);
}
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof HROrgContactEditViewBase
*/
public
form_load
(
$event
:
any
,
$event2
?:
any
):
void
{
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
,
"HROrgContact"
);
}
/**
* 逻辑事件
*
* @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
,
"HROrgContact"
);
}
/**
* 逻辑事件
*
* @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
,
"HROrgContact"
);
}
/**
* 逻辑事件
*
* @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
,
"HROrgContact"
);
}
/**
* 逻辑事件
*
* @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
,
"HROrgContact"
);
}
/**
* 逻辑事件
*
* @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
,
"HROrgContact"
);
}
/**
* 逻辑事件
*
* @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
,
"HROrgContact"
);
}
/**
* 逻辑事件
*
* @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
,
"HROrgContact"
);
}
/**
* 逻辑事件
*
* @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
,
"HROrgContact"
);
}
/**
* 逻辑事件
*
* @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
,
"HROrgContact"
);
}
/**
* 保存
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HROrgContactEditViewBase
*/
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 HROrgContactEditViewBase
*/
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 HROrgContactEditViewBase
*/
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 HROrgContactEditViewBase
*/
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 HROrgContactEditViewBase
*/
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 HROrgContactEditViewBase
*/
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 HROrgContactEditViewBase
*/
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 HROrgContactEditViewBase
*/
public
Copy
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
if
(
args
.
length
===
0
)
{
return
;
}
const
_this
:
any
=
this
;
if
(
_this
.
opendata
&&
_this
.
opendata
instanceof
Function
)
{
const
data
:
any
=
{
};
if
(
args
.
length
>
0
)
{
Object
.
assign
(
data
,
{
hrorgcontact
:
args
[
0
].
hrorgcontact
});
}
if
(
!
params
)
params
=
{};
Object
.
assign
(
params
,{
copymode
:
true
});
_this
.
opendata
([{
...
data
}],
params
,
$event
,
xData
);
}
else
{
Object
.
assign
(
this
.
viewparams
,{
copymode
:
true
});
}
}
/**
* 打印
*
* @param {any[]} args 当前数据
* @param {any} contextJO 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @memberof HROrgContactEditViewBase
*/
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 HROrgContactEditViewBase
*/
public
Help
(
args
:
any
[],
contextJO
?:
any
,
params
?:
any
,
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
)
{
this
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'帮助未支持'
});
}
}
\ No newline at end of file
app_PIM/src/pages/base/hrorg-contact-edit-view/hrorg-contact-edit-view.html
0 → 100644
浏览文件 @
3525e7f8
<studio-view-style2
viewName=
"hrorgcontacteditview"
viewTitle=
"组织联系信息编辑视图"
class=
'deeditview hrorg-contact-edit-view'
>
<template
slot=
'title'
>
<span
class=
'caption-info'
>
{{$t(model.srfTitle)}}
</span>
</template>
<template
slot=
"toolbar"
>
<view-toolbar
mode=
"STYLE2"
:model=
"toolBarModels"
@
item-click=
"toolbar_click($event)"
/>
</template>
<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
>
</studio-view-style2>
\ No newline at end of file
app_PIM/src/pages/base/hrorg-contact-edit-view/hrorg-contact-edit-view.vue
0 → 100644
浏览文件 @
3525e7f8
<
template
src=
"./hrorg-contact-edit-view.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { HROrgContactEditViewBase } from './hrorg-contact-edit-view-base';
import view_form from '@widgets/hrorg-contact/main-form/main-form.vue';
/**
* 组织联系信息编辑视图视图
*
* @export
* @class HROrgContactEditView
* @extends {HROrgContactEditViewBase}
*/
@Component({
components: {
view_form,
}
})
@VueLifeCycleProcessing()
export default class HROrgContactEditView extends HROrgContactEditViewBase { }
</script>
app_PIM/src/store/modules/view-action/state.ts
浏览文件 @
3525e7f8
...
@@ -3,6 +3,15 @@
...
@@ -3,6 +3,15 @@
*/
*/
export
const
viewstate
:
any
=
{
export
const
viewstate
:
any
=
{
appviews
:
[
appviews
:
[
{
viewtag
:
'0515a652f1ba4326ef610f1d98be95c8'
,
viewmodule
:
'Base'
,
viewname
:
'HROrgContactEditView'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
{
viewtag
:
'0d8ac739134947cc5f6545d4041024de'
,
viewtag
:
'0d8ac739134947cc5f6545d4041024de'
,
viewmodule
:
'Base'
,
viewmodule
:
'Base'
,
...
...
app_PIM/src/uiservice/hrlegal/hrlegal-ui-service-base.ts
浏览文件 @
3525e7f8
...
@@ -267,20 +267,30 @@ export default class HRLegalUIServiceBase extends UIService {
...
@@ -267,20 +267,30 @@ export default class HRLegalUIServiceBase extends UIService {
let
deResParameters
:
any
[]
=
[];
let
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
const
parameters
:
any
[]
=
[
{
pathName
:
'hrlegals'
,
parameterName
:
'hrlegal'
},
{
pathName
:
'hrlegals'
,
parameterName
:
'hrlegal'
},
{
pathName
:
'v_001'
,
parameterName
:
'v_001'
},
];
];
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
openDrawer
=
(
view
:
any
,
data
:
any
)
=>
{
const
routePath
=
actionContext
.
$viewTool
.
buildUpRoutePath
(
actionContext
.
$route
,
context
,
deResParameters
,
parameters
,
_args
,
data
);
let
container
:
Subject
<
any
>
=
actionContext
.
$appdrawer
.
openDrawer
(
view
,
context
,
data
);
actionContext
.
$router
.
push
(
routePath
);
container
.
subscribe
((
result
:
any
)
=>
{
if
(
!
result
||
!
Object
.
is
(
result
.
ret
,
'OK'
))
{
return
;
}
const
_this
:
any
=
actionContext
;
if
(
xData
&&
xData
.
refresh
&&
xData
.
refresh
instanceof
Function
)
{
if
(
xData
&&
xData
.
refresh
&&
xData
.
refresh
instanceof
Function
)
{
xData
.
refresh
(
args
);
xData
.
refresh
(
args
);
}
}
if
(
this
.
HRLegal_FF_001
&&
this
.
HRLegal_FF_001
instanceof
Function
)
{
if
(
this
.
HRLegal_FF_001
&&
this
.
HRLegal_FF_001
instanceof
Function
)
{
this
.
HRLegal_FF_001
([
data
],
context
,
params
,
$event
,
xData
,
actionContext
);
this
.
HRLegal_FF_001
(
result
.
datas
[
0
],
context
,
params
,
$event
,
xData
,
actionContext
);
}
}
return
null
;
return
result
.
datas
;
});
}
}
openIndexViewTab
(
data
);
const
view
:
any
=
{
viewname
:
'hrlegal-v-001'
,
height
:
0
,
width
:
800
,
placement
:
'DRAWER_RIGHT'
,
};
openDrawer
(
view
,
data
);
}
}
/**
/**
...
...
app_PIM/src/uiservice/hrorg-contact/hrorg-contact-ui-service-base.ts
浏览文件 @
3525e7f8
...
@@ -89,6 +89,7 @@ export default class HROrgContactUIServiceBase extends UIService {
...
@@ -89,6 +89,7 @@ export default class HROrgContactUIServiceBase extends UIService {
* @memberof HROrgContactUIServiceBase
* @memberof HROrgContactUIServiceBase
*/
*/
public
initViewMap
(){
public
initViewMap
(){
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'hrorgcontacts'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'hrorgcontacts'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'hrorgcontacts'
});
}
}
...
...
app_PIM/src/widgets/hrorg-contact/main-form/main-form-base.tsx
0 → 100644
浏览文件 @
3525e7f8
import
{
Prop
,
Provide
,
Emit
,
Model
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
Watch
,
EditFormControlBase
}
from
'@/studio-core'
;
import
HROrgContactService
from
'@/service/hrorg-contact/hrorg-contact-service'
;
import
MainService
from
'./main-form-service'
;
import
HROrgContactUIService
from
'@/uiservice/hrorg-contact/hrorg-contact-ui-service'
;
import
{
FormButtonModel
,
FormPageModel
,
FormItemModel
,
FormDRUIPartModel
,
FormPartModel
,
FormGroupPanelModel
,
FormIFrameModel
,
FormRowItemModel
,
FormTabPageModel
,
FormTabPanelModel
,
FormUserControlModel
}
from
'@/model/form-detail'
;
/**
* form部件基类
*
* @export
* @class EditFormControlBase
* @extends {MainEditFormBase}
*/
export
class
MainEditFormBase
extends
EditFormControlBase
{
/**
* 获取部件类型
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected
controlType
:
string
=
'FORM'
;
/**
* 建构部件服务对象
*
* @type {MainService}
* @memberof MainEditFormBase
*/
public
service
:
MainService
=
new
MainService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {HROrgContactService}
* @memberof MainEditFormBase
*/
public
appEntityService
:
HROrgContactService
=
new
HROrgContactService
({
$store
:
this
.
$store
});
/**
* 应用实体名称
*
* @protected
* @type {string}
* @memberof MainEditFormBase
*/
protected
appDeName
:
string
=
'hrorgcontact'
;
/**
* 界面UI服务对象
*
* @type {HROrgContactUIService}
* @memberof MainEditFormBase
*/
public
appUIService
:
HROrgContactUIService
=
new
HROrgContactUIService
(
this
.
$store
);
/**
* 表单数据对象
*
* @type {*}
* @memberof MainEditFormBase
*/
public
data
:
any
=
{
srfupdatedate
:
null
,
srforikey
:
null
,
srfkey
:
null
,
srfmajortext
:
null
,
srftempmode
:
null
,
srfuf
:
null
,
srfdeid
:
null
,
srfsourcekey
:
null
,
hrorgcontactname
:
null
,
createman
:
null
,
createdate
:
null
,
updateman
:
null
,
updatedate
:
null
,
hrorgcontactid
:
null
,
hrorgcontact
:
null
,
};
/**
* 属性值规则
*
* @type {*}
* @memberof MainEditFormBase
*/
public
rules
:
any
=
{
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public
deRules
:
any
=
{
};
/**
* 详情模型集合
*
* @type {*}
* @memberof MainEditFormBase
*/
public
detailsModel
:
any
=
{
group1
:
new
FormGroupPanelModel
({
caption
:
'组织联系信息基本信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.hrorgcontact.main_form'
,
extractMode
:
'ITEM'
,
details
:
[]
}
}),
formpage1
:
new
FormPageModel
({
caption
:
'基本信息'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
}),
group2
:
new
FormGroupPanelModel
({
caption
:
'操作信息'
,
detailType
:
'GROUPPANEL'
,
name
:
'group2'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
uiActionGroup
:
{
caption
:
''
,
langbase
:
'entities.hrorgcontact.main_form'
,
extractMode
:
'ITEM'
,
details
:
[]
}
}),
formpage2
:
new
FormPageModel
({
caption
:
'其它'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage2'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
}),
srfupdatedate
:
new
FormItemModel
({
caption
:
'更新时间'
,
detailType
:
'FORMITEM'
,
name
:
'srfupdatedate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srforikey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srforikey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfkey
:
new
FormItemModel
({
caption
:
'组织联系信息标识'
,
detailType
:
'FORMITEM'
,
name
:
'srfkey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfmajortext
:
new
FormItemModel
({
caption
:
'联系人'
,
detailType
:
'FORMITEM'
,
name
:
'srfmajortext'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srftempmode
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srftempmode'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfuf
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfuf'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfdeid
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfdeid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
srfsourcekey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfsourcekey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
hrorgcontactname
:
new
FormItemModel
({
caption
:
'联系人'
,
detailType
:
'FORMITEM'
,
name
:
'hrorgcontactname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
createman
:
new
FormItemModel
({
caption
:
'建立人'
,
detailType
:
'FORMITEM'
,
name
:
'createman'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
createdate
:
new
FormItemModel
({
caption
:
'建立时间'
,
detailType
:
'FORMITEM'
,
name
:
'createdate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
updateman
:
new
FormItemModel
({
caption
:
'更新人'
,
detailType
:
'FORMITEM'
,
name
:
'updateman'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
updatedate
:
new
FormItemModel
({
caption
:
'更新时间'
,
detailType
:
'FORMITEM'
,
name
:
'updatedate'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
hrorgcontactid
:
new
FormItemModel
({
caption
:
'组织联系信息标识'
,
detailType
:
'FORMITEM'
,
name
:
'hrorgcontactid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
showMoreMode
:
0
,
disabled
:
false
,
enableCond
:
3
}),
form
:
new
FormTabPanelModel
({
caption
:
'form'
,
detailType
:
'TABPANEL'
,
name
:
'form'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
tabPages
:
[{
name
:
'formpage1'
,
index
:
0
,
visible
:
true
},
{
name
:
'formpage2'
,
index
:
1
,
visible
:
true
}]
}),
};
}
\ No newline at end of file
app_PIM/src/widgets/hrorg-contact/main-form/main-form-model.ts
0 → 100644
浏览文件 @
3525e7f8
/**
* 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
:
'srfupdatedate'
,
prop
:
'updatedate'
,
dataType
:
'DATETIME'
,
},
{
name
:
'srforikey'
,
},
{
name
:
'srfkey'
,
prop
:
'hrorgcontactid'
,
dataType
:
'GUID'
,
},
{
name
:
'srfmajortext'
,
prop
:
'hrorgcontactname'
,
dataType
:
'TEXT'
,
},
{
name
:
'srftempmode'
,
},
{
name
:
'srfuf'
,
},
{
name
:
'srfdeid'
,
},
{
name
:
'srfsourcekey'
,
},
{
name
:
'hrorgcontactname'
,
prop
:
'hrorgcontactname'
,
dataType
:
'TEXT'
,
},
{
name
:
'createman'
,
prop
:
'createman'
,
dataType
:
'TEXT'
,
},
{
name
:
'createdate'
,
prop
:
'createdate'
,
dataType
:
'DATETIME'
,
},
{
name
:
'updateman'
,
prop
:
'updateman'
,
dataType
:
'TEXT'
,
},
{
name
:
'updatedate'
,
prop
:
'updatedate'
,
dataType
:
'DATETIME'
,
},
{
name
:
'hrorgcontactid'
,
prop
:
'hrorgcontactid'
,
dataType
:
'GUID'
,
},
{
name
:
'hrorgcontact'
,
prop
:
'hrorgcontactid'
,
dataType
:
'FONTKEY'
,
},
]
}
}
\ No newline at end of file
app_PIM/src/widgets/hrorg-contact/main-form/main-form-service.ts
0 → 100644
浏览文件 @
3525e7f8
import
{
Http
,
Util
,
Errorlog
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
import
HROrgContactService
from
'@/service/hrorg-contact/hrorg-contact-service'
;
import
MainModel
from
'./main-form-model'
;
/**
* Main 部件服务对象
*
* @export
* @class MainService
*/
export
default
class
MainService
extends
ControlService
{
/**
* 组织联系信息服务对象
*
* @type {HROrgContactService}
* @memberof MainService
*/
public
appEntityService
:
HROrgContactService
=
new
HROrgContactService
({
$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
[]
>
{
data
.
page
=
data
.
page
?
data
.
page
:
0
;
data
.
size
=
data
.
size
?
data
.
size
:
1000
;
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
,
true
).
context
;
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
context
,
data
,
isloading
,
localdata
);
}
else
{
result
=
this
.
appEntityService
.
WFSubmit
(
context
,
data
,
isloading
,
localdata
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
reject
(
response
);
});
});
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @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
.
hrorgcontactid
=
PrimaryKey
;
Data
.
hrorgcontact
=
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
.
hrorgcontactid
=
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
=
{},
isMerge
:
boolean
=
false
){
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_PIM/src/widgets/hrorg-contact/main-form/main-form.html
0 → 100644
浏览文件 @
3525e7f8
<i-form
:model=
"this.data"
class=
'app-form'
ref=
'form'
id=
'hrorgcontact_main'
style=
""
>
<input
style=
"display:none;"
/>
<row
>
<tabs
:animated=
"false"
size=
"small"
name=
'main'
:value=
"detailsModel.form.activiedPage"
@
on-click=
"detailsModel.form.clickPage($event)"
>
<tab-pane
v-show=
"detailsModel.formpage1.visible"
name=
'formpage1'
:index=
"0"
tab=
'main'
class=
''
:label=
"(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.hrorgcontact.main_form.details.formpage1')
])
}"
>
<i-col
class=
"form-layout-container"
v-show=
"detailsModel.group1.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
:model=
"detailsModel.group1"
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.hrorgcontact.main_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<app-form-group-data-panel
slot=
"dataInfoPanel"
:model=
"detailsModel.group1"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
/>
<row>
<i-col
class=
"form-layout-container"
v-show=
"detailsModel.hrorgcontactname.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'hrorgcontactname'
:itemRules=
"this.rules.hrorgcontactname"
class=
''
:caption=
"$t('entities.hrorgcontact.main_form.details.hrorgcontactname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.hrorgcontactname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.hrorgcontactname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.hrorgcontactname.disabled"
type=
'text'
style=
""
>
</input-box>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</tab-pane>
<tab-pane
v-show=
"detailsModel.formpage2.visible"
name=
'formpage2'
:index=
"1"
tab=
'main'
class=
''
:label=
"(h) =>{
return h('span',{
class:'caption'
},[
$t('entities.hrorgcontact.main_form.details.formpage2')
])
}"
>
<i-col
class=
"form-layout-container"
v-show=
"detailsModel.group2.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-group
:model=
"detailsModel.group2"
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group2.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.hrorgcontact.main_form.details.group2')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<app-form-group-data-panel
slot=
"dataInfoPanel"
:model=
"detailsModel.group2"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
/>
<row>
<i-col
class=
"form-layout-container"
v-show=
"detailsModel.createman.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'createman'
:itemRules=
"this.rules.createman"
class=
''
:caption=
"$t('entities.hrorgcontact.main_form.details.createman')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.createman.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'createman'
:value=
"data.createman"
dataType=
"TEXT"
:precision=
"0"
tag=
'SysOperator'
codelistType=
'DYNAMIC'
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
>
</app-span>
</app-form-item>
</i-col>
<i-col
class=
"form-layout-container"
v-show=
"detailsModel.createdate.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'createdate'
:itemRules=
"this.rules.createdate"
class=
''
:caption=
"$t('entities.hrorgcontact.main_form.details.createdate')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.createdate.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'createdate'
:value=
"data.createdate"
dataType=
"DATETIME"
valueFormat=
"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"
:precision=
"0"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
>
</app-span>
</app-form-item>
</i-col>
<i-col
class=
"form-layout-container"
v-show=
"detailsModel.updateman.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'updateman'
:itemRules=
"this.rules.updateman"
class=
''
:caption=
"$t('entities.hrorgcontact.main_form.details.updateman')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.updateman.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'updateman'
:value=
"data.updateman"
dataType=
"TEXT"
:precision=
"0"
tag=
'SysOperator'
codelistType=
'DYNAMIC'
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
>
</app-span>
</app-form-item>
</i-col>
<i-col
class=
"form-layout-container"
v-show=
"detailsModel.updatedate.visible"
:style=
"{}"
:lg=
"{ span: 24, offset: 0 }"
>
<app-form-item
name=
'updatedate'
:itemRules=
"this.rules.updatedate"
class=
''
:caption=
"$t('entities.hrorgcontact.main_form.details.updatedate')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.updatedate.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'updatedate'
:value=
"data.updatedate"
dataType=
"DATETIME"
valueFormat=
"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"
:precision=
"0"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'{ }'
:localParam =
'{ }'
style=
""
>
</app-span>
</app-form-item>
</i-col>
</row>
</app-form-group>
</i-col>
</tab-pane>
</tabs>
</row>
</i-form>
\ No newline at end of file
app_PIM/src/widgets/hrorg-contact/main-form/main-form.vue
0 → 100644
浏览文件 @
3525e7f8
<
template
src=
"./main-form.html"
/>
<script
lang=
'tsx'
>
import
{ Component } from 'vue-property-decorator';
import { VueLifeCycleProcessing } from '@/studio-core';
import { MainEditFormBase } from './main-form-base';
/**
* form部件
*
* @export
* @class MainEditForm
* @extends {MainEditFormBase}
*/
@Component({
components: {
}
})
@VueLifeCycleProcessing()
export default class MainEditForm extends MainEditFormBase { }
</script>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录