Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
丽
丽人贷管理后台
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
百灵美选
丽人贷管理后台
Commits
8c506bbf
Commit
8c506bbf
authored
Jun 20, 2022
by
caimeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回滚修改用户的操作
parent
ff20ed77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
12 deletions
+69
-12
api.js
src/server/api.js
+3
-3
user.vue
src/views/admin/user.vue
+66
-9
No files found.
src/server/api.js
View file @
8c506bbf
...
...
@@ -262,11 +262,11 @@ export default {
// 用户管理
// 用户列表
userList
(
params
){
userList
(
data
){
return
request
({
url
:
'/user/searchAll'
,
method
:
'
ge
t'
,
params
method
:
'
pos
t'
,
data
})
},
// 用户详情
...
...
src/views/admin/user.vue
View file @
8c506bbf
...
...
@@ -4,18 +4,18 @@
<block-header
title=
'搜索'
/>
<div
class=
'search'
>
<el-form
ref=
'form'
label-suffix=
':'
:inline=
'true'
:model=
'queryForm'
class=
'form-inline'
>
<el-form-item
prop=
'
realName'
label=
'客户
姓名'
>
<el-form-item
prop=
'
userName'
label=
'
姓名'
>
<el-input
v-model=
'queryForm.
real
Name'
v-model=
'queryForm.
user
Name'
clearable
placeholder=
'请输入
客户
姓名'
placeholder=
'请输入姓名'
/>
</el-form-item>
<el-form-item
prop=
'
mobil
e'
label=
'手机号码'
>
<el-form-item
prop=
'
phon
e'
label=
'手机号码'
>
<el-input
v-model=
'queryForm.
mobil
e'
v-model=
'queryForm.
phon
e'
clearable
placeholder=
'请输入
客户
手机号码'
placeholder=
'请输入手机号码'
/>
</el-form-item>
<el-form-item>
...
...
@@ -53,6 +53,16 @@
<el-tag
v-if=
'row.userDutyState==="OFFLINE"'
type=
'info'
>
离线
</el-tag>
<el-tag
v-else
type=
'success'
>
在线
</el-tag>
</div>
<!--
<div
v-else-if=
"item.label==='在职离职'"
>
-->
<!--
<el-switch-->
<!-- v-model='row.status'-->
<!-- active-value='NORMAL'-->
<!-- inactive-value='LEAVE'-->
<!-- @change='(e)=>
{-->
<!-- handleSwitch(e,row)-->
<!-- }'>-->
<!--
</el-switch>
-->
<!--
</div>
-->
<span
v-else
>
{{
row
[
item
.
prop
]
}}
</span>
</
template
>
</el-table-column>
...
...
@@ -164,7 +174,13 @@
order
:
7
,
label
:
'是否在线'
,
prop
:
'userDutyState'
}
},
//{
// order: 8,
// label: '在职离职',
// prop: 'status',
//
//}
],
list
:
[],
listLoading
:
true
,
...
...
@@ -174,8 +190,8 @@
current
:
1
,
size
:
10
,
mobil
e
:
''
,
real
Name
:
''
phon
e
:
''
,
user
Name
:
''
}
}
},
...
...
@@ -294,6 +310,47 @@
message
:
'操作成功'
})
}
},
// 更新用户
async
handleSwitch
(
e
,
row
)
{
this
.
$confirm
(
'是否确认修改?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
async
(
res
)
=>
{
console
.
log
(
res
,
'是啥'
)
const
{
loginName
,
memo
,
userCell
,
userName
}
=
row
let
status
if
(
e
!==
'LEAVE'
)
{
status
=
'NORMAL'
}
else
{
status
=
'LEAVE'
}
const
result
=
await
API
.
userUpdate
({
loginName
,
memo
,
status
,
userCell
,
userName
})
if
(
result
.
success
)
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功'
})
await
this
.
fetchData
()
}
}).
catch
((
e
)
=>
{
console
.
log
(
e
,
'取消了'
)
})
}
}
}
...
...
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