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
43e277ee
Commit
43e277ee
authored
Jun 29, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xym' into dev
parents
05cdb617
6b9cb683
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
433 additions
and
111 deletions
+433
-111
src/components/deployment-info.vue
src/components/deployment-info.vue
+148
-0
src/pages/workbench/yygl/deployment.vue
src/pages/workbench/yygl/deployment.vue
+285
-111
No files found.
src/components/deployment-info.vue
0 → 100644
View file @
43e277ee
<
template
>
<div
class=
"deployment_info"
>
<div
class=
"state_steps"
>
<p
class=
"deploy_state icon_and_text"
:class=
"
{
warn: deployState.state === 2,
}"
>
<img
:src=
"getIcon(deployState.state)"
/>
<span
v-text=
"getText(deployState.state)"
></span>
</p>
<ul
class=
"state_list"
>
<li
v-for=
"item in data"
:key=
"item.value"
class=
"icon_and_text"
:class=
"
{ current: item.value === currentState.value }"
@click="selecState(item)"
>
<img
:src=
"getIcon(item.state)"
/>
<span
v-text=
"item.name"
></span>
</li>
</ul>
</div>
<div
class=
"state_detail"
>
<p
v-text=
"currentState.content"
style=
"text-align: center;margin-top: 20px;"
></p>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
data
:
{
type
:
Array
,
required
:
true
,
},
},
data
:
()
=>
({
selectedState
:
null
,
// 用户选中的状态
}),
computed
:
{
deployState
()
{
let
state
=
{
name
:
"
-
"
,
value
:
"
values
"
,
content
:
""
,
state
:
2
,
};
let
status
=
this
.
data
;
let
statusLength
=
status
.
length
;
if
(
statusLength
>
0
)
{
state
=
status
[
statusLength
-
1
];
}
return
state
;
},
// 正在进行的状态
currentState
()
{
return
this
.
selectedState
||
this
.
deployState
;
},
// 需要展示的状态
},
methods
:
{
getIcon
(
stateValue
=
2
)
{
const
icons
=
[
require
(
"
../assets/imgs/ic_operation.gif
"
),
require
(
"
../assets/imgs/ic_true.png
"
),
require
(
"
../assets/imgs/ic_failed.png
"
),
];
return
icons
[
stateValue
];
},
getText
(
stateValue
=
2
)
{
const
texts
=
[
"
部署中
"
,
"
成功
"
,
"
失败
"
];
return
texts
[
stateValue
];
},
selecState
(
state
)
{
if
(
this
.
selectedState
&&
this
.
selectedState
.
value
===
state
.
value
)
{
return
;
}
console
.
log
(
state
);
this
.
selectedState
=
state
;
},
},
mounted
()
{
// console.log(this.data);
},
};
</
script
>
<
style
scoped
>
.deployment_info
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
stretch
;
}
.state_steps
{
width
:
270px
;
flex-shrink
:
0
;
}
.state_steps
>
.deploy_state
{
margin
:
10px
20px
20px
0
;
padding
:
10px
;
border-radius
:
5px
;
overflow
:
hidden
;
background-color
:
#edf0ff
;
font-size
:
16px
;
line-height
:
24px
;
color
:
#264dd9
;
text-align
:
center
;
}
.state_steps
>
.deploy_state.warn
{
background-color
:
#ffebeb
;
color
:
#da4251
;
}
.state_steps
>
.state_list
>
li
{
padding
:
15px
20px
;
font-size
:
14px
;
line-height
:
22px
;
color
:
#242c43
;
cursor
:
pointer
;
}
.state_steps
>
.state_list
>
li
.current
{
border-top-left-radius
:
6px
;
border-bottom-left-radius
:
6px
;
background-color
:
#f8f9fd
;
}
.state_detail
{
height
:
500px
;
flex-grow
:
1
;
border-radius
:
7px
;
background-color
:
#f8f9fd
;
overflow
:
hidden
;
}
.icon_and_text
>
*
{
display
:
inline-block
;
vertical-align
:
middle
;
}
.icon_and_text
>
img
+
span
{
margin-left
:
12px
;
}
</
style
>
src/pages/workbench/yygl/deployment.vue
View file @
43e277ee
This diff is collapsed.
Click to expand it.
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