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
92c54c96
Commit
92c54c96
authored
Jun 11, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务管理
parent
4d1e09f9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
99 additions
and
89 deletions
+99
-89
src/components/apass-table.vue
src/components/apass-table.vue
+1
-1
src/pages/workbench/fwgl/fwglList.vue
src/pages/workbench/fwgl/fwglList.vue
+98
-88
No files found.
src/components/apass-table.vue
View file @
92c54c96
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
v-if=
"v.disabledRule && v.disabledRule(scope.row)"
v-if=
"v.disabledRule && v.disabledRule(scope.row)"
class=
"btn disabled"
class=
"btn disabled"
:key=
"'btn_' + index + '_' + i"
:key=
"'btn_' + index + '_' + i"
v-text=
"v.label"
v-text=
"v.
getLabel ? v.getLabel(scope.row) : v.
label"
>
>
</span>
</span>
<a
<a
...
...
src/pages/workbench/fwgl/fwglList.vue
View file @
92c54c96
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
:list-header=
"listHeader"
:list-header=
"listHeader"
:list-data=
"listData"
:list-data=
"listData"
:list-padding-left=
"35"
:list-padding-left=
"35"
@
list-action=
"init
Datas
"
@
list-action=
"init"
>
>
<el-breadcrumb
separator=
"/"
slot=
"breadcrumb"
>
<el-breadcrumb
separator=
"/"
slot=
"breadcrumb"
>
<el-breadcrumb-item
:to=
"`/fwgl/$
{level}`">我的服务
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"`/fwgl/$
{level}`">我的服务
</el-breadcrumb-item>
...
@@ -148,12 +148,15 @@ export default {
...
@@ -148,12 +148,15 @@ export default {
},
},
{
{
getLabel
(
item
)
{
getLabel
(
item
)
{
return
item
.
state
==
1
?
"
申请下架
"
:
"
申请上
架
"
;
return
item
.
state
==
0
?
"
申请上架
"
:
"
申请下
架
"
;
},
},
callback
(
item
)
{
callback
(
item
)
{
item
.
state
==
1
item
.
state
==
0
?
_self
.
applyForSoldOutItem
(
item
)
?
_self
.
applyForSoldUpItem
(
item
)
:
_self
.
applyForSoldUpItem
(
item
);
:
_self
.
applyForSoldOutItem
(
item
);
},
disabledRule
(
item
)
{
return
item
.
state
==
2
;
},
},
},
},
{
{
...
@@ -161,7 +164,7 @@ export default {
...
@@ -161,7 +164,7 @@ export default {
callback
:
this
.
deleteItem
,
callback
:
this
.
deleteItem
,
class
:
"
warn
"
,
class
:
"
warn
"
,
disabledRule
(
item
)
{
disabledRule
(
item
)
{
return
item
.
state
===
1
;
return
item
.
state
!=
2
;
},
},
},
},
],
],
...
@@ -316,7 +319,7 @@ export default {
...
@@ -316,7 +319,7 @@ export default {
}
}
// TODO: 普通用户 --- 云资源服务
// TODO: 普通用户 --- 云资源服务
else
if
(
level
==
0
&&
type
==
2
)
{
else
if
(
level
==
0
&&
type
==
2
)
{
this
.
listUrl
=
"
/apaas/service/v3/service/manager/list
"
;
this
.
listUrl
=
"
xxxxxx
"
;
this
.
listHeader
=
[
this
.
listHeader
=
[
{
{
label
:
"
工作区域
"
,
label
:
"
工作区域
"
,
...
@@ -418,7 +421,7 @@ export default {
...
@@ -418,7 +421,7 @@ export default {
label
:
"
服务状态
"
,
label
:
"
服务状态
"
,
prop
:
"
state
"
,
prop
:
"
state
"
,
getText
(
item
)
{
getText
(
item
)
{
return
[
"
已下架
"
,
"
上架中
"
][
item
.
state
];
return
[
"
已下架
"
,
"
已上架
"
,
"
上架中
"
][
item
.
state
];
},
},
align
:
"
center
"
,
align
:
"
center
"
,
},
},
...
@@ -573,7 +576,7 @@ export default {
...
@@ -573,7 +576,7 @@ export default {
}
}
// TODO:组织管理员 --- 云资源管理
// TODO:组织管理员 --- 云资源管理
else
if
(
level
==
1
&&
type
==
2
)
{
else
if
(
level
==
1
&&
type
==
2
)
{
this
.
listUrl
=
"
/apaas/service/v3/service/manager/list
"
;
this
.
listUrl
=
"
xxxxxx
"
;
this
.
listHeader
=
[
this
.
listHeader
=
[
{
{
label
:
"
工作区域
"
,
label
:
"
工作区域
"
,
...
@@ -684,18 +687,21 @@ export default {
...
@@ -684,18 +687,21 @@ export default {
},
},
{
{
getLabel
(
item
)
{
getLabel
(
item
)
{
return
item
.
state
==
1
?
"
下架
"
:
"
上
架
"
;
return
item
.
state
==
0
?
"
上架
"
:
"
下
架
"
;
},
},
callback
(
item
)
{
callback
(
item
)
{
item
.
state
==
1
item
.
state
==
0
?
_self
.
sold
Out
Item
(
item
)
?
_self
.
sold
Up
Item
(
item
)
:
_self
.
sold
Up
Item
(
item
);
:
_self
.
sold
Out
Item
(
item
);
},
},
},
},
{
{
label
:
"
删除
"
,
label
:
"
删除
"
,
class
:
"
warn
"
,
class
:
"
warn
"
,
callback
:
this
.
deleteItem
,
callback
:
this
.
deleteItem
,
disabledRule
(
item
)
{
return
item
.
state
===
1
;
},
},
},
],
],
},
},
...
@@ -836,7 +842,7 @@ export default {
...
@@ -836,7 +842,7 @@ export default {
}
}
// TODO:超级管理员 --- 云资源管理
// TODO:超级管理员 --- 云资源管理
else
if
(
level
==
2
&&
type
==
2
)
{
else
if
(
level
==
2
&&
type
==
2
)
{
this
.
listUrl
=
"
/apaas/service/v3/service/manager/list
"
;
this
.
listUrl
=
"
xxxxxx
"
;
this
.
listHeader
=
[
this
.
listHeader
=
[
{
{
label
:
"
所属组织
"
,
label
:
"
所属组织
"
,
...
@@ -881,23 +887,28 @@ export default {
...
@@ -881,23 +887,28 @@ export default {
throw
Error
(
"
The page doesn't exist
"
);
throw
Error
(
"
The page doesn't exist
"
);
}
}
},
},
init
Datas
(
filter
)
{
init
(
filter
)
{
this
.
tempFliter
=
filter
;
this
.
tempFliter
=
filter
;
this
.
$http
this
.
$http
.
get
(
this
.
listUrl
,
{
.
get
(
this
.
listUrl
,
{
params
:
{
params
:
{
data_service_type
:
data_service_type
:
filter
.
service_type_1
&&
(
filter
.
service_type_1
&&
filter
.
service_type_1
.
map
((
item
)
=>
item
.
value
).
join
(
"
,
"
),
// 服务类型
filter
.
service_type_1
.
map
((
item
)
=>
item
.
value
).
join
(
"
,
"
))
||
""
,
// 服务类型
sectors
:
sectors
:
filter
.
service_area
&&
(
filter
.
service_area
&&
filter
.
service_area
.
map
((
item
)
=>
item
.
value
).
join
(
"
,
"
),
// 服务领域
filter
.
service_area
.
map
((
item
)
=>
item
.
value
).
join
(
"
,
"
))
||
""
,
// 服务领域
openness
:
openness
:
filter
.
openness
&&
(
filter
.
openness
&&
filter
.
openness
.
map
((
item
)
=>
item
.
value
).
join
(
"
,
"
),
// 开放程度
filter
.
openness
.
map
((
item
)
=>
item
.
value
).
join
(
"
,
"
))
||
""
,
// 开放程度
state
:
state
:
filter
.
state
&&
filter
.
state
.
map
((
item
)
=>
item
.
value
).
join
(
"
,
"
),
// 服务状态
(
filter
.
state
&&
filter
.
state
.
map
((
item
)
=>
item
.
value
).
join
(
"
,
"
))
||
""
,
// 服务状态
keyword
:
filter
.
keyword
,
keyword
:
filter
.
keyword
,
page
:
filter
.
page
,
page
:
filter
.
page
,
size
:
filter
.
size
,
size
:
filter
.
size
,
...
@@ -914,21 +925,15 @@ export default {
...
@@ -914,21 +925,15 @@ export default {
},
},
showDialog
()
{
showDialog
()
{
this
.
$refs
.
dialog
.
show
();
this
.
$refs
.
dialog
.
show
();
},
},
// 唤醒弹窗
editItem
(
item
)
{
applyForSoldUpItem
(
item
)
{
this
.
$router
.
push
(
this
.
dialogInfo
.
title
=
"
提示
"
;
`/fwgl/
${
this
.
level
}
/
${
this
.
type
}
/serviceedit/
${
item
.
id
}
`
this
.
dialogInfo
.
msg
=
"
确认申请上架此服务吗?
"
;
);
},
applyForSoldOutItem
(
item
)
{
this
.
dialogInfo
.
title
=
"
是否确定下架服务
"
;
this
.
dialogInfo
.
msg
=
"
下架此服务会导致用户被迫暂停对服务的调用,下架前需向超级管理员发送通知,超级管理员通过后此服务将会从服务超市中下架。
"
;
this
.
dialogInfo
.
cancelText
=
"
取消
"
;
this
.
dialogInfo
.
cancelText
=
"
取消
"
;
this
.
dialogInfo
.
sunbmitText
=
"
发送通知
"
;
this
.
dialogInfo
.
sunbmitText
=
"
发送通知
"
;
this
.
dialogInfo
.
submit
=
()
=>
{
this
.
dialogInfo
.
submit
=
()
=>
{
this
.
$http
this
.
$http
.
post
(
`/apaas/service/v3/service/manager/send/
down
notice`
,
{
.
post
(
`/apaas/service/v3/service/manager/send/
up
notice`
,
{
id
:
item
.
id
,
id
:
item
.
id
,
})
})
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
...
@@ -937,67 +942,68 @@ export default {
...
@@ -937,67 +942,68 @@ export default {
message
:
data
.
errMsg
,
message
:
data
.
errMsg
,
type
:
"
success
"
,
type
:
"
success
"
,
});
});
this
.
init
(
this
.
tempFliter
);
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
data
.
errMsg
,
message
:
data
.
errMsg
,
type
:
"
warn
"
,
type
:
"
warn
ing
"
,
});
});
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
this
.
$message
({
this
.
$message
({
message
:
"
申请${item.name}失败
"
,
message
:
`申请
${
item
.
name
}
失败`
,
type
:
"
warn
"
,
type
:
"
warn
ing
"
,
});
});
});
});
};
};
this
.
showDialog
();
this
.
showDialog
();
},
},
// 服务上架申请
applyForSoldUpItem
(
item
)
{
applyForSoldOutItem
(
item
)
{
this
.
dialogInfo
.
title
=
"
提示
"
;
this
.
dialogInfo
.
title
=
"
是否确定下架服务
"
;
this
.
dialogInfo
.
msg
=
"
确认申请上架此服务吗?
"
;
this
.
dialogInfo
.
msg
=
"
下架此服务会导致用户被迫暂停对服务的调用,下架前需向超级管理员发送通知,超级管理员通过后此服务将会从服务超市中下架。
"
;
this
.
dialogInfo
.
cancelText
=
"
取消
"
;
this
.
dialogInfo
.
cancelText
=
"
取消
"
;
this
.
dialogInfo
.
sunbmitText
=
"
发送通知
"
;
this
.
dialogInfo
.
sunbmitText
=
"
发送通知
"
;
this
.
dialogInfo
.
submit
=
()
=>
{
this
.
dialogInfo
.
submit
=
()
=>
{
this
.
$http
this
.
$http
.
post
(
`/apaas/service/v3/service/manager/send/
up
notice`
,
{
.
post
(
`/apaas/service/v3/service/manager/send/
down
notice`
,
{
id
:
item
.
id
,
id
:
item
.
id
,
})
})
.
then
((
response
)
=>
{
.
then
((
{
data
}
)
=>
{
if
(
data
.
success
)
{
if
(
data
.
success
)
{
this
.
$message
({
this
.
$message
({
message
:
data
.
errMsg
,
message
:
data
.
errMsg
,
type
:
"
success
"
,
type
:
"
success
"
,
});
});
this
.
init
(
this
.
tempFliter
);
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
data
.
errMsg
,
message
:
data
.
errMsg
,
type
:
"
warn
"
,
type
:
"
warn
ing
"
,
});
});
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
this
.
$message
({
this
.
$message
({
message
:
"
申请${item.name}失败
"
,
message
:
`申请
${
item
.
name
}
失败`
,
type
:
"
warn
"
,
type
:
"
warn
ing
"
,
});
});
});
});
};
};
this
.
showDialog
();
this
.
showDialog
();
},
},
// 服务下架申请
delete
Item
(
item
)
{
soldUp
Item
(
item
)
{
this
.
dialogInfo
.
title
=
""
;
this
.
dialogInfo
.
title
=
"
提示
"
;
this
.
dialogInfo
.
msg
=
"
是否删除该条服务
?
"
;
this
.
dialogInfo
.
msg
=
"
确认上架此服务吗
?
"
;
this
.
dialogInfo
.
cancelText
=
""
;
this
.
dialogInfo
.
cancelText
=
""
;
this
.
dialogInfo
.
sunbmitText
=
""
;
this
.
dialogInfo
.
sunbmitText
=
"
确定
"
;
this
.
dialogInfo
.
submit
=
()
=>
{
this
.
dialogInfo
.
submit
=
()
=>
{
this
.
$http
this
.
$http
.
delete
(
this
.
deleteUrl
,
{
.
post
(
`/apaas/service/v3/service/manager/up`
,
{
params
:
{
id
:
item
.
id
,
id
:
this
.
type
==
1
?
item
.
service_apply_info
.
id
:
item
.
id
,
},
})
})
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
if
(
data
.
success
)
{
if
(
data
.
success
)
{
...
@@ -1005,34 +1011,23 @@ export default {
...
@@ -1005,34 +1011,23 @@ export default {
message
:
data
.
errMsg
,
message
:
data
.
errMsg
,
type
:
"
success
"
,
type
:
"
success
"
,
});
});
this
.
init
Datas
(
this
.
tempFliter
);
this
.
init
(
this
.
tempFliter
);
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
data
.
errMsg
,
message
:
data
.
errMsg
,
type
:
"
warn
"
,
type
:
"
warn
ing
"
,
});
});
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
$message
({
this
.
$message
({
message
:
`
删除
${
item
.
name
}
失败.`
,
message
:
`
上架
${
item
.
name
}
失败.`
,
type
:
"
warn
"
,
type
:
"
warn
ing
"
,
});
});
});
});
};
};
this
.
showDialog
();
this
.
showDialog
();
},
},
// 上架服务(超级管理员)
detailItem
(
item
)
{
this
.
$router
.
push
(
`
${
this
.
detailsUrl
+
item
.
id
}
`
);
},
approvalItem
(
item
)
{
this
.
$router
.
push
(
`/fwgl/
${
this
.
level
}
/
${
this
.
type
}
/approvalserviceedit/
${
item
.
service_apply_info
.
id
}
`
);
},
allotItem
(
item
)
{
console
.
log
(
"
allotItem -
"
+
item
.
name
);
},
soldOutItem
(
item
)
{
soldOutItem
(
item
)
{
this
.
dialogInfo
.
title
=
"
提示
"
;
this
.
dialogInfo
.
title
=
"
提示
"
;
this
.
dialogInfo
.
msg
=
this
.
dialogInfo
.
msg
=
...
@@ -1050,32 +1045,34 @@ export default {
...
@@ -1050,32 +1045,34 @@ export default {
message
:
data
.
errMsg
,
message
:
data
.
errMsg
,
type
:
"
success
"
,
type
:
"
success
"
,
});
});
this
.
init
Datas
(
this
.
tempFliter
);
this
.
init
(
this
.
tempFliter
);
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
data
.
errMsg
,
message
:
data
.
errMsg
,
type
:
"
warn
"
,
type
:
"
warn
ing
"
,
});
});
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
$message
({
this
.
$message
({
message
:
`下架
${
item
.
name
}
失败.`
,
message
:
`下架
${
item
.
name
}
失败.`
,
type
:
"
warn
"
,
type
:
"
warn
ing
"
,
});
});
});
});
};
};
this
.
showDialog
();
this
.
showDialog
();
},
},
// 下架服务(超级管理员)
soldUp
Item
(
item
)
{
delete
Item
(
item
)
{
this
.
dialogInfo
.
title
=
"
提示
"
;
this
.
dialogInfo
.
title
=
""
;
this
.
dialogInfo
.
msg
=
"
确认上架此服务吗
?
"
;
this
.
dialogInfo
.
msg
=
"
是否删除该条服务
?
"
;
this
.
dialogInfo
.
cancelText
=
""
;
this
.
dialogInfo
.
cancelText
=
""
;
this
.
dialogInfo
.
sunbmitText
=
"
确定
"
;
this
.
dialogInfo
.
sunbmitText
=
""
;
this
.
dialogInfo
.
submit
=
()
=>
{
this
.
dialogInfo
.
submit
=
()
=>
{
this
.
$http
this
.
$http
.
post
(
`/apaas/service/v3/service/manager/up`
,
{
.
delete
(
this
.
deleteUrl
,
{
id
:
item
.
id
,
params
:
{
id
:
this
.
type
==
1
?
item
.
service_apply_info
.
id
:
item
.
id
,
},
})
})
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
if
(
data
.
success
)
{
if
(
data
.
success
)
{
...
@@ -1083,26 +1080,39 @@ export default {
...
@@ -1083,26 +1080,39 @@ export default {
message
:
data
.
errMsg
,
message
:
data
.
errMsg
,
type
:
"
success
"
,
type
:
"
success
"
,
});
});
this
.
init
Datas
(
this
.
tempFliter
);
this
.
init
(
this
.
tempFliter
);
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
data
.
errMsg
,
message
:
data
.
errMsg
,
type
:
"
warn
"
,
type
:
"
warn
ing
"
,
});
});
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
$message
({
this
.
$message
({
message
:
`
上架
${
item
.
name
}
失败.`
,
message
:
`
删除
${
item
.
name
}
失败.`
,
type
:
"
warn
"
,
type
:
"
warn
ing
"
,
});
});
});
});
};
};
this
.
showDialog
();
this
.
showDialog
();
},
},
// 删除服务
dialogSubmit
()
{
detailItem
(
item
)
{
console
.
log
(
"
dialog submit
"
);
this
.
$router
.
push
(
`
${
this
.
detailsUrl
+
item
.
id
}
`
);
},
},
// 查看服务
editItem
(
item
)
{
this
.
$router
.
push
(
`/fwgl/
${
this
.
level
}
/
${
this
.
type
}
/serviceedit/
${
item
.
id
}
`
);
},
// 编辑服务
approvalItem
(
item
)
{
this
.
$router
.
push
(
`/fwgl/
${
this
.
level
}
/
${
this
.
type
}
/approvalserviceedit/
${
item
.
service_apply_info
.
id
}
`
);
},
// 审批服务
allotItem
(
item
)
{
console
.
log
(
"
allotItem -
"
+
item
.
name
);
},
// TODO: 云资源分配
},
},
created
()
{
created
()
{
this
.
level
=
parseInt
(
this
.
$route
.
params
.
level
);
this
.
level
=
parseInt
(
this
.
$route
.
params
.
level
);
...
...
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