diff --git a/src/routes/List/TableList.js b/src/routes/List/TableList.js index 0ca42b2400f65759c8293fed3d5e416a1181748e..0f5ceda7d59568700f5b79c29b76ab8d7d85b61b 100644 --- a/src/routes/List/TableList.js +++ b/src/routes/List/TableList.js @@ -1,6 +1,6 @@ import React, { PureComponent } from 'react'; import { connect } from 'dva'; -import { Card, Form, Input, Select, Icon, Button, Dropdown, Menu, InputNumber, DatePicker, Modal, message } from 'antd'; +import { Row, Col, Card, Form, Input, Select, Icon, Button, Dropdown, Menu, InputNumber, DatePicker, Modal, message } from 'antd'; import StandardTable from '../../components/StandardTable'; import PageHeaderLayout from '../../layouts/PageHeaderLayout'; @@ -152,8 +152,120 @@ export default class TableList extends PureComponent { }); } + renderSimpleForm() { + const { getFieldDecorator } = this.props.form; + return ( +
+ ); + } + + renderAdvancedForm() { + const { getFieldDecorator } = this.props.form; + return ( + + ); + } + + renderForm() { + return this.state.expandForm ? this.renderAdvancedForm() : this.renderSimpleForm(); + } + render() { - const { rule: { loading: ruleLoading, data }, form: { getFieldDecorator } } = this.props; + const { rule: { loading: ruleLoading, data } } = this.props; const { selectedRows, modalVisible, addInputValue } = this.state; const menu = ( @@ -168,50 +280,7 @@ export default class TableList extends PureComponent {