ddfe447b by weimo934

feat(sxdr,fjcl):更改下载页面问题

1 parent 9b736d09
......@@ -229,7 +229,12 @@ export default {
methods: {
dcsx(){
console.log(this.zdData,'zdData')
window.open(`api/tx/excelGeo/export?bsm=${this.zdData.bsm}&type=${this.zdData.type}`)
// window.open(`api/tx/excelGeo/export?bsm=${this.zdData.bsm}&type=${this.zdData.type}`)
let url= `api/tx/excelGeo/export?bsm=${this.zdData.bsm}&type=${this.zdData.type}`
let elemIF = document.createElement("iframe");
elemIF.src = url;
elemIF.style.display = "none";
document.body.appendChild(elemIF)
},
drsx(){
if (this.zdQszt!='0') {
......
......@@ -15,11 +15,8 @@
multiple
>
<el-button type="primary" icon="iconfont iconshangchuan">上传</el-button>
<el-button type="primary" @click="downloadTemplate">下载模板</el-button>
<!-- <a href=`/api/tx/excelGeo/template?type=${dylx}`>下载模板</a>-->
</el-upload>
<el-button type="primary" @click="downloadTemplate">下载模板</el-button>
</div>
<ul>
<li v-for="(item,index) in errorData" :key="index">{{item}}</li>
......@@ -80,7 +77,11 @@
this.reset();
},
downloadTemplate() {
window.open(`/api/tx/excelGeo/template?type=${this.dylx}`);
let url= `/api/tx/excelGeo/template?type=${this.dylx}`
let elemIF = document.createElement("iframe");
elemIF.src = url;
elemIF.style.display = "none";
document.body.appendChild(elemIF)
},
uploadSuccess(res, file, fileList) {
this.errorData = [];
......
......@@ -100,7 +100,12 @@
})
},
downloadFile(url) {
window.open(`/api/file/download?url=` + url);
// window.open(`/api/file/download?url=` + url);
let downloadUrl= `/api/file/download?url=${url}`
let elemIF = document.createElement("iframe");
elemIF.src = downloadUrl;
elemIF.style.display = "none";
document.body.appendChild(elemIF)
},
getFileList() {
switch (this.$route.name) {
......