Эх сурвалжийг харах

提交网考前端 代码

chenken 6 жил өмнө
parent
commit
032fac8411

+ 1 - 1
src/modules/oe/routes/routes.js

@@ -49,7 +49,7 @@ export default [
     component: examScheduling //考试进度详情
   },
   {
-    path: "/oe/captureDetail",
+    path: "/oe/captureDetail/:examRecordDataId",
     name: "captureDetail",
     component: captureDetail //抓拍详情
   }

+ 109 - 44
src/modules/oe/views/awaitingAudit.vue

@@ -87,13 +87,13 @@
               type="primary"
               :disabled="batchAuditBtnDisabled"
               @click="batchAudit('nopass');"
-              >不通过
-            </el-button>
+              >不通过</el-button
+            >
           </el-button-group>
         </el-col>
       </el-row>
-      <el-row class="margin-top-10"
-        ><el-col :span="24">
+      <el-row class="margin-top-10">
+        <el-col :span="24">
           <el-table
             v-loading="tableLoading"
             element-loading-text="数据加载中"
@@ -106,51 +106,71 @@
               type="selection"
               width="55"
               :selectable="selectable"
-            >
-            </el-table-column>
+            ></el-table-column>
             <el-table-column sortable label="考试ID">
-              <template slot-scope="scope"
-                ><el-button
+              <template slot-scope="scope">
+                <el-button
                   @click="gotoCaptureDetail(scope.row.dataId);"
                   type="text"
                   >{{ scope.row.dataId }}</el-button
-                ></template
-              >
-            </el-table-column>
-            <el-table-column sortable label="姓名" prop="studentName">
-            </el-table-column>
-            <el-table-column sortable label="身份证号" prop="identityNumber">
-            </el-table-column>
-            <el-table-column sortable label="学号" prop="studentCode">
-            </el-table-column>
-            <el-table-column sortable label="学习中心" prop="orgName">
-            </el-table-column>
-            <el-table-column sortable label="课程" prop="courseName">
-            </el-table-column>
-            <el-table-column sortable label="课程层次" prop="courseLevel">
-            </el-table-column>
-            <el-table-column sortable label="校验次数" prop="faceTotalCount">
-            </el-table-column>
-            <el-table-column sortable label="成功次数" prop="faceSuccessCount">
+                >
+              </template>
             </el-table-column>
+            <el-table-column
+              sortable
+              label="姓名"
+              prop="studentName"
+            ></el-table-column>
+            <el-table-column
+              sortable
+              label="身份证号"
+              prop="identityNumber"
+            ></el-table-column>
+            <el-table-column
+              sortable
+              label="学号"
+              prop="studentCode"
+            ></el-table-column>
+            <el-table-column
+              sortable
+              label="学习中心"
+              prop="orgName"
+            ></el-table-column>
+            <el-table-column
+              sortable
+              label="课程"
+              prop="courseName"
+            ></el-table-column>
+            <el-table-column
+              sortable
+              label="课程层次"
+              prop="courseLevel"
+            ></el-table-column>
+            <el-table-column
+              sortable
+              label="校验次数"
+              prop="faceTotalCount"
+            ></el-table-column>
+            <el-table-column
+              sortable
+              label="成功次数"
+              prop="faceSuccessCount"
+            ></el-table-column>
             <el-table-column
               sortable
               label="陌生人记录"
               prop="faceStrangerCount"
-            >
-            </el-table-column>
+            ></el-table-column>
             <el-table-column
               sortable
               label="人脸识别成功率(%)"
               prop="faceSuccessPercent"
-            >
-            </el-table-column>
+            ></el-table-column>
             <el-table-column
               sortable
               label="人脸真实性比率(%)"
               prop="baiduFaceLivenessSuccessPercent"
-            >
-            </el-table-column>
+            ></el-table-column>
             <el-table-column label="操作">
               <template slot-scope="scope">
                 <el-button
@@ -158,6 +178,7 @@
                   size="mini"
                   type="success"
                   icon="el-icon-success"
+                  @click="auditPass(scope.row.dataId);"
                   >通过</el-button
                 >
                 <el-button
@@ -166,8 +187,8 @@
                   type="danger"
                   icon="el-icon-error"
                   @click="openAuditDialog(scope.row.dataId);"
-                  >不通过
-                </el-button>
+                  >不通过</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -180,16 +201,17 @@
               :page-size="form.pageSize"
               layout="total, sizes, prev, pager, next, jumper"
               :total="total"
-            >
-            </el-pagination></div></el-col
-      ></el-row>
+            ></el-pagination>
+          </div>
+        </el-col>
+      </el-row>
       <el-dialog title="审核" :visible.sync="dialogFormVisible">
-        <auditVue :auditForm="auditForm"
-          ><div class="dialog-footer">
+        <auditVue :auditForm="auditForm">
+          <div class="dialog-footer">
             <el-button @click="dialogFormVisible = false;">取 消</el-button>
             <el-button type="primary" @click="doAudit">确 定</el-button>
-          </div></auditVue
-        >
+          </div>
+        </auditVue>
       </el-dialog>
     </el-main>
   </el-container>
@@ -259,6 +281,7 @@ export default {
         return false;
       }
       this.tableLoading = true;
+      var params = this.form;
       this.$http
         .post("/api/ecs_oe_admin/exam/record/waiting/audit/list", this.form)
         .then(response => {
@@ -269,6 +292,9 @@ export default {
             this.tableData = [];
           }
           this.tableLoading = false;
+          this.$router.push({
+            path: "/oe/awaitingAudit?" + new URLSearchParams(params)
+          });
         });
     },
     selectable(row) {
@@ -287,7 +313,8 @@ export default {
     /**
      * 当前页改变时触发
      */
-    handleCurrentChange() {
+    handleCurrentChange(val) {
+      this.form.pageNo = val;
       this.search();
     },
     batchAudit(operate) {
@@ -342,8 +369,28 @@ export default {
           this.search();
         });
     },
+    /**
+     * 审核通过
+     */
+    auditPass(examRecordDataId) {
+      var auditParams = {
+        examRecordDataId: examRecordDataId,
+        isPass: true
+      };
+      var param = new URLSearchParams(auditParams);
+      this.$http
+        .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
+        .then(() => {
+          this.search();
+          this.$notify({
+            title: "成功",
+            message: "操作成功",
+            type: "success"
+          });
+        });
+    },
     gotoCaptureDetail(examRecordDataId) {
-      alert(examRecordDataId);
+      this.$router.push({ path: "/oe/captureDetail/" + examRecordDataId });
     }
   },
   watch: {
@@ -351,7 +398,25 @@ export default {
       this.batchAuditBtnDisabled = !(this.multipleSelection.length > 0);
     }
   },
-  created() {}
+  created() {
+    var formData = this.$route.query;
+    if (formData && formData.examId) {
+      for (var attr in formData) {
+        var value = formData[attr];
+        if (value && value != "null") {
+          if (!isNaN(value)) {
+            if (~~value == value) {
+              value = parseInt(value);
+            } else {
+              value = parseFloat(value);
+            }
+          }
+          this.form[attr] = value;
+        }
+      }
+      this.search();
+    }
+  }
 };
 </script>
 <style scoped>

+ 83 - 40
src/modules/oe/views/captureDetail.vue

@@ -4,13 +4,13 @@
     <el-main>
       <el-row>
         <el-col :span="6">
-          <img :src="studentBasePhotoPath" alt="" width="180" />
+          <img :src="studentBasePhotoPath" alt width="180" />
         </el-col>
         <el-col :span="18">
           <el-row>
-            <el-col :span="16" class="capture-title"
-              ><span>监考数据ID:{{ examRecordDataId }}</span></el-col
-            >
+            <el-col :span="16" class="capture-title">
+              <span>监考数据ID:{{ examRecordDataId }}</span>
+            </el-col>
             <el-col :span="8" style="text-align: right;">
               <el-button
                 v-if="showAudit"
@@ -18,6 +18,7 @@
                 icon="el-icon-success"
                 circle
                 title="通过"
+                @click="auditPass"
               ></el-button>
 
               <el-button
@@ -33,26 +34,38 @@
                 type="info"
                 title="返回"
                 circle
