feat: 组织架构图新增虚拟组织
This commit is contained in:
parent
6a6bb51ea1
commit
1955d81162
|
|
@ -28,7 +28,9 @@ export class TopBar extends React.Component {
|
|||
root: '0',
|
||||
level: '3',
|
||||
fisvitual: '0',
|
||||
isvitual: '0',
|
||||
},
|
||||
colSpan: props.type == 'user' ? 5 : 4,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +83,7 @@ export class TopBar extends React.Component {
|
|||
return (
|
||||
<div className={style.topbarWrapper}>
|
||||
<Row>
|
||||
<Col span={5}>
|
||||
<Col span={this.state.colSpan}>
|
||||
数据日期:
|
||||
<DatePicker
|
||||
placeholder="请选择日期"
|
||||
|
|
@ -103,7 +105,7 @@ export class TopBar extends React.Component {
|
|||
/>
|
||||
</Col>
|
||||
|
||||
<Col span={5}>
|
||||
<Col span={this.state.colSpan}>
|
||||
维度:
|
||||
<Select
|
||||
defaultValue="0"
|
||||
|
|
@ -117,7 +119,7 @@ export class TopBar extends React.Component {
|
|||
</Select>
|
||||
</Col>
|
||||
|
||||
<Col span={5}>
|
||||
<Col span={this.state.colSpan}>
|
||||
根节点:
|
||||
<Select
|
||||
showSearch
|
||||
|
|
@ -135,7 +137,7 @@ export class TopBar extends React.Component {
|
|||
</Select>
|
||||
</Col>
|
||||
|
||||
<Col span={5}>
|
||||
<Col span={this.state.colSpan}>
|
||||
显示层级:
|
||||
<Select
|
||||
defaultValue="3"
|
||||
|
|
@ -149,6 +151,21 @@ export class TopBar extends React.Component {
|
|||
</Select>
|
||||
</Col>
|
||||
|
||||
{this.props.type == 'company' && (
|
||||
<Col span={this.state.colSpan}>
|
||||
组织:
|
||||
<Select
|
||||
defaultValue="0"
|
||||
style={{ width: 120 }}
|
||||
value={this.state.requestData.isvitual}
|
||||
onChange={(value) => this.handleFormChange({ isvitual: value })}
|
||||
>
|
||||
<Option value="0">实体组织</Option>
|
||||
<Option value="1">虚拟组织</Option>
|
||||
</Select>
|
||||
</Col>
|
||||
)}
|
||||
|
||||
{/* <Col span={4}>
|
||||
<Checkbox style={{ marginTop: "5px" }} onChange={(e) => this.handleFormChange({fisvitual: e.target.checked ? "1": "0"})}>显示虚拟组织</Checkbox>
|
||||
</Col> */}
|
||||
|
|
|
|||
|
|
@ -86,11 +86,11 @@ export default function companyPage() {
|
|||
useEffect(() => {
|
||||
d3.json(
|
||||
// "/company/data"
|
||||
'/api/bs/hrmorganization/orgchart/companyData?fclass=0&root=0&date=' +
|
||||
'/api/bs/hrmorganization/orgchart/companyData?fclass=0&isvitual=0&root=0&date=' +
|
||||
moment(new Date()).format('YYYY-MM-DD'),
|
||||
).then((data) => {
|
||||
setData(data.data);
|
||||
setHasRight(data.hasRight);
|
||||
setHasRight(data?.hasRight);
|
||||
});
|
||||
}, [true]);
|
||||
|
||||
|
|
@ -331,6 +331,7 @@ export default function companyPage() {
|
|||
onSearch={(requestData) => {
|
||||
handleSearch(requestData);
|
||||
}}
|
||||
type="company"
|
||||
url="/api/bs/hrmorganization/orgchart/getCondition?type=company"
|
||||
/>
|
||||
<ToolBar
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ export default function userPage() {
|
|||
// 获取数据
|
||||
useEffect(() => {
|
||||
document.cookie =
|
||||
'ecology_JSessionId=abcs4Umove2Bhcz57t6oy; JSESSIONID=abcs4Umove2Bhcz57t6oy; ecology_JSessionid=abcs4Umove2Bhcz57t6oy; languageidweaver=7; loginuuids=1; i_like_gitea=6a881aa47092d822; lang=zh-CN; loginidweaver=1; __randcode__=0ee558a3-ceee-4a97-bea3-00f47801e62a';
|
||||
'ecology_JSessionid=aaa1QNMWge48Bh-3oq6oy; JSESSIONID=aaa1QNMWge48Bh-3oq6oy; loginidweaver=1; languageidweaver=7; loginuuids=1; __randcode__=f7afbede-58e5-484e-bd5e-cc38d51ea68c';
|
||||
d3.json(
|
||||
// "/user/data"
|
||||
'/api/bs/hrmorganization/orgchart/userData?fclass=0&root=0&date=' +
|
||||
|
|
@ -474,6 +474,7 @@ export default function userPage() {
|
|||
setRequestRes(requestData);
|
||||
handleSearch(requestData);
|
||||
}}
|
||||
type="user"
|
||||
url="/api/bs/hrmorganization/orgchart/getCondition?type=user"
|
||||
/>
|
||||
<ToolBar
|
||||
|
|
|
|||
Loading…
Reference in New Issue