| | |
| | | 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 = { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { wrap } = this.props |
| | | const { wrap, config } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { roleList } = this.state |
| | | |
| | |
| | | </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 || [] |