feat(sxdr,fjcl):更改下载页面问题
Showing
3 changed files
with
19 additions
and
8 deletions
| ... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
| 16 | }" | 16 | }" |
| 17 | @click="itemClick(item)" | 17 | @click="itemClick(item)" |
| 18 | > | 18 | > |
| 19 | 19 | ||
| 20 | <div class="layer_text nowrap" @contextmenu.prevent="openMenu($event, item)">{{ item.mc }}</div><div | 20 | <div class="layer_text nowrap" @contextmenu.prevent="openMenu($event, item)">{{ item.mc }}</div><div |
| 21 | class="reTree_icon" | 21 | class="reTree_icon" |
| 22 | :style="{ | 22 | :style="{ |
| ... | @@ -229,7 +229,12 @@ export default { | ... | @@ -229,7 +229,12 @@ export default { |
| 229 | methods: { | 229 | methods: { |
| 230 | dcsx(){ | 230 | dcsx(){ |
| 231 | console.log(this.zdData,'zdData') | 231 | console.log(this.zdData,'zdData') |
| 232 | window.open(`api/tx/excelGeo/export?bsm=${this.zdData.bsm}&type=${this.zdData.type}`) | 232 | // window.open(`api/tx/excelGeo/export?bsm=${this.zdData.bsm}&type=${this.zdData.type}`) |
| 233 | let url= `api/tx/excelGeo/export?bsm=${this.zdData.bsm}&type=${this.zdData.type}` | ||
| 234 | let elemIF = document.createElement("iframe"); | ||
| 235 | elemIF.src = url; | ||
| 236 | elemIF.style.display = "none"; | ||
| 237 | document.body.appendChild(elemIF) | ||
| 233 | }, | 238 | }, |
| 234 | drsx(){ | 239 | drsx(){ |
| 235 | if (this.zdQszt!='0') { | 240 | if (this.zdQszt!='0') { | ... | ... |
| ... | @@ -15,11 +15,8 @@ | ... | @@ -15,11 +15,8 @@ |
| 15 | multiple | 15 | multiple |
| 16 | > | 16 | > |
| 17 | <el-button type="primary" icon="iconfont iconshangchuan">上传</el-button> | 17 | <el-button type="primary" icon="iconfont iconshangchuan">上传</el-button> |
| 18 | |||
| 19 | <el-button type="primary" @click="downloadTemplate">下载模板</el-button> | ||
| 20 | <!-- <a href=`/api/tx/excelGeo/template?type=${dylx}`>下载模板</a>--> | ||
| 21 | |||
| 22 | </el-upload> | 18 | </el-upload> |
| 19 | <el-button type="primary" @click="downloadTemplate">下载模板</el-button> | ||
| 23 | </div> | 20 | </div> |
| 24 | <ul> | 21 | <ul> |
| 25 | <li v-for="(item,index) in errorData" :key="index">{{item}}</li> | 22 | <li v-for="(item,index) in errorData" :key="index">{{item}}</li> |
| ... | @@ -80,7 +77,11 @@ | ... | @@ -80,7 +77,11 @@ |
| 80 | this.reset(); | 77 | this.reset(); |
| 81 | }, | 78 | }, |
| 82 | downloadTemplate() { | 79 | downloadTemplate() { |
| 83 | window.open(`/api/tx/excelGeo/template?type=${this.dylx}`); | 80 | let url= `/api/tx/excelGeo/template?type=${this.dylx}` |
| 81 | let elemIF = document.createElement("iframe"); | ||
| 82 | elemIF.src = url; | ||
| 83 | elemIF.style.display = "none"; | ||
| 84 | document.body.appendChild(elemIF) | ||
| 84 | }, | 85 | }, |
| 85 | uploadSuccess(res, file, fileList) { | 86 | uploadSuccess(res, file, fileList) { |
| 86 | this.errorData = []; | 87 | this.errorData = []; | ... | ... |
| ... | @@ -100,7 +100,12 @@ | ... | @@ -100,7 +100,12 @@ |
| 100 | }) | 100 | }) |
| 101 | }, | 101 | }, |
| 102 | downloadFile(url) { | 102 | downloadFile(url) { |
| 103 | window.open(`/api/file/download?url=` + url); | 103 | // window.open(`/api/file/download?url=` + url); |
| 104 | let downloadUrl= `/api/file/download?url=${url}` | ||
| 105 | let elemIF = document.createElement("iframe"); | ||
| 106 | elemIF.src = downloadUrl; | ||
| 107 | elemIF.style.display = "none"; | ||
| 108 | document.body.appendChild(elemIF) | ||
| 104 | }, | 109 | }, |
| 105 | getFileList() { | 110 | getFileList() { |
| 106 | switch (this.$route.name) { | 111 | switch (this.$route.name) { | ... | ... |
-
Please register or sign in to post a comment