1
|
<template>
|
1
|
<template>
|
2
|
<div :style="styleObj" class="flex-div-content" >
|
2
|
<div :style="styleObj" class="flex-div-content" >
|
3
|
- <div :style="styleObjItem" class="flex-div" @click="goJump(item)" v-for="(item,index) in percentData" :key="index">
|
3
|
+ <div :style="styleObjItem" class="flex-div card-item" @click="goJump(item)" v-for="(item,index) in percentData" :key="index">
|
4
|
<div class="percent-title" :style="titleStyle">
|
4
|
<div class="percent-title" :style="titleStyle">
|
5
|
<img :src="imgStyle.imageAdress" alt="" class="icon-title">
|
5
|
<img :src="imgStyle.imageAdress" alt="" class="icon-title">
|
6
|
<!-- {{ optionsSetup.titleName }}-->
|
6
|
<!-- {{ optionsSetup.titleName }}-->
|
|
@@ -9,7 +9,7 @@ |
|
@@ -9,7 +9,7 @@ |
9
|
<div class="percentContainer" :style="flexStyle">
|
9
|
<div class="percentContainer" :style="flexStyle">
|
10
|
<v-chart :options="options[index]" autoresize/>
|
10
|
<v-chart :options="options[index]" autoresize/>
|
11
|
<div class="percent-label-item">
|
11
|
<div class="percent-label-item">
|
12
|
- <div class="chart-title" v-for="(itemChild,index) in item.percentData" :key="index">
|
12
|
+ <div class="chart-title" v-for="(itemChild,index1) in item.percentData" :key="index1">
|
13
|
<span :style="numStyle(itemChild)">{{ itemChild.num }}</span>
|
13
|
<span :style="numStyle(itemChild)">{{ itemChild.num }}</span>
|
14
|
<span :style="pieStyle(itemChild)">%</span>
|
14
|
<span :style="pieStyle(itemChild)">%</span>
|
15
|
</div>
|
15
|
</div>
|
|
@@ -300,8 +300,6 @@ export default { |
|
@@ -300,8 +300,6 @@ export default { |
300
|
name:'内存容量'
|
300
|
name:'内存容量'
|
301
|
}]
|
301
|
}]
|
302
|
}
|
302
|
}
|
303
|
- console.log("####",arrCpu,arrmemory,arrstorage)
|
|
|
304
|
-
|
|
|
305
|
if(arrCpu.length>0 && arrmemory.length>0 && arrstorage.length>0){
|
303
|
if(arrCpu.length>0 && arrmemory.length>0 && arrstorage.length>0){
|
306
|
item.percentData=arrCpu.concat(arrmemory).concat(arrstorage);
|
304
|
item.percentData=arrCpu.concat(arrmemory).concat(arrstorage);
|
307
|
|
305
|
|
|
@@ -355,12 +353,13 @@ export default { |
|
@@ -355,12 +353,13 @@ export default { |
355
|
let width1=width/this.percentData[0].percentData.length;
|
353
|
let width1=width/this.percentData[0].percentData.length;
|
356
|
let height1=height/2-15;
|
354
|
let height1=height/2-15;
|
357
|
let percentDataArr=this.percentData[index];
|
355
|
let percentDataArr=this.percentData[index];
|
358
|
- percentDataArr.percentData.map((item,index)=>{
|
356
|
+ percentDataArr.percentData.map((item,index1)=>{
|
|
|
357
|
+
|
359
|
let series={
|
358
|
let series={
|
360
|
//name: '圆环',
|
359
|
//name: '圆环',
|
361
|
type: 'pie',
|
360
|
type: 'pie',
|
362
|
radius: ['70%', '60%'],
|
361
|
radius: ['70%', '60%'],
|
363
|
- center:[(width1*index+width1/2),height1],
|
362
|
+ center:[(width1*index1+width1/2),height1],
|
364
|
// center:[30,60],
|
363
|
// center:[30,60],
|
365
|
silent: true,
|
364
|
silent: true,
|
366
|
clockwise: false,//圆环旋转方向,逆时针/顺时针
|
365
|
clockwise: false,//圆环旋转方向,逆时针/顺时针
|
|
@@ -468,9 +467,13 @@ export default { |
|
@@ -468,9 +467,13 @@ export default { |
468
|
}
|
467
|
}
|
469
|
.flex-div-content{
|
468
|
.flex-div-content{
|
470
|
display: flex;
|
469
|
display: flex;
|
471
|
- justify-content: space-between;
|
470
|
+ //justify-content: space-between;
|
|
|
471
|
+ justify-content: flex-start;
|
472
|
flex-wrap: wrap;
|
472
|
flex-wrap: wrap;
|
473
|
}
|
473
|
}
|
|
|
474
|
+.card-item{
|
|
|
475
|
+ margin-right:10px;
|
|
|
476
|
+}
|
474
|
.flex-div{
|
477
|
.flex-div{
|
475
|
display: flex;
|
478
|
display: flex;
|
476
|
flex-flow: column;
|
479
|
flex-flow: column;
|
|
@@ -495,6 +498,9 @@ export default { |
|
@@ -495,6 +498,9 @@ export default { |
495
|
height: 100%;
|
498
|
height: 100%;
|
496
|
top: 0;
|
499
|
top: 0;
|
497
|
}
|
500
|
}
|
|
|
501
|
+.chart-title{
|
|
|
502
|
+ flex:1;
|
|
|
503
|
+}
|
498
|
.percent-item{
|
504
|
.percent-item{
|
499
|
/*width:100%;
|
505
|
/*width:100%;
|
500
|
height:100%;
|
506
|
height:100%;
|