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

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

import * as echarts from "echarts";
// import { batteryPackInfo, batteryPackDynamicInfo } from "@/api/ibms-api";

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

      this.echartsInitLine.clear();
      this.echartsInitLine.setOption(
        $echartsOption.setMultipleLineEcharts(this.model)
      );
      this.$emit("loadEnd", false);
      setTimeout(() => {
        this.echartsInitLine.resize();
      }, 200);
    },
  },
};
</script>

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