Compare commits
2 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
75f1405f2b | |
|
|
8002a59afd |
|
|
@ -34,7 +34,7 @@ export default class DrawerComponents extends React.Component {
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: [],
|
columns: [],
|
||||||
spinning: true,
|
spinning: true,
|
||||||
showJob: false,
|
showJob: true,
|
||||||
defaultTypeValue: ['isBelongTo'],
|
defaultTypeValue: ['isBelongTo'],
|
||||||
defaultStatusValue: [0, 1, 2, 3],
|
defaultStatusValue: [0, 1, 2, 3],
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
|
@ -81,7 +81,6 @@ export default class DrawerComponents extends React.Component {
|
||||||
'/api/bs/hrmorganization/orgchart/getDepartmentDetail?' +
|
'/api/bs/hrmorganization/orgchart/getDepartmentDetail?' +
|
||||||
qs.stringify({ detauleType: type, ...params, showJob }),
|
qs.stringify({ detauleType: 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 {
|
||||||
|
|
@ -245,6 +244,7 @@ export default class DrawerComponents extends React.Component {
|
||||||
*/
|
*/
|
||||||
nodeContentRender = (d, i, arr, state) => {
|
nodeContentRender = (d, i, arr, state) => {
|
||||||
const { labelData } = this.props;
|
const { labelData } = this.props;
|
||||||
|
let bkStyle = d.data.keyJob == 0 ? 'none' : 'block';
|
||||||
|
|
||||||
if (d.data.ftype == 2) {
|
if (d.data.ftype == 2) {
|
||||||
return `<div style="position: relative;">
|
return `<div style="position: relative;">
|
||||||
|
|
@ -271,6 +271,7 @@ export default class DrawerComponents extends React.Component {
|
||||||
d.data.fonjob
|
d.data.fonjob
|
||||||
} ${getLabel(547525, labelData)}
|
} ${getLabel(547525, labelData)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -292,6 +293,12 @@ export default class DrawerComponents extends React.Component {
|
||||||
d.data.fonjob
|
d.data.fonjob
|
||||||
} ${getLabel(547525, labelData)}</span>
|
} ${getLabel(547525, labelData)}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="display: ${bkStyle}">
|
||||||
|
<div>是否关键岗:${
|
||||||
|
d.data.keyJob == 0 ? '否' : '是'
|
||||||
|
}</div>
|
||||||
|
<div>backup人员:${d.data.bkPerson}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
@ -335,7 +342,7 @@ export default class DrawerComponents extends React.Component {
|
||||||
typeValue: defaultTypeValue.join(','),
|
typeValue: defaultTypeValue.join(','),
|
||||||
statusValue: defaultStatusValue.join(','),
|
statusValue: defaultStatusValue.join(','),
|
||||||
};
|
};
|
||||||
this.getDeatilDatas(params, 'chart', '0');
|
this.getDeatilDatas(params, 'chart', '1');
|
||||||
this.setState({ open: true, params: params });
|
this.setState({ open: true, params: params });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -343,7 +350,7 @@ export default class DrawerComponents extends React.Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
open: false,
|
open: false,
|
||||||
detailType: 'chart',
|
detailType: 'chart',
|
||||||
showJob: false,
|
showJob: true,
|
||||||
defaultStatusValue: [0, 1, 2, 3],
|
defaultStatusValue: [0, 1, 2, 3],
|
||||||
defaultTypeValue: ['isBelongTo'],
|
defaultTypeValue: ['isBelongTo'],
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
|
@ -463,6 +470,7 @@ export default class DrawerComponents extends React.Component {
|
||||||
checked={showJob}
|
checked={showJob}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
debugger;
|
||||||
this.setState({
|
this.setState({
|
||||||
showJob: e.target.checked,
|
showJob: e.target.checked,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -110,14 +110,11 @@ export default class TimeLine extends React.Component {
|
||||||
key={item.key}
|
key={item.key}
|
||||||
className={styles.timeline}
|
className={styles.timeline}
|
||||||
color={item.color}
|
color={item.color}
|
||||||
|
style={{
|
||||||
|
color: item.color == 'blue' ? '#1890ff' : 'dimgray',
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div onClick={this.handleLineClick.bind(this, item)}>
|
||||||
className={styles.title}
|
|
||||||
style={{
|
|
||||||
color: item.color == 'blue' ? '#1890ff' : 'dimgray',
|
|
||||||
}}
|
|
||||||
onClick={this.handleLineClick.bind(this, item)}
|
|
||||||
>
|
|
||||||
{item.title}
|
{item.title}
|
||||||
</div>
|
</div>
|
||||||
{item.key != 0 && (
|
{item.key != 0 && (
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
// .timeline .title:hover {
|
.timeline :hover {
|
||||||
// color: #1890ff;
|
color: #1890ff;
|
||||||
// }
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
color: dimgray;
|
color: dimgray;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ 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, FolderOutlined } from '@ant-design/icons';
|
import { HomeOutlined } 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';
|
import { SmileOutlined } from '@ant-design/icons';
|
||||||
|
|
@ -45,8 +45,6 @@ export class TopBar extends React.Component {
|
||||||
open: false,
|
open: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
description: '',
|
description: '',
|
||||||
timelineId: '0',
|
|
||||||
treeKey: 1,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,29 +57,10 @@ export class TopBar extends React.Component {
|
||||||
this.setState({ requestData });
|
this.setState({ requestData });
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTreeData(treeData = [], timelineId) {
|
|
||||||
this.setState({
|
|
||||||
rootTreeData: treeData,
|
|
||||||
timelineId: timelineId,
|
|
||||||
treeKey: this.state.treeKey + 1,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onChange = (e) => {
|
onChange = (e) => {
|
||||||
this.setState({ description: e.target.value });
|
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;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 弹窗确认
|
* 弹窗确认
|
||||||
*/
|
*/
|
||||||
|
|
@ -138,9 +117,6 @@ export class TopBar extends React.Component {
|
||||||
}
|
}
|
||||||
arr.map((item, index) => {
|
arr.map((item, index) => {
|
||||||
item.icon = <HomeOutlined />;
|
item.icon = <HomeOutlined />;
|
||||||
if (item.type == 2) {
|
|
||||||
item.icon = <FolderOutlined />;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
this.setState({
|
this.setState({
|
||||||
rootTreeData: arr,
|
rootTreeData: arr,
|
||||||
|
|
@ -159,14 +135,11 @@ export class TopBar extends React.Component {
|
||||||
const { id } = treeNode;
|
const { id } = treeNode;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const { fclass } = this.state.requestData;
|
const { fclass } = this.state.requestData;
|
||||||
const { timelineId } = this.state;
|
|
||||||
let api =
|
let api =
|
||||||
'/api/bs/hrmorganization/orgchart/getSubCompanyTree?subcompany=' +
|
'/api/bs/hrmorganization/orgchart/getSubCompanyTree?subcompany=' +
|
||||||
id +
|
id +
|
||||||
'&fclass=' +
|
'&fclass=' +
|
||||||
fclass +
|
fclass;
|
||||||
'&id=' +
|
|
||||||
timelineId;
|
|
||||||
this.getNodeTreeNode(api);
|
this.getNodeTreeNode(api);
|
||||||
resolve(undefined);
|
resolve(undefined);
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
@ -219,8 +192,7 @@ export class TopBar extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { disabled, type, labelData } = this.props;
|
const { disabled, type, labelData } = this.props;
|
||||||
const { rootTreeData, open, confirmLoading, treeExpandedKeys, treeKey } =
|
const { rootTreeData, open, confirmLoading, treeExpandedKeys } = this.state;
|
||||||
this.state;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={style.topbarWrapper}>
|
<div className={style.topbarWrapper}>
|
||||||
|
|
@ -257,11 +229,9 @@ export class TopBar extends React.Component {
|
||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={6}>
|
||||||
<Col span={8}>
|
|
||||||
{getLabel(547294, labelData)}:
|
{getLabel(547294, labelData)}:
|
||||||
<TreeSelect
|
<TreeSelect
|
||||||
key={treeKey}
|
|
||||||
treeDataSimpleMode
|
treeDataSimpleMode
|
||||||
allowClear
|
allowClear
|
||||||
style={{ width: '65%' }}
|
style={{ width: '65%' }}
|
||||||
|
|
@ -274,7 +244,7 @@ export class TopBar extends React.Component {
|
||||||
treeIcon
|
treeIcon
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={5}>
|
<Col span={6}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
style={{ marginTop: '5px', marginLeft: 100 }}
|
style={{ marginTop: '5px', marginLeft: 100 }}
|
||||||
checked={this.state.requestData.hidedept == '1'}
|
checked={this.state.requestData.hidedept == '1'}
|
||||||
|
|
@ -296,7 +266,7 @@ export class TopBar extends React.Component {
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={5}>
|
<Col span={6}>
|
||||||
{getLabel(547299, labelData)}:
|
{getLabel(547299, labelData)}:
|
||||||
<Select
|
<Select
|
||||||
defaultValue="3"
|
defaultValue="3"
|
||||||
|
|
@ -334,8 +304,7 @@ export class TopBar extends React.Component {
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={16}>
|
||||||
<Col span={10}>
|
|
||||||
{this.state.requestData.fclass == '0' && (
|
{this.state.requestData.fclass == '0' && (
|
||||||
<span>
|
<span>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
|
|
@ -375,8 +375,6 @@ export default function companyPage() {
|
||||||
hidedept: '0',
|
hidedept: '0',
|
||||||
};
|
};
|
||||||
topbar.handleFormChange({ ...resetParams });
|
topbar.handleFormChange({ ...resetParams });
|
||||||
//根节点初始化
|
|
||||||
topbar.handleTreeData([], timeline.id);
|
|
||||||
topbar.getNodeTreeNode(
|
topbar.getNodeTreeNode(
|
||||||
`/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${fclass}&id=${timeline.id}`,
|
`/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${fclass}&id=${timeline.id}`,
|
||||||
false,
|
false,
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ export default function userPage() {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.cookie =
|
document.cookie =
|
||||||
'ecology_JSessionid=aaaLiDqzA0rZHgPBdxGez; JSESSIONID=aaaLiDqzA0rZHgPBdxGez; Systemlanguid=7; languageidweaver=7; loginuuids=1; loginidweaver=sysadmin; __randcode__=7b9b3b9b-a780-4d6a-b8d5-22d0f8aaf11a';
|
'ecology_JSessionid=aaaPm-xDlJJ8TfnuUaoiz; JSESSIONID=aaaPm-xDlJJ8TfnuUaoiz; Systemlanguid=7; languageidweaver=7; loginuuids=1; __randcode__=0bceea6f-1b5a-4026-a716-852e0fd9eb32; 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…
Reference in New Issue