|
@@ -152,6 +152,7 @@
|
|
? false
|
|
? false
|
|
: true
|
|
: true
|
|
"
|
|
"
|
|
|
|
+ @click="DataReportExport()"
|
|
>导出</el-button
|
|
>导出</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -357,6 +358,7 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
//最外层tabs切换事件触发
|
|
//最外层tabs切换事件触发
|
|
handleClick(tab, event) {
|
|
handleClick(tab, event) {
|
|
|
|
+ this.th_tableData = [];
|
|
this.ac_content = "model"; //将实时数据->恢复默认内部tabs选中
|
|
this.ac_content = "model"; //将实时数据->恢复默认内部tabs选中
|
|
this.se_content = "I"; //将历史趋势->恢复默认内部tabs选中
|
|
this.se_content = "I"; //将历史趋势->恢复默认内部tabs选中
|
|
for (let i in event.path) {
|
|
for (let i in event.path) {
|
|
@@ -428,6 +430,35 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ /**
|
|
|
|
+ * @数据报表导出
|
|
|
|
+ */
|
|
|
|
+ DataReportExport() {
|
|
|
|
+ var _this = this;
|
|
|
|
+ _this.$store.commit("TimeAll_function", _this.th_defaultTime);
|
|
|
|
+ var time = _this.$store.state.Time_Data;
|
|
|
|
+ _this.$store.commit("checkedCities_all", _this.checkedCities);
|
|
|
|
+ var queryType = _this.$store.state.queryType;
|
|
|
|
+
|
|
|
|
+ api
|
|
|
|
+ .DataReportExport({
|
|
|
|
+ siteId: this.$store.state.siteId,
|
|
|
|
+ startTime: time[0],
|
|
|
|
+ endTime: time[1],
|
|
|
|
+ queryType: queryType,
|
|
|
|
+ })
|
|
|
|
+ .then((requset) => {
|
|
|
|
+ if (requset.status === "SUCCESS") {
|
|
|
|
+ window.location.href =
|
|
|
|
+ window.PLATFROM_CONFIG.fileUrl + requset.data;
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage.success({
|
|
|
|
+ message: requset.msg,
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
/**
|
|
/**
|
|
* @实时数据api请求
|
|
* @实时数据api请求
|
|
*/
|
|
*/
|
|
@@ -589,27 +620,6 @@ export default {
|
|
[h.column.label]
|
|
[h.column.label]
|
|
);
|
|
);
|
|
},
|
|
},
|
|
- DataReportExport() {
|
|
|
|
- api
|
|
|
|
- .DataReportExport({
|
|
|
|
- siteId: 3,
|
|
|
|
- startTime: "2020-01-14 00:00:00",
|
|
|
|
- endTime: "2021-07-11 00:00:00",
|
|
|
|
- queryType: "V",
|
|
|
|
- })
|
|
|
|
- .then((requset) => {
|
|
|
|
- if (requset.status === "SUCCESS") {
|
|
|
|
- window.location.href =
|
|
|
|
- window.PLATFROM_CONFIG.fileUrl + requset.data;
|
|
|
|
- } else {
|
|
|
|
- ElMessage.success({
|
|
|
|
- message: requset.msg,
|
|
|
|
- type: "success",
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- // rtAnalogData/DataReportExport?
|
|
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
/**
|
|
/**
|