- 通过Excel名单导入学生信息与答题器名单,点击
+ 通过Excel名单导入学生答题器绑定模板,点击
模板下载 。
@@ -236,7 +236,7 @@ export default {
code: "",
role: "",
diaUp: false,
- url: "",
+ url: "/api_html/school/manager/importStudentClicker",
diaStu: false,
diaClass: false,
query: {
@@ -348,17 +348,17 @@ export default {
},
async downExcel() {
this.loadingDown = true;
- let data = await this.$request.subjectiveScoreTemplate({
- classId: this.query.classId,
- });
+ let { data, info, status } =
+ await this.$request.studentClickerTemplateUrl();
this.loadingDown = false;
- if (data && !data.code) {
- let blob = new Blob([data], {
- type: "application/vnd.ms-excel;charset=utf-8",
- });
- downloadFile(`主观题模版.xlsx`, blob);
+ if (status == 0) {
+ const a = document.createElement("a");
+ a.href = data.downloadUrl;
+ document.body.appendChild(a);
+ a.click();
+ a.remove();
} else {
- this.$message.error(data.info);
+ this.$message.error(info);
}
},
async removeStu(obj, index) {