Browse Source

feat: 模版下载调整

zhangjie 2 tháng trước cách đây
mục cha
commit
205881143f

+ 1 - 1
src/modules/base/views/ExamStudentManage.vue

@@ -460,7 +460,7 @@ export default {
 
       this.download = true;
       const res = await downloadByApi(() => {
-        return businessTemplateDownload();
+        return businessTemplateDownload({ type: "EXAM_STUDENT" });
       }, filename).catch((e) => {
         this.$message.error(e || "下载失败,请重新尝试!");
       });

+ 4 - 6
src/modules/print/api.js

@@ -49,12 +49,10 @@ export const businessDataExport = (datas) => {
 export const deleteBusinessData = (id) => {
   return $postParam("/api/admin/exam/print/data_delete", { id });
 };
-export const businessTemplateDownload = () => {
-  return $postParam(
-    "/api/admin/exam/print/template_download",
-    {},
-    { responseType: "blob" }
-  );
+export const businessTemplateDownload = (datas) => {
+  return $postParam("/api/admin/exam/print/template_download", datas, {
+    responseType: "blob",
+  });
 };
 export const planBatchLinkPaper = (datas) => {
   return $postParam("/api/admin/exam/print/relate_update_batch", datas);

+ 1 - 1
src/modules/print/views/BusinessDataExport.vue

@@ -441,7 +441,7 @@ export default {
 
       this.loading = true;
       const res = await downloadByApi(() => {
-        return businessTemplateDownload();
+        return businessTemplateDownload({ type: "BUSINESS" });
       }, `考务数据模板.xlsx`).catch((e) => {
         this.$message.error(e || "下载失败,请重新尝试!");
       });