Authored by 鲁尚清

圆环百分比数值中心点样式调整,树结构的iframe跳转资源详情调整

@@ -525,7 +525,6 @@ export default { @@ -525,7 +525,6 @@ export default {
525 }); 525 });
526 }, 526 },
527 renderingFn(val) { 527 renderingFn(val) {
528 - console.log("*************",val)  
529 let xAxis=val.xAxis; 528 let xAxis=val.xAxis;
530 if(xAxis && xAxis.length>0){ 529 if(xAxis && xAxis.length>0){
531 this.options.xAxis.data =xAxis; 530 this.options.xAxis.data =xAxis;
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%;
@@ -88,6 +88,18 @@ export default { @@ -88,6 +88,18 @@ export default {
88 this.optionsCollapse = this.value.collapse; 88 this.optionsCollapse = this.value.collapse;
89 this.optionsSetup = this.value.setup; 89 this.optionsSetup = this.value.setup;
90 this.editorOptions(); 90 this.editorOptions();
  91 + window.addEventListener('message',function(e){
  92 + let param = {
  93 + type:e.data.type,
  94 + data:{
  95 + resId: e.data.data.resId,
  96 + resType: e.data.data.resType
  97 + }
  98 +
  99 + }
  100 + window.parent.postMessage(param, '*')
  101 +
  102 + })
91 }, 103 },
92 mounted() { 104 mounted() {
93 105