| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Tabs, Row, Col, Radio, Table, Icon, Select, notification } from 'antd' |
| | | import { Form, Tabs, Row, Col, Radio, Table, Icon, Select, notification, Input } from 'antd' |
| | | |
| | | import ActionForm from './actionform' |
| | | import ColumnForm from './columnform' |
| | |
| | | this.props.handleconfig(config.uuid, subconfig) |
| | | } |
| | | |
| | | changeEasyCode = ({ target: { value } }) => { |
| | | const { config } = this.props |
| | | let subconfig = JSON.parse(JSON.stringify(this.state.subconfig)) |
| | | |
| | | subconfig.easyCode = value |
| | | |
| | | this.setState({ |
| | | subconfig: subconfig |
| | | }) |
| | | this.props.handleconfig(config.uuid, subconfig) |
| | | } |
| | | |
| | | render() { |
| | | const { config } = this.props |
| | |
| | | <TabPane tab="基础设置" key="1"> |
| | | <Form {...formItemLayout}> |
| | | <Row gutter={24}> |
| | | {config.type === 'main' ? <Col span={8}> |
| | | <Form.Item label="固定按钮"> |
| | | <Radio.Group defaultValue={config.setting.actionfixed ? 'true' : 'false'} onChange={this.changebtnfix}> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group> |
| | | {config.type === 'main' ? <Col span={9}> |
| | | <Form.Item label="助记码"> |
| | | <Input defaultValue={config.easyCode} placeholder="" autoComplete="off" onChange={this.changeEasyCode}/> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {config.type === 'main' ? <Col span={8}> |
| | | <Form.Item label="固定表头"> |
| | | <Radio.Group defaultValue={config.setting.columnfixed ? 'true' : 'false'} onChange={this.changecolfix}> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={8}> |
| | | <Col span={9}> |
| | | <Form.Item label="表格属性"> |
| | | <Select defaultValue={config.setting.tableType} onChange={this.changecheckbox}> |
| | | <Select.Option value="">不可选</Select.Option> |
| | |
| | | </Select> |
| | | </Form.Item> |
| | | </Col> |
| | | {config.type === 'main' ? <Col span={9}> |
| | | <Form.Item label="固定按钮"> |
| | | <Radio.Group defaultValue={config.setting.actionfixed ? 'true' : 'false'} onChange={this.changebtnfix}> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {config.type === 'main' ? <Col span={9}> |
| | | <Form.Item label="固定表头"> |
| | | <Radio.Group defaultValue={config.setting.columnfixed ? 'true' : 'false'} onChange={this.changecolfix}> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Row> |
| | | </Form> |
| | | </TabPane> |