Explorar el Código

考生端展示的用户信息

deason hace 1 año
padre
commit
9d7d25e722
Se han modificado 2 ficheros con 44 adiciones y 1 borrados
  1. 7 1
      src/constants/constants.js
  2. 37 0
      src/modules/basic/view/clientConfig.vue

+ 7 - 1
src/constants/constants.js

@@ -115,11 +115,17 @@ 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: "浏览器登录" },
 ];
+//考生端展示的用户信息
+export const SHOW_INFO = [
+  { code: "STU_NAME", name: "学生姓名" },
+  { code: "STU_CODE", name: "学号" },
+  { code: "IDENTITY_NUMBER", name: "学生证件号" },
+];
 
 //活体检查 - 动作选项
 export const ACTION_OPTION_LIST = [

+ 37 - 0
src/modules/basic/view/clientConfig.vue

@@ -165,6 +165,18 @@
                 >
               </el-checkbox-group>
             </el-form-item>
+            <el-form-item label="考生端展示信息" prop="show_info_list">
+              <el-checkbox-group v-model="ruleForm.show_info_list">
+                <el-checkbox
+                  v-for="lt in showInfoList"
+                  :key="lt.code"
+                  v-model="lt.code"
+                  name="show_info_list"
+                  :label="lt.code"
+                  >{{ lt.name }}</el-checkbox
+                >
+              </el-checkbox-group>
+            </el-form-item>
 
             <el-form-item
               label="控制台配置"
@@ -446,6 +458,7 @@ import {
   STUDENT_CLIENT_VERSION,
   CORE_API,
   LOGIN_SUPPORT,
+  SHOW_INFO,
 } from "@/constants/constants.js";
 let checkWeight = (rule, value, callback) => {
   if ("0" != value && !value) {
@@ -476,6 +489,7 @@ export default {
       rootOrgList: [],
       loginTypes: LOGIN_TYPE,
       loginSupports: LOGIN_SUPPORT,
+      showInfoList: SHOW_INFO,
       propertyGroupId: "",
       preventCheatingConfigs: PREVENT_CHEATING_CONFIG,
       studentClientVersions: STUDENT_CLIENT_VERSION,
@@ -495,6 +509,8 @@ export default {
         STUDENT_CODE_LOGIN_ALIAS: "学号登录",
         IDENTITY_NUMBER_LOGIN_ALIAS: "身份证号登录",
         LOGIN_SUPPORT: "",
+        SHOW_INFO: "",
+        show_info_list: [],
         IS_CUSTOM_MENU_LOGO: "false",
         CUS_MENU_LOGO_FILE_URL: "",
         STUDENT_CLIENT_BG_PICTURE_URL: "",
@@ -510,6 +526,7 @@ export default {
           STUDENT_CODE_LOGIN_ALIAS: "学号登录",
           IDENTITY_NUMBER_LOGIN_ALIAS: "身份证号登录",
           LOGIN_SUPPORT: "",
+          SHOW_INFO: "",
           IS_CUSTOM_MENU_LOGO: "false",
           CUS_MENU_LOGO_FILE_URL: "",
           STUDENT_CLIENT_BG_PICTURE_URL: "",
@@ -724,6 +741,10 @@ export default {
               newForm.loginSupport,
               this.originalRuleForm.loginSupport
             ) &&
+            this.equalArrayIgnoreSequence(
+              newForm.show_info_list,
+              this.originalRuleForm.show_info_list
+            ) &&
             this.equalArrayIgnoreSequence(
               newForm.preventCheatingConfig,
               this.originalRuleForm.preventCheatingConfig
@@ -873,6 +894,8 @@ export default {
             this.ruleForm.loginType.join(",");
           this.ruleForm.properties.LOGIN_SUPPORT = this.ruleForm.LOGIN_SUPPORT =
             this.ruleForm.loginSupport.join(",");
+          this.ruleForm.properties.SHOW_INFO = this.ruleForm.SHOW_INFO =
+            this.ruleForm.show_info_list.join(",");
           this.ruleForm.properties.STUDENT_CODE_LOGIN_ALIAS =
             this.ruleForm.STUDENT_CODE_LOGIN_ALIAS;
           this.ruleForm.properties.IDENTITY_NUMBER_LOGIN_ALIAS =
@@ -1169,6 +1192,8 @@ export default {
           this.ruleForm.LOGIN_SUPPORT =
             this.ruleForm.properties.LOGIN_SUPPORT ||
             this.ruleForm.LOGIN_SUPPORT;
+          this.ruleForm.SHOW_INFO =
+            this.ruleForm.properties.SHOW_INFO || this.ruleForm.SHOW_INFO;
           this.ruleForm.PREVENT_CHEATING_CONFIG =
             this.ruleForm.properties.PREVENT_CHEATING_CONFIG ||
             this.ruleForm.PREVENT_CHEATING_CONFIG;
@@ -1206,6 +1231,18 @@ export default {
               this.ruleForm.properties.LOGIN_SUPPORT.split(",");
           }
 
+          if (this.ruleForm.properties.SHOW_INFO) {
+            this.ruleForm.show_info_list =
+              this.ruleForm.properties.SHOW_INFO.split(",");
+          } else {
+            // 默认值
+            let defaultValue = [];
+            for (let lt of SHOW_INFO) {
+              defaultValue.push(lt.code);
+            }
+            this.ruleForm.show_info_list = defaultValue;
+          }
+
           if (this.ruleForm.properties.PREVENT_CHEATING_CONFIG) {
             if (this.ruleForm.properties.PREVENT_CHEATING_CONFIG != "NONE") {
               this.ruleForm.preventCheatingConfig =