| | |
| | | columns.forEach(col => { |
| | | if (col.unique !== true || !unique) return |
| | | |
| | | let _index = newData.findIndex(item => record.uuid !== item.uuid && record[col.dataIndex] === item[col.dataIndex]) |
| | | let _index = newData.findIndex(item => { |
| | | if (record.uuid === item.uuid) return false |
| | | |
| | | if (col.inputType === 'cascader') { |
| | | if (!Array.isArray(record[col.dataIndex]) || !Array.isArray(item[col.dataIndex])) { |
| | | return false |
| | | } |
| | | return record[col.dataIndex].toString() === item[col.dataIndex].toString() |
| | | } |
| | | |
| | | return record[col.dataIndex] === item[col.dataIndex] |
| | | }) |
| | | |
| | | if (_index > -1) { |
| | | notification.warning({ |
| | |
| | | if (_options.length) { |
| | | col.extends.forEach(n => { |
| | | record[n.value] = _options.map(o => o[n.key]).join(' / ') |
| | | |
| | | if (n.mutilLabel && !record[n.mutilLabel]) { |
| | | record[n.mutilLabel] = _options[_options.length - 1][n.key] |
| | | } |
| | | }) |
| | | } |
| | | } else { |