Преглед на файлове

新加控制台控制属性

lideyin преди 5 години
родител
ревизия
ef76cbc1ef
променени са 2 файла, в които са добавени 39 реда и са изтрити 14 реда
  1. 37 12
      src/modules/basic/view/clientConfig.vue
  2. 2 2
      src/modules/basic/view/sys_prop_list.vue

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

@@ -73,14 +73,20 @@
             >
           </el-checkbox-group>
         </el-form-item>
-        <el-form-item label="客户端默认大小" prop="STUDENT_CLIENT_DEFAULT_SIZE">
+        <el-form-item label="窗口默认大小" prop="STUDENT_CLIENT_DEFAULT_SIZE">
           <el-input
             v-model="ruleForm.STUDENT_CLIENT_DEFAULT_SIZE"
-            placeholder="客户端大小格式为:宽度*高度"
+            placeholder="窗口大小格式为:宽度*高度"
+            class="input-width"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="控制台配置" prop="STUDENT_CLIENT_CONSOLE_CONFIG">
+          <el-input
+            v-model="ruleForm.STUDENT_CLIENT_CONSOLE_CONFIG"
+            placeholder="系统预留,无需配置"
             class="input-width"
           ></el-input>
         </el-form-item>
-
         <el-form-item>
           <el-button
             class="btn-margin-left"
@@ -117,12 +123,14 @@ export default {
         LOGIN_TYPE: "",
         PREVENT_CHEATING_CONFIG: "",
         STUDENT_CLIENT_DEFAULT_SIZE: "",
+        STUDENT_CLIENT_CONSOLE_CONFIG: "",
         properties: {
           OE_STUDENT_SYS_NAME: "",
           LOGO_FILE_URL: "",
           LOGIN_TYPE: "",
           PREVENT_CHEATING_CONFIG: "",
-          STUDENT_CLIENT_DEFAULT_SIZE: ""
+          STUDENT_CLIENT_DEFAULT_SIZE: "",
+          STUDENT_CLIENT_CONSOLE_CONFIG: ""
         },
         loginType: [],
         preventCheatingConfig: []
@@ -161,6 +169,7 @@ export default {
           this.ruleForm.properties.OE_STUDENT_SYS_NAME = this.ruleForm.OE_STUDENT_SYS_NAME;
           this.ruleForm.properties.LOGO_FILE_URL = this.ruleForm.LOGO_FILE_URL;
           this.ruleForm.properties.STUDENT_CLIENT_DEFAULT_SIZE = this.ruleForm.STUDENT_CLIENT_DEFAULT_SIZE;
+          this.ruleForm.properties.STUDENT_CLIENT_CONSOLE_CONFIG = this.ruleForm.STUDENT_CLIENT_CONSOLE_CONFIG;
           this.ruleForm.properties.LOGIN_TYPE = this.ruleForm.LOGIN_TYPE = this.ruleForm.loginType.join(
             ","
           );
@@ -194,6 +203,8 @@ export default {
       });
     },
     initForm() {
+      this.ruleForm.orgId = this.user.rootOrgId;
+      this.ruleForm.STUDENT_CLIENT_DEFAULT_SIZE = "1400*900";
       var url =
         CORE_API +
         "/org/orgPropertiesByGroup/" +
@@ -222,29 +233,45 @@ export default {
           this.ruleForm.STUDENT_CLIENT_DEFAULT_SIZE =
             this.ruleForm.properties.STUDENT_CLIENT_DEFAULT_SIZE ||
             this.ruleForm.STUDENT_CLIENT_DEFAULT_SIZE;
+          this.ruleForm.STUDENT_CLIENT_CONSOLE_CONFIG =
+            this.ruleForm.properties.STUDENT_CLIENT_CONSOLE_CONFIG ||
+            this.ruleForm.STUDENT_CLIENT_CONSOLE_CONFIG;
+
           if (this.ruleForm.properties.LOGIN_TYPE) {
             this.ruleForm.loginType = this.ruleForm.properties.LOGIN_TYPE.split(
               ","
             );
+          } else {
+            let defaultValue = [];
+            for (let lt of LOGIN_TYPE) {
+              defaultValue.push(lt.code);
+            }
+            this.ruleForm.loginType = defaultValue;
+            console.log(defaultValue);
           }
+
           if (this.ruleForm.properties.PREVENT_CHEATING_CONFIG) {
             this.ruleForm.preventCheatingConfig = this.ruleForm.properties.PREVENT_CHEATING_CONFIG.split(
               ","
             );
+          } else {
+            let defaultValue = [];
+            for (let lt of PREVENT_CHEATING_CONFIG) {
+              defaultValue.push(lt.code);
+            }
+            this.ruleForm.preventCheatingConfig = defaultValue;
+            console.log(defaultValue);
           }
-          console.log("1111111111");
-          console.log(this.ruleForm.properties.PREVENT_CHEATING_CONFIG);
-          console.log(this.ruleForm.preventCheatingConfig);
-          console.log("21111111111");
           let fileUrl = response.data.LOGO_FILE_URL;
           let fname = "";
           if (fileUrl) {
             let lastIndex = fileUrl.lastIndexOf("/");
             let len = fileUrl.length;
             fname = fileUrl.substr(lastIndex + 1, len - lastIndex);
+            this.fileList = [{ name: fname, url: this.ruleForm.LOGO_FILE_URL }];
+          } else {
+            this.fileList = [];
           }
-
-          this.fileList = [{ name: fname, url: this.ruleForm.LOGO_FILE_URL }];
         }
       });
     },
@@ -349,8 +376,6 @@ export default {
   },
   created() {
     this.rootOrgId = this.user.rootOrgId;
-    this.ruleForm.orgId = this.user.rootOrgId;
-    this.ruleForm.STUDENT_CLIENT_DEFAULT_SIZE = "1400*900";
     this.propertyGroupId = "student.client.config";
     this.uploadAction = CORE_API + "/org/importLogo/" + this.rootOrgId;
     this.uploadHeaders = {

+ 2 - 2
src/modules/basic/view/sys_prop_list.vue

@@ -140,7 +140,7 @@
               v-model="sysPropForm.propValue"
               auto-complete="off"
               placeholder="请输入参数值"
-              maxlength="100"
+              maxlength="1000"
             />
           </el-form-item>
           <el-form-item label="描述" prop="description">
@@ -149,7 +149,7 @@
               v-model="sysPropForm.description"
               auto-complete="off"
               placeholder="请输入参数描述"
-              maxlength="100"
+              maxlength="1000"
             />
           </el-form-item>
           <el-row class="pull_center">