Commit d1c4e592df7effe1c2939ef33afae0dbe55d1f58

Authored by fengwotao
1 parent d064d0c3

pref:修改首页饼图为圆环图

@@ -358,6 +358,7 @@ @@ -358,6 +358,7 @@
358 } 358 }
359 359
360 .chart-top-status { 360 .chart-top-status {
  361 + width: 100%;
361 height: 300px; 362 height: 300px;
362 align-items: center; 363 align-items: center;
363 margin-top: -40px; 364 margin-top: -40px;
1 <template> 1 <template>
2 - <div v-for="(item, index) in seriesStatusData" :key="index">  
3 - <div :id="`chartPie${item.key}`" style="width: 150px; height: 200px"></div>  
4 - </div> 2 + <a-row :gutter="16" align="middle">
  3 + <a-col v-for="(item, index) in seriesStatusData" :key="index" :span="8">
  4 + <div :id="`chartPie${item.key}`" style="width: 150px; height: 200px"></div>
  5 + </a-col>
  6 + </a-row>
5 </template> 7 </template>
6 <script lang="ts"> 8 <script lang="ts">
7 import { defineComponent, PropType, onMounted, toRefs } from 'vue'; 9 import { defineComponent, PropType, onMounted, toRefs } from 'vue';
@@ -21,6 +23,7 @@ @@ -21,6 +23,7 @@
21 const total = seriesStatusData.value 23 const total = seriesStatusData.value
22 .map((m) => m.value) 24 .map((m) => m.value)
23 .reduce((prev, cur) => prev! + cur!, 0); 25 .reduce((prev, cur) => prev! + cur!, 0);
  26 +
24 onMounted(() => { 27 onMounted(() => {
25 seriesStatusData.value.forEach((item) => { 28 seriesStatusData.value.forEach((item) => {
26 initEchart(item.key, item, item.value); 29 initEchart(item.key, item, item.value);