Explorar o código

Merge branch 'master' of http://120.26.64.82:3000/BFFE/Foshan4A4.0

zhaoke %!s(int64=3) %!d(string=hai) anos
pai
achega
a31c18df1c

+ 5 - 3
src/utils/validate.js

@@ -232,8 +232,10 @@ export function findarrays(ar, feature, v) {
     var atxt = ar[i][feature];
     var btxt = v;
     var type = 0;
-    if (atxt.match(btxt) == btxt) {
-      type = 1;
+    if (atxt) {
+      if (atxt.match(btxt) == btxt) {
+        type = 1;
+      }
     }
     if (type == 1) {
       arr.push(ar[i]);
@@ -279,7 +281,7 @@ function getRealLength(string) {
     charCode = -1
   for (let i = 0; i < len; i++) {
     charCode = string.charCodeAt(i)
-    if (charCode >=0 && charCode <= 128) {
+    if (charCode >= 0 && charCode <= 128) {
       realLength += 1
     } else {
       realLength += 2

+ 1 - 1
src/views/accountGroupManagement/components/accountGroupEdit.vue

@@ -193,7 +193,7 @@ export default {
           { validator: lengthValidator, max: 32, message: '最多输入32个字符', trigger: ['change', 'blur'] }
         ],
         desc: [
-          { validator: lengthValidator, max: 200, message: '最多输入200个字符', trigger: ['change', 'blur'] }
+          { validator: lengthValidator, max: 128, message: '最多输入128个字符', trigger: ['change', 'blur'] }
         ]
       },
       defaultProps: {

+ 2 - 3
src/views/authorityManagement/components/authorityRoleAdd.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-29 16:31:31
- * @LastEditTime: 2022-03-15 09:45:54
+ * @LastEditTime: 2022-03-15 16:40:03
  * @LastEditors: your name
  * @Description: 新增/编辑角色
  * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\authorityRoleStatus.vue
@@ -73,8 +73,7 @@ export default {
           { validator: lengthValidator, max: 32, message: '最多输入32个字符', trigger: ['change', 'blur'] }
         ],
         app: [
-          { required: true, message: "请输入描述", trigger: "blur" },
-          { validator: lengthValidator, max: 200, message: '长度在 1到 200 个字符', trigger: ['change', 'blur'] }
+          { validator: lengthValidator, max: 128, message: '最多输入128个字符', trigger: ['change', 'blur'] }
         ],
       },
       permission: false,

+ 2 - 3
src/views/authorityManagement/components/authorityRoleEdit.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-29 16:31:31
- * @LastEditTime: 2022-03-15 09:45:31
+ * @LastEditTime: 2022-03-15 16:39:51
  * @LastEditors: your name
  * @Description: 新增/编辑角色
  * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\authorityRoleStatus.vue
@@ -80,8 +80,7 @@ export default {
           { validator: lengthValidator, max: 32, message: '最多输入32个字符', trigger: ['change', 'blur'] }
         ],
         app: [
-          { required: true, message: "请输入描述", trigger: "blur" },
-          { validator: lengthValidator, max: 200, message: '长度在 1到 200 个字符', trigger: ['change', 'blur'] }
+          { validator: lengthValidator, max: 128, message: '最多输入128个字符', trigger: ['change', 'blur'] }
         ],
       },
       loading: false,

+ 2 - 2
src/views/organizationManagement/components/organizationAdd.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-29 11:26:07
- * @LastEditTime: 2022-03-15 09:32:44
+ * @LastEditTime: 2022-03-15 11:50:58
  * @LastEditors: your name
  * @Description:新增组织
  * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\authorityPower.vue
@@ -103,7 +103,7 @@ export default {
           { validator: lengthValidator, max: 32, message: '最多输入32个字符', trigger: ['change', 'blur'] }
         ],
         id: [{ required: true, message: "请输入标识符", trigger: "blur" }],
-        app: [{ validator: lengthValidator, max: 200, message: '最多输入200个字符', trigger: ['change', 'blur'] }],
+        app: [{ validator: lengthValidator, max: 128, message: '最多输入128个字符', trigger: ['change', 'blur'] }],
         oneCode: [{ validator: lengthValidator, max: 2, message: '最多输入2个字符', trigger: ['change', 'blur'] }],
         twoCode: [{ validator: lengthValidator, max: 3, message: '最多输入3个字符', trigger: ['change', 'blur'] }],
         threeCode: [{ validator: lengthValidator, max: 8, message: '最多输入8个字符', trigger: ['change', 'blur'] }],

+ 2 - 2
src/views/organizationManagement/components/organizationEdit.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2021-11-29 11:26:07
- * @LastEditTime: 2022-03-15 09:41:12
+ * @LastEditTime: 2022-03-15 11:51:07
  * @LastEditors: your name
  * @Description:新增组织
  * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\authorityPower.vue
@@ -103,7 +103,7 @@ export default {
           { validator: lengthValidator, max: 32, message: '最多输入32个字符', trigger: ['change', 'blur'] }
         ],
         id: [{ required: true, message: "请输入标识符", trigger: "blur" }],
-        app: [{ validator: lengthValidator, max: 200, message: '最多输入200个字符', trigger: ['change', 'blur'] }],
+        app: [{ validator: lengthValidator, max: 128, message: '最多输入128个字符', trigger: ['change', 'blur'] }],
         oneCode: [{ validator: lengthValidator, max: 2, message: '最多输入2个字符', trigger: ['change', 'blur'] }],
         twoCode: [{ validator: lengthValidator, max: 3, message: '最多输入3个字符', trigger: ['change', 'blur'] }],
         threeCode: [{ validator: lengthValidator, max: 8, message: '最多输入8个字符', trigger: ['change', 'blur'] }],

+ 5 - 0
src/views/systemManagement/EditSystem/index.vue

@@ -306,6 +306,11 @@ export default {
             isSave = false;
           }
         });
+      } else {
+        if (this.isValidIP(ipArr[0]) == false) {
+          this.$message.error("请输入正确IP段,并以;号隔开");
+          isSave = false;
+        }
       }
 
       this.$refs["ruleForm"].validate((valid) => {

+ 8 - 0
src/views/systemManagement/addSystem/index.vue

@@ -291,6 +291,11 @@ export default {
             isSave = false;
           }
         });
+      } else {
+        if (this.isValidIP(ipArr[0]) == false) {
+          this.$message.error("请输入正确IP段,并以;号隔开");
+          isSave = false;
+        }
       }
       this.$refs["ruleForm"].validate((valid) => {
         if (valid && isSave) {
@@ -339,6 +344,9 @@ export default {
               const arrs = this.arrList.flat();
               const msgs = _.unionBy(arrs, "UserId");
               this.FormData.Unuselist = msgs;
+              this.FormData.Unuselist = this.FormData.Unuselist.filter(
+                (i) => i.UserName
+              );
               this.dataList = msgs;
               this.total = num;
               this.loading = false;