From 4763c3c569cfb7fd9df3abf89ee64b6f71698f49 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Fri, 28 Jun 2024 16:37:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/validate.js | 9 + src/views/system/role/index.vue | 2 +- src/views/system/user/index.vue | 327 ++++++++++++-------------------- 3 files changed, 136 insertions(+), 202 deletions(-) diff --git a/src/utils/validate.js b/src/utils/validate.js index 57a568e..00f4339 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -78,3 +78,12 @@ export function isArray(arg) { } return Array.isArray(arg) } +/** + * 密码的正则表达式 最少8个字符,最多20个字符,至少一个字母,一个数字和一个特殊字符: + * @param {string} password + * @returns {Boolean} + */ +export function validPwd(value) { + const reg = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,20}$/ + return reg.test(value) +} \ No newline at end of file diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index fb3b5ef..57aabf3 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -119,7 +119,7 @@ - + - + - + - + - + - + - - + + - + 搜索 @@ -82,56 +43,24 @@ - 新增 + 新增 - 修改 + 修改 - 删除 + 删除 - 导入 + 导入 - 导出 + 导出 @@ -139,18 +68,18 @@ - - - - + + + + - + @@ -158,28 +87,14 @@ {{ parseTime(scope.row.createTime) }} - - - 修改 - 删除 - handleCommand(command, scope.row)" v-hasPermi="['system:user:resetPwd', 'system:user:edit']"> + + + 修改 + 删除 + handleCommand(command, scope.row)" + v-hasPermi="['system:user:resetPwd', 'system:user:edit']"> 更多 - + @@ -237,7 +147,7 @@ - + @@ -245,23 +155,17 @@ - + - {{dict.label}} + {{ + dict.label + }} @@ -270,30 +174,29 @@ - + - - + + + + + + + {{dict.label}} + + + + @@ -310,18 +213,9 @@ - + 将文件拖到此处,或点击上传 @@ -329,7 +223,8 @@ 是否更新已经存在的用户数据 仅允许导入xls、xlsx格式文件。 - 下载模板 + 下载模板