king
2022-05-23 0d63712b03fc8b8542da904b67c6bea133b4f9d8
src/mob/searchconfig/settingform/index.jsx
@@ -1,6 +1,6 @@
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'
@@ -16,23 +16,23 @@
  }
  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 = () => {
@@ -59,7 +59,7 @@
  render() {
    const { config } = this.props
    const { getFieldDecorator } = this.props.form
    const { type, roleList } = this.state
    const { type } = this.state
    const formItemLayout = {
      labelCol: {
@@ -234,7 +234,8 @@
              )}
            </Form.Item>
          </Col>
          {type === 'search' ? <Col span={12}>
          {/* 去除移动端字段权限 */}
          {/* {type === 'search' ? <Col span={12}>
            <Form.Item label="黑名单">
              {getFieldDecorator('blacklist', {
                initialValue: config.setting.blacklist || []
@@ -250,7 +251,7 @@
                </Select>
              )}
            </Form.Item>
          </Col> : null}
          </Col> : null} */}
        </Row>
      </Form>
    )