中远重工初版架构图完成

上海中远重工组织架构图
Chengliang 12 months ago
parent 156e801980
commit fd31f9370a

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<link rel="stylesheet" href="./umi.c64b754c.css" />
<script>
window.routerBase = "/spa/orgChart/";
</script>
<script>
//! umi version: 3.5.32
</script>
</head>
<body>
<div id="root"></div>
<script src="./umi.1df510d5.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -24,6 +24,7 @@
"@types/d3": "^7.4.0", "@types/d3": "^7.4.0",
"d3": "7.4.4", "d3": "7.4.4",
"d3-org-chart": "2.6.0", "d3-org-chart": "2.6.0",
"jquery": "^3.7.1",
"js-export-excel": "^1.1.4", "js-export-excel": "^1.1.4",
"jspdf": "^2.5.1", "jspdf": "^2.5.1",
"moment": "^2.29.3", "moment": "^2.29.3",

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -8,6 +8,8 @@ import {
Table, Table,
Spin, Spin,
Checkbox, Checkbox,
Row,
Col,
} from 'antd'; } from 'antd';
import { OrgChartComponent } from '@/components/orgChart'; import { OrgChartComponent } from '@/components/orgChart';
import * as d3 from 'd3'; import * as d3 from 'd3';
@ -33,11 +35,22 @@ export default class DrawerComponents extends React.Component {
columns: [], columns: [],
spinning: true, spinning: true,
showJob: false, showJob: false,
nbOptions: [],
defaultNbValue: [],
wbOptions: [],
defaultWbValue: [],
}; };
} }
componentDidMount() {} componentDidMount() {}
componentDidUpdate(prevProps, prevState, snapshotValue) {
//
// if (orgChart != null) {
// orgChart.getChartState().svgHeight = 3000;
// }
}
// //
onNodeClick(node) {} onNodeClick(node) {}
@ -62,18 +75,38 @@ export default class DrawerComponents extends React.Component {
: `./img/user-card/user-card-blue.png`; : `./img/user-card/user-card-blue.png`;
} }
//
getDeatilCondition() {
return new Promise((resolve) => {
d3.json('/api/bs/hrmorganization/orgchart/getDeptDetailCondition?').then(
(data) => {
this.setState({
nbOptions: data.nbCondition,
wbOptions: data.wbCondition,
defaultNbValue: data.nbValue,
});
resolve();
},
);
});
}
// //
getDeatilDatas(params, type = 'chart', showJob = '0') { getDeatilDatas(params, type = 'chart', showJob = '0') {
this.setState({ spinning: true }); this.setState({ spinning: true, data: [] });
d3.json( d3.json(
'/api/bs/hrmorganization/orgchart/getDepartmentDetail?' + '/api/bs/hrmorganization/orgchart/getDepartmentDetail?' +
qs.stringify({ detauleType: type, ...params, showJob }), qs.stringify({ detailType: type, ...params, showJob }),
).then((data) => { ).then((data) => {
// //
if (type == 'chart') { if (type == 'chart') {
this.setState({ data: data.data, spinning: false }); this.setState({ data: data.data, spinning: false });
} else { } else {
this.setState({ dataSource: data.dataSource, columns: data.columns }); this.setState({
dataSource: data.dataSource,
columns: data.columns,
spinning: false,
});
} }
}); });
} }
@ -304,22 +337,74 @@ export default class DrawerComponents extends React.Component {
} }
}; };
showDrawer = (params) => { showDrawer = async (params) => {
this.getDeatilDatas(params, 'chart', '0');
this.setState({ open: true, params: params }); this.setState({ open: true, params: params });
await this.getDeatilCondition();
const { defaultNbValue } = this.state;
params = {
...params,
nbValue: defaultNbValue.join(','),
};
this.getDeatilDatas(params, 'chart', '0');
}; };
onClose = () => { onClose = () => {
this.setState({ open: false, detailType: 'chart', showJob: false }); this.setState({
open: false,
detailType: 'chart',
showJob: false,
data: [],
dataSource: [],
defaultNbValue: [],
defaultWbValue: [],
});
}; };
changeDetail = () => { changeDetail = () => {
const { detailType, params } = this.state; const {
defaultNbValue,
defaultWbValue,
detailType,
params,
data,
dataSource,
} = this.state;
let type = detailType == 'chart' ? 'table' : 'chart'; let type = detailType == 'chart' ? 'table' : 'chart';
this.setState({ this.setState({
detailType: type, detailType: type,
}); });
this.getDeatilDatas(params, type, '0'); const nParam = {
...params,
nbValue: defaultNbValue.join(','),
wbValue: defaultWbValue.join(','),
};
this.getDeatilDatas(nParam, type, '0');
};
onNbChange = (checkedValues) => {
this.setState({
defaultNbValue: checkedValues,
});
const { defaultWbValue, params, detailType } = this.state;
const nParam = {
...params,
nbValue: checkedValues.join(','),
wbValue: defaultWbValue.join(','),
};
this.getDeatilDatas(nParam, detailType, '0');
};
onWbChange = (checkedValues) => {
this.setState({
defaultWbValue: checkedValues,
});
const { defaultNbValue, params, detailType } = this.state;
const nParam = {
...params,
nbValue: defaultNbValue.join(','),
wbValue: checkedValues.join(','),
};
this.getDeatilDatas(nParam, detailType, '0');
}; };
render() { render() {
@ -332,8 +417,13 @@ export default class DrawerComponents extends React.Component {
columns, columns,
spinning, spinning,
showJob, showJob,
nbOptions,
defaultNbValue,
wbOptions,
defaultWbValue,
} = this.state; } = this.state;
let arr = []; let arr = [];
if (detailType == 'chart') { if (detailType == 'chart') {
arr.push({ label: '导出图片', key: '1' }); arr.push({ label: '导出图片', key: '1' });
//arr.push({ label: 'PDF', key: '2' }); //arr.push({ label: 'PDF', key: '2' });
@ -358,9 +448,6 @@ export default class DrawerComponents extends React.Component {
width={1200} width={1200}
onClose={this.onClose} onClose={this.onClose}
open={open} open={open}
bodyStyle={{
paddingBottom: 80,
}}
extra={ extra={
<Space> <Space>
<Dropdown overlay={menu}> <Dropdown overlay={menu}>
@ -372,40 +459,71 @@ export default class DrawerComponents extends React.Component {
</Space> </Space>
} }
> >
{detailType == 'chart' ? ( <>
data.length > 0 && ( <Row style={{ margin: '20px 20px' }}>
<Spin size="large" spinning={spinning}> <Col span={2}>内部职工</Col>{' '}
<OrgChartComponent <Col span={22}>
setChart={(chart) => (orgChart = chart)} {' '}
setClick={(click) => (addNodeChildFunc = click)} <Checkbox.Group
onNodeClick={this.onNodeClick} options={nbOptions}
onButtonClick={this.onButtonClick} value={defaultNbValue}
data={data} onChange={this.onNbChange}
buttonContent={this.buttonContentRender}
nodeWidth={this.nodeWidthRender}
nodeHeight={this.nodeHeightRender}
nodeContent={this.nodeContentRender}
/> />
</Spin> </Col>
) </Row>
) : ( <Row style={{ margin: '0px 20px' }}>
<div style={{ padding: '0 20px' }}> <Col span={2}>外部人员</Col>
<Table <Col span={22}>
dataSource={dataSource} {' '}
columns={columns} <Checkbox.Group
scroll={{ y: 500 }} options={wbOptions}
pagination={{ value={defaultWbValue}
locale: { onChange={this.onWbChange}
// />
items_per_page: '条/页', </Col>
jump_to: '跳至', </Row>
page: '页', {detailType == 'chart' ? (
}, <div className="svg-container">
showTotal: (total) => `${dataSource.length}`, <Spin
}} size="large"
/> spinning={spinning}
</div> tip="正在读取数据...."
)} className="loading-center"
/>
{data.length > 0 && (
<OrgChartComponent
setChart={(chart) => (orgChart = chart)}
setClick={(click) => (addNodeChildFunc = click)}
onNodeClick={this.onNodeClick}
onButtonClick={this.onButtonClick}
data={data}
buttonContent={this.buttonContentRender}
nodeWidth={this.nodeWidthRender}
nodeHeight={this.nodeHeightRender}
nodeContent={this.nodeContentRender}
/>
)}
</div>
) : (
<div style={{ padding: '0 20px' }}>
<Table
dataSource={dataSource}
columns={columns}
scroll={{ y: 500 }}
loading={spinning}
pagination={{
locale: {
//
items_per_page: '条/页',
jump_to: '跳至',
page: '页',
},
showTotal: (total) => `${dataSource.length}`,
}}
/>
</div>
)}
</>
</Drawer> </Drawer>
); );
} }

@ -2,3 +2,11 @@
width: 500px; width: 500px;
text-align: left; text-align: left;
} }
.loading-center {
position: absolute;
top: 50vh;
left: 50%;
margin-left: -8px;
margin-top: -8px;
}

