去掉分页页码记录,分页接口调用一次

szh_zidingyibiaoti
lilu 2 years ago
parent 3709cffaee
commit b48913d79b

@ -252,7 +252,8 @@ const initDetail = {
weiTuoFang: '', weiTuoFang: '',
ediAttn: '', ediAttn: '',
ediAttnTel: '', ediAttnTel: '',
ediAttnMail: '' ediAttnMail: '',
sendCode: ''
}, },
// //
hbList: [], hbList: [],
@ -728,7 +729,8 @@ export default {
weiTuoFang: '', weiTuoFang: '',
ediAttn: '', ediAttn: '',
ediAttnTel: '', ediAttnTel: '',
ediAttnMail: '' ediAttnMail: '',
sendCode: ''
} }
} }
// //

@ -284,6 +284,7 @@ export default {
}, },
computed: { computed: {
locaService () { locaService () {
if (!this.details) { return [] }
return this.details.item.map((item, index) => { return this.details.item.map((item, index) => {
return item.code return item.code
}) })

@ -528,7 +528,7 @@ export default {
pagerConfig: { pagerConfig: {
total: 0, total: 0,
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 50,
pageSizes: [10, 20, 50, 100, 200, 500] pageSizes: [10, 20, 50, 100, 200, 500]
}, },
columns: JSON.parse(JSON.stringify(initData.columns)), columns: JSON.parse(JSON.stringify(initData.columns)),
@ -628,8 +628,9 @@ export default {
this.formAllData = JSON.parse(JSON.stringify(initData.condAllData)) this.formAllData = JSON.parse(JSON.stringify(initData.condAllData))
this.fromTableAllData = JSON.parse(JSON.stringify(initData.columnsAllData)) this.fromTableAllData = JSON.parse(JSON.stringify(initData.columnsAllData))
this.tableHeight = document.body.clientHeight - 300 this.tableHeight = document.body.clientHeight - 300
this.getList({}, true)
this.getConfigUser(true)
this.getCarrier() this.getCarrier()
this.getConfigUser()
}, },
onresize () { onresize () {
window.onresize = () => { window.onresize = () => {
@ -758,23 +759,23 @@ export default {
this.getList(queryParam) this.getList(queryParam)
}, },
// //
getConfigUser() { getConfigUser(isInit = false) {
// //
const query = { const query = {
typeArr: ['booking_list_cond', 'booking_list_column', 'booking_list_page'] typeArr: ['booking_list_cond', 'booking_list_column']
} }
DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then(res => { DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then(res => {
res.data.map((item, index) => { res.data.map((item, index) => {
switch (item.type) { switch (item.type) {
case 'booking_list_cond': case 'booking_list_cond':
this.setFormData(item) this.setFormData(item, false, true)
break break
case 'booking_list_column': case 'booking_list_column':
this.setTableList(item) this.setTableList(item)
break break
case 'booking_list_page': // case 'booking_list_page':
this.setPageSize(item) // this.setPageSize(item)
break // break
} }
}) })
}) })
@ -839,7 +840,7 @@ export default {
console.log(err) console.log(err)
}) })
}, },
setFormData (data, isReset = false) { setFormData (data, isReset = false, isInit = false) {
if (data && JSON.parse(data.configJson).length) { if (data && JSON.parse(data.configJson).length) {
const arr = JSON.parse(data.configJson) const arr = JSON.parse(data.configJson)
const nowData = [] const nowData = []
@ -882,8 +883,8 @@ export default {
} }
} }
}) })
if (!isReset) { if (!isReset && !isInit) {
this.getList(this.formRes, true) this.getList(this.formRes)
} }
const len = this.formData.length % 4 const len = this.formData.length % 4
if (this.formData.length === 4 || this.formData.length > 4) { if (this.formData.length === 4 || this.formData.length > 4) {
@ -962,24 +963,24 @@ export default {
}) })
}, },
handlePageChange({ currentPage, pageSize }) { handlePageChange({ currentPage, pageSize }) {
if (this.gridOptions.pagerConfig.pageSize !== pageSize) { // if (this.gridOptions.pagerConfig.pageSize !== pageSize) {
this.editPageSizeSave(pageSize) // this.editPageSizeSave(pageSize)
} // }
this.gridOptions.pagerConfig.currentPage = currentPage this.gridOptions.pagerConfig.currentPage = currentPage
this.gridOptions.pagerConfig.pageSize = pageSize this.gridOptions.pagerConfig.pageSize = pageSize
this.getList(this.formRes) this.getList(this.formRes)
}, },
editPageSizeSave(pageSize = 10) { editPageSizeSave(pageSize = 10) {
const data = { // const data = {
pageSize: pageSize // pageSize: pageSize
} // }
DjyUserConfigAdd({ // DjyUserConfigAdd({
type: 'booking_list_page', // type: 'booking_list_page',
configJson: JSON.stringify(data) // configJson: JSON.stringify(data)
}).then(res => { // }).then(res => {
console.log('页码设置成功') // console.log('')
}) // })
}, },
// form // form
@ -1159,9 +1160,14 @@ export default {
const arr = this.formRes.MBLNO.split(/|,/) const arr = this.formRes.MBLNO.split(/|,/)
query.MBLNO = arr.toString() query.MBLNO = arr.toString()
} }
if (isInit) {
console.log('这里新增初始化字段 - 等后台接口修改')
// -
query.firstFlag = true
}
BookingOrderPage(query) BookingOrderPage(query)
.then(res => { .then(res => {
if (isInit) { this.getList(this.formRes) } // if (isInit) { this.getList(this.formRes) }
if (res.success) { if (res.success) {
let newBookingList = {} let newBookingList = {}
if (query.PageNo !== 1) { if (query.PageNo !== 1) {

Loading…
Cancel
Save