Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
project_progress
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3d4ddec0
authored
May 31, 2024
by
liangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初次进入页面自动打开
1 parent
1deb6c0a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
src/router/index.js
src/views/layout/leftBar.vue
src/views/layout/mainLayout.vue
src/router/index.js
View file @
3d4ddec
...
@@ -21,7 +21,7 @@ export const routes = [
...
@@ -21,7 +21,7 @@ export const routes = [
path
:
'/'
,
path
:
'/'
,
name
:
'main'
,
name
:
'main'
,
component
:
()
=>
import
(
'@/views/layout/index.vue'
),
component
:
()
=>
import
(
'@/views/layout/index.vue'
),
// redirect:'/mainLayout/auxiliarySelection
',
redirect
:
'/mainLayout
'
,
children
:[
children
:[
{
{
...
...
src/views/layout/leftBar.vue
View file @
3d4ddec
...
@@ -116,29 +116,37 @@ export default {
...
@@ -116,29 +116,37 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
"/mainLayout/auxiliarySelection"
,
path
:
"/mainLayout/auxiliarySelection"
,
});
});
this
.
activeIndex
=
"/mainLayout/auxiliarySelection"
}
else
if
(
newVal
==
2
)
{
}
else
if
(
newVal
==
2
)
{
this
.
menuList
=
trendsRules
(
2
);
this
.
menuList
=
trendsRules
(
2
);
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
"/mainLayout/confirmRelease"
,
path
:
"/mainLayout/confirmRelease"
,
});
});
this
.
activeIndex
=
"/mainLayout/confirmRelease"
// this.$refs.kzMenu.activeIndex= "/mainLayout/materialAcquisition"
}
else
if
(
newVal
==
3
)
{
}
else
if
(
newVal
==
3
)
{
this
.
menuList
=
trendsRules
(
3
);
this
.
menuList
=
trendsRules
(
3
);
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
"/mainLayout/materialAcquisition"
,
path
:
"/mainLayout/materialAcquisition"
,
});
});
this
.
activeIndex
=
"/mainLayout/materialAcquisition"
// this.$refs.kzMenu.activeIndex= "/mainLayout/materialAcquisition"
}
else
if
(
newVal
==
99
)
{
}
else
if
(
newVal
==
99
)
{
this
.
menuList
=
trendsRules
(
99
);
this
.
menuList
=
trendsRules
(
99
);
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
"/assesszc/auxiliarySelection"
,
path
:
"/assesszc/auxiliarySelection"
,
});
});
this
.
activeIndex
=
'/assesszc/auxiliarySelection'
// this.$refs.kzMenu.activeIndex='/assesszc/auxiliarySelection'
}
}
this
.
$refs
.
kzMenu
.
activeIndex
=
this
.
$route
.
path
;
console
.
log
(
'不是来了么'
,
this
.
$route
.
path
)
// this.activeIndex = this.$route.path;
// this.$refs.kzMenu.activeIndex = this.$route.path;
console
.
log
(
'获取权限后的页面'
,
this
.
$refs
.
kzMenu
.
activeIndex
)
},
},
},
},
mounted
()
{
mounted
()
{
console
.
log
(
"重新来了么"
);
this
.
handleOpen
(
0
,
[
"0"
]);
this
.
handleOpen
(
0
,
[
"0"
]);
console
.
log
(
"333333"
,
this
.
$route
.
query
);
if
(
if
(
this
.
$route
.
path
==
"/mainLayout/Compliancefz"
||
this
.
$route
.
path
==
"/mainLayout/Compliancefz"
||
this
.
$route
.
path
==
"/mainLayout/Compliance"
this
.
$route
.
path
==
"/mainLayout/Compliance"
...
@@ -154,6 +162,7 @@ export default {
...
@@ -154,6 +162,7 @@ export default {
}
}
}
else
{
}
else
{
this
.
activeIndex
=
this
.
$route
.
path
;
this
.
activeIndex
=
this
.
$route
.
path
;
console
.
log
(
'第一次展开的页面'
,
this
.
activeIndex
)
}
}
},
},
...
...
src/views/layout/mainLayout.vue
View file @
3d4ddec
...
@@ -155,8 +155,11 @@ export default {
...
@@ -155,8 +155,11 @@ export default {
},
},
mounted
()
{
mounted
()
{
// window.addEventListener("resize", this.handleResize);
// window.addEventListener("resize", this.handleResize);
//进页面默认权限
sessionStorage
.
setItem
(
"author"
,
"sgtig_weizheng"
);
sessionStorage
.
setItem
(
"author"
,
"sgtig_weizheng"
);
sessionStorage
.
setItem
(
"authorName"
,
99
);
sessionStorage
.
setItem
(
"authorName"
,
99
);
this
.
authority
=
99
;
this
.
autho
=
"sgtig_weizheng"
},
},
methods
:
{
methods
:
{
handleResize
()
{
handleResize
()
{
...
...
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