| | |
| | | custom: ['label', 'type', 'Align', 'Width', 'blacklist', 'IsSort'], |
| | | action: ['label', 'type', 'Align', 'Width'], |
| | | formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'], |
| | | extend: ['label', 'field', 'type', 'Align', 'Width', 'colUnit', 'shift', 'quota', 'supField'], |
| | | index: ['label', 'type', 'Align', 'Width'] |
| | | } |
| | | |
| | |
| | | |
| | | if (this.record.type === 'text' || this.record.type === 'number') { |
| | | if (this.record.perspective === 'linkmenu') { |
| | | _options.push('linkmenu', 'linkfields', 'open') |
| | | _options.push('linkmenu', 'open') |
| | | } else if (this.record.perspective === 'linkurl') { |
| | | _options.push('linkurl', 'linkfields', 'open') |
| | | } |
| | |
| | | _options.push('decimal') |
| | | } else if (this.record.type === 'custom' && this.record.IsSort === 'true') { |
| | | _options.push('sortField') |
| | | } else if (this.record.type === 'extend') { |
| | | if (this.record.colUnit === 'day') { |
| | | _options.push('dayFormat') |
| | | } else { |
| | | _options.push('hourFormat') |
| | | } |
| | | } |
| | | |
| | | if (this.record.Hide !== 'true') { |
| | |
| | | } |
| | | } else if (key === 'format' && value === 'percent') { |
| | | this.props.form.setFieldsValue({postfix: '%'}) |
| | | } else if (['perspective', 'eval', 'IsSort', 'textFormat'].includes(key)) { |
| | | } else if (['perspective', 'eval', 'IsSort', 'textFormat', 'colUnit'].includes(key)) { |
| | | let _options = this.getOptions() |
| | | |
| | | this.setState({ |
| | |
| | | if (item.hidden || item.forbid) return |
| | | |
| | | if (item.type === 'text') { |
| | | let rules = [] |
| | | let rules = item.rules || [] |
| | | if (item.key !== 'linkurl') { |
| | | rules = [{ |
| | | rules.push({ |
| | | max: formRule.input.max, |
| | | message: formRule.input.message |
| | | }] |
| | | }) |
| | | } |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'cascader') { // 多选 |
| | | } else if (item.type === 'cascader') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.label}> |