| | |
| | | } |
| | | |
| | | let _groups = null |
| | | let fieldrepet = false // 字段重复 |
| | | |
| | | if (card.iscopy) { |
| | | _groups = config.groups.map(group => { |
| | |
| | | group.sublist.forEach((item, index) => { |
| | | if (item.uuid === card.originUuid) { |
| | | _index = index |
| | | } |
| | | |
| | | if (item.uuid !== res.uuid && item.field === res.field) { |
| | | fieldrepet = true |
| | | } |
| | | }) |
| | | |
| | |
| | | } else { |
| | | _groups = config.groups.map(group => { |
| | | group.sublist = group.sublist.map(item => { |
| | | if (item.uuid !== res.uuid && item.field === res.field) { |
| | | fieldrepet = true |
| | | } |
| | | |
| | | if (item.uuid === res.uuid) { |
| | | return res |
| | | } else { |
| | |
| | | }) |
| | | } |
| | | |
| | | if (fieldrepet) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '字段名重复!', |
| | | duration: 10 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | this.setState({ |
| | | config: {...config, groups: _groups}, |
| | | optionLibs: optionLibs, |