diff --git a/src/components/drawer/index.jsx b/src/components/drawer/index.jsx
index 2ad6e07..fe287ce 100644
--- a/src/components/drawer/index.jsx
+++ b/src/components/drawer/index.jsx
@@ -8,6 +8,8 @@ import {
Table,
Spin,
Checkbox,
+ Row,
+ Col,
} from 'antd';
import { OrgChartComponent } from '@/components/orgChart';
import * as d3 from 'd3';
@@ -33,6 +35,9 @@ export default class DrawerComponents extends React.Component {
columns: [],
spinning: true,
showJob: false,
+ defaultTypeValue: ['isBelongTo'],
+ defaultStatusValue: [0, 1, 2, 3],
+ disabled: false,
};
}
@@ -257,7 +262,7 @@ export default class DrawerComponents extends React.Component {
+
${getLabel(547190, labelData)}:${d.data.fleader}
@@ -304,17 +309,19 @@ export default class DrawerComponents extends React.Component {
: './img/default_avator.png'
}" style="width: 58px; height: 58px; border-radius: 50%; margin-top: 16px;margin-left: -6px;z-index:999" />
-
+
-
${
- d.data.fname
- }
+
+ ${d.data.fname}
+ (${d.data.accountType})
+
-
+
${getLabel(547324, labelData)}: ${
d.data.companyWorkYear
} ${getLabel(547526, labelData)}
+
`;
@@ -322,22 +329,76 @@ export default class DrawerComponents extends React.Component {
};
showDrawer = (params) => {
+ const { defaultStatusValue, defaultTypeValue } = this.state;
+ params = {
+ ...params,
+ typeValue: defaultTypeValue.join(','),
+ statusValue: defaultStatusValue.join(','),
+ };
this.getDeatilDatas(params, 'chart', '0');
this.setState({ open: true, params: params });
};
onClose = () => {
- this.setState({ open: false, detailType: 'chart', showJob: false });
+ this.setState({
+ open: false,
+ detailType: 'chart',
+ showJob: false,
+ defaultStatusValue: [0, 1, 2, 3],
+ defaultTypeValue: ['isBelongTo'],
+ disabled: false,
+ });
};
changeDetail = () => {
- const { detailType, params } = this.state;
+ const { detailType, params, defaultTypeValue, defaultStatusValue } =
+ this.state;
+ const newParam = {
+ ...params,
+ typeValue: defaultTypeValue.join(','),
+ statusValue: defaultStatusValue.join(','),
+ };
let type = detailType == 'chart' ? 'table' : 'chart';
const showJob = this.state.showJob ? '1' : '0';
this.setState({
detailType: type,
});
- this.getDeatilDatas(params, type, showJob);
+ this.getDeatilDatas(newParam, type, showJob);
+ };
+
+ onStatusChange = (checkedValues) => {
+ if (checkedValues.length === 0) {
+ return message.error(`${getLabel(547728, labelData)}`, 2);
+ }
+ this.setState({
+ defaultStatusValue: checkedValues,
+ });
+ const { defaultTypeValue, params, detailType } = this.state;
+ const showJob = this.state.showJob ? '1' : '0';
+ const nParam = {
+ ...params,
+ statusValue: checkedValues.join(','),
+ typeValue: defaultTypeValue.join(','),
+ };
+ this.getDeatilDatas(nParam, detailType, showJob);
+ };
+
+ onTypeChange = (checkedValues) => {
+ if (this.state.showJob) {
+ return message.error(`${getLabel(547729, labelData)}`, 2);
+ }
+ this.setState({
+ defaultTypeValue: checkedValues,
+ disabled: checkedValues.includes('isManager') ? true : false,
+ });
+ const { defaultStatusValue, params, detailType } = this.state;
+ const showJob = this.state.showJob ? '1' : '0';
+ const nParam = {
+ ...params,
+ statusValue: defaultStatusValue.join(','),
+ typeValue: checkedValues.join(','),
+ };
+ this.getDeatilDatas(nParam, detailType, showJob);
};
render() {
@@ -350,16 +411,35 @@ export default class DrawerComponents extends React.Component {
columns,
spinning,
showJob,
+ defaultStatusValue,
+ defaultTypeValue,
+ disabled,
} = this.state;
let arr = [];
const { labelData } = this.props;
+ const optionsType = [
+ { label: `${getLabel(547715, labelData)}`, value: 'isManager' },
+ { label: `${getLabel(547716, labelData)}`, value: 'isBelongTo' },
+ ];
+
+ const optionsStatus = [
+ { label: `${getLabel(547718, labelData)}`, value: 0 },
+ { label: `${getLabel(547719, labelData)}`, value: 1 },
+ { label: `${getLabel(547720, labelData)}`, value: 2 },
+ { label: `${getLabel(547721, labelData)}`, value: 3 },
+ { label: `${getLabel(547722, labelData)}`, value: 4 },
+ { label: `${getLabel(547723, labelData)}`, value: 5 },
+ { label: `${getLabel(547724, labelData)}`, value: 6 },
+ { label: `${getLabel(547725, labelData)}`, value: 7 },
+ ];
+
if (detailType == 'chart') {
arr.push({ label: `${getLabel(547315, labelData)}`, key: '1' });
//arr.push({ label: '导出PDF', key: '2' });
} else {
- arr.push({ label: '导出表格', key: '3' });
+ arr.push({ label: `${getLabel(547448, labelData)}`, key: '3' });
}
const menu =
;
@@ -367,7 +447,7 @@ export default class DrawerComponents extends React.Component {
return (
{
this.setState({
showJob: e.target.checked,
});
-
+ const newParam = {
+ ...params,
+ statusValue: defaultStatusValue.join(','),
+ typeValue: defaultTypeValue.join(','),
+ };
this.getDeatilDatas(
- params,
+ newParam,
detailType,
e.target.checked ? '1' : '0',
);
@@ -403,45 +488,68 @@ export default class DrawerComponents extends React.Component {
}
>
- {detailType == 'chart' ? (
-
-
- {data.length > 0 && (
- (orgChart = chart)}
- setClick={(click) => (addNodeChildFunc = click)}
- onNodeClick={this.onNodeClick}
- onButtonClick={this.onButtonClick}
- data={data}
- buttonContent={this.buttonContentRender}
- nodeWidth={this.nodeWidthRender}
- nodeHeight={this.nodeHeightRender}
- nodeContent={this.nodeContentRender}
+ <>
+ {detailType == 'chart' && (
+
+ {getLabel(547714, labelData)}:
+
+
+
+
+ )}
+
+ {getLabel(547717, labelData)}:
+
+
- )}
-
- ) : (
-
-
- `${getLabel(547523, labelData)} ${
- dataSource.length
- } ${getLabel(547524, labelData)}`,
- }}
- />
-
- )}
+
+
+ {detailType == 'chart' ? (
+
+
+ {data.length > 0 && (
+ (orgChart = chart)}
+ setClick={(click) => (addNodeChildFunc = click)}
+ onNodeClick={this.onNodeClick}
+ onButtonClick={this.onButtonClick}
+ data={data}
+ buttonContent={this.buttonContentRender}
+ nodeWidth={this.nodeWidthRender}
+ nodeHeight={this.nodeHeightRender}
+ nodeContent={this.nodeContentRender}
+ />
+ )}
+
+ ) : (
+
+
+ `${getLabel(547523, labelData)} ${
+ dataSource.length
+ } ${getLabel(547524, labelData)}`,
+ }}
+ />
+
+ )}
+ >
);
}
diff --git a/src/pages/company.jsx b/src/pages/company.jsx
index 6b0703c..100a459 100644
--- a/src/pages/company.jsx
+++ b/src/pages/company.jsx
@@ -164,8 +164,8 @@ export default function companyPage() {
let fclass = topbar.state.requestData.fclass;
let statisticsStyle = fclass == 0 ? 'block' : 'none';
if (d.data.ftype == 0) {
- return `
-
+ return `
+
-
${d.data.fname}
+
+
${d.data.staffNum} /
${d.data.onJobNum}
@@ -206,8 +207,11 @@ export default function companyPage() {
-
${d.data.fname}
+
+
${d.data.staffNum} /
${d.data.onJobNum}
diff --git a/src/pages/index.less b/src/pages/index.less
index bd93022..618795f 100644
--- a/src/pages/index.less
+++ b/src/pages/index.less
@@ -114,6 +114,44 @@
}
.ant-drawer-body {
- padding: 0px;
+ padding: 0;
overflow: hidden;
}
+
+.tooltip {
+ position: relative;
+ display: inline-block;
+ cursor: pointer;
+ width: 110px;
+ margin: 0 auto;
+ line-height: 18px;
+ word-break: break-all;
+}
+
+.tooltip .tooltitle {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.tooltip .tooltiptext {
+ visibility: hidden;
+ width: 144px;
+ background-color: #555;
+ color: #fff;
+ text-align: center;
+ border-radius: 6px;
+ padding: 5px 0;
+ position: absolute;
+ z-index: 1;
+ bottom: 125%;
+ left: 39%;
+ margin-left: -60px;
+ opacity: 0;
+ transition: opacity 0.3s;
+}
+
+.tooltip:hover .tooltiptext {
+ visibility: visible;
+ opacity: 1;
+}
diff --git a/src/pages/user.jsx b/src/pages/user.jsx
index e94c554..6958422 100644
--- a/src/pages/user.jsx
+++ b/src/pages/user.jsx
@@ -99,7 +99,7 @@ export default function userPage() {
// 获取数据
useEffect(() => {
document.cookie =
- 'ecology_JSessionid=aaaZqe3BtezwSd-qOVlaz; JSESSIONID=aaaZqe3BtezwSd-qOVlaz; Systemlanguid=8; languageidweaver=8; loginidweaver=sysadmin; loginuuids=1; __randcode__=b79816fa-7088-4433-a17f-162b62453f2f';
+ 'ecology_JSessionid=aaaIt6Y2NuzAQ98Ci0Jaz; Systemlanguid=7; JSESSIONID=aaaIt6Y2NuzAQ98Ci0Jaz; loginidweaver=sysadmin; loginuuids=1; languageidweaver=8; __randcode__=486bc6ba-9c04-47fc-a977-f7c55bab42e9';
d3.json(
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
).then((data) => {