| | |
| | | |
| | | changeMenu = (record) => { |
| | | let MenuId = record.menu |
| | | if (MenuId === 'IM') { |
| | | if (!sessionStorage.getItem('instantMessage')) return |
| | | |
| | | let param = { |
| | | MenuID: sessionStorage.getItem('instantMessage'), |
| | | copyMenuId: '', |
| | | type: 'view' |
| | | } |
| | | |
| | | param = window.btoa(window.encodeURIComponent(JSON.stringify(param))) |
| | | |
| | | MKEmitter.emit('changeEditMenu', {routerUrl: '/imdesign/' + param}) |
| | | } else { |
| | | MKEmitter.emit('changeEditMenu', { ...record, MenuID: MenuId}) |
| | | } |
| | | MKEmitter.emit('changeEditMenu', { ...record, MenuID: MenuId}) |
| | | } |
| | | |
| | | isEditing = record => record.uuid === this.state.editingKey |
| | |
| | | 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 { |