diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index df034ba..956002b 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -604,8 +604,7 @@ export default { }, 200) setTimeout(() => { const key = this.$route.fullPath - - const detailsChange = this.needSavePages[key] ? !!this.needSavePages[key].details : false + const detailsChange = Object.keys(this.needSavePages).includes(key) ? !!this.needSavePages[key].details : false this.checkSaveFun({ type: 'details', hasChange: detailsChange }) const hbListChange = !!this.needSavePages[key].hbList @@ -649,7 +648,7 @@ export default { setTimeout(() => { const key = this.$route.fullPath - const detailsChange = this.needSavePages[key] ? !!this.needSavePages[key].details : false + const detailsChange = Object.keys(this.needSavePages).includes(key) ? !!this.needSavePages[key].details : false this.checkSaveFun({ type: 'details', hasChange: detailsChange }) const hbListChange = !!this.needSavePages[key].hbList @@ -691,7 +690,7 @@ export default { setTimeout(() => { const key = this.$route.fullPath - const detailsChange = this.needSavePages[key] ? !!this.needSavePages[key].details : false + const detailsChange = Object.keys(this.needSavePages).includes(key) ? !!this.needSavePages[key].details : false this.checkSaveFun({ type: 'details', hasChange: detailsChange }) const hbListChange = !!this.needSavePages[key].hbList @@ -711,7 +710,7 @@ export default { setTimeout(() => { const key = this.$route.fullPath - const detailsChange = this.needSavePages[key] ? !!this.needSavePages[key].details : false + const detailsChange = Object.keys(this.needSavePages).includes(key) ? !!this.needSavePages[key].details : false this.checkSaveFun({ type: 'details', hasChange: detailsChange }) const hbListChange = !!this.needSavePages[key].hbList diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 0f72c44..bbb2c06 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -681,7 +681,7 @@ export default { stripe: true, round: true, autoResize: true, - align: 'center', + align: 'left', columnConfig: { resizable: true }, importConfig: {}, exportConfig: {}, @@ -728,27 +728,29 @@ export default { if (Object.keys(this.bookingGridOptions) === 0) { return false } const newData = JSON.parse(JSON.stringify(this.bookingGridOptions)) // 默认取前十条或者前N条,暂时屏蔽 - // if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) { - // setTimeout(() => { - // const copyArr = JSON.parse(JSON.stringify(this.bookingGridOptions.data)) - // const first = copyArr.splice(0, 20) - // const more = this.bookingGridOptions.data.splice(20, this.bookingGridOptions.data.length) - // newData.data = first - // this.gridOptions = { ...this.gridOptions, ...newData } - // setTimeout(() => { - // this.gridOptions.data = [...this.gridOptions.data, ...more] - // }, 1500) - // }, 50) - // } - - // 默认获取全部数据 if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) { - const copyArr = JSON.parse(JSON.stringify(this.bookingGridOptions.data)) - newData.data = copyArr setTimeout(() => { + const copyArr = JSON.parse(JSON.stringify(this.bookingGridOptions.data)) + const first = copyArr.splice(0, 20) + const more = this.bookingGridOptions.data.splice(20, this.bookingGridOptions.data.length) + newData.data = first this.gridOptions = { ...this.gridOptions, ...newData } - }, 200) + setTimeout(() => { + this.gridOptions.data = [...this.gridOptions.data, ...more] + }, 60) + }, 10) } + + // 默认获取全部数据 + // if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) { + // console.log(this.gridOptions.loading) + // const copyArr = JSON.parse(JSON.stringify(this.bookingGridOptions.data)) + // console.log('== 获取到了历史数据 ==', copyArr) + // newData.data = copyArr + // setTimeout(() => { + // this.gridOptions = { ...this.gridOptions, ...newData } + // }, 200) + // } } }, // 批量编辑