|
|
@ -225,6 +225,7 @@ |
|
|
|
@cancel="editEnabled = {};" |
|
|
|
@cancel="editEnabled = {};" |
|
|
|
@update="onCellValueChange(col, row, columnObj, false)" |
|
|
|
@update="onCellValueChange(col, row, columnObj, false)" |
|
|
|
@blur="onCellValueChange(col, row, columnObj, true)" |
|
|
|
@blur="onCellValueChange(col, row, columnObj, true)" |
|
|
|
|
|
|
|
@input="unsaved = true" |
|
|
|
@navigateToNext="navigateToNext" |
|
|
|
@navigateToNext="navigateToNext" |
|
|
|
@navigateToPrev="navigateToPrev" |
|
|
|
@navigateToPrev="navigateToPrev" |
|
|
|
/> |
|
|
|
/> |
|
|
@ -343,7 +344,8 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
aggCount: [], |
|
|
|
aggCount: [], |
|
|
|
dragOver: false, |
|
|
|
dragOver: false, |
|
|
|
gridViewCols: {} |
|
|
|
gridViewCols: {}, |
|
|
|
|
|
|
|
unsaved: false |
|
|
|
}), |
|
|
|
}), |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
selectAll: { |
|
|
|
selectAll: { |
|
|
@ -419,6 +421,15 @@ export default { |
|
|
|
document.addEventListener('keydown', this.onKeyDown) |
|
|
|
document.addEventListener('keydown', this.onKeyDown) |
|
|
|
this.loadGridViewCols() |
|
|
|
this.loadGridViewCols() |
|
|
|
this.xcAuditModelCommentsCount() |
|
|
|
this.xcAuditModelCommentsCount() |
|
|
|
|
|
|
|
const self = this |
|
|
|
|
|
|
|
window.addEventListener('beforeunload', function() { |
|
|
|
|
|
|
|
if (self.unsaved) { |
|
|
|
|
|
|
|
if (self.editEnabled.row != null && self.editEnabled.row != null) { |
|
|
|
|
|
|
|
const columnObj = self.availableColumns[self.editEnabled.col] |
|
|
|
|
|
|
|
self.onCellValueChange(self.editEnabled.col, self.editEnabled.row, columnObj, true) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
|
beforeDestroy() { |
|
|
|
document.removeEventListener('keydown', this.onKeyDown) |
|
|
|
document.removeEventListener('keydown', this.onKeyDown) |
|
|
@ -648,6 +659,9 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
onCellValueChange(col, row, column, saved) { |
|
|
|
onCellValueChange(col, row, column, saved) { |
|
|
|
this.$emit('onCellValueChange', col, row, column, saved) |
|
|
|
this.$emit('onCellValueChange', col, row, column, saved) |
|
|
|
|
|
|
|
if (saved) { |
|
|
|
|
|
|
|
this.unsaved = false |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
navigateToNext() { |
|
|
|
navigateToNext() { |
|
|
|
if (this.selected.row < this.rowLength - 1) { |
|
|
|
if (this.selected.row < this.rowLength - 1) { |
|
|
|