|
|
|
@ -158,7 +158,7 @@ export default {
|
|
|
|
|
}, 500);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
created() { },
|
|
|
|
|
async mounted() {
|
|
|
|
|
// console.log(this.dataPath);
|
|
|
|
|
if (this.gridName) {
|
|
|
|
@ -166,9 +166,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
this.scrollBody = document
|
|
|
|
|
.getElementsByClassName('tui-grid-rside-area')
|
|
|
|
|
[
|
|
|
|
|
document.getElementsByClassName('tui-grid-rside-area').length - 1
|
|
|
|
|
].getElementsByClassName('tui-grid-body-area')[0];
|
|
|
|
|
[
|
|
|
|
|
document.getElementsByClassName('tui-grid-rside-area').length - 1
|
|
|
|
|
].getElementsByClassName('tui-grid-body-area')[0];
|
|
|
|
|
|
|
|
|
|
this.scrollBody.addEventListener('scroll', e => {
|
|
|
|
|
this.gridScrollTop = e.target.scrollTop;
|
|
|
|
@ -344,14 +344,14 @@ export default {
|
|
|
|
|
'row-removed',
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await this.gridInstance.invoke(
|
|
|
|
|
e.rowEditingFg != undefined ? 'setValue' : this.editorGrid ? 'finishEditing' : 'setValue',
|
|
|
|
|
rowIdxKey,
|
|
|
|
|
columnName,
|
|
|
|
|
value,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isBaseRow) {
|
|
|
|
|
const isSameData = await this.compareData(editingData);
|
|
|
|
@ -606,18 +606,20 @@ export default {
|
|
|
|
|
list.map(item => this.gridInstance.invoke('check', item));
|
|
|
|
|
},
|
|
|
|
|
refreshLayout() {
|
|
|
|
|
// console.log("---------DEBUG---refreshLayout: ");
|
|
|
|
|
this.gridInstance.invoke('refreshLayout');
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.gridInstance.invoke('refreshLayout');
|
|
|
|
|
}, 150);
|
|
|
|
|
// this.gridInstance.invoke('refreshLayout');
|
|
|
|
|
},
|
|
|
|
|
refreshGrid(){
|
|
|
|
|
refreshGrid() {
|
|
|
|
|
// console.log("refreshLayout",this.$refs['tuigrid' + this.gridName])
|
|
|
|
|
var store = this.$refs['tuigrid' + this.gridName].gridInstance.store;
|
|
|
|
|
var containerEl = this.$refs['tuigrid' + this.gridName].$el;
|
|
|
|
|
// var containerEl = document.querySelector('.tui-grid-container')
|
|
|
|
|
var parentEl = containerEl.parentElement;
|
|
|
|
|
var store = this.$refs['tuigrid' + this.gridName].gridInstance.store;
|
|
|
|
|
var containerEl = this.$refs['tuigrid' + this.gridName].$el;
|
|
|
|
|
// var containerEl = document.querySelector('.tui-grid-container')
|
|
|
|
|
var parentEl = containerEl.parentElement;
|
|
|
|
|
|
|
|
|
|
// console.log("---------DEBUG---containerEl: ",containerEl);
|
|
|
|
|
// console.log('---------DEBUG---parentEl: ', parentEl)
|
|
|
|
|
// console.log('---------DEBUG---parentEl: ', parentEl)
|
|
|
|
|
// function refreshLayout(store, containerEl, parentEl) {
|
|
|
|
|
var dimension = store.dimension;
|
|
|
|
|
var autoWidth = dimension.autoWidth, fitToParentHeight = dimension.fitToParentHeight;
|
|
|
|
@ -636,35 +638,35 @@ export default {
|
|
|
|
|
// console.log("parentEl.clientHeight" , parentEl.clientHeight)
|
|
|
|
|
// console.log("clientHeight : ",clientHeight);
|
|
|
|
|
if (parentEl && parentEl.clientHeight !== clientHeight) {
|
|
|
|
|
var _b = getComputedStyle(parentEl), paddingTop = _b.paddingTop, paddingBottom = _b.paddingBottom;
|
|
|
|
|
this.setHeight(store, parentEl.clientHeight - (parseFloat(paddingTop) + parseFloat(paddingBottom)));
|
|
|
|
|
var _b = getComputedStyle(parentEl), paddingTop = _b.paddingTop, paddingBottom = _b.paddingBottom;
|
|
|
|
|
this.setHeight(store, parentEl.clientHeight - (parseFloat(paddingTop) + parseFloat(paddingBottom)));
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
setOffsetTop(store, offsetTop) {
|
|
|
|
|
setOffsetTop(store, offsetTop) {
|
|
|
|
|
// console.log("---------DEBUG---setOffsetTop: ");
|
|
|
|
|
store.dimension.offsetTop = offsetTop;
|
|
|
|
|
},
|
|
|
|
|
setWidth(_a, width, autoWidth) {
|
|
|
|
|
store.dimension.offsetTop = offsetTop;
|
|
|
|
|
},
|
|
|
|
|
setWidth(_a, width, autoWidth) {
|
|
|
|
|
// console.log("---------DEBUG---setWidth: ");
|
|
|
|
|
var dimension = _a.dimension;
|
|
|
|
|
dimension.autoWidth = autoWidth;
|
|
|
|
|
dimension.width = width;
|
|
|
|
|
},
|
|
|
|
|
setHeaderHeight(store, height) {
|
|
|
|
|
var dimension = _a.dimension;
|
|
|
|
|
dimension.autoWidth = autoWidth;
|
|
|
|
|
dimension.width = width;
|
|
|
|
|
},
|
|
|
|
|
setHeaderHeight(store, height) {
|
|
|
|
|
// console.log("---------DEBUG---setHeaderHeight: ");
|
|
|
|
|
store.dimension.headerHeight = height;
|
|
|
|
|
},
|
|
|
|
|
setOffsetLeft(store, offsetLeft) {
|
|
|
|
|
store.dimension.headerHeight = height;
|
|
|
|
|
},
|
|
|
|
|
setOffsetLeft(store, offsetLeft) {
|
|
|
|
|
// console.log("---------DEBUG---setOffsetLeft: ");
|
|
|
|
|
store.dimension.offsetLeft = offsetLeft;
|
|
|
|
|
},
|
|
|
|
|
setHeight(_a,height){
|
|
|
|
|
store.dimension.offsetLeft = offsetLeft;
|
|
|
|
|
},
|
|
|
|
|
setHeight(_a, height) {
|
|
|
|
|
// console.log("---------DEBUG---setHeight: ");
|
|
|
|
|
var dimension = _a.dimension;
|
|
|
|
|
var headerHeight = dimension.headerHeight, summaryHeight = dimension.summaryHeight, tableBorderWidth = dimension.tableBorderWidth;
|
|
|
|
|
dimension.bodyHeight = height - headerHeight - summaryHeight - tableBorderWidth;
|
|
|
|
|
},
|
|
|
|
|
var dimension = _a.dimension;
|
|
|
|
|
var headerHeight = dimension.headerHeight, summaryHeight = dimension.summaryHeight, tableBorderWidth = dimension.tableBorderWidth;
|
|
|
|
|
dimension.bodyHeight = height - headerHeight - summaryHeight - tableBorderWidth;
|
|
|
|
|
},
|
|
|
|
|
sendSelectedRowData(eventRowKey) {
|
|
|
|
|
if (this.selectedRowDataWatchFlag) {
|
|
|
|
|
var rowKey =
|
|
|
|
|