zhangjie 2 년 전
부모
커밋
fcb1cda65f
2개의 변경된 파일15개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 0
      src/modules/print/api.js
  2. 11 6
      src/modules/print/components/PrintPlanDetail.vue

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

@@ -69,6 +69,10 @@ export const businessStudentDetail = id => {
 export const planLinkPaperListPage = datas => {
   return $postParam("/api/admin/exam/print/relate_list", datas);
 };
+export const planLinkPaperTotal = datas => {
+  return $postParam("/api/admin/exam/print/relate_total", datas);
+};
+
 export const updatePlanLinkPaper = datas => {
   return $post("/api/admin/exam/print/relate_update", datas);
 };

+ 11 - 6
src/modules/print/components/PrintPlanDetail.vue

@@ -64,14 +64,14 @@
         <p>
           <span class="mr-4">
             该印刷计划共计:
-            <i class="color-primary">{{ totalInfo.totalSubjects }}</i>
-            科次
+            <i class="color-primary">{{ totalInfo.courseTotal }}</i>
+            门课程
           </span>
           <span class="mr-4">
-            <i class="color-primary">{{ totalInfo.taskCount }}</i> 个命题任务
+            <i class="color-primary">{{ totalInfo.taskTotal }}</i> 个命题任务
           </span>
           <span class="mr-4">
-            <i class="color-primary">{{ totalInfo.paperCount }}</i>
+            <i class="color-primary">{{ totalInfo.subjectTotal }}</i>
             科次(考生人数)
           </span>
         </p>
@@ -187,7 +187,7 @@
 </template>
 
 <script>
-import { planLinkPaperListPage } from "../api";
+import { planLinkPaperListPage, planLinkPaperTotal } from "../api";
 import ModifyPlanPaper from "./ModifyPlanPaper";
 import PrintPlanBatchLinkPaper from "./PrintPlanBatchLinkPaper.vue";
 
@@ -238,7 +238,7 @@ export default {
       };
       this.dataList = [];
       this.totalInfo = {};
-      this.toPage(1);
+      this.search();
     },
     cancel() {
       this.modalIsShow = false;
@@ -246,6 +246,10 @@ export default {
     open() {
       this.modalIsShow = true;
     },
+    async getTotal() {
+      const data = await planLinkPaperTotal(this.filter);
+      this.totalInfo = data || {};
+    },
     async getList() {
       const datas = {
         ...this.filter,
@@ -262,6 +266,7 @@ export default {
     },
     search() {
       this.toPage(1);
+      this.getTotal();
     },
     toEdit(row) {
       this.curRow = row;