导出
This commit is contained in:
14054
package-lock.json
generated
Normal file
14054
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@
|
|||||||
:initLoad="false"
|
:initLoad="false"
|
||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
:method="'POST'"
|
:method="'POST'"
|
||||||
|
@done="d=>data = d.data"
|
||||||
>
|
>
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
@@ -335,23 +336,16 @@ export default {
|
|||||||
this.columns = columns;
|
this.columns = columns;
|
||||||
},
|
},
|
||||||
exportFile() {
|
exportFile() {
|
||||||
let array = [
|
const arr = [];
|
||||||
["测点", "路段", "城区", "路长", "路宽", "平均Leq", "平均SD"],
|
const th = this.columns.map(item=>item.title);
|
||||||
];
|
|
||||||
|
arr.push(th)
|
||||||
this.data.forEach((d) => {
|
this.data.forEach((d) => {
|
||||||
array.push([
|
const td = this.columns.map(item=>d[item.dataIndex]);
|
||||||
d.place,
|
arr.push(td);
|
||||||
d.road,
|
|
||||||
d.area,
|
|
||||||
d.roadLength,
|
|
||||||
d.roadWidth,
|
|
||||||
d.avgLeq,
|
|
||||||
d.avgSD,
|
|
||||||
]);
|
|
||||||
});
|
});
|
||||||
let sheet = XLSX.utils.aoa_to_sheet(array);
|
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||||
|
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
|
||||||
this.$util.exportSheet(XLSX, sheet, new Date().getTime());
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user