Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
jinmao-community-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
439b4cf3
authored
Apr 27, 2021
by
changjin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改项目切换为局部杀心
parent
ddda95e1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
src/components/common/Header.vue
+2
-5
src/components/common/Home.vue
+20
-2
No files found.
src/components/common/Header.vue
View file @
439b4cf3
...
@@ -76,6 +76,7 @@ export default {
...
@@ -76,6 +76,7 @@ export default {
data
:
{},
data
:
{},
formData
:
{}
formData
:
{}
}),
}),
inject
:
[
'reload'
],
created
()
{
created
()
{
this
.
projectId
=
window
.
sessionStorage
.
getItem
(
'projectId'
)
this
.
projectId
=
window
.
sessionStorage
.
getItem
(
'projectId'
)
this
.
getData
(
this
.
projectId
)
this
.
getData
(
this
.
projectId
)
...
@@ -88,8 +89,6 @@ export default {
...
@@ -88,8 +89,6 @@ export default {
return
this
.
$route
.
matched
.
map
(
route
=>
route
.
meta
)
return
this
.
$route
.
matched
.
map
(
route
=>
route
.
meta
)
}
}
},
},
update
(){
},
methods
:
{
methods
:
{
getData
(
projectId
)
{
getData
(
projectId
)
{
if
(
projectId
)
{
if
(
projectId
)
{
...
@@ -97,6 +96,7 @@ export default {
...
@@ -97,6 +96,7 @@ export default {
if
(
res
.
data
.
code
===
'0'
)
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
data
=
res
.
data
.
data
this
.
data
=
res
.
data
.
data
window
.
sessionStorage
.
setItem
(
'projectId'
,
projectId
)
window
.
sessionStorage
.
setItem
(
'projectId'
,
projectId
)
this
.
reload
()
}
}
})
})
}
else
{
}
else
{
...
@@ -110,10 +110,7 @@ export default {
...
@@ -110,10 +110,7 @@ export default {
},
},
// 选择项目
// 选择项目
choose
(
item
)
{
choose
(
item
)
{
this
.
data
.
projectName
=
item
.
projectName
window
.
sessionStorage
.
setItem
(
'projectId'
,
item
.
id
)
this
.
getData
(
item
.
id
)
this
.
getData
(
item
.
id
)
window
.
location
.
reload
()
},
},
// 退出登录
// 退出登录
loginout
()
{
loginout
()
{
...
...
src/components/common/Home.vue
View file @
439b4cf3
...
@@ -3,10 +3,10 @@
...
@@ -3,10 +3,10 @@
<v-head></v-head>
<v-head></v-head>
<v-sidebar></v-sidebar>
<v-sidebar></v-sidebar>
<div
class=
"content"
v-if=
"pageNameList[1].pageName !== '外部系统管理' && pageNameList[1].pageName !== '首页'"
>
<div
class=
"content"
v-if=
"pageNameList[1].pageName !== '外部系统管理' && pageNameList[1].pageName !== '首页'"
>
<transition
name=
"move"
mode=
"out-in"
><router-view></router-view></transition>
<transition
name=
"move"
mode=
"out-in"
><router-view
v-if=
"isRouterAlive"
></router-view></transition>
</div>
</div>
<div
class=
"content1"
v-if=
"pageNameList[1].pageName == '外部系统管理' || pageNameList[1].pageName == '首页'"
>
<div
class=
"content1"
v-if=
"pageNameList[1].pageName == '外部系统管理' || pageNameList[1].pageName == '首页'"
>
<transition
name=
"move"
mode=
"out-in"
><router-view></router-view></transition>
<transition
name=
"move"
mode=
"out-in"
><router-view
v-if=
"isRouterAlive"
></router-view></transition>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -14,6 +14,16 @@
...
@@ -14,6 +14,16 @@
import
vHead
from
'./Header.vue'
import
vHead
from
'./Header.vue'
import
vSidebar
from
'./Sidebar.vue'
import
vSidebar
from
'./Sidebar.vue'
export
default
{
export
default
{
data
()
{
return
{
isRouterAlive
:
true
}
},
provide
(){
//提供
return
{
reload
:
this
.
reload
}
},
components
:
{
components
:
{
vHead
,
vHead
,
vSidebar
vSidebar
...
@@ -23,5 +33,13 @@ export default {
...
@@ -23,5 +33,13 @@ export default {
return
this
.
$route
.
matched
.
map
(
route
=>
route
.
meta
)
return
this
.
$route
.
matched
.
map
(
route
=>
route
.
meta
)
}
}
},
},
methods
:
{
reload
(){
this
.
isRouterAlive
=
false
this
.
$nextTick
(
function
()
{
this
.
isRouterAlive
=
true
})
}
}
}
}
</
script
>
</
script
>
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