|
|
@ -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}>
|
|
|
@ -228,6 +200,7 @@ export class TopBar extends React.Component {
|
|
|
|
<Col span={6}>
|
|
|
|
<Col span={6}>
|
|
|
|
{getLabel(547293, labelData)}:
|
|
|
|
{getLabel(547293, labelData)}:
|
|
|
|
<Select
|
|
|
|
<Select
|
|
|
|
|
|
|
|
disabled
|
|
|
|
defaultValue="0"
|
|
|
|
defaultValue="0"
|
|
|
|
style={{ width: 140 }}
|
|
|
|
style={{ width: 140 }}
|
|
|
|
value={this.state.requestData.fclass}
|
|
|
|
value={this.state.requestData.fclass}
|
|
|
@ -257,11 +230,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%' }}
|
|
|
@ -273,16 +244,20 @@ export class TopBar extends React.Component {
|
|
|
|
treeData={rootTreeData}
|
|
|
|
treeData={rootTreeData}
|
|
|
|
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'}
|
|
|
|
onChange={(e) =>
|
|
|
|
onChange={(e) => {
|
|
|
|
this.handleFormChange({
|
|
|
|
this.handleFormChange({
|
|
|
|
hidedept: e.target.checked ? '1' : '0',
|
|
|
|
hidedept: e.target.checked ? '1' : '0',
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
this.props.onSearch({
|
|
|
|
|
|
|
|
...this.state.requestData,
|
|
|
|
|
|
|
|
hidedept: e.target.checked ? '1' : '0',
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{getLabel(547296, labelData)}
|
|
|
|
{getLabel(547296, labelData)}
|
|
|
|
</Checkbox>
|
|
|
|
</Checkbox>
|
|
|
@ -296,7 +271,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"
|
|
|
@ -309,10 +284,10 @@ export class TopBar extends React.Component {
|
|
|
|
<Option value="3">{getLabel(547464, labelData)}</Option>
|
|
|
|
<Option value="3">{getLabel(547464, labelData)}</Option>
|
|
|
|
<Option value="4">{getLabel(547465, labelData)}</Option>
|
|
|
|
<Option value="4">{getLabel(547465, labelData)}</Option>
|
|
|
|
</Select>
|
|
|
|
</Select>
|
|
|
|
</Col>
|
|
|
|
</Col> */}
|
|
|
|
</Row>
|
|
|
|
{/* </Row> */}
|
|
|
|
<Row style={{ marginTop: '15px' }}>
|
|
|
|
{/* <Row style={{ marginTop: '15px' }}> */}
|
|
|
|
<Col span={6}>
|
|
|
|
{/* <Col span={6}>
|
|
|
|
<Checkbox
|
|
|
|
<Checkbox
|
|
|
|
style={{ marginTop: '5px' }}
|
|
|
|
style={{ marginTop: '5px' }}
|
|
|
|
checked={this.state.requestData.fisvitual == '1'}
|
|
|
|
checked={this.state.requestData.fisvitual == '1'}
|
|
|
@ -333,9 +308,8 @@ export class TopBar extends React.Component {
|
|
|
|
style={{ color: '#0082fb', cursor: 'pointer', fontSize: 16 }}
|
|
|
|
style={{ color: '#0082fb', cursor: 'pointer', fontSize: 16 }}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</Tooltip>
|
|
|
|
</Tooltip>
|
|
|
|
</Col>
|
|
|
|
</Col> */}
|
|
|
|
|
|
|
|
<Col span={12}>
|
|
|
|
<Col span={10}>
|
|
|
|
|
|
|
|
{this.state.requestData.fclass == '0' && (
|
|
|
|
{this.state.requestData.fclass == '0' && (
|
|
|
|
<span>
|
|
|
|
<span>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
@ -365,7 +339,7 @@ export class TopBar extends React.Component {
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{getLabel(547313, labelData)}
|
|
|
|
{getLabel(547313, labelData)}
|
|
|
|
</Button>
|
|
|
|
</Button>{' '}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|