Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
ciic_management_sys
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
袁龙涛
ciic_management_sys
Commits
270b7b9d
提交
270b7b9d
authored
9月 02, 2020
作者:
liupengfei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
后台用户密码复杂度为大写字母小写字母和数字的组合
上级
4b9056b8
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
7 行删除
+11
-7
user_management.vue
src/views/authorizationmanage/user_management.vue
+11
-7
没有找到文件。
src/views/authorizationmanage/user_management.vue
浏览文件 @
270b7b9d
...
...
@@ -108,7 +108,7 @@
<el-form-item
v-if=
"dialogStatus==='create'"
label=
"密码:"
prop=
"password"
>
<el-input
v-model=
"temp.password"
clearable
></el-input>
</el-form-item>
<el-form-item
v-else-if=
"dialogStatus==='update'"
label=
"密码:"
:rules=
"pwdRule
"
>
<el-form-item
v-else-if=
"dialogStatus==='update'"
label=
"密码:"
prop=
"updatePassword
"
>
<el-input
v-model=
"temp.password"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"电话:"
prop=
"phone"
>
...
...
@@ -183,26 +183,29 @@ export default {
})
}
};
const
regPwd
=
/^
[
a-zA-Z0-9-_~
\!\@\#\$\%\^\&\*\(\)\+\=]{6,20}
$/
;
// const regPwd = /^[a-zA-Z0-9-_~\!\@\#\$\%\^\&\*\(\)\+\=]{6,20}$/;
const
regPwd
=
/^
((?=
.*
[
0-9
]
.*
)(?=
.*
[
A-Z
]
.*
)(?=
.*
[
a-z
]
.*
))[
0-9A-Za-z
]{6,20}
$/
;
const
validatePwd
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
length
>
20
||
value
.
length
<
6
){
callback
(
new
Error
(
`密码6-20位!现
${
value
.
length
}
位!`
))
}
else
if
(
!
regPwd
.
test
(
value
)
)
{
callback
(
new
Error
(
'请使用
字母、数字或符号“~!@#$%^&*()_+-=”的组合,
6-20个字符'
));
callback
(
new
Error
(
'请使用
大写字母,小写字母和数字的组合,
6-20个字符'
));
}
else
{
callback
()
}
};
const
validateUpdate
=
(
rule
,
value
,
callback
)
=>
{
value
=
this
.
temp
.
password
;
if
(
value
){
if
(
value
.
length
>
20
||
value
.
length
<
6
){
callback
(
new
Error
(
`密码6-20位!现
${
value
.
length
}
位!`
))
}
else
if
(
!
regPwd
.
test
(
value
)
)
{
callback
(
new
Error
(
'请使用
字母、数字或符号“~!@#$%^&*()_+-=”的组合,
6-20个字符'
));
callback
(
new
Error
(
'请使用
大写字母,小写字母和数字的组合,
6-20个字符'
));
}
else
{
callback
()
}
}
callback
();
};
const
validatePhone
=
(
rule
,
value
,
callback
)
=>
{
let
telreg
=
/^
(
13
\d
|14
[
579
]
|15
[
0-3,5-9
]
|16
[
6
]
|17
[
0135678
]
|18
\d
|19
[
89
])\d{8}
$/
;
...
...
@@ -246,13 +249,14 @@ export default {
rules
:
{
userName
:
[{
type
:
'string'
,
required
:
true
,
trigger
:
'change'
,
validator
:
validateName
}],
password
:
[{
type
:
'string'
,
required
:
true
,
trigger
:
'change'
,
validator
:
validatePwd
}],
updatePassword
:
[{
type
:
'string'
,
trigger
:
'change'
,
validator
:
validateUpdate
}],
phone
:
[{
type
:
'string'
,
required
:
true
,
trigger
:
'change'
,
validator
:
validatePhone
}],
email
:
[{
type
:
'email'
,
message
:
'请输入正确的邮箱地址'
,
trigger
:
[
'blur'
,
'change'
]
}],
deptList
:
[{
type
:
'array'
,
required
:
true
,
trigger
:
'change'
,
message
:
'未选择'
}],
roleList
:
[{
type
:
'array'
,
required
:
true
,
trigger
:
'change'
,
message
:
'未选择'
}],
isAdmin
:
[{
required
:
true
}]
},
pwdRule
:
{
trigger
:
'change'
,
validator
:
validateUpdate
}
,
pwdRule
:
[{
type
:
'string'
,
trigger
:
'change'
,
validator
:
validateUpdate
}]
,
dialogFormVisible
:
false
,
dialogPvVisible
:
false
,
sending
:
false
,
...
...
@@ -282,7 +286,7 @@ export default {
setTimeout
(
el
=>
{
let
bodyHeight
=
document
.
body
.
clientHeight
//body高度
let
topHeight
=
(
window
.
getComputedStyle
(
this
.
$refs
.
topHeight
).
height
).
replace
(
/
[^\d\.]
/g
,
''
);
//顶部高度
let
searchHeight
=
(
window
.
getComputedStyle
(
this
.
$refs
.
searchHeight
).
height
).
replace
(
/
[^\d\.]
/g
,
''
);
//检索部分高度
let
searchHeight
=
(
window
.
getComputedStyle
(
this
.
$refs
.
searchHeight
).
height
).
replace
(
/
[^\d\.]
/g
,
''
);
//检索部分高度
this
.
centerHeight
=
bodyHeight
-
topHeight
-
searchHeight
-
90
-
83
},
100
)
},
...
...
@@ -446,7 +450,7 @@ export default {
},
handleFilter
()
{
store
.
dispatch
(
'SetUserManagementSerKeys'
,
this
.
listQuery
).
then
(
res
=>
{
})
this
.
listQuery
.
pageNum
=
1
this
.
getList
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论