king
2021-05-08 6afdec0062dacbded57e166230eb22cc55ced0c1
src/templates/sharecomponent/columncomponent/columnform/index.jsx
@@ -5,12 +5,14 @@
import { formRule } from '@/utils/option.js'
import './index.scss'
const { TextArea } = Input
const columnTypeOptions = {
  text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'fieldlength', 'blacklist', 'perspective', 'rowspan'],
  number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'perspective', 'sum', 'rowspan'],
  link: ['label', 'field', 'type', 'nameField', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'fieldlength', 'blacklist'],
  textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'fieldlength', 'blacklist'],
  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'maxHeight']
  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'maxHeight'],
  index: ['label', 'type', 'Align', 'Width']
}
class MainSearch extends Component {
@@ -37,7 +39,7 @@
      if (card.perspective === 'linkmenu') {
        _options.push('linkmenu', 'linkfields')
      } else if (card.perspective === 'linkurl') {
        _options.push('linkurl')
        _options.push('linkurl', 'linkfields')
      }
    }
@@ -77,7 +79,7 @@
        if (card.perspective === 'linkmenu') {
          _options.push('linkmenu', 'linkfields')
        } else if (card.perspective === 'linkurl') {
          _options.push('linkurl')
          _options.push('linkurl', 'linkfields')
        }
      }
@@ -110,7 +112,7 @@
      if (value === 'linkmenu') {
        _options.push('linkmenu', 'linkfields')
      } else if (value === 'linkurl') {
        _options.push('linkurl')
        _options.push('linkurl', 'linkfields')
      }
      this.setState({
@@ -175,6 +177,27 @@
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'textarea') { // 文本搜索
        fields.push(
          <Col span={24} key={index} className="textarea">
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal || '',
                rules: [
                  {
                    required: !!item.required,
                    message: this.props.dict['form.required.input'] + item.label + '!'
                  }
                ]
              })(<TextArea rows={2} disabled={item.readonly} onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'number') {
        fields.push(
          <Col span={12} key={index}>