diff --git a/src/components/timeline/index.jsx b/src/components/timeline/index.jsx index a961adf..eaeb77f 100644 --- a/src/components/timeline/index.jsx +++ b/src/components/timeline/index.jsx @@ -7,10 +7,11 @@ * @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'; export default class TimeLine extends React.Component { constructor(props) { @@ -35,6 +36,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(`删除成功`, 2, 3); + window.location.reload(true); + } else { + message.error(`系统错误`, 2, 3); + } + }); + } + componentDidMount() { this.searchTimeLines(this.props.url); } @@ -89,14 +105,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 ea5814c..98caa38 100644 --- a/src/components/topBar/index.jsx +++ b/src/components/topBar/index.jsx @@ -332,7 +332,7 @@ export class TopBar extends React.Component { > 查询 - + */} diff --git a/src/pages/company.jsx b/src/pages/company.jsx index e35a032..c0b2c7b 100644 --- a/src/pages/company.jsx +++ b/src/pages/company.jsx @@ -158,6 +158,8 @@ export default function companyPage() { const nodeContentRender = (d, i, arr, state) => { let fclass = topbar.state.requestData.fclass; let statisticsStyle = fclass == 0 ? 'block' : 'none'; + let flevelStyle = + d.data.ftype == 2 && d.data.deptLevel == 0 ? 'inline-block' : 'none'; if (d.data.ftype == 0) { return `
@@ -185,7 +187,9 @@ export default function companyPage() { } style="width: 110px;margin: 0 auto;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis; line-height: 18px;word-break: break-all;">${d.data.fname}
- ${d.data.staffNum} / + ${ + d.data.staffNum + } / ${d.data.onJobNum}
@@ -204,7 +208,9 @@ export default function companyPage() {
${d.data.fname}
- ${d.data.staffNum} / + ${ + d.data.staffNum + } / ${d.data.onJobNum}
@@ -472,6 +478,13 @@ export default function companyPage() { onZoomIn={(progressBtn) => handleZoomIn(progressBtn)} onZoomBehavior={(value) => handleZoomBehavior(value)} /> + (timeLine = r)} + onClick={(timeline) => { + timeLineSearch(timeline); + }} + url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'} + /> (orgChart = chart)} diff --git a/src/pages/user.jsx b/src/pages/user.jsx index ed4baa5..3c9a4f1 100644 --- a/src/pages/user.jsx +++ b/src/pages/user.jsx @@ -99,7 +99,7 @@ export default function userPage() { // 获取数据 useEffect(() => { document.cookie = - 'ecology_JSessionid=aaaSjdYP0FDFSd1hMbt8y; JSESSIONID=aaaSjdYP0FDFSd1hMbt8y; Systemlanguid=7; languageidweaver=7; loginuuids=1; loginidweaver=sysadmin;'; + 'ecology_JSessionid=aaaOSu6bA71rZb9EYCuhz; JSESSIONID=aaaOSu6bA71rZb9EYCuhz; Systemlanguid=7; languageidweaver=7; loginidweaver=sysadmin; loginuuids=1;'; d3.json( '/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0', ).then((data) => {