Compare commits

...

4 Commits

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -52,7 +52,7 @@ export const OrgChartComponent = memo((props, ref) => {
.layout('top') .layout('top')
.linkUpdate(function (d, i, arr) { .linkUpdate(function (d, i, arr) {
d3.select(this) d3.select(this)
.attr('stroke', '#66BAF5') .attr('stroke', '#dcdddc')
.attr('stroke-width', 1) .attr('stroke-width', 1)
.style('stroke-dasharray', '3, 3'); .style('stroke-dasharray', '3, 3');
}) })

@ -22,10 +22,9 @@ const { TextArea } = Input;
import moment from 'moment'; import moment from 'moment';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';
import { HomeOutlined } from '@ant-design/icons'; import { HomeOutlined, FolderOpenOutlined } from '@ant-design/icons';
moment.locale('zh-cn'); moment.locale('zh-cn');
import { getLabel } from '../../util/i18n.js'; import { getLabel } from '../../util/i18n.js';
import { SmileOutlined } from '@ant-design/icons';
export class TopBar extends React.Component { export class TopBar extends React.Component {
constructor(props) { constructor(props) {
@ -116,7 +115,11 @@ export class TopBar extends React.Component {
arr = [...data.companyTree]; arr = [...data.companyTree];
} }
arr.map((item, index) => { arr.map((item, index) => {
item.icon = <HomeOutlined />; if (item.type == '1') {
item.icon = <HomeOutlined />;
} else {
item.icon = <FolderOpenOutlined />;
}
}); });
this.setState({ this.setState({
rootTreeData: arr, rootTreeData: arr,
@ -165,7 +168,11 @@ export class TopBar extends React.Component {
.then((res) => res.json()) .then((res) => res.json())
.then((data) => { .then((data) => {
data.companyTree.map((item, index) => { data.companyTree.map((item, index) => {
item.icon = <HomeOutlined />; if (item.type == '1') {
item.icon = <HomeOutlined />;
} else {
item.icon = <FolderOpenOutlined />;
}
}); });
this.setState({ this.setState({
fclasslist: data.fclasslist, fclasslist: data.fclasslist,
@ -197,7 +204,7 @@ export class TopBar extends React.Component {
return ( return (
<div className={style.topbarWrapper}> <div className={style.topbarWrapper}>
<Row> <Row>
<Col span={6}> {/* <Col span={6}>
{getLabel(547293, labelData)} {getLabel(547293, labelData)}
<Select <Select
defaultValue="0" defaultValue="0"
@ -228,7 +235,7 @@ export class TopBar extends React.Component {
</Option> </Option>
))} ))}
</Select> </Select>
</Col> </Col> */}
<Col span={6}> <Col span={6}>
{getLabel(547294, labelData)} {getLabel(547294, labelData)}
<TreeSelect <TreeSelect
@ -280,8 +287,6 @@ export class TopBar extends React.Component {
<Option value="4">{getLabel(547465, labelData)}</Option> <Option value="4">{getLabel(547465, labelData)}</Option>
</Select> </Select>
</Col> </Col>
</Row>
<Row style={{ marginTop: '15px' }}>
<Col span={6}> <Col span={6}>
<Checkbox <Checkbox
style={{ marginTop: '5px' }} style={{ marginTop: '5px' }}
@ -304,8 +309,10 @@ export class TopBar extends React.Component {
/> />
</Tooltip> </Tooltip>
</Col> </Col>
</Row>
<Row style={{ marginTop: '15px' }}>
<Col span={16}> <Col span={16}>
{this.state.requestData.fclass == '0' && ( {/* {this.state.requestData.fclass == '0' && (
<span> <span>
<Button <Button
type="primary" type="primary"
@ -336,7 +343,7 @@ export class TopBar extends React.Component {
{getLabel(547313, labelData)} {getLabel(547313, labelData)}
</Button> </Button>
</span> </span>
)} )} */}
<Button <Button
type="primary" type="primary"

@ -44,13 +44,16 @@ export default function companyPage() {
// //
const onNodeClick = (node) => { const onNodeClick = (node) => {
if (node.ftype == '2') { if (node.ftype == '1') {
const params = { window.open(
rootId: node.id, `/spa/portal/static/index.html#/main/portal/portal-6-3?subId=${node.fobjid}`,
fclass: topbar.state.requestData.fclass, '_blank',
id: infoRef.current, );
}; } else if (node.ftype == '2') {
drawerCom.showDrawer(params); window.open(
`/spa/portal/static/index.html#/main/portal/portal-5-3?depId=${node.fobjid}`,
'_blank',
);
} }
}; };
@ -96,12 +99,14 @@ export default function companyPage() {
// //
function getDepartmentImage(fisvitual) { function getDepartmentImage(fisvitual) {
return fisvitual == '0' ? `./img/back/level4.png` : `./img/back/level8.png`; return `./img/back/back.png`;
//return fisvitual == '0' ? `./img/back/level4.png` : `./img/back/level8.png`;
} }
// //
function getSubcompanyImage(fisvitual) { function getSubcompanyImage(fisvitual) {
return fisvitual == '0' ? `./img/back/level1.png` : `./img/back/level5.png`; //return fisvitual == '0' ? `./img/back/level1.png` : `./img/back/level5.png`;
return `./img/back/back.png`;
} }
// //
@ -132,9 +137,9 @@ export default function companyPage() {
// ButtonContent // ButtonContent
const buttonContentRender = ({ node, state }) => { const buttonContentRender = ({ node, state }) => {
if (node.children) { if (node.children) {
return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#66BAF5"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;">ˆ</div> </div>`; return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#1f0ea3"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;">ˆ</div> </div>`;
} else { } else {
return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#66BAF5"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;transform:rotate(180deg)">ˆ</div> </div>`; return `<div style="border-radius:3px;padding:3px;font-size:10px;margin:auto auto;background-color:#1f0ea3"> <div style="margin-top:0px;line-height:1.35;height:11px;font-size:25px; color: #fff;transform:rotate(180deg)">ˆ</div> </div>`;
} }
}; };
@ -164,6 +169,7 @@ export default function companyPage() {
const nodeContentRender = (d, i, arr, state) => { const nodeContentRender = (d, i, arr, state) => {
let fclass = topbar.state.requestData.fclass; let fclass = topbar.state.requestData.fclass;
let statisticsStyle = fclass == 0 ? 'block' : 'none'; let statisticsStyle = fclass == 0 ? 'block' : 'none';
let staffStyle = d.data.staffNum == 0 ? 'none' : 'inline-block';
if (d.data.ftype == 0) { if (d.data.ftype == 0) {
return `<div style="text-align: center;"> return `<div style="text-align: center;">
<div style="display: inline-block; margin-left: 5px;"> <div style="display: inline-block; margin-left: 5px;">
@ -171,11 +177,12 @@ export default function companyPage() {
font-size: 24px; font-size: 24px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei; font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: bold; font-weight: bold;
color: #000000; color: #1f0ea3;
line-height: 28px; line-height: 28px;
letter-spacing: 1px; letter-spacing: 1px;
margin-top: 10px; margin-top: 10px;
">${d.data.fname}</div> ">${d.data.fname}(${d.data.onJobNum})</div>
</div> </div>
</div>`; </div>`;
} else if (d.data.ftype == 1) { } else if (d.data.ftype == 1) {
@ -192,7 +199,9 @@ export default function companyPage() {
</div> </div>
<div style="display: ${statisticsStyle}"> <div style="display: ${statisticsStyle}">
<span style="color:red">${d.data.staffNum}</span> / <span style="color:red;display: ${staffStyle}">${
d.data.staffNum
} /</span>
<span style="color:green">${d.data.onJobNum}</span> <span style="color:green">${d.data.onJobNum}</span>
</div> </div>
</div> </div>
@ -214,7 +223,9 @@ export default function companyPage() {
</div> </div>
<div style="display: ${statisticsStyle}"> <div style="display: ${statisticsStyle}">
<span style="color:red">${d.data.staffNum}</span> / <span style="color:red;display: ${staffStyle}">${
d.data.staffNum
} /</span>
<span style="color:green">${d.data.onJobNum}</span> <span style="color:green">${d.data.onJobNum}</span>
</div> </div>
</div> </div>
@ -488,14 +499,14 @@ export default function companyPage() {
onZoomIn={(progressBtn) => handleZoomIn(progressBtn)} onZoomIn={(progressBtn) => handleZoomIn(progressBtn)}
onZoomBehavior={(value) => handleZoomBehavior(value)} onZoomBehavior={(value) => handleZoomBehavior(value)}
/> />
<TimeLine {/* <TimeLine
ref={(r) => (timeLine = r)} ref={(r) => (timeLine = r)}
onClick={(timeline) => { onClick={(timeline) => {
timeLineSearch(timeline); timeLineSearch(timeline);
}} }}
url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'} url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'}
labelData={labelData} labelData={labelData}
/> /> */}
<Spin size="large" spinning={spinning}> <Spin size="large" spinning={spinning}>
<OrgChartComponent <OrgChartComponent
setChart={(chart) => (orgChart = chart)} setChart={(chart) => (orgChart = chart)}

@ -137,7 +137,7 @@
.tooltip .tooltiptext { .tooltip .tooltiptext {
visibility: hidden; visibility: hidden;
width: 144px; width: 144px;
background-color: #555; background-color: #1f0ea3;
color: #fff; color: #fff;
text-align: center; text-align: center;
border-radius: 6px; border-radius: 6px;

@ -99,7 +99,7 @@ export default function userPage() {
// //
useEffect(() => { useEffect(() => {
document.cookie = document.cookie =
'ecology_JSessionid=aaav03Zyuvq3A9TG0PEdz; JSESSIONID=aaav03Zyuvq3A9TG0PEdz; Systemlanguid=7; languageidweaver=7; loginuuids=1; loginidweaver=sysadmin; __randcode__=62316935-a99b-4cbf-a23f-0ac9c37db0da'; 'ecology_JSessionid=aaaqP0tTaKbFM9rJ6fQjz; JSESSIONID=aaaqP0tTaKbFM9rJ6fQjz; loginuuids=1; Systemlanguid=7; languageidweaver=7; 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