|
|
|
@ -572,6 +572,18 @@ export default {
|
|
|
|
|
showDataSet: val
|
|
|
|
|
};
|
|
|
|
|
exportDashboard(param).then(res => {
|
|
|
|
|
const that = this;
|
|
|
|
|
const type = res.type;
|
|
|
|
|
if (type == "application/json") {
|
|
|
|
|
var reader = new FileReader();
|
|
|
|
|
reader.readAsText(res, "utf-8");
|
|
|
|
|
reader.onload = function() {
|
|
|
|
|
const data = JSON.parse(reader.result);
|
|
|
|
|
that.$message.error(data.message);
|
|
|
|
|
};
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const blob = new Blob([res], { type: "application/octet-stream" });
|
|
|
|
|
if (window.navigator.msSaveOrOpenBlob) {
|
|
|
|
|
//msSaveOrOpenBlob方法返回bool值
|
|
|
|
@ -591,18 +603,17 @@ export default {
|
|
|
|
|
this.$refs.upload.clearFiles();
|
|
|
|
|
//刷新大屏页面
|
|
|
|
|
this.initEchartData();
|
|
|
|
|
if (response.code == '200') {
|
|
|
|
|
if (response.code == "200") {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "导入成功!",
|
|
|
|
|
type: "success"
|
|
|
|
|
});
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: response.message,
|
|
|
|
|
type: "error"
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
handleError(err) {
|
|
|
|
|
this.$message({
|
|
|
|
|