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
08193e52
"src/main/java/com/nx/umms/mapper/OcpModelGroupMapper.java" did not exist on "0ec928c3e3ca09d193e520d67423a387010e1e03"
Commit
08193e52
authored
Jul 02, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
starlist组件
parent
893140f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
22 deletions
+138
-22
src/components/e-charts/starlist.vue
src/components/e-charts/starlist.vue
+122
-0
src/components/e-charts/toplist.vue
src/components/e-charts/toplist.vue
+10
-20
src/pages/data-analysis/my-service.vue
src/pages/data-analysis/my-service.vue
+6
-2
No files found.
src/components/e-charts/starlist.vue
View file @
08193e52
<
template
>
<div>
<ul
class=
"star_list"
>
<li
class=
"item_list"
v-for=
"(option, index) in options"
:key=
"'star_info_' + index"
>
<el-rate
class=
"item-rate"
:colors=
"['#8890a7', '#8890a7', '#8890a7']"
:value=
"option.star"
disabled
disabled-void-color=
"transparent"
>
</el-rate>
<el-progress
class=
"item-progress"
:percentage=
"getPercent(option.count)"
:show-text=
"false"
color=
"#e56600"
></el-progress>
<span
class=
"item-text"
v-text=
"option.count + '个'"
></span>
</li>
</ul>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
options
:
{
type
:
Array
,
default
:
()
=>
[
{
star
:
5
,
count
:
5
,
unit
:
"
个
"
,
},
{
star
:
4
,
count
:
4
,
unit
:
"
个
"
,
},
{
star
:
3
,
count
:
3
,
unit
:
"
个
"
,
},
{
star
:
2
,
count
:
10002
,
unit
:
"
个
"
,
},
{
star
:
1
,
count
:
1
,
unit
:
"
个
"
,
},
],
},
total
:
{
type
:
Number
,
default
:
()
=>
10015
,
},
},
methods
:
{
getPercent
(
value
)
{
return
Math
.
min
((
value
/
this
.
total
)
*
100
,
100
);
},
},
};
</
script
>
<
style
scoped
>
.star_list
{
height
:
100%
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
}
.item_list
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
margin-right
:
10px
;
margin-bottom
:
12px
;
}
.item-rate
{
flex-shrink
:
0
;
display
:
inline-flex
;
flex-direction
:
row-reverse
;
justify-content
:
flex-start
;
align-items
:
center
;
margin-right
:
10px
;
}
.item-progress
{
flex-grow
:
1
;
max-width
:
200px
;
margin-right
:
10px
;
}
.item-text
{
flex-shrink
:
0
;
width
:
60px
;
font-size
:
14px
;
line-height
:
20px
;
color
:
#242c43
;
text-align
:
right
;
}
</
style
>
<
style
>
.item-rate
.el-rate
{
height
:
14px
;
}
.item-rate
.el-rate__icon
{
font-size
:
14px
;
margin-right
:
0
;
}
.item-progress
.el-progress-bar__outer
{
background
:
#e2e3ed
;
}
</
style
>
src/components/e-charts/toplist.vue
View file @
08193e52
...
@@ -16,12 +16,12 @@
...
@@ -16,12 +16,12 @@
</span>
</span>
<span
v-text=
"option.value + (option.unit || '次')"
></span>
<span
v-text=
"option.value + (option.unit || '次')"
></span>
</p>
</p>
<
div
class=
"item_progress"
>
<
el-progress
<div
class=
"item_progress"
class=
"item_progress_bar
"
:percentage=
"getPercent(option.value)
"
:style=
"
{ width: getBarWidth(option.value) }
"
:show-text=
"false
"
>
</div>
color=
"#e56600"
</div
>
></el-progress
>
</div>
</div>
</li>
</li>
</ul>
</ul>
...
@@ -77,8 +77,8 @@ export default {
...
@@ -77,8 +77,8 @@ export default {
},
},
},
},
methods
:
{
methods
:
{
get
BarWidth
(
value
)
{
get
Percent
(
value
)
{
return
Math
.
min
((
value
/
this
.
targetValue
)
*
100
,
100
)
+
"
%
"
;
return
Math
.
min
((
value
/
this
.
targetValue
)
*
100
,
100
);
},
},
},
},
};
};
...
@@ -94,6 +94,7 @@ export default {
...
@@ -94,6 +94,7 @@ export default {
display
:
flex
;
display
:
flex
;
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
center
;
align-items
:
center
;
margin-right
:
10px
;
margin-bottom
:
18px
;
margin-bottom
:
18px
;
}
}
.item_index
{
.item_index
{
...
@@ -122,7 +123,6 @@ export default {
...
@@ -122,7 +123,6 @@ export default {
}
}
.item_detail
{
.item_detail
{
flex-grow
:
1
;
flex-grow
:
1
;
margin-right
:
10px
;
}
}
.item_info
>
span
:first-child
{
.item_info
>
span
:first-child
{
flex-grow
:
1
;
flex-grow
:
1
;
...
@@ -137,16 +137,6 @@ export default {
...
@@ -137,16 +137,6 @@ export default {
color
:
#0d1847
;
color
:
#0d1847
;
}
}
.item_progress
{
.item_progress
{
height
:
5px
;
margin-top
:
6px
;
border-radius
:
2px
;
overflow
:
hidden
;
background-color
:
#c9cedd
;
margin-top
:
7px
;
}
.item_progress
>
.item_progress_bar
{
height
:
inherit
;
border-radius
:
inherit
;
overflow
:
inherit
;
background-color
:
#e56600
;
}
}
</
style
>
</
style
>
src/pages/data-analysis/my-service.vue
View file @
08193e52
...
@@ -46,7 +46,9 @@
...
@@ -46,7 +46,9 @@
<block-radius
class=
"block"
></block-radius>
<block-radius
class=
"block"
></block-radius>
</el-col>
</el-col>
<el-col
:span=
"24"
class=
"in_block"
>
<el-col
:span=
"24"
class=
"in_block"
>
<block-radius
class=
"block"
></block-radius>
<block-radius
class=
"block"
>
<starlist></starlist>
</block-radius>
</el-col>
</el-col>
</el-row>
</el-row>
</el-col>
</el-col>
...
@@ -67,11 +69,13 @@
...
@@ -67,11 +69,13 @@
import
BlockRadius
from
"
@/components/block-radius
"
;
import
BlockRadius
from
"
@/components/block-radius
"
;
import
Dashboard
from
"
@/components/e-charts/dashboard
"
;
import
Dashboard
from
"
@/components/e-charts/dashboard
"
;
import
Toplist
from
"
@/components/e-charts/toplist
"
;
import
Toplist
from
"
@/components/e-charts/toplist
"
;
import
Starlist
from
"
@/components/e-charts/starlist
"
;
export
default
{
export
default
{
components
:
{
components
:
{
BlockRadius
,
BlockRadius
,
Dashboard
,
Dashboard
,
Toplist
Toplist
,
Starlist
},
},
data
:
()
=>
({
data
:
()
=>
({
navList
:
[]
navList
:
[]
...
...
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