update 调整大量细节

This commit is contained in:
2021-06-17 17:14:38 +08:00
parent aed7a07e51
commit 5b57785b81
13 changed files with 211 additions and 115 deletions

View File

@@ -1,5 +1,5 @@
import React, { Component } from 'react'
import { Button, Form, List, Pagination, Spin } from 'antd'
import { Button, Form, List, Pagination, Spin, Tooltip } from 'antd'
import { AntIcon } from 'components'
export default class QueryList extends Component {
@@ -148,12 +148,15 @@ export default class QueryList extends Component {
layout="inline"
ref={this.form}
onFinish={(value) => this.onQuery(value)}
initialValues={this.props.queryInitialValues}
>
{query}
<Form.Item>
<Button.Group className="mr-xs">
<Button htmlType="submit" type="primary">查询</Button>
<Button onClick={() => this.onResetQuery()}>重置</Button>
<Button htmlType="submit" type="primary" icon={<AntIcon type="search" />}>查询</Button>
<Tooltip placement="bottom" title="重置查询">
<Button onClick={() => this.onResetQuery()} icon={<AntIcon type="undo" />} />
</Tooltip>
</Button.Group>
{
moreQuery && <Button>更多查询条件</Button>
@@ -181,7 +184,9 @@ export default class QueryList extends Component {
</div>
<div className="yo-action-bar--actions">
<Button.Group>
<Button>刷新</Button>
<Tooltip placement="bottom" title="刷新">
<Button onClick={() => this.onReloadData()} type="text" icon={<AntIcon type="reload" />} />
</Tooltip>
</Button.Group>
</div>
</div>

View File

@@ -40,7 +40,8 @@ export default class QueryTable extends Component {
size: 'small',
showSizeChanger: true,
showQuickJumper: true,
showTotal: (total) => `总共${total}条数据`
showTotal: (total) => `总共${total}条数据`,
position: ['bottomLeft']
}
// 默认选中页码

View File

@@ -86,6 +86,10 @@ export default class QueryTreeLayout extends Component {
this.setState({ loading: false })
}
onReloadData() {
this.onLoadData()
}
onExpand(expandedKeys) {
this.setState({
expandedKeys,
@@ -240,15 +244,26 @@ export default class QueryTreeLayout extends Component {
</div>
</Layout.Header>
<div className="yo-tree-layout--bar">
<Tooltip placement="bottom" title="刷新">
<AntIcon type="undo" onClick={() => this.onReloadData()} />
</Tooltip>
<Tooltip placement="bottom" title="折叠全部">
<AntIcon type="switcher" onClick={() => this.setState({ expandedKeys: [] })} />
</Tooltip>
</div>
<div className="yo-tree-layout--content">
<Spin spinning={this.state.loading} indicator={<AntIcon type="loading" />}>
<Spin spinning={this.state.loading} indicator={<AntIcon type="loading" />} wrapperClassName="h-100-p">
{
!this.state.loading && !this.state.dataSource.length ?
<Empty />
<Empty
image={
<div className="text-center pt-md">
<AntIcon className="h3 mt-xl mb-md" type="smile" />
<p>暂无数据</p>
</div>
}
description={false}
/>
:
<Tree
{...props}