king
2021-03-24 abe57d274e6b12c3612788e0be3d1b9201852ebd
src/menu/components/form/wrapsetting/settingform/index.jsx
@@ -2,7 +2,10 @@
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Radio, Tooltip, Icon, InputNumber, Select } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const ColorSketch = asyncComponent(() => import('@/mob/colorsketch'))
class SettingForm extends Component {
  static propTpyes = {
@@ -53,7 +56,7 @@
  }
  render() {
    const { wrap } = this.props
    const { wrap, config } = this.props
    const { getFieldDecorator } = this.props.form
    const { roleList } = this.state
@@ -126,6 +129,39 @@
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="表单加载时的状态,当字段值与表单组的状态值一致时,启用对应的表单组。">
                  <Icon type="question-circle" />
                  状态控制
                </Tooltip>
              }>
                {getFieldDecorator('statusControl', {
                  initialValue: wrap.statusControl || ''
                })(
                  <Select>
                    <Select.Option key='' value={''}>无</Select.Option>
                    {config.columns.map(option =>
                      <Select.Option key={option.uuid} value={option.field}>{option.label}</Select.Option>
                    )}
                  </Select>
                )}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label={
                <Tooltip placement="topLeft" title="完成后的颜色">
                  <Icon type="question-circle" />
                  颜色控制
                </Tooltip>
              }>
                {getFieldDecorator('color', {
                  initialValue: wrap.color || '#1890ff'
                })(
                  <ColorSketch />
                )}
              </Form.Item>
            </Col>
            <Col span={12}>
              <Form.Item label="黑名单">
                {getFieldDecorator('blacklist', {
                  initialValue: wrap.blacklist || []