Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
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
张伯涛
NLT-e-cigarette
Commits
82c1223e
Commit
82c1223e
authored
Jul 26, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
a2b1392e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
index.vue
src/views/system/user/index.vue
+13
-9
No files found.
src/views/system/user/index.vue
View file @
82c1223e
...
...
@@ -725,6 +725,7 @@ export default {
optionsList
:
[],
// 子部门信息
deptChildren
:
[],
apiRoleIds
:
[],
// 接口返回的角色
// 表单参数
form
:
{
deptId
:
''
,
...
...
@@ -1065,6 +1066,7 @@ export default {
getUser
(
userId
).
then
(
response
=>
{
this
.
open
=
true
this
.
form
=
response
.
data
this
.
apiRoleIds
=
response
.
data
.
roleIds
if
(
this
.
form
.
nltStartDate
)
{
this
.
form
.
nltStartDate
=
this
.
form
.
nltStartDate
.
substring
(
0
,
10
)
}
...
...
@@ -1074,7 +1076,7 @@ export default {
const
list
=
response
.
data
.
roleIds
.
split
(
','
).
map
(
num
=>
{
return
Number
(
num
)
})
// 接口返回的用户角色详情
this
.
optionsList
=
this
.
roleOptions
.
map
(
item
=>
item
.
businessId
)
// 当前启用角色[]
const
allList
=
this
.
allRoleOptions
.
map
(
item
=>
item
.
businessId
)
// 所有角色[]包括停用的
this
.
stopUseList
=
allList
.
filter
(
item
=>
{
this
.
stopUseList
=
allList
.
filter
(
item
=>
{
// 当前停用的角色
if
(
this
.
optionsList
.
includes
(
item
))
{
return
false
}
else
{
...
...
@@ -1139,14 +1141,16 @@ export default {
this
.
confirmLoading
=
true
if
(
this
.
form
.
businessId
!==
undefined
)
{
console
.
log
(
'form'
,
this
.
form
.
roleList
)
this
.
form
.
roleList
.
forEach
(
item
=>
{
if
(
this
.
optionsList
.
includes
(
item
))
{
console
.
log
(
'1'
)
}
else
{
this
.
stopFlag
=
true
}
})
console
.
log
(
'this.stopFlag'
,
this
.
stopFlag
)
if
(
this
.
apiRoleIds
)
{
this
.
form
.
roleList
.
forEach
(
item
=>
{
if
(
this
.
optionsList
.
includes
(
item
))
{
console
.
log
(
'1'
)
}
else
{
this
.
stopFlag
=
true
// 当前角色里有非启用的角色
}
})
}
console
.
log
(
'this.stopFlag'
,
this
.
stopFlag
)
if
(
this
.
stopFlag
===
true
)
{
this
.
confirmLoading
=
false
this
.
$message
({
...
...
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