Commit 8100f354 authored by “yiyousong”'s avatar “yiyousong”

perf:修改站点信息导出

parent 39d05e00
......@@ -74,7 +74,6 @@ export default {
this.$get("/sitestat/siteTree", {}).then(({ data }) => {
// this.areaData = data.siteTree;
this.areaData = data.data;
console.log("areaData1", data.data);
});
},
methods: {
......@@ -91,14 +90,18 @@ export default {
/** 导出Excel */
doExport() {
if (JSON.stringify(this.query) === "{}") {
this.$message.warning("请先选择区域或者站点");
return;
}
this.isExport = true;
this.$download(
"/sitestat/exportExcel",
{
siteId: this.$route.query["siteId"],
siteName: this.$route.query["siteName"],
...this.query,
size: 999,
},
{ type: "excel" }
{ type: "excel", fileName: "站点设备统计信息" }
)
.then(() => (this.isExport = false))
.catch((error) => {
......@@ -146,7 +149,10 @@ export default {
siteIdList: node.id.split(",").map((i) => parseInt(i)),
};
} else {
this.query = { siteId: node.id };
this.query = {
siteId: node.id,
// siteName: node.label
};
}
this.getData();
......@@ -155,6 +161,7 @@ export default {
this.getData();
}
console.log(this.query);
},
},
data() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment