deason 3 年 前
コミット
0c65ec8325
1 ファイル変更49 行追加6 行削除
  1. 49 6
      src/modules/basic/view/school_config.vue

+ 49 - 6
src/modules/basic/view/school_config.vue

@@ -201,11 +201,11 @@ export default {
         WEIXIN_ANSWER_ENABLED: false,
         IDENTIFICATION_OF_LIVING_BODY_SCHEME: "",
         PC_CLIENT_ENABLED: false,
-        ACTION_ALERT: 15,
-        ACTION_NUM: 2,
-        ACTION_OPTIONS: ["NOD", "SHAKE"],
-        ACTION_ORDER: "RANDOM",
-        ACTION_DURATION: 15,
+        ACTION_ALERT: "",
+        ACTION_NUM: "",
+        ACTION_OPTIONS: [],
+        ACTION_ORDER: "",
+        ACTION_DURATION: "",
       },
       rules: {
         STUDENT_CLIENT_THIRD_PARTY_LOGIN_URL: [
@@ -270,7 +270,8 @@ export default {
             newForm.SHOW_STUDENT_CLIENT_APP_QRCODE ==
               this.originalRuleForm.SHOW_STUDENT_CLIENT_APP_QRCODE &&
             newForm.IDENTIFICATION_OF_LIVING_BODY_SCHEME ==
-              this.originalRuleForm.IDENTIFICATION_OF_LIVING_BODY_SCHEME
+              this.originalRuleForm.IDENTIFICATION_OF_LIVING_BODY_SCHEME &&
+            newForm.PC_CLIENT_ENABLED == this.originalRuleForm.PC_CLIENT_ENABLED
           );
         } else {
           this.formDataChanged = false;
@@ -355,24 +356,66 @@ export default {
         this.ruleForm.orgId +
         "/" +
         this.propertyGroupId;
+
       this.$httpWithMsg.get(url).then((response) => {
         if (response) {
           this.ruleForm.STUDENT_CLIENT_ACCESS_FROM_THIRD_PARTY =
             response.data.STUDENT_CLIENT_ACCESS_FROM_THIRD_PARTY == "true";
+
           this.ruleForm.STUDENT_CLIENT_THIRD_PARTY_LOGIN_URL =
             response.data.STUDENT_CLIENT_THIRD_PARTY_LOGIN_URL;
+
           this.ruleForm.SHOW_QMTH_LOGO = response.data.SHOW_QMTH_LOGO == "true";
+
           this.ruleForm.ID_NUMBER_PRIVATE_MODE =
             response.data.ID_NUMBER_PRIVATE_MODE == "true";
 
           this.ruleForm.APP_ENABLED = response.data.APP_ENABLED == "true";
+
           this.ruleForm.WEIXIN_ANSWER_ENABLED =
             response.data.WEIXIN_ANSWER_ENABLED == "true";
+
           this.ruleForm.SHOW_STUDENT_CLIENT_APP_QRCODE =
             response.data.SHOW_STUDENT_CLIENT_APP_QRCODE == "true";
+
           this.ruleForm.IDENTIFICATION_OF_LIVING_BODY_SCHEME =
             response.data.IDENTIFICATION_OF_LIVING_BODY_SCHEME;
 
+          // 未配置时,赋默认值
+          this.ruleForm.PC_CLIENT_ENABLED =
+            "true" == response.data.PC_CLIENT_ENABLED;
+
+          if (response.data.ACTION_ALERT) {
+            this.ruleForm.ACTION_ALERT = response.data.ACTION_ALERT;
+          } else {
+            this.ruleForm.ACTION_ALERT = 15;
+          }
+
+          if (response.data.ACTION_NUM) {
+            this.ruleForm.ACTION_NUM = response.data.ACTION_NUM;
+          } else {
+            this.ruleForm.ACTION_NUM = 2;
+          }
+
+          if (response.data.ACTION_OPTIONS) {
+            this.ruleForm.ACTION_OPTIONS =
+              response.data.ACTION_OPTIONS.split(",");
+          } else {
+            this.ruleForm.ACTION_OPTIONS = ["NOD", "SHAKE"];
+          }
+
+          if (response.data.ACTION_ORDER) {
+            this.ruleForm.ACTION_ORDER = response.data.ACTION_ORDER;
+          } else {
+            this.ruleForm.ACTION_ORDER = "RANDOM";
+          }
+
+          if (response.data.ACTION_DURATION) {
+            this.ruleForm.ACTION_DURATION = response.data.ACTION_DURATION;
+          } else {
+            this.ruleForm.ACTION_DURATION = 15;
+          }
+
           this.originalRuleForm = Object.assign({}, this.ruleForm);
         } else {
           this.$notify({