// 导出
async derive () {
try {
const params = new URLSearchParams({
orgOwnerName: this.form.name,
status: this.form.status,
customerServiceStaffId: this.form.customerServiceStaff,
salesmanId: this.form.salesman,
currentPage: this.page.currentPage,
pageSize: this.page.pageSize,
createOrder: this.form.createOrder
})
const url = `${baseUrl}op/customer/export?${params.toString()}`
const a = document.createElement('a')
a.style.display = 'none'
a.target = '_blank'
a.href = url
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
} catch (error) {
console.error(error)
}
},
前端导出 使用 URLSearchParams
于 2023-04-18 15:57:51 首次发布