| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Icon, Select } from 'antd' |
| | | import { Form, Row, Col, Input, Icon, Select, Radio } from 'antd' |
| | | |
| | | // import { formRule } from '@/utils/option.js' |
| | | import './index.scss' |
| | | |
| | | class SettingForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | tab: PropTypes.object, // 数据源配置 |
| | | inputSubmit: PropTypes.func // 回车事件 |
| | | dict: PropTypes.object, |
| | | setting: PropTypes.object, |
| | | tab: PropTypes.object, |
| | | inputSubmit: PropTypes.func |
| | | } |
| | | |
| | | state = {roleList: []} |
| | | state = {roleList: [], appType: sessionStorage.getItem('appType')} |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { tab } = this.props |
| | | const { tab, setting } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { roleList } = this.state |
| | | const { roleList, appType } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {appType === 'mob' && setting.position === 'top' && setting.display === 'inline-block' ? <Col span={24}> |
| | | <Form.Item label="搜索"> |
| | | {getFieldDecorator('hasSearch', { |
| | | initialValue: tab.hasSearch || 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="false">无</Radio> |
| | | <Radio value="icon">有</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={24}> |
| | | <Form.Item label="黑名单"> |
| | | {getFieldDecorator('blacklist', { |