|
|
|
@ -8,6 +8,8 @@ import {
|
|
|
|
|
Table,
|
|
|
|
|
Spin,
|
|
|
|
|
Checkbox,
|
|
|
|
|
Modal,
|
|
|
|
|
Input,
|
|
|
|
|
} from 'antd';
|
|
|
|
|
import { OrgChartComponent } from '@/components/orgChart';
|
|
|
|
|
import * as d3 from 'd3';
|
|
|
|
@ -32,13 +34,22 @@ export default class DrawerComponents extends React.Component {
|
|
|
|
|
columns: [],
|
|
|
|
|
spinning: true,
|
|
|
|
|
showJob: true,
|
|
|
|
|
isModalOpen: false,
|
|
|
|
|
jobResponsibility: '',
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {}
|
|
|
|
|
|
|
|
|
|
// 点击节点
|
|
|
|
|
onNodeClick(node) {}
|
|
|
|
|
onNodeClick = (node) => {
|
|
|
|
|
if (node.ftype == '4') {
|
|
|
|
|
this.setState({
|
|
|
|
|
jobResponsibility: node.jobResponsibility,
|
|
|
|
|
isModalOpen: true,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onButtonClick(event, d) {
|
|
|
|
|
if (d.children) {
|
|
|
|
@ -289,8 +300,9 @@ export default class DrawerComponents extends React.Component {
|
|
|
|
|
d.data.fname
|
|
|
|
|
}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="font-size: 13px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #333333;display: flex;height: 25px;line-height: 25px;">
|
|
|
|
|
<div style="font-size: 13px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #333333;height: 25px;line-height: 25px;">
|
|
|
|
|
<span>司龄: ${d.data.companyWorkYear} 年</span>
|
|
|
|
|
<div>岗位: ${d.data.jobTitle}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -305,13 +317,23 @@ export default class DrawerComponents extends React.Component {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onClose = () => {
|
|
|
|
|
this.setState({ open: false, detailType: 'chart', showJob: true });
|
|
|
|
|
const { params } = this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
open: false,
|
|
|
|
|
detailType: 'chart',
|
|
|
|
|
showJob: params.fclass == '0' ? 'true' : 'false',
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
changeDetail = () => {
|
|
|
|
|
const { detailType, params } = this.state;
|
|
|
|
|
let type = detailType == 'chart' ? 'table' : 'chart';
|
|
|
|
|
const showJob = this.state.showJob ? '1' : '0';
|
|
|
|
|
var showJob = '1';
|
|
|
|
|
if (params.fclass == '0') {
|
|
|
|
|
showJob = this.state.showJob ? '1' : '0';
|
|
|
|
|
} else {
|
|
|
|
|
showJob = '0';
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
detailType: type,
|
|
|
|
|
});
|
|
|
|
@ -328,6 +350,8 @@ export default class DrawerComponents extends React.Component {
|
|
|
|
|
columns,
|
|
|
|
|
spinning,
|
|
|
|
|
showJob,
|
|
|
|
|
jobResponsibility,
|
|
|
|
|
isModalOpen,
|
|
|
|
|
} = this.state;
|
|
|
|
|
let arr = [];
|
|
|
|
|
if (detailType == 'chart') {
|
|
|
|
@ -414,6 +438,21 @@ export default class DrawerComponents extends React.Component {
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
<Modal
|
|
|
|
|
title="岗位职责"
|
|
|
|
|
open={isModalOpen}
|
|
|
|
|
onCancel={() => this.setState({ isModalOpen: false })}
|
|
|
|
|
footer={[
|
|
|
|
|
<Button
|
|
|
|
|
key="back"
|
|
|
|
|
onClick={() => this.setState({ isModalOpen: false })}
|
|
|
|
|
>
|
|
|
|
|
关闭
|
|
|
|
|
</Button>,
|
|
|
|
|
]}
|
|
|
|
|
>
|
|
|
|
|
<p>{jobResponsibility}</p>
|
|
|
|
|
</Modal>
|
|
|
|
|
</Drawer>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|