|
|
@@ -207,33 +207,15 @@ export default {
|
|
|
},
|
|
|
word(row) {
|
|
|
this.downloading = true;
|
|
|
- // this.$axios
|
|
|
- // .get('/rate/exportPdf/' + row.id, { responseType: 'blob' })
|
|
|
- // .then(res => {
|
|
|
- // console.log(res);
|
|
|
- // this.downloading = false;
|
|
|
- // const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
|
|
|
- // const link = document.createElement('a');
|
|
|
- // link.href = downloadUrl;
|
|
|
- // link.setAttribute('download', '申请材料.pdf');
|
|
|
- // document.body.appendChild(link);
|
|
|
- // link.click();
|
|
|
- // link.remove();
|
|
|
- // })
|
|
|
- // .catch(e => {
|
|
|
- // console.log(e);
|
|
|
- // this.downloading = false;
|
|
|
- // this.$message.error(e.error);
|
|
|
- // });
|
|
|
this.$axios
|
|
|
- .get('/rate/export/' + row.id)
|
|
|
+ .get('/rate/exportPdf/' + row.id, { responseType: 'blob' })
|
|
|
.then(res => {
|
|
|
console.log(res);
|
|
|
this.downloading = false;
|
|
|
const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
|
|
|
const link = document.createElement('a');
|
|
|
link.href = downloadUrl;
|
|
|
- link.setAttribute('download', '申请材料.doc');
|
|
|
+ link.setAttribute('download', '申请材料.pdf');
|
|
|
document.body.appendChild(link);
|
|
|
link.click();
|
|
|
link.remove();
|
|
|
@@ -243,6 +225,24 @@ export default {
|
|
|
this.downloading = false;
|
|
|
this.$message.error(e.error);
|
|
|
});
|
|
|
+ // this.$axios
|
|
|
+ // .get('/rate/export/' + row.id)
|
|
|
+ // .then(res => {
|
|
|
+ // console.log(res);
|
|
|
+ // this.downloading = false;
|
|
|
+ // const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
|
|
|
+ // const link = document.createElement('a');
|
|
|
+ // link.href = downloadUrl;
|
|
|
+ // link.setAttribute('download', '申请材料.doc');
|
|
|
+ // document.body.appendChild(link);
|
|
|
+ // link.click();
|
|
|
+ // link.remove();
|
|
|
+ // })
|
|
|
+ // .catch(e => {
|
|
|
+ // console.log(e);
|
|
|
+ // this.downloading = false;
|
|
|
+ // this.$message.error(e.error);
|
|
|
+ // });
|
|
|
}
|
|
|
}
|
|
|
};
|