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
98672898
Commit
98672898
authored
Dec 23, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务评分
parent
cff33b16
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
31 deletions
+91
-31
src/components/e-charts/starlist.vue
src/components/e-charts/starlist.vue
+24
-11
src/pages/data-analysis/my-service.vue
src/pages/data-analysis/my-service.vue
+27
-10
src/pages/data-analysis/org-service.vue
src/pages/data-analysis/org-service.vue
+20
-5
src/pages/data-analysis/super-service.vue
src/pages/data-analysis/super-service.vue
+20
-5
No files found.
src/components/e-charts/starlist.vue
View file @
98672898
<
template
>
<
template
>
<ul
class=
"star_list apaas_scroll"
>
<ul
class=
"star_list apaas_scroll"
>
<li
class=
"item_list"
v-for=
"(option, index) in options"
:key=
"'star_info_' + index"
>
<li
class=
"item_list"
v-for=
"(option, index) in options"
:key=
"'star_info_' + index"
>
<el-rate
<el-rate
v-if=
"show_star"
v-if=
"show_star"
class=
"item-rate"
class=
"item-rate"
...
@@ -12,11 +16,15 @@
...
@@ -12,11 +16,15 @@
<span
v-else
class=
"data_title"
>
{{
option
.
title
}}
</span>
<span
v-else
class=
"data_title"
>
{{
option
.
title
}}
</span>
<el-progress
<el-progress
class=
"item-progress"
class=
"item-progress"
:percentage=
"
getPercent(option.count
)"
:percentage=
"
Number(getPercent(option.count)
)"
:show-text=
"false"
:show-text=
"false"
:color=
"show_star ? color : colors[index]"
:color=
"show_star ? color : colors[index]"
></el-progress>
></el-progress>
<span
v-if=
"!show_star"
class=
"item_text_1"
v-text=
"option.percent + '%'"
></span>
<span
v-if=
"!show_star"
class=
"item_text_1"
v-text=
"option.percent + '%'"
></span>
<span
class=
"item-text"
v-text=
"option.count + '个'"
></span>
<span
class=
"item-text"
v-text=
"option.count + '个'"
></span>
</li>
</li>
</ul>
</ul>
...
@@ -27,28 +35,33 @@ export default {
...
@@ -27,28 +35,33 @@ export default {
props
:
{
props
:
{
options
:
{
options
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
,
},
},
total
:
{
total
:
{
type
:
Number
,
type
:
Number
,
default
:
()
=>
10
default
:
()
=>
10
,
},
},
show_star
:
{
show_star
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
,
}
}
,
},
},
data
()
{
data
()
{
return
{
return
{
color
:
"
#e56600
"
,
color
:
"
#e56600
"
,
colors
:
[
"
#25bdb1
"
,
"
#f5ab4c
"
,
"
#e15260
"
,
"
#274fee
"
,
"
#58617a
"
]
colors
:
[
"
#25bdb1
"
,
"
#f5ab4c
"
,
"
#e15260
"
,
"
#274fee
"
,
"
#58617a
"
]
,
};
};
},
},
methods
:
{
methods
:
{
getPercent
(
value
)
{
getPercent
(
value
)
{
return
Math
.
min
((
value
/
this
.
total
)
*
100
,
100
);
if
(
value
==
0
)
{
}
return
0
;
}
}
else
{
let
num
=
Math
.
min
((
value
/
this
.
total
)
*
100
,
100
);
return
num
;
}
},
},
};
};
</
script
>
</
script
>
...
...
src/pages/data-analysis/my-service.vue
View file @
98672898
...
@@ -472,31 +472,31 @@ export default {
...
@@ -472,31 +472,31 @@ export default {
starlistData
:
[
starlistData
:
[
{
{
star
:
5
,
star
:
5
,
count
:
5
,
count
:
0
,
unit
:
"
个
"
,
unit
:
"
个
"
,
},
},
{
{
star
:
4
,
star
:
4
,
count
:
4
,
count
:
0
,
unit
:
"
个
"
,
unit
:
"
个
"
,
},
},
{
{
star
:
3
,
star
:
3
,
count
:
3
,
count
:
0
,
unit
:
"
个
"
,
unit
:
"
个
"
,
},
},
{
{
star
:
2
,
star
:
2
,
count
:
2
,
count
:
0
,
unit
:
"
个
"
,
unit
:
"
个
"
,
},
},
{
{
star
:
1
,
star
:
1
,
count
:
1
,
count
:
0
,
unit
:
"
个
"
,
unit
:
"
个
"
,
},
},
],
// 服务评分
],
// 服务评分
starlistTotal
:
15
,
starlistTotal
:
0
,
hotSearchHeader
:
[],
// 热门搜索 表头
hotSearchHeader
:
[],
// 热门搜索 表头
hotSearchData
:
[],
// 热门搜索 数据
hotSearchData
:
[],
// 热门搜索 数据
graph_arr
:
{
graph_arr
:
{
...
@@ -722,10 +722,27 @@ export default {
...
@@ -722,10 +722,27 @@ export default {
})
})
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
if
(
response
.
data
.
success
==
1
)
{
this
.
commentlistData
=
response
.
data
.
data
.
concat
(
if
(
this
.
right_3_state
==
0
)
{
this
.
commentlistData
let
data
=
response
.
data
.
data
||
[];
);
this
.
commentlistData
=
data
.
concat
(
this
.
commentlistData
);
this
.
last_id
=
this
.
commentlistData
[
0
].
last_id
;
if
(
this
.
commentlistData
&&
this
.
commentlistData
.
length
!=
0
)
{
this
.
last_id
=
this
.
commentlistData
[
0
].
last_id
;
}
}
else
{
let
data
=
response
.
data
.
data
;
this
.
starlistData
[
0
].
count
=
data
.
score5
;
this
.
starlistData
[
1
].
count
=
data
.
score4
;
this
.
starlistData
[
2
].
count
=
data
.
score3
;
this
.
starlistData
[
3
].
count
=
data
.
score2
;
this
.
starlistData
[
4
].
count
=
data
.
score1
;
this
.
starlistTotal
=
data
.
score5
+
data
.
score4
+
data
.
score3
+
data
.
score2
+
data
.
score1
;
console
.
log
(
this
.
starlistData
,
this
.
starlistTotal
)
}
}
}
});
});
},
},
...
...
src/pages/data-analysis/org-service.vue
View file @
98672898
...
@@ -634,12 +634,27 @@ export default {
...
@@ -634,12 +634,27 @@ export default {
})
})
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
if
(
response
.
data
.
success
==
1
)
{
if
(
response
.
data
.
data
)
{
if
(
this
.
right_3_state
==
0
)
{
this
.
commentlistData
=
response
.
data
.
data
.
concat
(
let
data
=
response
.
data
.
data
||
[];
this
.
commentlistData
this
.
commentlistData
=
data
.
concat
(
this
.
commentlistData
);
);
if
(
this
.
commentlistData
&&
this
.
commentlistData
.
length
!=
0
)
{
this
.
last_id
=
this
.
commentlistData
[
0
].
last_id
;
}
}
else
{
let
data
=
response
.
data
.
data
;
this
.
starlistData
[
0
].
count
=
data
.
score5
;
this
.
starlistData
[
1
].
count
=
data
.
score4
;
this
.
starlistData
[
2
].
count
=
data
.
score3
;
this
.
starlistData
[
3
].
count
=
data
.
score2
;
this
.
starlistData
[
4
].
count
=
data
.
score1
;
this
.
starlistTotal
=
data
.
score5
+
data
.
score4
+
data
.
score3
+
data
.
score2
+
data
.
score1
;
console
.
log
(
this
.
starlistData
,
this
.
starlistTotal
)
}
}
this
.
last_id
=
this
.
commentlistData
[
0
].
last_id
;
}
}
});
});
},
},
...
...
src/pages/data-analysis/super-service.vue
View file @
98672898
...
@@ -628,11 +628,26 @@ export default {
...
@@ -628,11 +628,26 @@ export default {
})
})
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
if
(
response
.
data
.
success
==
1
)
{
if
(
response
.
data
.
success
==
1
)
{
if
(
response
.
data
.
data
)
{
if
(
this
.
right_3_state
==
0
)
{
this
.
commentlistData
=
response
.
data
.
data
.
concat
(
let
data
=
response
.
data
.
data
||
[];
this
.
commentlistData
this
.
commentlistData
=
data
.
concat
(
this
.
commentlistData
);
);
if
(
this
.
commentlistData
&&
this
.
commentlistData
.
length
!=
0
)
{
this
.
last_id
=
this
.
commentlistData
[
0
].
last_id
;
this
.
last_id
=
this
.
commentlistData
[
0
].
last_id
;
}
}
else
{
let
data
=
response
.
data
.
data
;
this
.
starlistData
[
0
].
count
=
data
.
score5
;
this
.
starlistData
[
1
].
count
=
data
.
score4
;
this
.
starlistData
[
2
].
count
=
data
.
score3
;
this
.
starlistData
[
3
].
count
=
data
.
score2
;
this
.
starlistData
[
4
].
count
=
data
.
score1
;
this
.
starlistTotal
=
data
.
score5
+
data
.
score4
+
data
.
score3
+
data
.
score2
+
data
.
score1
;
console
.
log
(
this
.
starlistData
,
this
.
starlistTotal
)
}
}
}
}
});
});
...
...
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