Compare commits

..

4 Commits

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -367,7 +367,6 @@ export default class DrawerComponents extends React.Component {
};
onStatusChange = (checkedValues) => {
const { labelData } = this.props;
if (checkedValues.length === 0) {
return message.error(`${getLabel(547728, labelData)}`, 2);
}
@ -385,7 +384,6 @@ export default class DrawerComponents extends React.Component {
};
onTypeChange = (checkedValues) => {
const { labelData } = this.props;
if (this.state.showJob) {
return message.error(`${getLabel(547729, labelData)}`, 2);
}

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

@ -110,14 +110,11 @@ export default class TimeLine extends React.Component {
key={item.key}
className={styles.timeline}
color={item.color}
style={{
color: item.color == 'blue' ? '#1890ff' : 'dimgray',
}}
>
<div
className={styles.title}
style={{
color: item.color == 'blue' ? '#1890ff' : 'dimgray',
}}
onClick={this.handleLineClick.bind(this, item)}
>
<div onClick={this.handleLineClick.bind(this, item)}>
{item.title}
</div>
{item.key != 0 && (

@ -15,9 +15,9 @@
cursor: pointer;
}
// .timeline .title:hover {
// color: #1890ff;
// }
.timeline :hover {
color: #1890ff;
}
.time {
color: dimgray;

@ -22,10 +22,9 @@ const { TextArea } = Input;
import moment from 'moment';
import 'moment/locale/zh-cn';
import locale from 'antd/lib/date-picker/locale/zh_CN';
import { HomeOutlined, FolderOutlined } from '@ant-design/icons';
import { HomeOutlined, FolderOpenOutlined } from '@ant-design/icons';
moment.locale('zh-cn');
import { getLabel } from '../../util/i18n.js';
import { SmileOutlined } from '@ant-design/icons';
export class TopBar extends React.Component {
constructor(props) {
@ -45,8 +44,6 @@ export class TopBar extends React.Component {
open: false,
confirmLoading: false,
description: '',
timelineId: '0',
treeKey: 1,
};
}
@ -59,29 +56,10 @@ export class TopBar extends React.Component {
this.setState({ requestData });
}
handleTreeData(treeData = [], timelineId) {
this.setState({
rootTreeData: treeData,
timelineId: timelineId,
treeKey: this.state.treeKey + 1,
});
}
onChange = (e) => {
this.setState({ description: e.target.value });
};
generateKey = (
length = 5,
chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
) => {
let result = '';
for (let i = 0; i < length; i++) {
result += chars.charAt(Math.floor(Math.random() * chars.length));
}
return result;
};
/**
* 弹窗确认
*/
@ -137,9 +115,10 @@ export class TopBar extends React.Component {
arr = [...data.companyTree];
}
arr.map((item, index) => {
item.icon = <HomeOutlined />;
if (item.type == 2) {
item.icon = <FolderOutlined />;
if (item.type == '1') {
item.icon = <HomeOutlined />;
} else {
item.icon = <FolderOpenOutlined />;
}
});
this.setState({
@ -159,14 +138,11 @@ export class TopBar extends React.Component {
const { id } = treeNode;
setTimeout(() => {
const { fclass } = this.state.requestData;
const { timelineId } = this.state;
let api =
'/api/bs/hrmorganization/orgchart/getSubCompanyTree?subcompany=' +
id +
'&fclass=' +
fclass +
'&id=' +
timelineId;
fclass;
this.getNodeTreeNode(api);
resolve(undefined);
}, 500);
@ -192,7 +168,11 @@ export class TopBar extends React.Component {
.then((res) => res.json())
.then((data) => {
data.companyTree.map((item, index) => {
item.icon = <HomeOutlined />;
if (item.type == '1') {
item.icon = <HomeOutlined />;
} else {
item.icon = <FolderOpenOutlined />;
}
});
this.setState({
fclasslist: data.fclasslist,
@ -219,13 +199,12 @@ export class TopBar extends React.Component {
render() {
const { disabled, type, labelData } = this.props;
const { rootTreeData, open, confirmLoading, treeExpandedKeys, treeKey } =
this.state;
const { rootTreeData, open, confirmLoading, treeExpandedKeys } = this.state;
return (
<div className={style.topbarWrapper}>
<Row>
<Col span={6}>
{/* <Col span={6}>
{getLabel(547293, labelData)}
<Select
defaultValue="0"
@ -256,12 +235,10 @@ export class TopBar extends React.Component {
</Option>
))}
</Select>
</Col>
<Col span={8}>
</Col> */}
<Col span={6}>
{getLabel(547294, labelData)}
<TreeSelect
key={treeKey}
treeDataSimpleMode
allowClear
style={{ width: '65%' }}
@ -274,7 +251,7 @@ export class TopBar extends React.Component {
treeIcon
/>
</Col>
<Col span={5}>
<Col span={6}>
<Checkbox
style={{ marginTop: '5px', marginLeft: 100 }}
checked={this.state.requestData.hidedept == '1'}
@ -296,7 +273,7 @@ export class TopBar extends React.Component {
/>
</Tooltip>
</Col>
<Col span={5}>
<Col span={6}>
{getLabel(547299, labelData)}
<Select
defaultValue="3"
@ -310,8 +287,6 @@ export class TopBar extends React.Component {
<Option value="4">{getLabel(547465, labelData)}</Option>
</Select>
</Col>
</Row>
<Row style={{ marginTop: '15px' }}>
<Col span={6}>
<Checkbox
style={{ marginTop: '5px' }}
@ -334,9 +309,10 @@ export class TopBar extends React.Component {
/>
</Tooltip>
</Col>
<Col span={10}>
{this.state.requestData.fclass == '0' && (
</Row>
<Row style={{ marginTop: '15px' }}>
<Col span={16}>
{/* {this.state.requestData.fclass == '0' && (
<span>
<Button
type="primary"
@ -367,7 +343,7 @@ export class TopBar extends React.Component {
{getLabel(547313, labelData)}
</Button>
</span>
)}
)} */}
<Button
type="primary"

@ -44,13 +44,16 @@ export default function companyPage() {
//
const onNodeClick = (node) => {
if (node.ftype == '2') {
const params = {
rootId: node.id,
fclass: topbar.state.requestData.fclass,
id: infoRef.current,
};
drawerCom.showDrawer(params);
if (node.ftype == '1') {
window.open(
`/spa/portal/static/index.html#/main/portal/portal-6-3?subId=${node.fobjid}`,
'_blank',
);
} else if (node.ftype == '2') {
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) {
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) {
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
const buttonContentRender = ({ node, state }) => {
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 {
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) => {
let fclass = topbar.state.requestData.fclass;
let statisticsStyle = fclass == 0 ? 'block' : 'none';
let staffStyle = d.data.staffNum == 0 ? 'none' : 'inline-block';
if (d.data.ftype == 0) {
return `<div style="text-align: center;">
<div style="display: inline-block; margin-left: 5px;">
@ -171,11 +177,12 @@ export default function companyPage() {
font-size: 24px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: bold;
color: #000000;
color: #1f0ea3;
line-height: 28px;
letter-spacing: 1px;
margin-top: 10px;
">${d.data.fname}</div>
">${d.data.fname}(${d.data.onJobNum})</div>
</div>
</div>`;
} else if (d.data.ftype == 1) {
@ -192,7 +199,9 @@ export default function companyPage() {
</div>
<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>
</div>
</div>
@ -214,7 +223,9 @@ export default function companyPage() {
</div>
<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>
</div>
</div>
@ -375,8 +386,6 @@ export default function companyPage() {
hidedept: '0',
};
topbar.handleFormChange({ ...resetParams });
//
topbar.handleTreeData([], timeline.id);
topbar.getNodeTreeNode(
`/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${fclass}&id=${timeline.id}`,
false,
@ -490,14 +499,14 @@ export default function companyPage() {
onZoomIn={(progressBtn) => handleZoomIn(progressBtn)}
onZoomBehavior={(value) => handleZoomBehavior(value)}
/>
<TimeLine
{/* <TimeLine
ref={(r) => (timeLine = r)}
onClick={(timeline) => {
timeLineSearch(timeline);
}}
url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'}
labelData={labelData}
/>
/> */}
<Spin size="large" spinning={spinning}>
<OrgChartComponent
setChart={(chart) => (orgChart = chart)}

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

@ -99,7 +99,7 @@ export default function userPage() {
//
useEffect(() => {
document.cookie =
'ecology_JSessionid=aaaLiDqzA0rZHgPBdxGez; JSESSIONID=aaaLiDqzA0rZHgPBdxGez; Systemlanguid=7; languageidweaver=7; loginuuids=1; loginidweaver=sysadmin; __randcode__=7b9b3b9b-a780-4d6a-b8d5-22d0f8aaf11a';
'ecology_JSessionid=aaaqP0tTaKbFM9rJ6fQjz; JSESSIONID=aaaqP0tTaKbFM9rJ6fQjz; loginuuids=1; Systemlanguid=7; languageidweaver=7; loginidweaver=sysadmin;';
d3.json(
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
).then((data) => {

Loading…
Cancel
Save