| | |
| | | text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'editable', 'initval', 'blacklist'], |
| | | number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'editable', 'initval', 'sum', 'blacklist'], |
| | | textarea: ['label', 'field', 'type', 'Align', 'Hide', 'Width', 'prefix', 'initval', 'postfix', 'blacklist'], |
| | | custom: ['label', 'type', 'Align', 'Width', 'blacklist'], |
| | | custom: ['label', 'type', 'Align', 'Width', 'blacklist', 'IsSort'], |
| | | colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'], |
| | | action: ['label', 'type', 'Align', 'Width'], |
| | | formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'], |
| | |
| | | } |
| | | if (this.record.type === 'formula' && this.record.eval === 'true') { |
| | | _options.push('decimal') |
| | | } else if (this.record.type === 'custom' && this.record.IsSort === 'true') { |
| | | _options.push('sortField') |
| | | } |
| | | if (['number', 'formula'].includes(this.record.type) && this.record.Hide !== 'true') { |
| | | _options.push('noValue') |
| | |
| | | this.record[key] = value |
| | | |
| | | if (key === 'type') { |
| | | if (['textarea', 'custom'].includes(value)) { |
| | | this.record.IsSort = 'false' |
| | | } |
| | | |
| | | let _options = this.getOptions() |
| | | |
| | | let _field = '' |
| | |
| | | return item |
| | | }) |
| | | }, () => { |
| | | if (value === 'colspan') { |
| | | if (['textarea', 'custom'].includes(value)) { |
| | | this.props.form.setFieldsValue({IsSort: 'false'}) |
| | | } else if (value === 'colspan') { |
| | | this.props.form.setFieldsValue({Align: 'center'}) |
| | | } else if (value === 'formula' && _field) { |
| | | this.props.form.setFieldsValue({formula: '@' + _field + '@'}) |
| | |
| | | } |
| | | } else if (key === 'format' && value === 'percent') { |
| | | this.props.form.setFieldsValue({postfix: '%'}) |
| | | } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide'].includes(key)) { |
| | | } else if (['editable', 'editType', 'resourceType', 'ctrlField', 'eval', 'Hide', 'IsSort'].includes(key)) { |
| | | let _options = this.getOptions() |
| | | |
| | | this.setState({ |