update 导出

qianlishi 3 years ago
parent 405cbf772a
commit 660e0b3b56

@ -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) {
//msSaveOrOpenBlobbool
@ -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({

Loading…
Cancel
Save