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 966c1ce2
authored
May 31, 2024
by
liangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改下重定向
1 parent
372c654c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
15 deletions
src/router/index.js
src/utils/leftBarRules.js
src/views/layout/leftBar.vue
src/views/layout/mainLayout.vue
vue.config.js
src/router/index.js
View file @
966c1ce
import
Vue
from
'vue'
import
Vue
from
'vue'
import
VueRouter
from
'vue-router'
import
VueRouter
from
'vue-router'
import
{
defaultRouter
}
from
"@/utils/leftBarRules"
;
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VueRouter
)
...
@@ -16,22 +17,18 @@ VueRouter.prototype.push = function push(location) {
...
@@ -16,22 +17,18 @@ VueRouter.prototype.push = function push(location) {
* }
* }
*
*
*/
*/
console
.
log
(
defaultRouter
(),
'默认是什么'
)
export
const
routes
=
[
export
const
routes
=
[
{
{
path
:
'/'
,
path
:
'/'
,
name
:
'main'
,
name
:
'main'
,
component
:
()
=>
import
(
'@/views/layout/index.vue'
),
component
:
()
=>
import
(
'@/views/layout/index.vue'
),
redirect
:
'/mainLayout'
,
redirect
:
defaultRouter
()
,
children
:[
children
:[
{
path
:
'/home'
,
name
:
"home"
,
component
:
()
=>
import
(
'@/views/layout/home.vue'
),
},
{
{
path
:
'/mainLayout'
,
path
:
'/mainLayout'
,
name
:
"mainLayout"
,
name
:
"mainLayout"
,
redirect
:
defaultRouter
(),
component
:
()
=>
import
(
'@/views/layout/mainLayout.vue'
),
component
:
()
=>
import
(
'@/views/layout/mainLayout.vue'
),
children
:[
children
:[
//后评估自查
//后评估自查
...
...
src/utils/leftBarRules.js
View file @
966c1ce
...
@@ -420,3 +420,26 @@ export function trendsRules(type) {
...
@@ -420,3 +420,26 @@ export function trendsRules(type) {
}
}
}
}
export
function
defaultRouter
()
{
sessionStorage
.
setItem
(
"author"
,
"sgtig_weizheng"
);
sessionStorage
.
setItem
(
"authorName"
,
99
);
let
type
=
sessionStorage
.
getItem
(
'authorName'
)
console
.
log
(
type
,
'hahaha '
)
switch
(
type
)
{
case
'1'
:
return
"/mainLayout/auxiliarySelection"
break
;
case
'2'
:
return
"/mainLayout/confirmRelease"
break
;
case
'3'
:
return
"/mainLayout/materialAcquisition"
break
;
case
'99'
:
return
"/assesszc/auxiliarySelection"
break
;
}
}
src/views/layout/leftBar.vue
View file @
966c1ce
...
@@ -146,6 +146,7 @@ export default {
...
@@ -146,6 +146,7 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
console
.
log
(
'本页面路由是什么'
,
this
.
$route
.
path
)
this
.
handleOpen
(
0
,
[
"0"
]);
this
.
handleOpen
(
0
,
[
"0"
]);
if
(
if
(
this
.
$route
.
path
==
"/mainLayout/Compliancefz"
||
this
.
$route
.
path
==
"/mainLayout/Compliancefz"
||
...
@@ -162,7 +163,7 @@ export default {
...
@@ -162,7 +163,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 @
966c1ce
...
@@ -154,12 +154,10 @@ export default {
...
@@ -154,12 +154,10 @@ export default {
},
},
mounted
()
{
mounted
()
{
// window.addEventListener("resize", this.handleResize);
//进页面默认权限 直接配置刷新一直是这个了
//进页面默认权限
sessionStorage
.
setItem
(
"author"
,
"sgtig_weizheng"
);
// this.authority =99;
sessionStorage
.
setItem
(
"authorName"
,
99
);
// this.autho="sgtig_weizheng"
this
.
authority
=
99
;
this
.
autho
=
"sgtig_weizheng"
},
},
methods
:
{
methods
:
{
handleResize
()
{
handleResize
()
{
...
...
vue.config.js
View file @
966c1ce
...
@@ -23,7 +23,7 @@ module.exports = defineConfig({
...
@@ -23,7 +23,7 @@ module.exports = defineConfig({
},
},
chainWebpack
:
(
config
)
=>
{
chainWebpack
:
(
config
)
=>
{
config
.
plugin
(
'html'
).
tap
((
args
)
=>
{
config
.
plugin
(
'html'
).
tap
((
args
)
=>
{
args
[
0
].
title
=
'数字化
架构设计与管控支撑工具
'
args
[
0
].
title
=
'数字化
项目全过程管控平台
'
return
args
return
args
})
})
},
},
...
...
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