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
f2d05d19
Commit
f2d05d19
authored
May 11, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up pages
parent
d8e67540
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
320 additions
and
347 deletions
+320
-347
src/pages/fwgl.vue
src/pages/fwgl.vue
+10
-55
src/pages/fwglList.vue
src/pages/fwglList.vue
+300
-285
src/store/index.js
src/store/index.js
+10
-7
No files found.
src/pages/fwgl.vue
View file @
f2d05d19
...
...
@@ -14,6 +14,7 @@
<
script
>
import
sideNavBar
from
"
@/components/side-nav-bar
"
;
import
{
mapState
}
from
"
vuex
"
;
export
default
{
components
:
{
...
...
@@ -22,6 +23,11 @@ export default {
data
:
()
=>
({
navList
:
[],
}),
computed
:
{
...
mapState
({
fwglNav
:
"
fwglNav
"
,
}),
},
watch
:
{
"
$route.fullPath
"
(
path
)
{
this
.
initNavList
();
...
...
@@ -31,61 +37,10 @@ export default {
initNavList
()
{
let
level
=
parseInt
(
this
.
$route
.
params
.
level
);
// 普通用户
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`
,
},
];
}
// 组织管理员
else
if
(
level
==
1
)
{
this
.
navList
=
[
{
name
:
"
组织服务管理
"
,
path
:
`/fwgl/list/
${
level
}
/0`
,
},
{
name
:
"
服务审批管理
"
,
path
:
`/fwgl/list/
${
level
}
/1`
,
},
{
name
:
"
云资源管理
"
,
path
:
`/fwgl/list/
${
level
}
/2`
,
},
];
}
// 超级管理员
else
if
(
level
==
2
)
{
this
.
navList
=
[
{
name
:
"
平台服务管理
"
,
path
:
`/fwgl/list/
${
level
}
/0`
,
},
{
name
:
"
服务审批管理
"
,
path
:
`/fwgl/list/
${
level
}
/1`
,
},
{
name
:
"
云资源管理
"
,
path
:
`/fwgl/list/
${
level
}
/2`
,
},
];
}
this
.
navList
=
this
.
fwglNav
[
level
].
map
((
item
,
index
)
=>
({
name
:
item
,
path
:
`/fwgl/list/
${
level
}
/
${
index
}
`
,
}));
},
},
mounted
()
{
...
...
src/pages/fwglList.vue
View file @
f2d05d19
...
...
@@ -2,14 +2,14 @@
<div
class=
"list_container"
>
<el-breadcrumb
separator=
"/"
class=
"bread_crumb"
>
<el-breadcrumb-item>
我的服务
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
$route
.
params
.
n
ame
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
pathN
ame
}}
</el-breadcrumb-item>
</el-breadcrumb>
<div
class=
"table_container"
>
<ces-table
class=
"r_yhgl_table"
size=
"mini"
url=
"tableData"
:detailsUrl=
"`/fwgl/servicedetail/$
{
$route.params.
level}/`"
:detailsUrl=
"`/fwgl/servicedetail/$
{level}/`"
:border="false"
:headers="headers"
:searchShow="true"
...
...
@@ -39,9 +39,12 @@
<
script
>
import
cesTable
from
"
@/components/table-um
"
;
import
dialogAction
from
"
@/components/dialog-action
"
;
import
{
mapState
}
from
"
vuex
"
;
export
default
{
data
:
()
=>
({
level
:
0
,
// 用户等级
type
:
0
,
// 访问的页面
headers
:
[],
url
:
""
,
detailsUrl
:
"
ss/
"
,
...
...
@@ -89,70 +92,22 @@ export default {
},
],
}),
computed
:
{
...
mapState
({
fwglNav
:
"
fwglNav
"
,
}),
pathName
()
{
return
this
.
fwglNav
[
this
.
level
][
this
.
type
];
},
},
components
:
{
cesTable
,
dialogAction
,
},
methods
:
{
deleteItem
(
item
)
{
this
.
confirmOptions
.
title
=
""
;
this
.
confirmOptions
.
message
=
"
是否删除该条服务?
"
;
this
.
confirmOptions
.
btnCancelText
=
""
;
this
.
confirmOptions
.
btnSubmitText
=
""
;
this
.
confirmOptions
.
confirmSubmit
=
()
=>
{
console
.
log
(
"
deleteItem -
"
+
item
.
name
);
this
.
$refs
.
myConfirm
.
hideModel
();
};
this
.
$refs
.
myConfirm
.
showModel
();
},
editItem
(
item
)
{
this
.
$router
.
push
(
`/fwgl/serviceedit/
${
this
.
$route
.
params
.
level
}
/
${
item
.
id
}
`
);
},
soldOutItem
(
item
)
{
this
.
confirmOptions
.
title
=
"
提示
"
;
this
.
confirmOptions
.
message
=
"
下架此服务会导致用户被迫暂停对服务的调用,下架前需向超级管理员发送通知,超级管理员通过后此服务将会从服务超市中下架。
"
;
this
.
confirmOptions
.
btnCancelText
=
""
;
this
.
confirmOptions
.
btnSubmitText
=
"
发送通知
"
;
this
.
confirmOptions
.
confirmSubmit
=
()
=>
{
console
.
log
(
"
soldOutItem -
"
+
item
.
name
);
this
.
$refs
.
myConfirm
.
hideModel
();
};
this
.
$refs
.
myConfirm
.
showModel
();
},
soldOutItem2
(
item
)
{
this
.
confirmOptions
.
title
=
"
提示
"
;
this
.
confirmOptions
.
message
=
"
下架此服务会导致用户被迫暂停对服务的调用
"
;
this
.
confirmOptions
.
btnCancelText
=
""
;
this
.
confirmOptions
.
btnSubmitText
=
"
确定
"
;
this
.
confirmOptions
.
confirmSubmit
=
()
=>
{
console
.
log
(
"
soldOutItem2 -
"
+
item
.
name
);
this
.
$refs
.
myConfirm
.
hideModel
();
};
this
.
$refs
.
myConfirm
.
showModel
();
},
cancelItem
(
item
)
{
console
.
log
(
"
cancelItem -
"
+
item
.
name
);
},
examineItem
(
item
)
{
console
.
log
(
"
examineItem -
"
+
item
.
name
);
},
detailItem
(
item
)
{
console
.
log
(
"
detailItem -
"
+
item
.
name
);
},
allotItem
(
item
)
{
console
.
log
(
"
allotItem -
"
+
item
.
name
);
},
confirmSubmit
(
item
)
{
console
.
log
(
item
.
name
);
},
},
mounted
()
{
let
level
=
parseInt
(
this
.
$route
.
params
.
level
);
let
type
=
parseInt
(
this
.
$route
.
params
.
type
);
initHeader
()
{
let
level
=
this
.
level
;
let
type
=
this
.
type
;
// 普通用户 --- 注册发布的服务
if
(
level
==
0
&&
type
==
0
)
{
...
...
@@ -432,6 +387,66 @@ export default {
throw
Error
(
"
The page doesn't exist
"
);
}
},
deleteItem
(
item
)
{
this
.
confirmOptions
.
title
=
""
;
this
.
confirmOptions
.
message
=
"
是否删除该条服务?
"
;
this
.
confirmOptions
.
btnCancelText
=
""
;
this
.
confirmOptions
.
btnSubmitText
=
""
;
this
.
confirmOptions
.
confirmSubmit
=
()
=>
{
console
.
log
(
"
deleteItem -
"
+
item
.
name
);
this
.
$refs
.
myConfirm
.
hideModel
();
};
this
.
$refs
.
myConfirm
.
showModel
();
},
editItem
(
item
)
{
this
.
$router
.
push
(
`/fwgl/serviceedit/
${
this
.
$route
.
params
.
level
}
/
${
item
.
id
}
`
);
},
soldOutItem
(
item
)
{
this
.
confirmOptions
.
title
=
"
提示
"
;
this
.
confirmOptions
.
message
=
"
下架此服务会导致用户被迫暂停对服务的调用,下架前需向超级管理员发送通知,超级管理员通过后此服务将会从服务超市中下架。
"
;
this
.
confirmOptions
.
btnCancelText
=
""
;
this
.
confirmOptions
.
btnSubmitText
=
"
发送通知
"
;
this
.
confirmOptions
.
confirmSubmit
=
()
=>
{
console
.
log
(
"
soldOutItem -
"
+
item
.
name
);
this
.
$refs
.
myConfirm
.
hideModel
();
};
this
.
$refs
.
myConfirm
.
showModel
();
},
soldOutItem2
(
item
)
{
this
.
confirmOptions
.
title
=
"
提示
"
;
this
.
confirmOptions
.
message
=
"
下架此服务会导致用户被迫暂停对服务的调用
"
;
this
.
confirmOptions
.
btnCancelText
=
""
;
this
.
confirmOptions
.
btnSubmitText
=
"
确定
"
;
this
.
confirmOptions
.
confirmSubmit
=
()
=>
{
console
.
log
(
"
soldOutItem2 -
"
+
item
.
name
);
this
.
$refs
.
myConfirm
.
hideModel
();
};
this
.
$refs
.
myConfirm
.
showModel
();
},
cancelItem
(
item
)
{
console
.
log
(
"
cancelItem -
"
+
item
.
name
);
},
examineItem
(
item
)
{
console
.
log
(
"
examineItem -
"
+
item
.
name
);
},
detailItem
(
item
)
{
console
.
log
(
"
detailItem -
"
+
item
.
name
);
},
allotItem
(
item
)
{
console
.
log
(
"
allotItem -
"
+
item
.
name
);
},
confirmSubmit
(
item
)
{
console
.
log
(
item
.
name
);
},
},
created
()
{
this
.
level
=
parseInt
(
this
.
$route
.
params
.
level
);
this
.
type
=
parseInt
(
this
.
$route
.
params
.
type
);
this
.
initHeader
();
},
};
</
script
>
...
...
src/store/index.js
View file @
f2d05d19
import
Vuex
from
'
vuex
'
import
Vue
from
'
vue
'
import
Vuex
from
"
vuex
"
;
import
Vue
from
"
vue
"
;
Vue
.
use
(
Vuex
);
const
store
=
new
Vuex
.
Store
({
state
:
{
role
:
1
,
//0:普通用户,1:组织管理员,2:超级管理员
role
:
1
,
//0:普通用户,1:组织管理员,2:超级管理员
serviceShopMenu
:
0
,
// 服务超市侧边栏
fwglNav
:
[
[
"
注册发布的服务
"
,
"
申请的服务
"
,
"
审批的服务
"
,
"
云资源服务
"
],
//普通用户
[
"
组织服务管理
"
,
"
服务审批管理
"
,
"
云资源管理
"
],
//组织管理员
[
"
平台服务管理
"
,
"
服务审批管理
"
,
"
云资源管理
"
],
//超级管理员
],
// 服务管理列表,onlyRead
},
modules
:
{
},
modules
:
{},
mutations
:
{
rolefun
(
state
,
newValue
)
{
state
.
role
=
newValue
;
...
...
@@ -20,4 +23,4 @@ const store = new Vuex.Store({
},
});
export
default
store
\ No newline at end of file
export
default
store
;
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