xiatian 5 vuotta sitten
vanhempi
commit
3e84fdf03b
1 muutettua tiedostoa jossa 26 lisäystä ja 6 poistoa
  1. 26 6
      src/modules/reports/views/ExamStudentOnlineDetail.vue

+ 26 - 6
src/modules/reports/views/ExamStudentOnlineDetail.vue

@@ -23,6 +23,12 @@
               />
             </el-select>
           </el-form-item>
+          <el-form-item label="考试名称">
+            <el-input
+              placeholder="考试名称"
+              v-model="formSearch.examName"
+            ></el-input>
+          </el-form-item>
           <el-form-item>
             <el-button
               size="small"
@@ -53,7 +59,12 @@
           style="width: 100%;"
         >
           <el-table-column prop="examName" label="考试批次"> </el-table-column>
-          <el-table-column width="100" prop="examType" label="考试类型">
+          <el-table-column width="100" label="考试类型">
+            <template slot-scope="scope">
+              <div>
+                <span>{{ getExamType(scope.row.examType) }}</span>
+              </div>
+            </template>
           </el-table-column>
           <el-table-column
             width="180"
@@ -65,11 +76,11 @@
           </el-table-column>
           <el-table-column width="100" prop="onlineCount" label="在线人数">
           </el-table-column>
-          <el-table-column width="100" prop="totalCount" label="计划人数">
+          <el-table-column width="100" prop="planCount" label="计划人数">
           </el-table-column>
           <el-table-column width="100" prop="completeCount" label="完成人数">
           </el-table-column>
-          <el-table-column width="100" prop="completeRatio" label="完成率">
+          <el-table-column width="100" prop="completeRatio" label="完成率(%)">
           </el-table-column>
         </el-table>
         <div class="page pull-right">
@@ -89,7 +100,7 @@
   </section>
 </template>
 <script>
-import { REPORTS_API, CORE_API } from "@/constants/constants.js";
+import { REPORTS_API, CORE_API, EXAM_TYPE } from "@/constants/constants.js";
 import { mapState } from "vuex";
 
 export default {
@@ -100,8 +111,10 @@ export default {
       rootOrgList: [],
       paginationShow: false,
       formSearch: {
-        rootOrgId: null
+        rootOrgId: null,
+        examName: null
       },
+      examTypeList: EXAM_TYPE,
       tableData: [],
       currentPage: 1,
       pageSize: 10,
@@ -115,6 +128,13 @@ export default {
     }
   },
   methods: {
+    getExamType(examType) {
+      for (let tempExamType of this.examTypeList) {
+        if (tempExamType.value == examType) {
+          return tempExamType.label;
+        }
+      }
+    },
     back() {
       this.$router.push({
         path: "/reports/exam-student-online"
@@ -145,7 +165,7 @@ export default {
       this.loading = true;
       var url =
         REPORTS_API +
-        "/examStudentCount/page/" +
+        "/examData/page/" +
         this.currentPage +
         "/" +
         this.pageSize;