diff --git a/dist.zip b/dist.zip
index 656f68c..0fedb60 100644
Binary files a/dist.zip and b/dist.zip differ
diff --git a/src/components/timeline/index.jsx b/src/components/timeline/index.jsx
index a961adf..dd6a23c 100644
--- a/src/components/timeline/index.jsx
+++ b/src/components/timeline/index.jsx
@@ -7,10 +7,12 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import React from 'react';
-import { Timeline, Drawer } from 'antd';
+import { Timeline, Drawer, Popconfirm, message } from 'antd';
import styles from './index.less';
import leftTreeShow from './img/leftTree-show.png';
import leftHide from './img/leftTree-hide.png';
+import { CloseCircleOutlined } from '@ant-design/icons';
+import { getLabel } from '../../util/i18n.js';
export default class TimeLine extends React.Component {
constructor(props) {
@@ -35,6 +37,21 @@ export default class TimeLine extends React.Component {
this.props.onClick(data);
}
+ handleDelete(key) {
+ const { labelData } = this.props;
+ let api = `/api/bs/hrmorganization/orgchart/versionDelete?versionId=${key}`;
+ fetch(api)
+ .then((res) => res.json())
+ .then((data) => {
+ if (data.api_status) {
+ message.success(`${getLabel(547484, labelData)}`, 2, 3);
+ window.location.reload(true);
+ } else {
+ message.error(`${getLabel(547483, labelData)}`, 2, 3);
+ }
+ });
+ }
+
componentDidMount() {
this.searchTimeLines(this.props.url);
}
@@ -56,6 +73,8 @@ export default class TimeLine extends React.Component {
};
render() {
+ const { labelData } = this.props;
+
let showStyle = {};
let positionStyle = {};
if (this.state.open) {
@@ -89,14 +108,27 @@ export default class TimeLine extends React.Component {
return (
- {item.title}
+
+ {item.title}
+
+ {item.key != 0 && (
+
+
+
+
+
+ )}
{item.time}
);
diff --git a/src/components/timeline/index.less b/src/components/timeline/index.less
index 3d5571b..7fdf3f3 100644
--- a/src/components/timeline/index.less
+++ b/src/components/timeline/index.less
@@ -22,14 +22,18 @@
.time {
color: dimgray;
}
+
+ .delete :hover {
+ color: red;
+ }
}
.leftRightLayoutBtn {
width: 18px;
height: 60px;
- position: absolute;
+ position: fixed;
top: 50%;
- margin-top: -30px;
+ // margin-top: -30px;
z-index: 101;
cursor: pointer;
}
diff --git a/src/components/topBar/index.jsx b/src/components/topBar/index.jsx
index 586772a..413ca8b 100644
--- a/src/components/topBar/index.jsx
+++ b/src/components/topBar/index.jsx
@@ -334,7 +334,7 @@ export class TopBar extends React.Component {
}}
>
{getLabel(547313, labelData)}
- {' '}
+
)}
diff --git a/src/pages/company.jsx b/src/pages/company.jsx
index fe00cdf..f012768 100644
--- a/src/pages/company.jsx
+++ b/src/pages/company.jsx
@@ -351,6 +351,10 @@ export default function companyPage() {
*/
const handleExport = (type) => {
if (type == 'png') {
+ const hiddenElements = document.querySelectorAll('.tooltitle');
+ const hiddenElementsArray = Array.from(hiddenElements);
+ // 从 DOM 中移除隐藏内容
+ hiddenElementsArray.forEach((el) => (el.style.display = 'none'));
orgChart && orgChart.exportImg({ full: true });
} else {
orgChart && downloadPdf(orgChart);
@@ -490,6 +494,7 @@ export default function companyPage() {
timeLineSearch(timeline);
}}
url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'}
+ labelData={labelData}
/>
{
document.cookie =
- 'ecology_JSessionid=aaa5JLqrHUV6R9P1cmTbz; JSESSIONID=aaa5JLqrHUV6R9P1cmTbz; loginuuids=1; languageidweaver=7; Systemlanguid=7; loginidweaver=sysadmin; __randcode__=72a0b641-7599-4301-a47f-61620f350ec5';
+ 'ecology_JSessionid=aaav03Zyuvq3A9TG0PEdz; JSESSIONID=aaav03Zyuvq3A9TG0PEdz; Systemlanguid=7; languageidweaver=7; loginuuids=1; loginidweaver=sysadmin; __randcode__=62316935-a99b-4cbf-a23f-0ac9c37db0da';
d3.json(
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
).then((data) => {