@ -230,8 +230,8 @@ export class OrgChart {
top: { top: {
nodeLeftX: (node) => -node.width / 2, nodeLeftX: (node) => -node.width / 2,
nodeRightX: (node) => node.width / 2, nodeRightX: (node) => node.width / 2,
nodeTopY: (node) => 0, //nodeTopY: (node) => 0,
//nodeTopY: (node) => node.height / 0.3, nodeTopY: (node) => node.height / 0.4,
nodeBottomY: (node) => node.height, nodeBottomY: (node) => node.height,
nodeJoinX: (node) => node.x - node.width / 2, nodeJoinX: (node) => node.x - node.width / 2,
nodeJoinY: (node) => node.y + node.height, nodeJoinY: (node) => node.y + node.height,

@ -99,8 +99,8 @@ export default function companyPage() {
}; };
// //
function getDepartmentImage(fisvitual) { function getDepartmentImage(level) {
return fisvitual == '0' ? `./img/back/level4.png` : `./img/back/level8.png`; return `./img/department/dept${level}.png`;
} }
// //
@ -191,7 +191,7 @@ export default function companyPage() {
<div style="width: 100%; height: 100%; background-size: 100% 100%;"> <div style="width: 100%; height: 100%; background-size: 100% 100%;">
<div style='position:absolute;height:100%'> <div style='position:absolute;height:100%'>
<img style='width:144px;height:106px' src="${getDepartmentImage( <img style='width:144px;height:106px' src="${getDepartmentImage(
d.data.fisvitual, d.data.deptLevel,
)}"/> )}"/>
</div> </div>
<div style="width: 144px;height: 80px;top: 35px;position: relative;font-weight: 400;font-size: 14px; <div style="width: 144px;height: 80px;top: 35px;position: relative;font-weight: 400;font-size: 14px;

@ -114,7 +114,7 @@
} }
.ant-drawer-body { .ant-drawer-body {
padding: 0px; padding: 0px !important;
overflow: hidden; overflow: hidden;
} }
@ -129,3 +129,21 @@
width: 40px; width: 40px;
height: 40px; height: 40px;
} }
.svg-container {
overflow-y: auto;
//height: calc(~'100% - 100px');;
}
.svg-container::-webkit-scrollbar {
/*滚动条整体样式*/
width: 10px;
/*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
.svg-container::-webkit-scrollbar-thumb {
/*滚动条里面小方块 #c1c1c1*/
border-radius: 10px;
background-color: #c1c1c1;
}

@ -99,7 +99,7 @@ export default function userPage() {
// //
useEffect(() => { useEffect(() => {
document.cookie = 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=aaaSjdYP0FDFSd1hMbt8y; JSESSIONID=aaaSjdYP0FDFSd1hMbt8y; Systemlanguid=7; languageidweaver=7; loginuuids=1; loginidweaver=sysadmin;';
d3.json( d3.json(
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0', '/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
).then((data) => { ).then((data) => {

Loading…
Cancel
Save