Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saas-manage
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chehuidong
saas-manage
Commits
0d1fb809
Commit
0d1fb809
authored
Feb 07, 2023
by
chehuidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bh
parent
d3051cd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
111 deletions
+90
-111
src/views/system/users.vue
+90
-111
No files found.
src/views/system/users.vue
View file @
0d1fb809
...
...
@@ -619,12 +619,14 @@ export default {
},
methods
:
{
spentChange
(
v
,
item
)
{
axios
.
post
(
'platform/user/update'
,
{
...
item
,
cost
:
v
,
}).
then
(()
=>
{
this
.
getList
()
})
axios
.
post
(
'platform/user/update'
,
{
...
item
,
cost
:
v
,
})
.
then
(()
=>
{
this
.
getList
()
})
},
cellClass
({
row
})
{
if
(
row
.
authAuditFlag
===
1
)
{
...
...
@@ -640,12 +642,6 @@ export default {
},
authorization
(
item
,
e
)
{
e
&&
e
.
stopPropagation
()
axios
.
post
(
'sysDeviceInfo/auditApply'
,
{
id
:
item
.
id
,
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
res
.
message
)
this
.
getList
()
})
},
authorizationDel
(
item
,
e
)
{
e
&&
e
.
stopPropagation
()
...
...
@@ -654,23 +650,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
axios
.
post
(
'sysDeviceInfo/delApply'
,
{
id
:
item
.
id
,
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
res
.
message
)
this
.
getList
()
})
})
.
then
(()
=>
{})
.
catch
(()
=>
{})
},
getRoleList
(
userId
)
{
axios
.
post
(
'sysDeviceInfo/getList'
,
{
userId
}).
then
(
(
res
)
=>
{
this
.
details
=
res
.
data
},
)
},
resetPwd
(
e
,
row
)
{
e
&&
e
.
stopPropagation
()
this
.
$confirm
(
'确认要重置密码?'
,
'提示'
,
{
...
...
@@ -679,25 +662,27 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
axios
.
post
(
'platform/user/resetPassword/'
+
row
.
id
).
then
(
(
res
)
=>
{
axios
.
post
(
'platform/user/resetPassword/'
+
row
.
id
)
.
then
((
res
)
=>
{
this
.
$alert
(
'重置成功
\
n
\
r 新密码为:'
+
res
.
data
.
passWord
,
)
},
)
})
})
.
catch
(()
=>
{})
},
enableChange
(
val
,
row
)
{
axios
.
post
(
'platform/user/setEnableStatus'
,
{
enable
:
val
,
userId
:
row
.
id
,
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
res
.
message
)
this
.
getList
()
})
axios
.
post
(
'platform/user/setEnableStatus'
,
{
enable
:
val
,
userId
:
row
.
id
,
})
.
then
((
res
)
=>
{
this
.
$message
.
success
(
res
.
message
)
this
.
getList
()
})
},
bindChange
(
row
)
{
if
(
!
this
.
roleShow
(
'lock_device'
))
{
...
...
@@ -705,13 +690,15 @@ export default {
return
}
axios
.
post
(
'platform/user/setBindingStatus'
,
{
bindStatus
:
!
row
.
bindStatus
,
userId
:
row
.
id
,
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
res
.
message
)
this
.
getList
()
})
axios
.
post
(
'platform/user/setBindingStatus'
,
{
bindStatus
:
!
row
.
bindStatus
,
userId
:
row
.
id
,
})
.
then
((
res
)
=>
{
this
.
$message
.
success
(
res
.
message
)
this
.
getList
()
})
},
setempNo
(
id
)
{
for
(
const
iterator
of
this
.
employee
)
{
...
...
@@ -729,7 +716,6 @@ export default {
currentTabFn
(
val
)
{
if
(
val
.
row
)
{
this
.
formId
=
val
.
row
.
id
this
.
getRoleList
(
val
.
row
.
id
)
}
},
// 修改新增
...
...
@@ -743,35 +729,37 @@ export default {
if
(
!
this
.
formId
)
{
return
this
.
$message
(
'请勾选至少一条记录'
)
}
axios
.
get
(
'platform/user/axios.get'
,
{
id
:
v
.
id
,
}).
then
((
res
)
=>
{
const
funcRoleIds
=
[]
const
dataRoleIds
=
[]
if
(
res
.
data
.
roleIds
)
{
const
roleIds
=
res
?.
data
?.
roleIds
.
split
(
','
)
||
[]
for
(
const
iterator
of
roleIds
)
{
const
item
=
this
.
roleList
.
find
(
(
item
)
=>
item
.
id
===
iterator
,
)
if
(
item
)
{
if
(
item
.
type
===
'FUNCTION_ROLE'
)
{
funcRoleIds
.
push
(
Number
(
iterator
))
}
else
{
dataRoleIds
.
push
(
Number
(
iterator
))
axios
.
get
(
'platform/user/axios.get'
,
{
id
:
v
.
id
,
})
.
then
((
res
)
=>
{
const
funcRoleIds
=
[]
const
dataRoleIds
=
[]
if
(
res
.
data
.
roleIds
)
{
const
roleIds
=
res
?.
data
?.
roleIds
.
split
(
','
)
||
[]
for
(
const
iterator
of
roleIds
)
{
const
item
=
this
.
roleList
.
find
(
(
item
)
=>
item
.
id
===
iterator
,
)
if
(
item
)
{
if
(
item
.
type
===
'FUNCTION_ROLE'
)
{
funcRoleIds
.
push
(
Number
(
iterator
))
}
else
{
dataRoleIds
.
push
(
Number
(
iterator
))
}
}
}
}
}
this
.
addcurrencyform
=
{
...
res
.
data
,
funcRoleIds
,
dataRoleIds
,
}
this
.
dialogVisible
=
true
})
this
.
addcurrencyform
=
{
...
res
.
data
,
funcRoleIds
,
dataRoleIds
,
}
this
.
dialogVisible
=
true
})
}
else
{
this
.
addcurrencyform
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
addcurrencyform2
),
...
...
@@ -801,33 +789,22 @@ export default {
getList
()
{
const
{
pageSize
,
currentPage
}
=
this
.
paginationOptions
axios
.
post
(
'platform/user/list_page'
,
{
pageSize
,
currentPage
,
...
this
.
searchForm
,
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
sourceData
=
res
.
data
.
records
this
.
paginationOptions
.
total
=
res
.
data
.
total
if
(
this
.
sourceData
.
length
>
0
)
{
this
.
$nextTick
(()
=>
{
let
row
if
(
this
.
formId
)
{
row
=
this
.
sourceData
.
find
(
(
item
)
=>
item
.
id
===
this
.
formId
,
)
}
else
{
row
=
this
.
sourceData
[
0
]
}
this
.
getRoleList
(
row
.
id
)
axios
.
post
(
'platform/user/list_page'
,
{
pageSize
,
currentPage
,
...
this
.
searchForm
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
sourceData
=
res
.
data
.
records
this
.
paginationOptions
.
total
=
res
.
data
.
total
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
,
})
}
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
,
})
}
})
})
},
// 修改
...
...
@@ -916,21 +893,23 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
axios
.
get
(
'platform/user/delete'
,
{
ids
:
ids
,
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
,
})
this
.
getList
(
this
.
currentPage
)
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
,
})
}
})
axios
.
get
(
'platform/user/delete'
,
{
ids
:
ids
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
,
})
this
.
getList
(
this
.
currentPage
)
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
,
})
}
})
})
.
catch
(()
=>
{})
},
...
...
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