-              ></el-button
-            ></el-col>
+                @click="back"
+              ></el-button>
+            </el-col>
           </el-row>
           <el-row class="margin-top-10">
             <el-col :span="24">
               <el-table :data="examAuditData" border>
-                <el-table-column sortable label="学号" prop="studentCode">
-                </el-table-column>
+                <el-table-column
+                  sortable
+                  label="学号"
+                  prop="studentCode"
+                ></el-table-column>
                 <el-table-column
                   sortable
                   label="身份证号"
                   prop="identityNumber"
-                >
-                </el-table-column>
-                <el-table-column sortable label="姓名" prop="studentName">
-                </el-table-column>
-                <el-table-column sortable label="课程代码" prop="courseCode">
-                </el-table-column>
-                <el-table-column sortable label="课程名称" prop="courseName">
-                </el-table-column>
+                ></el-table-column>
+                <el-table-column
+                  sortable
+                  label="姓名"
+                  prop="studentName"
+                ></el-table-column>
+                <el-table-column
+                  sortable
+                  label="课程代码"
+                  prop="courseCode"
+                ></el-table-column>
+                <el-table-column
+                  sortable
+                  label="课程名称"
+                  prop="courseName"
+                ></el-table-column>
               </el-table>
             </el-col>
           </el-row>
@@ -63,41 +76,39 @@
                   sortable
                   label="校验次数"
                   prop="faceTotalCount"
-                >
-                </el-table-column>
+                ></el-table-column>
                 <el-table-column
                   sortable
                   label="成功次数"
                   prop="faceSuccessCount"
-                >
-                </el-table-column>
+                ></el-table-column>
                 <el-table-column
                   sortable
                   label="陌生人"
                   prop="faceStrangerCount"
-                >
-                </el-table-column>
+                ></el-table-column>
                 <el-table-column
                   sortable
                   label="成功率(%)"
                   prop="faceSuccessPercent"
-                >
-                </el-table-column>
+                ></el-table-column>
                 <el-table-column
                   sortable
                   label="违纪类型"
                   prop="disciplineType"
-                >
-                </el-table-column>
+                ></el-table-column>
                 <el-table-column
                   sortable
                   label="违纪说明"
                   prop="disciplineDetail"
-                >
-                </el-table-column>
-                <el-table-column sortable label="审核结果" prop="status">
-                </el-table-column> </el-table
-            ></el-col>
+                ></el-table-column>
+                <el-table-column
+                  sortable
+                  label="审核结果"
+                  prop="status"
+                ></el-table-column>
+              </el-table>
+            </el-col>
           </el-row>
           <el-row class="margin-top-10 photorow">
             <el-col
@@ -108,19 +119,19 @@
             >
               <div class="photo-nopass" v-show="item.pass">通过</div>
               <div class="photo-nopass" v-show="!item.pass">不通过</div>
-              <img class="photo" :src="item.fileUrl" alt="" width="200" />
+              <img class="photo" :src="item.fileUrl" alt width="200" />
               <div class="photo-stranger" v-show="item.stranger">陌生人</div>
             </el-col>
           </el-row>
         </el-col>
       </el-row>
       <el-dialog title="审核" :visible.sync="dialogFormVisible">
-        <auditVue :auditForm="auditForm"
-          ><div class="dialog-footer">
+        <auditVue :auditForm="auditForm">
+          <div class="dialog-footer">
             <el-button @click="dialogFormVisible = false;">取 消</el-button>
-            <el-button type="primary" @click="doAudit">确 定</el-button>
-          </div></auditVue
-        >
+            <el-button type="primary" @click="doAuditNoPass">确 定</el-button>
+          </div>
+        </auditVue>
       </el-dialog>
     </el-main>
   </el-container>
@@ -185,6 +196,25 @@ export default {
         }
       });
     },
