deason 5 жил өмнө
parent
commit
8fffa7f4f4

+ 6 - 1
src/constants/constants.js

@@ -70,7 +70,7 @@ export const NOTICE_RECEIVER_RULE_TYPE = [
   { code: "TEACHER_OF_MARK_WORK", name: "老师-按评卷老师选择" },
   { code: "COMMON_USERS_OF_ROLE", name: "老师-学习中心老师" }
 ];
-//登录方式
+//登录帐号类型
 export const LOGIN_TYPE = [
   { code: "STUDENT_CODE", name: "学号登录" },
   { code: "IDENTITY_NUMBER", name: "身份证号登录" }
@@ -88,3 +88,8 @@ export const STUDENT_CLIENT_VERSION = [
   { code: "1.0.0", name: "1.0.0" },
   { code: "2.0.0", name: "2.0.0" }
 ];
+//考生端支持的登录方
+export const LOGIN_SUPPORT = [
+  { code: "NATIVE", name: "考生端登录" },
+  { code: "BROWSER", name: "浏览器登录" }
+];

+ 46 - 5
src/modules/basic/view/clientConfig.vue

@@ -66,7 +66,7 @@
           <el-input v-show="false" v-model="ruleForm.LOGO_FILE_URL"></el-input>
         </el-form-item>
 
-        <el-form-item label="登录方式选择" prop="loginType">
+        <el-form-item label="登录帐号选择" prop="loginType">
           <el-checkbox-group v-model="ruleForm.loginType">
             <el-checkbox
               v-for="lt in loginTypes"
@@ -95,6 +95,18 @@
             class="input-width"
           ></el-input>
         </el-form-item>
+        <el-form-item label="考生端登录方式" prop="loginSupport">
+          <el-checkbox-group v-model="ruleForm.loginSupport">
+            <el-checkbox
+              v-for="lt in loginSupports"
+              name="loginSupport"
+              :label="lt.code"
+              v-model="lt.code"
+              :key="lt.code"
+              >{{ lt.name }}</el-checkbox
+            >
+          </el-checkbox-group>
+        </el-form-item>
         <el-form-item label="防作弊配置" prop="preventCheatingConfig">
           <el-checkbox-group v-model="ruleForm.preventCheatingConfig">
             <el-checkbox
@@ -156,13 +168,15 @@ import {
   LOGIN_TYPE,
   PREVENT_CHEATING_CONFIG,
   STUDENT_CLIENT_VERSION,
-  CORE_API
+  CORE_API,
+  LOGIN_SUPPORT
 } from "@/constants/constants.js";
 export default {
   data() {
     return {
       rootOrgList: [],
       loginTypes: LOGIN_TYPE,
+      loginSupports: LOGIN_SUPPORT,
       propertyGroupId: "",
       preventCheatingConfigs: PREVENT_CHEATING_CONFIG,
       studentClientVersions: STUDENT_CLIENT_VERSION,
@@ -180,6 +194,7 @@ export default {
         STUDENT_CLIENT_CONSOLE_CONFIG: "",
         STUDENT_CODE_LOGIN_ALIAS: "学号登录",
         IDENTITY_NUMBER_LOGIN_ALIAS: "身份证号登录",
+        LOGIN_SUPPORT: "",
         properties: {
           OE_STUDENT_SYS_NAME: "",
           LOGO_FILE_URL: "",
@@ -189,11 +204,13 @@ export default {
           STUDENT_CLIENT_DEFAULT_SIZE: "",
           STUDENT_CLIENT_CONSOLE_CONFIG: "",
           STUDENT_CODE_LOGIN_ALIAS: "学号登录",
-          IDENTITY_NUMBER_LOGIN_ALIAS: "身份证号登录"
+          IDENTITY_NUMBER_LOGIN_ALIAS: "身份证号登录",
+          LOGIN_SUPPORT: ""
         },
         loginType: [],
         preventCheatingConfig: [],
-        studentClientVersion: []
+        studentClientVersion: [],
+        loginSupport: []
       },
       logoDialog: false,
       uploadAction: "",
@@ -212,7 +229,15 @@ export default {
           {
             type: "array",
             required: true,
-            message: "请至少选择一个登录方式",
+            message: "请至少选择一个登录账号选择",
+            trigger: "change"
+          }
+        ],
+        loginSupport: [
+          {
+            type: "array",
+            required: true,
+            message: "请至少选择一个考生端登录方式",
             trigger: "change"
           }
         ],
@@ -253,6 +278,9 @@ export default {
           this.ruleForm.properties.LOGIN_TYPE = this.ruleForm.LOGIN_TYPE = this.ruleForm.loginType.join(
             ","
           );
+          this.ruleForm.properties.LOGIN_SUPPORT = this.ruleForm.LOGIN_SUPPORT = this.ruleForm.loginSupport.join(
+            ","
+          );
           this.ruleForm.properties.STUDENT_CODE_LOGIN_ALIAS = this.ruleForm.STUDENT_CODE_LOGIN_ALIAS;
           this.ruleForm.properties.IDENTITY_NUMBER_LOGIN_ALIAS = this.ruleForm.IDENTITY_NUMBER_LOGIN_ALIAS;
           if (
@@ -365,6 +393,9 @@ export default {
             this.ruleForm.LOGO_FILE_URL;
           this.ruleForm.LOGIN_TYPE =
             this.ruleForm.properties.LOGIN_TYPE || this.ruleForm.LOGIN_TYPE;
+          this.ruleForm.LOGIN_SUPPORT =
+            this.ruleForm.properties.LOGIN_SUPPORT ||
+            this.ruleForm.LOGIN_SUPPORT;
           this.ruleForm.PREVENT_CHEATING_CONFIG =
             this.ruleForm.properties.PREVENT_CHEATING_CONFIG ||
             this.ruleForm.PREVENT_CHEATING_CONFIG;
@@ -397,6 +428,12 @@ export default {
             console.log(defaultValue);
           }
 
+          if (this.ruleForm.properties.LOGIN_SUPPORT) {
+            this.ruleForm.loginSupport = this.ruleForm.properties.LOGIN_SUPPORT.split(
+              ","
+            );
+          }
+
           if (this.ruleForm.properties.PREVENT_CHEATING_CONFIG) {
             if (this.ruleForm.properties.PREVENT_CHEATING_CONFIG != "NONE") {
               this.ruleForm.preventCheatingConfig = this.ruleForm.properties.PREVENT_CHEATING_CONFIG.split(
@@ -601,6 +638,10 @@ export default {
               newForm.loginType,
               this.originalRuleForm.loginType
             ) &&
+            this.equalArrayIgnoreSequence(
+              newForm.loginSupport,
+              this.originalRuleForm.loginSupport
+            ) &&
             this.equalArrayIgnoreSequence(
               newForm.preventCheatingConfig,
               this.originalRuleForm.preventCheatingConfig

+ 52 - 194
src/modules/examwork/view/student.vue

@@ -3,12 +3,7 @@
     <div class="box box-info">
       <!-- 正文信息 -->
       <div class="box-body">
-        <el-form
-          :model="formSearch"
-          :inline="true"
-          ref="formSearch"
-          label-width="70px"
-        >
+        <el-form :model="formSearch" :inline="true" ref="formSearch" label-width="70px">
           <el-form-item v-if="isSuperAdmin" label="学校">
             <el-select
               v-model="formSearch.rootOrgId"
@@ -25,25 +20,13 @@
             </el-select>
           </el-form-item>
           <el-form-item label="姓名">
-            <el-input
-              placeholder="请输入姓名"
-              v-model="formSearch.name"
-              class="input"
-            ></el-input>
+            <el-input placeholder="请输入姓名" v-model="formSearch.name" class="input"></el-input>
           </el-form-item>
           <el-form-item label="学号">
-            <el-input
-              placeholder="请输入学号"
-              v-model="formSearch.studentCode"
-              class="input"
-            ></el-input>
+            <el-input placeholder="请输入学号" v-model="formSearch.studentCode" class="input"></el-input>
           </el-form-item>
           <el-form-item label="身份证">
-            <el-input
-              placeholder="请输入身份证"
-              v-model="formSearch.identityNumber"
-              class="input"
-            ></el-input>
+            <el-input placeholder="请输入身份证" v-model="formSearch.identityNumber" class="input"></el-input>
           </el-form-item>
           <el-form-item label="学习中心">
             <el-select
@@ -79,29 +62,16 @@
               type="primary"
               icon="el-icon-search"
               @click="resetPageAndSearchForm"
-              >查询</el-button
-            >
-            <el-button
-              size="small"
-              icon="el-icon-refresh"
-              @click="resetSearchForm"
-              >重置</el-button
-            >
+            >查询</el-button>
+            <el-button size="small" icon="el-icon-refresh" @click="resetSearchForm">重置</el-button>
             <el-button
               v-if="rolePrivileges.upload_student_photo"
               size="small"
               type="primary"
               icon="el-icon-upload2"
               @click="uploadPhoto"
-              >上传照片</el-button
-            >
-            <el-button
-              size="small"
-              type="primary"
-              icon="el-icon-download"
-              @click="exportStudent"
-              >导出</el-button
-            >
+            >上传照片</el-button>
+            <el-button size="small" type="primary" icon="el-icon-download" @click="exportStudent">导出</el-button>
           </el-form-item>
         </el-form>
 
@@ -115,8 +85,7 @@
           icon="el-icon-refresh"
           :disabled="noBatchSelected"
           @click="resetPassword('')"
-          >重置密码</el-button
-        >
+        >重置密码</el-button>
         <el-button
           v-if="rolePrivileges.change_student_availability"
           size="small"
@@ -124,8 +93,7 @@
           icon="el-icon-check"
           :disabled="noBatchSelected"
           @click="enableStudent('')"
-          >启用</el-button
-        >
+        >启用</el-button>
         <el-button
           v-if="rolePrivileges.change_student_availability"
           size="small"
@@ -133,25 +101,19 @@
           icon="el-icon-close"
           :disabled="noBatchSelected"
           @click="disableStudent('')"
-          >禁用</el-button
-        >
+        >禁用</el-button>
         <el-button
           v-if="rolePrivileges.reset_student_password"
           size="small"
           type="danger"
           icon="el-icon-refresh"
           @click="resetPasswordByOrgId()"
-          >重置学习中心所有学生密码</el-button
-        >
+        >重置学习中心所有学生密码</el-button>
 
         <div style="width: 100%;margin-bottom: 10px;"></div>
 
         <!-- 重置学习中心所有学生密码-->
-        <el-dialog
-          title="重置学习中心所有学生密码"
-          width="500px"
-          :visible.sync="resetPasswordByOrgIdDialog"
-        >
+        <el-dialog title="重置学习中心所有学生密码" width="500px" :visible.sync="resetPasswordByOrgIdDialog">
           <el-form
             :model="resetPasswordByOrgIdForm"
             :inline="true"
@@ -181,12 +143,8 @@
             </el-form-item>
           </el-form>
           <div style="text-align: center;margin-top: 20px;">
-            <el-button type="primary" @click="submitResetPasswordByOrgId"
-              >确 定</el-button
-            >
-            <el-button @click="resetPasswordByOrgIdDialog = false"
-              >取 消</el-button
-            >
+            <el-button type="primary" @click="submitResetPasswordByOrgId">确 定</el-button>
+            <el-button @click="resetPasswordByOrgIdDialog = false">取 消</el-button>
           </div>
         </el-dialog>
 
@@ -198,63 +156,44 @@
           @selection-change="selectChange"
         >
           <el-table-column type="selection" width="50"></el-table-column>
-          <el-table-column
-            prop="id"
-            width="100"
-            label="ID"
-            sortable
-          ></el-table-column>
+          <el-table-column prop="id" width="100" label="ID" sortable></el-table-column>
           <el-table-column label="考生" width="100">
             <template slot-scope="scope">
               <el-popover trigger="hover" placement="left">
                 <div style="font-size: 18px;font-family: 新宋体">
                   <tr>
                     <td style="color: green">姓名</td>
-                    <td style="color:purple;padding-left: 20px;">
-                      {{ scope.row.name }}
-                    </td>
+                    <td style="color:purple;padding-left: 20px;">{{ scope.row.name }}</td>
                   </tr>
                   <tr>
                     <td style="color: green">身份证号</td>
-                    <td style="color:purple;padding-left: 20px;">
-                      {{ scope.row.identityNumber }}
-                    </td>
+                    <td
+                      style="color:purple;padding-left: 20px;"
+                    >{{ scope.row.privateIdentityNumber }}</td>
                   </tr>
                   <tr>
                     <td style="color: green">学号</td>
-                    <td style="color:purple;padding-left: 20px;">
-                      {{ scope.row.studentCodeList }}
-                    </td>
+                    <td style="color:purple;padding-left: 20px;">{{ scope.row.studentCodeList }}</td>
                   </tr>
                   <tr>
                     <td style="color: green">学习中心名称</td>
-                    <td style="color:purple;padding-left: 20px;">
-                      {{ scope.row.orgName }}
-                    </td>
+                    <td style="color:purple;padding-left: 20px;">{{ scope.row.orgName }}</td>
                   </tr>
                   <tr>
                     <td style="color: green">学习中心编码</td>
-                    <td style="color:purple;padding-left: 20px;">
-                      {{ scope.row.orgCode }}
-                    </td>
+                    <td style="color:purple;padding-left: 20px;">{{ scope.row.orgCode }}</td>
                   </tr>
                   <tr>
                     <td style="color: green">手机号</td>
-                    <td style="color:purple;padding-left: 20px;">
-                      {{ scope.row.phoneNumber }}
-                    </td>
+                    <td style="color:purple;padding-left: 20px;">{{ scope.row.phoneNumber }}</td>
                   </tr>
                   <tr>
                     <td style="color: green">安全手机号</td>
-                    <td style="color:purple;padding-left: 20px;">
-                      {{ scope.row.securityPhone }}
-                    </td>
+                    <td style="color:purple;padding-left: 20px;">{{ scope.row.securityPhone }}</td>
                   </tr>
                   <tr>
                     <td style="color: green">创建时间</td>
-                    <td style="color:purple;padding-left: 20px;">
-                      {{ scope.row.creationTime }}
-                    </td>
+                    <td style="color:purple;padding-left: 20px;">{{ scope.row.creationTime }}</td>
                   </tr>
                 </div>
 
@@ -267,43 +206,18 @@
           <el-table-column label="学号">
             <span slot-scope="scope" v-html="scope.row.studentCodesStr"></span>
           </el-table-column>
-          <el-table-column
-            prop="identityNumber"
-            width
-            label="身份证"
-            sortable
-          ></el-table-column>
-          <el-table-column
-            prop="orgName"
-            width
-            label="学习中心"
-            sortable
-          ></el-table-column>
-          <el-table-column
-            prop="updateTime"
-            width="168"
-            label="更新时间"
-            sortable
-          ></el-table-column>
+          <el-table-column prop="privateIdentityNumber" width label="身份证" sortable></el-table-column>
+          <el-table-column prop="orgName" width label="学习中心" sortable></el-table-column>
+          <el-table-column prop="updateTime" width="168" label="更新时间" sortable></el-table-column>
           <el-table-column width="50" label="状态">
             <span slot-scope="scope">
               <span v-if="scope.row.enable">
-                <el-tooltip
-                  class="item"
-                  effect="dark"
-                  content="启用"
-                  placement="left"
-                >
+                <el-tooltip class="item" effect="dark" content="启用" placement="left">
                   <i class="el-icon-success" style="color:green;"></i>
                 </el-tooltip>
               </span>
               <span v-else>
-                <el-tooltip
-                  class="item"
-                  effect="dark"
-                  content="禁用"
-                  placement="left"
-                >
+                <el-tooltip class="item" effect="dark" content="禁用" placement="left">
                   <i class="el-icon-error" style="color:red;"></i>
                 </el-tooltip>
               </span>
@@ -318,8 +232,7 @@
                 plain
                 icon="el-icon-picture"
                 @click="showPhoto(scope.row)"
-                >查看照片</el-button
-              >
+              >查看照片</el-button>
               <el-button
                 v-if="
                   null != scope.row.enable &&
@@ -331,16 +244,14 @@
                 plain
                 icon="el-icon-check"
                 @click="enableStudent(scope.row)"
-                >启用</el-button
-              >
+              >启用</el-button>
               <el-button
                 v-else-if="rolePrivileges.change_student_availability"
                 size="mini"
                 type="danger"
                 icon="el-icon-close"
                 @click="disableStudent(scope.row)"
-                >禁用</el-button
-              >
+              >禁用</el-button>
 
               <el-dropdown style="margin-left: 10px;">
                 <el-button type="primary" plain size="mini">
@@ -348,16 +259,13 @@
                   <i class="el-icon-arrow-down el-icon--right"></i>
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
-                  <el-dropdown-item
-                    v-if="rolePrivileges.reset_student_password"
-                  >
+                  <el-dropdown-item v-if="rolePrivileges.reset_student_password">
                     <el-button
                       size="mini"
                       type="danger"
                       icon="el-icon-refresh"
                       @click="resetPassword(scope.row)"
-                      >重置密码</el-button
-                    >
+                    >重置密码</el-button>
                   </el-dropdown-item>
                   <el-dropdown-item>
                     <el-button
@@ -365,8 +273,7 @@
                       type="primary"
                       icon="el-icon-document"
                       @click="showStuExamDialog(scope.row)"
-                      >考试记录</el-button
-                    >
+                    >考试记录</el-button>
                   </el-dropdown-item>
                   <el-dropdown-item v-if="rolePrivileges.unbind_student_code">
                     <el-button
@@ -374,8 +281,7 @@
                       type="danger"
                       icon="el-icon-refresh"
                       @click="showUnbindStudentCode(scope.row)"
-                      >解绑学号</el-button
-                    >
+                    >解绑学号</el-button>
                   </el-dropdown-item>
                   <el-dropdown-item v-if="rolePrivileges.unbind_security_phone">
                     <el-button
@@ -383,8 +289,7 @@
                       type="danger"
                       icon="el-icon-refresh"
                       @click="unbindSecurityPhone(scope.row)"
-                      >解绑安全手机</el-button
-                    >
+                    >解绑安全手机</el-button>
                   </el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>
@@ -404,11 +309,7 @@
         </div>
 
         <!-- 解绑学号-->
-        <el-dialog
-          title="解绑学号"
-          width="50%"
-          :visible.sync="unbindStudentCodeDialog"
-        >
+        <el-dialog title="解绑学号" width="50%" :visible.sync="unbindStudentCodeDialog">
           <el-table
             :data="unbindStudentCodeData.tableData"
             border
@@ -424,8 +325,7 @@
                   type="danger"
                   @click="unbindStudentCode(scope.row)"
                   icon="el-icon-delete"
-                  >解绑</el-button
-                >
+                >解绑</el-button>
               </div>
             </el-table-column>
           </el-table>
@@ -439,12 +339,7 @@
           v-loading="stuExamLoading"
           element-loading-text="拼命加载中"
         >
-          <el-form
-            :inline="true"
-            :model="stuExamSearch"
-            label-position="right"
-            label-width="50px"
-          >
+          <el-form :inline="true" :model="stuExamSearch" label-position="right" label-width="50px">
             <el-form-item label="考试" class="pull-left">
               <el-select
                 class="input"
@@ -465,40 +360,16 @@
               </el-select>
             </el-form-item>
             <el-form-item class="pull-left">
-              <el-button
-                size="small"
-                type="primary"
-                icon="el-icon-search"
-                @click="searchStuExam"
-                >查询</el-button
-              >
+              <el-button size="small" type="primary" icon="el-icon-search" @click="searchStuExam">查询</el-button>
             </el-form-item>
           </el-form>
 
-          <el-table
-            :data="stuExamList"
-            border
-            style="width: 100%;text-align:center;"
-          >
-            <el-table-column
-              prop="studentName"
-              label="学生姓名"
-            ></el-table-column>
+          <el-table :data="stuExamList" border style="width: 100%;text-align:center;">
+            <el-table-column prop="studentName" label="学生姓名"></el-table-column>
             <el-table-column prop="studentCode" label="学号"></el-table-column>
-            <el-table-column
-              prop="identityNumber"
-              label="身份证"
-            ></el-table-column>
-            <el-table-column
-              prop="examName"
-              label="考试"
-              sortable
-            ></el-table-column>
-            <el-table-column
-              prop="courseName"
-              label="课程"
-              sortable
-            ></el-table-column>
+            <el-table-column prop="ext2" label="身份证"></el-table-column>
+            <el-table-column prop="examName" label="考试" sortable></el-table-column>
+            <el-table-column prop="courseName" label="课程" sortable></el-table-column>
             <el-table-column width="130" label="考试状态">
               <div slot-scope="scope">
                 <span v-if="null == scope.row.started"></span>
@@ -522,11 +393,7 @@
         </el-dialog>
 
         <!-- 导入照片弹窗 -->
-        <el-dialog
-          title="学生照片导入"
-          width="350px"
-          :visible.sync="photoUploadDialog"
-        >
+        <el-dialog title="学生照片导入" width="350px" :visible.sync="photoUploadDialog">
           <el-form>
             <el-row>
               <el-form-item style="margin-left:30px">
@@ -545,24 +412,15 @@
                   :auto-upload="false"
                   :multiple="false"
                 >
-                  <el-button
-                    size="small"
-                    slot="trigger"
-                    type="primary"
-                    icon="el-icon-search"
-                    >选择文件</el-button
-                  >
+                  <el-button size="small" slot="trigger" type="primary" icon="el-icon-search">选择文件</el-button>
                   <el-button
                     size="small"
                     style="margin-left:10px;"
                     type="primary"
                     icon="el-icon-check"
                     @click="submitUpload"
-                    >确认上传</el-button
-                  >
-                  <div slot="tip" class="el-upload__tip">
-                    只能上传jpg,png文件
-                  </div>
+                  >确认上传</el-button>
+                  <div slot="tip" class="el-upload__tip">只能上传jpg,png文件</div>
                 </el-upload>
               </el-form-item>
             </el-row>

+ 53 - 2
src/modules/oe/views/examSummary.vue

@@ -2,7 +2,7 @@
   <el-container>
     <el-main class="el-main-padding">
       <el-row>
-        <el-col :span="24">
+        <el-col :span="8">
           <el-form>
             <el-form-item label="考试批次">
               <el-select
@@ -26,6 +26,27 @@
             </el-form-item>
           </el-form>
         </el-col>
+        <el-col :span="16">
+          <el-form>
+            <el-form-item label="考试数据同步状态">
+              <el-progress
+                :text-inside="true"
+                :stroke-width="22"
+                :percentage="examSyncPercentage"
+                status="success"
+                style="width:200px;float:left;line-height:38px;"
+              ></el-progress>
+              <el-button
+                size="small"
+                type="primary"
+                icon="el-icon-refresh"
+                style="float:left;margin-left:20px;margin-top:4px;"
+                @click="refreshExamSyncPercentage"
+                >刷新</el-button
+              >
+            </el-form-item>
+          </el-form>
+        </el-col>
       </el-row>
       <el-row :gutter="2">
         <el-col :span="10" class="chart-border">
@@ -234,7 +255,8 @@ export default {
       lineOptions: {},
       pieOptions: {},
       exportOrgLoading: false,
-      exportCourseLoading: false
+      exportCourseLoading: false,
+      examSyncPercentage: 0
     };
   },
   computed: {
@@ -577,6 +599,35 @@ export default {
           }
           this.exportCourseLoading = false;
         });
+    },
+    refreshExamSyncPercentage() {
+      if (!this.examId) {
+        this.$notify({
+          title: "警告",
+          message: "请选择考试批次",
+          type: "warning",
+          duration: 2000
+        });
+        return false;
+      }
+      this.$http
+        .get("/api/ecs_oe_admin/examControl/getExamSyncPercentage", {
+          params: { examId: this.examId }
+        })
+        .then(response => {
+          this.examSyncPercentage = response.data;
+        })
+        .catch(res => {
+          var errorMsg = "操作失败";
+          if (res.response && res.response.data) {
+            errorMsg = res.response.data.desc;
+          }
+          this.$notify({
+            title: "提示",
+            message: errorMsg,
+            type: "error"
+          });
+        });
     }
   },
   created() {