|
|
|
@ -563,9 +563,9 @@ export default {
|
|
|
|
|
this.showColumns = JSON.parse(JSON.stringify(initData.columns))
|
|
|
|
|
this.formAllData = JSON.parse(JSON.stringify(initData.condAllData))
|
|
|
|
|
this.fromTableAllData = JSON.parse(JSON.stringify(initData.columnsAllData))
|
|
|
|
|
this.getList()
|
|
|
|
|
this.getFormData()
|
|
|
|
|
this.getTableList()
|
|
|
|
|
this.getPageSize()
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
window.onresize = () => {
|
|
|
|
@ -765,11 +765,38 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handlePageChange({ currentPage, pageSize }) {
|
|
|
|
|
if (this.gridOptions.pagerConfig.pageSize !== pageSize) {
|
|
|
|
|
console.log('pagesize变化:', pageSize)
|
|
|
|
|
this.editPageSizeSave(pageSize)
|
|
|
|
|
}
|
|
|
|
|
this.gridOptions.pagerConfig.currentPage = currentPage
|
|
|
|
|
this.gridOptions.pagerConfig.pageSize = pageSize
|
|
|
|
|
this.getList(this.formRes)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
editPageSizeSave (pageSize = 10) {
|
|
|
|
|
const data = {
|
|
|
|
|
pageSize: pageSize
|
|
|
|
|
}
|
|
|
|
|
DjyUserConfigAdd({
|
|
|
|
|
type: 'booking_list_page',
|
|
|
|
|
configJson: JSON.stringify(data)
|
|
|
|
|
}).then(res => {
|
|
|
|
|
console.log('页码设置成功')
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getPageSize () {
|
|
|
|
|
DjyUserConfigGet({ type: 'booking_list_page' }).then(res => {
|
|
|
|
|
if (res.data && JSON.parse(res.data.configJson)) {
|
|
|
|
|
this.gridOptions.pagerConfig.pageSize = JSON.parse(res.data.configJson).pageSize
|
|
|
|
|
console.log('获取到pageSize : ', this.gridOptions.pagerConfig.pageSize)
|
|
|
|
|
this.getList()
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// form
|
|
|
|
|
toggleAdvanced() {
|
|
|
|
|
this.advanced = !this.advanced
|
|
|
|
|