소스 검색

添加已结束考试

Michael Wang 4 년 전
부모
커밋
0830effc55
2개의 변경된 파일164개의 추가작업 그리고 67개의 파일을 삭제
  1. 10 1
      src/features/OnlineExam/OnlineExamHome.vue
  2. 154 66
      src/features/OnlineExam/OnlineExamList.vue

+ 10 - 1
src/features/OnlineExam/OnlineExamHome.vue

@@ -14,7 +14,11 @@
     </Breadcrumb>
 
     <div class="home">
-      <ecs-online-list :courses="courses"></ecs-online-list>
+      <ecs-online-list
+        :courses="courses"
+        :end-courses="endCourses"
+        :exam-type="examType"
+      ></ecs-online-list>
     </div>
 
     <PhoneVerifyForDD />
@@ -58,6 +62,7 @@ export default {
       previousUrl: "",
       autoCloseModal: 100000, // 直到隐私框和电话框确认通过后
       courses: [],
+      endCourses: [],
     };
   },
   computed: {
@@ -196,6 +201,10 @@ export default {
         return;
       } else {
         this.courses = examListRes.data || [];
+        if (this.examType === "ONLINE") {
+          let url = "/api/branch_ecs_oe_admin/examControl/queryExamEndList";
+          this.endCourses = (await this.$http.get(url)).data || [];
+        }
       }
 
       try {

+ 154 - 66
src/features/OnlineExam/OnlineExamList.vue

@@ -1,74 +1,151 @@
 <template>
   <div class="list">
-    <table>
-      <tbody class="list-row">
-        <tr class="list-header qm-primary-strong-text">
-          <td>课程</td>
-          <td v-if="!isEpcc" key="cc">层次</td>
-          <td v-if="!isEpcc" key="zy">专业</td>
-          <td>考试进入时间</td>
-          <td>考试时间周期</td>
-          <td>剩余考试次数</td>
-          <td style="max-width: 200px">操作</td>
-        </tr>
+    <Tabs type="card" style="overflow: visible">
+      <TabPane label="待考列表" style="z-index: -1">
+        <table>
+          <tbody class="list-row">
+            <tr class="list-header qm-primary-strong-text">
+              <td>课程</td>
+              <td v-if="!isEpcc" key="cc">层次</td>
+              <td v-if="!isEpcc" key="zy">专业</td>
+              <td>考试进入时间</td>
+              <td>考试时间周期</td>
+              <td>剩余考试次数</td>
+              <td style="max-width: 200px">操作</td>
+            </tr>
 
-        <tr v-for="course in courses" :key="course.examId + course.courseId">
-          <td>{{ course.courseName }}</td>
-          <td v-if="!isEpcc" key="cc">{{ course.courseLevel }}</td>
-          <td v-if="!isEpcc" key="zy">{{ course.specialtyName }}</td>
-          <td>
-            {{ course.startTime }} <br />
-            ~ <br />
-            {{ course.endTime }}
-          </td>
-          <td>
-            <span v-html="cycleDesc(course)" />
-          </td>
-          <td>{{ course.allowExamCount }}</td>
-          <td style="min-width: 180px">
-            <div
-              style="
-                display: grid;
-                grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
-                grid-gap: 10px;
-              "
+            <tr
+              v-for="course in courses"
+              :key="course.examId + course.courseId"
             >
-              <i-button
-                class="qm-primary-button qm-primary-button-padding-fix"
-                :disabled="
-                  disableTheCourse(course) || spinShow || enterButtonClicked
-                "
-                :title="disableTheCourse(course) ? disableReason(course) : ''"
-                @click="raceEnter(course)"
-              >
-                进入考试{{ countdown > 0 ? `(${countdown})` : "" }}
-              </i-button>
-              <i-poptip
-                v-if="!isEpcc"
-                :trigger="course.isObjScoreView ? 'hover' : 'click'"
-                placement="left"
-                class="online-exam-list-override-poptip"
-                @on-popper-show="cid = course.courseId"
-                @on-popper-hide="cid = null"
-              >
-                <i-button
-                  class="qm-primary-button qm-primary-button-padding-fix"
-                  style="width: 100%"
-                  :disabled="!course.isObjScoreView"
+              <td>{{ course.courseName }}</td>
+              <td v-if="!isEpcc" key="cc">{{ course.courseLevel }}</td>
+              <td v-if="!isEpcc" key="zy">{{ course.specialtyName }}</td>
+              <td>
+                {{ course.startTime }} <br />
+                ~ <br />
+                {{ course.endTime }}
+              </td>
+              <td>
+                <span v-html="cycleDesc(course)" />
+              </td>
+              <td>{{ course.allowExamCount }}</td>
+              <td style="min-width: 180px">
+                <div
+                  style="
+                    display: grid;
+                    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
+                    grid-gap: 10px;
+                  "
                 >
-                  客观分
-                </i-button>
-                <ecs-online-exam-result-list
-                  slot="content"
-                  :popper-show="cid === course.courseId"
-                  :exam-student-id="course.examStudentId"
-                ></ecs-online-exam-result-list>
-              </i-poptip>
-            </div>
-          </td>
-        </tr>
-      </tbody>
-    </table>
+                  <i-button
+                    class="qm-primary-button qm-primary-button-padding-fix"
+                    :disabled="
+                      disableTheCourse(course) || spinShow || enterButtonClicked
+                    "
+                    :title="
+                      disableTheCourse(course) ? disableReason(course) : ''
+                    "
+                    @click="raceEnter(course)"
+                  >
+                    进入考试{{ countdown > 0 ? `(${countdown})` : "" }}
+                  </i-button>
+                  <i-poptip
+                    v-if="!isEpcc"
+                    :trigger="course.isObjScoreView ? 'hover' : 'click'"
+                    placement="left"
+                    class="online-exam-list-override-poptip"
+                    @on-popper-show="cid = course.courseId"
+                    @on-popper-hide="cid = null"
+                  >
+                    <i-button
+                      class="qm-primary-button qm-primary-button-padding-fix"
+                      style="width: 100%"
+                      :disabled="!course.isObjScoreView"
+                    >
+                      客观分
+                    </i-button>
+                    <ecs-online-exam-result-list
+                      slot="content"
+                      :popper-show="cid === course.courseId"
+                      :exam-student-id="course.examStudentId"
+                    ></ecs-online-exam-result-list>
+                  </i-poptip>
+                </div>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </TabPane>
+      <TabPane
+        v-if="examType === 'ONLINE'"
+        label="已结束考试"
+        style="z-index: -1"
+      >
+        <table>
+          <tbody class="list-row">
+            <tr class="list-header qm-primary-strong-text">
+              <td>课程</td>
+              <td v-if="!isEpcc" key="cc">层次</td>
+              <td v-if="!isEpcc" key="zy">专业</td>
+              <td>考试进入时间</td>
+              <td>考试时间周期</td>
+              <td>剩余考试次数</td>
+              <td style="max-width: 200px">操作</td>
+            </tr>
+
+            <tr
+              v-for="course in endCourses"
+              :key="course.examId + course.courseId"
+            >
+              <td>{{ course.courseName }}</td>
+              <td v-if="!isEpcc" key="cc">{{ course.courseLevel }}</td>
+              <td v-if="!isEpcc" key="zy">{{ course.specialtyName }}</td>
+              <td>
+                {{ course.startTime }} <br />
+                ~ <br />
+                {{ course.endTime }}
+              </td>
+              <td>
+                <span v-html="cycleDesc(course)" />
+              </td>
+              <td>{{ course.allowExamCount }}</td>
+              <td style="min-width: 180px">
+                <div
+                  style="
+                    display: grid;
+                    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
+                    grid-gap: 10px;
+                  "
+                >
+                  <i-poptip
+                    v-if="!isEpcc"
+                    :trigger="course.isObjScoreView ? 'hover' : 'click'"
+                    placement="left"
+                    class="online-exam-list-override-poptip"
+                    @on-popper-show="cid = course.courseId"
+                    @on-popper-hide="cid = null"
+                  >
+                    <i-button
+                      class="qm-primary-button qm-primary-button-padding-fix"
+                      style="width: 100%"
+                      :disabled="!course.isObjScoreView"
+                    >
+                      客观分
+                    </i-button>
+                    <ecs-online-exam-result-list
+                      slot="content"
+                      :popper-show="cid === course.courseId"
+                      :exam-student-id="course.examStudentId"
+                    ></ecs-online-exam-result-list>
+                  </i-poptip>
+                </div>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </TabPane>
+    </Tabs>
 
     <Spin v-if="spinShow" size="large" fix>{{ processingMessage }}</Spin>
     <OnlineExamFaceCheckModal
@@ -120,6 +197,16 @@ export default {
         return [];
       },
     },
+    endCourses: {
+      type: Array,
+      default() {
+        return [];
+      },
+    },
+    examType: {
+      type: String,
+      default: "ONLINE",
+    },
   },
   data() {
     return {
@@ -504,6 +591,7 @@ export default {
 <style scoped>
 .list {
   border: 1px solid #eeeeee;
+  border-top: none;
   border-radius: 6px;
 }