顺胜项目组织架构图二开 1.人员信息默认展开 2.人员卡片显示岗位 3.人员卡片点击展示工作职责
This commit is contained in:
parent
2a5628765e
commit
445aa1f00c
|
|
@ -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
|
||||
}</div>
|
||||
</div>
|
||||
<div style="font-size: 13px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #333333;display: flex;height: 25px;line-height: 25px;">
|
||||
<div style="font-size: 13px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #333333;height: 25px;line-height: 25px;">
|
||||
<span>司龄: ${d.data.companyWorkYear} 年</span>
|
||||
<div>岗位: ${d.data.jobTitle}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -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 {
|
|||
/>
|
||||
</div>
|
||||
)}
|
||||
<Modal
|
||||
title="岗位职责"
|
||||
open={isModalOpen}
|
||||
onCancel={() => this.setState({ isModalOpen: false })}
|
||||
footer={[
|
||||
<Button
|
||||
key="back"
|
||||
onClick={() => this.setState({ isModalOpen: false })}
|
||||
>
|
||||
关闭
|
||||
</Button>,
|
||||
]}
|
||||
>
|
||||
<p>{jobResponsibility}</p>
|
||||
</Modal>
|
||||
</Drawer>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -301,17 +301,6 @@ export class TopBar extends React.Component {
|
|||
</Tooltip>
|
||||
</Col>
|
||||
<Col span={16}>
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ marginRight: '10px' }}
|
||||
disabled={disabled}
|
||||
onClick={() => {
|
||||
this.setState({ open: true });
|
||||
}}
|
||||
>
|
||||
版本记录
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ marginRight: '10px' }}
|
||||
|
|
@ -321,15 +310,6 @@ export class TopBar extends React.Component {
|
|||
>
|
||||
查询
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ marginRight: '10px' }}
|
||||
onClick={() => {
|
||||
window.open('#/dragtree', 'blank');
|
||||
}}
|
||||
>
|
||||
组织调整
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
style={{ marginRight: '10px' }}
|
||||
|
|
@ -344,27 +324,6 @@ export class TopBar extends React.Component {
|
|||
</Dropdown>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal
|
||||
title="版本记录"
|
||||
cancelText="取消"
|
||||
okText="确定"
|
||||
open={open}
|
||||
onOk={this.handleOk}
|
||||
confirmLoading={confirmLoading}
|
||||
onCancel={() => this.setState({ open: false })}
|
||||
>
|
||||
<p style={{ color: 'red' }}>
|
||||
提示:版本记录耗时较长,请谨慎操作(仅记录当前维度的数据版本)
|
||||
</p>
|
||||
<p>主题:</p>
|
||||
<TextArea
|
||||
showCount
|
||||
maxLength={10}
|
||||
style={{ height: 120, resize: 'none' }}
|
||||
onChange={this.onChange}
|
||||
placeholder="please enter"
|
||||
/>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -397,10 +397,11 @@ export default function companyPage() {
|
|||
* @param {*} requestData
|
||||
*/
|
||||
const handleChange = (requestData) => {
|
||||
setTimelineId(0);
|
||||
timeLine.searchTimeLines(
|
||||
`/api/bs/hrmorganization/orgchart/timeLines?fclass=${requestData.fclass}`,
|
||||
);
|
||||
//上海顺胜项目二开去除版本时间轴
|
||||
// setTimelineId(0);
|
||||
// timeLine.searchTimeLines(
|
||||
// `/api/bs/hrmorganization/orgchart/timeLines?fclass=${requestData.fclass}`,
|
||||
// );
|
||||
requestData = { ...requestData, id: 0 };
|
||||
handleSearch(requestData, false);
|
||||
};
|
||||
|
|
@ -465,13 +466,6 @@ export default function companyPage() {
|
|||
onZoomIn={(progressBtn) => handleZoomIn(progressBtn)}
|
||||
onZoomBehavior={(value) => handleZoomBehavior(value)}
|
||||
/>
|
||||
<TimeLine
|
||||
ref={(r) => (timeLine = r)}
|
||||
onClick={(timeline) => {
|
||||
timeLineSearch(timeline);
|
||||
}}
|
||||
url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'}
|
||||
/>
|
||||
<Spin size="large" spinning={spinning}>
|
||||
<OrgChartComponent
|
||||
setChart={(chart) => (orgChart = chart)}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export default function userPage() {
|
|||
// 获取数据
|
||||
useEffect(() => {
|
||||
document.cookie =
|
||||
'ecology_JSessionid=aaahTt6JHXEIM-HoSW-Xy; JSESSIONID=aaahTt6JHXEIM-HoSW-Xy; Systemlanguid=7; languageidweaver=7; loginuuids=2773; __randcode__=a8294fa0-56d7-430f-a35b-139d73474682; loginidweaver=zhangxy16';
|
||||
'ecology_JSessionid=aaawGLaPO07RO41dNaL5y; JSESSIONID=aaawGLaPO07RO41dNaL5y; languageidweaver=7; Systemlanguid=7; loginuuids=1; loginidweaver=sysadmin; __randcode__=62651c45-391e-4d84-a5a7-9db939559994';
|
||||
d3.json(
|
||||
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
|
||||
).then((data) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue