| | |
| | | if (modaltype === 'columns' || modaltype === 'colspan') { |
| | | this.columnFormRef.handleConfirm().then(res => { |
| | | let fieldrepet = false // 字段重复 |
| | | let labelrepet = false // 提示文字重复 |
| | | let rowspanLabel = '' // 已存在的行合并字段 |
| | | |
| | | _columnlist = _columnlist.filter(item => !item.origin || item.uuid === res.uuid) // 去除初始列 |
| | | _columnlist = _columnlist.map(item => { |
| | | if (item.uuid !== res.uuid && res.field && item.field) { |
| | | if (item.field === res.field) { |
| | | fieldrepet = true |
| | | } else if (item.label === res.label) { |
| | | labelrepet = true |
| | | } else if (res.rowspan === 'true' && item.rowspan === 'true') { |
| | | rowspanLabel = item.label |
| | | } |
| | | } |
| | | |
| | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: this.state.dict['model.field.exist'] + ' !', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (labelrepet) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: this.state.dict['model.name.exist'] + ' !', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (rowspanLabel) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: `已存在行合并字段《${rowspanLabel}》!`, |
| | | duration: 5 |
| | | }) |
| | | return |