dedsudiyu 8 ay önce
ebeveyn
işleme
b4a91a8f6a

+ 28 - 3
src/views/integratedManagement/laboratoryManagement/subject/admissionConfiguration.vue

@@ -65,6 +65,30 @@
       subjectData: {}
     },
     data() {
+      // 不能连续字符(如123、abc)连续3位或3位以上
+      const LxStr = (rule, value, callback) => {
+        const regex = /([a-zA-Z])\1{2}/;
+        const regex2 = /(\d)\1{2}/;
+        const result = value.match(regex);
+        const result2 = value.match(regex2);
+        let arr = value.split('')
+        let flag = true
+        for (let i = 1; i < arr.length - 1; i++) {
+          let firstIndex = arr[i - 1].charCodeAt()
+          let secondIndex = arr[i].charCodeAt()
+          let thirdIndex = arr[i + 1].charCodeAt()
+          thirdIndex - secondIndex == 1
+          secondIndex - firstIndex == 1
+          if ((thirdIndex - secondIndex == 1) && (secondIndex - firstIndex == 1)) {
+            flag = false
+          }
+        }
+        if (result||result2||!flag) {
+          return callback(new Error('不能输入如:123,abc,111,aaa等形式的连续型字符'));
+        }else{
+          callback()
+        }
+      }
       return {
         //学生模板
         listStudent: [],
@@ -76,12 +100,13 @@
             { required: true, message: '请选择考勤方式', trigger: 'blur' }
           ],
           authPwd: [
-            { required: true, message: '考勤密码最少10位 最多16位,必须同时包含字母和数字', trigger: 'blur' },
+            { required: true, message: '考勤密码最少10位 最多16位,不能出现123 abc 这种连续字符,必须同时包含一个大写字母、一个小写字母、一个数字和一个特殊字符!@#*?&', trigger: 'blur' },
+            { required: true, message: "不能输入如:123,abc,111,aaa等形式的连续型字符", validator: LxStr, trigger: "blur" },
             {
-              pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d!@#*?&]{10,16}$/,
+              pattern: /^(?=(?:.*[A-Z]){1})(?=(?:.*[a-z]){1})(?=(?:.*[0-9]){1})(?=(?:.*[!@#*?&]){1})(?!(.)\1)(.{10,16})$/,
               message: '考勤密码最少10位 最多16位,必须同时包含一个大写字母、一个小写字母、一个数字和一个特殊字符!@#*?&',
               trigger: 'blur'
-            }
+            },
           ]
         }
       }

+ 1 - 1
src/views/iotDevice/appManage/applyList/batchUpDialog.vue

@@ -126,7 +126,7 @@
         }else{
           let obj = {
             id:this.typeId,
-            isAll:false,
+            isAll:false, // true.全部升级 false.勾选升级
             ids:this.ids
           }
           iotAppInfoBatchUpgrade(obj).then(response => {

+ 1 - 1
src/views/iotDevice/appManage/applyList/index.vue

@@ -559,7 +559,7 @@
             }).then(() => {
               let obj = {
                 id:row.id,
-                isAll:true,
+                isAll:true, // true.全部升级 false.勾选升级
               }
               iotAppInfoBatchUpgrade(obj).then(response => {
                 this.msgSuccess(response.message)