Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
contractmanage
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
contractmanage
Commits
c12ac9cf
Commit
c12ac9cf
authored
Mar 03, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重置按钮
parent
e5bd749f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
9 deletions
+39
-9
user.js
src/api/user.js
+8
-0
index.vue
src/views/userInfo/index.vue
+31
-9
No files found.
src/api/user.js
View file @
c12ac9cf
...
...
@@ -8,3 +8,11 @@ export function updateUserPwd(data) {
params
:
data
})
}
// 重置
export
function
resetUser
(
user
,
data
)
{
return
request
({
url
:
'http://117.122.212.101:8090/sysuser/resetPwd/'
+
user
,
method
:
'put'
,
params
:
data
})
}
src/views/userInfo/index.vue
View file @
c12ac9cf
...
...
@@ -22,7 +22,7 @@
<el-table-column
label=
"序号"
type=
"index"
width=
"55"
/>
<el-table-column
label=
"姓名"
prop=
"USER_NAME"
show-overflow-tooltip
/>
<el-table-column
label=
"工号"
prop=
"USER_ID"
show-overflow-tooltip
/>
<el-table-column
label=
"所在部门"
prop=
"SNAME"
show-overflow-tooltip
/>
<el-table-column
label=
"所在部门"
prop=
"SNAME"
show-overflow-tooltip
/>
<el-table-column
label=
"部门编码"
prop=
"DEPT_CODE"
show-overflow-tooltip
/>
<el-table-column
width=
"180px"
label=
"操作"
>
<template
slot-scope=
"
{ row }">
...
...
@@ -45,10 +45,13 @@
</template>
<
script
>
import
{
resetUser
}
from
'@/api/user.js'
export
default
{
name
:
'UserInfo'
,
data
()
{
return
{
user
:
'admin'
,
pwdTypeMap
:
{
text
:
true
,
password
:
false
...
...
@@ -58,11 +61,6 @@ export default {
userId
:
''
,
userName
:
''
},
resetPwdDiaLog
:
false
,
ruleForm
:
{
newPassword
:
''
,
row
:
undefined
},
personData
:
[],
total
:
0
,
page
:
1
,
...
...
@@ -77,9 +75,33 @@ export default {
},
methods
:
{
handleResetPwd
(
row
)
{
this
.
ruleForm
.
newPassword
=
''
this
.
ruleForm
.
row
=
row
.
userId
this
.
resetPwdDiaLog
=
true
this
.
$confirm
(
'此操作将永久删除该文件, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
const
params
=
{
userIds
:
row
.
USER_ID
}
resetUser
(
this
.
user
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
'200'
)
{
this
.
$message
({
type
:
'success'
,
message
:
'重置成功'
})
}
else
{
this
.
$message
({
type
:
'warning'
,
message
:
res
.
data
.
message
})
}
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消重置'
})
})
},
currentPageChange
(
page
)
{
this
.
page
=
page
...
...
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