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
f2cf6da2
Commit
f2cf6da2
authored
Feb 28, 2024
by
wangdanlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并产品【10700】任务详情页页面缓存配置失效(原始bug 5560)
parent
c0d2b0ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
17 deletions
+16
-17
AppMain.vue
...ations/architecture-dee/src/layout/components/AppMain.vue
+2
-3
lifecycleHooks.js
applications/architecture-dee/src/lifecycleHooks.js
+14
-14
No files found.
applications/architecture-dee/src/layout/components/AppMain.vue
View file @
f2cf6da2
<
template
>
<section
class=
"app-main"
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<keep-alive
:include=
"cachedViews"
>
<keep-alive
:include=
"cachedViews"
:max=
"10"
>
<router-view
v-if=
"$route.meta&&$route.meta.keepAlive"
:key=
"key"
:path=
"key"
class=
"router-view"
/>
</keep-alive>
</transition>
...
...
@@ -20,8 +20,7 @@ export default {
return
this
.
$store
.
state
.
tagsView
.
cachedViews
},
key
()
{
// return this.$route.fullPath
return
this
.
$route
.
path
return
this
.
$route
.
fullPath
}
},
methods
:
{
...
...
applications/architecture-dee/src/lifecycleHooks.js
View file @
f2cf6da2
...
...
@@ -142,19 +142,19 @@ router.beforeEach(async(to, from, next) => {
])
next
({
...
to
})
}
else
{
if
(
to
.
meta
.
keepAlive
&&
store
.
getters
.
visitedViews
)
{
for
(
const
key
in
store
.
getters
.
visitedViews
)
{
const
findHasRoute
=
store
.
getters
.
visitedViews
[
key
].
find
(
el
=>
{
return
el
.
path
===
to
.
path
})
if
(
findHasRoute
)
{
if
(
findHasRoute
.
fullPath
!==
to
.
fullPath
)
{
store
.
dispatch
(
'tagsView/delCachedView'
,
to
)
}
break
}
}
}
//
if (to.meta.keepAlive && store.getters.visitedViews) {
//
for (const key in store.getters.visitedViews) {
//
const findHasRoute = store.getters.visitedViews[key].find(el => {
//
return el.path === to.path
//
})
//
if (findHasRoute) {
//
if (findHasRoute.fullPath !== to.fullPath) {
//
store.dispatch('tagsView/delCachedView', to)
//
}
//
break
//
}
//
}
//
}
next
()
}
}
...
...
@@ -162,7 +162,7 @@ router.beforeEach(async(to, from, next) => {
})
function
findModuleRoute
(
path
,
query
)
{
if
(
path
===
'/'
||
path
===
'/home'
)
return
null
if
(
path
===
'/'
)
return
null
let
result
=
null
const
module
=
path
.
split
(
'/'
)[
1
]
...
...
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