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
758d6cab
Commit
758d6cab
authored
Jul 11, 2020
by
张俊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://cloud.wodcloud.com/git/apaas/apaas-v3-ui
into dev
parents
77536f56
fc579b6b
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
362 additions
and
83 deletions
+362
-83
src/assets/svg/topology_ic_ganzhifw.svg
src/assets/svg/topology_ic_ganzhifw.svg
+1
-0
src/assets/svg/topology_ic_shikongfw.svg
src/assets/svg/topology_ic_shikongfw.svg
+1
-0
src/assets/svg/topology_ic_shipinfw.svg
src/assets/svg/topology_ic_shipinfw.svg
+1
-0
src/assets/svg/topology_ic_shujufw.svg
src/assets/svg/topology_ic_shujufw.svg
+1
-0
src/assets/svg/topology_ic_zonghefw.svg
src/assets/svg/topology_ic_zonghefw.svg
+1
-0
src/components/shop-cloud/shop-cloud.vue
src/components/shop-cloud/shop-cloud.vue
+13
-2
src/components/topology.vue
src/components/topology.vue
+65
-25
src/pages/workbench/fwgl/approveWorkspace.vue
src/pages/workbench/fwgl/approveWorkspace.vue
+51
-12
src/pages/workbench/fwgl/cloud-detail.vue
src/pages/workbench/fwgl/cloud-detail.vue
+112
-11
src/pages/workbench/fwgl/fwglList.vue
src/pages/workbench/fwgl/fwglList.vue
+5
-2
src/pages/workbench/fwgl/organizationCloudResource.vue
src/pages/workbench/fwgl/organizationCloudResource.vue
+86
-14
src/pages/workbench/fwgl/serviceDetail.vue
src/pages/workbench/fwgl/serviceDetail.vue
+3
-7
src/pages/workbench/yygl/yyglList.vue
src/pages/workbench/yygl/yyglList.vue
+15
-8
src/request/api/workbench.js
src/request/api/workbench.js
+7
-2
No files found.
src/assets/svg/topology_ic_ganzhifw.svg
0 → 100644
View file @
758d6cab
<svg
id=
"图层_1"
data-name=
"图层 1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 22 22"
><defs><style>
.cls-1{fill:#a1b1f6;}.cls-2{fill:#495feb;}
</style></defs><title>
ic_画板 17
</title><rect
class=
"cls-1"
x=
"4.22"
y=
"4.22"
width=
"13.56"
height=
"13.56"
transform=
"translate(-4.56 11) rotate(-45)"
/><path
class=
"cls-2"
d=
"M11,2.83,19.17,11,11,19.17,2.83,11,11,2.83M11,0,0,11,11,22,22,11,11,0Z"
/></svg>
\ No newline at end of file
src/assets/svg/topology_ic_shikongfw.svg
0 → 100644
View file @
758d6cab
<svg
id=
"图层_1"
data-name=
"图层 1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 20 20"
><defs><style>
.cls-1{fill:#a1b1f6;}.cls-2{fill:#495feb;}
</style></defs><title>
ic_画板 15
</title><path
class=
"cls-1"
d=
"M10,19a9,9,0,1,1,9-9A9,9,0,0,1,10,19Z"
/><path
class=
"cls-2"
d=
"M10,2a8,8,0,1,1-8,8,8,8,0,0,1,8-8m0-2A10,10,0,1,0,20,10,10,10,0,0,0,10,0Z"
/></svg>
\ No newline at end of file
src/assets/svg/topology_ic_shipinfw.svg
0 → 100644
View file @
758d6cab
<svg
id=
"图层_1"
data-name=
"图层 1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 22 19.05"
><defs><style>
.cls-1{fill:#a1b1f6;}.cls-2{fill:#495feb;}
</style></defs><title>
ic_画板 16
</title><polygon
class=
"cls-1"
points=
"1.73 18.05 11 2 20.27 18.05 1.73 18.05"
/><path
class=
"cls-2"
d=
"M11,4l7.54,13.05H3.46L11,4m0-4L0,19.05H22L11,0Z"
/></svg>
\ No newline at end of file
src/assets/svg/topology_ic_shujufw.svg
0 → 100644
View file @
758d6cab
<svg
id=
"图层_1"
data-name=
"图层 1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 18 18"
><defs><style>
.cls-1{fill:#a1b1f6;}.cls-2{fill:#495feb;}
</style></defs><title>
ic_画板 14
</title><rect
class=
"cls-1"
x=
"1"
y=
"1"
width=
"16"
height=
"16"
/><path
class=
"cls-2"
d=
"M16,2V16H2V2H16m2-2H0V18H18V0Z"
/></svg>
\ No newline at end of file
src/assets/svg/topology_ic_zonghefw.svg
0 → 100644
View file @
758d6cab
<svg
id=
"图层_1"
data-name=
"图层 1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 22 20.92"
><defs><style>
.cls-1{fill:#a1b1f6;}.cls-2{fill:#495feb;}
</style></defs><title>
ic_画板 18
</title><polygon
class=
"cls-1"
points=
"4.93 19.92 1.18 8.37 11 1.24 20.82 8.37 17.07 19.92 4.93 19.92"
/><path
class=
"cls-2"
d=
"M11,2.47l8.65,6.28-3.3,10.17H5.65L2.35,8.76,11,2.47M11,0,0,8,4.2,20.92H17.8L22,8,11,0Z"
/></svg>
\ No newline at end of file
src/components/shop-cloud/shop-cloud.vue
View file @
758d6cab
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
<div
class=
"input_right"
>
GB
</div>
<div
class=
"input_right"
>
GB
</div>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<div
class=
"form_title"
>
单个容器组规格
</div>
<div
class=
"form_title"
>
单个容器组规格
</div>
</el-col>
</el-col>
...
@@ -1059,7 +1059,18 @@ export default {
...
@@ -1059,7 +1059,18 @@ export default {
]
]
}
;
}
;
this
.
$api
.
serviceShop
.
updateCloud
(
query
).
then
(
response
=>
{
this
.
$api
.
serviceShop
.
updateCloud
(
query
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
message
:
"
申请成功
"
,
type
:
"
success
"
}
);
this
.
$router
.
push
(
"
/services_shop
"
);
}
else
{
this
.
$message
({
message
:
"
申请失败
"
,
type
:
"
error
"
}
);
}
}
);
}
);
}
}
console
.
log
(
this
.
form
);
console
.
log
(
this
.
form
);
...
...
src/components/topology.vue
View file @
758d6cab
...
@@ -17,14 +17,23 @@
...
@@ -17,14 +17,23 @@
import
G6
from
"
@antv/g6
"
;
import
G6
from
"
@antv/g6
"
;
export
default
{
export
default
{
props
:
{
props
:
{
datas
:
Object
,
datas
:
{
type
:
Object
,
default
:
()
=>
{
return
{
nodes
:
[],
edges
:
[]
};
}
},
namespace
:
String
namespace
:
String
},
},
mounted
()
{},
mounted
()
{},
watch
:
{
watch
:
{
datas
(
val
)
{
datas
(
val
)
{
console
.
log
(
val
);
this
.
getCavData
();
this
.
getCavData
();
this
.
getLegendNodes
();
this
.
getLegendEdges
();
}
}
},
},
methods
:
{
methods
:
{
...
@@ -36,32 +45,32 @@ export default {
...
@@ -36,32 +45,32 @@ export default {
switch
(
node
.
data
.
nodeType
)
{
switch
(
node
.
data
.
nodeType
)
{
case
"
workload
"
:
case
"
workload
"
:
node
.
type
=
"
image
"
;
node
.
type
=
"
image
"
;
node
.
img
=
"
./static/topology_ic_shujufw.svg
"
;
node
.
img
=
require
(
"
@/assets/svg/topology_ic_shujufw.svg
"
)
;
node
.
size
=
[
15
,
15
];
node
.
size
=
[
15
,
15
];
break
;
break
;
case
"
app
"
:
case
"
app
"
:
node
.
type
=
"
image
"
;
node
.
type
=
"
image
"
;
node
.
img
=
"
./static/topology_ic_shujufw.svg
"
;
node
.
img
=
require
(
"
@/assets/svg/topology_ic_shujufw.svg
"
)
;
node
.
size
=
[
15
,
15
];
node
.
size
=
[
15
,
15
];
break
;
break
;
case
"
unknow source
"
:
case
"
unknow source
"
:
node
.
type
=
"
image
"
;
node
.
type
=
"
image
"
;
node
.
img
=
"
./static/topology_ic_shujufw.svg
"
;
node
.
img
=
require
(
"
@/assets/svg/topology_ic_shujufw.svg
"
)
;
node
.
size
=
[
15
,
15
];
node
.
size
=
[
15
,
15
];
break
;
break
;
case
"
service
"
:
case
"
service
"
:
node
.
type
=
"
image
"
;
node
.
type
=
"
image
"
;
node
.
img
=
"
./static/topology_ic_shujufw.svg
"
;
node
.
img
=
require
(
"
@/assets/svg/topology_ic_shujufw.svg
"
)
;
node
.
size
=
[
15
,
15
];
node
.
size
=
[
15
,
15
];
break
;
break
;
case
"
service entry
"
:
case
"
service entry
"
:
node
.
type
=
"
image
"
;
node
.
type
=
"
image
"
;
node
.
img
=
"
./static/topology_ic_shujufw.svg
"
;
node
.
img
=
require
(
"
@/assets/svg/topology_ic_shujufw.svg
"
)
;
node
.
size
=
[
15
,
15
];
node
.
size
=
[
15
,
15
];
break
;
break
;
default
:
default
:
node
.
type
=
"
image
"
;
node
.
type
=
"
image
"
;
node
.
img
=
"
./static/topology_ic_shujufw.svg
"
;
node
.
img
=
require
(
"
@/assets/svg/topology_ic_ganzhifw.svg
"
)
;
node
.
size
=
[
15
,
15
];
node
.
size
=
[
15
,
15
];
break
;
break
;
}
}
...
@@ -86,6 +95,11 @@ export default {
...
@@ -86,6 +95,11 @@ export default {
edge
.
id
=
edge
.
data
.
id
;
edge
.
id
=
edge
.
data
.
id
;
edge
.
source
=
edge
.
data
.
source
;
edge
.
source
=
edge
.
data
.
source
;
edge
.
target
=
edge
.
data
.
target
;
edge
.
target
=
edge
.
data
.
target
;
edge
.
label
=
edge
.
data
.
traffic
.
rates
?
edge
.
data
.
traffic
.
rates
.
tcp
?
edge
.
data
.
traffic
.
rates
.
tcp
:
edge
.
data
.
traffic
.
rates
.
http
:
""
;
edge
.
style
=
{
edge
.
style
=
{
stroke
:
"
#494e8f
"
,
stroke
:
"
#494e8f
"
,
lineWidth
:
1
,
lineWidth
:
1
,
...
@@ -97,17 +111,43 @@ export default {
...
@@ -97,17 +111,43 @@ export default {
strokeOpacity
:
1
,
strokeOpacity
:
1
,
cursor
:
"
pointer
"
cursor
:
"
pointer
"
};
};
if
(
edge
.
data
.
xxx
==
"
success
"
)
{
if
(
edge
.
data
.
traffic
.
protocol
==
"
tcp
"
)
{
// sueecss
// tcp
edge
.
style
.
stroke
=
"
#25bdb1
"
;
edge
.
type
=
"
1
"
;
edge
.
style
.
stroke
=
"
#c77eb5
"
;
}
else
if
(
edge
.
data
.
traffic
.
protocol
==
"
http
"
)
{
if
(
edge
.
data
.
traffic
.
responses
)
{
let
sta
=
0
;
for
(
let
i
in
edge
.
data
.
traffic
.
responses
)
{
if
(
i
.
substring
(
i
.
length
-
3
,
i
.
length
-
2
)
==
5
||
i
.
substring
(
i
.
length
-
3
,
i
.
length
-
2
)
==
4
)
{
sta
+=
edge
.
data
.
traffic
.
responses
[
i
][
0
];
}
else
{
sta
+=
0
;
}
if
(
sta
>
20
)
{
edge
.
style
.
stroke
=
"
#d93a49
"
;
edge
.
type
=
"
3
"
;
}
else
if
(
sta
==
0
)
{
edge
.
style
.
stroke
=
"
#1d953f
"
;
edge
.
type
=
"
2
"
;
}
else
{
edge
.
style
.
stroke
=
"
#f36c21
"
;
edge
.
type
=
"
2
"
;
}
}
}
else
{
edge
.
style
.
stroke
=
"
#a1a3a6
"
;
edge
.
type
=
"
0
"
;
}
}
else
{
}
else
{
// warning
edge
.
style
.
stroke
=
"
#1d953f
"
;
edge
.
style
.
stroke
=
"
#e15260
"
;
edge
.
type
=
"
2
"
;
}
}
});
});
self
.
getCav
();
self
.
getCav
();
self
.
getLegendNodes
();
self
.
getLegendEdges
();
},
},
getCav
()
{
getCav
()
{
const
width
=
this
.
$refs
.
conCav
.
scrollWidth
;
const
width
=
this
.
$refs
.
conCav
.
scrollWidth
;
...
@@ -224,7 +264,7 @@ export default {
...
@@ -224,7 +264,7 @@ export default {
x
:
legendX
,
x
:
legendX
,
y
:
legendBeginY
,
y
:
legendBeginY
,
type
:
"
image
"
,
type
:
"
image
"
,
img
:
"
./static/topology_ic_shujufw.svg
"
,
img
:
require
(
"
@/assets/svg/topology_ic_shujufw.svg
"
)
,
size
:
[
15
,
15
],
size
:
[
15
,
15
],
label
:
"
数据服务
"
label
:
"
数据服务
"
},
},
...
@@ -233,7 +273,7 @@ export default {
...
@@ -233,7 +273,7 @@ export default {
x
:
legendX
,
x
:
legendX
,
y
:
legendBeginY
+
legendYPadding
*
1
,
y
:
legendBeginY
+
legendYPadding
*
1
,
type
:
"
image
"
,
type
:
"
image
"
,
img
:
"
./static/topology_ic_shikongfw.svg
"
,
img
:
require
(
"
@/assets/svg/topology_ic_shikongfw.svg
"
)
,
size
:
[
15
,
15
],
size
:
[
15
,
15
],
label
:
"
时空服务
"
label
:
"
时空服务
"
},
},
...
@@ -242,7 +282,7 @@ export default {
...
@@ -242,7 +282,7 @@ export default {
x
:
legendX
,
x
:
legendX
,
y
:
legendBeginY
+
legendYPadding
*
2
,
y
:
legendBeginY
+
legendYPadding
*
2
,
type
:
"
image
"
,
type
:
"
image
"
,
img
:
"
./static/topology_ic_shipinfw.svg
"
,
img
:
require
(
"
@/assets/svg/topology_ic_shipinfw.svg
"
)
,
size
:
[
15
,
15
],
size
:
[
15
,
15
],
label
:
"
视频服务
"
label
:
"
视频服务
"
},
},
...
@@ -251,7 +291,7 @@ export default {
...
@@ -251,7 +291,7 @@ export default {
x
:
legendX
,
x
:
legendX
,
y
:
legendBeginY
+
legendYPadding
*
3
,
y
:
legendBeginY
+
legendYPadding
*
3
,
type
:
"
image
"
,
type
:
"
image
"
,
img
:
"
./static/topology_ic_ganzhifw.svg
"
,
img
:
require
(
"
@/assets/svg/topology_ic_ganzhifw.svg
"
)
,
size
:
[
15
,
15
],
size
:
[
15
,
15
],
label
:
"
感知服务
"
label
:
"
感知服务
"
},
},
...
@@ -260,7 +300,7 @@ export default {
...
@@ -260,7 +300,7 @@ export default {
x
:
legendX
,
x
:
legendX
,
y
:
legendBeginY
+
legendYPadding
*
4
,
y
:
legendBeginY
+
legendYPadding
*
4
,
type
:
"
image
"
,
type
:
"
image
"
,
img
:
"
./static/topology_ic_zonghefw.svg
"
,
img
:
require
(
"
@/assets/svg/topology_ic_zonghefw.svg
"
)
,
size
:
[
15
,
15
],
size
:
[
15
,
15
],
label
:
"
综合应用
"
label
:
"
综合应用
"
}
}
...
@@ -403,11 +443,11 @@ export default {
...
@@ -403,11 +443,11 @@ export default {
background-color
:
#fff
;
background-color
:
#fff
;
}
}
.legend_in_tit
{
.legend_in_tit
{
color
:
#8890a7
;
color
:
#8890a7
;
font-size
:
14px
;
font-size
:
14px
;
line-height
:
26px
;
line-height
:
26px
;
padding
:
0
10px
;
padding
:
0
10px
;
border-bottom
:
2px
#e5f0ff
solid
;
;
border-bottom
:
2px
#e5f0ff
solid
;
}
}
.legend_nodes
{
.legend_nodes
{
width
:
100%
;
width
:
100%
;
...
...
src/pages/workbench/fwgl/approveWorkspace.vue
View file @
758d6cab
...
@@ -59,25 +59,27 @@ export default {
...
@@ -59,25 +59,27 @@ export default {
sunbmitText
:
""
,
sunbmitText
:
""
,
submit
:
null
,
submit
:
null
,
},
},
tempFilter
:
null
,
}),
}),
computed
:
{},
computed
:
{},
methods
:
{
methods
:
{
init
(
filter
)
{
init
(
filter
)
{
// console.log(filter);
// console.log(filter);
this
.
tempFilter
=
filter
;
this
.
$http
this
.
$http
.
get
(
"
/apaas/service/v3/resource/
user/apply/l
ist
"
,
{
.
get
(
"
/apaas/service/v3/resource/
apply/approveL
ist
"
,
{
params
:
{
params
:
{
search
:
filter
.
keyword
,
search
:
filter
.
keyword
,
page
:
filter
.
page
,
page
:
filter
.
page
,
limit
:
filter
.
size
,
limit
:
filter
.
size
,
depart
:
""
,
state
:
filter
.
state
,
state1
:
filter
.
state1
,
},
},
})
})
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
this
.
listTotal
=
data
.
total
;
this
.
listTotal
=
data
.
total
;
this
.
listData
=
data
.
data
.
cloud_apply_list
;
this
.
listData
=
data
.
data
;
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
log
(
error
);
console
.
log
(
error
);
...
@@ -87,18 +89,53 @@ export default {
...
@@ -87,18 +89,53 @@ export default {
this
.
$refs
.
dialog
.
show
();
this
.
$refs
.
dialog
.
show
();
},
},
detailAction
(
item
)
{
detailAction
(
item
)
{
console
.
log
(
"
detailAction
"
);
this
.
$router
.
push
({
path
:
`/fwgl/
${
this
.
level
}
/
${
this
.
type
}
/cloud_detail/
${
item
.
id
}
`
,
});
},
},
approveAction
(
item
)
{
approveAction
(
item
)
{
let
action
=
(
type
)
=>
{
this
.
$http
.
put
(
"
/apaas/service/v3/resource/apply/approve
"
,
null
,
{
params
:
{
apply_id
:
item
.
apply_id
,
apply_type
:
item
.
apply_type
,
cloud_id
:
item
.
id
,
apply_state
:
type
,
},
})
.
then
(({
data
})
=>
{
if
(
data
.
success
==
1
)
{
this
.
$message
({
message
:
data
.
errMsg
||
`操作成功.`
,
type
:
"
success
"
,
});
this
.
init
(
this
.
tempFilter
);
}
else
{
this
.
$message
({
message
:
data
.
errMsg
||
"
操作失败
"
,
type
:
"
warning
"
,
});
}
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
this
.
$message
({
message
:
"
操作失败
"
,
type
:
"
warning
"
,
});
});
};
this
.
dialogInfo
.
msg
=
"
该工作区域的申请通过还是拒绝?
"
;
this
.
dialogInfo
.
msg
=
"
该工作区域的申请通过还是拒绝?
"
;
this
.
dialogInfo
.
cancelText
=
"
拒绝
"
;
this
.
dialogInfo
.
cancelText
=
"
拒绝
"
;
this
.
dialogInfo
.
cancelType
=
"
danger
"
;
this
.
dialogInfo
.
cancelType
=
"
danger
"
;
this
.
dialogInfo
.
cancel
=
()
=>
{
this
.
dialogInfo
.
cancel
=
()
=>
{
console
.
log
(
"
approveAction - false
"
);
action
(
-
1
);
};
};
this
.
dialogInfo
.
sunbmitText
=
"
通过
"
;
this
.
dialogInfo
.
sunbmitText
=
"
通过
"
;
this
.
dialogInfo
.
submit
=
()
=>
{
this
.
dialogInfo
.
submit
=
()
=>
{
console
.
log
(
"
approveAction - true
"
);
action
(
1
);
};
};
this
.
showDialog
();
this
.
showDialog
();
},
},
...
@@ -118,12 +155,12 @@ export default {
...
@@ -118,12 +155,12 @@ export default {
this
.
level
=
parseInt
(
this
.
$route
.
params
.
level
);
this
.
level
=
parseInt
(
this
.
$route
.
params
.
level
);
this
.
type
=
parseInt
(
this
.
$route
.
params
.
type
);
this
.
type
=
parseInt
(
this
.
$route
.
params
.
type
);
let
warnFlag
=
this
.
$route
.
query
.
warn
||
false
;
let
warnFlag
=
this
.
$route
.
query
.
warn
==
1
?
true
:
false
;
this
.
otherFilter
=
[
this
.
otherFilter
=
[
{
{
name
:
"
审批状态
"
,
name
:
"
审批状态
"
,
prop
:
"
state
1
"
,
prop
:
"
state
"
,
default
:
""
,
default
:
""
,
options
:
[
options
:
[
{
{
...
@@ -148,7 +185,7 @@ export default {
...
@@ -148,7 +185,7 @@ export default {
this
.
listHeader
=
[
this
.
listHeader
=
[
{
{
label
:
"
工作区域名称
"
,
label
:
"
工作区域名称
"
,
prop
:
"
name
_
space
"
,
prop
:
"
namespace
"
,
type
:
"
button
"
,
type
:
"
button
"
,
callback
:
this
.
detailAction
,
callback
:
this
.
detailAction
,
},
},
...
@@ -202,12 +239,14 @@ export default {
...
@@ -202,12 +239,14 @@ export default {
},
},
{
{
label
:
"
申请类型
"
,
label
:
"
申请类型
"
,
prop
:
"
type
"
,
align
:
"
center
"
,
align
:
"
center
"
,
getText
(
item
)
{
return
item
.
apply_type
===
0
?
"
初次申请
"
:
"
资源调整
"
;
},
},
},
{
{
label
:
"
所属组织
"
,
label
:
"
所属组织
"
,
prop
:
"
org
_name
"
,
prop
:
"
department
_name
"
,
},
},
{
{
label
:
"
用户申请时间
"
,
label
:
"
用户申请时间
"
,
...
...
src/pages/workbench/fwgl/cloud-detail.vue
View file @
758d6cab
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</p>
</p>
<p
class=
"head_right_msg_p"
>
<p
class=
"head_right_msg_p"
>
业务系统名:
业务系统名:
<span
class=
"head_right_msg_item"
>
{{
cloudData
.
workplac
e
}}
</span>
<span
class=
"head_right_msg_item"
>
{{
cloudData
.
system_nam
e
}}
</span>
资源申请时间:
资源申请时间:
<span
class=
"head_right_msg_item"
>
{{
cloudData
.
apply_time
}}
</span>
<span
class=
"head_right_msg_item"
>
{{
cloudData
.
apply_time
}}
</span>
</p>
</p>
...
@@ -291,7 +291,6 @@ export default {
...
@@ -291,7 +291,6 @@ export default {
data
()
{
data
()
{
return
{
return
{
id
:
""
,
id
:
""
,
userId
:
""
,
url
:
url
:
"
https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg
"
,
"
https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg
"
,
helper
,
helper
,
...
@@ -456,7 +455,14 @@ export default {
...
@@ -456,7 +455,14 @@ export default {
now_user
:
""
,
now_user
:
""
,
activeName
:
null
,
activeName
:
null
,
tabShow
:
true
,
tabShow
:
true
,
cloudData
:
{},
cloudData
:
{
namespace
:
""
,
workplace
:
""
,
user_name
:
""
,
phone
:
""
,
apply_time
:
""
,
system_name
:
""
},
cloudDteail
:
{
cloudDteail
:
{
containers
:
""
,
containers
:
""
,
cpu
:
""
,
cpu
:
""
,
...
@@ -504,14 +510,38 @@ export default {
...
@@ -504,14 +510,38 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getUrlQuery
();
this
.
getCloudDetail
();
this
.
getCloudDetail
();
},
},
methods
:
{
methods
:
{
getUrlQuery
()
{
this
.
apply_id
=
this
.
$route
.
query
.
apply_id
||
""
;
this
.
user_id
=
this
.
$route
.
query
.
user_id
||
""
;
this
.
apply_type
=
this
.
$route
.
query
.
apply_type
||
0
;
this
.
use_uid
=
this
.
$route
.
query
.
use_uid
||
""
;
this
.
id
=
this
.
$route
.
query
.
id
||
""
;
if
(
this
.
use_uid
!=
""
)
{
this
.
getCloudApplication
();
}
},
getUrl
()
{
getUrl
()
{
return
this
.
$route
.
path
.
substring
(
0
,
9
);
return
this
.
$route
.
path
.
substring
(
0
,
9
);
},
},
getCloudApplication
()
{
this
.
$api
.
workbench
.
getCloudApplication
({
namespace
:
this
.
cloudData
.
namespace
})
.
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
appList
=
response
.
data
.
data
;
}
else
{
console
.
log
(
response
.
data
.
errMsg
);
}
});
},
download
()
{},
download
()
{},
adjustment
()
{},
adjustment
()
{
this
.
$router
.
push
(
"
/shop/cloud
"
);
},
distribution
()
{
distribution
()
{
this
.
$api
.
workbench
this
.
$api
.
workbench
.
setCloudAllocation
({
id
:
this
.
id
,
userId
:
this
.
user_id
})
.
setCloudAllocation
({
id
:
this
.
id
,
userId
:
this
.
user_id
})
...
@@ -530,9 +560,74 @@ export default {
...
@@ -530,9 +560,74 @@ export default {
}
}
});
});
},
},
refuse
()
{},
refuse
()
{
pass
()
{},
let
query
=
{
deleteItem
()
{},
applyId
:
this
.
apply_id
,
applyState
:
-
1
,
applyType
:
this
.
apply_type
,
applyCloudId
:
this
.
id
,
namespace
:
this
.
cloudData
.
namespace
};
this
.
$api
.
workbench
.
setCloudApproval
(
query
).
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
message
:
"
申请已拒绝
"
,
type
:
"
success
"
});
this
.
$router
.
push
(
this
.
getUrl
());
}
else
{
this
.
$message
({
message
:
"
申请拒绝失败
"
,
type
:
"
error
"
});
}
});
},
pass
()
{
let
query
=
{
applyId
:
this
.
apply_id
,
applyState
:
1
,
applyType
:
this
.
apply_type
,
applyCloudId
:
this
.
id
,
namespace
:
this
.
cloudData
.
namespace
};
this
.
$api
.
workbench
.
setCloudApproval
(
query
).
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
message
:
"
申请已通过
"
,
type
:
"
success
"
});
this
.
$router
.
push
(
this
.
getUrl
());
}
else
{
this
.
$message
({
message
:
"
申请通过失败
"
,
type
:
"
error
"
});
}
});
},
deleteItem
()
{
this
.
$api
.
workbench
.
deleteCloud
({
id
:
this
.
id
,
namespace
:
this
.
cloudData
.
namespace
,
useUid
:
this
.
use_uid
})
.
then
(
response
=>
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
message
:
"
该资源已删除
"
,
type
:
"
success
"
});
this
.
$router
.
push
(
this
.
getUrl
());
}
else
{
this
.
$message
({
message
:
"
资源删除失败
"
,
type
:
"
error
"
});
}
});
},
getCurrentUser
()
{
getCurrentUser
()
{
this
.
$api
.
user
.
getNowUser
().
then
(({
data
})
=>
{
this
.
$api
.
user
.
getNowUser
().
then
(({
data
})
=>
{
if
(
data
.
success
==
1
)
{
if
(
data
.
success
==
1
)
{
...
@@ -547,6 +642,7 @@ export default {
...
@@ -547,6 +642,7 @@ export default {
this
.
$refs
.
allotConfirm
.
getDetail
(
this
.
apply_id
);
this
.
$refs
.
allotConfirm
.
getDetail
(
this
.
apply_id
);
},
},
clickTab
()
{},
clickTab
()
{},
// 根据列表参数来判断显示什么
setListWithRole
()
{
setListWithRole
()
{
if
(
this
.
now_user
==
0
)
{
if
(
this
.
now_user
==
0
)
{
// 普通用户
// 普通用户
...
@@ -594,9 +690,9 @@ export default {
...
@@ -594,9 +690,9 @@ export default {
},
},
getCloudDetail
()
{
getCloudDetail
()
{
let
query
=
{
let
query
=
{
type
:
0
,
type
:
this
.
apply_type
,
applyId
:
13
,
applyId
:
this
.
apply_id
,
id
:
25
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
;
...
@@ -633,7 +729,6 @@ export default {
...
@@ -633,7 +729,6 @@ export default {
(
count
.
containers_total
/
count
.
containers_use
)
*
100
(
count
.
containers_total
/
count
.
containers_use
)
*
100
);
);
}
}
// this.appList =
this
.
cloudDteail
.
containers
=
data
.
containers
;
this
.
cloudDteail
.
containers
=
data
.
containers
;
this
.
cloudDteail
.
cpu
=
data
.
cpu
;
this
.
cloudDteail
.
cpu
=
data
.
cpu
;
this
.
cloudDteail
.
disk
=
data
.
disk
;
this
.
cloudDteail
.
disk
=
data
.
disk
;
...
@@ -654,6 +749,12 @@ export default {
...
@@ -654,6 +749,12 @@ export default {
this
.
cloudDteail
.
adjust_one_memory_min
=
data
.
adjust_one_memory_min
;
this
.
cloudDteail
.
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
;
this
.
cloudData
.
namespace
=
data
.
namespace
;
this
.
cloudData
.
workplace
=
data
.
workplace
;
this
.
cloudData
.
user_name
=
data
.
user_name
;
this
.
cloudData
.
phone
=
data
.
phone
;
this
.
cloudData
.
apply_time
=
data
.
apply_time
;
this
.
cloudData
.
system_name
=
data
.
system_name
;
this
.
setListWithRole
();
this
.
setListWithRole
();
});
});
}
}
...
...
src/pages/workbench/fwgl/fwglList.vue
View file @
758d6cab
...
@@ -1486,7 +1486,9 @@ export default {
...
@@ -1486,7 +1486,9 @@ export default {
);
);
},
// 审批服务
},
// 审批服务
cloudDetail
(
item
)
{
cloudDetail
(
item
)
{
console
.
log
(
"
cloudDetail -
"
+
item
.
name
);
this
.
$router
.
push
({
path
:
`/fwgl/
${
this
.
level
}
/
${
this
.
type
}
/cloud_detail/
${
item
.
id
}
`
,
});
},
},
cloudAllot
(
item
)
{
cloudAllot
(
item
)
{
this
.
$refs
.
allotConfirm
.
getDetail
(
item
.
apply_id
);
this
.
$refs
.
allotConfirm
.
getDetail
(
item
.
apply_id
);
...
@@ -1996,7 +1998,7 @@ export default {
...
@@ -1996,7 +1998,7 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
`/fwgl/
${
this
.
level
}
/
${
this
.
type
}
/approveWorkspace`
,
path
:
`/fwgl/
${
this
.
level
}
/
${
this
.
type
}
/approveWorkspace`
,
query
:
{
query
:
{
warn
:
this
.
cloud_admin_warn
,
warn
:
this
.
cloud_admin_warn
?
1
:
0
,
},
},
});
});
},
},
...
@@ -2035,6 +2037,7 @@ export default {
...
@@ -2035,6 +2037,7 @@ export default {
<
style
scoped
>
<
style
scoped
>
.service_management_list
{
.service_management_list
{
height
:
100%
;
height
:
100%
;
min-width
:
1500px
;
}
}
.cloud_title
{
.cloud_title
{
margin-top
:
15px
;
margin-top
:
15px
;
...
...
src/pages/workbench/fwgl/organizationCloudResource.vue
View file @
758d6cab
...
@@ -83,12 +83,15 @@ export default {
...
@@ -83,12 +83,15 @@ export default {
cancelHide
:
false
,
cancelHide
:
false
,
submit
:
null
,
submit
:
null
,
},
},
tempFilter
:
null
,
}),
}),
computed
:
{},
computed
:
{},
methods
:
{
methods
:
{
init
(
filter
)
{
init
(
filter
)
{
// console.log(filter);
// console.log(filter);
this
.
tempFilter
=
filter
;
this
.
$http
this
.
$http
.
get
(
"
/apaas/service/v3/resource/user/apply/list
"
,
{
.
get
(
"
/apaas/service/v3/resource/user/apply/list
"
,
{
params
:
{
params
:
{
...
@@ -318,22 +321,64 @@ export default {
...
@@ -318,22 +321,64 @@ export default {
this
.
$refs
.
dialog
.
show
();
this
.
$refs
.
dialog
.
show
();
},
},
detailAction
(
item
)
{
detailAction
(
item
)
{
console
.
log
(
"
detailAction
"
);
this
.
$router
.
push
({
path
:
`/fwgl/
${
this
.
level
}
/
${
this
.
type
}
/cloud_detail/
${
item
.
id
}
`
,
});
},
},
stateAction
(
item
)
{
stateAction
(
item
)
{
this
.
dialogInfo
.
msg
=
"
您确认要禁用该工作区域吗?
"
;
let
action
=
(
type
,
cb
)
=>
{
this
.
dialogInfo
.
cancelHide
=
false
;
this
.
$http
this
.
dialogInfo
.
submit
=
()
=>
{
.
put
(
"
/apaas/service/v3/resource/apply/disable
"
,
null
,
{
console
.
log
(
"
deleteAction
"
);
params
:
{
id
:
item
.
id
,
setTimeout
(()
=>
{
type
,
this
.
dialogInfo
.
msg
=
`该工作区域已被禁用,普通用户与组织管理员依旧能查看该工作区域,但无法做任何操作。`
;
},
this
.
dialogInfo
.
cancelHide
=
true
;
})
this
.
dialogInfo
.
submit
=
null
;
.
then
(({
data
})
=>
{
this
.
showDialog
();
if
(
data
.
success
==
1
)
{
},
500
);
typeof
cb
==
"
function
"
&&
cb
();
this
.
init
(
this
.
tempFilter
);
}
else
{
this
.
$message
({
message
:
data
.
errMsg
||
"
操作失败
"
,
type
:
"
warning
"
,
});
}
})
.
catch
((
error
)
=>
{
console
.
log
(
error
);
this
.
$message
({
message
:
"
操作失败
"
,
type
:
"
warning
"
,
});
});
};
};
this
.
showDialog
();
if
(
item
.
state
==
1
)
{
this
.
dialogInfo
.
msg
=
"
您确认要禁用该工作区域吗?
"
;
this
.
dialogInfo
.
cancelHide
=
false
;
this
.
dialogInfo
.
submit
=
()
=>
{
action
(
0
,
()
=>
{
this
.
dialogInfo
.
msg
=
`该工作区域已被禁用,普通用户与组织管理员依旧能查看该工作区域,但无法做任何操作。`
;
this
.
dialogInfo
.
cancelHide
=
true
;
this
.
dialogInfo
.
submit
=
null
;
this
.
showDialog
();
});
};
this
.
showDialog
();
}
else
{
this
.
dialogInfo
.
msg
=
"
您确认要启用该工作区域吗?
"
;
this
.
dialogInfo
.
cancelHide
=
false
;
this
.
dialogInfo
.
submit
=
()
=>
{
action
(
1
,
()
=>
{
this
.
$message
({
message
:
"
该工作区域已被启用
"
,
type
:
"
success
"
,
});
});
};
this
.
showDialog
();
}
},
},
deleteAction
(
item
)
{
deleteAction
(
item
)
{
this
.
dialogInfo
.
msg
=
`
this
.
dialogInfo
.
msg
=
`
...
@@ -342,7 +387,34 @@ export default {
...
@@ -342,7 +387,34 @@ export default {
`
;
`
;
this
.
dialogInfo
.
cancelHide
=
false
;
this
.
dialogInfo
.
cancelHide
=
false
;
this
.
dialogInfo
.
submit
=
()
=>
{
this
.
dialogInfo
.
submit
=
()
=>
{
console
.
log
(
"
deleteAction
"
);
this
.
$http
.
delete
(
"
/apaas/service/v3/resource/apply/remove
"
,
{
params
:
{
id
:
item
.
id
,
name_space
:
item
.
name_space
,
use_uid
:
item
.
use_uid
,
},
})
.
then
(({
data
})
=>
{
if
(
data
.
success
)
{
this
.
$message
({
message
:
data
.
errMsg
||
`删除
${
item
.
name_space
}
成功.`
,
type
:
"
success
"
,
});
this
.
init
(
this
.
tempFliter
);
}
else
{
this
.
$message
({
message
:
data
.
errMsg
,
type
:
"
warning
"
,
});
}
})
.
catch
((
error
)
=>
{
this
.
$message
({
message
:
`删除
${
item
.
name
}
失败.`
,
type
:
"
warning
"
,
});
});
};
};
this
.
showDialog
();
this
.
showDialog
();
},
},
...
...
src/pages/workbench/fwgl/serviceDetail.vue
View file @
758d6cab
...
@@ -501,13 +501,9 @@ export default {
...
@@ -501,13 +501,9 @@ export default {
});
});
},
},
getData
()
{
getData
()
{
let
url
=
"
./static/antv.json
"
;
this
.
$api
.
workbench
.
getServiceTopology
().
then
(
response
=>
{
this
.
$http
this
.
datas
=
response
.
data
.
elements
;
.
get
(
url
)
});
.
then
(
response
=>
{
this
.
datas
=
response
.
data
.
elements
;
})
.
catch
(
function
(
response
)
{});
},
},
getServiceInfo
()
{
getServiceInfo
()
{
this
.
$http
this
.
$http
...
...
src/pages/workbench/yygl/yyglList.vue
View file @
758d6cab
...
@@ -233,6 +233,7 @@ export default {
...
@@ -233,6 +233,7 @@ export default {
let
time
=
item
.
time
||
""
;
let
time
=
item
.
time
||
""
;
return
helper
.
dateStringTransform
(
time
);
return
helper
.
dateStringTransform
(
time
);
},
},
width
:
180
,
align
:
"
center
"
,
align
:
"
center
"
,
},
},
{
{
...
@@ -329,6 +330,7 @@ export default {
...
@@ -329,6 +330,7 @@ export default {
let
date
=
item
.
create_date
||
""
;
let
date
=
item
.
create_date
||
""
;
return
helper
.
dateStringTransform
(
date
);
return
helper
.
dateStringTransform
(
date
);
},
},
width
:
180
,
align
:
"
center
"
,
align
:
"
center
"
,
},
},
{
{
...
@@ -444,6 +446,7 @@ export default {
...
@@ -444,6 +446,7 @@ export default {
let
date
=
item
.
created
||
""
;
let
date
=
item
.
created
||
""
;
return
helper
.
dateStringTransform
(
date
);
return
helper
.
dateStringTransform
(
date
);
},
},
width
:
180
,
align
:
"
center
"
,
align
:
"
center
"
,
},
},
{
{
...
@@ -528,6 +531,7 @@ export default {
...
@@ -528,6 +531,7 @@ export default {
let
date
=
item
.
time
||
""
;
let
date
=
item
.
time
||
""
;
return
helper
.
dateStringTransform
(
date
);
return
helper
.
dateStringTransform
(
date
);
},
},
width
:
180
,
align
:
"
center
"
,
align
:
"
center
"
,
},
},
{
{
...
@@ -585,14 +589,14 @@ export default {
...
@@ -585,14 +589,14 @@ export default {
name
:
"
申请状态
"
,
name
:
"
申请状态
"
,
prop
:
"
apply_state
"
,
prop
:
"
apply_state
"
,
data
:
[
data
:
[
{
name
:
"
待审批
"
,
value
:
0
,
},
{
{
name
:
"
已审批
"
,
name
:
"
已审批
"
,
value
:
1
,
value
:
1
,
},
},
{
name
:
"
待审批
"
,
value
:
0
,
},
],
],
},
},
];
];
...
@@ -749,6 +753,7 @@ export default {
...
@@ -749,6 +753,7 @@ export default {
let
date
=
item
.
created
||
""
;
let
date
=
item
.
created
||
""
;
return
helper
.
dateStringTransform
(
date
);
return
helper
.
dateStringTransform
(
date
);
},
},
width
:
180
,
align
:
"
center
"
,
align
:
"
center
"
,
},
},
{
{
...
@@ -833,6 +838,7 @@ export default {
...
@@ -833,6 +838,7 @@ export default {
let
date
=
item
.
time
||
""
;
let
date
=
item
.
time
||
""
;
return
helper
.
dateStringTransform
(
date
);
return
helper
.
dateStringTransform
(
date
);
},
},
width
:
180
,
align
:
"
center
"
,
align
:
"
center
"
,
},
},
{
{
...
@@ -890,14 +896,14 @@ export default {
...
@@ -890,14 +896,14 @@ export default {
name
:
"
申请状态
"
,
name
:
"
申请状态
"
,
prop
:
"
apply_state
"
,
prop
:
"
apply_state
"
,
data
:
[
data
:
[
{
name
:
"
待审批
"
,
value
:
0
,
},
{
{
name
:
"
已审批
"
,
name
:
"
已审批
"
,
value
:
1
,
value
:
1
,
},
},
{
name
:
"
待审批
"
,
value
:
0
,
},
],
],
},
},
];
];
...
@@ -1358,6 +1364,7 @@ export default {
...
@@ -1358,6 +1364,7 @@ export default {
});
});
});
});
};
};
this
.
showDialog
();
},
},
},
},
created
()
{
created
()
{
...
...
src/request/api/workbench.js
View file @
758d6cab
...
@@ -34,7 +34,7 @@ const workbench = {
...
@@ -34,7 +34,7 @@ const workbench = {
},
},
// cloud resource approval
// cloud resource approval
setCloudApproval
(
params
)
{
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
}
&namespace=
${
params
.
namespace
}
`
,
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
}
`
)
},
},
// cloud resource allocation
// cloud resource allocation
setCloudAllocation
(
params
)
{
setCloudAllocation
(
params
)
{
...
@@ -42,7 +42,7 @@ const workbench = {
...
@@ -42,7 +42,7 @@ const workbench = {
},
},
// cloud resource delete
// cloud resource delete
deleteCloud
(
params
)
{
deleteCloud
(
params
)
{
return
axios
.
delete
(
`/apaas/service/v3/resource/apply/remove?id=
${
params
.
id
}
`
)
return
axios
.
delete
(
`/apaas/service/v3/resource/apply/remove?id=
${
params
.
id
}
&namespace=
${
params
.
namespace
}
&use_uid=
${
params
.
useUid
}
`
)
},
},
// cloud resource disabled
// cloud resource disabled
disabledCloud
(
params
)
{
disabledCloud
(
params
)
{
...
@@ -52,6 +52,11 @@ const workbench = {
...
@@ -52,6 +52,11 @@ const workbench = {
getCloudApplication
(
params
)
{
getCloudApplication
(
params
)
{
return
axios
.
get
(
`/apaas/hubApi/market/deployList?page=1&limit=10000&namespaces=
${
params
.
namespace
}
`
)
return
axios
.
get
(
`/apaas/hubApi/market/deployList?page=1&limit=10000&namespaces=
${
params
.
namespace
}
`
)
},
},
// get service topology
getServiceTopology
()
{
return
axios
.
get
(
`/awecloud/meshgraph/api/namespaces/graph?duration=60s&graphType=service&injectServiceNodes=false&appenders=deadNode,sidecarsCheck,serviceEntry,istio&namespaces=apaas-proxy`
)
},
}
}
export
default
workbench
;
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