Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
杨明
/
scrm-micro-config
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 423e940c
authored
Nov 29, 2021
by
yangming
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
role
1 parent
1ea2b372
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
src/views/role/components/selectProduct.vue
src/views/role/components/selectProduct.vue
View file @
423e940
...
...
@@ -107,11 +107,14 @@ export default {
},
findMenuFunTree
(
id
,
status
)
{
let
menu
=
util
.
deepClone
(
this
.
tabMenu
)
console
.
log
(
menu
)
let
tabMenu
=
util
.
deepClone
(
this
.
tabMenu_r
)
let
menuSelect
=
tabMenu
.
filter
(
item
=>
item
.
accounttypeId
==
id
)
let
idx
=
tabMenu
.
findIndex
(
item
=>
item
.
accounttypeId
==
id
)
this
.
tabMenu_r
.
forEach
((
item
,
index
)
=>
{
if
(
menu
.
length
==
0
)
{
this
.
tabMenu
[
index
]
=
''
return
}
menu
.
forEach
(
itm
=>
{
if
(
itm
.
accounttypeId
!=
item
.
accounttypeId
)
{
if
(
!
this
.
tabMenu
[
index
])
{
...
...
@@ -126,7 +129,6 @@ export default {
})
})
if
(
status
)
{
// this.tabMenu[idx] = menuSelect[0]
this
.
$set
(
this
.
tabMenu
,
idx
,
menuSelect
[
0
])
this
.
tabName
=
this
.
tabMenu
[
idx
].
accounttypeId
}
else
{
...
...
@@ -189,10 +191,13 @@ export default {
},
// 获取已选择的权限
findPermissionsByMerId
(
arr
)
{
let
accounttypeId
=
[]
arr
.
forEach
(
item
=>
{
this
.
accountList
.
forEach
(
itm
=>
{
if
(
item
.
accounttypeId
==
itm
.
accounttypeId
)
{
this
.
tabMenu
.
push
(
itm
)
accounttypeId
.
push
(
item
.
accounttypeId
)
this
.
accountList
.
forEach
((
itm
,
index
)
=>
{
console
.
log
(
accounttypeId
)
if
(
accounttypeId
.
includes
(
itm
.
accounttypeId
))
{
this
.
tabMenu
[
index
]
=
itm
if
(
!
item
.
productList
)
{
return
}
...
...
@@ -202,16 +207,25 @@ export default {
itm
.
productsArr
.
push
(
j
)
this
.
$nextTick
(()
=>
{
this
.
addStyle
()
this
.
$refs
[
`tree_
${
itm
.
accounttypeId
}
_
${
j
.
productId
}
`
]
[
0
].
setCheckedKeys
(
i
.
idList
)
this
.
$refs
[
`tree_
${
itm
.
accounttypeId
}
_
${
j
.
productId
}
`
]
?
this
.
$refs
[
`tree_
${
itm
.
accounttypeId
}
_
${
j
.
productId
}
`
][
0
].
setCheckedKeys
(
i
.
idList
)
:
''
})
}
})
})
}
else
{
this
.
tabMenu
[
index
]
=
''
}
})
})
this
.
tabName
=
this
.
tabMenu
[
0
].
accounttypeId
this
.
productTab
=
this
.
tabMenu
[
0
].
productsArr
[
0
].
productId
this
.
tabMenu
.
forEach
(
item
=>
{
if
(
item
&&
item
.
accounttypeId
)
{
console
.
log
(
item
)
this
.
tabName
=
item
.
accounttypeId
this
.
productTab
=
item
.
productsArr
[
0
]?
item
.
productsArr
[
0
].
productId
:
''
return
false
;
}
})
this
.
tabMenuStatus
=
this
.
tabMenu
.
some
(
item
=>
item
)
},
resetView
()
{
this
.
tabMenu
=
[]
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment