<template>
  <div>
    <el-row>
      <el-form :inline="true" :model="formInline" class="demo-form-inline">
        <el-form-item>
          <el-checkbox v-model="checked" @change="manyline" class="zt"
            >多监测点</el-checkbox
          >
        </el-form-item>
        <el-form-item label="指标:">
          <el-select
            v-if="pttype == 0"
            ref="fx"
            v-model="condition"
            multiple
            collapse-tags
            :multiple-limit="limit"
            placeholder="请选择"
            style="width: 200px"
          >
            <el-option-group
              v-for="group in options"
              :key="group.label"
              :label="group.label"
            >
              <el-option
                v-for="item in group.options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-option-group>
          </el-select>
          <el-select
            v-if="pttype == 1"
            v-model="condition"
            multiple
            collapse-tags
            :multiple-limit="limit"
            placeholder="请选择"
            style="width: 200px"
          >
            <el-option-group
              v-for="group in options2"
              :key="group.label"
              :label="group.label"
            >
              <el-option
                v-for="item in group.options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-option-group>
          </el-select>
        </el-form-item>
        <el-form-item label="类型:">
          <el-select
            v-model="formData.valueType"
            placeholder="请选择类型"
            style="width: 100px"
          >
            <el-option
              v-for="item in typeoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="谐波:">
          <el-select
            :disabled="xb"
            v-model="formData.harmonic"
            placeholder="请选择谐波"
            style="width: 80px"
          >
            <el-option
              v-for="item in harmonicoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item :disabled="jxb" label="间谐波:">
          <el-select
            :disabled="jxb"
            v-model="formData.inHarmonic"
            placeholder="请选择谐波"
            style="width: 85px"
          >
            <el-option
              v-for="item in inharmonicoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </el-row>
    <!-- <el-row type="flex" justify="end"> -->
    <el-col
      :span="12"
      style="
        right: 10px;
        position: absolute;
        z-index: 9999;
        margin-top: -43px;
        margin-right: -45px;
      "
    >
      <timeindex
        :id="id"
        @resscreen="resscreen"
        @querfromdata="querfromdata"
        :query="query"
        :interval="interval"
        :treenode="treenode"
        :tablename="tablename"
        :dataTree="dataTree"
      ></timeindex>
    </el-col>
    <!-- </el-row> -->
    <el-row
      ref="tubiao"
      id="tubiao"
      :gutter="10"
      :style="'overflow:scroll;height:calc(100vh - 185px);cursor:pointer;scrollbar-arrow-color:#302D30;'"
    >
      <!-- <trendanalysisEcharts :qsdata="qsdata"></trendanalysisEcharts> -->
      <!-- <el-col :span="24" v-for="(item, index) in list" :key="index">
          <div
            ref="kk"
            v-loading="loading"
            :id="item.id"
            :style="
              'width:100%;background-color:#fff;height:calc((100vh + 185px)/3);zoom:'+device
            "
          ></div>
        </el-col> -->
      <el-col
        :span="24"
        v-for="(item, index) in list"
        :key="index"
        style="margin-top: 10px"
      >
        <div
          ref="kk"
          v-loading="loading"
          :id="item.id"
          style="width:calc((100vw - 350px);background:#fff;height:calc((100vh + 185px)/3);"
        ></div>
      </el-col>
    </el-row>
  </div>
</template>
<script>
import {
  gettwoechartsheight,
  getechartsheight,
} from "../../assets/commjs/common";
import { A, B, C, AB, BC, CA } from "../../assets/commjs/color";
import api from "@/api/harmonic/onlineData";
import timeindex from "../components/TimePicker/timeindex";
import TreeSelect from "@riophae/vue-treeselect";
import selecttree from "../components/elselect/selecttree";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
// import qsdata from '@/views/components/data'
import echarts from "echarts";
import $ from "jquery";
export default {
  name: "wtqsfx",
  components: {
    timeindex,
    TreeSelect,
    selecttree,
  },
  watch: {
    id: function (a, b) {
      //a是id的新值，b是旧值
    },
    checked: function (a, b) {
      if (!a) {
        this.panindexOptions.forEach((m) => {
          m.children.forEach((n) => {
            n.disabled = false;
          });
        });
      }
    },
    condition: function (a, b) {
      if (a.length == 0) {
        this.$message({
          message: "最少选择一个指标",
          type: "warning",
        });
        this.xb = true;
        this.jxb = true;
        // this.condition = ['10']
        this.query = true;
      } else {
        this.query = false;
        for (var i = 0; i < a.length; i++) {
          if (a.length == 0) {
            this.xb = false;
            this.jxb = false;
          } else {
            if (
              a[i] == "40" ||
              a[i] == "41" ||
              a[i] == "42" ||
              a[i] == "43" ||
              a[i] == "44" ||
              a[i] == "45"
            ) {
              this.xb = false;
              this.jxb = true;
            } else if (
              a[i] == "46" ||
              a[i] == "47" ||
              a[i] == "48" ||
              a[i] == "49"
            ) {
              this.jxb = false;
              this.xb = true;
            } else if (a[i] == "60" || a[i] == "61" || a[i] == "62") {
              this.typeoptions = this.typeoptions2;
            } else if (
              a[i] !== "40" ||
              a[i] !== "41" ||
              a[i] !== "42" ||
              a[i] !== "43" ||
              a[i] !== "44" ||
              a[i] !== "45"
            ) {
              this.xb = true;
              this.jxb = false;
            } else if (
              a[i] !== "46" ||
              a[i] !== "47" ||
              a[i] !== "48" ||
              a[i] !== "49"
            ) {
              this.jxb = true;
              this.xb = false;
            } else {
              this.xb = true;
              this.jxb = true;
              this.typeoptions = this.typeoptions1;
            }
          }
        }
      }
    },
  },
  data() {
    return {
      formInline: {},
      pttype: 0,
      loading: false,
      tablename: "tab3",
      options2: [
        {
          label: "电压趋势",
          options: [
            {
              value: "11",
              label: "线电压有效值",
            },
            {
              value: "12",
              label: "电压偏差",
            },
            {
              value: "15",
              label: "电压总谐波畸变率",
            },
          ],
        },
        {
          label: "电流趋势",
          options: [
            {
              value: "20",
              label: "电流有效值",
            },
            {
              value: "21",
              label: "电流总谐波畸变率",
            },
            {
              value: "22",
              label: "负序电电流",
            },
          ],
        },
        {
          label: "频率趋势",
          options: [
            {
              value: "30",
              label: "频率",
            },
          ],
        },
        {
          label: "谐波趋势",
          options: [
            {
              value: "40",
              label: "谐波电压含有率",
            },
            // {
            //   value: '41',
            //   label: '谐波电流含有率',
            // },{
            //   value: '42',
            //   label: '谐波电压幅值',
            // },
            {
              value: "43",
              label: "谐波电流幅值",
            },
            {
              value: "44",
              label: "谐波电压相角",
            },
            {
              value: "45",
              label: "谐波电流相角",
            },
            {
              value: "46",
              label: "间谐波电压含有率",
            },
            {
              value: "47",
              label: "间谐波电流含有率",
            },
            {
              value: "48",
              label: "间谐波电压幅值",
            },
            {
              value: "49",
              label: "间谐波电流幅值",
            },
          ],
        },
        {
          label: "功率趋势",
          options: [
            {
              value: "56",
              label: "三相总有功功率",
            },
            {
              value: "57",
              label: "三相总无功功率",
            },
            {
              value: "58",
              label: "三相总视在功率",
            },
            {
              value: "592",
              label: "总视在功率因数",
            },
            {
              value: "593",
              label: "总位移功率因数",
            },
          ],
        },
        {
          label: "闪变趋势",
          options: [
            {
              value: "60",
              label: "短时电压闪变",
            },
            {
              value: "61",
              label: "长时电压闪变",
            },
            {
              value: "62",
              label: "电压波动",
            },
          ],
        },
      ],
      condition: ["10", "11", "12"],
      formData: {
        condition: ["10", "11", "12"],
        harmonic: 2,
        inHarmonic: 1,
        lineId: [],
        ptType: 0,
        searchBeginTime: "",
        searchEndTime: "",
        valueType: 1,
      },
      interval: 4,
      device: 1,
      limit: 3,

      rowheight: undefined,
      options: [
        {
          label: "电压趋势",
          options: [
            {
              value: "10",
              label: "相电压有效值",
            },
            {
              value: "11",
              label: "线电压有效值",
            },
            {
              value: "12",
              label: "电压偏差",
            },
            {
              value: "13",
              label: "三相电压不平衡",
            },
            {
              value: "14",
              label: "电压不平衡",
            },
            {
              value: "15",
              label: "电压总谐波畸变率",
            },
          ],
        },
        {
          label: "电流趋势",
          options: [
            {
              value: "20",
              label: "电流有效值",
            },
            {
              value: "21",
              label: "电流总谐波畸变率",
            },
            {
              value: "22",
              label: "负序电电流",
            },
          ],
        },
        {
          label: "频率趋势",
          options: [
            {
              value: "30",
              label: "频率",
            },
          ],
        },
        {
          label: "谐波趋势",
          options: [
            {
              value: "40",
              label: "谐波电压含有率",
            },
            {
              value: "43",
              label: "谐波电流幅值",
            },
            {
              value: "44",
              label: "谐波电压相角",
            },
            {
              value: "45",
              label: "谐波电流相角",
            },
            {
              value: "46",
              label: "间谐波电压含有率",
            },
            {
              value: "47",
              label: "间谐波电流含有率",
            },
            {
              value: "48",
              label: "间谐波电压幅值",
            },
            {
              value: "49",
              label: "间谐波电流幅值",
            },
          ],
        },
        {
          label: "功率趋势",
          options: [
            {
              value: "50",
              label: "谐波有功功率",
            },
            {
              value: "51",
              label: "谐波无功功率",
            },
            {
              value: "52",
              label: "谐波视在功率",
            },
            {
              value: "53",
              label: "三相有功功率",
            },
            {
              value: "54",
              label: "三相无功功率",
            },
            {
              value: "55",
              label: "三相视在功率",
            },
            {
              value: "56",
              label: "三相总有功功率",
            },
            {
              value: "57",
              label: "三相总无功功率",
            },
            {
              value: "58",
              label: "三相总视在功率",
            },
            {
              value: "59",
              label: "视在功率因数",
            },
            {
              value: "591",
              label: "位移功率因数",
            },
            {
              value: "592",
              label: "总视在功率因数",
            },
            {
              value: "593",
              label: "总位移功率因数",
            },
          ],
        },
        {
          label: "闪变趋势",
          options: [
            {
              value: "60",
              label: "短时电压闪变",
            },
            {
              value: "61",
              label: "长时电压闪变",
            },
            {
              value: "62",
              label: "电压波动",
            },
          ],
        },
      ],
      harmonicdisabled: false,
      i: 1,
      dialogVisible: false,
      typeoptions: [],
      typeoptions1: [
        { label: "平均值", value: 1 },
        { label: "最小值", value: 2 },
        { label: "最大值", value: 3 },
        { label: "cp95值", value: 4 },
      ],
      typeoptions2: [{ label: "平均值", value: 1 }],
      zbName: ["相电压有效值", "线电压有效值", "电压偏差"],
      zbId: "1",
      checked: false,
      checkbox: true,
      idArr: ["10", "11", "12"],
      defaultProps: {
        children: "children",
        label: "label",
      },
      name: "deptName",
      code: "deptCode",
      childrenName: "children",
      echartsheight: undefined,
      echartswidth: undefined,
      id: 1,
      panindexOptions: [
        {
          id: "1",
          label: "电压趋势",
          children: [],
        },
        {
          id: "2",
          label: "电流趋势",
          children: [],
        },
        {
          id: "3",
          label: "频率趋势",
          children: [],
        },
        {
          id: "4",
          label: "谐波趋势",
          children: [],
        },
        {
          id: "5",
          label: "功率趋势",
          children: [],
        },
        {
          id: "6",
          label: "闪变趋势",
          children: [],
        },
      ],
      panindexOptions1: [
        {
          id: "1",
          label: "电压趋势",
          children: [
            {
              id: "11",
              label: "线电压有效值",
            },
            {
              id: "12",
              label: "电压偏差",
            },
            {
              id: "15",
              label: "电压总谐波畸变率",
            },
          ],
        },
        {
          id: "2",
          label: "电流趋势",
          children: [
            {
              id: "20",
              label: "电流有效值",
            },
            {
              id: "21",
              label: "电流总谐波畸变率",
            },
            {
              id: "22",
              label: "负序电电流",
            },
          ],
        },
        {
          id: "3",
          label: "频率趋势",
          children: [
            {
              id: "30",
              label: "频率",
            },
          ],
        },
        {
          id: "4",
          label: "谐波趋势",
          children: [
            {
              id: "40",
              label: "谐波电压含有率",
            },
            {
              id: "41",
              label: "谐波电流含有率",
            },
            {
              id: "42",
              label: "谐波电压幅值",
            },
            {
              id: "43",
              label: "谐波电流幅值",
            },
            {
              id: "44",
              label: "谐波电压相角",
            },
            {
              id: "45",
              label: "谐波电流相角",
            },
            {
              id: "46",
              label: "间谐波电压含有率",
            },
            {
              id: "47",
              label: "间谐波电流含有率",
            },
            {
              id: "48",
              label: "简谐波电压幅值",
            },
            {
              id: "49",
              label: "简谐波电流幅值",
            },
          ],
        },
        {
          id: "5",
          label: "功率趋势",
          children: [
            {
              id: "55",
              label: "三相视在功率",
            },
            {
              id: "56",
              label: "三相总有功功率",
            },
            {
              id: "57",
              label: "三相总无功功率",
            },
            {
              id: "58",
              label: "三相总视在功率",
            },
            {
              id: "59",
              label: "视在功率因数",
            },
            {
              id: "591",
              label: "位移功率因数",
            },
            {
              id: "592",
              label: "总视在功率因数",
            },
          ],
        },
        {
          id: "6",
          label: "闪变趋势",
          children: [
            {
              id: "60",
              label: "短时电压闪变",
            },
            {
              id: "61",
              label: "长时电压闪变",
            },
          ],
        },
      ],
      checkedMenuIds: [],
      harmonic: 1,
      harmonicoptions: [
        { label: "基波", value: 1 },
        { label: "2次", value: 2 },
        { label: "3次", value: 3 },
        { label: "4次", value: 4 },
        { label: "5次", value: 5 },
        { label: "6次", value: 6 },
        { label: "7次", value: 7 },
        { label: "8次", value: 8 },
        { label: "9次", value: 9 },
        { label: "10次", value: 10 },
        { label: "11次", value: 11 },
        { label: "12次", value: 12 },
        { label: "13次", value: 13 },
        { label: "14次", value: 14 },
        { label: "15次", value: 15 },
        { label: "16次", value: 16 },
        { label: "17次", value: 17 },
        { label: "18次", value: 18 },
        { label: "19次", value: 19 },
        { label: "20次", value: 20 },
        { label: "21次", value: 21 },
        { label: "22次", value: 22 },
        { label: "23次", value: 23 },
        { label: "24次", value: 24 },
        { label: "25次", value: 25 },
        { label: "26次", value: 26 },
        { label: "27次", value: 27 },
        { label: "28次", value: 28 },
        { label: "29次", value: 29 },
        { label: "30次", value: 30 },
        { label: "31次", value: 31 },
        { label: "32次", value: 32 },
        { label: "33次", value: 33 },
        { label: "34次", value: 34 },
        { label: "35次", value: 35 },
        { label: "36次", value: 36 },
        { label: "37次", value: 37 },
        { label: "38次", value: 38 },
        { label: "39次", value: 39 },
        { label: "40次", value: 40 },
        { label: "41次", value: 41 },
        { label: "42次", value: 42 },
        { label: "43次", value: 43 },
        { label: "44次", value: 44 },
        { label: "45次", value: 45 },
        { label: "46次", value: 46 },
        { label: "47次", value: 47 },
        { label: "48次", value: 48 },
        { label: "49次", value: 49 },
        { label: "50次", value: 50 },
      ],
      inharmonic: 1,
      inharmonicoptions: [
        { label: "0.5次", value: 1 },
        { label: "1.5次", value: 2 },
        { label: "2.5次", value: 3 },
        { label: "3.5次", value: 4 },
        { label: "4.5次", value: 5 },
        { label: "5.5次", value: 6 },
        { label: "6.5次", value: 7 },
        { label: "7.5次", value: 8 },
        { label: "8.5次", value: 9 },
        { label: "9.5次", value: 10 },
        { label: "10.5次", value: 11 },
        { label: "11.5次", value: 12 },
        { label: "12.5次", value: 13 },
        { label: "13.5次", value: 14 },
        { label: "14.5次", value: 15 },
        { label: "15.5次", value: 16 },
      ],
      url: require("@/assets/point.png"),
      tutitle: "",
      domId: "",
      obj: undefined,
      query: false,
      xb: true,
      jxb: true,
      list: [],
      seriesData: [],
      valueList: [],
    };
  },
  props: {
    treenode: {
      type: Object,
      default: undefined,
    },
    dataTree: {
      type: Array,
      default: undefined,
    },
    linelist: {
      type: Array,
      default: undefined,
    },
    view: {
      type: Boolean,
      default: undefined,
    },
  },
  created() {},
  mounted() {
    this.device = window.devicePixelRatio;
    // if (this.device == 1) {
    //   this.echartsheight = getechartsheight() / 2;
    //   this.rowheight = getechartsheight();
    // } else if (this.device == 1.25) {
    //   this.echartsheight = getechartsheight() * 0.4;
    //   this.rowheight = this.echartsheight * 2.5;
    // } else if (this.device == 1.5) {
    //   this.echartsheight = getechartsheight();
    // }
    this.typeoptions = this.typeoptions1;
  },
  methods: {
    //多选触发
    manyline() {
      // debugger
      if (this.checked) {
        this.checkbox = false;
        this.formData.condition = [];
        //this.formData.condition = ['10']
        this.limit = 1;
        var data = this.checked;

        this.$emit("menuTree", data);
      }
      if (!this.checked) {
        //this.list=[]
        this.checkbox = true;
        this.formData.condition = [];
        this.formData.condition = ["10", "11", "12"];
        this.limit = 3;
        var data = this.checked;
        this.$emit("menuTree", data);
      }
    },
    //日期组件触发事件
    querfromdata(data, timehbValue, interval) {
      this.loading = true;
      this.interval = interval;
      //监测点赋值
      this.formData.lineId = this.linelist;
      this.timeValue = data;
      this.formData.searchBeginTime = data[0];
      this.formData.searchEndTime = data[1];
      this.formData.condition = this.condition;
      api.getHistoryResult(this.formData).then((res) => {
        if (res.code == "A0000") {
          this.shujuchuli(res);
        }
      });
    },
    resscreen() {
      var de = document.getElementById("tubiao");
      if (de.requestFullscreen) {
        de.requestFullscreen();
      } else if (de.mozRequestFullScreen) {
        de.mozRequestFullScreen();
      } else if (de.webkitRequestFullScreen) {
        de.webkitRequestFullScreen();
      }
    },
    shujuchuli(res) {
      let a = Date.now();
      //console.log("初始化", a);
      this.list = [];
      this.loading = true;
    //  debugger;
    //  console.log("+++++++++++++++++++++++++++++", res.data);
      var shujuData = res.data;
      //判断是几个图
      for (var i = 0; i < shujuData.length; i++) {
        //判断有无暂降点
        if (shujuData[i].eventDetail !== null) {
          shujuData[i].phaiscType.push("暂降触发点");
          //有暂降点
          var chufa = [];
          //判断有上下限
          if (shujuData[i].topLimit !== 0 && shujuData[i].lowerLimit !== 0) {
            shujuData[i].phaiscType.push("上限");
            shujuData[i].phaiscType.push("下限");
            if(shujuData[i].minValue !==null){
              shujuData[i].minValue =  shujuData[i].lowerLimit
            if (shujuData[i].phaiscType.length == 6) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = []
              let lowerLimit = []
              //循环处理abc三项数据
              //数据为null时
              if (shujuData[i].value !== null) {
                for (var j = 0; j < shujuData[i].value.length; j++) {
                  avalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][1].toFixed(2),
                  ]);
                  bvalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][2].toFixed(2),
                  ]);
                  cvalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][3].toFixed(2),
                  ]);
                  lowerLimit.push([shujuData[i].value[j][0],shujuData[i].lowerLimit.toFixed(2)]);
                  topLimit.push([ shujuData[i].value[j][0],shujuData[i].topLimit.toFixed(2)]);
                }
              } else {
                avalue = [];
                bvalue = [];
                cvalue = [];
                topLimit=[]
                lowerLimit=[]
              }

              //不存在一个暂降点或1个 //处理暂降点
              if (shujuData[i].eventDetail.length > 0) {
                for (var k = 0; k < shujuData[i].eventDetail.length; k++) {
                  chufa.push([
                    shujuData[i].eventDetail[k].time,
                    shujuData[i].minValue.toFixed(2),
                  ]);
                }
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: shujuData[i].minValue.toFixed(2),
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit:topLimit,
                lowerLimit:lowerLimit,
                chufa: chufa,
              };
              this.list.push(shuju);
            }
            //如频率等
            if (shujuData[i].phaiscType.length == 4) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = []
              let lowerLimit = []
              //循环处理单项数据
              for (var j = 0; j < shujuData[i].value.length; j++) {
                avalue.push([
                  shujuData[i].value[j][0],
                  shujuData[i].value[j][1].toFixed(2),
                ]);
                bvalue.push([]);
                cvalue.push([]);
                topLimit.push([ shujuData[i].value[j][0],
                  shujuData[i].topLimit.toFixed(2)])
                lowerLimit.push([shujuData[i].value[j][0],
                  shujuData[i].lowerLimit.toFixed(2)])
              }
              //不存在一个暂降点或1个 //处理暂降点
              if (shujuData[i].eventDetail.length > 0) {
                for (var k = 0; k < shujuData[i].eventDetail.length; k++) {
                  chufa.push([
                    shujuData[i].eventDetail[k].time,
                    shujuData[i].minValue.toFixed(2),
                  ]);
                }
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                minValue: shujuData[i].minValue.toFixed(2),
                valueName: shujuData[i].unit[0],
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit:topLimit,
                lowerLimit:lowerLimit,
                chufa: chufa,
              };
              this.list.push(shuju);
            }
           }else{
            var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: [],
                avalue: [],
                bvalue: [],
                cvalue: [],
                lowerLimit:[],
                topLimit:[],
                chufa: [],
              };
              this.list.push(shuju);
           }

          }
          //判断有上限
          if (shujuData[i].topLimit !== 0 && shujuData[i].lowerLimit == 0) {
            shujuData[i].phaiscType.push("上限");
            if(shujuData[i].minValue !==null){
            if (shujuData[i].phaiscType.length == 5) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = []
              let lowerLimit = []
              //循环处理abc三项数据
              //数据为null时
              if (shujuData[i].value !== null) {
                for (var j = 0; j < shujuData[i].value.length; j++) {
                  avalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][1].toFixed(2),
                  ]);
                  bvalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][2].toFixed(2),
                  ]);
                  cvalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][3].toFixed(2),
                  ]);
                  lowerLimit.push([]);
                  topLimit.push([ shujuData[i].value[j][0],shujuData[i].topLimit.toFixed(2),]);
                }
              } else {
                avalue = [];
                bvalue = [];
                cvalue = [];
                topLimit=[]
                lowerLimit=[]
              }

              //不存在一个暂降点或1个 //处理暂降点
              if (shujuData[i].eventDetail.length > 0) {
                for (var k = 0; k < shujuData[i].eventDetail.length; k++) {
                  chufa.push([
                    shujuData[i].eventDetail[k].time,
                    shujuData[i].minValue.toFixed(2),
                  ]);
                }
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: shujuData[i].minValue.toFixed(2),
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit:topLimit,
                lowerLimit:lowerLimit,
                chufa: chufa,
              };
              this.list.push(shuju);
            }
            //如频率等
            if (shujuData[i].phaiscType.length == 3) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = []
              let lowerLimit = []
              //循环处理单项数据
              for (var j = 0; j < shujuData[i].value.length; j++) {
                avalue.push([
                  shujuData[i].value[j][0],
                  shujuData[i].value[j][1].toFixed(2),
                ]);
                bvalue.push([]);
                cvalue.push([]);
                topLimit.push([ shujuData[i].value[j][0],
                  shujuData[i].topLimit.toFixed(2),])
                lowerLimit.push([])
              }
              //不存在一个暂降点或1个 //处理暂降点
              if (shujuData[i].eventDetail.length > 0) {
                for (var k = 0; k < shujuData[i].eventDetail.length; k++) {
                  chufa.push([
                    shujuData[i].eventDetail[k].time,
                    shujuData[i].minValue.toFixed(2),
                  ]);
                }
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                minValue: shujuData[i].minValue.toFixed(2),
                valueName: shujuData[i].unit[0],
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit:topLimit,
                lowerLimit:lowerLimit,
                chufa: chufa,
              };
              this.list.push(shuju);
            }
           }else{
            var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: [],
                avalue: [],
                bvalue: [],
                cvalue: [],
                lowerLimit:[],
                topLimit:[],
                chufa: [],
              };
              this.list.push(shuju);
           }
          }
          //判断有下限
          if (shujuData[i].lowerLimit !== 0 && shujuData[i].topLimit == 0) {
            shujuData[i].phaiscType.push("下限");
            if(shujuData[i].minValue !==null){
              shujuData[i].minValue =  shujuData[i].lowerLimit
            if (shujuData[i].phaiscType.length == 5) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = []
              let lowerLimit = []
              //循环处理abc三项数据
              //数据为null时
              if (shujuData[i].value !== null) {
                for (var j = 0; j < shujuData[i].value.length; j++) {
                  avalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][1].toFixed(2),
                  ]);
                  bvalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][2].toFixed(2),
                  ]);
                  cvalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][3].toFixed(2),
                  ]);
                  lowerLimit.push([
                    shujuData[i].value[j][0],
                    shujuData[i].lowerLimit.toFixed(2),
                  ]);
                  topLimit.push([]);
                }
              } else {
                avalue = [];
                bvalue = [];
                cvalue = [];
              }

              //不存在一个暂降点或1个 //处理暂降点
              if (shujuData[i].eventDetail.length > 0) {
                for (var k = 0; k < shujuData[i].eventDetail.length; k++) {
                  chufa.push([
                    shujuData[i].eventDetail[k].time,
                    shujuData[i].minValue.toFixed(2),
                  ]);
                }
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: shujuData[i].minValue.toFixed(2),
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                chufa: chufa,
              };
              this.list.push(shuju);
            }
            //如频率等
            if (shujuData[i].phaiscType.length == 3) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = []
              let lowerLimit = []
              //循环处理单项数据
              for (var j = 0; j < shujuData[i].value.length; j++) {
                avalue.push([
                  shujuData[i].value[j][0],
                  shujuData[i].value[j][1].toFixed(2),
                ]);
                bvalue.push([]);
                cvalue.push([]);
                topLimit.push([])
                lowerLimit.push([])
              }
              //不存在一个暂降点或1个 //处理暂降点
              if (shujuData[i].eventDetail.length > 0) {
                for (var k = 0; k < shujuData[i].eventDetail.length; k++) {
                  chufa.push([
                    shujuData[i].eventDetail[k].time,
                    shujuData[i].minValue.toFixed(2),
                  ]);
                }
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                minValue: shujuData[i].minValue.toFixed(2),
                valueName: shujuData[i].unit[0],
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit:topLimit,
                lowerLimit:lowerLimit,
                chufa: chufa,
              };
              this.list.push(shuju);
            }
           }else{
            var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: [],
                avalue: [],
                bvalue: [],
                cvalue: [],
                lowerLimit:[],
                lowerLimit:[],
                chufa: [],
              };
              this.list.push(shuju);
           }
          }
          //判断无限值
          if (shujuData[i].lowerLimit == 0 && shujuData[i].topLimit == 0) {
            if(shujuData[i].minValue !==null){
            if (shujuData[i].phaiscType.length == 4) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              //循环处理abc三项数据
              //数据为null时
              if (shujuData[i].value !== null) {
                for (var j = 0; j < shujuData[i].value.length; j++) {
                  avalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][1].toFixed(2),
                  ]);
                  bvalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][2].toFixed(2),
                  ]);
                  cvalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][3].toFixed(2),
                  ]);
                }
              } else {
                avalue = [];
                bvalue = [];
                cvalue = [];
              }

              //不存在一个暂降点或1个 //处理暂降点
              if (shujuData[i].eventDetail.length > 0) {
                for (var k = 0; k < shujuData[i].eventDetail.length; k++) {
                  chufa.push([
                    shujuData[i].eventDetail[k].time,
                    shujuData[i].minValue.toFixed(2),
                  ]);
                }
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: shujuData[i].minValue.toFixed(2),
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                chufa: chufa,
              };
              this.list.push(shuju);
            }
            //如频率等
            if (shujuData[i].phaiscType.length == 2) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              //循环处理单项数据
              for (var j = 0; j < shujuData[i].value.length; j++) {
                avalue.push([
                  shujuData[i].value[j][0],
                  shujuData[i].value[j][1].toFixed(2),
                ]);
                bvalue.push([]);
                cvalue.push([]);
              }
              //不存在一个暂降点或1个 //处理暂降点
              if (shujuData[i].eventDetail.length > 0) {
                for (var k = 0; k < shujuData[i].eventDetail.length; k++) {
                  chufa.push([
                    shujuData[i].eventDetail[k].time,
                    shujuData[i].minValue.toFixed(2),
                  ]);
                }
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                minValue: shujuData[i].minValue.toFixed(2),
                valueName: shujuData[i].unit[0],
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                chufa: chufa,
              };
              this.list.push(shuju);
            }
           }else{
            var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: [],
                avalue: [],
                bvalue: [],
                cvalue: [],
                chufa: [],
              };
              this.list.push(shuju);
           }
          }
          //无暂降
        } else if (shujuData[i].eventDetail == null) {
          //判断有上下限
          if (shujuData[i].topLimit !== 0 && shujuData[i].lowerLimit !== 0) {
            shujuData[i].phaiscType.push("上限");
            shujuData[i].phaiscType.push("下限");
            if(shujuData[i].minValue !==null){
              shujuData[i].minValue =  shujuData[i].lowerLimit
            if (shujuData[i].phaiscType.length == 5) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = [];
              let lowerLimit = [];
              //循环处理abc三项数据
              if (shujuData[i].value !== null) {
                for (var j = 0; j < shujuData[i].value.length; j++) {
                  avalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][1].toFixed(2),
                  ]);
                  bvalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][2].toFixed(2),
                  ]);
                  cvalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][3].toFixed(2),
                  ]);
                  topLimit.push([
                    shujuData[i].value[j][0],
                    shujuData[i].topLimit.toFixed(2),
                  ]);
                  lowerLimit.push([
                    shujuData[i].value[j][0],
                    shujuData[i].lowerLimit.toFixed(2),
                  ]);
                }
              } else {
                avalue = [];
                bvalue = [];
                cvalue = [];
                topLimit = [];
                lowerLimit = [];
              }

              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: shujuData[i].minValue.toFixed(2),
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit: topLimit,
                lowerLimit: lowerLimit,
              };
              this.list.push(shuju);
            }
            if (shujuData[i].phaiscType.length == 3) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = [];
              let lowerLimit = [];
              //循环处理abc三项数据
              for (var j = 0; j < shujuData[i].value.length; j++) {
                avalue.push([
                  shujuData[i].value[j][0],
                  shujuData[i].value[j][1].toFixed(2),
                ]);
                topLimit.push([
                  shujuData[i].value[j][0],
                  shujuData[i].topLimit.toFixed(2),
                ]);
                lowerLimit.push([
                  shujuData[i].value[j][0],
                  shujuData[i].lowerLimit.toFixed(2),
                ]);
                bvalue.push([]);
                cvalue.push([]);
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: shujuData[i].minValue.toFixed(2),
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit: topLimit,
                lowerLimit: lowerLimit,
              };
              this.list.push(shuju);
            }
            }else{
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: [],
                avalue: [],
                bvalue: [],
                cvalue: [],
                chufa: [],
              };
              this.list.push(shuju);
            }
          }
          //判断有上限
          if (shujuData[i].topLimit !== 0 && shujuData[i].lowerLimit == 0) {
            shujuData[i].phaiscType.push("上限");
            if(shujuData[i].minValue !==null){
            if (shujuData[i].phaiscType.length == 2) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = [];
              let lowerLimit = [];
              //循环处理abc三项数据
              if (shujuData[i].value !== null && shujuData[i].minValue !== null) {
                for (var j = 0; j < shujuData[i].value.length; j++) {
                  avalue.push([
                    shujuData[i].value[j][0],
                    shujuData[i].value[j][1].toFixed(2),
                  ]);
                  topLimit.push([
                    shujuData[i].value[j][0],
                    shujuData[i].topLimit.toFixed(2),
                  ]);
                  lowerLimit.push([]);
                  bvalue.push([]);
                  cvalue.push([]);
                }
              } else {
                avalue = [];
                bvalue = [];
                cvalue = [];
                topLimit = [];
                lowerLimit = [];
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: shujuData[i].minValue.toFixed(2),
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit: topLimit,
                lowerLimit: lowerLimit,
              };
              this.list.push(shuju);
            }
          }else{
            var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: [],
                avalue: [],
                bvalue: [],
                cvalue: [],
                chufa: [],
              };
              this.list.push(shuju);
          }
          }
          //判断有下限
          if (shujuData[i].lowerLimit !== 0 && shujuData[i].topLimit == 0) {
            shujuData[i].phaiscType.push("下限");
            if(shujuData[i].minValue !==null){
              shujuData[i].minValue =  shujuData[i].lowerLimit
            if (shujuData[i].phaiscType.length == 2) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = [];
              let lowerLimit = [];
              //循环处理abc三项数据
              for (var j = 0; j < shujuData[i].value.length; j++) {
                avalue.push([
                  shujuData[i].value[j][0],
                  shujuData[i].value[j][1].toFixed(2),
                ]);
                topLimit.push([]);
                lowerLimit.push([
                  shujuData[i].value[j][0],
                  shujuData[i].lowerLimit.toFixed(2),
                ]);
                bvalue.push([]);
                cvalue.push([]);
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: shujuData[i].minValue.toFixed(2),
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit: topLimit,
                lowerLimit: lowerLimit,
              };
              this.list.push(shuju);
            }
          }else{
            var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: [],
                avalue: [],
                bvalue: [],
                cvalue: [],
                chufa: [],
              };
              this.list.push(shuju);
          }
          }
          //判断无限值
          if (shujuData[i].topLimit == 0 && shujuData[i].lowerLimit == 0) {
            if(shujuData[i].minValue !==null){
            //如线电压相有效值
            if (shujuData[i].phaiscType.length == 3) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = [];
              let lowerLimit = [];
              //循环处理abc三项数据
              for (var j = 0; j < shujuData[i].value.length; j++) {
                avalue.push([
                  shujuData[i].value[j][0],
                  shujuData[i].value[j][1].toFixed(2),
                ]);
                bvalue.push([
                  shujuData[i].value[j][0],
                  shujuData[i].value[j][2].toFixed(2),
                ]);
                cvalue.push([
                  shujuData[i].value[j][0],
                  shujuData[i].value[j][3].toFixed(2),
                ]);
                topLimit.push([]);
                lowerLimit.push([]);
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: shujuData[i].minValue.toFixed(2),
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit: topLimit,
                lowerLimit: lowerLimit,
              };
              this.list.push(shuju);
            }
            //如线频率
            if (shujuData[i].phaiscType.length == 1) {
              let avalue = [];
              let bvalue = [];
              let cvalue = [];
              let topLimit = [];
              let lowerLimit = [];
              //循环处理abc三项数据
              for (var j = 0; j < shujuData[i].value.length; j++) {
                avalue.push([
                  shujuData[i].value[j][0],
                  shujuData[i].value[j][1].toFixed(2),
                ]);
                topLimit.push([]);
                lowerLimit.push([]);
                bvalue.push([]);
                cvalue.push([]);
              }
              var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: shujuData[i].minValue.toFixed(2),
                avalue: avalue,
                bvalue: bvalue,
                cvalue: cvalue,
                topLimit: topLimit,
                lowerLimit: lowerLimit,
              };
              this.list.push(shuju);
            }
          }else {
            var shuju = {
                id: "qushifenx" + i,
                title: shujuData[i].lineName + "--" + shujuData[i].targetName,
                legend: shujuData[i].phaiscType,
                valueName: shujuData[i].unit[0],
                minValue: [],
                avalue: [],
                bvalue: [],
                cvalue: [],
                chufa: [],
              };
              this.list.push(shuju);
          }
          }
        }
      }
      let b = Date.now();
      //console.log("处理后", b);
      this.$nextTick(()=>{
            this.getEcharts() 
        })
     // console.log(
      //  "++++++++++++=========================================",
      //  this.list
      //);
    },
    getEcharts() {
      this.loading = true;
      var arr = [];
      const echarts = require("echarts");
      this.list.forEach((item) => {
        var myChartes = echarts.init(document.getElementById(item.id));
        var option = {
          title: {
            left: "center",
            text: item.title,
            textStyle: {
              fontSize: 12,
            },
          },
          tooltip: {
            trigger: "axis",
            axisPointer: {
              // 坐标轴指示器，坐标轴触发有效
              type: "cross", // 默认为直线，可选为：'line' | 'shadow'
            },
            formatter: function (params) {
              var tips = "";
              tips += params[0].data[0] + "</br/>";

              for (var i = 0; i < params.length; i++) {
                tips +=
                  params[i].seriesName + ":" + params[i].value[1] + "<br/>";
              }
              return tips;
            },
          },
          grid: {
            left: "20px",
            right: "20px",
            bottom: "20px",
            top: "10%",
            containLabel: true,
          },
          legend: {
            left: "8%",
            data: item.legend,
          },
          dataZoom: [
            {
              type: "inside",
         start: 0,
            end: 100,
            },
            {
             start: 0,
            end: 100,
            },
          ],
          xAxis: [
            {
              type: "time",
              axisLine: {
                show: true,
                lineStyle: {
                  color: "#999999",
                },
              },
            },
          ],
          toolbox: {
            show: true,
            feature: {
              dataZoom: {
                yAxisIndex: "none",
              },
              restore: {
                show: true,
              },
              saveAsImage: {},
              myFull: {
                show: true,
                title: "全屏查看",
                id: item.id,
                icon: "path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.062,591.891,421.146,591.891L421.146,591.891zM421.146,591.891",
                onclick: (e) => {
                  //this.obj = e;
                  // this.domId = e.option.toolbox[0].feature.myFull.id;
                  //this.fullFlag = true;
                  let element = document.getElementById(item.id);
                  if (element.requestFullScreen) {
                    // HTML W3C 提议
                    element.requestFullScreen();
                  } else if (element.msRequestFullscreen) {
                    // IE11
                    element.msRequestFullScreen();
                  } else if (element.webkitRequestFullScreen) {
                    // Webkit (works in Safari5.1 and Chrome 15)
                    element.webkitRequestFullScreen();
                  } else if (element.mozRequestFullScreen) {
                    // Firefox (works in nightly)
                    element.mozRequestFullScreen();
                  }
                  // 退出全屏
                  if (element.requestFullScreen) {
                    document.exitFullscreen();
                  } else if (element.msRequestFullScreen) {
                  } else if (element.webkitRequestFullScreen) {
                    document.webkitCancelFullScreen();
                  } else if (element.mozRequestFullScreen) {
                    document.mozCancelFullScreen();
                  }
                },
              },
            },
          },
          yAxis: [
            {
              type: "value",
              min: item.minValue - 0.5,
              name: "单位(" + item.valueName + ")",
              axisLabel: {
                formatter: "{value}",
                left: "20px",
              },

              axisLine: {
                show: true,
                lineStyle: {
                  color: "#999999",
                },
              },
            },
          ],
          series: [
            {
              name: item.legend[0],
              symbol: "none",
              //  symbolSize: 5,
              type: "line",
              // smooth: true,
              barWidth: 22,
              itemStyle: {
                normal: {
                  color: "green",
                },
              },

              data: item.avalue,
            },
            {
              name: item.legend[1],
              symbol: "none",
              // symbol: 'circle',
              //symbolSize: 5,
              type: "line",
              // smooth: true,
              barWidth: 22,
              itemStyle: {
                normal: {
                  color: "red",
                },
              },

              data: item.bvalue,
            },
            {
              name: item.legend[2],
              symbol: "none",
              // symbol: 'circle',
              // symbolSize: 5,
              type: "line",
              //  smooth: true,
              barWidth: 22,
              itemStyle: {
                normal: {
                  color: "#FFCC00",
                },
              },

              data: item.cvalue,
            },
            {
              name: item.legend[3],
              //symbol: "",
              type: "scatter",
              symbol: "image://" + this.url,
              itemStyle: {
                width: "30px",
                height: "35px",
              },
              data: item.chufa,
            },
            {
              name: "上限",
              symbol: "none",
              type: "line",
              //  symbol: "image://" + this.url,
              itemStyle: {
                normal: {
                  lineStyle: {
                    width: 2,
                    color: "red",
                    type: "dotted", //'dotted'虚线 'solid'实线
                  },
                },
              },
              data: item.topLimit,
            },
            {
              name: "下限", //
              symbol: "none",
              type: "line",
              // symbol: "image://" + this.url,
              itemStyle: {
                normal: {
                  lineStyle: {
                    width: 2,
                    color: "blue",
                    type: "dotted", //'dotted'虚线 'solid'实线
                  },
                },
              },
              data: item.lowerLimit,
            },
          ],
        };
        myChartes.setOption(option)
window.echartsArr.push(myChartes);

        this.loading = false;
        arr.push(myChartes);
      });
      echarts.connect(arr);
      let c = Date.now();
     //console.log("渲染完", c);
      let _this = this;
      _this.$erd.listenTo(_this.$refs.kk, (element) => {
        _this.$nextTick(() => {
          arr[0].resize();
          arr[1].resize();
          arr[2].resize();
        });
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.cfd {
  display: inline-block;
  margin-bottom: 10px;
  width: 100%;
  margin-top: -3%;
  position: relative;
}

.cf {
  display: inline-block;
  margin-bottom: 10px;
  width: 100%;
  margin-top: -3.6%;
  position: relative;
}
::v-deep .el-select-group__title {
  padding-left: 20px;
  font-size: 14px;
  color: #010c11;
  line-height: 30px;
  font-weight: bold;
}
.zt {
  font-size: 14px;
  font-weight: 550;
  color: $themeColor !important;
}

#loading {
  z-index: 1;
  padding: 5px 0 5px 9px;
  background: #c44;
  left: 0;
  top: 0 90px;
  color: #fff;
  position: fixed;
}
/* .el-tree-node .is-leaf + .el-checkbox .el-checkbox__inner {
              display:inline-block;
          }
      .el-tree-node .el-checkbox__input> .el-checkbox__inner {
              display:none;
     } */
</style>
