Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
高东东-金蝶建发
/
jf-yzj-resume
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1b90275a
authored
Aug 22, 2024
by
--local
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update: [1]基于人员属性中的"人员板块"字段确定人员归属物业shr还是放开shr
[2] 调整orgType的定义:1 房产 2 物业
parent
ffc3e385
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
8 deletions
src/js/index.js
src/js/polyfill/cordova.js
src/js/index.js
View file @
1b90275a
...
...
@@ -18,6 +18,8 @@ const FastClick = require('fastclick');
// shr员工编号字段
const
employeenumberField
=
process
.
env
.
PACK_ENV
===
'product'
?
'5893b734-4537-4036-9f1c-16ff831b64b2'
:
'72f1d584-bc3d-4616-85d0-4a67c1829d1c'
;
// shr员工类型: 房开、物业、合诚
var
orgTypeField
=
process
.
env
.
PACK_ENV
===
'product'
?
'20791150-9fbd-4db0-96b7-82d301c6531c'
:
'2cd7a5eb-371d-4d32-8220-6ebb64a5b214'
window
.
topHeight
=
115
;
...
...
@@ -120,10 +122,14 @@ function getUserInfoByOid(oId) {
const
employeenumberInfo
=
extra
.
filter
(({
publicid
})
=>
{
return
employeenumberField
===
publicid
;
});
var
orgTypeInfo
=
extra
.
filter
(
function
(
item
)
{
return
orgTypeField
===
item
.
publicid
})
resolve
({
uid
:
userInfo
.
username
||
''
,
avatar
:
userInfo
.
avatar
||
''
,
employeenumber
:
(
employeenumberInfo
[
0
]
||
{}).
value
employeenumber
:
(
employeenumberInfo
[
0
]
||
{}).
value
,
orgType
:
(
orgTypeInfo
[
0
]
||
{}).
value
});
};
opt
.
error
=
function
(
e
)
{
...
...
@@ -142,6 +148,11 @@ function initUser() {
// 如果不是从人员详情过来的,employeenumber、uid从当前人员的获取。
return
Promise
.
all
([
app
.
getUser
(),
getUserInfoByOid
(
openId
)])
.
then
(([
user
,
viewee
])
=>
{
if
(
user
.
orgType
)
{
user
.
extra
=
{
orgType
:
user
.
orgType
}
}
// user 查看者
// viewee 被查看者
console
.
log
(
'user:'
,
user
);
...
...
@@ -154,10 +165,14 @@ function initUser() {
const
extra
=
{
avatar
:
viewee
.
avatar
,
employeenumber
:
viewee
.
employeenumber
,
uid
:
viewee
.
uid
,
extra
:
'{"orgType": 1}'
uid
:
viewee
.
uid
};
loginuserid
=
user
.
employeenumber
;
if
(
viewee
.
orgType
)
{
extra
.
extra
=
{
orgType
:
viewee
.
orgType
}
}
userid
=
isFromPersonDetail
?
extra
.
employeenumber
:
user
.
employeenumber
;
_uid
=
isFromPersonDetail
?
extra
.
uid
:
user
.
uid
;
photoUrl
=
isFromPersonDetail
?
extra
.
avatar
:
user
.
avatar
;
...
...
@@ -166,6 +181,8 @@ function initUser() {
}
token
=
user
.
ssoToken
;
appKey
=
extra
.
appkey
||
configuration
.
appkey
;
/* old-code
let orgType;
if (!extra.extra) {
orgType = eval('(' + user.extra + ')').orgType;
} else {
...
...
@@ -173,12 +190,17 @@ function initUser() {
eval('(' + extra.extra + ')').orgType ||
eval('(' + user.extra + ')').orgType;
}
*/
const
_extra
=
extra
.
extra
||
user
.
extra
||
{}
const
orgType
=
''
+
_extra
.
orgType
// 2024-08-08 黄延龄反馈:1是房开 2是物业 合诚待定
// 将物业(原来是6)调整为2,原来是2的怡家园调整为6
switch
(
orgType
)
{
// 房产
case
1
:
case
'1'
:
break
;
// 怡家园
case
2
:
case
'6'
:
$mas
.
config
({
baseUrl
:
configuration
.
baseUrl
,
code
:
configuration
.
yjyCode
...
...
@@ -188,7 +210,7 @@ function initUser() {
_uid
=
_uid
.
replace
(
'YJY'
,
''
);
break
;
// 汇嘉
case
3
:
case
'3'
:
$mas
.
config
({
baseUrl
:
configuration
.
baseUrl
,
code
:
configuration
.
hjCode
...
...
@@ -196,7 +218,7 @@ function initUser() {
url
=
configuration
.
methods
.
hjResume
;
break
;
// 物业
case
6
:
case
'2'
:
$mas
.
config
({
baseUrl
:
configuration
.
baseUrl
,
code
:
configuration
.
wyCode
...
...
@@ -204,7 +226,7 @@ function initUser() {
url
=
configuration
.
methods
.
wyResume
;
break
;
// 合诚
case
7
:
case
'7'
:
$mas
.
config
({
baseUrl
:
configuration
.
baseUrl
,
code
:
configuration
.
hcCode
...
...
src/js/polyfill/cordova.js
View file @
1b90275a
...
...
@@ -336,6 +336,7 @@
getUser
:
function
(
param
,
successFn
,
failFn
)
{
// shr员工编号字段
var
employeenumberField
=
process
.
env
.
PACK_ENV
===
'product'
?
'5893b734-4537-4036-9f1c-16ff831b64b2'
:
'72f1d584-bc3d-4616-85d0-4a67c1829d1c'
var
orgTypeField
=
process
.
env
.
PACK_ENV
===
'product'
?
'20791150-9fbd-4db0-96b7-82d301c6531c'
:
'2cd7a5eb-371d-4d32-8220-6ebb64a5b214'
getCurrentUserInfo
(
function
(
result
)
{
console
.
log
(
'getCurrentUserInfo-success>>'
,
result
);
var
success
=
(
result
||
{}).
success
...
...
@@ -350,8 +351,12 @@
var
employeenumberInfo
=
extra
.
filter
(
function
(
item
)
{
return
employeenumberField
===
item
.
publicid
})
var
orgTypeInfo
=
extra
.
filter
(
function
(
item
)
{
return
orgTypeField
===
item
.
publicid
})
successFn
({
employeenumber
:
(
employeenumberInfo
[
0
]
||
{}).
value
,
orgType
:
(
orgTypeInfo
[
0
]
||
{}).
value
,
uid
:
userInfo
.
username
,
email
:
userInfo
.
email
,
avatar
:
userInfo
.
avatar
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment