| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Radio, Select, Tooltip } from 'antd' |
| | | import { Form, Row, Col, Input, Radio, Tooltip } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | } |
| | | |
| | | state = { |
| | | roleList: [], |
| | | // roleList: [], |
| | | type: this.props.config.setting.type || 'title' |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | if (roleList) { |
| | | try { |
| | | roleList = JSON.parse(roleList) |
| | | } catch (e) { |
| | | roleList = [] |
| | | } |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | // let roleList = sessionStorage.getItem('sysRoles') |
| | | // if (roleList) { |
| | | // try { |
| | | // roleList = JSON.parse(roleList) |
| | | // } catch (e) { |
| | | // roleList = [] |
| | | // } |
| | | // } else { |
| | | // roleList = [] |
| | | // } |
| | | |
| | | this.setState({roleList}) |
| | | // this.setState({roleList}) |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | |
| | | render() { |
| | | const { config } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { type, roleList } = this.state |
| | | const { type } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {type === 'search' ? <Col span={12}> |
| | | {/* 去除移动端字段权限 */} |
| | | {/* {type === 'search' ? <Col span={12}> |
| | | <Form.Item label="黑名单"> |
| | | {getFieldDecorator('blacklist', { |
| | | initialValue: config.setting.blacklist || [] |
| | |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Col> : null} */} |
| | | </Row> |
| | | </Form> |
| | | ) |