修改现场测试问题

This commit is contained in:
GGJ
2025-01-03 12:45:54 +08:00
parent 6a06652532
commit 3094ac94c0
24 changed files with 249 additions and 97 deletions

View File

@@ -10,6 +10,7 @@ interface TableStoreParams {
pk?: string
column: TableColumn[]
params?: anyObj
exportName?: any // 导出文件名
method?: Method // 请求方式
isWebPaging?: boolean // 是否前端分页
showPage?: boolean //是否需要分页
@@ -25,6 +26,7 @@ export default class TableStore {
public pk
public method: Method
public initData: any = null
public exportName: any = null
public isWebPaging = false
public paramsPOST = true
public showPage = true
@@ -54,6 +56,7 @@ export default class TableStore {
this.pk = options.pk || 'id'
this.paramsPOST = options.paramsPOST || false
this.isWebPaging = options.isWebPaging || false
this.exportName = options.exportName || null
this.method = options.method || 'GET'
this.table.column = options.column
this.showPage = options.showPage !== false
@@ -182,25 +185,26 @@ export default class TableStore {
[
'export',
() => {
// this.index()
ElMessage({
message: '正在导出,请稍等...',
type: 'info',
duration: 1000
})
let params = { ...this.table.params, pageNum: 1, pageSize: this.table.total }
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
})
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)
}
]
])