Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-content
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 d5e0dd09
authored
May 31, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增产品页面出来不切换二级目录
1 parent
a94153b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
src/views/discoverManager/addProd.vue
src/views/discoverManager/components/Menu/index.vue
src/views/discoverManager/addProd.vue
View file @
d5e0dd0
...
...
@@ -533,6 +533,8 @@ export default {
this
.
isEditType
=
true
},
goListPage
(){
const
{
menuId
,
subMenuId
}
=
this
.
formObj
window
.
localStorage
.
setItem
(
'menuInfo'
,
JSON
.
stringify
({
menuId
,
subMenuId
}))
this
.
$router
.
push
({
path
:
'/discoverManager/index'
})
}
}
...
...
src/views/discoverManager/components/Menu/index.vue
View file @
d5e0dd0
...
...
@@ -122,7 +122,12 @@
}
},
created
(){
this
.
getMenuList
()
const
menuInfo
=
window
.
localStorage
.
getItem
(
'menuInfo'
)
//判断是否是新增产品进来,不切换二级目录
if
(
menuInfo
){
this
.
getMenuList
(
'rename'
,
JSON
.
parse
(
menuInfo
))
}
else
{
this
.
getMenuList
()
}
},
mounted
()
{
document
.
addEventListener
(
"click"
,
this
.
eventListener
);
...
...
@@ -134,15 +139,18 @@
eventListener
(
e
){
if
(
!
this
.
$refs
?.
menuOpRef
?.[
0
]?.
contains
(
e
.
target
))
this
.
boxShow
=
false
;
},
getMenuList
(
type
)
{
getMenuList
(
type
,
menuInfo
)
{
this
.
$apis
.
discover
.
getMenuListApi
({}).
then
(
res
=>
{
if
(
res
?.
length
){
this
.
menuList
=
res
let
menuItem
=
res
[
0
]
let
subMenuItem
=
res
[
0
]?.
childList
[
0
]
||
{}
if
(
type
==
'rename'
)
{
menuItem
=
res
.
find
(
item
=>
item
.
id
==
this
.
curModuleInfo
.
menuId
)
subMenuItem
=
menuItem
.
find
(
item
=>
item
.
id
==
this
.
curModuleInfo
.
subMenuId
)
let
menuId
=
menuInfo
?
menuInfo
.
menuId
:
this
.
curModuleInfo
.
menuId
let
subMenuId
=
menuInfo
?
menuInfo
.
subMenuId
:
this
.
curModuleInfo
.
subMenuId
menuItem
=
res
.
find
(
item
=>
item
.
id
==
menuId
)
subMenuItem
=
menuItem
?.
childList
?.
find
(
item
=>
item
.
id
==
subMenuId
)
window
.
localStorage
.
removeItem
(
'menuInfo'
)
}
this
.
slectedSubmenu
(
menuItem
,
subMenuItem
)
}
...
...
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