Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TFMOM
TF-MOM-WEB
Commits
544c9a18
Commit
544c9a18
authored
Jan 30, 2024
by
wangdanlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签页解除跨app显示限制
parent
f7499c0b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
SidebarItem.vue
...tecture-dee/src/layout/components/Sidebar/SidebarItem.vue
+8
-0
index.vue
...architecture-dee/src/layout/components/TagsView/index.vue
+5
-1
tagsView.js
applications/architecture-dee/src/store/modules/tagsView.js
+5
-3
No files found.
applications/architecture-dee/src/layout/components/Sidebar/SidebarItem.vue
View file @
544c9a18
...
...
@@ -73,6 +73,14 @@ export default {
},
methods
:
{
toPage
(
data
,
basePath
)
{
let
list
=
[]
Object
.
keys
(
this
.
$store
.
state
.
tagsView
.
visitedViews
).
forEach
(
key
=>
{
list
=
[...
list
,
...
this
.
$store
.
state
.
tagsView
.
visitedViews
[
key
]]
})
if
(
list
.
length
>=
15
)
{
this
.
$message
.
warning
(
'超过最大标签数,添加新的标签页需要关闭已经打开标签页!'
)
return
}
if
(
data
.
menuSource
===
'1'
)
{
const
page
=
{
path
:
`/iframePage/
${
encodeURIComponent
(
data
.
menuUrl
)}
`
,
...
...
applications/architecture-dee/src/layout/components/TagsView/index.vue
View file @
544c9a18
...
...
@@ -218,7 +218,11 @@ export default {
this
.
visitedViews
=
[]
}
else
{
// this.$set(this, 'visitedViews', this.$store.state.tagsView.visitedViews[this.activeModel.id].filter(x => (x.path !== '/dee-task-center/workflow/task-center/home')))
this
.
$set
(
this
,
'visitedViews'
,
this
.
$store
.
state
.
tagsView
.
visitedViews
[
this
.
activeModel
.
id
].
filter
(
x
=>
(
x
.
path
!==
'/home'
)))
let
list
=
[]
Object
.
keys
(
this
.
$store
.
state
.
tagsView
.
visitedViews
).
forEach
(
key
=>
{
list
=
[...
list
,
...
this
.
$store
.
state
.
tagsView
.
visitedViews
[
key
]]
})
this
.
$set
(
this
,
'visitedViews'
,
list
.
filter
(
x
=>
(
x
.
path
!==
'/home'
)))
}
},
0
)
},
...
...
applications/architecture-dee/src/store/modules/tagsView.js
View file @
544c9a18
const
state
=
{
visitedViews
:
sessionStorage
.
getItem
(
'visitedViews'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'visitedViews'
))
:
{},
cachedViews
:
[],
...
...
@@ -34,9 +35,9 @@ const mutations = {
})
)
}
if
(
state
.
visitedViews
[
belongModel
].
length
>
10
)
{
/*
if (state.visitedViews[belongModel].length > 10) {
state.visitedViews[belongModel].shift()
}
}
*/
sessionStorage
.
setItem
(
'visitedViews'
,
JSON
.
stringify
(
state
.
visitedViews
))
},
ADD_CACHED_VIEW
:
(
state
,
view
)
=>
{
...
...
@@ -47,7 +48,8 @@ const mutations = {
},
DEL_VISITED_VIEW
:
(
state
,
view
)
=>
{
const
belongModel
=
sessionStorage
.
getItem
(
'activePageModel'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'activePageModel'
)).
id
:
'todoTask'
// const belongModel = sessionStorage.getItem('activePageModel') ? JSON.parse(sessionStorage.getItem('activePageModel')).id : 'todoTask'
const
belongModel
=
view
.
belongModel
if
(
!
state
.
visitedViews
[
belongModel
])
{
state
.
visitedViews
[
belongModel
]
=
[]
}
...
...
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