|
|
@ -1,6 +1,6 @@ |
|
|
import React, { PureComponent } from 'react'; |
|
|
import React, { PureComponent } from 'react'; |
|
|
import { connect } from 'dva'; |
|
|
import { connect } from 'dva'; |
|
|
import { Card, Row, Col, Form, Input, Select, Icon, Button, Dropdown, Menu, InputNumber, DatePicker, Modal, message } from 'antd'; |
|
|
import { Card, Form, Input, Select, Icon, Button, Dropdown, Menu, InputNumber, DatePicker, Modal, message } from 'antd'; |
|
|
import StandardTable from '../../components/StandardTable'; |
|
|
import StandardTable from '../../components/StandardTable'; |
|
|
import PageHeaderLayout from '../../layouts/PageHeaderLayout'; |
|
|
import PageHeaderLayout from '../../layouts/PageHeaderLayout'; |
|
|
|
|
|
|
|
|
@ -156,11 +156,6 @@ export default class TableList extends PureComponent { |
|
|
const { rule: { loading: ruleLoading, data }, form: { getFieldDecorator } } = this.props; |
|
|
const { rule: { loading: ruleLoading, data }, form: { getFieldDecorator } } = this.props; |
|
|
const { selectedRows, modalVisible, addInputValue } = this.state; |
|
|
const { selectedRows, modalVisible, addInputValue } = this.state; |
|
|
|
|
|
|
|
|
const formItemLayout = { |
|
|
|
|
|
labelCol: { xs: 5, sm: 8, lg: 6, xl: 6 }, |
|
|
|
|
|
wrapperCol: { xs: 18, sm: 16, lg: 17, xl: 17 }, |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const menu = ( |
|
|
const menu = ( |
|
|
<Menu onClick={this.handleMenuClick} selectedKeys={[]}> |
|
|
<Menu onClick={this.handleMenuClick} selectedKeys={[]}> |
|
|
<Menu.Item key="remove">删除</Menu.Item> |
|
|
<Menu.Item key="remove">删除</Menu.Item> |
|
|
@ -173,56 +168,47 @@ export default class TableList extends PureComponent { |
|
|
<Card bordered={false}> |
|
|
<Card bordered={false}> |
|
|
<div className={styles.tableList}> |
|
|
<div className={styles.tableList}> |
|
|
<div className={styles.tableListForm}> |
|
|
<div className={styles.tableListForm}> |
|
|
<Form onSubmit={this.handleSearch}> |
|
|
<Form onSubmit={this.handleSearch} layout="inline"> |
|
|
<Row> |
|
|
<div style={{ marginBottom: 16 }}> |
|
|
<Col md={8} sm={12} xs={24}> |
|
|
<FormItem label="规则编号"> |
|
|
<FormItem {...formItemLayout} label="规则编号"> |
|
|
{getFieldDecorator('no')( |
|
|
{getFieldDecorator('no')( |
|
|
<Input placeholder="请输入" style={{ width: 272 }} /> |
|
|
<Input placeholder="请输入" /> |
|
|
)} |
|
|
)} |
|
|
</FormItem> |
|
|
</FormItem> |
|
|
<FormItem label="使用状态"> |
|
|
</Col> |
|
|
{getFieldDecorator('status')( |
|
|
<Col md={8} sm={12} xs={24}> |
|
|
<Select placeholder="请选择" style={{ width: 272 }}> |
|
|
<FormItem {...formItemLayout} label="状态"> |
|
|
<Option value="0">关闭</Option> |
|
|
{getFieldDecorator('status')( |
|
|
<Option value="1">运行中</Option> |
|
|
<Select placeholder="请选择" style={{ width: '100%' }}> |
|
|
</Select> |
|
|
<Option value="0">关闭</Option> |
|
|
)} |
|
|
<Option value="1">运行中</Option> |
|
|
</FormItem> |
|
|
</Select> |
|
|
<span className={styles.formButton}> |
|
|
)} |
|
|
<Button type="primary" htmlType="submit">查询</Button> |
|
|
</FormItem> |
|
|
<Button style={{ marginLeft: 8 }} onClick={this.handleFormReset}>重置</Button> |
|
|
</Col> |
|
|
<a style={{ marginLeft: 8 }} onClick={this.toggleForm}> |
|
|
<Col md={8} sm={12} xs={24} style={{ marginBottom: 24 }}> |
|
|
{this.state.expandForm ? '收起' : '展开'} <Icon type={this.state.expandForm ? 'up' : 'down'} /> |
|
|
<div className={styles.formButton}> |
|
|
</a> |
|
|
<Button type="primary" htmlType="submit">查询</Button> |
|
|
</span> |
|
|
<Button style={{ marginLeft: 8 }} onClick={this.handleFormReset}>重置</Button> |
|
|
</div> |
|
|
<a style={{ marginLeft: 8, fontSize: 12 }} onClick={this.toggleForm}> |
|
|
|
|
|
{this.state.expandForm ? '收起' : '展开'} <Icon type={this.state.expandForm ? 'up' : 'down'} /> |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
</Col> |
|
|
|
|
|
</Row> |
|
|
|
|
|
{ |
|
|
{ |
|
|
this.state.expandForm && ( |
|
|
this.state.expandForm && ( |
|
|
<Row> |
|
|
<div style={{ marginBottom: 16 }}> |
|
|
<Col md={8} sm={12} xs={24}> |
|
|
<FormItem label="更新时间"> |
|
|
<FormItem {...formItemLayout} label="更新时间"> |
|
|
{getFieldDecorator('updatedAt')( |
|
|
{getFieldDecorator('updatedAt')( |
|
|
<DatePicker style={{ width: 272 }} /> |
|
|
<DatePicker style={{ width: '100%' }} /> |
|
|
)} |
|
|
)} |
|
|
</FormItem> |
|
|
</FormItem> |
|
|
<FormItem label="调用次数"> |
|
|
</Col> |
|
|
{getFieldDecorator('callNo')( |
|
|
<Col md={8} sm={12} xs={24}> |
|
|
<InputNumber |
|
|
<FormItem {...formItemLayout} label="调用次数"> |
|
|
prefix={<Icon type="right" />} |
|
|
{getFieldDecorator('callNo')( |
|
|
placeholder="请输入" |
|
|
<InputNumber |
|
|
style={{ width: 272 }} |
|
|
prefix={<Icon type="right" />} |
|
|
/> |
|
|
placeholder="请输入" |
|
|
)} |
|
|
/> |
|
|
</FormItem> |
|
|
)} |
|
|
</div> |
|
|
</FormItem> |
|
|
|
|
|
</Col> |
|
|
|
|
|
</Row> |
|
|
|
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
</Form> |
|
|
</Form> |
|
|
|