| | |
| | | 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({ |