|
|
|
@ -50,11 +50,11 @@ export default function userPage() {
|
|
|
|
|
if (topBarSearchRequest) {
|
|
|
|
|
let request = { ...topBarSearchRequest, ids: idsStr };
|
|
|
|
|
api =
|
|
|
|
|
'/api/bs/hrmorganization/orgchart/asyncUserData' +
|
|
|
|
|
'/api/bs/hrmorganization/jclorgchart/asyncUserData' +
|
|
|
|
|
qs.stringify(request, { addQueryPrefix: true });
|
|
|
|
|
} else {
|
|
|
|
|
api =
|
|
|
|
|
'/api/bs/hrmorganization/orgchart/asyncUserData?fclass=0&root=0&date=' +
|
|
|
|
|
'/api/bs/hrmorganization/jclorgchart/asyncUserData?fclass=0&root=0&date=' +
|
|
|
|
|
moment(new Date()).format('YYYY-MM-DD') +
|
|
|
|
|
'&ids=' +
|
|
|
|
|
idsStr;
|
|
|
|
@ -78,7 +78,7 @@ export default function userPage() {
|
|
|
|
|
return `./img/department/${index}.png`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取部门图片
|
|
|
|
|
// 获取分部图片
|
|
|
|
|
function getSubcompanyImage() {
|
|
|
|
|
let index = Math.floor(Math.random() * 3) + 1;
|
|
|
|
|
return `./img/subcompany/${index}.png`;
|
|
|
|
@ -87,14 +87,14 @@ export default function userPage() {
|
|
|
|
|
// 获取数据
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
document.cookie =
|
|
|
|
|
'loginidweaver=1; languageidweaver=7; loginuuids=1; JSESSIONID=aaa1QNMWge48Bh-3oq6oy; ecology_JSessionid=aaa1QNMWge48Bh-3oq6oy; __randcode__=5c4300d1-05d6-4ca6-adb4-f4e23a47acb5';
|
|
|
|
|
'ecology_JSessionid=aaa8b2PuQK_99bUdsZfuy; JSESSIONID=aaa8b2PuQK_99bUdsZfuy; loginidweaver=1; languageidweaver=7; loginuuids=1; __randcode__=fc144674-308a-4579-ba74-717559795c8b';
|
|
|
|
|
d3.json(
|
|
|
|
|
// "/user/data"
|
|
|
|
|
'/api/bs/hrmorganization/orgchart/userData?fclass=0&root=0&date=' +
|
|
|
|
|
'/api/bs/hrmorganization/jclorgchart/userData?fclass=0&root=0&date=' +
|
|
|
|
|
moment(new Date()).format('YYYY-MM-DD'),
|
|
|
|
|
).then((data) => {
|
|
|
|
|
setData(data.data);
|
|
|
|
|
setHasRight(data?.hasRight);
|
|
|
|
|
setHasRight('true');
|
|
|
|
|
});
|
|
|
|
|
}, [true]);
|
|
|
|
|
|
|
|
|
@ -190,7 +190,7 @@ export default function userPage() {
|
|
|
|
|
|
|
|
|
|
const handleExport = (type) => {
|
|
|
|
|
if (type == 'png') {
|
|
|
|
|
orgChart && orgChart.exportImg({ full: true });
|
|
|
|
|
orgChart && orgChart.exportImg({ full: true, scale: 12 });
|
|
|
|
|
} else {
|
|
|
|
|
orgChart && downloadPdf(orgChart);
|
|
|
|
|
}
|
|
|
|
@ -199,7 +199,7 @@ export default function userPage() {
|
|
|
|
|
const handleSearch = (requestData) => {
|
|
|
|
|
setTpBarSearchRequest(requestData);
|
|
|
|
|
let api =
|
|
|
|
|
'/api/bs/hrmorganization/orgchart/userData' +
|
|
|
|
|
'/api/bs/hrmorganization/jclorgchart/userData' +
|
|
|
|
|
qs.stringify(requestData, { addQueryPrefix: true });
|
|
|
|
|
fetch(api)
|
|
|
|
|
.then((res) => res.json())
|
|
|
|
@ -236,15 +236,15 @@ export default function userPage() {
|
|
|
|
|
let companyUrl =
|
|
|
|
|
'/spa/organization/static/index.html#/main/organization/group';
|
|
|
|
|
// 分部地址
|
|
|
|
|
let subcompanyUrl = `/spa/organization/static/index.html#/main/organization/companyExtend/${d.data.fobjid}`;
|
|
|
|
|
let subcompanyUrl = `/spa/hrm/engine.html#/hrmengine/organization?showTree=false&type=subcompany&id=${d.data.fobjid}`;
|
|
|
|
|
// 部门地址
|
|
|
|
|
let departmentUrl = `/spa/organization/static/index.html#/main/organization/departmentExtend/${d.data.fobjid}`;
|
|
|
|
|
let departmentUrl = `/spa/hrm/engine.html#/hrmengine/organization?showTree=false&isView=1&type=department&id=${d.data.fobjid}`;
|
|
|
|
|
// 岗位地址
|
|
|
|
|
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`;
|
|
|
|
|
// 分部通讯录
|
|
|
|
@ -269,7 +269,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('${
|
|
|
|
|
" onclick="if(${d.data.fisvitual}==1||${
|
|
|
|
|
d.data.ftype
|
|
|
|
|
}==0) return;window.open('${
|
|
|
|
|
d.data.ftype == 0
|
|
|
|
|
? companyUrl
|
|
|
|
|
: d.data.ftype == 1
|
|
|
|
@ -327,17 +329,9 @@ export default function userPage() {
|
|
|
|
|
<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 style="height: 28px;border: 1px solid #00C2FF; border-radius: 10px; line-height: 24px; padding: 0px 5px; min-width: 60px; margin-left: 10px;">在岗: ${
|
|
|
|
|
d.data.fonjob
|
|
|
|
|
}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -358,9 +352,7 @@ 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('${jobtitleUrl}', '_blank')">${
|
|
|
|
|
" onclick="if(${d.data.fisvitual}==1) return;">${
|
|
|
|
|
d.data.fname
|
|
|
|
|
}</span>
|
|
|
|
|
<span style="margin-left: 70px;">
|
|
|
|
@ -379,9 +371,7 @@ export default function userPage() {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: #333333;
|
|
|
|
|
margin-bottom: 23px;
|
|
|
|
|
" onclick="if(${
|
|
|
|
|
d.data.fisvitual
|
|
|
|
|
}==1) return;window.open('${jobtitleUrl}', '_blank')">${
|
|
|
|
|
" onclick="if(${d.data.fisvitual}==1) return;">${
|
|
|
|
|
d.data.fname
|
|
|
|
|
}</div>
|
|
|
|
|
<div style="
|
|
|
|
@ -392,11 +382,7 @@ export default function userPage() {
|
|
|
|
|
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>
|
|
|
|
|
<span style="margin-left: 10px;">在岗:${d.data.fonjob}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -497,7 +483,7 @@ export default function userPage() {
|
|
|
|
|
handleSearch(requestData);
|
|
|
|
|
}}
|
|
|
|
|
type="user"
|
|
|
|
|
url="/api/bs/hrmorganization/orgchart/getCondition?type=user"
|
|
|
|
|
url="/api/bs/hrmorganization/jclorgchart/getCondition?type=user"
|
|
|
|
|
/>
|
|
|
|
|
<ToolBar
|
|
|
|
|
onTopLayoutClick={handleTopLayoutClick}
|
|
|
|
|