Commit 745f4b45 authored by danfuman's avatar danfuman

修改

parent dfb0e203
......@@ -136,7 +136,7 @@
</el-upload>
</div>
<div slot="footer" class="dialog-footer">
<el-button class="download" icon="el-icon-download">下载模版</el-button>
<el-button class="download" icon="el-icon-download" @click="downloadClick">下载模版</el-button>
<el-button @click="handleUploadCancel1">取消</el-button>
<el-button type="primary" @click="submitUpload">确定</el-button>
</div>
......@@ -207,10 +207,12 @@
headers: {
Authorization: "Bearer " + getToken(),
},
companyId:''
companyId:'',
downloadhref: '',//样例地址
}
},
created() {
this.downloadhref = '/file/Template.xlsx';
this.querySubmit()
},
methods: {
......@@ -369,6 +371,14 @@
this.fileList=[]
this.pldrVisible=false;
},
downloadClick() {
let a = document.createElement("a");
a.setAttribute("href", this.downloadhref);
a.setAttribute("download", "批量导入模版.xlsx");
document.body.appendChild(a);
a.click();
a.remove();
},
submitUpload() {
this.$refs.upload.submit();
},
......
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