浏览代码

11111111111111

chenken 6 年之前
父节点
当前提交
f0c576cdae

+ 10 - 1
src/modules/oe/component/commonForm.vue

@@ -7,7 +7,7 @@
           filterable
           remote
           :remote-method="getExams"
-          @change="getCourses"
+          @change="changeExam"
           clearable
           @clear="getExams"
           placeholder="请选择考试批次"
@@ -125,6 +125,7 @@ export default {
       if (!examName) {
         examName = "";
       }
+      this.getExamCondition.params.name = examName;
       this.$http
         .get("/api/ecs_exam_work/exam/queryByNameLike", {
           params: this.getExamCondition.params
@@ -164,6 +165,14 @@ export default {
           this.orgList = response.data;
         });
     },
+    changeExam(examId) {
+      this.examList.forEach(exam => {
+        if (exam.id == examId) {
+          this.form.examType = exam.examType;
+        }
+      });
+      this.getCourses();
+    },
     getCourses() {
       this.form.courseId = "";
       this.courseList = [];

+ 10 - 6
src/modules/oe/views/awaitingAudit.vue

@@ -107,6 +107,8 @@
             @selection-change="handleSelectionChange"
             :data="tableData"
             border
+            resizable
+            stripe
           >
             <el-table-column
               type="selection"
@@ -182,28 +184,30 @@
               prop="baiduFaceLivenessSuccessPercent"
             ></el-table-column>
             <el-table-column
+              :context="_self"
               label="操作"
               v-if="currentPagePrivileges.PENDING_OPERATE"
               fixed="right"
+              width="200"
             >
-              <template slot-scope="scope">
+              <div slot-scope="scope">
                 <el-button
                   v-if="scope.row.isWarn"
                   size="mini"
                   type="success"
                   icon="el-icon-success"
                   @click="auditPass(scope.row.dataId)"
-                  >通过</el-button
-                >
+                  >通过
+                </el-button>
                 <el-button
                   v-if="scope.row.isWarn"
                   size="mini"
                   type="danger"
                   icon="el-icon-error"
                   @click="openAuditDialog(scope.row.dataId)"
-                  >不通过</el-button
-                >
-              </template>
+                  >不通过
+                </el-button>
+              </div>
             </el-table-column>
           </el-table>
           <div class="block">

+ 4 - 2
src/modules/oe/views/examDetail.vue

@@ -119,9 +119,11 @@
               <template slot-scope="scope">
                 <el-button
                   v-show="scope.row.examType == 'ONLINE'"
+                  size="mini"
+                  type="primary"
                   @click="examPaperDetail(scope.row.courseId, scope.row.dataId)"
-                  >调卷</el-button
-                >
+                  >调卷
+                </el-button>
                 <el-button
                   v-show="
                     scope.row.examType == 'OFFLINE' && scope.row.offlineFileUrl

+ 3 - 1
src/modules/oe/views/examPaperDetail.vue

@@ -325,7 +325,7 @@ export default {
   width: 100%;
   height: 70px;
   border-collapse: collapse;
-  border-color: gray;
+  border-color: white;
 }
 .mainQuestionDiv {
   font-size: 14px;
@@ -335,9 +335,11 @@ export default {
 .el-icon-check {
   color: green;
   font-size: 16px;
+  font-weight: bold;
 }
 .el-icon-close {
   color: red;
   font-size: 16px;
+  font-weight: bold;
 }
 </style>

+ 67 - 51
src/modules/oe/views/examScheduling.vue

@@ -68,54 +68,54 @@
             </el-table-column>
             <el-table-column sortable label="采集人" prop="infoCollector">
             </el-table-column>
-            <el-table-column sortable label="完成状态">
+            <el-table-column fixed="right" sortable label="完成状态">
               <template slot-scope="scope">
                 <span
                   v-show="scope.row.finished && scope.row.examType == 'ONLINE'"
-                  >已完成</span
-                >
+                  ><el-tag type="success">已完成</el-tag>
+                </span>
                 <span
                   v-show="!scope.row.finished && scope.row.examType == 'ONLINE'"
-                  >未完成</span
-                >
+                  ><el-tag type="danger">未完成</el-tag>
+                </span>
                 <span
                   v-show="scope.row.finished && scope.row.examType == 'OFFLINE'"
-                  >已抽题</span
-                >
+                  ><el-tag type="success">已抽题</el-tag>
+                </span>
                 <span
                   v-show="
                     !scope.row.finished && scope.row.examType == 'OFFLINE'
                   "
-                  >未抽题</span
-                >
+                  ><el-tag type="danger">未抽题</el-tag>
+                </span>
               </template>
             </el-table-column>
-            <el-table-column label="操作">
+            <el-table-column fixed="right" label="操作" width="335">
               <template slot-scope="scope">
                 <el-button
                   size="mini"
-                  v-show="scope.row.examType == 'OFFLINE'"
                   type="success"
                   icon="el-icon-success"
                   @click="previewPaper(scope.row.examStudentId)"
-                  >查看考题</el-button
-                >
+                  v-if="form.examType == 'OFFLINE'"
+                  >查看考题
+                </el-button>
                 <el-button
                   size="mini"
-                  v-show="scope.row.examType == 'OFFLINE'"
                   type="success"
                   icon="el-icon-success"
                   @click="exportPaper(scope.row.examStudentId)"
-                  >下载考题</el-button
-                >
+                  v-if="form.examType == 'OFFLINE'"
+                  >下载考题
+                </el-button>
                 <el-button
                   size="mini"
-                  v-show="scope.row.examType == 'OFFLINE'"
                   type="success"
                   icon="el-icon-success"
                   @click="openUploadAnswerDialog(scope.row.examStudentId)"
-                  >上传作答</el-button
-                >
+                  v-if="form.examType == 'OFFLINE'"
+                  >上传作答
+                </el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -190,9 +190,9 @@ export default {
         studentName: null,
         isWarn: null,
         pageNo: 1,
-        pageSize: 10
+        pageSize: 10,
+        examType: ""
       },
-
       getExamCondition: {
         params: {
           name: "",
@@ -261,7 +261,7 @@ export default {
         .get("/api/ecs_oe_admin/exam/record/select/byExamStudentId", {
           params: { examStudentId: examStudentId }
         })
-        .then(function success(response) {
+        .then(response => {
           if (response.data) {
             var examRecordList = response.data;
             if (examRecordList && examRecordList.length > 0) {
@@ -270,7 +270,10 @@ export default {
                   examRecordList[0].basePaperId
               );
             } else {
-              this.$message("该考生未参加考试");
+              this.$message({
+                message: "该考生未参加考试",
+                type: "error"
+              });
             }
           }
         });
@@ -281,7 +284,7 @@ export default {
         .get("/api/ecs_oe_admin/exam/record/select/byExamStudentId", {
           params: { examStudentId: examStudentId }
         })
-        .then(function success(response) {
+        .then(response => {
           if (response.data) {
             var examRecordList = response.data;
             if (examRecordList && examRecordList.length > 0) {
@@ -302,14 +305,32 @@ export default {
                 "&$token=" +
                 token;
             } else {
-              this.$message("该考生未参加考试");
+              this.$message({
+                message: "该考生未参加考试",
+                type: "error"
+              });
             }
           }
         });
     },
     openUploadAnswerDialog(examStudentId) {
-      this.uploadAnswerDialogVisible = true;
-      this.currentOfflineExamStudentId = examStudentId;
+      this.$http
+        .get("/api/ecs_oe_admin/exam/record/data/findByExamStudentId", {
+          params: { examStudentId: examStudentId }
+        })
+        .then(response => {
+          var examRecordDataList = response.data;
+          if (examRecordDataList.length == 0) {
+            this.$message({
+              message: "该考生未参加考试",
+              type: "error"
+            });
+          } else {
+            this.uploadAnswerDialogVisible = true;
+            this.currentOfflineExamStudentId = examStudentId;
+            this.currentOfflineExamRecordId = examRecordDataList[0].id;
+          }
+        });
     },
     uploadAnswerChange(event) {
       if (event.target.files.length > 0) {
@@ -319,32 +340,27 @@ export default {
       }
     },
     doUploadAnswer() {
+      let config = {
+        headers: { "Content-Type": "multipart/form-data" }
+      };
+      let param = new FormData();
+      param.append("file", this.offlineAnswerFile);
+      param.append("examRecordDataId", this.currentOfflineExamRecordDataId);
       this.$http
-        .get("/api/ecs_oe_admin/exam/record/data/findByExamStudentId", {
-          params: { examStudentId: this.currentOfflineExamStudentId }
+        .post("/api/ecs_oe_student/offlineExam/submitPaper", param, config)
+        .then(() => {
+          this.$message({
+            message: "上传成功",
+            type: "success"
+          });
+          this.uploadAnswerDialogVisible = false;
         })
-        .then(response => {
-          debugger;
-          var examRecordDataList = response.data;
-          if (examRecordDataList.length == 0) {
-            this.$message("该考生未参加考试");
-            return;
-          }
-          let param = new FormData();
-          param.append("file", this.offlineAnswerFile);
-          var examRecordDataId = examRecordDataList[0].id;
-          param.append("examRecordDataId", examRecordDataId);
-          let config = {
-            headers: { "Content-Type": "multipart/form-data" }
-          };
-          this.$http
-            .post("/api/ecs_oe_student/offlineExam/submitPaper", param, config)
-            .then(() => {
-              debugger;
-            })
-            .catch(function(error) {
-              console.log(error);
-            });
+        .catch(function(error) {
+          console.log(error);
+          this.$message({
+            message: "上传失败",
+            type: "error"
+          });
         });
     }
   },

+ 7 - 2
src/modules/oe/views/illegalityNameList.vue

@@ -49,7 +49,7 @@
             :data="tableData"
             border
           >
-            <el-table-column sortable label="考试ID">
+            <el-table-column width="80" sortable label="考试ID">
               <template slot-scope="scope">
                 <el-button
                   v-show="currentPagePrivileges.SNAPSHOT_DETAILS"
@@ -62,7 +62,12 @@
                 </span>
               </template>
             </el-table-column>
-            <el-table-column sortable label="姓名" prop="studentName">
+            <el-table-column
+              width="80"
+              sortable
+              label="姓名"
+              prop="studentName"
+            >
             </el-table-column>
             <el-table-column sortable label="身份证号" prop="identityNumber">
             </el-table-column>