<template>
  <div class="echarts-div-alls fl" :id="model.id"></div>
</template>

<script>
// 该文件作为全项目模板文件，处理name:"xxxxx"为目标文件名

import * as echarts from "echarts";

import $echartsOption from "../options/optionsEcharts.js";
export default {
  name: "pieEcharts",
  props: {
    model: {},
  },
  data() {
    return {
      echartsInitLine: null,
    };
  },
  created() {},
  mounted() {},
  methods: {
    operaEchartsInit() {
      this.echartsInitLine = echarts.init(
        document.getElementById(this.model.id)
      );

      this.echartsInitLine.clear();
      this.echartsInitLine.setOption(
        $echartsOption.setPieEcharts(this.model)
      );
      setTimeout(() => {
        this.echartsInitLine.resize();
      }, 2000);
    },
    operaClickgEet() {
      this.model.headInfo.btn.func();
    },
  },
};
</script>

<style>
.echarts-div-alls {
  width: 100%;
  height: 100%;
  /* border: 1px solid; */
}
</style>
