Merge pull request 'feature/cl' (#8) from feature/cl into master
Reviewed-on: http://221.226.25.34:3000/liang.cheng/org-chart-frant/pulls/8
This commit is contained in:
commit
2a5628765e
|
|
@ -311,7 +311,7 @@ export default class DrawerComponents extends React.Component {
|
|||
changeDetail = () => {
|
||||
const { detailType, params } = this.state;
|
||||
let type = detailType == 'chart' ? 'table' : 'chart';
|
||||
const showJob = params.fclass == '0' ? '1' : '0';
|
||||
const showJob = this.state.showJob ? '1' : '0';
|
||||
this.setState({
|
||||
detailType: type,
|
||||
});
|
||||
|
|
@ -342,7 +342,7 @@ export default class DrawerComponents extends React.Component {
|
|||
return (
|
||||
<Drawer
|
||||
title="详细信息"
|
||||
width={1000}
|
||||
width={1100}
|
||||
onClose={this.onClose}
|
||||
open={open}
|
||||
bodyStyle={{
|
||||
|
|
@ -397,7 +397,22 @@ export default class DrawerComponents extends React.Component {
|
|||
</Spin>
|
||||
)
|
||||
) : (
|
||||
<Table dataSource={dataSource} columns={columns} />
|
||||
<div style={{ padding: '0 20px' }}>
|
||||
<Table
|
||||
dataSource={dataSource}
|
||||
columns={columns}
|
||||
scroll={{ y: 500 }}
|
||||
pagination={{
|
||||
locale: {
|
||||
// 翻页文本替换
|
||||
items_per_page: '条/页',
|
||||
jump_to: '跳至',
|
||||
page: '页',
|
||||
},
|
||||
showTotal: (total) => `共 ${dataSource.length} 条`,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</Drawer>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,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 } from '@ant-design/icons';
|
||||
moment.locale('zh-cn');
|
||||
|
||||
export class TopBar extends React.Component {
|
||||
|
|
@ -29,6 +30,7 @@ export class TopBar extends React.Component {
|
|||
this.state = {
|
||||
fclasslist: [],
|
||||
rootTreeData: [], //根节点异步树
|
||||
treeLoadedKeys: [],
|
||||
treeExpandedKeys: [],
|
||||
requestData: {
|
||||
fclass: '0',
|
||||
|
|
@ -65,10 +67,6 @@ export class TopBar extends React.Component {
|
|||
return message.error('请填写描述信息');
|
||||
}
|
||||
this.setState({ confirmLoading: true });
|
||||
// setTimeout(() => {
|
||||
// this.setState({ open: false, confirmLoading: false, description: '' });
|
||||
// message.success('版本记录成功,请重新刷新页面');
|
||||
// }, 2000);
|
||||
let api =
|
||||
'/api/bs/hrmorganization/orgchart/versionRecord?fclass=' +
|
||||
requestData.fclass +
|
||||
|
|
@ -81,7 +79,6 @@ export class TopBar extends React.Component {
|
|||
this.setState({
|
||||
open: false,
|
||||
confirmLoading: false,
|
||||
description: '',
|
||||
});
|
||||
message.success('版本记录成功,请重新刷新页面', 2, 3);
|
||||
} else {
|
||||
|
|
@ -114,6 +111,9 @@ export class TopBar extends React.Component {
|
|||
} else {
|
||||
arr = [...data.companyTree];
|
||||
}
|
||||
arr.map((item, index) => {
|
||||
item.icon = <HomeOutlined />;
|
||||
});
|
||||
this.setState({
|
||||
rootTreeData: arr,
|
||||
});
|
||||
|
|
@ -128,7 +128,7 @@ export class TopBar extends React.Component {
|
|||
*/
|
||||
onRootLoadData = (treeNode) =>
|
||||
new Promise((resolve) => {
|
||||
const { id } = treeNode.props;
|
||||
const { id } = treeNode;
|
||||
setTimeout(() => {
|
||||
const { fclass } = this.state.requestData;
|
||||
let api =
|
||||
|
|
@ -160,6 +160,9 @@ export class TopBar extends React.Component {
|
|||
fetch(url)
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
data.companyTree.map((item, index) => {
|
||||
item.icon = <HomeOutlined />;
|
||||
});
|
||||
this.setState({
|
||||
fclasslist: data.fclasslist,
|
||||
rootTreeData: data.companyTree,
|
||||
|
|
@ -185,7 +188,7 @@ export class TopBar extends React.Component {
|
|||
|
||||
render() {
|
||||
const { disabled, type } = this.props;
|
||||
const { rootTreeData, open, confirmLoading } = this.state;
|
||||
const { rootTreeData, open, confirmLoading, treeExpandedKeys } = this.state;
|
||||
|
||||
return (
|
||||
<div className={style.topbarWrapper}>
|
||||
|
|
@ -205,6 +208,9 @@ export class TopBar extends React.Component {
|
|||
hidedept: '0',
|
||||
};
|
||||
this.handleFormChange(requestData);
|
||||
this.setState({
|
||||
rootTreeData: [],
|
||||
});
|
||||
this.getNodeTreeNode(
|
||||
`/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${value}`,
|
||||
false,
|
||||
|
|
@ -231,6 +237,7 @@ export class TopBar extends React.Component {
|
|||
onChange={this.onRootChange}
|
||||
loadData={this.onRootLoadData}
|
||||
treeData={rootTreeData}
|
||||
treeIcon
|
||||
/>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ export default function companyPage() {
|
|||
if (d.data.ftype == 0) {
|
||||
return 220;
|
||||
} else if (d.data.ftype == 1) {
|
||||
return 160;
|
||||
return 144;
|
||||
} else if (d.data.ftype == 2) {
|
||||
return 144;
|
||||
}
|
||||
|
|
@ -448,7 +448,7 @@ export default function companyPage() {
|
|||
handleChange(requestData);
|
||||
}}
|
||||
type="company"
|
||||
url="/api/bs/hrmorganization/orgchart/getCondition?fclass=0&type=company"
|
||||
url="/api/bs/hrmorganization/orgchart/getCondition?fclass=0&type=company&id=0"
|
||||
/>
|
||||
<ToolBar
|
||||
onTopLayoutClick={(progressBtn) => handleTopLayoutClick(progressBtn)}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: Chengliang 1546584672@qq.com
|
||||
* @Date: 2023-09-11 15:33:27
|
||||
* @LastEditors: Chengliang 1546584672@qq.com
|
||||
* @LastEditTime: 2023-09-13 17:49:16
|
||||
* @LastEditTime: 2023-09-15 11:39:05
|
||||
* @FilePath: /org-chart-frant/src/pages/statisticsTable.jsx
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
|
|
@ -81,7 +81,20 @@ const StatisticsTable = () => {
|
|||
return (
|
||||
<>
|
||||
<div style={{ padding: '50px' }}>
|
||||
<Table dataSource={dataSource} columns={columns} loading={loading} />;
|
||||
<Table
|
||||
dataSource={dataSource}
|
||||
columns={columns}
|
||||
loading={loading}
|
||||
pagination={{
|
||||
locale: {
|
||||
items_per_page: '条/页',
|
||||
jump_to: '跳至',
|
||||
page: '页',
|
||||
},
|
||||
showTotal: (total) => `共 ${dataSource.length} 条`,
|
||||
}}
|
||||
/>
|
||||
;
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export default function userPage() {
|
|||
// 获取数据
|
||||
useEffect(() => {
|
||||
document.cookie =
|
||||
'ecology_JSessionid=aaaQRFwOgYRXPc88EZiQy; JSESSIONID=aaaQRFwOgYRXPc88EZiQy; Systemlanguid=7; languageidweaver=7; loginuuids=1; loginidweaver=sysadmin; __randcode__=0418808b-1045-4624-bea6-5b308360da7b';
|
||||
'ecology_JSessionid=aaahTt6JHXEIM-HoSW-Xy; JSESSIONID=aaahTt6JHXEIM-HoSW-Xy; Systemlanguid=7; languageidweaver=7; loginuuids=2773; __randcode__=a8294fa0-56d7-430f-a35b-139d73474682; loginidweaver=zhangxy16';
|
||||
d3.json(
|
||||
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
|
||||
).then((data) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue