<template>
  <div style="padding: 0.5%">
    <el-row :gutter="10">
      <el-col :span="24">
          <el-form :inline="true" :model="ruleForm" class="demo-form-inline" style='margin-left: 15px'>
              <el-form-item label="统计指标:">
                  <el-select
                      v-model="formData.tagType"
                      placeholder="请选择"
                  >
                      <el-option
                          v-for="item in options"
                          :key="item.id"
                          :label="item.name"
                          :value="item.id"
                      >
                      </el-option>
                  </el-select>
              </el-form-item>

              <el-form-item label="负荷类型:">
                  <el-select
                      v-model="value2"
                      multiple
                      collapse-tags
                      placeholder="请选择"
                  >
                      <el-option
                          v-for="item in options2"
                          :key="item.id"
                          :label="item.name"
                          :value="item.id"
                      >
                      </el-option>
                  </el-select>
              </el-form-item>

              <el-form-item label="统计类型:">
                  <el-select
                      v-model="formData.statisticType"
                      @click="changestatic"
                      placeholder="请选择"
                  >
                      <el-option
                          v-for="item in options1"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                      >
                      </el-option>
                  </el-select>
              </el-form-item>
          </el-form>
      </el-col>


      <el-col :span="24">
        <timepicker
          v-if="falg"
          @querfromdata="querfromdata"
          :interval="interval"
        ></timepicker>
      </el-col>

      <el-col :span="24">
        <div
          v-if="radio3 == '增量'"
          id="electri1"
          :style="
            'background:;width:100%;height:' + tableheight + 'px;'
          "
        ></div>
        <div
          v-if="radio3 == '累计'"
          id="electri2"
          :style="
            'background:;width:100%;height:' + tableheight + 'px;'
          "
        ></div>
      </el-col>
    </el-row>
    <!--指标策略-->
    <el-dialog
      :close-on-click-modal="false"
      title="指标策略"
      :visible.sync="dialogVisible"
      width="20%"
      :before-close="handleClose"
    >
      <span class="spantext">请勾选需要参与统计的指标:</span>
      <div class="border">
        <el-checkbox-group v-model="checkList" style="padding: 2%">
          <el-checkbox label="三相有功功率" class="check"></el-checkbox>
          <el-checkbox label="三相无功功率" class="check"></el-checkbox>
          <el-checkbox label="三相净有功电能" class="check"></el-checkbox>
          <el-checkbox label="电流总有效值" class="check"> </el-checkbox>
          <el-checkbox label="电压基波幅值" class="check"></el-checkbox>
          <el-checkbox label="电流基波幅值" class="check"></el-checkbox>
          <el-checkbox label="总有有功功率" class="check"></el-checkbox>
        </el-checkbox-group>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false"
          >保 存</el-button
        >
      </span>
    </el-dialog>
    <!--负荷策略-->
    <el-dialog
      :close-on-click-modal="false"
      title="电度策略"
      :visible.sync="dialogVisible2"
      width="30%"
      :before-close="handleClose"
    >
      <span class="spantext">负荷设备树:</span>
      <el-row class="border2">
        <el-col :span="10">
          <el-tree
            :data="treedata"
            :props="defaultProps"
            default-expand-all
            style="height: 30vh; overflow-y: auto"
            :highlight-current="true"
            @node-click="handleNodeClick"
          ></el-tree>
        </el-col>
        <el-col :span="14">
          <el-form
            ref="form"
            :model="form"
            label-width="80px"
            style="margin-top: 20%"
          >
            <el-form-item label="负荷名称">
              <el-input
                v-model="form.name"
                placeholder="请输入负荷名称"
                style="width: 86%"
              ></el-input>
            </el-form-item>
            <el-form-item label="负荷终端">
              <el-select v-model="form.region" placeholder="请选择负荷终端">
                <el-option label="2号楼217宿舍" value="shanghai"></el-option>
                <el-option label="号楼218宿舍" value="beijing"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item style="margin-left: 10%">
              <el-button type="primary">删除</el-button>
              <el-button type="primary">新增</el-button>
            </el-form-item>
          </el-form>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible2 = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible2 = false"
          >确 定</el-button
        >
      </span>
    </el-dialog>

    <el-dialog
      :close-on-click-modal="false"
      title="电度对比分析"
      :visible.sync="dialogVisibledd"
      width="70%"
      :before-close="handleClose"
    >
      <el-row :gutter="20">
        <el-col :span="12">
          <span style="font-size: 14px; font-weight: bold">统计时间:</span
          ><span style="color: green; font-weight: bold">{{ time }}</span>
          <span style="font-size: 14px; font-weight: bold; margin-left: 1%"
            >统计指标:</span
          ><span style="color: #0066cc; font-weight: bold">{{ title }}</span>
        </el-col>
        <el-col :span="24">
          <div
            id="fxdb"
            :style="
              'width:100%;height:' + (tableheight - 250) + 'px;'
            "
            ref="fxdb"
          ></div>
        </el-col>
      </el-row>
    </el-dialog>
  </div>
