Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBizEHR
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBizEHR解决方案
iBizEHR
提交
f089fef5
提交
f089fef5
编写于
5月 18, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
451138fd
变更
31
隐藏空白字符变更
内嵌
并排
正在显示
31 个修改的文件
包含
1259 行增加
和
699 行删除
+1259
-699
CHANGELOG.md
app_EHRPim/CHANGELOG.md
+66
-16
app-register.ts
app_EHRPim/src/app-register.ts
+4
-0
app-checkbox-list.vue
...im/src/components/app-checkbox-list/app-checkbox-list.vue
+1
-23
app-column-format.less
...m/src/components/app-column-format/app-column-format.less
+3
-0
app-column-format.vue
...im/src/components/app-column-format/app-column-format.vue
+58
-0
app-form-druipart.vue
...im/src/components/app-form-druipart/app-form-druipart.vue
+11
-1
app-mpicker.vue
app_EHRPim/src/components/app-mpicker/app-mpicker.vue
+43
-6
app-quick-group.less
...HRPim/src/components/app-quick-group/app-quick-group.less
+37
-0
app-quick-group.vue
...EHRPim/src/components/app-quick-group/app-quick-group.vue
+175
-0
app-rich-text-editor.vue
.../components/app-rich-text-editor/app-rich-text-editor.vue
+140
-68
app-span.vue
app_EHRPim/src/components/app-span/app-span.vue
+7
-2
app-user.vue
app_EHRPim/src/components/app-user/app-user.vue
+6
-0
codelist.vue
app_EHRPim/src/components/codelist/codelist.vue
+2
-2
dropdown-list-mpicker.vue
...omponents/dropdown-list-mpicker/dropdown-list-mpicker.vue
+1
-1
app-header-menus.tsx
...crm-core/components/app-header-menus/app-header-menus.tsx
+1
-0
app-layout.tsx
app_EHRPim/src/crm-core/components/app-layout/app-layout.tsx
+1
-1
md-view-engine.ts
app_EHRPim/src/engine/view/md-view-engine.ts
+26
-0
pimeducations.ts
app_EHRPim/src/mock/entity/pimeducations/pimeducations.ts
+6
-6
login.ts
app_EHRPim/src/mock/login/login.ts
+1
-1
entity-service.ts
app_EHRPim/src/service/entity-service.ts
+6
-6
pimarchives-service-base.ts
...HRPim/src/service/pimarchives/pimarchives-service-base.ts
+50
-50
pimperson-service-base.ts
app_EHRPim/src/service/pimperson/pimperson-service-base.ts
+513
-513
index.ts
app_EHRPim/src/store/index.ts
+3
-1
actions.ts
app_EHRPim/src/store/modules/unified-resource/actions.ts
+14
-0
getters.ts
app_EHRPim/src/store/modules/unified-resource/getters.ts
+20
-0
index.ts
app_EHRPim/src/store/modules/unified-resource/index.ts
+16
-0
mutations.ts
app_EHRPim/src/store/modules/unified-resource/mutations.ts
+22
-0
state.ts
app_EHRPim/src/store/modules/unified-resource/state.ts
+9
-0
app-modal.less
app_EHRPim/src/utils/app-modal/app-modal.less
+3
-0
auth-guard.ts
app_EHRPim/src/utils/auth-guard/auth-guard.ts
+13
-1
http.ts
app_EHRPim/src/utils/http/http.ts
+1
-1
未找到文件。
app_EHRPim/CHANGELOG.md
浏览文件 @
f089fef5
## v7.0.0-alpha.
2 [2020-5-7
]
## v7.0.0-alpha.
3 [2020-5-14
]
### Bug修复
分页导航栏添加图标配置
分页导航栏传递srfparentdename和srfparentkey问题
提交流程、启动流程刷新表格数据问题
修复视图自定义导航参数大小写问题
修复批添加功能
修复树部件查询数据集合异常处理
修复图表排序问题
修复富文本国际化切换失效
修复代码表代码项图标和数据
修复数据多项选择视图UI逻辑不匹配
修复列表高度异常
工具栏按钮样式支持
修复树节点上下文
修复表格(视图)高度,滚动条问题
修复表单loaddraft服务仿真主键丢失修复
修复user显示名称逻辑
修复issue地址为正式环境地址
模态边距样式调整
### 功能新增及优化
#### 模板
表格文件上传信息显示
搜索面板布局优化
批添加、批删除
表格checkbox宽度优化
富文本信息模式
选择类视图不显示标题
更新默认值
补充树节点关系导航上下文,导航参数上下文
看板视图默认卡片模式,支持无缝模式
模态时视图样式调整
树导航样式调整
增加菜单权限
表格样式调整
增加快速分组搜索或快速搜索表单功能
拖拽样式修改
增加表格内置工具栏
代码表多选控件分割符从分号转化为逗号
#### 基础文件
看板视图默认卡片模式,支持无缝模式
登录页面调整
增加数据选择类插件表格呈现插件
## v7.0.0-alpha.2 [2020-5-7]
### Bug修复
分页导航栏添加图标配置
### 功能新增及优化
#### 模板
表格文件上传信息显示
用户名识别
批添加、批删除
实体工作流动态视图
实体工作流动态导航表格视图
富文本信息模式
工具栏按钮样式支持
更新默认值
#### 基础文件
表格文件上传信息显示
模态边距样式调整
实体工作流动态视图
实体工作流动态导航表格视图
## v7.0.0-alpha.1 [2020-4-29]
...
...
app_EHRPim/src/app-register.ts
浏览文件 @
f089fef5
...
...
@@ -69,6 +69,8 @@ import AppImagePreview from './components/app-image-preview/app-image-preview.vu
import
AppFormatData
from
'./components/app-format-data/app-format-data.vue'
import
AppUploadFileInfo
from
'./components/app-upload-file-info/app-upload-file-info.vue'
import
ContextMenu
from
'./components/context-menu/context-menu'
import
AppColumnFormat
from
'./components/app-column-format/app-column-format.vue'
import
AppQuickGroup
from
'./components/app-quick-group/app-quick-group.vue'
// 全局挂载UI实体服务注册中心
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
...
...
@@ -147,5 +149,7 @@ export const AppComponents = {
v
.
component
(
'app-format-data'
,
AppFormatData
);
v
.
component
(
'app-upload-file-info'
,
AppUploadFileInfo
);
v
.
component
(
'context-menu'
,
ContextMenu
);
v
.
component
(
'app-column-format'
,
AppColumnFormat
);
v
.
component
(
'app-quick-group'
,
AppQuickGroup
);
},
};
\ No newline at end of file
app_EHRPim/src/components/app-checkbox-list/app-checkbox-list.vue
浏览文件 @
f089fef5
...
...
@@ -43,7 +43,7 @@ export default class AppCheckBox extends Vue {
* @type {string}
* @memberof AppCheckBox
*/
@
Prop
({
default
:
'
;
'
})
public
valueSeparator
?:
string
;
@
Prop
({
default
:
'
,
'
})
public
valueSeparator
?:
string
;
/**
* 是否禁用
...
...
@@ -97,28 +97,6 @@ export default class AppCheckBox extends Vue {
}
}
/**
* 分隔符
*
* @type {*}
* @memberof AppCheckBox
*/
@
Prop
()
separator
:
any
;
/**
* 获取分隔符
*
* @readonly
* @memberof AppCheckBox
*/
get
currentseparator
()
{
if
(
this
.
separator
)
{
return
this
.
separator
;
}
else
{
return
';'
;
}
}
/**
* 选中值
*
...
...
app_EHRPim/src/components/app-column-format/app-column-format.less
0 → 100644
浏览文件 @
f089fef5
.app-column-format{
display: inline-block;
}
\ No newline at end of file
app_EHRPim/src/components/app-column-format/app-column-format.vue
0 → 100644
浏览文件 @
f089fef5
<
template
>
<div
class=
"app-column-format"
>
{{
text
}}
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
,
Watch
}
from
"vue-property-decorator"
;
/**
* 表格列格式化json数组,数据格式为"[{"srfkey":"001","srfmajortext":"TEST1"},{"srfkey":"002","srfmajortext":"TEST2"}......]"
*/
@
Component
({
})
export
default
class
AppColumnFormat
extends
Vue
{
/**
* 值
* @type {any}
* @memberof AppColumnFormat
*/
@
Prop
()
public
value
?:
any
;
/**
* 显示文本
* @type {any}
* @memberof AppColumnFormat
*/
get
text
(){
if
(
this
.
value
){
let
returnStr
:
string
=
""
;
let
tempData
:
Array
<
any
>
=
[];
if
(
typeof
(
this
.
value
)
===
'string'
){
tempData
=
JSON
.
parse
(
this
.
value
);
}
else
{
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
value
));
}
tempData
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
if
(
index
>
0
){
returnStr
+=
"、"
;
}
returnStr
+=
item
.
srfmajortext
;
})
return
returnStr
;
}
else
{
return
""
;
}
}
}
</
script
>
<
style
lang=
'less'
>
@import "./app-column-format.less";
</
style
>
\ No newline at end of file
app_EHRPim/src/components/app-form-druipart/app-form-druipart.vue
浏览文件 @
f089fef5
...
...
@@ -47,6 +47,14 @@ export default class AppFormDRUIPart extends Vue {
*/
@
Prop
({
default
:
''
})
public
refreshitems
!
:
string
;
/**
* 禁止加载
*
* @type {string}
* @memberof AppFormDRUIPart
*/
@
Prop
({
default
:
false
})
public
isForbidLoad
!
:
boolean
;
/**
* 关系视图类型
*
...
...
@@ -254,7 +262,9 @@ export default class AppFormDRUIPart extends Vue {
this
.
blockUIStop
();
}
}
this
.
formDruipart
.
next
({
action
:
'load'
,
data
:{
srfparentdename
:
this
.
parentName
,
srfparentkey
:
_paramitem
}});
if
(
!
this
.
isForbidLoad
){
this
.
formDruipart
.
next
({
action
:
'load'
,
data
:{
srfparentdename
:
this
.
parentName
,
srfparentkey
:
_paramitem
}});
}
}
/**
...
...
app_EHRPim/src/components/app-mpicker/app-mpicker.vue
浏览文件 @
f089fef5
...
...
@@ -123,12 +123,12 @@ export default class AppMpicker extends Vue {
* @param newVal
* @param val
*/
@
Watch
(
'curvalue'
,
{
deep
:
true
})
@
Watch
(
'curvalue'
,
{
immediate
:
true
,
deep
:
true
})
oncurvalueChange
(
newVal
:
any
,
val
:
any
)
{
this
.
value
=
[];
this
.
selectItems
=
[];
if
(
newVal
)
{
this
.
selectItems
=
JSON
.
parse
(
newVal
);
this
.
selectItems
=
this
.
parseValue
(
JSON
.
parse
(
newVal
)
);
this
.
selectItems
.
forEach
((
item
:
any
)
=>
{
this
.
value
.
push
(
item
[
this
.
deKeyField
]);
let
index
=
this
.
items
.
findIndex
((
i
)
=>
Object
.
is
(
i
[
this
.
deKeyField
],
item
[
this
.
deKeyField
]));
...
...
@@ -187,7 +187,7 @@ export default class AppMpicker extends Vue {
let
index
=
this
.
items
.
findIndex
((
item
)
=>
Object
.
is
(
item
[
this
.
deKeyField
],
select
));
if
(
index
>=
0
)
{
let
item
=
this
.
items
[
index
];
val
.
push
({
[
this
.
deKeyField
]:
item
[
this
.
deKeyField
],
[
this
.
deMajorField
]:
item
.
text
});
val
.
push
({
[
this
.
deKeyField
]:
item
[
this
.
deKeyField
],
[
this
.
deMajorField
]:
item
[
this
.
deMajorField
]
});
}
else
{
index
=
this
.
selectItems
.
findIndex
((
item
:
any
)
=>
Object
.
is
(
item
[
this
.
deKeyField
],
select
));
if
(
index
>=
0
)
{
...
...
@@ -196,7 +196,7 @@ export default class AppMpicker extends Vue {
}
}
});
let
value
=
val
.
length
>
0
?
JSON
.
stringify
(
val
)
:
''
;
let
value
=
val
.
length
>
0
?
JSON
.
stringify
(
this
.
formatValue
(
val
)
)
:
''
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
value
});
}
}
...
...
@@ -211,7 +211,7 @@ export default class AppMpicker extends Vue {
let
index
=
this
.
selectItems
.
findIndex
((
item
:
any
)
=>
Object
.
is
(
item
[
this
.
deKeyField
],
tag
));
if
(
index
>=
0
)
{
this
.
selectItems
.
splice
(
index
,
1
);
let
value
=
this
.
selectItems
.
length
>
0
?
JSON
.
stringify
(
this
.
selectItems
)
:
''
;
let
value
=
this
.
selectItems
.
length
>
0
?
JSON
.
stringify
(
this
.
formatValue
(
this
.
selectItems
)
)
:
''
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
value
});
}
}
...
...
@@ -256,13 +256,50 @@ export default class AppMpicker extends Vue {
});
}
if
(
this
.
name
&&
this
.
activeData
)
{
let
value
=
selects
.
length
>
0
?
JSON
.
stringify
(
selects
)
:
''
;
let
value
=
selects
.
length
>
0
?
JSON
.
stringify
(
this
.
formatValue
(
selects
)
)
:
''
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
value
});
}
})
}
}
/**
* 解析值,把srfkey和srfmajortext解析成实体属性名
*
* @param {any[]} value 需要转换的数组
* @memberof AppMpicker
*/
public
parseValue
(
value
:
any
[]){
let
result
=
[];
if
(
this
.
deKeyField
!==
"srfkey"
||
this
.
deMajorField
!==
"srfmajortext"
){
value
.
forEach
((
item
:
any
)
=>
{
result
.
push
({[
this
.
deMajorField
]:
item
.
srfmajortext
,
[
this
.
deKeyField
]:
item
.
srfkey
});
});
}
else
{
result
=
value
;
}
return
result
;
}
/**
* 格式化值,把实体属性名格式化成srfkey和srfmajortext
*
* @param {any[]} value 需要转换的数组
* @memberof AppMpicker
*/
public
formatValue
(
value
:
any
[]){
let
result
=
[];
if
(
this
.
deKeyField
!==
"srfkey"
||
this
.
deMajorField
!==
"srfmajortext"
){
value
.
forEach
((
item
:
any
)
=>
{
result
.
push
({
srfmajortext
:
item
[
this
.
deMajorField
],
srfkey
:
item
[
this
.
deKeyField
]});
});
}
else
{
result
=
value
;
}
return
result
;
}
}
</
script
>
<
style
lang=
"less"
>
...
...
app_EHRPim/src/components/app-quick-group/app-quick-group.less
0 → 100644
浏览文件 @
f089fef5
.app-quick-group{
padding: 4px;
background-color: #F1F1F1;
.app-quick-item{
margin-right: 8px;
padding: 8px;
cursor: pointer;
.app-quick-item-label{
margin-left:4px;
}
.app-seleted-item{
display: inline-block;
font-weight: 700;
color: #0c64eb !important;
padding: 4px;
border-bottom: 2px solid;
}
.app-seleted-item:focus {
outline: none;
}
.app-quick-item-counter{
border-radius: 12px;
padding-left: 4px;
font-size: 12px;
font-weight: 400;
vertical-align: middle;
display: inline-block;
width: 18px;
height: 18px;
margin-left: 4px;
background-color: #ddd;
}
}
.app-quick-item :hover{
color: #0c64eb !important;
}
}
\ No newline at end of file
app_EHRPim/src/components/app-quick-group/app-quick-group.vue
0 → 100644
浏览文件 @
f089fef5
<
template
>
<div
class=
"app-quick-group"
>
<span
class=
"app-quick-item"
v-for=
"item in renderArray"
:key=
"item.id"
@
click=
"handleClick(item)"
>
<span
v-if=
"!item.children"
:style=
"
{color:item.color}" :class="{'app-seleted-item':isSelectedItem(item)}">
<i
v-if=
" item.iconcls && !Object.is(item.iconcls, '')"
:class=
"item.iconcls"
></i>
<img
v-else-if=
"item.icon && !Object.is(item.icon, '')"
:src=
"item.icon"
/>
<span
class=
"app-quick-item-label"
>
{{
item
.
label
}}
</span>
<span
v-show=
"isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename]"
class=
"app-quick-item-counter"
>
{{
itemTag
(
item
)
}}
</span>
</span>
<el-dropdown
v-if=
"item.children"
style=
"outline: none !important;"
trigger=
"click"
@
command=
"handleCommand($event,item)"
>
<span
:style=
"
{color:item.color}" :class="{'app-seleted-item':isSelectedItem(item)}">
<i
v-if=
" item.iconcls && !Object.is(item.iconcls, '')"
:class=
"item.iconcls"
></i>
<img
v-else-if=
"item.icon && !Object.is(item.icon, '')"
:src=
"item.icon"
/>
<span
class=
"app-quick-item-label"
>
{{
item
.
label
}}
</span>
<span
v-show=
"isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename]"
class=
"app-quick-item-counter"
>
{{
itemTag
(
item
)
}}
</span>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
v-for=
"childitem in item.children"
:command=
"childitem"
:key=
"childitem.id"
>
<span
:style=
"
{color:childitem.color}">
<i
v-if=
" childitem.iconcls && !Object.is(childitem.iconcls, '')"
:class=
"childitem.iconcls"
></i>
<img
v-else-if=
"childitem.icon && !Object.is(childitem.icon, '')"
:src=
"childitem.icon"
/>
<span
:style=
"
{color:(childitem.label == item.label)?'#0c64eb':''}">
{{
childitem
.
label
}}
</span>
</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</span>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
}
from
"vue-property-decorator"
;
@
Component
({})
export
default
class
AppQuickGroup
extends
Vue
{
/**
* 传入渲染项
*
* @type {Array<any>}
* @memberof AppQuickGroup
*/
@
Prop
()
public
items
!
:
Array
<
any
>
;
/**
* 计数器服务名
*
* @type {string}
* @memberof AppQuickGroup
*/
@
Prop
()
public
counterService
?:
any
;
/**
* UI选中项
*
* @type {*}
* @memberof AppQuickGroup
*/
public
selectedUiItem
:
any
;
/**
* 传入渲染项
*
* @type {Array<any>}
* @memberof AppQuickGroup
*/
get
renderArray
(){
if
(
this
.
items
&&
this
.
items
.
length
>
0
){
this
.
selectedUiItem
=
this
.
items
[
0
];
this
.
handleClick
(
this
.
items
[
0
]);
return
this
.
handleDataSet
(
this
.
items
)
}
else
{
return
[];
}
}
public
itemTag
(
item
:
any
){
if
(
this
.
counterService
&&
this
.
counterService
.
counterData
&&
item
.
codename
){
return
this
.
counterService
.
counterData
[
item
.
codename
];
}
else
{
return
""
;
}
}
/**
* 是否选中当前项
*
* @param item 传入当前项
* @memberof AppQuickGroup
*/
public
isSelectedItem
(
item
:
any
){
if
(
this
.
selectedUiItem
&&
(
this
.
selectedUiItem
.
id
===
item
.
id
)){
return
true
;
}
else
{
return
false
;
}
}
/**
* 处理代码表返回数据(树状结构)
*
* @param result 返回数组
* @memberof AppQuickGroup
*/
public
handleDataSet
(
result
:
Array
<
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
);
}
})
return
list
;
}
/**
* 处理非根节点数据
*
* @param pValue 父值
* @param result 返回数组
* @param codeItem 代码项
* @memberof AppQuickGroup
*/
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
);
}
})
}
/**
* 处理点击事件
*
* @param $event 值
* @param isswitch 是否切换UI选中项
* @memberof AppQuickGroup
*/
public
handleClick
(
$event
:
any
,
isswitch
:
boolean
=
true
){
this
.
$emit
(
'valuechange'
,
$event
);
if
(
isswitch
){
this
.
selectedUiItem
=
$event
;
}
this
.
$forceUpdate
();
}
/**
* 处理子项点击事件
*
* @param $event 值
* @param item 父值
* @memberof AppQuickGroup
*/
public
handleCommand
(
$event
:
any
,
item
:
any
){
item
.
label
=
$event
.
label
;
item
.
codename
=
$event
.
codename
;
this
.
handleClick
(
$event
,
false
);
}
}
</
script
>
<
style
lang=
'less'
>
@import "./app-quick-group.less";
</
style
>
\ No newline at end of file
app_EHRPim/src/components/app-rich-text-editor/app-rich-text-editor.vue
浏览文件 @
f089fef5
...
...
@@ -26,94 +26,112 @@ const tinymceCode:any = tinymce;
@
Component
({})
export
default
class
AppRichTextEditor
extends
Vue
{
/**
* 传入值
*
* @type {*}
* @memberof AppRichTextEditor
*/
@
Prop
()
value
?:
any
;
/**
* 监听value值
*/
@
Watch
(
'value'
,
{
immediate
:
true
,
deep
:
true
})
oncurrentContent
(
newval
:
any
,
val
:
any
)
{
if
(
newval
)
{
if
(
this
.
editor
){
tinymceCode
.
remove
(
'#'
+
this
.
id
);
}
this
.
init
(
newval
);
}
}
/**
* 输入name
*
* @type {string}
* @memberof AppRichTextEditor
*/
@
Prop
()
name
?:
string
;
/**
* 输入高度
*
* @type {*}
* @memberof AppRichTextEditor
*/
@
Prop
()
height
?:
any
;
/**
* 是否禁用
*
* @type {boolean}
* @memberof AppRichTextEditor
*/
@
Prop
()
disabled
?:
any
;
/**
* 当前语言,默认中文
*/
public
langu
:
any
=
localStorage
.
getItem
(
'local'
)
?
localStorage
.
getItem
(
'local'
)
:
'zh_CN'
;
@
Prop
()
disabled
?:
boolean
;
/**
* 监听语言变化
*/
@
Watch
(
'$i18n.locale'
)
onLocaleChange
(
newval
:
any
,
val
:
any
)
{
console
.
log
(
"语言变更"
+
newval
)
this
.
langu
=
newval
;
if
(
this
.
editor
){
tinymceCode
.
remove
(
'#'
+
this
.
id
);
}
this
.
init
(
''
);
}
/**
* 语言映射文件
* 表单状态
*
* @type {Subject<any>}
* @memberof AppRichTextEditor
*/
public
languMap
:
any
=
{
'zh-CN'
:
'zh_CN'
,
'en-US'
:
'en_US'
,
};
@
Prop
()
public
formState
?:
Subject
<
any
>
;
/**
* 上传文件路径
*
* @type {string}
* @memberof AppRichTextEditor
*/
public
uploadUrl
=
Environment
.
BaseUrl
+
Environment
.
UploadFile
;
/**
* 下载路径
*
* @type {string}
* @memberof AppRichTextEditor
*/
public
downloadUrl
=
Environment
.
BaseUrl
+
Environment
.
ExportFile
;
/**
* 当前富文本
*
* @type {*}
* @memberof AppRichTextEditor
*/
public
editor
:
any
=
null
;
/**
* 当前富文本id
*
* @type {string}
* @memberof AppRichTextEditor
*/
id
:
string
=
this
.
$util
.
createUUID
();
public
id
:
string
=
this
.
$util
.
createUUID
();
/**
*
表单状态
*
* @type {
Subject<any>
}
*
当前语言,默认中文
*
* @type {
*
}
* @memberof AppRichTextEditor
*/
@
Prop
()
public
formState
?:
Subject
<
any
>
;
public
langu
:
any
=
localStorage
.
getItem
(
'local'
)
?
localStorage
.
getItem
(
'local'
)
:
'zh_CN'
;
/**
* 语言映射文件
*
* @type {*}
* @memberof AppRichTextEditor
*/
public
languMap
:
any
=
{
'zh-CN'
:
'zh_CN'
,
'en-US'
:
'en_US'
,
};
/**
* 是否处于激活状态
*
* @type {boolean}
* @memberof AppRichTextEditor
*/
public
isActived
:
boolean
=
true
;
/**
* 是否需要初始化
*
* @type {boolean}
* @memberof AppRichTextEditor
*/
public
isNeedInit
:
boolean
=
false
;
/**
* 生命周期
...
...
@@ -125,40 +143,92 @@ export default class AppRichTextEditor extends Vue {
this
.
formState
.
subscribe
(({
type
,
data
})
=>
{
if
(
Object
.
is
(
'load'
,
type
))
{
if
(
!
this
.
value
)
{
if
(
this
.
editor
){
tinymceCode
.
remove
(
'#'
+
this
.
id
);
}
this
.
init
(
this
.
value
);
this
.
init
();
}
}
});
}
}
/**
* 生命周期:激活
*
* @memberof AppRichTextEditor
*/
public
activated
(){
this
.
isActived
=
true
;
if
(
this
.
isNeedInit
){
this
.
init
();
this
.
isNeedInit
=
false
;
}
}
/**
* 初始化富文本
* 生命周期:缓存
*
* @memberof AppRichTextEditor
*/
public
deactivated
(){
this
.
isActived
=
false
;
}
/**
* 生命周期:初始化富文本
*
* @memberof AppRichTextEditor
*/
public
mounted
()
{
this
.
init
(
''
);
this
.
init
();
}
/**
* 销毁富文本
* 生命周期:销毁富文本
*
* @memberof AppRichTextEditor
*/
public
destoryed
(){
tinymceCode
.
remove
(
this
.
editor
);
if
(
this
.
editor
){
tinymceCode
.
remove
(
'#'
+
this
.
id
);
}
}
/**
* 监听value值
*
* @memberof AppRichTextEditor
*/
@
Watch
(
'value'
,
{
immediate
:
true
,
deep
:
true
})
oncurrentContent
(
newval
:
any
,
val
:
any
)
{
if
(
newval
)
{
this
.
init
();
}
}
/**
* 监听语言变化
*/
@
Watch
(
'$i18n.locale'
)
onLocaleChange
(
newval
:
any
,
val
:
any
)
{
this
.
langu
=
newval
;
if
(
this
.
isActived
){
this
.
init
();
}
else
{
this
.
isNeedInit
=
true
;
}
}
/**
* 初始化富文本
* @param val
*
* @memberof AppRichTextEditor
*/
public
init
(
val
:
any
)
{
public
init
()
{
this
.
destoryed
();
let
richtexteditor
=
this
;
tinymceCode
.
init
({
selector
:
'#'
+
this
.
id
,
selector
:
'#'
+
richtexteditor
.
id
,
width
:
'calc( 100% - 2px )'
,
height
:
this
.
height
,
height
:
richtexteditor
.
height
,
min_height
:
400
,
branding
:
false
,
plugins
:
[
'link'
,
'paste'
,
'table'
,
'image'
,
'codesample'
,
'code'
,
'fullscreen'
,
'preview'
],
...
...
@@ -177,13 +247,13 @@ export default class AppRichTextEditor extends Vue {
paste_data_images
:
true
,
codesample_content_css
:
'assets/tinymce/prism.css'
,
skin_url
:
'./assets/tinymce/skins/lightgray'
,
language_url
:
'./assets/tinymce/langs/'
+
this
.
languMap
[
this
.
langu
]
+
'.js'
,
language
:
this
.
languMap
[
this
.
langu
],
language_url
:
'./assets/tinymce/langs/'
+
richtexteditor
.
languMap
[
richtexteditor
.
langu
]
+
'.js'
,
language
:
richtexteditor
.
languMap
[
richtexteditor
.
langu
],
setup
:
(
editor
:
any
)
=>
{
this
.
editor
=
editor
;
richtexteditor
.
editor
=
editor
;
editor
.
on
(
'blur'
,
()
=>
{
const
content
=
editor
.
getContent
();
this
.
$emit
(
'change'
,
content
);
richtexteditor
.
$emit
(
'change'
,
content
);
});
},
images_upload_handler
:
(
bolbinfo
:
any
,
success
:
any
,
failure
:
any
)
=>
{
...
...
@@ -202,13 +272,13 @@ export default class AppRichTextEditor extends Vue {
});
},
init_instance_callback
:
(
editor
:
any
)
=>
{
this
.
editor
=
editor
;
let
value
=
(
this
.
value
&&
this
.
value
.
length
>
0
)
?
this
.
value
:
''
;
if
(
this
.
editor
)
{
this
.
editor
.
setContent
(
value
);
richtexteditor
.
editor
=
editor
;
let
value
=
(
richtexteditor
.
value
&&
richtexteditor
.
value
.
length
>
0
)
?
richtexteditor
.
value
:
''
;
if
(
richtexteditor
.
editor
)
{
richtexteditor
.
editor
.
setContent
(
value
);
}
if
(
this
.
disabled
)
{
this
.
editor
.
setMode
(
'readonly'
);
if
(
richtexteditor
.
disabled
)
{
richtexteditor
.
editor
.
setMode
(
'readonly'
);
}
}
});
...
...
@@ -216,8 +286,10 @@ export default class AppRichTextEditor extends Vue {
/**
* 上传文件
* @param url
* @param formData
*
* @param url 路径
* @param formData 文件对象
* @memberof AppRichTextEditor
*/
public
uploadFile
(
url
:
string
,
formData
:
any
)
{
let
_this
=
this
;
...
...
app_EHRPim/src/components/app-span/app-span.vue
浏览文件 @
f089fef5
...
...
@@ -55,14 +55,14 @@ export default class AppSpan extends Vue {
* @type {boolean}
* @memberof AppSpan
*/
@
Prop
({
default
:
"、"
})
public
textSeparator
?:
string
;
@
Prop
({
default
:
'、'
})
public
textSeparator
?:
string
;
/**
* 值分隔符
* @type {boolean}
* @memberof AppSpan
*/
@
Prop
({
default
:
";"
})
public
valueSeparator
?:
string
;
@
Prop
({
default
:
','
})
public
valueSeparator
?:
string
;
/**
* 监控表单属性 data 值
...
...
@@ -108,6 +108,11 @@ export default class AppSpan extends Vue {
public
load
(){
if
(
!
this
.
value
||
this
.
tag
){
return
;
//代码表走codelist组件
}
else
if
(
this
.
editorType
===
"ADDRESSPICKUP"
){
JSON
.
parse
(
this
.
value
).
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
text
+=
index
===
0
?
item
.
srfmajortext
:
","
+
item
.
srfmajortext
;
});
}
else
{
this
.
text
=
this
.
value
;
}
...
...
app_EHRPim/src/components/app-user/app-user.vue
浏览文件 @
f089fef5
...
...
@@ -64,6 +64,12 @@ export default class AppUser extends Vue {
_user
.
avatar
=
this
.
$store
.
getters
.
getAppData
().
context
.
srfusericonpath
;
}
}
if
(
localStorage
.
getItem
(
"user"
)){
let
user
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)
as
string
);
if
(
user
&&
user
.
personname
){
_user
.
name
=
user
.
personname
;
}
}
Object
.
assign
(
this
.
user
,
_user
,{
time
:
+
new
Date
});
...
...
app_EHRPim/src/components/codelist/codelist.vue
浏览文件 @
f089fef5
...
...
@@ -61,14 +61,14 @@ export default class CodeList extends Vue {
* @type {boolean}
* @memberof SelectPicker
*/
@
Prop
({
default
:
"、"
})
public
textSeparator
?:
string
;
@
Prop
({
default
:
'、'
})
public
textSeparator
?:
string
;
/**
* 值分隔符
* @type {boolean}
* @memberof SelectPicker
*/
@
Prop
({
default
:
";"
})
public
valueSeparator
?:
string
;
@
Prop
({
default
:
','
})
public
valueSeparator
?:
string
;
/**
* 是否为空
...
...
app_EHRPim/src/components/dropdown-list-mpicker/dropdown-list-mpicker.vue
浏览文件 @
f089fef5
...
...
@@ -60,7 +60,7 @@ export default class DropDownListMpicker extends Vue {
* @type {string}
* @memberof DropDownListMpicker
*/
@
Prop
({
default
:
'
;
'
})
public
valueSeparator
?:
string
;
@
Prop
({
default
:
'
,
'
})
public
valueSeparator
?:
string
;
/**
* 是否禁用
...
...
app_EHRPim/src/crm-core/components/app-header-menus/app-header-menus.tsx
浏览文件 @
f089fef5
...
...
@@ -192,6 +192,7 @@ export class AppHeaderMenus extends Vue {
* @memberof AppHeaderMenus
*/
protected
renderMenuItem
(
item
:
any
):
any
{
item
.
class
=
item
.
class
?
item
.
class
:
""
;
if
(
Object
.
is
(
this
.
mode
,
'default'
))
{
if
(
item
.
caption
&&
!
Object
.
is
(
item
.
caption
,
''
))
{
return
<
div
class=
{
"app-header-menu-item text"
+
item
.
class
}
disabled=
{
item
.
disabled
}
on
-
click=
{
()
=>
this
.
menuClick
(
item
)
}
>
...
...
app_EHRPim/src/crm-core/components/app-layout/app-layout.tsx
浏览文件 @
f089fef5
...
...
@@ -116,7 +116,7 @@ export class AppLayout extends Vue {
if
(
Object
.
is
(
this
.
layoutMode
,
'VIEW'
)
&&
Object
.
is
(
this
.
openMode
,
'DEFAULT'
))
{
Object
.
assign
(
this
.
className
,
{
'crm-app-view'
:
true
,
'no-caption-bar'
:
(
!
this
.
isShowCaptionBar
&&
!
this
.
isShowToolbar
)
});
return
<
div
class=
{
this
.
className
}
>
{
(
!
this
.
isShowCaptionBar
&&
!
this
.
isShowToolbar
)
?
null
:
<
div
class=
"crm-app-view-header-wrapper"
>
{
(
!
this
.
isShowCaptionBar
&&
!
this
.
isShowToolbar
)
?
null
:
<
div
class=
"crm-app-view-header-wrapper"
>
{
this
.
isShowCaptionBar
?
<
div
class=
"crm-app-view-header-left-wrapper"
>
{
this
.
$slots
.
headerLeft
}
</
div
>
:
null
}
...
...
app_EHRPim/src/engine/view/md-view-engine.ts
浏览文件 @
f089fef5
...
...
@@ -117,6 +117,9 @@ export default class MDViewEngine extends ViewEngine {
if
(
Object
.
is
(
eventName
,
'load'
))
{
this
.
onSearchFormLoad
(
args
);
}
if
(
Object
.
is
(
eventName
,
'search'
))
{
this
.
onSearchFormLoad
(
args
);
}
}
/**
...
...
@@ -157,6 +160,20 @@ export default class MDViewEngine extends ViewEngine {
this
.
isLoadDefault
=
true
;
}
/**
* 搜索表单搜索
*
* @param {*} [args={}]
* @memberof MDViewEngine
*/
public
onSearchFormSearch
(
args
:
any
=
{}):
void
{
if
(
this
.
getMDCtrl
()
&&
this
.
isLoadDefault
)
{
const
tag
=
this
.
getMDCtrl
().
name
;
this
.
setViewState2
({
tag
:
tag
,
action
:
'load'
,
viewdata
:
this
.
view
.
viewparams
});
}
this
.
isLoadDefault
=
true
;
}
/**
* 处理实体界面行为
*
...
...
@@ -372,6 +389,15 @@ export default class MDViewEngine extends ViewEngine {
if
(
this
.
view
&&
!
this
.
view
.
isExpandSearchForm
)
{
Object
.
assign
(
arg
,
{
query
:
this
.
view
.
query
});
}
// 快速分组和快速搜索栏
let
otherQueryParam
:
any
=
{};
if
(
this
.
view
&&
this
.
view
.
qucikGroupData
){
Object
.
assign
(
otherQueryParam
,
this
.
view
.
qucikGroupData
);
}
if
(
this
.
view
&&
this
.
view
.
qucikFormData
){
Object
.
assign
(
otherQueryParam
,
this
.
view
.
qucikFormData
);
}
Object
.
assign
(
arg
,{
viewparams
:
otherQueryParam
});
}
/**
...
...
app_EHRPim/src/mock/entity/pimeducations/pimeducations.ts
浏览文件 @
f089fef5
...
...
@@ -4,12 +4,12 @@ const mock = MockAdapter.getInstance();
// 模拟数据
const
mockDatas
:
Array
<
any
>
=
[
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
46:07"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"1"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息"
,
"pimeducationid"
:
"1"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:46:07
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
},
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
46:07"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"2"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息(1)"
,
"pimeducationid"
:
"2"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:46:07
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
},
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
46:07"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"3"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息(2)"
,
"pimeducationid"
:
"3"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:46:07
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
},
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
46:07"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"4"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息(3)"
,
"pimeducationid"
:
"4"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:46:07
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
},
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
46:07"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"5"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息(4)"
,
"pimeducationid"
:
"5"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:46:07
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
},
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
46:07"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"6"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息(5)"
,
"pimeducationid"
:
"6"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:46:07
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
}
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
55:01"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"1"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息"
,
"pimeducationid"
:
"1"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:55:01
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
},
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
55:01"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"2"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息(1)"
,
"pimeducationid"
:
"2"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:55:01
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
},
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
55:01"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"3"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息(2)"
,
"pimeducationid"
:
"3"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:55:01
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
},
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
55:01"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"4"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息(3)"
,
"pimeducationid"
:
"4"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:55:01
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
},
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
55:01"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"5"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息(4)"
,
"pimeducationid"
:
"5"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:55:01
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
},
{
"sxzy"
:
null
,
"jlczz"
:
null
,
"ygbh"
:
null
,
"ormorgsectorid"
:
null
,
"bz"
:
null
,
"reason"
:
null
,
"xl"
:
null
,
"xkml"
:
null
,
"jymc"
:
null
,
"jssj"
:
null
,
"ormorgid"
:
null
,
"bdwgznx"
:
null
,
"createdate"
:
"2020-05-18 18:
55:01"
,
"enable"
:
1
,
"updateman"
:
"示例操作者"
,
"zjxtgznx"
:
null
,
"srfkey"
:
"6"
,
"gznx"
:
null
,
"cjgzsj"
:
null
,
"qssj"
:
null
,
"fj"
:
null
,
"pimeducationname"
:
"教育信息(5)"
,
"pimeducationid"
:
"6"
,
"orgid"
:
null
,
"bjgznx"
:
null
,
"xllx"
:
null
,
"spstate"
:
null
,
"jlss"
:
null
,
"byyx"
:
null
,
"orgsectorid"
:
null
,
"tozjdate"
:
null
,
"btz"
:
null
,
"pimpersonid"
:
null
,
"sfdyxl"
:
null
,
"xxxz"
:
null
,
"xlcx"
:
null
,
"sfzgxl"
:
null
,
"jlspzt"
:
null
,
"xwz"
:
null
,
"degree"
:
null
,
"jlglbh"
:
null
,
"dbdwsj"
:
null
,
"dzjbjsj"
:
null
,
"updatedate"
:
"2020-05-18 18:55:01
"
,
"createman"
:
"示例操作者"
,
"pimpersonname"
:
null
}
];
...
...
app_EHRPim/src/mock/login/login.ts
浏览文件 @
f089fef5
...
...
@@ -14,7 +14,7 @@ mock.onPost('v7/login').reply((config: any) => {
}
catch
(
error
)
{
status
=
400
;
}
if
(
!
Object
.
is
(
user
.
loginname
,
'
ibzadmin'
)
||
!
Object
.
is
(
user
.
password
,
'123456
'
))
{
if
(
!
Object
.
is
(
user
.
loginname
,
'
guest'
)
||
!
Object
.
is
(
user
.
password
,
'guest
'
))
{
status
=
400
;
}
if
(
status
!==
200
)
{
...
...
app_EHRPim/src/service/entity-service.ts
浏览文件 @
f089fef5
...
...
@@ -587,12 +587,12 @@ export default class EntityService {
* createBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data
={}
]
* @param {*} [data]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public
async
createBatch
(
context
:
any
=
{},
data
:
any
=
{}
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
createBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/
${
this
.
APPDENAME
}
/batch`
,
data
,
isloading
);
}
...
...
@@ -600,12 +600,12 @@ export default class EntityService {
* updateBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data
={}
]
* @param {*} [data]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public
async
updateBatch
(
context
:
any
=
{},
data
:
any
=
{}
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
updateBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
put
(
`/
${
this
.
APPDENAME
}
/batch`
,
data
,
isloading
);
}
...
...
@@ -613,12 +613,12 @@ export default class EntityService {
* removeBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data
={}
]
* @param {*} [data]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public
async
removeBatch
(
context
:
any
=
{},
data
:
any
=
{}
,
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
removeBatch
(
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/
${
this
.
APPDENAME
}
/batch`
,
isloading
,
data
);
}
...
...
app_EHRPim/src/service/pimarchives/pimarchives-service-base.ts
浏览文件 @
f089fef5
...
...
@@ -85,9 +85,9 @@ export default class PIMARCHIVESServiceBase extends EntityService {
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/pimarchives/getdraft`
,
isloading
);
res
.
data
.
pimarchives
=
data
.
pimarchives
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesloanandreturns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchiveschanges'
,
JSON
.
stringify
(
res
.
data
.
pimarchiveschanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesrecords'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesrecords
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesloanandreturns
));
return
res
;
}
...
...
@@ -105,21 +105,6 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return
Http
.
getInstance
().
post
(
`/pimpeople/
${
context
.
pimperson
}
/pimarchives/
${
context
.
pimarchives
}
/save`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
pimarchivesloanandreturnsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
),
'undefined'
)){
pimarchivesloanandreturnsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
)
as
any
);
if
(
pimarchivesloanandreturnsData
&&
pimarchivesloanandreturnsData
.
length
&&
pimarchivesloanandreturnsData
.
length
>
0
){
pimarchivesloanandreturnsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimarchivesloanandreturnid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarchivesloanandreturns
=
pimarchivesloanandreturnsData
;
let
pimarchiveschangesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchiveschanges'
),
'undefined'
)){
pimarchiveschangesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchiveschanges'
)
as
any
);
...
...
@@ -150,11 +135,26 @@ export default class PIMARCHIVESServiceBase extends EntityService {
}
}
masterData
.
pimarchivesrecords
=
pimarchivesrecordsData
;
let
pimarchivesloanandreturnsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
),
'undefined'
)){
pimarchivesloanandreturnsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
)
as
any
);
if
(
pimarchivesloanandreturnsData
&&
pimarchivesloanandreturnsData
.
length
&&
pimarchivesloanandreturnsData
.
length
>
0
){
pimarchivesloanandreturnsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimarchivesloanandreturnid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarchivesloanandreturns
=
pimarchivesloanandreturnsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pimarchives/
${
context
.
pimarchives
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesloanandreturns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchiveschanges'
,
JSON
.
stringify
(
res
.
data
.
pimarchiveschanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesrecords'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesrecords
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesloanandreturns
));
return
res
;
}
...
...
@@ -172,9 +172,9 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return
Http
.
getInstance
().
get
(
`/pimpeople/
${
context
.
pimperson
}
/pimarchives/
${
context
.
pimarchives
}
`
,
isloading
);
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/pimarchives/
${
context
.
pimarchives
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesloanandreturns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchiveschanges'
,
JSON
.
stringify
(
res
.
data
.
pimarchiveschanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesrecords'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesrecords
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesloanandreturns
));
return
res
;
}
...
...
@@ -193,21 +193,6 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return
Http
.
getInstance
().
put
(
`/pimpeople/
${
context
.
pimperson
}
/pimarchives/
${
context
.
pimarchives
}
`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
pimarchivesloanandreturnsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
),
'undefined'
)){
pimarchivesloanandreturnsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
)
as
any
);
if
(
pimarchivesloanandreturnsData
&&
pimarchivesloanandreturnsData
.
length
&&
pimarchivesloanandreturnsData
.
length
>
0
){
pimarchivesloanandreturnsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimarchivesloanandreturnid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarchivesloanandreturns
=
pimarchivesloanandreturnsData
;
let
pimarchiveschangesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchiveschanges'
),
'undefined'
)){
pimarchiveschangesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchiveschanges'
)
as
any
);
...
...
@@ -238,11 +223,26 @@ export default class PIMARCHIVESServiceBase extends EntityService {
}
}
masterData
.
pimarchivesrecords
=
pimarchivesrecordsData
;
let
pimarchivesloanandreturnsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
),
'undefined'
)){
pimarchivesloanandreturnsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
)
as
any
);
if
(
pimarchivesloanandreturnsData
&&
pimarchivesloanandreturnsData
.
length
&&
pimarchivesloanandreturnsData
.
length
>
0
){
pimarchivesloanandreturnsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimarchivesloanandreturnid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarchivesloanandreturns
=
pimarchivesloanandreturnsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/pimarchives/
${
context
.
pimarchives
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesloanandreturns
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchiveschanges'
,
JSON
.
stringify
(
res
.
data
.
pimarchiveschanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesrecords'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesrecords
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesloanandreturns
));
return
res
;
}
...
...
@@ -282,21 +282,6 @@ export default class PIMARCHIVESServiceBase extends EntityService {
return
Http
.
getInstance
().
post
(
`/pimpeople/
${
context
.
pimperson
}
/pimarchives`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
let
pimarchivesloanandreturnsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
),
'undefined'
)){
pimarchivesloanandreturnsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
)
as
any
);
if
(
pimarchivesloanandreturnsData
&&
pimarchivesloanandreturnsData
.
length
&&
pimarchivesloanandreturnsData
.
length
>
0
){
pimarchivesloanandreturnsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimarchivesloanandreturnid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarchivesloanandreturns
=
pimarchivesloanandreturnsData
;
let
pimarchiveschangesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchiveschanges'
),
'undefined'
)){
pimarchiveschangesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchiveschanges'
)
as
any
);
...
...
@@ -327,6 +312,21 @@ export default class PIMARCHIVESServiceBase extends EntityService {
}
}
masterData
.
pimarchivesrecords
=
pimarchivesrecordsData
;
let
pimarchivesloanandreturnsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
),
'undefined'
)){
pimarchivesloanandreturnsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchivesloanandreturns'
)
as
any
);
if
(
pimarchivesloanandreturnsData
&&
pimarchivesloanandreturnsData
.
length
&&
pimarchivesloanandreturnsData
.
length
>
0
){
pimarchivesloanandreturnsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimarchivesloanandreturnid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarchivesloanandreturns
=
pimarchivesloanandreturnsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -336,9 +336,9 @@ export default class PIMARCHIVESServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pimarchives`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimarchivesloanandreturns'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesloanandreturns
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimarchiveschanges'
,
JSON
.
stringify
(
res
.
data
.
pimarchiveschanges
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimarchivesrecords'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesrecords
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimarchivesloanandreturns'
,
JSON
.
stringify
(
res
.
data
.
pimarchivesloanandreturns
));
return
res
;
}
...
...
app_EHRPim/src/service/pimperson/pimperson-service-base.ts
浏览文件 @
f089fef5
...
...
@@ -65,344 +65,344 @@ export default class PIMPERSONServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
pimdistirbutions
Data
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
pimdistirbutions
'
),
'undefined'
)){
pimdistirbutionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimdistirbutions
'
)
as
any
);
if
(
pimdistirbutionsData
&&
pimdistirbutionsData
.
length
&&
pimdistirbutions
Data
.
length
>
0
){
pimdistirbutions
Data
.
forEach
((
item
:
any
)
=>
{
let
trmtrianpeople
Data
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
trmtrianpeople
'
),
'undefined'
)){
trmtrianpeopleData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_trmtrianpeople
'
)
as
any
);
if
(
trmtrianpeopleData
&&
trmtrianpeopleData
.
length
&&
trmtrianpeople
Data
.
length
>
0
){
trmtrianpeople
Data
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimdistirbuti
onid
=
null
;
item
.
trmtrianpers
onid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimdistirbutions
=
pimdistirbutions
Data
;
let
pim
faminfo
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
faminfo
s'
),
'undefined'
)){
pim
faminfosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimfaminfo
s'
)
as
any
);
if
(
pim
faminfosData
&&
pimfaminfosData
.
length
&&
pimfaminfo
sData
.
length
>
0
){
pim
faminfo
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
trmtrianpeople
=
trmtrianpeople
Data
;
let
pim
patent
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
patent
s'
),
'undefined'
)){
pim
patentsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpatent
s'
)
as
any
);
if
(
pim
patentsData
&&
pimpatentsData
.
length
&&
pimpatent
sData
.
length
>
0
){
pim
patent
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
faminfo
id
=
null
;
item
.
pim
patent
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
faminfos
=
pimfaminfo
sData
;
let
pim
workhistorie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
workhistorie
s'
),
'undefined'
)){
pim
workhistoriesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimworkhistorie
s'
)
as
any
);
if
(
pim
workhistoriesData
&&
pimworkhistoriesData
.
length
&&
pimworkhistorie
sData
.
length
>
0
){
pim
workhistorie
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
patents
=
pimpatent
sData
;
let
pim
achievement
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
achievement
s'
),
'undefined'
)){
pim
achievementsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimachievement
s'
)
as
any
);
if
(
pim
achievementsData
&&
pimachievementsData
.
length
&&
pimachievement
sData
.
length
>
0
){
pim
achievement
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
workhistory
id
=
null
;
item
.
pim
achievements
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
workhistories
=
pimworkhistorie
sData
;
let
pimv
ocational
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimv
ocational
s'
),
'undefined'
)){
pimv
ocationalsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvocational
s'
)
as
any
);
if
(
pimv
ocationalsData
&&
pimvocationalsData
.
length
&&
pimvocational
sData
.
length
>
0
){
pimv
ocational
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
achievements
=
pimachievement
sData
;
let
pimv
acation
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimv
acation
s'
),
'undefined'
)){
pimv
acationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvacation
s'
)
as
any
);
if
(
pimv
acationsData
&&
pimvacationsData
.
length
&&
pimvacation
sData
.
length
>
0
){
pimv
acation
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimv
ocational
id
=
null
;
item
.
pimv
acation
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimv
ocationals
=
pimvocational
sData
;
let
pimp
ersonchange
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimp
ersonchange
s'
),
'undefined'
)){
pimp
ersonchangesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonchange
s'
)
as
any
);
if
(
pimp
ersonchangesData
&&
pimpersonchangesData
.
length
&&
pimpersonchange
sData
.
length
>
0
){
pimp
ersonchange
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pimv
acations
=
pimvacation
sData
;
let
pimp
aper
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimp
aper
s'
),
'undefined'
)){
pimp
apersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpaper
s'
)
as
any
);
if
(
pimp
apersData
&&
pimpapersData
.
length
&&
pimpaper
sData
.
length
>
0
){
pimp
aper
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimp
ersonchange
id
=
null
;
item
.
pimp
aper
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimp
ersonchanges
=
pimpersonchange
sData
;
let
pim
exitandentr
iesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
exitandentr
ies'
),
'undefined'
)){
pim
exitandentriesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimexitandentr
ies'
)
as
any
);
if
(
pim
exitandentriesData
&&
pimexitandentriesData
.
length
&&
pimexitandentr
iesData
.
length
>
0
){
pim
exitandentr
iesData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pimp
apers
=
pimpaper
sData
;
let
pim
languageabilit
iesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
languageabilit
ies'
),
'undefined'
)){
pim
languageabilitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimlanguageabilit
ies'
)
as
any
);
if
(
pim
languageabilitiesData
&&
pimlanguageabilitiesData
.
length
&&
pimlanguageabilit
iesData
.
length
>
0
){
pim
languageabilit
iesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
exitandentr
yid
=
null
;
item
.
pim
languageabilit
yid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
exitandentries
=
pimexitandentr
iesData
;
let
pim
archive
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
archive
s'
),
'undefined'
)){
pim
archivesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchive
s'
)
as
any
);
if
(
pim
archivesData
&&
pimarchivesData
.
length
&&
pimarchive
sData
.
length
>
0
){
pim
archive
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
languageabilities
=
pimlanguageabilit
iesData
;
let
pim
rewardpunishment
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
rewardpunishment
s'
),
'undefined'
)){
pim
rewardpunishmentsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimrewardpunishment
s'
)
as
any
);
if
(
pim
rewardpunishmentsData
&&
pimrewardpunishmentsData
.
length
&&
pimrewardpunishment
sData
.
length
>
0
){
pim
rewardpunishment
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
archives
id
=
null
;
item
.
pim
rewardpunishment
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
archives
=
pimarchive
sData
;
let
pim
armycadre
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
armycadre
s'
),
'undefined'
)){
pim
armycadresData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarmycadre
s'
)
as
any
);
if
(
pim
armycadresData
&&
pimarmycadresData
.
length
&&
pimarmycadre
sData
.
length
>
0
){
pim
armycadre
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
rewardpunishments
=
pimrewardpunishment
sData
;
let
pim
contract
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
contract
s'
),
'undefined'
)){
pim
contractsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimcontract
s'
)
as
any
);
if
(
pim
contractsData
&&
pimcontractsData
.
length
&&
pimcontract
sData
.
length
>
0
){
pim
contract
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
armycadres
id
=
null
;
item
.
pim
contract
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
armycadres
=
pimarmycadre
sData
;
let
trmtrianpeople
Data
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
trmtrianpeople
'
),
'undefined'
)){
trmtrianpeopleData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_trmtrianpeople
'
)
as
any
);
if
(
trmtrianpeopleData
&&
trmtrianpeopleData
.
length
&&
trmtrianpeople
Data
.
length
>
0
){
trmtrianpeople
Data
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
contracts
=
pimcontract
sData
;
let
pimresearchfindings
Data
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
pimresearchfindings
'
),
'undefined'
)){
pimresearchfindingsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimresearchfindings
'
)
as
any
);
if
(
pimresearchfindingsData
&&
pimresearchfindingsData
.
length
&&
pimresearchfindings
Data
.
length
>
0
){
pimresearchfindings
Data
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
trmtrianperson
id
=
null
;
item
.
pimresearchfindings
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
trmtrianpeople
=
trmtrianpeople
Data
;
let
pimachievement
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
pimachievement
s'
),
'undefined'
)){
pimachievementsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimachievement
s'
)
as
any
);
if
(
pimachievementsData
&&
pimachievementsData
.
length
&&
pimachievement
sData
.
length
>
0
){
pimachievement
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pimresearchfindings
=
pimresearchfindings
Data
;
let
attendancemreportmxe
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
attendancemreportmxe
s'
),
'undefined'
)){
attendancemreportmxesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_attendancemreportmxe
s'
)
as
any
);
if
(
attendancemreportmxesData
&&
attendancemreportmxesData
.
length
&&
attendancemreportmxe
sData
.
length
>
0
){
attendancemreportmxe
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimachievements
id
=
null
;
item
.
attendancemreportmx
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimachievements
=
pimachievement
sData
;
let
pim
paper
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
paper
s'
),
'undefined'
)){
pim
papersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpaper
s'
)
as
any
);
if
(
pim
papersData
&&
pimpapersData
.
length
&&
pimpaper
sData
.
length
>
0
){
pim
paper
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
attendancemreportmxes
=
attendancemreportmxe
sData
;
let
pim
education
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
education
s'
),
'undefined'
)){
pim
educationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimeducation
s'
)
as
any
);
if
(
pim
educationsData
&&
pimeducationsData
.
length
&&
pimeducation
sData
.
length
>
0
){
pim
education
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
paper
id
=
null
;
item
.
pim
education
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
papers
=
pimpaper
sData
;
let
pim
patent
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
patent
s'
),
'undefined'
)){
pim
patentsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpatent
s'
)
as
any
);
if
(
pim
patentsData
&&
pimpatentsData
.
length
&&
pimpatent
sData
.
length
>
0
){
pim
patent
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
educations
=
pimeducation
sData
;
let
pim
title
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
title
s'
),
'undefined'
)){
pim
titlesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimtitle
s'
)
as
any
);
if
(
pim
titlesData
&&
pimtitlesData
.
length
&&
pimtitle
sData
.
length
>
0
){
pim
title
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
patent
id
=
null
;
item
.
pim
title
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
patents
=
pimpatent
sData
;
let
pim
rewardpunishment
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
rewardpunishment
s'
),
'undefined'
)){
pim
rewardpunishmentsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimrewardpunishment
s'
)
as
any
);
if
(
pim
rewardpunishmentsData
&&
pimrewardpunishmentsData
.
length
&&
pimrewardpunishment
sData
.
length
>
0
){
pim
rewardpunishment
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
titles
=
pimtitle
sData
;
let
pim
faminfo
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
faminfo
s'
),
'undefined'
)){
pim
faminfosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimfaminfo
s'
)
as
any
);
if
(
pim
faminfosData
&&
pimfaminfosData
.
length
&&
pimfaminfo
sData
.
length
>
0
){
pim
faminfo
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
rewardpunishment
id
=
null
;
item
.
pim
faminfo
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
rewardpunishments
=
pimrewardpunishment
sData
;
let
pim
vacation
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
vacation
s'
),
'undefined'
)){
pim
vacationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvacation
s'
)
as
any
);
if
(
pim
vacationsData
&&
pimvacationsData
.
length
&&
pimvacation
sData
.
length
>
0
){
pim
vacation
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
faminfos
=
pimfaminfo
sData
;
let
pim
workhistorie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
workhistorie
s'
),
'undefined'
)){
pim
workhistoriesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimworkhistorie
s'
)
as
any
);
if
(
pim
workhistoriesData
&&
pimworkhistoriesData
.
length
&&
pimworkhistorie
sData
.
length
>
0
){
pim
workhistorie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
vacation
id
=
null
;
item
.
pim
workhistory
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
vacations
=
pimvacation
sData
;
let
pim
language
abilitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
language
abilities'
),
'undefined'
)){
pim
languageabilitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimlanguage
abilities'
)
as
any
);
if
(
pim
languageabilitiesData
&&
pimlanguageabilitiesData
.
length
&&
pimlanguage
abilitiesData
.
length
>
0
){
pim
language
abilitiesData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
workhistories
=
pimworkhistorie
sData
;
let
pim
person
abilitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
person
abilities'
),
'undefined'
)){
pim
personabilitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimperson
abilities'
)
as
any
);
if
(
pim
personabilitiesData
&&
pimpersonabilitiesData
.
length
&&
pimperson
abilitiesData
.
length
>
0
){
pim
person
abilitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
language
abilityid
=
null
;
item
.
pim
person
abilityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
languageabilities
=
pimlanguage
abilitiesData
;
let
pim
contract
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
contract
s'
),
'undefined'
)){
pim
contractsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimcontract
s'
)
as
any
);
if
(
pim
contractsData
&&
pimcontractsData
.
length
&&
pimcontract
sData
.
length
>
0
){
pim
contract
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
personabilities
=
pimperson
abilitiesData
;
let
pim
vocational
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
vocational
s'
),
'undefined'
)){
pim
vocationalsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvocational
s'
)
as
any
);
if
(
pim
vocationalsData
&&
pimvocationalsData
.
length
&&
pimvocational
sData
.
length
>
0
){
pim
vocational
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
contract
id
=
null
;
item
.
pim
vocational
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
contracts
=
pimcontract
sData
;
let
pim
educa
tionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
educa
tions'
),
'undefined'
)){
pim
educationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimeduca
tions'
)
as
any
);
if
(
pim
educationsData
&&
pimeducationsData
.
length
&&
pimeduca
tionsData
.
length
>
0
){
pim
educa
tionsData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
vocationals
=
pimvocational
sData
;
let
pim
distirbu
tionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
distirbu
tions'
),
'undefined'
)){
pim
distirbutionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimdistirbu
tions'
)
as
any
);
if
(
pim
distirbutionsData
&&
pimdistirbutionsData
.
length
&&
pimdistirbu
tionsData
.
length
>
0
){
pim
distirbu
tionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
educa
tionid
=
null
;
item
.
pim
distirbu
tionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
educations
=
pimeduca
tionsData
;
let
attendancemreportmx
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
attendancemreportmx
es'
),
'undefined'
)){
attendancemreportmxesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_attendancemreportmx
es'
)
as
any
);
if
(
attendancemreportmxesData
&&
attendancemreportmxesData
.
length
&&
attendancemreportmx
esData
.
length
>
0
){
attendancemreportmx
esData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
distirbutions
=
pimdistirbu
tionsData
;
let
pimpersonchang
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
pimpersonchang
es'
),
'undefined'
)){
pimpersonchangesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonchang
es'
)
as
any
);
if
(
pimpersonchangesData
&&
pimpersonchangesData
.
length
&&
pimpersonchang
esData
.
length
>
0
){
pimpersonchang
esData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
attendancemreportmx
id
=
null
;
item
.
pimpersonchange
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
attendancemreportmxes
=
attendancemreportmx
esData
;
let
pim
researchfinding
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
researchfinding
s'
),
'undefined'
)){
pim
researchfindingsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimresearchfinding
s'
)
as
any
);
if
(
pim
researchfindingsData
&&
pimresearchfindingsData
.
length
&&
pimresearchfinding
sData
.
length
>
0
){
pim
researchfinding
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pimpersonchanges
=
pimpersonchang
esData
;
let
pim
exitandentrie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
exitandentrie
s'
),
'undefined'
)){
pim
exitandentriesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimexitandentrie
s'
)
as
any
);
if
(
pim
exitandentriesData
&&
pimexitandentriesData
.
length
&&
pimexitandentrie
sData
.
length
>
0
){
pim
exitandentrie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
researchfindings
id
=
null
;
item
.
pim
exitandentry
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
researchfindings
=
pimresearchfinding
sData
;
let
pim
personabiliti
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
personabiliti
es'
),
'undefined'
)){
pim
personabilitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonabiliti
es'
)
as
any
);
if
(
pim
personabilitiesData
&&
pimpersonabilitiesData
.
length
&&
pimpersonabiliti
esData
.
length
>
0
){
pim
personabiliti
esData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
exitandentries
=
pimexitandentrie
sData
;
let
pim
armycadr
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
armycadr
es'
),
'undefined'
)){
pim
armycadresData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarmycadr
es'
)
as
any
);
if
(
pim
armycadresData
&&
pimarmycadresData
.
length
&&
pimarmycadr
esData
.
length
>
0
){
pim
armycadr
esData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
personability
id
=
null
;
item
.
pim
armycadres
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
personabilities
=
pimpersonabiliti
esData
;
let
pim
titl
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
titl
es'
),
'undefined'
)){
pim
titlesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimtitl
es'
)
as
any
);
if
(
pim
titlesData
&&
pimtitlesData
.
length
&&
pimtitl
esData
.
length
>
0
){
pim
titl
esData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
armycadres
=
pimarmycadr
esData
;
let
pim
archiv
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
archiv
es'
),
'undefined'
)){
pim
archivesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchiv
es'
)
as
any
);
if
(
pim
archivesData
&&
pimarchivesData
.
length
&&
pimarchiv
esData
.
length
>
0
){
pim
archiv
esData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
title
id
=
null
;
item
.
pim
archives
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
titles
=
pimtitl
esData
;
masterData
.
pim
archives
=
pimarchiv
esData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/pimpeople/
${
context
.
pimperson
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
,
JSON
.
stringify
(
res
.
data
.
pimdistirbutions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
,
JSON
.
stringify
(
res
.
data
.
pimfaminfos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
,
JSON
.
stringify
(
res
.
data
.
pimworkhistories
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvocationals'
,
JSON
.
stringify
(
res
.
data
.
pimvocationals
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
,
JSON
.
stringify
(
res
.
data
.
pimpersonchanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
,
JSON
.
stringify
(
res
.
data
.
pimexitandentries
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchives'
,
JSON
.
stringify
(
res
.
data
.
pimarchives
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
,
JSON
.
stringify
(
res
.
data
.
pimarmycadres
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_trmtrianpeople'
,
JSON
.
stringify
(
res
.
data
.
trmtrianpeople
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimachievements'
,
JSON
.
stringify
(
res
.
data
.
pimachievements
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpapers'
,
JSON
.
stringify
(
res
.
data
.
pimpapers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpatents'
,
JSON
.
stringify
(
res
.
data
.
pimpatents
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pim
rewardpunishments'
,
JSON
.
stringify
(
res
.
data
.
pimrewardpunish
ments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pim
achievements'
,
JSON
.
stringify
(
res
.
data
.
pimachieve
ments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvacations'
,
JSON
.
stringify
(
res
.
data
.
pimvacations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpapers'
,
JSON
.
stringify
(
res
.
data
.
pimpapers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimlanguageabilities'
,
JSON
.
stringify
(
res
.
data
.
pimlanguageabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimrewardpunishments'
,
JSON
.
stringify
(
res
.
data
.
pimrewardpunishments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimcontracts'
,
JSON
.
stringify
(
res
.
data
.
pimcontracts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimeducations'
,
JSON
.
stringify
(
res
.
data
.
pimeducations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_attendancemreportmxes'
,
JSON
.
stringify
(
res
.
data
.
attendancemreportmxes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimresearchfindings'
,
JSON
.
stringify
(
res
.
data
.
pimresearchfindings
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
,
JSON
.
stringify
(
res
.
data
.
pimpersonabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_attendancemreportmxes'
,
JSON
.
stringify
(
res
.
data
.
attendancemreportmxes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimeducations'
,
JSON
.
stringify
(
res
.
data
.
pimeducations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimtitles'
,
JSON
.
stringify
(
res
.
data
.
pimtitles
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
,
JSON
.
stringify
(
res
.
data
.
pimfaminfos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
,
JSON
.
stringify
(
res
.
data
.
pimworkhistories
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
,
JSON
.
stringify
(
res
.
data
.
pimpersonabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvocationals'
,
JSON
.
stringify
(
res
.
data
.
pimvocationals
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
,
JSON
.
stringify
(
res
.
data
.
pimdistirbutions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
,
JSON
.
stringify
(
res
.
data
.
pimpersonchanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
,
JSON
.
stringify
(
res
.
data
.
pimexitandentries
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
,
JSON
.
stringify
(
res
.
data
.
pimarmycadres
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchives'
,
JSON
.
stringify
(
res
.
data
.
pimarchives
));
return
res
;
}
...
...
@@ -443,27 +443,27 @@ export default class PIMPERSONServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/pimpeople/
${
context
.
pimperson
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
,
JSON
.
stringify
(
res
.
data
.
pimdistirbutions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
,
JSON
.
stringify
(
res
.
data
.
pimfaminfos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
,
JSON
.
stringify
(
res
.
data
.
pimworkhistories
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvocationals'
,
JSON
.
stringify
(
res
.
data
.
pimvocationals
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
,
JSON
.
stringify
(
res
.
data
.
pimpersonchanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
,
JSON
.
stringify
(
res
.
data
.
pimexitandentries
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchives'
,
JSON
.
stringify
(
res
.
data
.
pimarchives
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
,
JSON
.
stringify
(
res
.
data
.
pimarmycadres
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_trmtrianpeople'
,
JSON
.
stringify
(
res
.
data
.
trmtrianpeople
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimachievements'
,
JSON
.
stringify
(
res
.
data
.
pimachievements
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpapers'
,
JSON
.
stringify
(
res
.
data
.
pimpapers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpatents'
,
JSON
.
stringify
(
res
.
data
.
pimpatents
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pim
rewardpunishments'
,
JSON
.
stringify
(
res
.
data
.
pimrewardpunish
ments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pim
achievements'
,
JSON
.
stringify
(
res
.
data
.
pimachieve
ments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvacations'
,
JSON
.
stringify
(
res
.
data
.
pimvacations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpapers'
,
JSON
.
stringify
(
res
.
data
.
pimpapers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimlanguageabilities'
,
JSON
.
stringify
(
res
.
data
.
pimlanguageabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimrewardpunishments'
,
JSON
.
stringify
(
res
.
data
.
pimrewardpunishments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimcontracts'
,
JSON
.
stringify
(
res
.
data
.
pimcontracts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimeducations'
,
JSON
.
stringify
(
res
.
data
.
pimeducations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_attendancemreportmxes'
,
JSON
.
stringify
(
res
.
data
.
attendancemreportmxes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimresearchfindings'
,
JSON
.
stringify
(
res
.
data
.
pimresearchfindings
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
,
JSON
.
stringify
(
res
.
data
.
pimpersonabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_attendancemreportmxes'
,
JSON
.
stringify
(
res
.
data
.
attendancemreportmxes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimeducations'
,
JSON
.
stringify
(
res
.
data
.
pimeducations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimtitles'
,
JSON
.
stringify
(
res
.
data
.
pimtitles
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
,
JSON
.
stringify
(
res
.
data
.
pimfaminfos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
,
JSON
.
stringify
(
res
.
data
.
pimworkhistories
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
,
JSON
.
stringify
(
res
.
data
.
pimpersonabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvocationals'
,
JSON
.
stringify
(
res
.
data
.
pimvocationals
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
,
JSON
.
stringify
(
res
.
data
.
pimdistirbutions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
,
JSON
.
stringify
(
res
.
data
.
pimpersonchanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
,
JSON
.
stringify
(
res
.
data
.
pimexitandentries
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
,
JSON
.
stringify
(
res
.
data
.
pimarmycadres
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchives'
,
JSON
.
stringify
(
res
.
data
.
pimarchives
));
return
res
;
}
...
...
@@ -505,126 +505,6 @@ export default class PIMPERSONServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
pimdistirbutionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
),
'undefined'
)){
pimdistirbutionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
)
as
any
);
if
(
pimdistirbutionsData
&&
pimdistirbutionsData
.
length
&&
pimdistirbutionsData
.
length
>
0
){
pimdistirbutionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimdistirbutionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimdistirbutions
=
pimdistirbutionsData
;
let
pimfaminfosData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
),
'undefined'
)){
pimfaminfosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
)
as
any
);
if
(
pimfaminfosData
&&
pimfaminfosData
.
length
&&
pimfaminfosData
.
length
>
0
){
pimfaminfosData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimfaminfoid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimfaminfos
=
pimfaminfosData
;
let
pimworkhistoriesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
),
'undefined'
)){
pimworkhistoriesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
)
as
any
);
if
(
pimworkhistoriesData
&&
pimworkhistoriesData
.
length
&&
pimworkhistoriesData
.
length
>
0
){
pimworkhistoriesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimworkhistoryid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimworkhistories
=
pimworkhistoriesData
;
let
pimvocationalsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvocationals'
),
'undefined'
)){
pimvocationalsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvocationals'
)
as
any
);
if
(
pimvocationalsData
&&
pimvocationalsData
.
length
&&
pimvocationalsData
.
length
>
0
){
pimvocationalsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimvocationalid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimvocationals
=
pimvocationalsData
;
let
pimpersonchangesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
),
'undefined'
)){
pimpersonchangesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
)
as
any
);
if
(
pimpersonchangesData
&&
pimpersonchangesData
.
length
&&
pimpersonchangesData
.
length
>
0
){
pimpersonchangesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimpersonchangeid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimpersonchanges
=
pimpersonchangesData
;
let
pimexitandentriesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
),
'undefined'
)){
pimexitandentriesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
)
as
any
);
if
(
pimexitandentriesData
&&
pimexitandentriesData
.
length
&&
pimexitandentriesData
.
length
>
0
){
pimexitandentriesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimexitandentryid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimexitandentries
=
pimexitandentriesData
;
let
pimarchivesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchives'
),
'undefined'
)){
pimarchivesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchives'
)
as
any
);
if
(
pimarchivesData
&&
pimarchivesData
.
length
&&
pimarchivesData
.
length
>
0
){
pimarchivesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimarchivesid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarchives
=
pimarchivesData
;
let
pimarmycadresData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
),
'undefined'
)){
pimarmycadresData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
)
as
any
);
if
(
pimarmycadresData
&&
pimarmycadresData
.
length
&&
pimarmycadresData
.
length
>
0
){
pimarmycadresData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimarmycadresid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarmycadres
=
pimarmycadresData
;
let
trmtrianpeopleData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_trmtrianpeople'
),
'undefined'
)){
trmtrianpeopleData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_trmtrianpeople'
)
as
any
);
...
...
@@ -640,36 +520,6 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
trmtrianpeople
=
trmtrianpeopleData
;
let
pimachievementsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimachievements'
),
'undefined'
)){
pimachievementsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimachievements'
)
as
any
);
if
(
pimachievementsData
&&
pimachievementsData
.
length
&&
pimachievementsData
.
length
>
0
){
pimachievementsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimachievementsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimachievements
=
pimachievementsData
;
let
pimpapersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpapers'
),
'undefined'
)){
pimpapersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpapers'
)
as
any
);
if
(
pimpapersData
&&
pimpapersData
.
length
&&
pimpapersData
.
length
>
0
){
pimpapersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimpaperid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimpapers
=
pimpapersData
;
let
pimpatentsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpatents'
),
'undefined'
)){
pimpatentsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpatents'
)
as
any
);
...
...
@@ -685,21 +535,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimpatents
=
pimpatentsData
;
let
pim
rewardpunish
mentsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
rewardpunish
ments'
),
'undefined'
)){
pim
rewardpunishmentsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimrewardpunish
ments'
)
as
any
);
if
(
pim
rewardpunishmentsData
&&
pimrewardpunishmentsData
.
length
&&
pimrewardpunish
mentsData
.
length
>
0
){
pim
rewardpunish
mentsData
.
forEach
((
item
:
any
)
=>
{
let
pim
achieve
mentsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
achieve
ments'
),
'undefined'
)){
pim
achievementsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimachieve
ments'
)
as
any
);
if
(
pim
achievementsData
&&
pimachievementsData
.
length
&&
pimachieve
mentsData
.
length
>
0
){
pim
achieve
mentsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
rewardpunishment
id
=
null
;
item
.
pim
achievements
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
rewardpunishments
=
pimrewardpunish
mentsData
;
masterData
.
pim
achievements
=
pimachieve
mentsData
;
let
pimvacationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvacations'
),
'undefined'
)){
pimvacationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvacations'
)
as
any
);
...
...
@@ -715,6 +565,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimvacations
=
pimvacationsData
;
let
pimpapersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpapers'
),
'undefined'
)){
pimpapersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpapers'
)
as
any
);
if
(
pimpapersData
&&
pimpapersData
.
length
&&
pimpapersData
.
length
>
0
){
pimpapersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimpaperid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimpapers
=
pimpapersData
;
let
pimlanguageabilitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimlanguageabilities'
),
'undefined'
)){
pimlanguageabilitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimlanguageabilities'
)
as
any
);
...
...
@@ -730,6 +595,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimlanguageabilities
=
pimlanguageabilitiesData
;
let
pimrewardpunishmentsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimrewardpunishments'
),
'undefined'
)){
pimrewardpunishmentsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimrewardpunishments'
)
as
any
);
if
(
pimrewardpunishmentsData
&&
pimrewardpunishmentsData
.
length
&&
pimrewardpunishmentsData
.
length
>
0
){
pimrewardpunishmentsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimrewardpunishmentid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimrewardpunishments
=
pimrewardpunishmentsData
;
let
pimcontractsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimcontracts'
),
'undefined'
)){
pimcontractsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimcontracts'
)
as
any
);
...
...
@@ -745,21 +625,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimcontracts
=
pimcontractsData
;
let
pim
education
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
education
s'
),
'undefined'
)){
pim
educationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimeducation
s'
)
as
any
);
if
(
pim
educationsData
&&
pimeducationsData
.
length
&&
pimeducation
sData
.
length
>
0
){
pim
education
sData
.
forEach
((
item
:
any
)
=>
{
let
pim
researchfinding
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
researchfinding
s'
),
'undefined'
)){
pim
researchfindingsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimresearchfinding
s'
)
as
any
);
if
(
pim
researchfindingsData
&&
pimresearchfindingsData
.
length
&&
pimresearchfinding
sData
.
length
>
0
){
pim
researchfinding
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
education
id
=
null
;
item
.
pim
researchfindings
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
educations
=
pimeducation
sData
;
masterData
.
pim
researchfindings
=
pimresearchfinding
sData
;
let
attendancemreportmxesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_attendancemreportmxes'
),
'undefined'
)){
attendancemreportmxesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_attendancemreportmxes'
)
as
any
);
...
...
@@ -775,36 +655,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
attendancemreportmxes
=
attendancemreportmxesData
;
let
pimresearchfindingsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimresearchfindings'
),
'undefined'
)){
pimresearchfindingsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimresearchfindings'
)
as
any
);
if
(
pimresearchfindingsData
&&
pimresearchfindingsData
.
length
&&
pimresearchfindingsData
.
length
>
0
){
pimresearchfindingsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimresearchfindingsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimresearchfindings
=
pimresearchfindingsData
;
let
pimpersonabilitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
),
'undefined'
)){
pimpersonabilitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
)
as
any
);
if
(
pimpersonabilitiesData
&&
pimpersonabilitiesData
.
length
&&
pimpersonabilitiesData
.
length
>
0
){
pimpersonabilitiesData
.
forEach
((
item
:
any
)
=>
{
let
pimeducationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimeducations'
),
'undefined'
)){
pimeducationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimeducations'
)
as
any
);
if
(
pimeducationsData
&&
pimeducationsData
.
length
&&
pimeducationsData
.
length
>
0
){
pimeducationsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
personability
id
=
null
;
item
.
pim
education
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
personabilities
=
pimpersonabilitie
sData
;
masterData
.
pim
educations
=
pimeducation
sData
;
let
pimtitlesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimtitles'
),
'undefined'
)){
pimtitlesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimtitles'
)
as
any
);
...
...
@@ -820,65 +685,6 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimtitles
=
pimtitlesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pimpeople`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimdistirbutions'
,
JSON
.
stringify
(
res
.
data
.
pimdistirbutions
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimfaminfos'
,
JSON
.
stringify
(
res
.
data
.
pimfaminfos
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimworkhistories'
,
JSON
.
stringify
(
res
.
data
.
pimworkhistories
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimvocationals'
,
JSON
.
stringify
(
res
.
data
.
pimvocationals
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimpersonchanges'
,
JSON
.
stringify
(
res
.
data
.
pimpersonchanges
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimexitandentries'
,
JSON
.
stringify
(
res
.
data
.
pimexitandentries
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimarchives'
,
JSON
.
stringify
(
res
.
data
.
pimarchives
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimarmycadres'
,
JSON
.
stringify
(
res
.
data
.
pimarmycadres
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_trmtrianpeople'
,
JSON
.
stringify
(
res
.
data
.
trmtrianpeople
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimachievements'
,
JSON
.
stringify
(
res
.
data
.
pimachievements
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimpapers'
,
JSON
.
stringify
(
res
.
data
.
pimpapers
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimpatents'
,
JSON
.
stringify
(
res
.
data
.
pimpatents
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimrewardpunishments'
,
JSON
.
stringify
(
res
.
data
.
pimrewardpunishments
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimvacations'
,
JSON
.
stringify
(
res
.
data
.
pimvacations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimlanguageabilities'
,
JSON
.
stringify
(
res
.
data
.
pimlanguageabilities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimcontracts'
,
JSON
.
stringify
(
res
.
data
.
pimcontracts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimeducations'
,
JSON
.
stringify
(
res
.
data
.
pimeducations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_attendancemreportmxes'
,
JSON
.
stringify
(
res
.
data
.
attendancemreportmxes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimresearchfindings'
,
JSON
.
stringify
(
res
.
data
.
pimresearchfindings
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimpersonabilities'
,
JSON
.
stringify
(
res
.
data
.
pimpersonabilities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimtitles'
,
JSON
.
stringify
(
res
.
data
.
pimtitles
));
return
res
;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof PIMPERSONServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
pimdistirbutionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
),
'undefined'
)){
pimdistirbutionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
)
as
any
);
if
(
pimdistirbutionsData
&&
pimdistirbutionsData
.
length
&&
pimdistirbutionsData
.
length
>
0
){
pimdistirbutionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimdistirbutionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimdistirbutions
=
pimdistirbutionsData
;
let
pimfaminfosData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
),
'undefined'
)){
pimfaminfosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
)
as
any
);
...
...
@@ -909,6 +715,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimworkhistories
=
pimworkhistoriesData
;
let
pimpersonabilitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
),
'undefined'
)){
pimpersonabilitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
)
as
any
);
if
(
pimpersonabilitiesData
&&
pimpersonabilitiesData
.
length
&&
pimpersonabilitiesData
.
length
>
0
){
pimpersonabilitiesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimpersonabilityid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimpersonabilities
=
pimpersonabilitiesData
;
let
pimvocationalsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvocationals'
),
'undefined'
)){
pimvocationalsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvocationals'
)
as
any
);
...
...
@@ -924,6 +745,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimvocationals
=
pimvocationalsData
;
let
pimdistirbutionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
),
'undefined'
)){
pimdistirbutionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
)
as
any
);
if
(
pimdistirbutionsData
&&
pimdistirbutionsData
.
length
&&
pimdistirbutionsData
.
length
>
0
){
pimdistirbutionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimdistirbutionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimdistirbutions
=
pimdistirbutionsData
;
let
pimpersonchangesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
),
'undefined'
)){
pimpersonchangesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
)
as
any
);
...
...
@@ -954,36 +790,80 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimexitandentries
=
pimexitandentriesData
;
let
pimar
chiv
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimar
chiv
es'
),
'undefined'
)){
pimar
chivesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchiv
es'
)
as
any
);
if
(
pimar
chivesData
&&
pimarchivesData
.
length
&&
pimarchiv
esData
.
length
>
0
){
pimar
chiv
esData
.
forEach
((
item
:
any
)
=>
{
let
pimar
mycadr
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimar
mycadr
es'
),
'undefined'
)){
pimar
mycadresData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarmycadr
es'
)
as
any
);
if
(
pimar
mycadresData
&&
pimarmycadresData
.
length
&&
pimarmycadr
esData
.
length
>
0
){
pimar
mycadr
esData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimar
chiv
esid
=
null
;
item
.
pimar
mycadr
esid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimar
chives
=
pimarchiv
esData
;
let
pimar
mycadr
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimar
mycadr
es'
),
'undefined'
)){
pimar
mycadresData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarmycadr
es'
)
as
any
);
if
(
pimar
mycadresData
&&
pimarmycadresData
.
length
&&
pimarmycadr
esData
.
length
>
0
){
pimar
mycadr
esData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pimar
mycadres
=
pimarmycadr
esData
;
let
pimar
chiv
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimar
chiv
es'
),
'undefined'
)){
pimar
chivesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchiv
es'
)
as
any
);
if
(
pimar
chivesData
&&
pimarchivesData
.
length
&&
pimarchiv
esData
.
length
>
0
){
pimar
chiv
esData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimar
mycadr
esid
=
null
;
item
.
pimar
chiv
esid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarmycadres
=
pimarmycadresData
;
masterData
.
pimarchives
=
pimarchivesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pimpeople`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_trmtrianpeople'
,
JSON
.
stringify
(
res
.
data
.
trmtrianpeople
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimpatents'
,
JSON
.
stringify
(
res
.
data
.
pimpatents
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimachievements'
,
JSON
.
stringify
(
res
.
data
.
pimachievements
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimvacations'
,
JSON
.
stringify
(
res
.
data
.
pimvacations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimpapers'
,
JSON
.
stringify
(
res
.
data
.
pimpapers
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimlanguageabilities'
,
JSON
.
stringify
(
res
.
data
.
pimlanguageabilities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimrewardpunishments'
,
JSON
.
stringify
(
res
.
data
.
pimrewardpunishments
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimcontracts'
,
JSON
.
stringify
(
res
.
data
.
pimcontracts
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimresearchfindings'
,
JSON
.
stringify
(
res
.
data
.
pimresearchfindings
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_attendancemreportmxes'
,
JSON
.
stringify
(
res
.
data
.
attendancemreportmxes
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimeducations'
,
JSON
.
stringify
(
res
.
data
.
pimeducations
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimtitles'
,
JSON
.
stringify
(
res
.
data
.
pimtitles
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimfaminfos'
,
JSON
.
stringify
(
res
.
data
.
pimfaminfos
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimworkhistories'
,
JSON
.
stringify
(
res
.
data
.
pimworkhistories
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimpersonabilities'
,
JSON
.
stringify
(
res
.
data
.
pimpersonabilities
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimvocationals'
,
JSON
.
stringify
(
res
.
data
.
pimvocationals
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimdistirbutions'
,
JSON
.
stringify
(
res
.
data
.
pimdistirbutions
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimpersonchanges'
,
JSON
.
stringify
(
res
.
data
.
pimpersonchanges
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimexitandentries'
,
JSON
.
stringify
(
res
.
data
.
pimexitandentries
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimarmycadres'
,
JSON
.
stringify
(
res
.
data
.
pimarmycadres
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_pimarchives'
,
JSON
.
stringify
(
res
.
data
.
pimarchives
));
return
res
;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof PIMPERSONServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
trmtrianpeopleData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_trmtrianpeople'
),
'undefined'
)){
trmtrianpeopleData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_trmtrianpeople'
)
as
any
);
...
...
@@ -999,6 +879,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
trmtrianpeople
=
trmtrianpeopleData
;
let
pimpatentsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpatents'
),
'undefined'
)){
pimpatentsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpatents'
)
as
any
);
if
(
pimpatentsData
&&
pimpatentsData
.
length
&&
pimpatentsData
.
length
>
0
){
pimpatentsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimpatentid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimpatents
=
pimpatentsData
;
let
pimachievementsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimachievements'
),
'undefined'
)){
pimachievementsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimachievements'
)
as
any
);
...
...
@@ -1006,14 +901,29 @@ export default class PIMPERSONServiceBase extends EntityService {
pimachievementsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimachievementsid
=
null
;
item
.
pimachievementsid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimachievements
=
pimachievementsData
;
let
pimvacationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvacations'
),
'undefined'
)){
pimvacationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvacations'
)
as
any
);
if
(
pimvacationsData
&&
pimvacationsData
.
length
&&
pimvacationsData
.
length
>
0
){
pimvacationsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimvacationid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
achievements
=
pimachievement
sData
;
masterData
.
pim
vacations
=
pimvacation
sData
;
let
pimpapersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpapers'
),
'undefined'
)){
pimpapersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpapers'
)
as
any
);
...
...
@@ -1029,21 +939,21 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimpapers
=
pimpapersData
;
let
pim
patent
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
patent
s'
),
'undefined'
)){
pim
patentsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpatent
s'
)
as
any
);
if
(
pim
patentsData
&&
pimpatentsData
.
length
&&
pimpatent
sData
.
length
>
0
){
pim
patent
sData
.
forEach
((
item
:
any
)
=>
{
let
pim
languageabilitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
languageabilitie
s'
),
'undefined'
)){
pim
languageabilitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimlanguageabilitie
s'
)
as
any
);
if
(
pim
languageabilitiesData
&&
pimlanguageabilitiesData
.
length
&&
pimlanguageabilitie
sData
.
length
>
0
){
pim
languageabilitie
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
patent
id
=
null
;
item
.
pim
languageability
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
patents
=
pimpatent
sData
;
masterData
.
pim
languageabilities
=
pimlanguageabilitie
sData
;
let
pimrewardpunishmentsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimrewardpunishments'
),
'undefined'
)){
pimrewardpunishmentsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimrewardpunishments'
)
as
any
);
...
...
@@ -1059,51 +969,51 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimrewardpunishments
=
pimrewardpunishmentsData
;
let
pim
vacation
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
vacation
s'
),
'undefined'
)){
pim
vacationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvacation
s'
)
as
any
);
if
(
pim
vacationsData
&&
pimvacationsData
.
length
&&
pimvacation
sData
.
length
>
0
){
pim
vacation
sData
.
forEach
((
item
:
any
)
=>
{
let
pim
contract
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
contract
s'
),
'undefined'
)){
pim
contractsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimcontract
s'
)
as
any
);
if
(
pim
contractsData
&&
pimcontractsData
.
length
&&
pimcontract
sData
.
length
>
0
){
pim
contract
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
vacation
id
=
null
;
item
.
pim
contract
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
vacations
=
pimvacation
sData
;
let
pim
languageabilitie
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
languageabilitie
s'
),
'undefined'
)){
pim
languageabilitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimlanguageabilitie
s'
)
as
any
);
if
(
pim
languageabilitiesData
&&
pimlanguageabilitiesData
.
length
&&
pimlanguageabilitie
sData
.
length
>
0
){
pim
languageabilitie
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
contracts
=
pimcontract
sData
;
let
pim
researchfinding
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
researchfinding
s'
),
'undefined'
)){
pim
researchfindingsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimresearchfinding
s'
)
as
any
);
if
(
pim
researchfindingsData
&&
pimresearchfindingsData
.
length
&&
pimresearchfinding
sData
.
length
>
0
){
pim
researchfinding
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
languageability
id
=
null
;
item
.
pim
researchfindings
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pim
languageabilities
=
pimlanguageabilitie
sData
;
let
pimcontract
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
pimcontract
s'
),
'undefined'
)){
pimcontractsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimcontract
s'
)
as
any
);
if
(
pimcontractsData
&&
pimcontractsData
.
length
&&
pimcontract
sData
.
length
>
0
){
pimcontract
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pim
researchfindings
=
pimresearchfinding
sData
;
let
attendancemreportmxe
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
attendancemreportmxe
s'
),
'undefined'
)){
attendancemreportmxesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_attendancemreportmxe
s'
)
as
any
);
if
(
attendancemreportmxesData
&&
attendancemreportmxesData
.
length
&&
attendancemreportmxe
sData
.
length
>
0
){
attendancemreportmxe
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimcontract
id
=
null
;
item
.
attendancemreportmx
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimcontracts
=
pimcontract
sData
;
masterData
.
attendancemreportmxes
=
attendancemreportmxe
sData
;
let
pimeducationsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimeducations'
),
'undefined'
)){
pimeducationsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimeducations'
)
as
any
);
...
...
@@ -1119,36 +1029,51 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimeducations
=
pimeducationsData
;
let
attendancemreportmx
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
attendancemreportmx
es'
),
'undefined'
)){
attendancemreportmxesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_attendancemreportmx
es'
)
as
any
);
if
(
attendancemreportmxesData
&&
attendancemreportmxesData
.
length
&&
attendancemreportmx
esData
.
length
>
0
){
attendancemreportmx
esData
.
forEach
((
item
:
any
)
=>
{
let
pimtitl
esData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_
pimtitl
es'
),
'undefined'
)){
pimtitlesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimtitl
es'
)
as
any
);
if
(
pimtitlesData
&&
pimtitlesData
.
length
&&
pimtitl
esData
.
length
>
0
){
pimtitl
esData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
attendancemreportmx
id
=
null
;
item
.
pimtitle
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
attendancemreportmxes
=
attendancemreportmx
esData
;
let
pim
researchfinding
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
researchfinding
s'
),
'undefined'
)){
pim
researchfindingsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimresearchfinding
s'
)
as
any
);
if
(
pim
researchfindingsData
&&
pimresearchfindingsData
.
length
&&
pimresearchfinding
sData
.
length
>
0
){
pim
researchfinding
sData
.
forEach
((
item
:
any
)
=>
{
masterData
.
pimtitles
=
pimtitl
esData
;
let
pim
faminfo
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
faminfo
s'
),
'undefined'
)){
pim
faminfosData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimfaminfo
s'
)
as
any
);
if
(
pim
faminfosData
&&
pimfaminfosData
.
length
&&
pimfaminfo
sData
.
length
>
0
){
pim
faminfo
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
researchfindings
id
=
null
;
item
.
pim
faminfo
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimresearchfindings
=
pimresearchfindingsData
;
masterData
.
pimfaminfos
=
pimfaminfosData
;
let
pimworkhistoriesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
),
'undefined'
)){
pimworkhistoriesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
)
as
any
);
if
(
pimworkhistoriesData
&&
pimworkhistoriesData
.
length
&&
pimworkhistoriesData
.
length
>
0
){
pimworkhistoriesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimworkhistoryid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimworkhistories
=
pimworkhistoriesData
;
let
pimpersonabilitiesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
),
'undefined'
)){
pimpersonabilitiesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
)
as
any
);
...
...
@@ -1164,44 +1089,119 @@ export default class PIMPERSONServiceBase extends EntityService {
}
}
masterData
.
pimpersonabilities
=
pimpersonabilitiesData
;
let
pim
title
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
title
s'
),
'undefined'
)){
pim
titlesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimtitle
s'
)
as
any
);
if
(
pim
titlesData
&&
pimtitlesData
.
length
&&
pimtitle
sData
.
length
>
0
){
pim
title
sData
.
forEach
((
item
:
any
)
=>
{
let
pim
vocational
sData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pim
vocational
s'
),
'undefined'
)){
pim
vocationalsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimvocational
s'
)
as
any
);
if
(
pim
vocationalsData
&&
pimvocationalsData
.
length
&&
pimvocational
sData
.
length
>
0
){
pim
vocational
sData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pim
title
id
=
null
;
item
.
pim
vocational
id
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimtitles
=
pimtitlesData
;
masterData
.
pimvocationals
=
pimvocationalsData
;
let
pimdistirbutionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
),
'undefined'
)){
pimdistirbutionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
)
as
any
);
if
(
pimdistirbutionsData
&&
pimdistirbutionsData
.
length
&&
pimdistirbutionsData
.
length
>
0
){
pimdistirbutionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimdistirbutionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimdistirbutions
=
pimdistirbutionsData
;
let
pimpersonchangesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
),
'undefined'
)){
pimpersonchangesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
)
as
any
);
if
(
pimpersonchangesData
&&
pimpersonchangesData
.
length
&&
pimpersonchangesData
.
length
>
0
){
pimpersonchangesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimpersonchangeid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimpersonchanges
=
pimpersonchangesData
;
let
pimexitandentriesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
),
'undefined'
)){
pimexitandentriesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
)
as
any
);
if
(
pimexitandentriesData
&&
pimexitandentriesData
.
length
&&
pimexitandentriesData
.
length
>
0
){
pimexitandentriesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimexitandentryid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimexitandentries
=
pimexitandentriesData
;
let
pimarmycadresData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
),
'undefined'
)){
pimarmycadresData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
)
as
any
);
if
(
pimarmycadresData
&&
pimarmycadresData
.
length
&&
pimarmycadresData
.
length
>
0
){
pimarmycadresData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimarmycadresid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarmycadres
=
pimarmycadresData
;
let
pimarchivesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchives'
),
'undefined'
)){
pimarchivesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_pimarchives'
)
as
any
);
if
(
pimarchivesData
&&
pimarchivesData
.
length
&&
pimarchivesData
.
length
>
0
){
pimarchivesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
pimarchivesid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
pimarchives
=
pimarchivesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/pimpeople/
${
context
.
pimperson
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
,
JSON
.
stringify
(
res
.
data
.
pimdistirbutions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
,
JSON
.
stringify
(
res
.
data
.
pimfaminfos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
,
JSON
.
stringify
(
res
.
data
.
pimworkhistories
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvocationals'
,
JSON
.
stringify
(
res
.
data
.
pimvocationals
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
,
JSON
.
stringify
(
res
.
data
.
pimpersonchanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
,
JSON
.
stringify
(
res
.
data
.
pimexitandentries
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchives'
,
JSON
.
stringify
(
res
.
data
.
pimarchives
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
,
JSON
.
stringify
(
res
.
data
.
pimarmycadres
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_trmtrianpeople'
,
JSON
.
stringify
(
res
.
data
.
trmtrianpeople
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimachievements'
,
JSON
.
stringify
(
res
.
data
.
pimachievements
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpapers'
,
JSON
.
stringify
(
res
.
data
.
pimpapers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpatents'
,
JSON
.
stringify
(
res
.
data
.
pimpatents
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pim
rewardpunishments'
,
JSON
.
stringify
(
res
.
data
.
pimrewardpunish
ments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pim
achievements'
,
JSON
.
stringify
(
res
.
data
.
pimachieve
ments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvacations'
,
JSON
.
stringify
(
res
.
data
.
pimvacations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpapers'
,
JSON
.
stringify
(
res
.
data
.
pimpapers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimlanguageabilities'
,
JSON
.
stringify
(
res
.
data
.
pimlanguageabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimrewardpunishments'
,
JSON
.
stringify
(
res
.
data
.
pimrewardpunishments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimcontracts'
,
JSON
.
stringify
(
res
.
data
.
pimcontracts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimeducations'
,
JSON
.
stringify
(
res
.
data
.
pimeducations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_attendancemreportmxes'
,
JSON
.
stringify
(
res
.
data
.
attendancemreportmxes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimresearchfindings'
,
JSON
.
stringify
(
res
.
data
.
pimresearchfindings
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
,
JSON
.
stringify
(
res
.
data
.
pimpersonabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_attendancemreportmxes'
,
JSON
.
stringify
(
res
.
data
.
attendancemreportmxes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimeducations'
,
JSON
.
stringify
(
res
.
data
.
pimeducations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimtitles'
,
JSON
.
stringify
(
res
.
data
.
pimtitles
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
,
JSON
.
stringify
(
res
.
data
.
pimfaminfos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
,
JSON
.
stringify
(
res
.
data
.
pimworkhistories
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
,
JSON
.
stringify
(
res
.
data
.
pimpersonabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvocationals'
,
JSON
.
stringify
(
res
.
data
.
pimvocationals
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
,
JSON
.
stringify
(
res
.
data
.
pimdistirbutions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
,
JSON
.
stringify
(
res
.
data
.
pimpersonchanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
,
JSON
.
stringify
(
res
.
data
.
pimexitandentries
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
,
JSON
.
stringify
(
res
.
data
.
pimarmycadres
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchives'
,
JSON
.
stringify
(
res
.
data
.
pimarchives
));
return
res
;
}
...
...
@@ -1285,27 +1285,27 @@ export default class PIMPERSONServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/pimpeople/getdraft`
,
isloading
);
res
.
data
.
pimperson
=
data
.
pimperson
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
,
JSON
.
stringify
(
res
.
data
.
pimdistirbutions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
,
JSON
.
stringify
(
res
.
data
.
pimfaminfos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
,
JSON
.
stringify
(
res
.
data
.
pimworkhistories
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvocationals'
,
JSON
.
stringify
(
res
.
data
.
pimvocationals
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
,
JSON
.
stringify
(
res
.
data
.
pimpersonchanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
,
JSON
.
stringify
(
res
.
data
.
pimexitandentries
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchives'
,
JSON
.
stringify
(
res
.
data
.
pimarchives
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
,
JSON
.
stringify
(
res
.
data
.
pimarmycadres
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_trmtrianpeople'
,
JSON
.
stringify
(
res
.
data
.
trmtrianpeople
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimachievements'
,
JSON
.
stringify
(
res
.
data
.
pimachievements
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpapers'
,
JSON
.
stringify
(
res
.
data
.
pimpapers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpatents'
,
JSON
.
stringify
(
res
.
data
.
pimpatents
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pim
rewardpunishments'
,
JSON
.
stringify
(
res
.
data
.
pimrewardpunish
ments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pim
achievements'
,
JSON
.
stringify
(
res
.
data
.
pimachieve
ments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvacations'
,
JSON
.
stringify
(
res
.
data
.
pimvacations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpapers'
,
JSON
.
stringify
(
res
.
data
.
pimpapers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimlanguageabilities'
,
JSON
.
stringify
(
res
.
data
.
pimlanguageabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimrewardpunishments'
,
JSON
.
stringify
(
res
.
data
.
pimrewardpunishments
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimcontracts'
,
JSON
.
stringify
(
res
.
data
.
pimcontracts
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimeducations'
,
JSON
.
stringify
(
res
.
data
.
pimeducations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_attendancemreportmxes'
,
JSON
.
stringify
(
res
.
data
.
attendancemreportmxes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimresearchfindings'
,
JSON
.
stringify
(
res
.
data
.
pimresearchfindings
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
,
JSON
.
stringify
(
res
.
data
.
pimpersonabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_attendancemreportmxes'
,
JSON
.
stringify
(
res
.
data
.
attendancemreportmxes
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimeducations'
,
JSON
.
stringify
(
res
.
data
.
pimeducations
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimtitles'
,
JSON
.
stringify
(
res
.
data
.
pimtitles
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimfaminfos'
,
JSON
.
stringify
(
res
.
data
.
pimfaminfos
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimworkhistories'
,
JSON
.
stringify
(
res
.
data
.
pimworkhistories
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonabilities'
,
JSON
.
stringify
(
res
.
data
.
pimpersonabilities
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimvocationals'
,
JSON
.
stringify
(
res
.
data
.
pimvocationals
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimdistirbutions'
,
JSON
.
stringify
(
res
.
data
.
pimdistirbutions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimpersonchanges'
,
JSON
.
stringify
(
res
.
data
.
pimpersonchanges
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimexitandentries'
,
JSON
.
stringify
(
res
.
data
.
pimexitandentries
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarmycadres'
,
JSON
.
stringify
(
res
.
data
.
pimarmycadres
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_pimarchives'
,
JSON
.
stringify
(
res
.
data
.
pimarchives
));
return
res
;
}
...
...
app_EHRPim/src/store/index.ts
浏览文件 @
f089fef5
...
...
@@ -7,6 +7,7 @@ import * as mutations from './mutations';
import
*
as
getters
from
'./getters'
;
import
viewaction
from
'./modules/view-action'
import
unifiedresource
from
'./modules/unified-resource'
const
state
=
{
...
rootstate
...
...
@@ -20,7 +21,8 @@ const store = new Vuex.Store({
mutations
,
getters
,
modules
:
{
viewaction
viewaction
,
unifiedresource
},
});
...
...
app_EHRPim/src/store/modules/unified-resource/actions.ts
0 → 100644
浏览文件 @
f089fef5
/**
* 提交统一资源数据
*
* @param param0
* @param data
*/
export
const
commitResourceData
=
({
commit
,
state
}:
{
commit
:
any
,
state
:
any
},
{
unires
,
enablepermissionvalid
}:
{
unires
:
Array
<
any
>
,
enablepermissionvalid
:
boolean
})
=>
{
if
(
unires
&&
unires
.
length
>
0
){
commit
(
'setResourceData'
,
unires
);
}
if
(
enablepermissionvalid
){
commit
(
'setEnablePermissionValid'
,
enablepermissionvalid
);
}
}
\ No newline at end of file
app_EHRPim/src/store/modules/unified-resource/getters.ts
0 → 100644
浏览文件 @
f089fef5
/**
* 判断指定统一资源是否存在
*
* @param state
*/
export
const
getResourceData
=
(
state
:
any
)
=>
(
resourcetag
:
string
)
=>
{
let
itemIndex
:
any
=
state
.
resourceData
.
findIndex
((
obj
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
obj
.
unirescode
,
resourcetag
);
})
return
itemIndex
===
-
1
?
false
:
true
;
}
/**
* 获取是否开启权限认证
*
* @param state
*/
export
const
getEnablePermissionValid
=
(
state
:
any
)
=>
{
return
state
.
enablePermissionValid
;
}
\ No newline at end of file
app_EHRPim/src/store/modules/unified-resource/index.ts
0 → 100644
浏览文件 @
f089fef5
import
{
resourcestate
}
from
'./state'
;
import
*
as
actions
from
'./actions'
;
import
*
as
mutations
from
'./mutations'
;
import
*
as
getters
from
'./getters'
;
const
state
=
{
...
resourcestate
}
export
default
{
namespaced
:
true
,
state
,
getters
,
actions
,
mutations
}
\ No newline at end of file
app_EHRPim/src/store/modules/unified-resource/mutations.ts
0 → 100644
浏览文件 @
f089fef5
/**
* 设置统一资源数据
*
* @param state
* @param resourceArray
*/
export
const
setResourceData
=
(
state
:
any
,
resourceArray
:
Array
<
any
>
)
=>
{
if
(
resourceArray
&&
resourceArray
.
length
===
0
){
return
;
}
state
.
resourceData
=
resourceArray
;
}
/**
* 设置是否开启权限认证
*
* @param state
* @param resourceArray
*/
export
const
setEnablePermissionValid
=
(
state
:
any
,
enablepermissionvalid
:
boolean
)
=>
{
state
.
enablePermissionValid
=
enablepermissionvalid
;
}
app_EHRPim/src/store/modules/unified-resource/state.ts
0 → 100644
浏览文件 @
f089fef5
/**
* 所有资源状态
*/
export
const
resourcestate
:
any
=
{
// 统一资源数据
resourceData
:
[],
// 是否开启权限认证
enablePermissionValid
:
false
}
\ No newline at end of file
app_EHRPim/src/utils/app-modal/app-modal.less
浏览文件 @
f089fef5
...
...
@@ -10,6 +10,9 @@
.ivu-modal-body {
padding: 0 10px;
height: calc(100% - 52px);
.view-container{
padding: 15px;
}
}
}
}
...
...
app_EHRPim/src/utils/auth-guard/auth-guard.ts
浏览文件 @
f089fef5
...
...
@@ -53,9 +53,21 @@ export class AuthGuard {
const
get
:
Promise
<
any
>
=
Http
.
getInstance
().
get
(
url
);
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
cons
t
{
data
}:
{
data
:
any
}
=
response
;
le
t
{
data
}:
{
data
:
any
}
=
response
;
if
(
data
)
{
// token认证把用户信息放入应用级数据
if
(
localStorage
.
getItem
(
'user'
)){
let
user
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
'user'
)
as
string
);
let
localAppData
:
any
=
{};
if
(
user
.
sessionParams
){
localAppData
=
{
context
:
user
.
sessionParams
};
Object
.
assign
(
localAppData
,
data
);
}
data
=
JSON
.
parse
(
JSON
.
stringify
(
localAppData
));
}
router
.
app
.
$store
.
commit
(
'addAppData'
,
data
);
// 提交统一资源数据
router
.
app
.
$store
.
dispatch
(
'unifiedresource/commitResourceData'
,
data
);
}
}
resolve
(
true
);
...
...
app_EHRPim/src/utils/http/http.ts
浏览文件 @
f089fef5
...
...
@@ -78,7 +78,7 @@ export class Http {
axios
({
method
:
'post'
,
url
:
url
,
data
:
{
...
params
}
,
data
:
params
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
,
'Accept'
:
'application/json'
},
// transformResponse: [(data: any) => {
// let _data: any = null;
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录