deason 3 lat temu
rodzic
commit
2e312a08b9
1 zmienionych plików z 28 dodań i 20 usunięć
  1. 28 20
      src/modules/basic/view/school_config.vue

+ 28 - 20
src/modules/basic/view/school_config.vue

@@ -206,16 +206,6 @@ export default {
         ACTION_OPTIONS: ["NOD", "SHAKE"],
         ACTION_ORDER: "RANDOM",
         ACTION_DURATION: 15,
-        properties: {
-          STUDENT_CLIENT_ACCESS_FROM_THIRD_PARTY: false,
-          SHOW_STUDENT_CLIENT_APP_QRCODE: false,
-          STUDENT_CLIENT_THIRD_PARTY_LOGIN_URL: "",
-          SHOW_QMTH_LOGO: false,
-          ID_NUMBER_PRIVATE_MODE: false,
-          APP_ENABLED: false,
-          WEIXIN_ANSWER_ENABLED: false,
-          IDENTIFICATION_OF_LIVING_BODY_SCHEME: "",
-        },
       },
       rules: {
         STUDENT_CLIENT_THIRD_PARTY_LOGIN_URL: [
@@ -304,24 +294,42 @@ export default {
     submitForm(formName) {
       this.$refs[formName].validate((valid) => {
         if (valid) {
-          this.ruleForm.properties.STUDENT_CLIENT_ACCESS_FROM_THIRD_PARTY =
+          let params = {
+            orgId: null,
+            relatedPropertyGroupIdList: [],
+            properties: {},
+          };
+          params.orgId = this.ruleForm.orgId;
+          params.relatedPropertyGroupIdList =
+            this.ruleForm.relatedPropertyGroupIdList;
+
+          params.properties.STUDENT_CLIENT_ACCESS_FROM_THIRD_PARTY =
             this.ruleForm.STUDENT_CLIENT_ACCESS_FROM_THIRD_PARTY;
-          this.ruleForm.properties.STUDENT_CLIENT_THIRD_PARTY_LOGIN_URL =
+          params.properties.STUDENT_CLIENT_THIRD_PARTY_LOGIN_URL =
             this.ruleForm.STUDENT_CLIENT_THIRD_PARTY_LOGIN_URL;
-          this.ruleForm.properties.SHOW_QMTH_LOGO =
-            this.ruleForm.SHOW_QMTH_LOGO;
-          this.ruleForm.properties.ID_NUMBER_PRIVATE_MODE =
+          params.properties.SHOW_QMTH_LOGO = this.ruleForm.SHOW_QMTH_LOGO;
+          params.properties.ID_NUMBER_PRIVATE_MODE =
             this.ruleForm.ID_NUMBER_PRIVATE_MODE;
-          this.ruleForm.properties.APP_ENABLED = this.ruleForm.APP_ENABLED;
-          this.ruleForm.properties.WEIXIN_ANSWER_ENABLED =
+          params.properties.APP_ENABLED = this.ruleForm.APP_ENABLED;
+          params.properties.WEIXIN_ANSWER_ENABLED =
             this.ruleForm.WEIXIN_ANSWER_ENABLED;
-          this.ruleForm.properties.SHOW_STUDENT_CLIENT_APP_QRCODE =
+          params.properties.SHOW_STUDENT_CLIENT_APP_QRCODE =
             this.ruleForm.SHOW_STUDENT_CLIENT_APP_QRCODE;
-          this.ruleForm.properties.IDENTIFICATION_OF_LIVING_BODY_SCHEME =
+          params.properties.IDENTIFICATION_OF_LIVING_BODY_SCHEME =
             this.ruleForm.IDENTIFICATION_OF_LIVING_BODY_SCHEME;
+          params.properties.PC_CLIENT_ENABLED = this.ruleForm.PC_CLIENT_ENABLED;
+
+          if (params.properties.PC_CLIENT_ENABLED) {
+            params.properties.ACTION_ALERT = this.ruleForm.ACTION_ALERT;
+            params.properties.ACTION_NUM = this.ruleForm.ACTION_NUM;
+            params.properties.ACTION_OPTIONS =
+              this.ruleForm.ACTION_OPTIONS.join(",");
+            params.properties.ACTION_ORDER = this.ruleForm.ACTION_ORDER;
+            params.properties.ACTION_DURATION = this.ruleForm.ACTION_DURATION;
+          }
 
           this.$httpWithMsg
-            .put(CORE_API + "/org/saveOrgProperties", this.ruleForm)
+            .put(CORE_API + "/org/saveOrgProperties", params)
             .then(
               () => {
                 this.$notify({