| | |
| | | multiselectChange = (key, value, options) => { |
| | | if (key === 'linkSubField') { |
| | | let arr = [] |
| | | let linkSubFields = options.filter(option => { |
| | | let linkSubField = {} |
| | | options.forEach(option => { |
| | | if (!['Value', 'Text'].includes(option.field) && value.includes(option.field) && !arr.includes(option.field)) { |
| | | arr.push(option.field) |
| | | return true |
| | | } else { |
| | | return false |
| | | linkSubField[option.field] = option |
| | | } |
| | | }) |
| | | |
| | | let linkSubFields = [] |
| | | value.forEach(item => { |
| | | if (linkSubField[item]) { |
| | | linkSubFields.push(linkSubField[item]) |
| | | } |
| | | }) |
| | | |
| | |
| | | } else if (item.type === 'options') { |
| | | fields.push( |
| | | <Col span={20} offset={4} key={index}> |
| | | <EditTable data={item.initVal} type={this.state.openType} linkSubFields={this.state.linkSubFields} ref="editTable"/> |
| | | <EditTable data={item.initVal} dict={this.props.dict} type={this.state.openType} linkSubFields={this.state.linkSubFields} ref="editTable"/> |
| | | </Col> |
| | | ) |
| | | } |