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
1c6e8c90
"src/components/menu-copy.vue" did not exist on "6c23830c4ea31a8cae01603f0abec1d56fe55ead"
Commit
1c6e8c90
authored
Jul 29, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of cloud.wodcloud.com:apaas/apaas-v3-ui into dev
parents
e98c455c
efaec5cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
71 deletions
+89
-71
src/pages/workbench/fwgl/cloud-detail.vue
src/pages/workbench/fwgl/cloud-detail.vue
+89
-71
No files found.
src/pages/workbench/fwgl/cloud-detail.vue
View file @
1c6e8c90
...
@@ -165,7 +165,10 @@
...
@@ -165,7 +165,10 @@
</div>
</div>
<div
ref=
"ApplyDesc"
slot=
"ApplyDesc"
class=
"params_apply_desc"
>
{{
desc
}}
</div>
<div
ref=
"ApplyDesc"
slot=
"ApplyDesc"
class=
"params_apply_desc"
>
{{
desc
}}
</div>
<div
ref=
"ResourceOverview"
slot=
"ResourceOverview"
class=
"params_resource_overview"
>
<div
ref=
"ResourceOverview"
slot=
"ResourceOverview"
class=
"params_resource_overview"
>
{{
resourceOverview
}}
<div
v-if=
"now_user == 0"
>
当您觉得使用空间不足时,可以选择至服务超市-
<span
@
click=
"goto('/shop/cloud')"
class=
"link_span"
>
云资源服务页面
</span>
的升级现有工作区域来完成配置扩容操作。
</div>
<el-row
class=
"params_charts"
>
<el-row
class=
"params_charts"
>
<el-col
:span=
"8"
class=
"params_col"
>
<el-col
:span=
"8"
class=
"params_col"
>
<div
class=
"params_chart"
>
<div
class=
"params_chart"
>
...
@@ -245,7 +248,7 @@
...
@@ -245,7 +248,7 @@
@
click=
"pass"
@
click=
"pass"
>
提交资源申请
</el-button>
>
提交资源申请
</el-button>
<el-button
<el-button
v-if=
"now_user == 0 && use_uid != '' &&
apploy_msg.second_level != 0
"
v-if=
"now_user == 0 && use_uid != '' &&
(apploy_msg.first_level == -1 || (apploy_msg.first_level == 1 || apploy_msg.second_level == -1) || apploy_msg.second_level == 1)
"
class=
"adjustment"
class=
"adjustment"
@
click=
"adjustment"
@
click=
"adjustment"
>
资源调整
</el-button>
>
资源调整
</el-button>
...
@@ -264,7 +267,11 @@
...
@@ -264,7 +267,11 @@
class=
"adjustment"
class=
"adjustment"
@
click=
"pass"
@
click=
"pass"
>
通过
</el-button>
>
通过
</el-button>
<el-button
v-if=
"now_user == 2 && use_uid != '' && !isApprove"
class=
"refuse"
@
click=
"deleteItem"
>
删除
</el-button>
<el-button
v-if=
"now_user == 2 && use_uid != '' && !isApprove"
class=
"refuse"
@
click=
"deleteItem"
>
删除
</el-button>
</div>
</div>
</BlockRadius>
</BlockRadius>
<AllotInfoConfirm
ref=
"allotConfirm"
></AllotInfoConfirm>
<AllotInfoConfirm
ref=
"allotConfirm"
></AllotInfoConfirm>
...
@@ -285,7 +292,7 @@ export default {
...
@@ -285,7 +292,7 @@ export default {
InfoList
,
InfoList
,
Dashboard
,
Dashboard
,
TableUm
,
TableUm
,
AllotInfoConfirm
AllotInfoConfirm
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -296,120 +303,117 @@ export default {
...
@@ -296,120 +303,117 @@ export default {
list_arr
:
[
list_arr
:
[
{
{
title
:
"
云资源详情:
"
,
title
:
"
云资源详情:
"
,
prop
:
"
title
"
prop
:
"
title
"
,
},
},
{
{
title
:
"
工作区域申请规格:
"
,
title
:
"
工作区域申请规格:
"
,
type
:
"
solt
"
,
type
:
"
solt
"
,
solt_name
:
"
ApplyParams
"
solt_name
:
"
ApplyParams
"
,
},
},
{
{
title
:
"
审批通过后工作区域规格:
"
,
title
:
"
审批通过后工作区域规格:
"
,
type
:
"
solt
"
,
type
:
"
solt
"
,
solt_name
:
"
ApplyBeforeParams
"
solt_name
:
"
ApplyBeforeParams
"
,
},
},
{
{
title
:
"
资源申请文件:
"
,
title
:
"
资源申请文件:
"
,
info
:
"
2222222222222222222222.docs
"
,
info
:
"
2222222222222222222222.docs
"
,
url
:
""
,
url
:
""
,
type
:
"
down
"
type
:
"
down
"
,
},
},
{
{
title
:
"
工作区域描述:
"
,
title
:
"
工作区域描述:
"
,
type
:
"
solt
"
,
type
:
"
solt
"
,
solt_name
:
"
ApplyDesc
"
solt_name
:
"
ApplyDesc
"
,
},
},
{
{
title
:
"
资源使用情况:
"
,
title
:
"
资源使用情况:
"
,
prop
:
"
title
"
prop
:
"
title
"
,
},
},
{
{
title
:
"
获取时间:
"
,
title
:
"
获取时间:
"
,
info
:
"
2020-06-02 15:54:21
"
info
:
"
2020-06-02 15:54:21
"
,
},
},
{
{
title
:
"
剩余使用天数:
"
,
title
:
"
剩余使用天数:
"
,
info
:
"
1000天
"
info
:
"
1000天
"
,
},
},
{
{
title
:
"
到期时间:
"
,
title
:
"
到期时间:
"
,
info
:
"
2020-06-02 15:54:21
"
info
:
"
2020-06-02 15:54:21
"
,
},
},
{
{
title
:
"
资源使用概况:
"
,
title
:
"
资源使用概况:
"
,
type
:
"
solt
"
,
type
:
"
solt
"
,
solt_name
:
"
ResourceOverview
"
solt_name
:
"
ResourceOverview
"
,
},
},
{
{
title
:
"
已部署应用列表:
"
,
title
:
"
已部署应用列表:
"
,
prop
:
"
title
"
prop
:
"
title
"
,
},
},
{
{
title
:
""
,
title
:
""
,
type
:
"
solt
"
,
type
:
"
solt
"
,
solt_name
:
"
AppList
"
solt_name
:
"
AppList
"
,
}
}
,
],
],
list_arr_my
:
[
list_arr_my
:
[
{
{
title
:
"
提交申请时间:
"
,
title
:
"
提交申请时间:
"
,
info
:
"
2020-06-02 15:54:21
"
info
:
"
2020-06-02 15:54:21
"
,
},
},
{
{
title
:
"
获取时间:
"
,
title
:
"
获取时间:
"
,
info
:
"
2020-06-02 15:54:21
"
info
:
"
2020-06-02 15:54:21
"
,
},
},
{
{
title
:
"
申请状态:
"
,
title
:
"
申请状态:
"
,
type
:
"
solt
"
,
type
:
"
solt
"
,
solt_name
:
"
ApplicationStatus
"
solt_name
:
"
ApplicationStatus
"
,
}
}
,
],
],
super_status
:
0
,
super_status
:
0
,
desc
:
desc
:
""
,
"
工作区域描述:工作区域描述:工作区域描述:工作区域描述:工作区域描述:工作区域描述:工作区域描述:工作区域描述:工作区域描述:工作区域描述:工作区域描述:工作区域描述:工作区域描述:工作区域描述:
"
,
resourceOverview
:
"
当您觉得使用空间不足时,可以选择至服务超市-云资源服务页面的升级现有工作区域来完成配置扩容操作。
"
,
data1
:
{
data1
:
{
data
:
0
,
data
:
0
,
text
:
"
CPU已使用
"
,
text
:
"
CPU已使用
"
,
total
:
0
,
total
:
0
,
remaining
:
0
remaining
:
0
,
},
},
data2
:
{
data2
:
{
data
:
0
,
data
:
0
,
text
:
"
内存已使用
"
,
text
:
"
内存已使用
"
,
total
:
0
,
total
:
0
,
remaining
:
0
remaining
:
0
,
},
},
data3
:
{
data3
:
{
data
:
0
,
data
:
0
,
text
:
"
容器组已使用
"
,
text
:
"
容器组已使用
"
,
total
:
0
,
total
:
0
,
remaining
:
0
remaining
:
0
,
},
},
appListHeaders
:
[
appListHeaders
:
[
{
{
label
:
"
应用名称
"
,
label
:
"
应用名称
"
,
prop
:
"
deploy_name
"
,
prop
:
"
deploy_name
"
,
align
:
"
center
"
,
align
:
"
center
"
,
type
:
"
href
"
type
:
"
href
"
,
},
},
{
{
label
:
"
应用类型
"
,
label
:
"
应用类型
"
,
prop
:
"
type_name
"
,
prop
:
"
type_name
"
,
align
:
"
center
"
align
:
"
center
"
,
},
},
{
{
label
:
"
应用版本号
"
,
label
:
"
应用版本号
"
,
prop
:
"
app_version
"
,
prop
:
"
app_version
"
,
align
:
"
center
"
align
:
"
center
"
,
},
},
{
{
label
:
"
应用部署时间
"
,
label
:
"
应用部署时间
"
,
prop
:
"
created
"
,
prop
:
"
created
"
,
align
:
"
center
"
align
:
"
center
"
,
}
}
,
],
],
appList
:
[],
appList
:
[],
now_user
:
""
,
now_user
:
""
,
...
@@ -421,7 +425,7 @@ export default {
...
@@ -421,7 +425,7 @@ export default {
user_name
:
""
,
user_name
:
""
,
phone
:
""
,
phone
:
""
,
apply_time
:
""
,
apply_time
:
""
,
system_name
:
""
system_name
:
""
,
},
},
cloudDteail
:
{
cloudDteail
:
{
containers
:
""
,
containers
:
""
,
...
@@ -432,7 +436,7 @@ export default {
...
@@ -432,7 +436,7 @@ export default {
one_cpu_max
:
""
,
one_cpu_max
:
""
,
one_cpu_min
:
""
,
one_cpu_min
:
""
,
one_memory_max
:
""
,
one_memory_max
:
""
,
one_memory_min
:
""
one_memory_min
:
""
,
},
},
cloudDetailNew
:
{
cloudDetailNew
:
{
adjust_containers
:
""
,
adjust_containers
:
""
,
...
@@ -443,18 +447,18 @@ export default {
...
@@ -443,18 +447,18 @@ export default {
adjust_one_cpu_max
:
""
,
adjust_one_cpu_max
:
""
,
adjust_one_cpu_min
:
""
,
adjust_one_cpu_min
:
""
,
adjust_one_memory_max
:
""
,
adjust_one_memory_max
:
""
,
adjust_one_memory_min
:
""
adjust_one_memory_min
:
""
,
},
},
apply_type
:
0
,
apply_type
:
0
,
approve_state
:
1
,
approve_state
:
1
,
approve_update_state
:
1
,
approve_update_state
:
1
,
apploy_msg
:
{
apploy_msg
:
{
first_level
:
null
,
first_level
:
null
,
second_level
:
null
second_level
:
null
,
},
},
use_uid
:
""
,
use_uid
:
""
,
could_delete
:
false
,
could_delete
:
false
,
apply_id
:
""
apply_id
:
""
,
};
};
},
},
watch
:
{},
watch
:
{},
...
@@ -463,7 +467,7 @@ export default {
...
@@ -463,7 +467,7 @@ export default {
...
mapState
([
"
userInfo
"
]),
...
mapState
([
"
userInfo
"
]),
isApprove
()
{
isApprove
()
{
return
this
.
$route
.
query
.
isApprove
==
1
;
return
this
.
$route
.
query
.
isApprove
==
1
;
}
}
,
},
},
created
()
{
created
()
{
if
(
this
.
userInfo
)
{
if
(
this
.
userInfo
)
{
...
@@ -490,7 +494,7 @@ export default {
...
@@ -490,7 +494,7 @@ export default {
getCloudApplication
()
{
getCloudApplication
()
{
this
.
$api
.
workbench
this
.
$api
.
workbench
.
getCloudApplication
({
namespace
:
this
.
cloudData
.
namespace
})
.
getCloudApplication
({
namespace
:
this
.
cloudData
.
namespace
})
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
if
(
response
.
data
.
success
==
1
)
{
this
.
appList
=
response
.
data
.
data
;
this
.
appList
=
response
.
data
.
data
;
}
else
{
}
else
{
...
@@ -511,19 +515,19 @@ export default {
...
@@ -511,19 +515,19 @@ export default {
applyState
:
-
1
,
applyState
:
-
1
,
applyType
:
this
.
apply_type
,
applyType
:
this
.
apply_type
,
applyCloudId
:
this
.
id
,
applyCloudId
:
this
.
id
,
namespace
:
this
.
cloudData
.
namespace
namespace
:
this
.
cloudData
.
namespace
,
};
};
this
.
$api
.
workbench
.
setCloudApproval
(
query
).
then
(
response
=>
{
this
.
$api
.
workbench
.
setCloudApproval
(
query
).
then
(
(
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
this
.
$message
({
message
:
"
申请已拒绝
"
,
message
:
"
申请已拒绝
"
,
type
:
"
success
"
type
:
"
success
"
,
});
});
this
.
$router
.
push
(
this
.
getUrl
());
this
.
$router
.
push
(
this
.
getUrl
());
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
"
申请拒绝失败
"
,
message
:
"
申请拒绝失败
"
,
type
:
"
error
"
type
:
"
error
"
,
});
});
}
}
});
});
...
@@ -534,19 +538,19 @@ export default {
...
@@ -534,19 +538,19 @@ export default {
applyState
:
1
,
applyState
:
1
,
applyType
:
this
.
apply_type
,
applyType
:
this
.
apply_type
,
applyCloudId
:
this
.
id
,
applyCloudId
:
this
.
id
,
namespace
:
this
.
cloudData
.
namespace
namespace
:
this
.
cloudData
.
namespace
,
};
};
this
.
$api
.
workbench
.
setCloudApproval
(
query
).
then
(
response
=>
{
this
.
$api
.
workbench
.
setCloudApproval
(
query
).
then
(
(
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
this
.
$message
({
message
:
"
申请已通过
"
,
message
:
"
申请已通过
"
,
type
:
"
success
"
type
:
"
success
"
,
});
});
this
.
$router
.
push
(
this
.
getUrl
());
this
.
$router
.
push
(
this
.
getUrl
());
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
"
申请通过失败
"
,
message
:
"
申请通过失败
"
,
type
:
"
error
"
type
:
"
error
"
,
});
});
}
}
});
});
...
@@ -556,19 +560,19 @@ export default {
...
@@ -556,19 +560,19 @@ export default {
.
deleteCloud
({
.
deleteCloud
({
id
:
this
.
id
,
id
:
this
.
id
,
namespace
:
this
.
cloudData
.
namespace
,
namespace
:
this
.
cloudData
.
namespace
,
useUid
:
this
.
use_uid
useUid
:
this
.
use_uid
,
})
})
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
this
.
$message
({
message
:
"
该资源已删除
"
,
message
:
"
该资源已删除
"
,
type
:
"
success
"
type
:
"
success
"
,
});
});
this
.
$router
.
push
(
this
.
getUrl
());
this
.
$router
.
push
(
this
.
getUrl
());
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
"
资源删除失败
"
,
message
:
"
资源删除失败
"
,
type
:
"
error
"
type
:
"
error
"
,
});
});
}
}
});
});
...
@@ -591,7 +595,7 @@ export default {
...
@@ -591,7 +595,7 @@ export default {
if
(
this
.
use_uid
==
""
)
{
if
(
this
.
use_uid
==
""
)
{
// 没分配
// 没分配
let
index
=
this
.
list_arr
.
findIndex
(
let
index
=
this
.
list_arr
.
findIndex
(
item
=>
item
.
title
==
"
资源使用情况:
"
(
item
)
=>
item
.
title
==
"
资源使用情况:
"
);
);
this
.
list_arr
.
splice
(
index
);
this
.
list_arr
.
splice
(
index
);
}
}
...
@@ -608,7 +612,7 @@ export default {
...
@@ -608,7 +612,7 @@ export default {
if
(
this
.
use_uid
==
""
)
{
if
(
this
.
use_uid
==
""
)
{
// 没分配
// 没分配
let
index
=
this
.
list_arr
.
findIndex
(
let
index
=
this
.
list_arr
.
findIndex
(
item
=>
item
.
title
==
"
资源使用情况:
"
(
item
)
=>
item
.
title
==
"
资源使用情况:
"
);
);
this
.
list_arr
.
splice
(
index
);
this
.
list_arr
.
splice
(
index
);
}
}
...
@@ -630,7 +634,7 @@ export default {
...
@@ -630,7 +634,7 @@ export default {
if
(
this
.
use_uid
==
""
)
{
if
(
this
.
use_uid
==
""
)
{
// 没分配
// 没分配
let
index
=
this
.
list_arr
.
findIndex
(
let
index
=
this
.
list_arr
.
findIndex
(
item
=>
item
.
title
==
"
资源使用情况:
"
(
item
)
=>
item
.
title
==
"
资源使用情况:
"
);
);
this
.
list_arr
.
splice
(
index
);
this
.
list_arr
.
splice
(
index
);
}
}
...
@@ -647,9 +651,13 @@ export default {
...
@@ -647,9 +651,13 @@ export default {
* 资源调整通过后,"工作区域申请规格"会同步"审批通过后工作区域规格"信息,届时需要隐藏掉"审批通过后工作区域规格"
* 资源调整通过后,"工作区域申请规格"会同步"审批通过后工作区域规格"信息,届时需要隐藏掉"审批通过后工作区域规格"
* add by xuym
* add by xuym
* */
* */
if
(
this
.
apploy_msg
.
first_level
==
1
&&
this
.
apploy_msg
.
second_level
==
1
)
{
if
(
this
.
apploy_msg
.
first_level
==
1
&&
this
.
apploy_msg
.
second_level
==
1
)
{
let
index
=
this
.
list_arr
.
findIndex
(
let
index
=
this
.
list_arr
.
findIndex
(
item
=>
item
.
title
==
"
审批通过后工作区域规格:
"
(
item
)
=>
item
.
title
==
"
审批通过后工作区域规格:
"
);
);
if
(
index
>
-
1
)
{
if
(
index
>
-
1
)
{
...
@@ -661,9 +669,9 @@ export default {
...
@@ -661,9 +669,9 @@ export default {
let
query
=
{
let
query
=
{
type
:
this
.
apply_type
,
type
:
this
.
apply_type
,
applyId
:
this
.
apply_id
,
applyId
:
this
.
apply_id
,
id
:
this
.
id
id
:
this
.
id
,
};
};
this
.
$api
.
workbench
.
getCloudDetail
(
query
).
then
(
response
=>
{
this
.
$api
.
workbench
.
getCloudDetail
(
query
).
then
(
(
response
)
=>
{
let
data
=
response
.
data
.
data
;
let
data
=
response
.
data
.
data
;
if
(
data
)
{
if
(
data
)
{
this
.
list_arr
[
3
].
info
=
helper
.
downloadFileFormat
(
this
.
list_arr
[
3
].
info
=
helper
.
downloadFileFormat
(
...
@@ -712,7 +720,7 @@ export default {
...
@@ -712,7 +720,7 @@ export default {
}
}
}
else
{
}
else
{
let
index
=
this
.
list_arr
.
findIndex
(
let
index
=
this
.
list_arr
.
findIndex
(
item
=>
item
.
title
==
"
资源使用概况:
"
(
item
)
=>
item
.
title
==
"
资源使用概况:
"
);
);
this
.
list_arr
.
splice
(
index
,
1
);
this
.
list_arr
.
splice
(
index
,
1
);
}
}
...
@@ -734,8 +742,10 @@ export default {
...
@@ -734,8 +742,10 @@ export default {
this
.
cloudDetailNew
.
adjust_duration_time
=
data
.
adjust_duration_time
;
this
.
cloudDetailNew
.
adjust_duration_time
=
data
.
adjust_duration_time
;
this
.
cloudDetailNew
.
adjust_one_cpu_max
=
data
.
adjust_one_cpu_max
;
this
.
cloudDetailNew
.
adjust_one_cpu_max
=
data
.
adjust_one_cpu_max
;
this
.
cloudDetailNew
.
adjust_one_cpu_min
=
data
.
adjust_one_cpu_min
;
this
.
cloudDetailNew
.
adjust_one_cpu_min
=
data
.
adjust_one_cpu_min
;
this
.
cloudDetailNew
.
adjust_one_memory_max
=
data
.
adjust_one_memory_max
;
this
.
cloudDetailNew
.
adjust_one_memory_max
=
this
.
cloudDetailNew
.
adjust_one_memory_min
=
data
.
adjust_one_memory_min
;
data
.
adjust_one_memory_max
;
this
.
cloudDetailNew
.
adjust_one_memory_min
=
data
.
adjust_one_memory_min
;
this
.
apploy_msg
.
first_level
=
data
.
first_level
;
this
.
apploy_msg
.
first_level
=
data
.
first_level
;
this
.
apploy_msg
.
second_level
=
data
.
second_level
;
this
.
apploy_msg
.
second_level
=
data
.
second_level
;
...
@@ -753,8 +763,11 @@ export default {
...
@@ -753,8 +763,11 @@ export default {
}
}
this
.
setListWithRole
();
this
.
setListWithRole
();
});
});
}
},
}
goto
(
path
)
{
this
.
$router
.
push
(
path
);
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
@@ -937,6 +950,11 @@ export default {
...
@@ -937,6 +950,11 @@ export default {
.my_params
p
{
.my_params
p
{
padding
:
0
15px
;
padding
:
0
15px
;
}
}
.link_span
{
color
:
#515fe7
;
text-decoration
:
underline
;
cursor
:
pointer
;
}
</
style
>
</
style
>
<
style
>
<
style
>
.params_tabs
.el-tabs__header
{
.params_tabs
.el-tabs__header
{
...
...
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