|
|
|
@ -7,17 +7,19 @@ 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;
|
|
|
|
|
let orgChart = null;
|
|
|
|
|
let topBarSearchRequest = null;
|
|
|
|
|
const [hasRight, setHasRight] = useState('');
|
|
|
|
|
const [watermark, setWatermark] = useState('');
|
|
|
|
|
const [loading, setLoading] = useState('');
|
|
|
|
|
|
|
|
|
|
// 点击节点
|
|
|
|
|
function onNodeClick(nodeId) {}
|
|
|
|
@ -265,6 +267,7 @@ export default function companyPage() {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleSearch = (requestData) => {
|
|
|
|
|
setLoading(true);
|
|
|
|
|
topBarSearchRequest = requestData;
|
|
|
|
|
let api =
|
|
|
|
|
'/api/ais/orgChart/companyData' +
|
|
|
|
@ -278,6 +281,9 @@ export default function companyPage() {
|
|
|
|
|
message.warning('暂无数据');
|
|
|
|
|
} else {
|
|
|
|
|
setData(resp.data.data);
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
setLoading(false);
|
|
|
|
|
}, 1000);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -337,17 +343,19 @@ export default function companyPage() {
|
|
|
|
|
onZoomIn={(progressBtn) => handleZoomIn(progressBtn)}
|
|
|
|
|
onZoomBehavior={(value) => handleZoomBehavior(value)}
|
|
|
|
|
/>
|
|
|
|
|
<OrgChartComponent
|
|
|
|
|
setChart={(chart) => (orgChart = chart)}
|
|
|
|
|
setClick={(click) => (addNodeChildFunc = click)}
|
|
|
|
|
onNodeClick={onNodeClick}
|
|
|
|
|
data={data}
|
|
|
|
|
onButtonClick={onButtonClick}
|
|
|
|
|
buttonContent={buttonContentRender}
|
|
|
|
|
nodeWidth={nodeWidthRender}
|
|
|
|
|
nodeHeight={nodeHeightRender}
|
|
|
|
|
nodeContent={nodeContentRender}
|
|
|
|
|
/>
|
|
|
|
|
<Spin spinning={loading} tip="页面加载中 请稍候">
|
|
|
|
|
<OrgChartComponent
|
|
|
|
|
setChart={(chart) => (orgChart = chart)}
|
|
|
|
|
setClick={(click) => (addNodeChildFunc = click)}
|
|
|
|
|
onNodeClick={onNodeClick}
|
|
|
|
|
data={data}
|
|
|
|
|
onButtonClick={onButtonClick}
|
|
|
|
|
buttonContent={buttonContentRender}
|
|
|
|
|
nodeWidth={nodeWidthRender}
|
|
|
|
|
nodeHeight={nodeHeightRender}
|
|
|
|
|
nodeContent={nodeContentRender}
|
|
|
|
|
/>
|
|
|
|
|
</Spin>
|
|
|
|
|
</WaterMark>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|