spring
2 天以前 13b020a2a57f2bff06a10abf47ceb2fdc70ccbc0
src/views/reportAnalysis/dataDashboard/components/basic/left-top.vue
@@ -2,7 +2,8 @@
  <div>
    <PanelHeader title="产品大类" />
    <div class="panel-item-customers">
      <div style="height: 70%">
      <div class="pie-chart-wrapper">
        <div class="pie-background"></div>
        <Echarts
          ref="chart"
          :chartStyle="chartStyle"
@@ -10,7 +11,7 @@
          :series="landSeries"
          :tooltip="landTooltip"
          :color="landColors"
          :options="{ backgroundColor: 'transparent', textStyle: { color: '#B8C8E0' } }"
          :options="pieOptions"
          style="height: 100%"
          class="land-chart"
        />
@@ -116,7 +117,7 @@
        if (!children.length) return `${dot}{parent|${parentName} ${parentValue}}`
        // 小圆点 + 父级 name + 父级 value,换行展示 children 的 name + value
        return [
          `${dot}{parent|${parentName} ${parentValue}}`,
          `${dot}{parent|${parentName}}`,
          ...children.map((c) => `{child|${c.name}}`),
        ].join('\n')
      },
@@ -157,7 +158,12 @@
const chartStyle = {
  width: '100%',
  height: '150%',
  height: '126%',
}
const pieOptions = {
  backgroundColor: 'transparent',
  textStyle: { color: '#B8C8E0' },
}
const loadData = async () => {
@@ -192,4 +198,26 @@
  width: 100%;
  height: 420px;
}
.pie-chart-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  background: transparent;
}
.pie-background {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-51.5%, -39%);
  width: 360px;
  height: 360px;
  background-image: url('@/assets/BI/玫瑰图边框.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  pointer-events: none;
}
</style>