Compare commits
2 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
75f1405f2b | |
|
|
8002a59afd |
|
|
@ -34,7 +34,7 @@ export default class DrawerComponents extends React.Component {
|
|||
dataSource: [],
|
||||
columns: [],
|
||||
spinning: true,
|
||||
showJob: false,
|
||||
showJob: true,
|
||||
defaultTypeValue: ['isBelongTo'],
|
||||
defaultStatusValue: [0, 1, 2, 3],
|
||||
disabled: false,
|
||||
|
|
@ -81,7 +81,6 @@ export default class DrawerComponents extends React.Component {
|
|||
'/api/bs/hrmorganization/orgchart/getDepartmentDetail?' +
|
||||
qs.stringify({ detauleType: type, ...params, showJob }),
|
||||
).then((data) => {
|
||||
//
|
||||
if (type == 'chart') {
|
||||
this.setState({ data: data.data, spinning: false });
|
||||
} else {
|
||||
|
|
@ -245,6 +244,7 @@ export default class DrawerComponents extends React.Component {
|
|||
*/
|
||||
nodeContentRender = (d, i, arr, state) => {
|
||||
const { labelData } = this.props;
|
||||
let bkStyle = d.data.keyJob == 0 ? 'none' : 'block';
|
||||
|
||||
if (d.data.ftype == 2) {
|
||||
return `<div style="position: relative;">
|
||||
|
|
@ -271,6 +271,7 @@ export default class DrawerComponents extends React.Component {
|
|||
d.data.fonjob
|
||||
} ${getLabel(547525, labelData)}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -292,6 +293,12 @@ export default class DrawerComponents extends React.Component {
|
|||
d.data.fonjob
|
||||
} ${getLabel(547525, labelData)}</span>
|
||||
</div>
|
||||
<div style="display: ${bkStyle}">
|
||||
<div>是否关键岗:${
|
||||
d.data.keyJob == 0 ? '否' : '是'
|
||||
}</div>
|
||||
<div>backup人员:${d.data.bkPerson}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
|
@ -335,7 +342,7 @@ export default class DrawerComponents extends React.Component {
|
|||
typeValue: defaultTypeValue.join(','),
|
||||
statusValue: defaultStatusValue.join(','),
|
||||
};
|
||||
this.getDeatilDatas(params, 'chart', '0');
|
||||
this.getDeatilDatas(params, 'chart', '1');
|
||||
this.setState({ open: true, params: params });
|
||||
};
|
||||
|
||||
|
|
@ -343,7 +350,7 @@ export default class DrawerComponents extends React.Component {
|
|||
this.setState({
|
||||
open: false,
|
||||
detailType: 'chart',
|
||||
showJob: false,
|
||||
showJob: true,
|
||||
defaultStatusValue: [0, 1, 2, 3],
|
||||
defaultTypeValue: ['isBelongTo'],
|
||||
disabled: false,
|
||||
|
|
@ -463,6 +470,7 @@ export default class DrawerComponents extends React.Component {
|
|||
checked={showJob}
|
||||
disabled={disabled}
|
||||
onChange={(e) => {
|
||||
debugger;
|
||||
this.setState({
|
||||
showJob: e.target.checked,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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,7 +22,7 @@ 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 } from '@ant-design/icons';
|
||||
moment.locale('zh-cn');
|
||||
import { getLabel } from '../../util/i18n.js';
|
||||
import { SmileOutlined } from '@ant-design/icons';
|
||||
|
|
@ -45,8 +45,6 @@ export class TopBar extends React.Component {
|
|||
open: false,
|
||||
confirmLoading: false,
|
||||
description: '',
|
||||
timelineId: '0',
|
||||
treeKey: 1,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -59,29 +57,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;
|
||||
};
|
||||
|
||||
/**
|
||||
* 弹窗确认
|
||||
*/
|
||||
|
|
@ -138,9 +117,6 @@ export class TopBar extends React.Component {
|
|||
}
|
||||
arr.map((item, index) => {
|
||||
item.icon = <HomeOutlined />;
|
||||
if (item.type == 2) {
|
||||
item.icon = <FolderOutlined />;
|
||||
}
|
||||
});
|
||||
this.setState({
|
||||
rootTreeData: arr,
|
||||
|
|
@ -159,14 +135,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);
|
||||
|
|
@ -219,8 +192,7 @@ 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}>
|
||||
|
|
@ -257,11 +229,9 @@ export class TopBar extends React.Component {
|
|||
))}
|
||||
</Select>
|
||||
</Col>
|
||||
|
||||
<Col span={8}>
|
||||
<Col span={6}>
|
||||
{getLabel(547294, labelData)}:
|
||||
<TreeSelect
|
||||
key={treeKey}
|
||||
treeDataSimpleMode
|
||||
allowClear
|
||||
style={{ width: '65%' }}
|
||||
|
|
@ -274,7 +244,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 +266,7 @@ export class TopBar extends React.Component {
|
|||
/>
|
||||
</Tooltip>
|
||||
</Col>
|
||||
<Col span={5}>
|
||||
<Col span={6}>
|
||||
{getLabel(547299, labelData)}:
|
||||
<Select
|
||||
defaultValue="3"
|
||||
|
|
@ -334,8 +304,7 @@ export class TopBar extends React.Component {
|
|||
/>
|
||||
</Tooltip>
|
||||
</Col>
|
||||
|
||||
<Col span={10}>
|
||||
<Col span={16}>
|
||||
{this.state.requestData.fclass == '0' && (
|
||||
<span>
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -375,8 +375,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,
|
||||
|
|
|
|||
|
|
@ -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=aaaPm-xDlJJ8TfnuUaoiz; JSESSIONID=aaaPm-xDlJJ8TfnuUaoiz; Systemlanguid=7; languageidweaver=7; loginuuids=1; __randcode__=0bceea6f-1b5a-4026-a716-852e0fd9eb32; loginidweaver=sysadmin';
|
||||
d3.json(
|
||||
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
|
||||
).then((data) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue