|
|
|
@ -50,11 +50,11 @@ export default function userPage() {
|
|
|
|
|
if (topBarSearchRequest) {
|
|
|
|
|
let request = { ...topBarSearchRequest, ids: idsStr };
|
|
|
|
|
api =
|
|
|
|
|
'/api/bs/hrmorganization/orgchart/asyncUserData' +
|
|
|
|
|
'/api/bs/junchuangorgchart/asyncUserData' +
|
|
|
|
|
qs.stringify(request, { addQueryPrefix: true });
|
|
|
|
|
} else {
|
|
|
|
|
api =
|
|
|
|
|
'/api/bs/hrmorganization/orgchart/asyncUserData?fclass=0&root=0&date=' +
|
|
|
|
|
'/api/bs/junchuangorgchart/asyncUserData?fclass=0&root=0&date=' +
|
|
|
|
|
moment(new Date()).format('YYYY-MM-DD') +
|
|
|
|
|
'&ids=' +
|
|
|
|
|
idsStr;
|
|
|
|
@ -87,10 +87,10 @@ export default function userPage() {
|
|
|
|
|
// 获取数据
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
document.cookie =
|
|
|
|
|
'Webstorm-3d4d3ad4=b8ca5bef-a131-4c2b-81da-6f8595481dc2; ecology_JSessionid=aaad2HRSW843U9BJFcUuy; JSESSIONID=aaad2HRSW843U9BJFcUuy; loginidweaver=1; languageidweaver=7; loginuuids=1; __randcode__=47f1e1cc-51de-48b3-af04-3875b717805f';
|
|
|
|
|
'ecology_JSessionid=aaa6H5OU8Uk1P7mNN5bJy; JSESSIONID=aaa6H5OU8Uk1P7mNN5bJy; loginidweaver=1; languageidweaver=7; loginuuids=1; __randcode__=25764f60-623f-4e45-b4b1-357e138f3610';
|
|
|
|
|
d3.json(
|
|
|
|
|
// "/user/data"
|
|
|
|
|
'/api/bs/hrmorganization/orgchart/userData?fclass=0&root=0&date=' +
|
|
|
|
|
'/api/bs/junchuangorgchart/userData?fclass=0&root=0&date=' +
|
|
|
|
|
moment(new Date()).format('YYYY-MM-DD'),
|
|
|
|
|
).then((data) => {
|
|
|
|
|
setData(data.data);
|
|
|
|
@ -199,7 +199,7 @@ export default function userPage() {
|
|
|
|
|
const handleSearch = (requestData) => {
|
|
|
|
|
setTpBarSearchRequest(requestData);
|
|
|
|
|
let api =
|
|
|
|
|
'/api/bs/hrmorganization/orgchart/userData' +
|
|
|
|
|
'/api/bs/junchuangorgchart/userData' +
|
|
|
|
|
qs.stringify(requestData, { addQueryPrefix: true });
|
|
|
|
|
fetch(api)
|
|
|
|
|
.then((res) => res.json())
|
|
|
|
@ -217,7 +217,7 @@ export default function userPage() {
|
|
|
|
|
|
|
|
|
|
const handleSynchronous = (requestData) => {
|
|
|
|
|
setDisabled(true);
|
|
|
|
|
let api = '/api/bs/hrmorganization/orgchart/synchronousData';
|
|
|
|
|
let api = '/api/bs/junchuangorgchart/syncOrgMapData';
|
|
|
|
|
fetch(api)
|
|
|
|
|
.then((res) => res.json())
|
|
|
|
|
.then((data) => {
|
|
|
|
@ -259,9 +259,9 @@ export default function userPage() {
|
|
|
|
|
// 岗位地址
|
|
|
|
|
let jobtitleUrl = `/spa/organization/static/index.html#/main/organization/jobExtend/${d.data.fobjid}`;
|
|
|
|
|
// 人员地址
|
|
|
|
|
let userUrl = `/spa/organization/static/index.html#/main/organization/resourceCard/${d.data.fleader}`;
|
|
|
|
|
let userUrl = `/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${d.data.fleader}`;
|
|
|
|
|
// 岗位人员地址
|
|
|
|
|
let postUserUrl = `/spa/organization/static/index.html#/main/organization/resourceCard/${d.data.fobjid}`;
|
|
|
|
|
let postUserUrl = `/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${d.data.fobjid}`;
|
|
|
|
|
//集团通讯录
|
|
|
|
|
let addressBookGroupUrl = `/spa/organization/static/index.html#/main/organization/resource/?virtualtype=0`;
|
|
|
|
|
// 分部通讯录
|
|
|
|
@ -286,15 +286,9 @@ export default function userPage() {
|
|
|
|
|
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: #000000;
|
|
|
|
|
" onclick="if(${d.data.fisvitual}==1) return;window.open('${
|
|
|
|
|
d.data.ftype == 0
|
|
|
|
|
? companyUrl
|
|
|
|
|
: d.data.ftype == 1
|
|
|
|
|
? subcompanyUrl
|
|
|
|
|
: d.data.ftype == 2
|
|
|
|
|
? departmentUrl
|
|
|
|
|
: ''
|
|
|
|
|
}', '_blank')">${d.data.fname}</span>
|
|
|
|
|
" onclick="if(${d.data.fisvitual}==1) return;">${
|
|
|
|
|
d.data.fname
|
|
|
|
|
}</span>
|
|
|
|
|
<span style="margin-left: 70px;">
|
|
|
|
|
<img src="./img/user-card/line1.png" />
|
|
|
|
|
<img src="./img/user-card/line2.png" />
|
|
|
|
@ -302,15 +296,13 @@ export default function userPage() {
|
|
|
|
|
<div style=" height: 152px;background-size: 100% 100%;box-sizing: border-box;padding-top: 30px;position:relative;z-index:2">
|
|
|
|
|
<div style='position:absolute;z-index:-1;top:0'>
|
|
|
|
|
<img src='./img/user-card/user-card.png'></div>
|
|
|
|
|
<div style="display: inline-block; background-size: 100% 100%; width: 35%; height: 90px; text-align:center; vertical-align: top; margin-left: 11px;box-sizing: border;">
|
|
|
|
|
<div style="display: inline-block; background-size: 100% 100%; width: 35%; height: 90px; text-align:center; vertical-align: top; margin-left: 0px;box-sizing: border;">
|
|
|
|
|
<img src='./img/user-card/avatar-outer.png' style='position:absolute;width:90px;height:90px;left:11px'/>
|
|
|
|
|
<img src="${
|
|
|
|
|
d.data.fleaderimg
|
|
|
|
|
? d.data.fleaderimg
|
|
|
|
|
: d.data.ftype == 0 || d.data.ftype == 1
|
|
|
|
|
d.data.ftype == 0 || d.data.ftype == 1
|
|
|
|
|
? './img/company.png'
|
|
|
|
|
: './img/default_avator.png'
|
|
|
|
|
}" style="width: 58px; height: 58px;position:absolute;left:29px; border-radius: 50%; margin-top: 16px;position:absolute;left:29px;z-index:999"/>
|
|
|
|
|
: './img/default_dept1.png'
|
|
|
|
|
}" style="width: 58px; height: 58px;position:absolute;left:27px; border-radius: 50%; margin-top: 16px;z-index:999"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: inline-block; margin-left: 6px;width: 55%" >
|
|
|
|
|
<div onclick="if(${d.data.fisvitual}==1) return;${
|
|
|
|
@ -329,97 +321,22 @@ export default function userPage() {
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #333333;
|
|
|
|
|
margin-bottom: 19px;
|
|
|
|
|
margin-top: 25px;
|
|
|
|
|
white-space:nowrap;
|
|
|
|
|
overflow:hidden;
|
|
|
|
|
text-overflow:ellipsis;"
|
|
|
|
|
title="${d.data.fname}${
|
|
|
|
|
d.data.fleaderjob ? `/${d.data.fleaderjob}` : ''
|
|
|
|
|
}">${d.data.fname}${
|
|
|
|
|
d.data.fleaderjob ? `/${d.data.fleaderjob}` : ''
|
|
|
|
|
}</div>
|
|
|
|
|
title="${d.data.fname}">${d.data.fname}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: ${
|
|
|
|
|
d.data.fisvitual == 0 ? 'flex' : 'none'
|
|
|
|
|
};" >
|
|
|
|
|
<div style="height: 28px;border: 1px solid #00C2FF; border-radius: 10px; line-height: 24px; padding: 0px 5px; min-width: 60px;">编制: ${
|
|
|
|
|
d.data.fplan
|
|
|
|
|
}</div>
|
|
|
|
|
<div style="height: 28px;border: 1px solid #00C2FF; border-radius: 10px; line-height: 24px; padding: 0px 5px; min-width: 60px; margin-left: 10px;" onclick="if(${
|
|
|
|
|
d.data.fisvitual
|
|
|
|
|
}==1) return;event.stopPropagation();window.open('${
|
|
|
|
|
d.data.ftype == 0
|
|
|
|
|
? addressBookGroupUrl
|
|
|
|
|
: d.data.ftype == 1
|
|
|
|
|
? addressBookUrl
|
|
|
|
|
: d.data.ftype == 2
|
|
|
|
|
? addressBookDepartmentUrl
|
|
|
|
|
: ''
|
|
|
|
|
}', '_blank')">在岗: ${d.data.fonjob}</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>`;
|
|
|
|
|
} else if (d.data.ftype == 3) {
|
|
|
|
|
return `<div>
|
|
|
|
|
<div style="position: relative;">
|
|
|
|
|
<img src="./img/user-card/card-label-start.png" />
|
|
|
|
|
<span style="display: inline-block;
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 5px;
|
|
|
|
|
top: -8px;
|
|
|
|
|
background: #F7F9FD;
|
|
|
|
|
z-index: 100;
|
|
|
|
|
padding: 0px 10px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: #000000;
|
|
|
|
|
" onclick="if(${
|
|
|
|
|
d.data.fisvitual
|
|
|
|
|
}==1) return;window.open('${jobtitleUrl}', '_blank')">${
|
|
|
|
|
d.data.fname
|
|
|
|
|
}</span>
|
|
|
|
|
<span style="margin-left: 70px;">
|
|
|
|
|
<img src="./img/user-card/line1.png" />
|
|
|
|
|
<img src="./img/user-card/line2.png" />
|
|
|
|
|
</span>
|
|
|
|
|
<div style=" height: 152px;background-size: 100% 100%;box-sizing: border-box;padding-top: 40px;">
|
|
|
|
|
<div style='position:absolute;z-index:-1;top:16px'>
|
|
|
|
|
<img src='./img/user-card/user-card.png'>
|
|
|
|
|
</div>
|
|
|
|
|
<img src="./img/user-card/jobicon.png" style="margin-left: 20px; vertical-align: top;"/>
|
|
|
|
|
<div style="display: inline-block; margin-left: 15px;">
|
|
|
|
|
<div style="
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: #333333;
|
|
|
|
|
margin-bottom: 23px;
|
|
|
|
|
" onclick="if(${
|
|
|
|
|
d.data.fisvitual
|
|
|
|
|
}==1) return;window.open('${jobtitleUrl}', '_blank')">${
|
|
|
|
|
d.data.fname
|
|
|
|
|
}</div>
|
|
|
|
|
<div style="
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #333333;
|
|
|
|
|
display: ${d.data.fisvitual == 0 ? 'flex' : 'none'};
|
|
|
|
|
">
|
|
|
|
|
<span>编制:${d.data.fplan}</span>
|
|
|
|
|
<span style="margin-left: 10px;" onclick="if(${
|
|
|
|
|
d.data.fisvitual
|
|
|
|
|
}==1) return;window.open('${addressBookPostUrl}', '_blank')">在岗:${
|
|
|
|
|
d.data.fonjob
|
|
|
|
|
}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>`;
|
|
|
|
|
} else if (d.data.ftype == 4) {
|
|
|
|
|
return `<div>
|
|
|
|
|
<div style="position: relative;" >
|
|
|
|
|
<img src="./img/user-card/card-label-start.png" />
|
|
|
|
@ -431,12 +348,12 @@ export default function userPage() {
|
|
|
|
|
<div style='position:absolute;z-index:-1;top:16px'>
|
|
|
|
|
<img src='./img/user-card/user-card.png'>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: inline-block; background-size: 100% 100%; width: 35%; height: 90px; text-align:center; vertical-align: top; margin-left: 11px;box-sizing: border;">
|
|
|
|
|
<div style="display: inline-block; background-size: 100% 100%; width: 35%; height: 90px; text-align:center; vertical-align: top; margin-left: 8px;box-sizing: border;">
|
|
|
|
|
<img src='./img/user-card/avatar-outer.png' style='position:absolute;width:90px;height:90px;left:11px;z-index:-1'/>
|
|
|
|
|
<img src="${
|
|
|
|
|
d.data.fleaderimg
|
|
|
|
|
? d.data.fleaderimg
|
|
|
|
|
: './img/default_avator.png'
|
|
|
|
|
: './img/default_avator1.png'
|
|
|
|
|
}" style="width: 58px; height: 58px; border-radius: 50%; margin-top: 16px;z-index:999"/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -518,7 +435,7 @@ export default function userPage() {
|
|
|
|
|
}}
|
|
|
|
|
disabled={disabled}
|
|
|
|
|
type="user"
|
|
|
|
|
url="/api/bs/hrmorganization/orgchart/getCondition?type=user"
|
|
|
|
|
url="/api/bs/junchuangorgchart/getCondition?type=user"
|
|
|
|
|
/>
|
|
|
|
|
<ToolBar
|
|
|
|
|
onTopLayoutClick={handleTopLayoutClick}
|
|
|
|
|