|
|
@@ -133,6 +133,7 @@
|
|
|
import ToOpen from './components/ToOpen'
|
|
|
import Merge from './components/Merge'
|
|
|
import TableTool from '@/components/table/TableTool'
|
|
|
+ import downloadFileByByte from '@/utils/base64ToFile'
|
|
|
export default {
|
|
|
components: {
|
|
|
Edit,
|
|
|
@@ -260,6 +261,23 @@
|
|
|
this.total = res.data.total
|
|
|
this.listLoading = false
|
|
|
},
|
|
|
+
|
|
|
+ exportData() {
|
|
|
+ this.isPublic = false
|
|
|
+ let exportFrom = JSON.parse(JSON.stringify(this.queryForm))
|
|
|
+ exportFrom.columns = this.finallyColumns.map((item) => item.label)
|
|
|
+ api
|
|
|
+ .deriveList(exportFrom)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.list.content) {
|
|
|
+ downloadFileByByte(res.data.list.content, '客户数据.xlsx')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
reset() {
|
|
|
this.queryForm = {
|
|
|
pageNum: 1,
|