京福项目组织架构图开发

1.组织架构图人员卡片增加岗位名称
2.组织架构图岗位关联自定义建模台账获取岗位说明,并支持点击跳转到岗位说明附件页
3.组织架构图人员卡片点击人员跳转到人员卡片
4.组织架构图默认平铺展示
cx0418
chenxu1234 1 year ago
parent 2a5628765e
commit 35e372e85f

@ -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 {
<div style="display: inline-block; margin-left: 6px;width: 55%">
<div class="dept-box" style="font-size: 15px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 900;color: #333333;height: 25px;line-height: 25px;width:110px,white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
${d.data.fname}
</div>
</div>
<div style="font-size: 13px;font-family: Microsoft YaHei-Bold, Microsoft YaHei;color: #333333;height: 25px;line-height: 25px;">
负责人:${d.data.fleader}
</div>
@ -251,7 +251,7 @@ export default class DrawerComponents extends React.Component {
</div>
</div>
</div>
</div>
</div>`;
} else if (d.data.ftype == 3) {
@ -285,12 +285,19 @@ export default class DrawerComponents extends React.Component {
</div>
<div style="display: inline-block; margin-left: 6px;width: 55%;height:100%">
<div style='display:flex;align-items:center;height: 25px;line-height: 25px;margin-top:15px'>
<div style="font-weight: bold;font-size: 15px;ont-family: Microsoft YaHei-Bold, Microsoft YaHei;color: #333333;">${
d.data.fname
}</div>
<div onclick="window.open('/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/'+${
d.data.id
})" style="font-weight: bold;font-size: 15px;ont-family: Microsoft YaHei-Bold, Microsoft YaHei;color: #333333;">${
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 onclick="if(${
d.data.jobFj
} == 0) return alert('该岗位未维护岗位说明书') ;window.open('/spa/document/index2file.jsp?id='+${
d.data.jobFj
})" >岗位: ${d.data.jobTitle}</div>
</div>
</div>
</div>
@ -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={
<Space>
{detailType == 'chart' && params && params.fclass == '0' && (
<Checkbox
style={{ marginTop: '5px', marginLeft: 100 }}
checked={showJob}
onChange={(e) => {
this.setState({
showJob: e.target.checked,
});
this.getDeatilDatas(
params,
detailType,
e.target.checked ? '1' : '0',
);
}}
>
是否显示岗位
</Checkbox>
)}
<Dropdown overlay={menu}>
<Button type="primary">导出</Button>
</Dropdown>

@ -172,7 +172,7 @@ export default function companyPage() {
)}"/>
</div>
<div style="width: 144px;height: 80px;top: 35px;position: relative;font-weight: 400;font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;color: #333333;text-align: center;">
font-family: Microsoft YaHei-Regular, Microsoft YaHei;color: #333333;text-align: center;">
<div title=${
d.data.fname
} style="width: 110px;margin: 0 auto;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;
@ -193,7 +193,7 @@ export default function companyPage() {
)}"/>
</div>
<div style="width: 144px;height: 80px;top: 35px;position: relative;font-weight: 400;font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;color: #333333;text-align: center;">
font-family: Microsoft YaHei-Regular, Microsoft YaHei;color: #333333;text-align: center;">
<div style="width: 110px;margin: 0 auto;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
line-height: 18px;word-break: break-all;">${d.data.fname}</div>
<div style="display: ${statisticsStyle}">
@ -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]);

Loading…
Cancel
Save