+    /**
+     * 审核通过
+     */
+    auditPass() {
+      var auditParams = {
+        examRecordDataId: this.examRecordDataId,
+        isPass: true
+      };
+      var param = new URLSearchParams(auditParams);
+      this.$http
+        .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
+        .then(() => {
+          this.$notify({
+            title: "成功",
+            message: "操作成功",
+            type: "success"
+          });
+        });
+    },
     openAuditDialog() {
       this.dialogFormVisible = true;
       this.auditForm = {
@@ -194,11 +224,24 @@ export default {
         isPass: false
       };
     },
-    doAudit() {}
+    doAuditNoPass() {
+      var param = new URLSearchParams(this.auditForm);
+      this.$http
+        .post("/api/ecs_oe_admin/exam/audit/single/audit", param)
+        .then(() => {
+          this.$notify({
+            title: "成功",
+            message: "操作成功",
+            type: "success"
+          });
+        });
+    },
+    back() {
+      this.$router.back();
+    }
   },
   created() {
-    //this.examRecordDataId = this.$route.query.examRecordDataId;
-    this.examRecordDataId = 1136;
+    this.examRecordDataId = this.$route.params.examRecordDataId;
     this.getExamAuditData();
     this.listExamCapture();
   }

+ 73 - 4
src/modules/oe/views/reexamine.vue

@@ -34,8 +34,12 @@
             <el-table-column sortable label="课程层次" prop="courseLevel">
             </el-table-column>
             <el-table-column label="操作">
-              <template>
-                <el-button size="mini" type="success" icon="el-icon-success"
+              <template slot-scope="scope">
+                <el-button
+                  size="mini"
+                  type="info"
+                  @click="openReexamineDialog(scope.row.examStudentId);"
+                  icon="el-icon-info"
                   >设置重考</el-button
                 >
               </template>
@@ -53,6 +57,37 @@
             >
             </el-pagination></div></el-col
       ></el-row>
+      <el-dialog title="设置重考" :visible.sync="dialogFormVisible">
+        <el-form :model="reexamineForm">
+          <el-form-item label="重考理由">
+            <el-select
+              v-model="reexamineForm.reexamineType"
+              placeholder="请选择"
+            >
+              <el-option
+                v-for="item in reexamineTypeList"
+                :key="item.name"
+                :label="item.desc"
+                :value="item.name"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="详情描述">
+            <el-input
+              v-model="reexamineForm.reexamineDetail"
+              type="textarea"
+              :autosize="{ minRows: 6, maxRows: 10 }"
+              placeholder="请输入内容"
+            >
+            </el-input>
+          </el-form-item>
+          <div class="dialog-footer">
+            <el-button @click="dialogFormVisible = false;">取 消</el-button>
+            <el-button type="primary" @click="doSetReexamine">确 定</el-button>
+          </div>
+        </el-form>
+      </el-dialog>
     </el-main>
   </el-container>
 </template>
@@ -63,6 +98,7 @@ export default {
   components: { commonFormVue },
   data() {
     return {
+      dialogFormVisible: false,
       total: 0,
       tableLoading: false,
       form: {
@@ -84,7 +120,11 @@ export default {
         pageNo: 1,
         pageSize: 10
       },
-
+      reexamineForm: {
+        examStudentId: "",
+        reexamineType: "",
+        reexamineDetail: ""
+      },
       getExamCondition: {
         params: {
           name: "",
@@ -92,7 +132,12 @@ export default {
         },
         filterCondition: ""
       },
-      tableData: []
+      tableData: [],
+      reexamineTypeList: [
+        { desc: "断电", name: "POWER_FAILURE" },
+        { desc: "机器故障", name: "MACHINE_STOPPAGE" },
+        { desc: "其他", name: "OTHER" }
+      ]
     };
   },
   computed: {
@@ -140,6 +185,30 @@ export default {
      */
     handleCurrentChange() {
       this.search();
+    },
+    openReexamineDialog(examStudentId) {
+      this.dialogFormVisible = true;
+      this.reexamineForm = {
+        examStudentId: examStudentId,
+        reexamineType: "",
+        reexamineDetail: ""
+      };
+    },
+    doSetReexamine() {
+      var param = new URLSearchParams({
+        examStudentId: this.reexamineForm.examStudentId
+      });
+      this.$http
+        .post("/api/ecs_oe_admin/exam/student/reexamine", param)
+        .then(() => {
+          this.$notify({
+            title: "成功",
+            message: "操作成功",
+            type: "success"
+          });
+          this.dialogFormVisible = false;
+          this.search();
+        });
     }
   },
   created() {}