|
@@ -9,7 +9,7 @@
|
|
|
class="data-table-content"
|
|
|
>
|
|
|
<template v-if="tableData.length">
|
|
|
- <el-table :data="tableData" style="width: 100%">
|
|
|
+ <el-table :data="tableData" style="width: 100%" ref="userTableData">
|
|
|
<el-table-column label="PEK国航行李BRS扫描数据统计表">
|
|
|
<el-table-column prop="A" label="航站"> </el-table-column>
|
|
|
<el-table-column label="出港航班量">
|
|
@@ -41,6 +41,10 @@
|
|
|
<script>
|
|
|
import NoData from "@/components/nodata";
|
|
|
import { Query } from "@/api/dataIntegration";
|
|
|
+import * as XLSX from "xlsx";
|
|
|
+import FileSaver from "file-saver";
|
|
|
+import { number } from "echarts";
|
|
|
+import { throttledExportToExcel } from "@/utils/table";
|
|
|
export default {
|
|
|
props: {
|
|
|
//接口ID
|
|
@@ -48,6 +52,9 @@ export default {
|
|
|
type: [String, Number],
|
|
|
default: "",
|
|
|
},
|
|
|
+ isloadings: {
|
|
|
+ type: Number,
|
|
|
+ },
|
|
|
dataContent: {
|
|
|
type: Array,
|
|
|
default: () => [],
|
|
@@ -85,6 +92,11 @@ export default {
|
|
|
},
|
|
|
deep: true,
|
|
|
},
|
|
|
+ isloadings: {
|
|
|
+ handler(val) {
|
|
|
+ this.downFile();
|
|
|
+ },
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
dataTableContentStyle() {
|
|
@@ -142,6 +154,12 @@ export default {
|
|
|
console.log(error);
|
|
|
}
|
|
|
},
|
|
|
+ downFile() {
|
|
|
+ let tableName = "PEK国航行李BRS扫描数据统计表";
|
|
|
+ const table = this.$refs["userTableData"].$el.cloneNode(true);
|
|
|
+ const fileName = `${tableName}.xlsx`;
|
|
|
+ throttledExportToExcel(table, tableName, fileName);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|