Commit 3e2c8992 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 4119f87d c4209e2d
...@@ -74,7 +74,6 @@ export default { ...@@ -74,7 +74,6 @@ export default {
this.$get("/sitestat/siteTree", {}).then(({ data }) => { this.$get("/sitestat/siteTree", {}).then(({ data }) => {
// this.areaData = data.siteTree; // this.areaData = data.siteTree;
this.areaData = data.data; this.areaData = data.data;
console.log("areaData1", data.data);
}); });
}, },
methods: { methods: {
...@@ -91,14 +90,18 @@ export default { ...@@ -91,14 +90,18 @@ export default {
/** 导出Excel */ /** 导出Excel */
doExport() { doExport() {
if (JSON.stringify(this.query) === "{}") {
this.$message.warning("请先选择区域或者站点");
return;
}
this.isExport = true; this.isExport = true;
this.$download( this.$download(
"/sitestat/exportExcel", "/sitestat/exportExcel",
{ {
siteId: this.$route.query["siteId"], ...this.query,
siteName: this.$route.query["siteName"], size: 999,
}, },
{ type: "excel" } { type: "excel", fileName: "站点设备统计信息" }
) )
.then(() => (this.isExport = false)) .then(() => (this.isExport = false))
.catch((error) => { .catch((error) => {
...@@ -146,7 +149,10 @@ export default { ...@@ -146,7 +149,10 @@ export default {
siteIdList: node.id.split(",").map((i) => parseInt(i)), siteIdList: node.id.split(",").map((i) => parseInt(i)),
}; };
} else { } else {
this.query = { siteId: node.id }; this.query = {
siteId: node.id,
// siteName: node.label
};
} }
this.getData(); this.getData();
...@@ -155,6 +161,7 @@ export default { ...@@ -155,6 +161,7 @@ export default {
this.getData(); this.getData();
} }
console.log(this.query);
}, },
}, },
data() { 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