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
9928f9f9
Commit
9928f9f9
authored
Jul 10, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ldx' into dev
parents
43c440e3
30f3f139
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
275 additions
and
104 deletions
+275
-104
src/assets/imgs/img_yunziyuan.png
src/assets/imgs/img_yunziyuan.png
+0
-0
src/components/e-charts/dashboard.vue
src/components/e-charts/dashboard.vue
+18
-12
src/components/order-list/order-list-cell.vue
src/components/order-list/order-list-cell.vue
+38
-11
src/components/service-list/commodity-cell.vue
src/components/service-list/commodity-cell.vue
+12
-10
src/components/service-list/service_list.vue
src/components/service-list/service_list.vue
+7
-3
src/components/shop-cloud/shop-cloud.vue
src/components/shop-cloud/shop-cloud.vue
+63
-29
src/pages/user/order/order_detail.vue
src/pages/user/order/order_detail.vue
+22
-10
src/pages/user/user_info.vue
src/pages/user/user_info.vue
+1
-0
src/pages/workbench/fwgl/cloud-detail.vue
src/pages/workbench/fwgl/cloud-detail.vue
+109
-28
src/request/api/workbench.js
src/request/api/workbench.js
+5
-1
No files found.
src/assets/imgs/img_yunziyuan.png
0 → 100644
View file @
9928f9f9
4.29 KB
src/components/e-charts/dashboard.vue
View file @
9928f9f9
...
...
@@ -101,6 +101,10 @@ export default {
roundCap
:
true
,
itemStyle
:
{
normal
:
{
color
:
new
graphic
.
LinearGradient
(
0
,
0
,
1
,
0
,
[
{
offset
:
0
,
color
:
"
#fff
"
},
{
offset
:
1
,
color
:
self
.
dangerousValue
==
"
high
"
?
self
.
data
.
data
>=
80
...
...
@@ -114,6 +118,8 @@ export default {
?
"
#54cefd
"
:
"
#25bdb1
"
}
])
}
},
barGap
:
"
-100%
"
},
...
...
src/components/order-list/order-list-cell.vue
View file @
9928f9f9
...
...
@@ -7,18 +7,31 @@
</div>
<el-row
class=
"cell_row"
>
<el-col
:span=
"10"
class=
"cell_msg"
>
<img
:src=
"cellItem.cover"
class=
"cell_msg_img"
/>
<img
v-if=
"cellItem.order_type != 3"
:src=
"cellItem.cover"
class=
"cell_msg_img"
/>
<img
v-else
:src=
"require('@/assets/imgs/img_yunziyuan.png')"
class=
"cell_msg_img"
/>
<div
class=
"cell_msg_right"
>
<div
class=
"cell_name"
>
<div
v-if=
"cellItem.order_type != 3"
class=
"cell_name"
>
<span>
{{
cellItem
.
name
}}
</span>
<span
v-if=
"cellItem.mapService"
class=
"tags map_service"
>
mapService
</span>
<span
v-if=
"cellItem.openness == 1"
class=
"tags shared"
>
共享
</span>
<span
v-else-if=
"cellItem.openness == 2"
class=
"tags restricted"
>
受限
</span>
<span
v-else-if=
"cellItem.openness == 3"
class=
"tags sensitive"
>
敏感
</span>
</div>
<div
v-else
class=
"cell_name"
>
<span>
云资源申请
</span>
</div>
<div
class=
"cell_msg_other"
>
<div
class=
"cell_type"
>
{{
cellItem
.
sector
}}
</div>
<div
class=
"cell_creator"
>
{{
cellItem
.
src_organization
}}
</div>
<div
class=
"cell_type"
>
{{
cellItem
.
order_type
!=
3
?
cellItem
.
sector
:
cellItem
.
namespace
}}
</div>
<div
v-if=
"cellItem.order_type != 3"
class=
"cell_creator"
>
{{
cellItem
.
src_organization
}}
</div>
<div
v-else
class=
"cell_creator"
>
{{
cellItem
.
apply_type
==
0
?
"
申请新的工作区域
"
:
"
升级现有工作区域
"
}}
</div>
</div>
</div>
</el-col>
...
...
@@ -33,8 +46,13 @@
<div>
规格:
{{
cellItem
.
spec_app
==
0
?
"
申请获取应用镜像部署权限
"
:
"
申请获取应用镜像开发权限
"
}}
</div>
</div>
<div
v-else-if=
"cellItem.order_type == 3"
>
<div>
规格:CPU 2核,内存 4GB,容器组 8个;数据盘 3块,每块数据盘容量 2GB
</div>
<div
class=
"cell_specification_type"
>
单个容器组:CPU最高 4核,默认 2核;内存最高 8 GB,默认 4GB
</div>
<div>
规格:CPU
{{
cellItem
.
cpu
}}
核,内存
{{
cellItem
.
memory
}}
GB,容器组
{{
cellItem
.
containers
}}
个;
<span
v-if=
"cellItem.disk_num != 0"
>
{{
cellItem
.
disk_num
}}
数据盘
{{
cellItem
.
disk_num
}}
块,每块数据盘容量
{{
cellItem
.
disk_cap
}}
GB
</span>
</div>
<div
class=
"cell_specification_type"
>
单个容器组:CPU最高
{{
cellItem
.
one_cpu_max
}}
核,默认
{{
cellItem
.
one_cpu_min
}}
核;内存最高
{{
cellItem
.
one_memory_max
}}
GB,默认
{{
cellItem
.
one_memory_min
}}
GB
</div>
</div>
</el-col>
<el-col
:span=
"4"
class=
"approval_status"
>
...
...
@@ -93,7 +111,7 @@
class=
"cell_option_btn"
@
click=
"viewDetail(cellItem.order_id)"
>
查看详情
</el-button>
<div
class=
"cell_option_spec"
@
click=
"nextApply"
>
再次申请
</div>
<div
v-if=
"cellItem.approval_second_level == 1 && cellItem.pay_status != -1"
class=
"cell_option_spec"
@
click=
"nextApply"
>
再次申请
</div>
</div>
</el-col>
<el-collapse-transition>
...
...
@@ -220,6 +238,10 @@ export default {
duration
:
this
.
cellItem
.
duration
,
duration_unit
:
this
.
cellItem
.
duration_unit
};
this
.
$router
.
push
({
path
:
"
/shop/shop_car_apply
"
,
query
:
query
});
}
else
if
(
this
.
cellItem
.
order_type
==
2
)
{
query
=
{
app_id
:
parseFloat
(
this
.
cellItem
.
app_id
),
...
...
@@ -227,11 +249,15 @@ export default {
duration
:
this
.
cellItem
.
duration
,
duration_unit
:
this
.
cellItem
.
duration_unit
};
}
this
.
$router
.
push
({
path
:
"
/shop/shop_car_apply
"
,
query
:
query
});
}
else
if
(
this
.
cellItem
.
order_type
==
2
)
{
this
.
$router
.
push
({
path
:
"
/shop/shop_cloud
"
});
}
},
getMessage
()
{
if
(
this
.
cellItem
.
order_type
==
1
)
{
...
...
@@ -310,6 +336,7 @@ export default {
width
:
118px
;
height
:
118px
;
border-radius
:
8px
;
border
:
3px
#f4f7fc
solid
;
}
.cell_msg_right
{
width
:
calc
(
100%
-
140px
);
...
...
src/components/service-list/commodity-cell.vue
View file @
9928f9f9
...
...
@@ -30,7 +30,7 @@
<span
class=
"com_cell_item_title"
>
服务类型:
</span>
<span
class=
"com_cell_data"
>
{{
cellData
.
data_service_type1_name
}}
{{
cellData
.
data_service_type2_
str
}}
{{
cellData
.
data_service_type3_str
}}
</span>
>
{{
cellData
.
data_service_type1_name
}}
{{
cellData
.
data_service_type2_
name
}}
{{
cellData
.
data_service_type3_name
}}
</span>
</div>
<div
class=
"com_cell_item"
>
<span
class=
"com_cell_item_title"
>
更新时间:
</span>
...
...
@@ -89,6 +89,7 @@ export default {
height
:
166px
;
border-radius
:
12px
;
overflow
:
hidden
;
border
:
4px
#f4f7fc
solid
;
}
.com_cell_img
{
width
:
100%
;
...
...
@@ -100,12 +101,13 @@ export default {
}
.com_cell_msg_title
{
color
:
#0d1847
;
font-size
:
22px
;
font-size
:
18px
;
line-height
:
30px
;
font-weight
:
700
;
margin-bottom
:
6px
;
}
.com_cell_item
{
font-size
:
1
6
px
;
font-size
:
1
4
px
;
line-height
:
26px
;
margin-top
:
1px
;
color
:
#8890a7
;
...
...
@@ -124,12 +126,12 @@ export default {
white-space
:
nowrap
;
}
.com_cell_right
{
width
:
25
0px
;
width
:
30
0px
;
padding
:
25px
0
0
50px
;
}
.com_cell_right_text
{
font-size
:
1
4
px
;
margin-top
:
1
5px
;
font-size
:
1
6
px
;
margin-top
:
2
5px
;
}
.com_cell_right_time_tit
{
color
:
#8890a7
;
...
...
@@ -140,10 +142,10 @@ export default {
.com_cell_right_btn
{
background-color
:
#0f2683
;
color
:
#f8f9fd
;
width
:
16
0px
;
width
:
22
0px
;
height
:
40px
;
border-radius
:
20px
;
margin-top
:
3
5px
;
margin-top
:
2
5px
;
}
.tags
{
display
:
inline-block
;
...
...
@@ -181,10 +183,10 @@ export default {
.com_cell_right
.el-rate__text
{
display
:
inline-block
;
margin-left
:
10px
;
font-size
:
2
2px
;
font-size
:
3
2px
;
font-weight
:
700
;
}
.com_cell_right
.el-rate__icon
{
font-size
:
2
0
px
;
font-size
:
2
8
px
;
}
</
style
>
\ No newline at end of file
src/components/service-list/service_list.vue
View file @
9928f9f9
...
...
@@ -223,7 +223,11 @@ export default {
time_app
:
null
,
times
:
null
}),
mounted
()
{},
mounted
()
{
window
.
onresize
=
()
=>
{
this
.
judgeHeight
();
};
},
watch
:
{
urlFilter
:
{
handler
(
val
)
{
...
...
@@ -335,7 +339,7 @@ export default {
this
.
time_app
=
setInterval
(()
=>
{
if
(
this
.
refresh_app_1
&&
this
.
refresh_app_2
&&
this
.
refresh_app_3
)
{
this
.
judgeHeight
();
clearInterval
(
this
.
time_app
)
clearInterval
(
this
.
time_app
)
;
}
},
50
);
}
else
{
...
...
@@ -377,7 +381,7 @@ export default {
}
}
}
this
.
$set
((
this
.
filterLists
=
list
))
;
this
.
filterLists
=
[...
list
]
;
},
clickOpen
(
index
)
{
let
list
=
this
.
openList
;
...
...
src/components/shop-cloud/shop-cloud.vue
View file @
9928f9f9
...
...
@@ -104,30 +104,42 @@
<div
class=
"input_right"
>
个
</div>
</el-form-item>
</el-col>
<el-col
:span=
"22"
>
<el-form-item
class=
"form_item"
>
<div
class=
"form_item_title"
>
数据盘(可选):
</div>
<el-select
v-model=
"formNew.store_type"
placeholder=
"请选择数据盘类型"
>
<el-option
v-for=
"item in options_store_type"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
class=
"form_item input_has_right"
>
<div
class=
"form_item_title"
>
数据盘(可选):
</div>
<el-input-number
v-model=
"formNew.dataDisk"
controls-position=
"right"
:min=
"0"
placeholder=
"请选择数量"
placeholder=
"请选择
增加数据盘的
数量"
></el-input-number>
<div
class=
"input_right"
>
块
</div>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
class=
"form_item input_has_right"
>
<div
class=
"form_item_title"
>
每块数据盘容量:
</div>
<el-input-number
v-model=
"formNew.perDataDisk"
controls-position=
"right"
:min=
"0"
placeholder=
"请选择容量"
placeholder=
"请选择
每块数据盘的
容量"
></el-input-number>
<div
class=
"input_right"
>
GB
</div>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<div
class=
"form_title"
>
单个容器组规格
</div>
</el-col>
...
...
@@ -330,24 +342,37 @@
></table-um>
</el-form-item>
</el-col>
<el-col
:span=
"22"
>
<el-form-item
class=
"form_item"
>
<div
class=
"form_item_title"
>
增加数据盘:
</div>
<el-select
v-model=
"formOld.store_type"
placeholder=
"请选择数据盘类型"
>
<el-option
v-for=
"item in options_store_type"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
class=
"form_item input_has_right"
>
<div
class=
"form_item_title"
>
增加数据盘:
</div>
<el-input-number
v-model=
"formOld.dataDisk"
controls-position=
"right"
:min=
"0"
placeholder=
"请选择增加数据盘的数量"
></el-input-number>
<div
class=
"input_right"
>
块
</div>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
class=
"form_item input_has_right"
>
<div
class=
"form_item_title"
>
每块数据盘容量:
</div>
<el-input-number
v-model=
"formOld.perDataDisk"
controls-position=
"right"
:min=
"0"
placeholder=
"请选择每块数据盘的容量"
></el-input-number>
<div
class=
"input_right"
>
GB
</div>
</el-form-item>
...
...
@@ -562,12 +587,16 @@
<span
class=
"dia_block_item_title"
>
容器组:
</span>
<span
class=
"dia_block_item_val"
>
{{
diaForm
.
containerGroup
}}
个
</span>
</div>
<div
class=
"dia_block_item_in"
>
<div
class=
"dia_block_item_in"
v-if=
"diaForm.dataDisk != 0"
>
<span
class=
"dia_block_item_title"
>
数据盘:
</span>
<span
class=
"dia_block_item_val"
>
{{
diaForm
.
dataDisk
}}
块,每块
{{
diaForm
.
perDataDisk
}}
GB
</span>
</div>
<div
class=
"dia_block_item_in"
v-if=
"diaForm.dataDisk != 0"
>
<span
class=
"dia_block_item_title"
>
数据盘类型:
</span>
<span
class=
"dia_block_item_val"
>
{{
diaForm
.
store_type
}}
</span>
</div>
</div>
<span
class=
"dia_item_all_title"
>
单个容器组规格:
</span>
<div
class=
"dia_block_item"
>
...
...
@@ -753,7 +782,8 @@ export default {
appDuration
:
undefined
,
durType
:
1
,
apply_file
:
""
,
apply_file_name
:
""
apply_file_name
:
""
,
store_type
:
"
nfs-client
"
}
,
ruleNew
:
{
namespace
:
[
...
...
@@ -803,6 +833,10 @@ export default {
{
value
:
"
16
"
,
label
:
"
16
"
}
,
{
value
:
"
32
"
,
label
:
"
32
"
}
],
options_store_type
:
[
{
value
:
"
nfs-client
"
,
label
:
"
nfs-client
"
}
,
{
value
:
"
rook-ceph-block
"
,
label
:
"
rook-ceph-block
"
}
],
formShow
:
false
,
specArr
:
[
{
title
:
"
CPU
"
,
val
:
"
4
"
,
src
:
"
ic_CPU
"
}
,
...
...
@@ -834,23 +868,10 @@ export default {
appDuration
:
undefined
,
durType
:
1
,
apply_file
:
""
,
apply_file_name
:
""
}
,
paramsOld
:
{
cpu
:
""
,
memory
:
""
,
containerGroup
:
undefined
,
dataDisk
:
undefined
,
perDataDisk
:
undefined
,
perCPUs
:
undefined
,
perCPU
:
undefined
,
perRAMs
:
undefined
,
perRAM
:
undefined
,
appDuration
:
undefined
,
durType
:
1
,
apply_file
:
""
,
apply_file_name
:
""
apply_file_name
:
""
,
store_type
:
"
nfs-client
"
}
,
paramsOld
:
{
}
,
ruleOld
:
{
namespace
:
[
{
required
:
true
,
message
:
"
请输入工作区域名称
"
,
trigger
:
"
blur
"
}
...
...
@@ -944,7 +965,8 @@ export default {
this
.
formOld
.
perCPU
=
paramsOld
.
one_cpu_min
;
this
.
formOld
.
perRAMs
=
paramsOld
.
one_memory_max
;
this
.
formOld
.
perRAM
=
paramsOld
.
one_memory_min
;
this
.
dataDiskList
=
paramsOld
.
disk_list
;
this
.
formOld
.
store_type
=
paramsOld
.
store_type
;
this
.
dataDiskList
=
paramsOld
.
disk_list
||
[];
this
.
formShow
=
true
;
}
else
{
this
.
formShow
=
false
;
...
...
@@ -999,7 +1021,14 @@ export default {
one_cpu_max
:
this
.
formNew
.
perCPUs
,
one_memory_min
:
this
.
formNew
.
perRAM
,
one_memory_max
:
this
.
formNew
.
perRAMs
}
,
disks
:
[
{
disk_num
:
this
.
formOld
.
dataDisk
,
disk_cap
:
this
.
formOld
.
perDataDisk
,
store_type
:
this
.
formOld
.
store_type
}
]
}
;
this
.
$api
.
serviceShop
.
applicationCloud
(
query
).
then
(
response
=>
{
console
.
log
(
response
);
...
...
@@ -1016,13 +1045,18 @@ export default {
apply_connect_mobile
:
this
.
form
.
phone
,
memory
:
Number
(
this
.
formOld
.
memory
),
containers
:
this
.
formOld
.
containerGroup
,
disk_num
:
this
.
formOld
.
dataDisk
,
disk_cap
:
this
.
formOld
.
perDataDisk
,
one_cpu_min
:
this
.
formOld
.
perCPU
,
one_cpu_max
:
this
.
formOld
.
perCPUs
,
one_memory_min
:
this
.
formOld
.
perRAM
,
one_memory_max
:
this
.
formOld
.
perRAMs
}
,
disks
:
[
{
disk_num
:
this
.
formOld
.
dataDisk
,
disk_cap
:
this
.
formOld
.
perDataDisk
,
store_type
:
this
.
formOld
.
store_type
}
]
}
;
this
.
$api
.
serviceShop
.
updateCloud
(
query
).
then
(
response
=>
{
console
.
log
(
response
);
...
...
src/pages/user/order/order_detail.vue
View file @
9928f9f9
...
...
@@ -10,22 +10,22 @@
<div
class=
"detail_head_cell detail_head_status border_right"
>
<p
class=
"detail_head_cell_title"
>
申请状态
</p>
<p
class=
"detail_head_cell_val
blue
"
class=
"detail_head_cell_val
text_yellow
"
v-if=
"orderDetail.approval_first_level == 0 && orderDetail.pay_status != -1"
>
待审核
</p>
<p
class=
"detail_head_cell_val
blue
"
class=
"detail_head_cell_val
text_yellow
"
v-if=
"orderDetail.approval_first_level == 1&& orderDetail.approval_second_level == 0 && orderDetail.pay_status != -1"
>
审核中
</p>
<p
class=
"detail_head_cell_val blue"
class=
"detail_head_cell_val
text_
blue"
v-if=
"orderDetail.approval_second_level == 1 && orderDetail.pay_status != -1"
>
审核通过
</p>
<p
class=
"detail_head_cell_val
blue
"
class=
"detail_head_cell_val
text_red
"
v-if=
"orderDetail.approval_first_level == -1 && orderDetail.pay_status != -1"
>
审核未通过
</p>
<p
class=
"detail_head_cell_val blue"
v-if=
"orderDetail.pay_status == -1"
>
订单已取消
</p>
<p
class=
"detail_head_cell_val
text_black
blue"
v-if=
"orderDetail.pay_status == -1"
>
订单已取消
</p>
</div>
<div
class=
"detail_head_cell detail_head_no border_right"
>
<p
class=
"detail_head_cell_title"
>
订单编号
</p>
...
...
@@ -118,10 +118,10 @@
</div>
</el-col>
<el-col
:span=
"10"
v-else-if=
"orderDetail.order_type == 3"
class=
"detail_service_msg"
>
<img
:src=
"
orderDetail.cover
"
class=
"detail_service_msg_img"
/>
<img
:src=
"
require('@/assets/imgs/img_yunziyuan.png')
"
class=
"detail_service_msg_img"
/>
<div
class=
"detail_service_msg_right"
>
<div
class=
"detail_service_name_cloud"
>
<span>
{{
orderDetail
.
name
}}
</span>
<span>
{{
orderDetail
.
name
space
}}
(云资源申请)
</span>
</div>
</div>
</el-col>
...
...
@@ -195,7 +195,9 @@
</div>
<div
class=
"params_block_item_in"
>
<span
class=
"params_block_item_title"
>
数据盘:
</span>
<span
class=
"params_block_item_val"
>
{{
orderDetail
.
disk_num
}}
块,每块
{{
orderDetail
.
disk_cap
}}
GB
</span>
<span
class=
"params_block_item_val"
>
{{
orderDetail
.
disk_num
}}
块,每块
{{
orderDetail
.
disk_cap
}}
GB
</span>
</div>
</div>
<span
class=
"params_block_title margin_top_20"
>
单个容器组规格:
</span>
...
...
@@ -222,7 +224,7 @@
</div>
<div
class=
"detail_title"
>
申请人信息
</div>
<info-list
@
download=
"download"
:list_arr=
"list_arr"
class=
"detail_s_val"
></info-list>
<process-card
:data=
"approval_arr1"
class=
"detail_s_val"
></process-card>
<process-card
v-if=
"orderDetail.order_type != 3"
:data=
"approval_arr1"
class=
"detail_s_val"
></process-card>
</block-radius>
</div>
</
template
>
...
...
@@ -506,9 +508,18 @@ export default {
line-height
:
28px
;
color
:
#242c43
;
}
.blue
{
.
text_
blue
{
color
:
#515fe7
;
}
.text_yellow
{
color
:
#ef9433
;
}
.text_blackblue
{
color
:
#242c43
;
}
.text_red
{
color
:
#e15260
;
}
.btn_group
{
position
:
absolute
;
right
:
20px
;
...
...
@@ -579,6 +590,7 @@ export default {
width
:
118px
;
height
:
118px
;
border-radius
:
8px
;
border
:
3px
#f4f7fc
solid
;
}
.detail_service_msg_right
{
width
:
calc
(
100%
-
140px
);
...
...
src/pages/user/user_info.vue
View file @
9928f9f9
...
...
@@ -288,6 +288,7 @@ export default {
:
this
.
user_data
.
userType
==
3
?
"
普通用户
"
:
"
普通用户开发者
"
;
this
.
imgList
=
[];
this
.
imgList
.
push
(
data
.
picture_path
);
this
.
formBusiness
.
businessSystemName
=
data
.
system_name
;
this
.
formBusiness
.
domainName
=
data
.
domain_name
;
...
...
src/pages/workbench/fwgl/cloud-detail.vue
View file @
9928f9f9
<
template
>
<!--
apply_id
user_id
apply_type
use_uid
id
-->
<div>
<el-breadcrumb
separator=
"/"
class=
"bread_crumb1 bread_left"
>
<el-breadcrumb-item
...
...
@@ -21,17 +28,11 @@
<span
class=
"head_right_msg_item"
>
{{
cloudData
.
phone
}}
</span>
资源申请状态:
<span
v-if=
"apply_type == 0
&& approve_state == 0 || apply_type != 0 && approve_update_state == 0
"
v-if=
"apply_type == 0"
class=
"head_right_msg_item apply_wait"
>
待审批
</span>
<span
v-if=
"apply_type == 0 && approve_state == 1 || apply_type != 0 && approve_update_state == 1"
class=
"head_right_msg_item apply_success"
>
审批通过
</span>
<span
v-if=
"apply_type == 0 && approve_state == -1 || apply_type != 0 && approve_update_state == -1"
class=
"head_right_msg_item apply_refuse"
>
审批未通过
</span>
<span
v-if=
"apply_type == 1"
class=
"head_right_msg_item apply_success"
>
审批通过
</span>
<span
v-if=
"apply_type == -1"
class=
"head_right_msg_item apply_refuse"
>
审批未通过
</span>
</p>
<p
class=
"head_right_msg_p"
>
业务系统名:
...
...
@@ -66,7 +67,13 @@
<div
class=
"params_block_item_in"
>
<span
class=
"params_block_item_title"
>
数据盘:
</span>
<div
class=
"params_block_item_val"
>
<div>
{{
cloudDteail
.
disk
}}
</div>
<div>
{{
cloudDteail
.
disk
}}
</div>
</div>
</div>
<div
class=
"params_block_item_in"
>
<span
class=
"params_block_item_title"
>
数据盘类型:
</span>
<div
class=
"params_block_item_val"
>
<div>
{{
cloudDteail
.
store_type
}}
</div>
</div>
</div>
<div
class=
"params_block_item_in"
>
...
...
@@ -113,6 +120,12 @@
<div>
{{
cloudDetailNew
.
adjust_disk
}}
</div>
</div>
</div>
<div
class=
"params_block_item_in"
>
<span
class=
"params_block_item_title"
>
数据盘类型:
</span>
<div
class=
"params_block_item_val"
>
<div>
{{
cloudDetailNew
.
store_type
}}
</div>
</div>
</div>
<div
class=
"params_block_item_in"
>
<span
class=
"params_block_item_title"
>
续期时长:
</span>
<span
class=
"params_block_item_val"
>
{{
cloudDetailNew
.
adjust_duration_time
}}
核
</span>
...
...
@@ -223,11 +236,36 @@
</div>
</InfoList>
</div>
<div
class=
"btn_footer"
>
<el-button
class=
"submit"
@
click=
"submit"
>
提交资源申请
</el-button>
<el-button
class=
"adjustment"
@
click=
"adjustment"
>
资源调整
</el-button>
<el-button
class=
"adjustment"
@
click=
"distribution"
>
分配
</el-button>
<el-button
class=
"refuse"
@
click=
"refuse"
>
拒绝
</el-button>
<div
class=
"btn_footer"
v-if=
"now_user != 0 || (now_user == 0 && apploy_msg.second_level != 0)"
>
<el-button
v-if=
"now_user == 1 && apploy_msg.first_level == 0"
class=
"submit"
@
click=
"submit"
>
提交资源申请
</el-button>
<el-button
v-if=
"now_user == 0 && apploy_msg.second_level != 0"
class=
"adjustment"
@
click=
"adjustment"
>
资源调整
</el-button>
<el-button
class=
"adjustment"
v-if=
"now_user == 1 && apploy_msg.second_level == 1 && use_uid == ''"
@
click=
"distribution"
>
分配
</el-button>
<el-button
v-if=
"now_user == 2 && apploy_msg.second_level == 0 || now_user == 1 && apploy_msg.first_level == 0"
class=
"refuse"
@
click=
"refuse"
>
拒绝
</el-button>
<el-button
v-if=
"now_user == 2 && apploy_msg.second_level == 0"
class=
"adjustment"
@
click=
"pass"
>
通过
</el-button>
<el-button
v-if=
"now_user == 2 && use_uid != ''"
class=
"refuse"
@
click=
"deleteItem"
>
删除
</el-button>
</div>
</BlockRadius>
<AllotInfoConfirm
ref=
"allotConfirm"
></AllotInfoConfirm>
...
...
@@ -443,7 +481,14 @@ export default {
},
apply_type
:
0
,
approve_state
:
1
,
approve_update_state
:
1
approve_update_state
:
1
,
apploy_msg
:
{
first_level
:
null
,
second_level
:
null
},
use_uid
:
""
,
could_delete
:
false
,
apply_id
:
""
};
},
watch
:
{},
...
...
@@ -485,8 +530,9 @@ export default {
}
});
},
submit
()
{},
refuse
()
{},
pass
()
{},
deleteItem
()
{},
getCurrentUser
()
{
this
.
$api
.
user
.
getNowUser
().
then
(({
data
})
=>
{
if
(
data
.
success
==
1
)
{
...
...
@@ -497,21 +543,52 @@ export default {
}
});
},
submit
(
item
)
{
this
.
$refs
.
allotConfirm
.
getDetail
(
item
.
apply_id
);
submit
()
{
this
.
$refs
.
allotConfirm
.
getDetail
(
this
.
apply_id
);
},
clickTab
()
{},
setListWithRole
()
{
console
.
log
(
this
.
now_user
);
if
(
this
.
now_user
==
0
)
{
// 普通用户
if
(
this
.
apply_type
==
0
)
{
// 申请类型0
let
index
=
this
.
list_arr
.
findIndex
(
item
=>
item
.
title
==
"
资源使用情况:
"
);
this
.
list_arr
.
splice
(
index
);
this
.
tabShow
=
false
;
}
else
if
(
this
.
apply_type
!=
0
)
{
// 申请类型1
this
.
tabShow
=
false
;
}
}
else
if
(
this
.
now_user
==
1
)
{
// 组织
if
(
this
.
apply_type
==
0
)
{
// 申请类型
let
index
=
this
.
list_arr
.
findIndex
(
item
=>
item
.
title
==
"
资源使用情况:
"
);
this
.
list_arr
.
splice
(
index
);
}
else
if
(
this
.
apply_type
!=
0
)
{
}
if
(
this
.
apploy_msg
.
first_level
==
0
)
{
// 没分配
this
.
tabShow
=
false
;
}
else
if
(
this
.
apploy_msg
.
first_level
!=
0
)
{
// 分配
this
.
tabShow
=
true
;
}
}
else
if
(
this
.
now_user
==
2
)
{
// 超管
if
(
this
.
apply_type
==
0
)
{
let
index
=
this
.
list_arr
.
findIndex
(
item
=>
item
.
title
==
"
资源使用情况:
"
);
this
.
list_arr
.
splice
(
index
);
this
.
tabShow
=
false
;
}
else
if
(
this
.
apply_type
!=
0
)
{
this
.
tabShow
=
false
;
}
}
this
.
activeName
=
"
0
"
;
},
...
...
@@ -524,7 +601,9 @@ export default {
this
.
$api
.
workbench
.
getCloudDetail
(
query
).
then
(
response
=>
{
let
data
=
response
.
data
.
data
;
console
.
log
(
data
);
this
.
list_arr
[
3
].
info
=
helper
.
downloadFileFormat
(
data
.
apply_file
);
// application file name
this
.
list_arr
[
3
].
info
=
helper
.
downloadFileFormat
(
data
.
apply_file
?
data
.
apply_file
:
""
);
// application file name
this
.
list_arr
[
3
].
url
=
data
.
apply_file
;
// application file url
this
.
list_arr
[
6
].
info
=
data
.
bgn_time
;
// get time
this
.
list_arr
[
7
].
info
=
data
.
time_remaining
;
// remaining days
...
...
@@ -573,13 +652,15 @@ export default {
this
.
cloudDteail
.
adjust_one_cpu_min
=
data
.
adjust_one_cpu_min
;
this
.
cloudDteail
.
adjust_one_memory_max
=
data
.
adjust_one_memory_max
;
this
.
cloudDteail
.
adjust_one_memory_min
=
data
.
adjust_one_memory_min
;
this
.
apploy_msg
.
first_level
=
data
.
first_level
;
this
.
apploy_msg
.
second_level
=
data
.
second_level
;
this
.
setListWithRole
();
});
}
}
};
</
script
>
<
style
>
<
style
scoped
>
.in_cloud_block
{
margin
:
0
20px
;
}
...
...
src/request/api/workbench.js
View file @
9928f9f9
...
...
@@ -34,7 +34,7 @@ const workbench = {
},
// cloud resource approval
setCloudApproval
(
params
)
{
return
axios
.
put
(
`/apaas/service/v3/resource/apply/approve?apply_id=
${
params
.
applyId
}
&apply_state=
${
params
.
applyState
}
&apply_type=
${
params
.
applyType
}
&cloud_id=
${
params
.
applyCloudId
}
`
,
params
)
return
axios
.
put
(
`/apaas/service/v3/resource/apply/approve?apply_id=
${
params
.
applyId
}
&apply_state=
${
params
.
applyState
}
&apply_type=
${
params
.
applyType
}
&cloud_id=
${
params
.
applyCloudId
}
&namespace=
${
params
.
namespace
}
`
,
params
)
},
// cloud resource allocation
setCloudAllocation
(
params
)
{
...
...
@@ -48,6 +48,10 @@ const workbench = {
disabledCloud
(
params
)
{
return
axios
.
put
(
`/apaas/service/v3/resource/apply/disable?id=
${
params
.
id
}
&type=
${
params
.
type
}
`
)
},
// get cloud's application
getCloudApplication
(
params
)
{
return
axios
.
get
(
`/apaas/hubApi/market/deployList?page=1&limit=10000&namespaces=
${
params
.
namespace
}
`
)
},
}
export
default
workbench
;
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