修改测试问题
This commit is contained in:
@@ -18,6 +18,7 @@ interface TableStoreParams {
|
||||
publicHeight?: number //计算高度
|
||||
resetCallback?: () => void // 重置
|
||||
loadCallback?: () => void // 接口调用后的回调
|
||||
exportProcessingData?: () => void //导出处理数据
|
||||
beforeSearchFun?: () => void // 接口调用前的回调
|
||||
}
|
||||
|
||||
@@ -47,6 +48,7 @@ export default class TableStore {
|
||||
column: [],
|
||||
loadCallback: null,
|
||||
resetCallback: null,
|
||||
exportProcessingData: null,
|
||||
beforeSearchFun: null,
|
||||
height: '',
|
||||
publicHeight: 0
|
||||
@@ -64,6 +66,7 @@ export default class TableStore {
|
||||
this.table.publicHeight = options.publicHeight || 0
|
||||
this.table.resetCallback = options.resetCallback || null
|
||||
this.table.loadCallback = options.loadCallback || null
|
||||
this.table.exportProcessingData = options.exportProcessingData || null
|
||||
this.table.beforeSearchFun = options.beforeSearchFun || null
|
||||
Object.assign(this.table.params, options.params)
|
||||
this.table.height = mainHeight(20 + (this.showPage ? 58 : 0) + this.table.publicHeight).height as string
|
||||
@@ -187,26 +190,21 @@ export default class TableStore {
|
||||
[
|
||||
'export',
|
||||
() => {
|
||||
ElMessage({
|
||||
message: '正在导出,请稍等...',
|
||||
type: 'info',
|
||||
duration: 1000
|
||||
})
|
||||
// this.index()
|
||||
let params = { ...this.table.params, pageNum: 1, pageSize: this.table.total }
|
||||
setTimeout(() => {
|
||||
createAxios(
|
||||
Object.assign(
|
||||
{
|
||||
url: this.url,
|
||||
method: this.method
|
||||
},
|
||||
requestPayload(this.method, params, this.paramsPOST)
|
||||
)
|
||||
).then(res => {
|
||||
this.table.allData = filtration(res.data.records || res.data)
|
||||
this.table.allFlag = data.showAllFlag || true
|
||||
})
|
||||
}, 1500)
|
||||
createAxios(
|
||||
Object.assign(
|
||||
{
|
||||
url: this.url,
|
||||
method: this.method
|
||||
},
|
||||
requestPayload(this.method, params, this.paramsPOST)
|
||||
)
|
||||
).then(res => {
|
||||
this.table.allData = filtration(res.data.records || res.data)
|
||||
this.table.exportProcessingData && this.table.exportProcessingData()
|
||||
this.table.allFlag = data.showAllFlag || true
|
||||
})
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user