Skip to content

Commit

Permalink
优化首页的任务图
Browse files Browse the repository at this point in the history
  • Loading branch information
ss1917 committed Jul 5, 2019
1 parent 938bc58 commit 6876eab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/charts/pie.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default {
{
type: 'pie',
radius: '55%',
center: ['50%', '60%'],
center: ['68%', '60%'],
data: this.value,
itemStyle: {
emphasis: {
Expand Down
10 changes: 7 additions & 3 deletions src/view/single-page/home/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ export default {
getTaskStatementlist().then(res => {
if (res.data.code === 0) {
const data = res.data.data
for (var item in data) {
// 切割下列表,历史任务可能有很多,限制到24个
const slice_data = data.slice(0,36)
for (var item in slice_data) {
this.pieTaskData.push({
value: data[item].task_len,
name: data[item].task_type
Expand All @@ -130,7 +132,9 @@ export default {
getTagList().then(res => {
if (res.data.code === 0) {
const data = res.data.data
for (var item in data) {
// 切割下列表,历史任务可能有很多,限制到24个
const slice_data = data.slice(0,36)
for (var item in slice_data) {
this.pieCmdbData.push({
value: data[item].server_len,
name: data[item].tag_name
Expand Down Expand Up @@ -178,4 +182,4 @@ export default {
.count-style{
font-size: 50px;
}
</style>
</style>

0 comments on commit 6876eab

Please sign in to comment.