From 41d50b20c975faeaa9e5277bdcff13b5acecb575 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期三, 13 十二月 2023 16:57:37 +0800
Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop

---
 src/views/system/modules/PasswordModal.vue |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/src/views/system/modules/PasswordModal.vue b/src/views/system/modules/PasswordModal.vue
index f9f897e..810cc5f 100644
--- a/src/views/system/modules/PasswordModal.vue
+++ b/src/views/system/modules/PasswordModal.vue
@@ -31,6 +31,7 @@
 
 <script>
   import {changePassword} from '@/api/api'
+  import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
 
   export default {
     name: "PasswordModal",
@@ -69,6 +70,13 @@
           sm: { span: 16 },
         },
         form:this.$form.createForm(this)
+      }
+    },
+    watch:{
+      visible:{
+        handler(value){
+          if(value) this.initDictData('password_length')
+        }
       }
     },
     created () {
@@ -136,7 +144,20 @@
       handleConfirmBlur  (e) {
         const value = e.target.value
         this.confirmDirty = this.confirmDirty || !!value
-      }
+      },
+      initDictData(dictCode) {
+        //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁�
+        ajaxGetDictItems(dictCode, null).then((res) => {
+          if (res.success) {
+            const regExp = new RegExp("^(?=.*[a-zA-Z])(?=.*\\\d)(?=.*[~!@#$%^&*()_+`\\-={}:\";'<>?,./]).{"+Number(res.result[0].value)+",}$");
+            this.validatorRules.password.rules[0]={
+              required:true,
+              pattern: regExp,
+              message: `瀵嗙爜鐢�${res.result[0].value}浣嶆暟瀛椼�佸ぇ灏忓啓瀛楁瘝鍜岀壒娈婄鍙风粍鎴�!`,
+            }
+          }
+        })
+      },
     }
   }
 </script>
\ No newline at end of file

--
Gitblit v1.9.3