|
|
@ -44,13 +44,16 @@ export default function companyPage() {
|
|
|
|
|
|
|
|
|
|
|
|
// 点击节点
|
|
|
|
// 点击节点
|
|
|
|
const onNodeClick = (node) => {
|
|
|
|
const onNodeClick = (node) => {
|
|
|
|
if (node.ftype == '2') {
|
|
|
|
if (node.ftype == '1') {
|
|
|
|
const params = {
|
|
|
|
window.open(
|
|
|
|
rootId: node.id,
|
|
|
|
`/spa/portal/static/index.html#/main/portal/portal-6-3?subId=${node.fobjid}`,
|
|
|
|
fclass: topbar.state.requestData.fclass,
|
|
|
|
'_blank',
|
|
|
|
id: infoRef.current,
|
|
|
|
);
|
|
|
|
};
|
|
|
|
} else if (node.ftype == '2') {
|
|
|
|
drawerCom.showDrawer(params);
|
|
|
|
window.open(
|
|
|
|
|
|
|
|
`/spa/portal/static/index.html#/main/portal/portal-5-3?depId=${node.fobjid}`,
|
|
|
|
|
|
|
|
'_blank',
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -96,12 +99,14 @@ export default function companyPage() {
|
|
|
|
|
|
|
|
|
|
|
|
// 获取部门图片
|
|
|
|
// 获取部门图片
|
|
|
|
function getDepartmentImage(fisvitual) {
|
|
|
|
function getDepartmentImage(fisvitual) {
|
|
|
|
return fisvitual == '0' ? `./img/back/level4.png` : `./img/back/level8.png`;
|
|
|
|
return `./img/back/back.png`;
|
|
|
|
|
|
|
|
//return fisvitual == '0' ? `./img/back/level4.png` : `./img/back/level8.png`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 获取分部图片
|
|
|
|
// 获取分部图片
|
|
|
|
function getSubcompanyImage(fisvitual) {
|
|
|
|
function getSubcompanyImage(fisvitual) {
|
|
|
|
return fisvitual == '0' ? `./img/back/level1.png` : `./img/back/level5.png`;
|
|
|
|
//return fisvitual == '0' ? `./img/back/level1.png` : `./img/back/level5.png`;
|
|
|
|
|
|
|
|
return `./img/back/back.png`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 多语言获取
|
|
|
|
// 多语言获取
|
|
|
@ -132,9 +137,9 @@ export default function companyPage() {
|
|
|
|
// ButtonContent渲染
|
|
|
|
// ButtonContent渲染
|
|
|
|
const buttonContentRender = ({ node, state }) => {
|
|
|
|
const buttonContentRender = ({ node, state }) => {
|
|
|
|
if (node.children) {
|
|
|
|
if (node.children) {
|
|
|
|
return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#66BAF5"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;">ˆ</div> </div>`;
|
|
|
|
return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#1f0ea3"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;">ˆ</div> </div>`;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#66BAF5"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;transform:rotate(180deg)">ˆ</div> </div>`;
|
|
|
|
return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#1f0ea3"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;transform:rotate(180deg)">ˆ</div> </div>`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -164,6 +169,7 @@ export default function companyPage() {
|
|
|
|
const nodeContentRender = (d, i, arr, state) => {
|
|
|
|
const nodeContentRender = (d, i, arr, state) => {
|
|
|
|
let fclass = topbar.state.requestData.fclass;
|
|
|
|
let fclass = topbar.state.requestData.fclass;
|
|
|
|
let statisticsStyle = fclass == 0 ? 'block' : 'none';
|
|
|
|
let statisticsStyle = fclass == 0 ? 'block' : 'none';
|
|
|
|
|
|
|
|
let staffStyle = d.data.staffNum == 0 ? 'none' : 'inline-block';
|
|
|
|
if (d.data.ftype == 0) {
|
|
|
|
if (d.data.ftype == 0) {
|
|
|
|
return `<div style="text-align: center;">
|
|
|
|
return `<div style="text-align: center;">
|
|
|
|
<div style="display: inline-block; margin-left: 5px;">
|
|
|
|
<div style="display: inline-block; margin-left: 5px;">
|
|
|
@ -171,11 +177,12 @@ export default function companyPage() {
|
|
|
|
font-size: 24px;
|
|
|
|
font-size: 24px;
|
|
|
|
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
|
|
|
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
|
|
|
font-weight: bold;
|
|
|
|
font-weight: bold;
|
|
|
|
color: #000000;
|
|
|
|
color: #1f0ea3;
|
|
|
|
line-height: 28px;
|
|
|
|
line-height: 28px;
|
|
|
|
letter-spacing: 1px;
|
|
|
|
letter-spacing: 1px;
|
|
|
|
margin-top: 10px;
|
|
|
|
margin-top: 10px;
|
|
|
|
">${d.data.fname}</div>
|
|
|
|
">${d.data.fname}(${d.data.onJobNum})</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>`;
|
|
|
|
</div>`;
|
|
|
|
} else if (d.data.ftype == 1) {
|
|
|
|
} else if (d.data.ftype == 1) {
|
|
|
@ -192,7 +199,9 @@ export default function companyPage() {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div style="display: ${statisticsStyle}">
|
|
|
|
<div style="display: ${statisticsStyle}">
|
|
|
|
<span style="color:red">${d.data.staffNum}</span> /
|
|
|
|
<span style="color:red;display: ${staffStyle}">${
|
|
|
|
|
|
|
|
d.data.staffNum
|
|
|
|
|
|
|
|
} /</span>
|
|
|
|
<span style="color:green">${d.data.onJobNum}</span>
|
|
|
|
<span style="color:green">${d.data.onJobNum}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -214,7 +223,9 @@ export default function companyPage() {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div style="display: ${statisticsStyle}">
|
|
|
|
<div style="display: ${statisticsStyle}">
|
|
|
|
<span style="color:red">${d.data.staffNum}</span> /
|
|
|
|
<span style="color:red;display: ${staffStyle}">${
|
|
|
|
|
|
|
|
d.data.staffNum
|
|
|
|
|
|
|
|
} /</span>
|
|
|
|
<span style="color:green">${d.data.onJobNum}</span>
|
|
|
|
<span style="color:green">${d.data.onJobNum}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -488,14 +499,14 @@ export default function companyPage() {
|
|
|
|
onZoomIn={(progressBtn) => handleZoomIn(progressBtn)}
|
|
|
|
onZoomIn={(progressBtn) => handleZoomIn(progressBtn)}
|
|
|
|
onZoomBehavior={(value) => handleZoomBehavior(value)}
|
|
|
|
onZoomBehavior={(value) => handleZoomBehavior(value)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<TimeLine
|
|
|
|
{/* <TimeLine
|
|
|
|
ref={(r) => (timeLine = r)}
|
|
|
|
ref={(r) => (timeLine = r)}
|
|
|
|
onClick={(timeline) => {
|
|
|
|
onClick={(timeline) => {
|
|
|
|
timeLineSearch(timeline);
|
|
|
|
timeLineSearch(timeline);
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'}
|
|
|
|
url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'}
|
|
|
|
labelData={labelData}
|
|
|
|
labelData={labelData}
|
|
|
|
/>
|
|
|
|
/> */}
|
|
|
|
<Spin size="large" spinning={spinning}>
|
|
|
|
<Spin size="large" spinning={spinning}>
|
|
|
|
<OrgChartComponent
|
|
|
|
<OrgChartComponent
|
|
|
|
setChart={(chart) => (orgChart = chart)}
|
|
|
|
setChart={(chart) => (orgChart = chart)}
|
|
|
|