</template>
<script>
import ElInputGroup from "@/components/ElInputGroup/el-input-group.vue";
import { getappheight, getheight } from "../../../assets/commjs/common";
import api from "@/api/energy/sysconfig";
import timepicker from "../../components/TimePicker/index4";
import echarts from "echarts";
export default {
  components: {
    timepicker,
  },
  data() {
    return {
      falg: false,
      time: "",
      title: "",
      radio3: "增量",
      formData: {
        startTime: "",
        endTime: "",
        loadType: [],
        tagType: "",
        statisticType: 0,
      },
      dialogVisible: false,
      dialogVisible2: false,
      interval: 4,
      //统计指标
      //统计指标
      value: 0,
      options: [
        { value: 0, label: "三相有功功率" },
        { value: 1, label: "三相无功功率" },
      ],
      value1: 0,
      options1: [
        { value: 0, label: "电度" },
        { value: 1, label: "电费" },
      ],
      value2: [],
      options2: [
        { value: 0, label: "空调负荷" },
        { value: 1, label: "电费" },
        { value: 2, label: "厨房负荷" },
        { value: 3, label: "宿舍负荷" },
        { value: 4, label: "光伏发电" },
        { value: 5, label: "进线" },
        { value: 6, label: "总负荷" },
      ],
      tableData: [],
      checkList: [],
      device: 1,
      tableheight: undefined,
      treedata: [
        {
          id: 0,
          label: "空调负荷",
          children: [
            {
              id: 1,
              label: "1层1号监测点",
            },
            {
              id: 2,
              label: "1层2号监测点",
            },
          ],
        },
        {
          label: "办公负荷",
          id: 11,
          children: [
            {
              id: 12,
              label: "1号楼电梯",
            },
            {
              id: 13,
              label: "1号楼照明",
            },
          ],
        },
        {
          label: "厨房负荷",
          id: 3,
          children: [
            {
              id: 31,
              label: "厨房",
            },
            {
              id: 32,
              label: "保安室",
            },
          ],
        },
      ],
      defaultProps: {
        children: "children",
        label: "label",
      },
      form: {
        name: "",
        region: "",
      },
      name: "kWh",
      name1: "",
      xdata: [],
      fen: [],
      pin: [],
      gu: [],
      dialogVisibledd: false,
      timeValue: [],
    };
  },
  created() {
    this.getTarget();
    //this.getDetail()
  },
  mounted() {
    // this.tableheight = getheight();
    // this.device = window.devicePixelRatio;
    // if (this.device == 1) {
    //   this.tableheight = this.tableheight * 2.25;
    // }
    // if (this.device == 1.25) {
    //   this.tableheight = this.tableheight * 1.8;
    // }
    // if (this.device == 1.5) {
    //   this.tableheight = this.tableheight * 1.93;
    // }
    this.tableheight =  window.sessionStorage.getItem('appheight') - 120
    this.$nextTick(() => {
      this.electritypeEcharts1();
    });
  },
  methods: {
    //获取指标数据
    getTarget() {
      var p = {
        statisticalName: "电度统计",
      };
      api.getEleStatisticalTree(p).then((res) => {
        if (res.code == "A0000") {
          this.options = res.data.binds;
          this.formData.tagType = this.options[0].id;
        }
        this.getDetail();
      });
    },
    //获取负荷类型
    getDetail() {
      api.getEleLoadSetDetail().then((res) => {
        if (res.code == "A0000") {
          var data = res.data;
          var arr = [];
          var arrId = [];
          for (var i = 0; i < data.length; i++) {
            var p = {
              name: data[i].loadName,
              id: data[i].loadId,
            };
            arrId.push(data[i].loadId);
            arr.push(p);
          }
          this.value2 = arrId;
          this.options2 = arr;
        }
        this.falg = true;
      });
    },
    changestatic(val) {
      if (val == 0) {
        this.name1 = "kWh";
      } else {
        this.name1 = "元";
      }
    },
    //指标策略触发事件
    Indexstrategy() {
      this.dialogVisible = true;
    },
    //树节点触发事件
    handleNodeClick(data) {
      console.log(data);
    },
    //负荷策略触发事件
    loadtype() {
      this.dialogVisible2 = true;
    },
    //关闭事件
    handleClose() {
      this.dialogVisible = false;
      this.dialogVisible2 = false;
      this.dialogVisibledd = false;
    },
    //切换事件
    checkbox(val) {
      this.radio3 = val;
      if (val == "增量") {
        this.$nextTick(() => {
          this.electritypeEcharts1();
        });
      } else {
        this.$nextTick(() => {
          this.electritypeEcharts2();
        });
      }
    },
    //时间格式化
    dateFormat(dateData1, dateData2) {
      var timearr = [];
      var date = new Date(dateData1);
      var y = date.getFullYear();
      var m = date.getMonth() + 1;
      m = m < 10 ? "0" + m : m;
      var d = date.getDate();
      d = d < 10 ? "0" + d : d;
      var h = date.getHours();
      h = h < 10 ? "0" + h : h;
      var f = date.getMinutes();
      f = f < 10 ? "0" + f : f;
      var s = date.getSeconds();
      s = s < 10 ? "0" + s : s;
      this.formData.searchBeginTime = y + "-" + m + "-" + d;
      timearr.push(this.formData.startTime);
      var date = new Date(dateData2);
      var y = date.getFullYear();
      var m = date.getMonth() + 1;
      m = m < 10 ? "0" + m : m;
      var d = date.getDate();
      d = d < 10 ? "0" + d : d;
      var h = date.getHours();
      h = h < 10 ? "0" + h : h;
      var f = date.getMinutes();
      f = f < 10 ? "0" + f : f;
      var s = date.getSeconds();
      s = s < 10 ? "0" + s : s;
      this.formData.searchEndTime = y + "-" + m + "-" + d;
      timearr.push(this.formData.endTime);
      return timearr;
    },
    querfromdata(data, timehbValue, interval) {
      this.interval = interval;
      // alert(3)
      this.timeValue = data;
      console.log("日期" + this.timeValue);
      this.timehuanbiValue = timehbValue;
      console.log("环比" + this.timehuanbiValue);
      this.periodBeginTime = this.timehuanbiValue[0];
      this.periodEndTime = this.timehuanbiValue[1];
      console.log("开始" + this.periodBeginTime);
      console.log("结束" + this.periodEndTime);
      this.ping = this.periodBeginTime + "至" + this.periodEndTime;
      this.dateFormat(this.timeValue[0], this.timeValue[1]);

      for (var i = 0; i < this.options.length; i++) {
        if (this.formData.tagType == this.options[i].id) {
          this.name1 = this.options[i].name;
        }
      }
      var data = {
        startTime: this.timeValue[0],
        endTime: this.timeValue[1],
        // startTimeBi:this.periodBeginTime,
        // endTimeBi:this.periodEndTime,
        tagType: this.formData.tagType,
        loadType: this.value2,
        statisticType: this.formData.statisticType,
      };
      api.getElectCompare(data).then((res) => {
        if (res.code == "A0000") {
          var data = res.data;
          var xdata = [];
          var fen = [];
          var gu = [];
          var pin = [];
          for (var i = 0; i < res.data.length; i++) {
            xdata.push(res.data[i].loadName);
            if (res.data[i].loadName == "高压进线") {
              fen.push(res.data[i].feng.toFixed(3));
              gu.push(res.data[i].gu.toFixed(3));
              pin.push(res.data[i].ping.toFixed(3));
            } else if (res.data[i].loadName == "光伏发电") {
              fen.push(res.data[i].feng.toFixed(3));
              gu.push(res.data[i].gu.toFixed(3));
              pin.push(res.data[i].ping.toFixed(3));
            } else if (res.data[i].loadName == "空调负荷") {
              fen.push(res.data[i].feng.toFixed(3));
              gu.push(res.data[i].gu.toFixed(3));
              pin.push(res.data[i].ping.toFixed(3));
            } else if (res.data[i].loadName == "办公负荷") {
              fen.push(res.data[i].feng.toFixed(3));
              gu.push(res.data[i].gu.toFixed(3));
              pin.push(res.data[i].ping.toFixed(3));
            } else if (res.data[i].loadName == "厨房负荷") {
              fen.push(res.data[i].feng.toFixed(3));
              gu.push(res.data[i].gu.toFixed(3));
              pin.push(res.data[i].ping.toFixed(3));
            } else if (res.data[i].loadName == "宿舍负荷") {
              fen.push(res.data[i].feng);
              gu.push(res.data[i].gu);
              pin.push(res.data[i].ping);
            } else if (res.data[i].loadName == "总负荷") {
              fen.push(res.data[i].feng);
              gu.push(res.data[i].gu);
              pin.push(res.data[i].ping);
            }
          }
          this.xdata = xdata;
          this.fen = fen;
          this.gu = gu;
          this.pin = pin;
          if (this.formData.statisticType == 0) {
            this.name = "kWh";
          } else {
            this.name = "元";
          }

          this.electritypeEcharts1();
        }
      });
      // if(d !==''){
      //  this.text='同比'
      //  this.subtext='空调负荷'
      //  this.xdata=['最大值','最小值','平均值']
      //  this.ydata1=[89,35,45],
      //  this.ydata2=[97.89,56.78,35,6]
      //  this.loadtypeEcharts()
      // }
    },

    electritypeEcharts1() {
      let echarts = require("echarts");
      var myChart1 = echarts.init(document.getElementById("electri1"));
      //  var xData=['2021-01-01', '2021-01-02', '2021-01-03', '2021-01-04', '2021-01-05', '2021-01-06', '2021-01-07', '2021-01-08', '2021-01-09', '2021-01-10', '2021-01-11', '2021-01-12', '2021-02-01', '2021-02-02', '2021-02-03', '2021-02-04']
      // var yData=[50, 75, 84, 65, 90, 56, 68,89, 67, 95, 69, 96,75, 58, 85, 65]
      var option = {
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "cross",
            crossStyle: {
              color: "#999",
            },
          },
          formatter: function (params) {
            var tips = "";
            tips +=
              '<span style="font-weight:bold;color:#0099CC">' +
              params[0].name +
              "</span></br/>";
            for (var i = 0; i < params.length; i++) {
              tips += params[i].seriesName + ":" + params[i].value + "<br/>";
              //  }else{
              //     tips += params[i].seriesName + ":" + params[i].value +"元<br/>";
              //  }

              // }
            }
            return tips;
          },
        },
        grid: {
          left: "2%",
          right: "4%",
          bottom: "6%",
          top: "10%",
          containLabel: true,
        },
        toolbox: {
          feature: {
            //dataView: { show: true, readOnly: false },
            //magicType: { show: true, type: ['line', 'bar'] },
            //restore: { show: true },
            saveAsImage: { show: true },
          },
        },
        legend: {
          data: ["峰", "平", "谷"],
        },
        xAxis: [
          {
            type: "category",
            data: this.xdata,
            axisPointer: {
              type: "shadow",
            },
          },
        ],
        yAxis: [
          {
            type: "value",
            name: this.name1,
            // min: 0,
            //max: 200,
            //interval: 50,
            axisLabel: {
              formatter: "{value}" + this.name,
            },
          },
        ],
        series: [
          {
            name: "峰",
            type: "bar",
            stack: "总量",
            barMaxWidth: 45,
            // tooltip: {
            //   valueFormatter: function (value) {
            //     return value + 'kW/h';
            //   }
            // },
            data: this.fen,
            itemStyle: {
              normal: {
                color: "#FF6633",
              },
            },
          },
          {
            name: "平",
            stack: "总量",
            type: "bar",
            barMaxWidth: 45,
            // tooltip: {
            //   valueFormatter: function (value) {
            //     return value + 'kW/h';
            //   }
            // },
            data: this.pin,
            itemStyle: {
              normal: {
                color: "#0099CC",
              },
            },
          },
          {
            name: "谷",
            type: "bar",
            stack: "总量",
            barMaxWidth: 45,
            // tooltip: {
            //   valueFormatter: function (value) {
            //     return value + 'kW/h';
            //   }
            // },
            data: this.gu,
            itemStyle: {
              normal: {
                color: "#00CC33",
              },
            },
          },
        ],
      };
      myChart1.clear();
      
      option && myChart1.setOption(option, true)
window.echartsArr.push(myChart1);

      const _this = this;
      myChart1.on("click", function (params) {
        console.log(params);
        for (var i = 0; i < _this.options.length; i++) {
          if (_this.formData.tagType == _this.options[i].id) {
            _this.title = _this.options[i].name;
          }
        }
        _this.time = _this.timeValue[0] + "至" + _this.timeValue[1];
        var data = {
          endTime: _this.timeValue[1],
          startTime: _this.timeValue[0],
          statisticType: _this.formData.statisticType,
          tagType: _this.formData.tagType,
        };
        api.getElectRate(data).then((res) => {
          if (res.code == "A0000") {
            var fhdata = [];
            var fhvalue = [];
            for (var i = 0; i < res.data.length; i++) {
              fhdata.push(res.data[i].name);
              fhvalue.push((res.data[i].value * 100).toFixed(2));
            }
            _this.fhdata = fhdata;
            _this.fhvalue = fhvalue;
            console.log(_this.fhdata);
          }
          _this.dialogVisibledd = true;
          _this.$nextTick(() => {
            _this.loadProportion();
          });
        });
        _this.dialogVisibledd = true;
      });
    },
    electritypeEcharts2() {
      let echarts = require("echarts");
      var myChart = echarts.init(document.getElementById("electri2"));
      var xData = [
        "2021-01-01",
        "2021-01-02",
        "2021-01-03",
        "2021-01-04",
        "2021-01-05",
        "2021-01-06",
        "2021-01-07",
        "2021-01-08",
        "2021-01-09",
        "2021-01-10",
        "2021-01-11",
        "2021-01-12",
        "2021-02-01",
        "2021-02-02",
        "2021-02-03",
        "2021-02-04",
      ];
      var yData = [
        50, 75, 84, 65, 90, 56, 68, 89, 67, 95, 69, 96, 75, 58, 85, 65,
      ];
      var option = {
        title: {
          text: "",
        },
        tooltip: {
          trigger: "axis",
        },
        grid: {
          left: "2%",
          right: "4%",
          bottom: "6%",
          top: "10%",
          containLabel: true,
        },
        legend: {},
        toolbox: {
          show: true,
          feature: {
            dataZoom: {
              yAxisIndex: "none",
            },
            dataView: { readOnly: false },
            magicType: { type: ["line", "bar"] },
            //restore: {},
            saveAsImage: {},
          },
        },
        xAxis: {
          type: "category",
          boundaryGap: false,
          data: [
            "2022-03-11 11:15",
            "11:30",
            "11:45",
            "12:00",
            "12:15",
            "12:30",
            "12:45",
          ],
        },
        yAxis: {
          type: "value",
          axisLabel: {
            formatter: "{value} kW-h",
          },
        },
        series: [
          {
            name: "空调负荷",
            type: "line",
            data: [30, 61, 94, 125, 157, 189, 228],
            markPoint: {
              data: [
                { type: "max", name: "Max" },
                { type: "min", name: "Min" },
              ],
            },
          },
          {
            name: "办公负荷",
            type: "line",
            data: [16, 27, 40, 51, 63, 75, 84],
            markPoint: {
              data: [
                { type: "max", name: "Max" },
                { type: "min", name: "Min" },
              ],
            },
          },
          {
            name: "厨房负荷",
            type: "line",
            data: [6, 14, 21, 30, 38, 48, 57],
            markPoint: {
              data: [
                { type: "max", name: "Max" },
                { type: "min", name: "Min" },
              ],
            },
          },
          {
            name: "宿舍负荷",
            type: "line",
            data: [3, 5, 9, 15, 18, 21, 24],
            markPoint: {
              data: [
                { type: "max", name: "Max" },
                { type: "min", name: "Min" },
              ],
            },
          },
          {
            name: "光伏发电",
            type: "line",
            data: [43, 85, 129, 175, 218, 261, 304],
            markPoint: {
              data: [
                { type: "max", name: "Max" },
                { type: "min", name: "Min" },
              ],
            },
          },
          {
            name: "进线",
            type: "line",
            data: [63, 125, 189, 255, 318, 381, 444],
            markPoint: {
              data: [
                { type: "max", name: "Max" },
                { type: "min", name: "Min" },
              ],
            },
          },
        ],
      };
      var app = {
        currentIndex: -1,
      };
      setInterval(function () {
        var dataLen = option.series[0].data.length;

        // 取消之前高亮的图形
        myChart.dispatchAction({
          type: "downplay",
          seriesIndex: 0,
          dataIndex: app.currentIndex,
        });
        app.currentIndex = (app.currentIndex + 1) % dataLen;
        //console.log(app.currentIndex);
        // 高亮当前图形
        myChart.dispatchAction({
          type: "highlight",
          seriesIndex: 0,
          dataIndex: app.currentIndex,
        });
        // 显示 tooltip
        myChart.dispatchAction({
          type: "showTip",
          seriesIndex: 0,
          dataIndex: app.currentIndex,
        });
      }, 1000);
      myChart.clear();
      myChart.setOption(option)
window.echartsArr.push(myChart);
    },
    //负荷占比分析
    loadProportion() {
      let echarts = require("echarts");
      var myChart = echarts.init(document.getElementById("fxdb"));
      var option = {
        //backgroundColor:"#000a3f",
        tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "shadow",
          },
          backgroundColor: "rgba(9, 24, 48, 0.5)",
          borderColor: "rgba(75, 253, 238, 0.4)",
          textStyle: {
            color: "#CFE3FC",
          },
          borderWidth: 1,
        },
        grid: {
          top: "15%",
          right: "5%",
          left: "5%",
          bottom: "22%",
        },
        toolbox: {
          show: true,
          feature: {
            dataZoom: {
              yAxisIndex: "none",
            },
            dataView: { readOnly: false },
            // magicType: { type: ['line', 'bar'] },
            restore: {
              show: true,
            },
            saveAsImage: {},
          },
        },
        xAxis: [
          {
            name: "",
            type: "category",
            data: this.fhdata,
            axisLine: {
              lineStyle: {
                show: true,
                color: "#000",
              },
            },
            axisLabel: {
              margin: 10,
              color: "#000",
              textStyle: {
                show: true,
                fontSize: 12,
              },
            },
            axisTick: {
              show: false,
            },
          },
        ],
        yAxis: [
          {
            name: "电度占比",
            min: 0,
            max: 100,
            axisLabel: {
              show: true,
              formatter: "{value}%",
              color: "blue",
            },
            axisTick: {
              show: false,
            },
            axisLine: {
              show: true,
              lineStyle: {
                color: "blue",
              },
            },
            splitLine: {
              lineStyle: {
                color: "#ccc",
              },
            },
          },
        ],
        series: [
          {
            type: "bar",
            data: this.fhvalue,
            barWidth: 45,
            itemStyle: {
              normal: {
                color: new echarts.graphic.LinearGradient(
                  0,
                  0,
                  0,
                  1,
                  [
                    {
                      offset: 0,
                      color: "#FF9900", // 0% 处的颜色
                    },
                    {
                      offset: 1,
                      color: "#FF9900", // 100% 处的颜色
                    },
                  ],
                  false
                ),
                shadowColor: "#FF9900",
                shadowBlur: 0,
              },
            },
            label: {
              normal: {
                show: true,
                lineHeight: 10,
                formatter: "{c}",
                position: "top",
                textStyle: {
                  color: "#000",
                  fontSize: 12,
                },
              },
            },
          },
        ],
      };
      myChart.clear();
      option && myChart.setOption(option, true)
window.echartsArr.push(myChart);
      
    },
  },
};
</script>
<style lang='scss' scoped>
.spantext {
  font-size: 14px;
  font-weight: bold;
}
.border {
  border: 1px solid rgb(15, 15, 15);
  height: 30vh;
  width: 100%;
  margin: 0 auto;
}
.check {
  margin-top: 2%;
  margin-left: 25%;
}
.border2 {
  border: 1px solid rgb(15, 15, 15);
}
::v-deep .el-tree {
  color: rgb(1, 15, 27);
  font-weight: bold;
  // background: rgba(87, 122, 133, 0.39);
}
</style>