Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
295fd996
Commit
295fd996
authored
May 08, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务管理优化
parent
5e81398d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
233 additions
and
224 deletions
+233
-224
src/pages/fwgl.vue
src/pages/fwgl.vue
+69
-57
src/pages/fwglList.vue
src/pages/fwglList.vue
+154
-157
src/router/index.js
src/router/index.js
+10
-10
No files found.
src/pages/fwgl.vue
View file @
295fd996
<
template
>
<
template
>
<div
class=
"fwgl_container"
>
<div
class=
"fwgl_container"
>
<side-nav-bar
:nav-list=
"navList"
:title-path=
"navList[0].path"
></side-nav-bar>
<side-nav-bar
:nav-list=
"navList"
:title-path=
"navList[0] && navList[0].path"
></side-nav-bar>
<div
class=
"main_container"
>
<div
class=
"main_container"
>
<router-view
<router-view
:key=
"'type_' + $route.params && $route.params.type"
:key=
"'type_' + $route.params && $route.params.type"
...
@@ -18,66 +21,75 @@ export default {
...
@@ -18,66 +21,75 @@ export default {
},
},
data
:
()
=>
({
data
:
()
=>
({
navList
:
[],
navList
:
[],
userLevel
:
0
,
}),
}),
mounted
()
{
watch
:
{
this
.
navList
=
[
"
$route.fullPath
"
(
path
)
{
this
.
initNavList
();
},
},
methods
:
{
initNavList
()
{
let
level
=
parseInt
(
this
.
$route
.
params
.
level
);
// 普通用户
// 普通用户
{
if
(
level
==
0
)
{
level
:
0
,
this
.
navList
=
[
name
:
"
注册发布的服务
"
,
{
path
:
"
/fwgl/list/0/
注册发布的服务
"
,
name
:
"
注册发布的服务
"
,
}
,
path
:
`/fwgl/list/
${
level
}
/0`
,
{
},
level
:
0
,
{
name
:
"
申请的服务
"
,
name
:
"
申请的服务
"
,
path
:
"
/fwgl/list/1/申请的服务
"
,
path
:
`/fwgl/list/
${
level
}
/1`
,
},
},
{
{
level
:
0
,
name
:
"
审批的服务
"
,
name
:
"
审批的服务
"
,
path
:
`/fwgl/list/
${
level
}
/2`
,
path
:
"
/fwgl/list/2/审批的服务
"
,
}
,
},
{
{
name
:
"
云资源服务
"
,
level
:
0
,
path
:
`/fwgl/list/
${
level
}
/3`
,
name
:
"
云资源服务
"
,
}
,
path
:
"
/fwgl/list/3/云资源服务
"
,
];
}
,
}
// 组织管理员
// 组织管理员
{
else
if
(
level
==
1
)
{
level
:
1
,
this
.
navList
=
[
name
:
"
组织服务管理
"
,
{
path
:
"
/fwgl/list/4/组织服务管理
"
,
name
:
"
组织服务管理
"
,
},
path
:
`/fwgl/list/
${
level
}
/0`
,
{
},
level
:
1
,
{
name
:
"
服务审批管理
"
,
name
:
"
服务审批管理
"
,
path
:
"
/fwgl/list/5/服务审批管理
"
,
path
:
`/fwgl/list/
${
level
}
/1`
,
},
},
{
{
level
:
1
,
name
:
"
云资源管理
"
,
name
:
"
云资源管理
"
,
path
:
`/fwgl/list/
${
level
}
/2`
,
path
:
"
/fwgl/list/6/云资源管理
"
,
},
},
];
}
// 超级管理员
// 超级管理员
{
else
if
(
level
==
2
)
{
level
:
2
,
this
.
navList
=
[
name
:
"
平台服务管理
"
,
{
path
:
"
/fwgl/list/7/平台服务管理
"
,
name
:
"
平台服务管理
"
,
},
path
:
`/fwgl/list/
${
level
}
/0`
,
{
},
level
:
2
,
{
name
:
"
服务审批管理
"
,
name
:
"
服务审批管理
"
,
path
:
"
/fwgl/list/8/服务审批管理
"
,
path
:
`/fwgl/list/
${
level
}
/1`
,
},
},
{
{
level
:
2
,
name
:
"
云资源管理
"
,
name
:
"
云资源管理
"
,
path
:
`/fwgl/list/
${
level
}
/2`
,
path
:
"
/fwgl/list/9/云资源管理
"
,
},
},
];
].
filter
((
nav
)
=>
nav
.
level
===
this
.
userLevel
);
}
},
this
.
$router
.
push
(
this
.
navList
[
0
].
path
);
},
mounted
()
{
this
.
initNavList
();
},
},
};
};
</
script
>
</
script
>
...
...
src/pages/fwglList.vue
View file @
295fd996
This diff is collapsed.
Click to expand it.
src/router/index.js
View file @
295fd996
...
@@ -58,23 +58,23 @@ export default new Router({
...
@@ -58,23 +58,23 @@ export default new Router({
],
],
},
},
{
{
path
:
"
/fwgl
"
,
// 服务管理
path
:
"
/fwgl
/:level
"
,
// 服务管理 level:用户等级
name
:
"
fwgl
"
,
name
:
"
fwgl
"
,
// redirect: "/fwgl/list
",
redirect
:
"
/fwgl/list/:level/0
"
,
component
:
()
=>
import
(
"
@/pages/fwgl
"
),
component
:
()
=>
import
(
"
@/pages/fwgl
"
),
children
:
[
children
:
[
{
{
path
:
"
/fwgl/list/:
type/:nam
e
"
,
// 服务管理/我的服务
path
:
"
/fwgl/list/:
level/:typ
e
"
,
// 服务管理/我的服务
name
:
"
fwglList
"
,
name
:
"
fwglList
"
,
component
:
()
=>
import
(
"
@/pages/fwglList
"
),
component
:
()
=>
import
(
"
@/pages/fwglList
"
),
},
},
{
{
path
:
"
/fwgl/servicedetail/:id
"
,
path
:
"
/fwgl/servicedetail/:
level/:
id
"
,
name
:
"
servicedetail
"
,
name
:
"
servicedetail
"
,
component
:
()
=>
import
(
"
@/pages/serviceDetail
"
),
component
:
()
=>
import
(
"
@/pages/serviceDetail
"
),
},
},
{
{
path
:
"
/fwgl/serviceedit/:id
"
,
path
:
"
/fwgl/serviceedit/:
level/:
id
"
,
name
:
"
serviceedit
"
,
name
:
"
serviceedit
"
,
component
:
()
=>
import
(
"
@/pages/serviceEdit
"
),
component
:
()
=>
import
(
"
@/pages/serviceEdit
"
),
},
},
...
@@ -105,17 +105,17 @@ export default new Router({
...
@@ -105,17 +105,17 @@ export default new Router({
{
{
path
:
"
/example_topology
"
,
// 拓扑图实例
path
:
"
/example_topology
"
,
// 拓扑图实例
name
:
"
example_topology
"
,
name
:
"
example_topology
"
,
component
:
()
=>
import
(
"
@/pages/example_topology
"
)
component
:
()
=>
import
(
"
@/pages/example_topology
"
)
,
},
},
{
{
path
:
"
/example_commodity
"
,
// 商品详情实例
path
:
"
/example_commodity
"
,
// 商品详情实例
name
:
"
example_commodity
"
,
name
:
"
example_commodity
"
,
component
:
()
=>
import
(
"
@/pages/example_commodity
"
)
component
:
()
=>
import
(
"
@/pages/example_commodity
"
)
,
},
},
{
{
path
:
"
/example_com_list
"
,
// 商品列表实例
path
:
"
/example_com_list
"
,
// 商品列表实例
name
:
"
example_com_list
"
,
name
:
"
example_com_list
"
,
component
:
()
=>
import
(
"
@/pages/example_com_list
"
)
component
:
()
=>
import
(
"
@/pages/example_com_list
"
)
,
}
}
,
]
]
,
});
});
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