From a751e547d67c4f8e2c6fddf958c1559f792515bd Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期五, 27 六月 2025 16:11:50 +0800
Subject: [PATCH] 添加工作流

---
 src/components/tools/UserPassword.vue |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/components/tools/UserPassword.vue b/src/components/tools/UserPassword.vue
index e15b51d..0067138 100644
--- a/src/components/tools/UserPassword.vue
+++ b/src/components/tools/UserPassword.vue
@@ -88,8 +88,12 @@
         username:"",
       }
     },
-    created(){
-      // this.initDictData('password_length')
+    watch:{
+      visible:{
+        handler(value){
+          if(value) this.initDictData('password_length')
+        }
+      }
     },
     methods: {
       show(uname){
@@ -103,19 +107,14 @@
         }
       },
       initDictData(dictCode) {
-        //浼樺厛浠庣紦瀛樹腑璇诲彇瀛楀吀閰嶇疆
-        if (getDictItemsFromCache(dictCode)) {
-          return getDictItemsFromCache(dictCode);
-        }
         //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁�
         ajaxGetDictItems(dictCode, null).then((res) => {
           if (res.success) {
-            const regx = new RegExp(/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{12,}$/);
+            const regExp = new RegExp("^(?=.*[a-zA-Z])(?=.*\\\d)(?=.*[~!@#$%^&*()_+`\\-={}:\";'<>?,./]).{"+Number(res.result[0].value)+",}$");
             this.validatorRules.password.rules[2]={
-              pattern: regx,
-              message: '瀵嗙爜鐢�8浣嶆暟瀛椼�佸ぇ灏忓啓瀛楁瘝鍜岀壒娈婄鍙风粍鎴�!',
+              pattern: regExp,
+              message: `瀵嗙爜鐢�${res.result[0].value}浣嶆暟瀛椼�佸ぇ灏忓啓瀛楁瘝鍜岀壒娈婄鍙风粍鎴�!`,
             }
-            return res.result
           }
         })
       },

--
Gitblit v1.9.3