列表切换

szh_zidingyibiaoti
lilu 2 years ago
parent 855ba8a15e
commit ae4e2258aa

@ -604,8 +604,7 @@ export default {
}, 200) }, 200)
setTimeout(() => { setTimeout(() => {
const key = this.$route.fullPath const key = this.$route.fullPath
const detailsChange = Object.keys(this.needSavePages).includes(key) ? !!this.needSavePages[key].details : false
const detailsChange = this.needSavePages[key] ? !!this.needSavePages[key].details : false
this.checkSaveFun({ type: 'details', hasChange: detailsChange }) this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList const hbListChange = !!this.needSavePages[key].hbList
@ -649,7 +648,7 @@ export default {
setTimeout(() => { setTimeout(() => {
const key = this.$route.fullPath 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 }) this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList const hbListChange = !!this.needSavePages[key].hbList
@ -691,7 +690,7 @@ export default {
setTimeout(() => { setTimeout(() => {
const key = this.$route.fullPath 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 }) this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList const hbListChange = !!this.needSavePages[key].hbList
@ -711,7 +710,7 @@ export default {
setTimeout(() => { setTimeout(() => {
const key = this.$route.fullPath 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 }) this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList const hbListChange = !!this.needSavePages[key].hbList

@ -681,7 +681,7 @@ export default {
stripe: true, stripe: true,
round: true, round: true,
autoResize: true, autoResize: true,
align: 'center', align: 'left',
columnConfig: { resizable: true }, columnConfig: { resizable: true },
importConfig: {}, importConfig: {},
exportConfig: {}, exportConfig: {},
@ -728,27 +728,29 @@ export default {
if (Object.keys(this.bookingGridOptions) === 0) { return false } if (Object.keys(this.bookingGridOptions) === 0) { return false }
const newData = JSON.parse(JSON.stringify(this.bookingGridOptions)) const newData = JSON.parse(JSON.stringify(this.bookingGridOptions))
// N // 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) { if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) {
const copyArr = JSON.parse(JSON.stringify(this.bookingGridOptions.data))
newData.data = copyArr
setTimeout(() => { 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 } 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)
// }
} }
}, },
// //

Loading…
Cancel
Save