|
|
|
@ -7,10 +7,12 @@ import ToolBar from '../components/toolBar';
|
|
|
|
|
import jsPDF from 'jspdf';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import qs from 'qs';
|
|
|
|
|
import { message } from 'antd';
|
|
|
|
|
import { message, Spin } from 'antd';
|
|
|
|
|
import WaterMark from 'watermark-component-for-react';
|
|
|
|
|
|
|
|
|
|
let active = 'top';
|
|
|
|
|
let orgChart = null;
|
|
|
|
|
|
|
|
|
|
export default function companyPage() {
|
|
|
|
|
const [data, setData] = useState(null);
|
|
|
|
|
let addNodeChildFunc = null;
|
|
|
|
@ -18,6 +20,7 @@ export default function companyPage() {
|
|
|
|
|
let topBarSearchRequest = useRef({});
|
|
|
|
|
const [hasRight, setHasRight] = useState('');
|
|
|
|
|
const [watermark, setWatermark] = useState('');
|
|
|
|
|
const [loading, setLoading] = useState('');
|
|
|
|
|
|
|
|
|
|
// 点击节点
|
|
|
|
|
function onNodeClick(nodeId) {}
|
|
|
|
@ -155,7 +158,7 @@ export default function companyPage() {
|
|
|
|
|
} else if (d.data.ftype == 2) {
|
|
|
|
|
let one = d.data.leader == '' ? 'none' : 'inline-block';
|
|
|
|
|
let three = d.data.deputyLeader == '' ? 'none' : 'inline-block';
|
|
|
|
|
let two = d.data.header == '' ? 'none' : 'block';
|
|
|
|
|
let two = d.data.header == '' ? 'none' : 'inline-block';
|
|
|
|
|
return `
|
|
|
|
|
<div style="width: 100%; height: 100%; background-size: 100% 100%;" >
|
|
|
|
|
<div style='position:absolute;height:100%'>
|
|
|
|
@ -173,12 +176,10 @@ export default function companyPage() {
|
|
|
|
|
<div style="width: 130px;margin: 0 auto;line-height: 18px;display:${two}">分管领导:${
|
|
|
|
|
d.data.header
|
|
|
|
|
} </div>
|
|
|
|
|
<div style="width: 120px;margin: 0 auto;line-height: 18px;>
|
|
|
|
|
<span style="display:${one}">${
|
|
|
|
|
d.data.leader
|
|
|
|
|
}</span><span style="display:${three}"> || ${
|
|
|
|
|
d.data.deputyLeader
|
|
|
|
|
}</span></div>
|
|
|
|
|
<div style="width: 120px;margin: 0 auto;line-height: 18px;">
|
|
|
|
|
<p style="display:${one}">${d.data.leader}</p>
|
|
|
|
|
<p style="display:${three}"> || ${d.data.deputyLeader}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
`;
|
|
|
|
@ -267,6 +268,7 @@ export default function companyPage() {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleSearch = (requestData) => {
|
|
|
|
|
setLoading(true);
|
|
|
|
|
topBarSearchRequest.current = requestData;
|
|
|
|
|
let api =
|
|
|
|
|
'/api/ais/orgChart/companyData' +
|
|
|
|
@ -280,6 +282,9 @@ export default function companyPage() {
|
|
|
|
|
message.warning('暂无数据');
|
|
|
|
|
} else {
|
|
|
|
|
setData(resp.data.data);
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
setLoading(false);
|
|
|
|
|
}, 1000);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -339,6 +344,7 @@ export default function companyPage() {
|
|
|
|
|
onZoomIn={(progressBtn) => handleZoomIn(progressBtn)}
|
|
|
|
|
onZoomBehavior={(value) => handleZoomBehavior(value)}
|
|
|
|
|
/>
|
|
|
|
|
<Spin spinning={loading} tip="页面加载中 请稍候">
|
|
|
|
|
<OrgChartComponent
|
|
|
|
|
setChart={(chart) => (orgChart = chart)}
|
|
|
|
|
setClick={(click) => (addNodeChildFunc = click)}
|
|
|
|
@ -350,6 +356,7 @@ export default function companyPage() {
|
|
|
|
|
nodeHeight={nodeHeightRender}
|
|
|
|
|
nodeContent={nodeContentRender}
|
|
|
|
|
/>
|
|
|
|
|
</Spin>
|
|
|
|
|
</WaterMark>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|