试题模板更换

This commit is contained in:
zhaofang
2022-07-14 16:12:52 +08:00
parent 682195c732
commit aac1de7ac2
3 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@@ -383,12 +383,12 @@ export default {
},
methods: {
downloadTemplate(){
let fileName = "试题导入模板.xlsx";
let fileName = "试题导入模板.xls";
let link = document.createElement('a'); //创建a标签
link.style.display = 'none'; //使其隐藏
link.download = this.webBaseUrl+'/template/test-question-template.xlsx';
link.download = this.webBaseUrl+'/template/test-question-template.xls';
link.setAttribute('target', '_blank');
link.href = this.webBaseUrl+'/template/test-question-template.xlsx'; //赋予文件下载地址
link.href = this.webBaseUrl+'/template/test-question-template.xls'; //赋予文件下载地址
link.setAttribute('download', fileName); //设置下载属性 以及文件名
document.body.appendChild(link); //a标签插至页面中
link.click(); //强制触发a标签事件