Commit 32738dac authored by 罗超's avatar 罗超

1

parent c9f04e15
......@@ -20,13 +20,13 @@ export default {
if (res.data.data) {
localStorage.removeItem("fujianTag");
clearInterval(this.timer);
localStorage.setItem("fujianUrl", res.data.data);
this.$confirm("有下载文件准备完成, 前往下载?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info",
}).then(() => {
this.$router.push("/billboardList");
this.downloadFujian(res.data.data);
});
}
} else {
......@@ -35,30 +35,6 @@ export default {
}
);
},
downloadFujian(url) {
let a = document.createElement("a");
a.href = this.domainManager().DomainUrl + url;
a.download = "榜单附件.zip";
a.click();
setTimeout(() => {
this.delDownloadMultiplefujian(url);
}, 2000);
},
//删除附件
delDownloadMultiplefujian(url) {
this.apipost(
"/api/Trade/DelFirstShopEnrollZipExport",
{
Url: url,
},
(res) => {
if (res.data.resultCode == 1) {
} else {
this.$message.error(res.data.message);
}
}
);
},
},
mounted() {
let tag = localStorage.getItem("fujianTag");
......
......@@ -31,7 +31,7 @@
style="float: right; margin-top: -5px; margin-right: 10px"
size="small"
type="primary"
@click="downloadFujian(fujianUrl)"
@click="downloadFujian"
v-if="showfujianbtn"
>下载附件
</el-button>
......@@ -544,14 +544,18 @@ export default {
(res) => {
if (res.data.resultCode == 1) {
if (res.data.data) {
this.fujianLoading = false;
this.fujianText = "榜单附件导出";
this.fujianText = "附件准备完成";
localStorage.removeItem("fujianTag");
clearInterval(this.timer);
this.fujianUrl = res.data.data;
localStorage.setItem("fujianUrl", res.data.data);
this.fujianUrl = res.data.data;
this.showfujianbtn = true;
if (this.$route.path == "/billboardList") {
this.downloadFujian(res.data.data);
this.$alert("下载文件准备完成", {
confirmButtonText: "确定",
callback: (action) => {},
});
} else {
this.$confirm("有下载文件准备完成, 前往下载?", "提示", {
confirmButtonText: "确定",
......@@ -559,7 +563,7 @@ export default {
type: "info",
}).then(() => {
this.$router.push("/billboardList");
this.downloadFujian(this.fujianUrl);
// this.downloadFujian(this.fujianUrl);
});
}
}
......@@ -569,14 +573,15 @@ export default {
}
);
},
downloadFujian(url) {
downloadFujian() {
let url = localStorage.getItem("fujianUrl");
let a = document.createElement("a");
a.href = this.domainManager().DomainUrl + url;
a.href = this.domainManager().DomainUrl + "/" + url;
a.download = "榜单附件.zip";
a.click();
setTimeout(() => {
this.delDownloadMultiplefujian(url);
}, 2000);
}, 10000);
},
//删除附件
delDownloadMultiplefujian(url) {
......@@ -587,6 +592,10 @@ export default {
},
(res) => {
if (res.data.resultCode == 1) {
localStorage.removeItem("fujianUrl");
this.fujianLoading = false;
this.fujianText = "榜单附件导出";
this.showfujianbtn = false;
} else {
this.$message.error(res.data.message);
}
......@@ -594,7 +603,14 @@ export default {
);
},
},
mounted() {},
mounted() {
let url = localStorage.getItem("fujianUrl");
if (url) {
this.fujianLoading = true;
this.fujianText = "附件准备完成";
this.showfujianbtn = true;
}
},
};
</script>
<style>
......
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