From 35e372e85f53943806477fd965240c3d4102e1ff Mon Sep 17 00:00:00 2001
From: chenxu1234 <1401584727@qq.com>
Date: Tue, 23 Apr 2024 18:02:06 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E7=A6=8F=E9=A1=B9=E7=9B=AE=E7=BB=84?=
=?UTF-8?q?=E7=BB=87=E6=9E=B6=E6=9E=84=E5=9B=BE=E5=BC=80=E5=8F=91=201.?=
=?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84=E5=9B=BE=E4=BA=BA=E5=91=98?=
=?UTF-8?q?=E5=8D=A1=E7=89=87=E5=A2=9E=E5=8A=A0=E5=B2=97=E4=BD=8D=E5=90=8D?=
=?UTF-8?q?=E7=A7=B0=202.=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84=E5=9B=BE?=
=?UTF-8?q?=E5=B2=97=E4=BD=8D=E5=85=B3=E8=81=94=E8=87=AA=E5=AE=9A=E4=B9=89?=
=?UTF-8?q?=E5=BB=BA=E6=A8=A1=E5=8F=B0=E8=B4=A6=E8=8E=B7=E5=8F=96=E5=B2=97?=
=?UTF-8?q?=E4=BD=8D=E8=AF=B4=E6=98=8E=EF=BC=8C=E5=B9=B6=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E8=B7=B3=E8=BD=AC=E5=88=B0=E5=B2=97=E4=BD=8D?=
=?UTF-8?q?=E8=AF=B4=E6=98=8E=E9=99=84=E4=BB=B6=E9=A1=B5=203.=E7=BB=84?=
=?UTF-8?q?=E7=BB=87=E6=9E=B6=E6=9E=84=E5=9B=BE=E4=BA=BA=E5=91=98=E5=8D=A1?=
=?UTF-8?q?=E7=89=87=E7=82=B9=E5=87=BB=E4=BA=BA=E5=91=98=E8=B7=B3=E8=BD=AC?=
=?UTF-8?q?=E5=88=B0=E4=BA=BA=E5=91=98=E5=8D=A1=E7=89=87=204.=E7=BB=84?=
=?UTF-8?q?=E7=BB=87=E6=9E=B6=E6=9E=84=E5=9B=BE=E9=BB=98=E8=AE=A4=E5=B9=B3?=
=?UTF-8?q?=E9=93=BA=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/drawer/index.jsx | 46 ++++++++++++---------------------
src/pages/company.jsx | 12 +++++++--
2 files changed, 27 insertions(+), 31 deletions(-)
diff --git a/src/components/drawer/index.jsx b/src/components/drawer/index.jsx
index bea0e32..926eefb 100644
--- a/src/components/drawer/index.jsx
+++ b/src/components/drawer/index.jsx
@@ -31,7 +31,7 @@ export default class DrawerComponents extends React.Component {
dataSource: [],
columns: [],
spinning: true,
- showJob: true,
+ showJob: false,
};
}
@@ -241,7 +241,7 @@ export default class DrawerComponents extends React.Component {
负责人:${d.data.fleader}
@@ -251,7 +251,7 @@ export default class DrawerComponents extends React.Component {
-
+
`;
} else if (d.data.ftype == 3) {
@@ -285,12 +285,19 @@ export default class DrawerComponents extends React.Component {
-
${
- d.data.fname
- }
+
${
+ d.data.fname
+ }
-
+
司龄: ${d.data.companyWorkYear} 年
+
岗位: ${d.data.jobTitle}
@@ -299,19 +306,19 @@ export default class DrawerComponents extends React.Component {
};
showDrawer = (params) => {
- const showJob = params.fclass == '0' ? '1' : '0';
+ const showJob = '0';
this.getDeatilDatas(params, 'chart', showJob);
this.setState({ open: true, params: params });
};
onClose = () => {
- this.setState({ open: false, detailType: 'chart', showJob: true });
+ this.setState({ open: false, detailType: 'chart', showJob: false });
};
changeDetail = () => {
const { detailType, params } = this.state;
let type = detailType == 'chart' ? 'table' : 'chart';
- const showJob = this.state.showJob ? '1' : '0';
+ const showJob = '0';
this.setState({
detailType: type,
});
@@ -350,25 +357,6 @@ export default class DrawerComponents extends React.Component {
}}
extra={
- {detailType == 'chart' && params && params.fclass == '0' && (
- {
- this.setState({
- showJob: e.target.checked,
- });
-
- this.getDeatilDatas(
- params,
- detailType,
- e.target.checked ? '1' : '0',
- );
- }}
- >
- 是否显示岗位
-
- )}
diff --git a/src/pages/company.jsx b/src/pages/company.jsx
index 99fd85e..d1856a9 100644
--- a/src/pages/company.jsx
+++ b/src/pages/company.jsx
@@ -172,7 +172,7 @@ export default function companyPage() {
)}"/>
+ font-family: Microsoft YaHei-Regular, Microsoft YaHei;color: #333333;text-align: center;">
+ font-family: Microsoft YaHei-Regular, Microsoft YaHei;color: #333333;text-align: center;">
${d.data.fname}
@@ -418,6 +418,14 @@ export default function companyPage() {
.setCentered(orgChart.getChartState().root?.id)
.layout('top')
.render();
+
+ window.setTimeout(() => {
+ orgChart &&
+ orgChart
+ .compact(!!(compact++ % 2))
+ .render()
+ .fit();
+ }, 500);
}
}, [data]);