Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
1ed60c79
Commit
1ed60c79
authored
Jun 22, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户信息长度校验限制
parent
aee1e531
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
ruoyi-ui/src/views/system/user/index.vue
ruoyi-ui/src/views/system/user/index.vue
+9
-5
ruoyi-ui/src/views/system/user/profile/userInfo.vue
ruoyi-ui/src/views/system/user/profile/userInfo.vue
+1
-1
No files found.
ruoyi-ui/src/views/system/user/index.vue
View file @
1ed60c79
...
...
@@ -210,7 +210,7 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"用户昵称"
prop=
"nickName"
>
<el-input
v-model=
"form.nickName"
placeholder=
"请输入用户昵称"
/>
<el-input
v-model=
"form.nickName"
placeholder=
"请输入用户昵称"
maxlength=
"30"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -234,12 +234,12 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
v-if=
"form.userId == undefined"
label=
"用户名称"
prop=
"userName"
>
<el-input
v-model=
"form.userName"
placeholder=
"请输入用户名称"
/>
<el-input
v-model=
"form.userName"
placeholder=
"请输入用户名称"
maxlength=
"30"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
v-if=
"form.userId == undefined"
label=
"用户密码"
prop=
"password"
>
<el-input
v-model=
"form.password"
placeholder=
"请输入用户密码"
type=
"password"
/>
<el-input
v-model=
"form.password"
placeholder=
"请输入用户密码"
type=
"password"
maxlength=
"20"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -440,7 +440,8 @@ export default {
{
required
:
true
,
message
:
"
用户昵称不能为空
"
,
trigger
:
"
blur
"
}
],
password
:
[
{
required
:
true
,
message
:
"
用户密码不能为空
"
,
trigger
:
"
blur
"
}
{
required
:
true
,
message
:
"
用户密码不能为空
"
,
trigger
:
"
blur
"
},
{
min
:
5
,
max
:
20
,
message
:
'
用户密码长度必须介于 5 和 20 之间
'
,
trigger
:
'
blur
'
}
],
email
:
[
{
...
...
@@ -592,7 +593,10 @@ export default {
handleResetPwd
(
row
)
{
this
.
$prompt
(
'
请输入"
'
+
row
.
userName
+
'
"的新密码
'
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
cancelButtonText
:
"
取消
"
,
closeOnClickModal
:
false
,
inputPattern
:
/^.
{5,20}
$/
,
inputErrorMessage
:
"
用户密码长度必须介于 5 和 20 之间
"
,
}).
then
(({
value
})
=>
{
resetUserPwd
(
row
.
userId
,
value
).
then
(
response
=>
{
this
.
msgSuccess
(
"
修改成功,新密码是:
"
+
value
);
...
...
ruoyi-ui/src/views/system/user/profile/userInfo.vue
View file @
1ed60c79
<
template
>
<el-form
ref=
"form"
:model=
"user"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"用户昵称"
prop=
"nickName"
>
<el-input
v-model=
"user.nickName"
/>
<el-input
v-model=
"user.nickName"
maxlength=
"30"
/>
</el-form-item>
<el-form-item
label=
"手机号码"
prop=
"phonenumber"
>
<el-input
v-model=
"user.phonenumber"
maxlength=
"11"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment