diff --git a/src/components/drawer/index.jsx b/src/components/drawer/index.jsx
index bea0e32..b816dc0 100644
--- a/src/components/drawer/index.jsx
+++ b/src/components/drawer/index.jsx
@@ -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
}
-
+
司龄: ${d.data.companyWorkYear} 年
+
岗位: ${d.data.jobTitle}
@@ -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 {
/>
)}
+ this.setState({ isModalOpen: false })}
+ footer={[
+ ,
+ ]}
+ >
+ {jobResponsibility}
+
);
}
diff --git a/src/components/topBar/index.jsx b/src/components/topBar/index.jsx
index fa3b8d7..bc46d83 100644
--- a/src/components/topBar/index.jsx
+++ b/src/components/topBar/index.jsx
@@ -301,17 +301,6 @@ export class TopBar extends React.Component {
-
-
-