|
|
|
@ -672,12 +672,14 @@ export default {
|
|
|
|
|
...mapGetters(['bookingList', 'bookingGridOptions'])
|
|
|
|
|
},
|
|
|
|
|
beforeRouteLeave (to, from, next) {
|
|
|
|
|
const copyArr = JSON.parse(JSON.stringify(this.gridOptions.data))
|
|
|
|
|
const first = copyArr.splice(0, 20)
|
|
|
|
|
this.setBookingGridOptions(this.gridOptions)
|
|
|
|
|
this.gridOptions = {
|
|
|
|
|
border: false,
|
|
|
|
|
resizable: true,
|
|
|
|
|
showOverflow: true,
|
|
|
|
|
loading: true,
|
|
|
|
|
loading: false,
|
|
|
|
|
stripe: true,
|
|
|
|
|
round: true,
|
|
|
|
|
autoResize: true,
|
|
|
|
@ -691,8 +693,8 @@ export default {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
pageSizes: [10, 20, 50, 100, 200, 500]
|
|
|
|
|
},
|
|
|
|
|
columns: JSON.parse(JSON.stringify(initData.columns)),
|
|
|
|
|
data: []
|
|
|
|
|
columns: this.gridOptions.columns,
|
|
|
|
|
data: first
|
|
|
|
|
}
|
|
|
|
|
next()
|
|
|
|
|
},
|
|
|
|
@ -737,7 +739,8 @@ export default {
|
|
|
|
|
this.gridOptions = { ...this.gridOptions, ...newData }
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.gridOptions.data = [...this.gridOptions.data, ...more]
|
|
|
|
|
}, 60)
|
|
|
|
|
console.log(this.gridOptions.data.length)
|
|
|
|
|
}, 600)
|
|
|
|
|
}, 10)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|