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
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
>
<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"
>
<router-view
:key=
"'type_' + $route.params && $route.params.type"
...
...
@@ -18,66 +21,75 @@ export default {
},
data
:
()
=>
({
navList
:
[],
userLevel
:
0
,
}),
mounted
()
{
this
.
navList
=
[
watch
:
{
"
$route.fullPath
"
(
path
)
{
this
.
initNavList
();
},
},
methods
:
{
initNavList
()
{
let
level
=
parseInt
(
this
.
$route
.
params
.
level
);
// 普通用户
{
level
:
0
,
name
:
"
注册发布的服务
"
,
path
:
"
/fwgl/list/0/
注册发布的服务
"
,
}
,
{
level
:
0
,
name
:
"
申请的服务
"
,
path
:
"
/fwgl/list/1/申请的服务
"
,
},
{
level
:
0
,
name
:
"
审批的服务
"
,
path
:
"
/fwgl/list/2/审批的服务
"
,
},
{
level
:
0
,
name
:
"
云资源服务
"
,
path
:
"
/fwgl/list/3/云资源服务
"
,
}
,
if
(
level
==
0
)
{
this
.
navList
=
[
{
name
:
"
注册发布的服务
"
,
path
:
`/fwgl/list/
${
level
}
/0`
,
},
{
name
:
"
申请的服务
"
,
path
:
`/fwgl/list/
${
level
}
/1`
,
},
{
name
:
"
审批的服务
"
,
path
:
`/fwgl/list/
${
level
}
/2`
,
}
,
{
name
:
"
云资源服务
"
,
path
:
`/fwgl/list/
${
level
}
/3`
,
}
,
];
}
// 组织管理员
{
level
:
1
,
name
:
"
组织服务管理
"
,
path
:
"
/fwgl/list/4/组织服务管理
"
,
},
{
level
:
1
,
name
:
"
服务审批管理
"
,
path
:
"
/fwgl/list/5/服务审批管理
"
,
},
{
level
:
1
,
name
:
"
云资源管理
"
,
path
:
"
/fwgl/list/6/云资源管理
"
,
},
else
if
(
level
==
1
)
{
this
.
navList
=
[
{
name
:
"
组织服务管理
"
,
path
:
`/fwgl/list/
${
level
}
/0`
,
},
{
name
:
"
服务审批管理
"
,
path
:
`/fwgl/list/
${
level
}
/1`
,
},
{
name
:
"
云资源管理
"
,
path
:
`/fwgl/list/
${
level
}
/2`
,
},
];
}
// 超级管理员
{
level
:
2
,
name
:
"
平台服务管理
"
,
path
:
"
/fwgl/list/7/平台服务管理
"
,
},
{
level
:
2
,
name
:
"
服务审批管理
"
,
path
:
"
/fwgl/list/8/服务审批管理
"
,
},
{
level
:
2
,
name
:
"
云资源管理
"
,
path
:
"
/fwgl/list/9/云资源管理
"
,
},
].
filter
((
nav
)
=>
nav
.
level
===
this
.
userLevel
);
this
.
$router
.
push
(
this
.
navList
[
0
].
path
);
else
if
(
level
==
2
)
{
this
.
navList
=
[
{
name
:
"
平台服务管理
"
,
path
:
`/fwgl/list/
${
level
}
/0`
,
},
{
name
:
"
服务审批管理
"
,
path
:
`/fwgl/list/
${
level
}
/1`
,
},
{
name
:
"
云资源管理
"
,
path
:
`/fwgl/list/
${
level
}
/2`
,
},
];
}
},
},
mounted
()
{
this
.
initNavList
();
},
};
</
script
>
...
...
src/pages/fwglList.vue
View file @
295fd996
...
...
@@ -9,7 +9,7 @@
class=
"r_yhgl_table"
size=
"mini"
url=
"tableData"
detailsUrl=
"/fwgl/servicedetail/
"
:detailsUrl=
"`/fwgl/servicedetail/$
{$route.params.level}/`
"
:border="false"
:headers="headers"
:searchShow="true"
...
...
@@ -104,7 +104,7 @@ export default {
this
.
$refs
.
myConfirm
.
showModel
();
},
editItem
(
item
)
{
this
.
$router
.
push
(
"
/fwgl/serviceedit/
"
+
item
.
id
);
this
.
$router
.
push
(
`/fwgl/serviceedit/
${
this
.
$route
.
params
.
level
}
/
${
item
.
id
}
`
);
},
soldOutItem
(
item
)
{
this
.
confirmOptions
.
title
=
"
是否删除该条服务?
"
;
...
...
@@ -132,161 +132,158 @@ export default {
},
},
mounted
()
{
switch
(
parseInt
(
this
.
$route
.
params
.
type
))
{
case
0
:
this
.
headers
=
[
{
label
:
"
服务名称
"
,
prop
:
"
name
"
,
type
:
"
href
"
,
align
:
"
left
"
},
{
label
:
"
服务url
"
,
prop
:
"
date
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
开放程度
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
服务描述
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
left
"
},
{
label
:
"
注册发布时间
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
,
},
{
label
:
"
服务类型
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
Button
"
,
align
:
"
center
"
,
width
:
240
,
btnList
:
[
{
type
:
"
action-edit
"
,
label
:
"
编辑
"
,
line
:
"
|
"
,
},
{
type
:
"
action-sold-out
"
,
label
:
"
申请下架
"
,
line
:
"
|
"
,
},
{
type
:
"
action-delete
"
,
label
:
"
删除
"
,
},
],
},
];
break
;
case
1
:
this
.
headers
=
[
{
label
:
"
服务名称
"
,
prop
:
"
name
"
,
type
:
"
href
"
,
align
:
"
left
"
},
{
label
:
"
服务领域
"
,
prop
:
"
date
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
开放程度
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
服务描述
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
left
"
},
{
label
:
"
申请时间
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
left
"
},
{
label
:
"
服务类型
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
Button
"
,
align
:
"
center
"
,
width
:
160
,
btnList
:
[
{
type
:
"
action-cancel
"
,
label
:
"
取消
"
,
line
:
"
|
"
,
},
{
type
:
"
action-delete
"
,
label
:
"
删除
"
,
},
],
},
];
break
;
case
2
:
this
.
headers
=
[
{
label
:
"
服务名称
"
,
prop
:
"
name
"
,
type
:
"
href
"
,
align
:
"
left
"
},
{
label
:
"
服务领域
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
开放程度
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
请求方式
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
服务描述
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
left
"
},
{
label
:
"
审批时间
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
服务类型
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
审批状态
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
Button
"
,
align
:
"
center
"
,
width
:
160
,
btnList
:
[
{
type
:
"
action-examine
"
,
label
:
"
审批
"
,
line
:
"
|
"
,
},
{
type
:
"
action-delete
"
,
label
:
"
删除
"
,
},
],
},
];
break
;
case
3
:
this
.
headers
=
[
{
label
:
"
工作区域
"
,
prop
:
"
name
"
,
type
:
"
href
"
,
align
:
"
left
"
},
{
label
:
"
网络环境
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
CPU(核)
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
内存(GB)
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
资源总量(GB)
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
实例数(个)
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
申请时间
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
申请状态
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
Button
"
,
align
:
"
center
"
,
width
:
160
,
btnList
:
[
{
type
:
"
action-detail
"
,
label
:
"
查看详情
"
,
},
],
},
];
break
;
default
:
this
.
headers
=
[
{
label
:
"
服务名称
"
,
prop
:
"
name
"
,
type
:
"
href
"
,
align
:
"
left
"
},
{
label
:
"
服务url
"
,
prop
:
"
date
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
开放程度
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
服务描述
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
left
"
},
{
label
:
"
注册发布时间
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
,
},
{
label
:
"
服务类型
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
Button
"
,
align
:
"
center
"
,
width
:
160
,
btnList
:
[
{
type
:
"
action-edit
"
,
label
:
"
编辑
"
,
line
:
"
|
"
,
},
{
type
:
"
action-sold-out
"
,
label
:
"
申请下架
"
,
line
:
"
|
"
,
},
{
type
:
"
action-delete
"
,
label
:
"
删除
"
,
},
],
},
];
break
;
let
level
=
parseInt
(
this
.
$route
.
params
.
level
);
let
type
=
parseInt
(
this
.
$route
.
params
.
type
);
if
(
level
==
0
&&
type
==
0
)
{
this
.
headers
=
[
{
label
:
"
服务名称
"
,
prop
:
"
name
"
,
type
:
"
href
"
,
align
:
"
left
"
},
{
label
:
"
服务url
"
,
prop
:
"
date
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
开放程度
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
服务描述
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
left
"
},
{
label
:
"
注册发布时间
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
,
},
{
label
:
"
服务类型
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
Button
"
,
align
:
"
center
"
,
width
:
240
,
btnList
:
[
{
type
:
"
action-edit
"
,
label
:
"
编辑
"
,
line
:
"
|
"
,
},
{
type
:
"
action-sold-out
"
,
label
:
"
申请下架
"
,
line
:
"
|
"
,
},
{
type
:
"
action-delete
"
,
label
:
"
删除
"
,
},
],
},
];
}
else
if
(
level
==
0
&&
type
==
1
)
{
this
.
headers
=
[
{
label
:
"
服务名称
"
,
prop
:
"
name
"
,
type
:
"
href
"
,
align
:
"
left
"
},
{
label
:
"
服务领域
"
,
prop
:
"
date
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
开放程度
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
服务描述
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
left
"
},
{
label
:
"
申请时间
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
left
"
},
{
label
:
"
服务类型
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
Button
"
,
align
:
"
center
"
,
width
:
160
,
btnList
:
[
{
type
:
"
action-cancel
"
,
label
:
"
取消
"
,
line
:
"
|
"
,
},
{
type
:
"
action-delete
"
,
label
:
"
删除
"
,
},
],
},
];
}
else
if
(
level
==
0
&&
type
==
2
)
{
this
.
headers
=
[
{
label
:
"
服务名称
"
,
prop
:
"
name
"
,
type
:
"
href
"
,
align
:
"
left
"
},
{
label
:
"
服务领域
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
开放程度
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
请求方式
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
服务描述
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
left
"
},
{
label
:
"
审批时间
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
服务类型
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
审批状态
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
Button
"
,
align
:
"
center
"
,
width
:
160
,
btnList
:
[
{
type
:
"
action-examine
"
,
label
:
"
审批
"
,
line
:
"
|
"
,
},
{
type
:
"
action-delete
"
,
label
:
"
删除
"
,
},
],
},
];
}
else
if
(
level
==
0
&&
type
==
2
)
{
this
.
headers
=
[
{
label
:
"
工作区域
"
,
prop
:
"
name
"
,
type
:
"
href
"
,
align
:
"
left
"
},
{
label
:
"
网络环境
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
CPU(核)
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
内存(GB)
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
资源总量(GB)
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
实例数(个)
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
申请时间
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
申请状态
"
,
prop
:
"
name
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
Button
"
,
align
:
"
center
"
,
width
:
160
,
btnList
:
[
{
type
:
"
action-detail
"
,
label
:
"
查看详情
"
,
},
],
},
];
}
else
{
this
.
headers
=
[
{
label
:
"
服务名称
"
,
prop
:
"
name
"
,
type
:
"
href
"
,
align
:
"
left
"
},
{
label
:
"
服务url
"
,
prop
:
"
date
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
开放程度
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
服务描述
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
left
"
},
{
label
:
"
注册发布时间
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
,
},
{
label
:
"
服务类型
"
,
prop
:
"
address
"
,
type
:
""
,
align
:
"
center
"
},
{
label
:
"
操作
"
,
type
:
"
Button
"
,
align
:
"
center
"
,
width
:
240
,
btnList
:
[
{
type
:
"
action-edit
"
,
label
:
"
编辑
"
,
line
:
"
|
"
,
},
{
type
:
"
action-sold-out
"
,
label
:
"
申请下架
"
,
line
:
"
|
"
,
},
{
type
:
"
action-delete
"
,
label
:
"
删除
"
,
},
],
},
];
}
},
};
...
...
src/router/index.js
View file @
295fd996
...
...
@@ -58,23 +58,23 @@ export default new Router({
],
},
{
path
:
"
/fwgl
"
,
// 服务管理
path
:
"
/fwgl
/:level
"
,
// 服务管理 level:用户等级
name
:
"
fwgl
"
,
// redirect: "/fwgl/list
",
redirect
:
"
/fwgl/list/:level/0
"
,
component
:
()
=>
import
(
"
@/pages/fwgl
"
),
children
:
[
{
path
:
"
/fwgl/list/:
type/:nam
e
"
,
// 服务管理/我的服务
path
:
"
/fwgl/list/:
level/:typ
e
"
,
// 服务管理/我的服务
name
:
"
fwglList
"
,
component
:
()
=>
import
(
"
@/pages/fwglList
"
),
},
{
path
:
"
/fwgl/servicedetail/:id
"
,
path
:
"
/fwgl/servicedetail/:
level/:
id
"
,
name
:
"
servicedetail
"
,
component
:
()
=>
import
(
"
@/pages/serviceDetail
"
),
},
{
path
:
"
/fwgl/serviceedit/:id
"
,
path
:
"
/fwgl/serviceedit/:
level/:
id
"
,
name
:
"
serviceedit
"
,
component
:
()
=>
import
(
"
@/pages/serviceEdit
"
),
},
...
...
@@ -105,17 +105,17 @@ export default new Router({
{
path
:
"
/example_topology
"
,
// 拓扑图实例
name
:
"
example_topology
"
,
component
:
()
=>
import
(
"
@/pages/example_topology
"
)
component
:
()
=>
import
(
"
@/pages/example_topology
"
)
,
},
{
path
:
"
/example_commodity
"
,
// 商品详情实例
name
:
"
example_commodity
"
,
component
:
()
=>
import
(
"
@/pages/example_commodity
"
)
component
:
()
=>
import
(
"
@/pages/example_commodity
"
)
,
},
{
path
:
"
/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