<template>
    <div>
        <el-row>
            <el-col :span="24">
                <div class="Top" ref="top">
                    <el-form :inline="true" class="demo-form-inline">
                        <el-form-item>
                            <Timeinterval :interval="3" ref="interval" :timeOptions="timeOptions"></Timeinterval>
                        </el-form-item>
                        <el-form-item label="监测点标签：">
                            <el-select v-model="value11" filterable placeholder="请选择" @change="changefn">
                                <el-option
                                    v-for="item in option11"
                                    :key="item.id"
                                    :label="item.name"
                                    :value="item.id"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                        <!-- <el-form-item label="指标类型：">
                            <el-select v-model="value22" placeholder="请选择">
                                <el-option
                                    v-for="item in option22"
                                    :key="item.id"
                                    :label="item.name"
                                    :value="item.id"
                                ></el-option>
                            </el-select>
                        </el-form-item> -->
                        <el-form-item>
                            <el-button type="primary" class="ml10" icon="el-icon-search" @click="steady">
                                查询
                            </el-button>
                            <el-button type="primary" icon="el-icon-download" @click="dc">导出</el-button>
                        </el-form-item>
                    </el-form>
                    <el-tabs
                        :tab-position="tabPosition"
                        v-model="active"
                        v-loading="isLoading"
                        @tab-click="handleClick111"
                    >
                        <el-tab-pane label="稳态指标" name="first">
                            <el-tabs :tab-position="tabPosition" v-model="active_active" @tab-click="handleClick11">
                                <el-tab-pane label="超标监测点数(个)" name="first-first">
                                    <el-col :span="24">
                                        <vxe-table
                                            size="mini"
                                            border
                                            stripe
                                            :row-config="{ isCurrent: true, isHover: true }"
                                            :data="serialData11"
                                            :height="height"
                                            style="width: 100%"
                                            header-cell-class-name="table_header"
                                            :cell-style="cellStyle"
                                            @cell-click="cellClickEvent"
                                            ref="classification1"
                                        >
                                            <vxe-table-column
                                                field="rowName"
                                                title="名称"
                                                width="150"
                                                align="center"
                                                fixed="left"
                                            ></vxe-table-column>

                                            <template v-for="(item, index) in serialData11[0].columns">
                                                <vxe-table-colgroup
                                                    :title="item.harmonicName"
                                                    :key="index"
                                                    align="center"
                                                    show-overflow-tooltip
                                                >
                                                    <vxe-table-column
                                                        field="columns"
                                                        title="日均"
                                                        min-width="105"
                                                        align="center"
                                                    >
                                                        <template slot-scope="scope">
                                                            <span>
                                                                {{
                                                                    scope.row.columns[index].overLimitMeasurementAverage
                                                                }}
                                                            </span>
                                                        </template>
                                                    </vxe-table-column>
                                                    <vxe-table-column
                                                        field="columns"
                                                        title="累计"
                                                        min-width="105"
                                                        align="center"
                                                    >
                                                        <template slot-scope="scope">
                                                            <span>
                                                                {{
                                                                    scope.row.columns[index].overLimitMeasurementAccrued
                                                                }}
                                                            </span>
                                                        </template>
                                                    </vxe-table-column>
                                                </vxe-table-colgroup>
                                            </template>
                                        </vxe-table>
                                    </el-col>
                                </el-tab-pane>
                                <el-tab-pane label="超标监测点数占比(%)" name="first-second">
                                    <el-col :span="24">
                                        <vxe-table
                                            size="mini"
                                            border
                                            stripe
                                            :row-config="{ isCurrent: true, isHover: true }"
                                            :data="serialData11"
                                            :height="height"
                                            style="width: 100%"
                                            v-loading="isLoading"
                                            header-cell-class-name="table_header"
                                            @cell-click="cellClickEvent"
                                            :cell-style="cellStyle"
                                            ref="classification2"
                                        >
                                            <vxe-table-column
                                                field="rowName"
                                                title="名称"
                                                width="150"
                                                align="center"
                                                fixed="left"
                                            ></vxe-table-column>

                                            <template v-for="(item, index) in serialData11[0].columns">
                                                <vxe-table-colgroup
                                                    :title="item.harmonicName"
                                                    :key="index"
                                                    show-overflow-tooltip
                                                    width="150"
                                                    align="center"
                                                >
                                                    <vxe-table-column
                                                        field="columns"
                                                        title="日均"
                                                        min-width="105"
                                                        align="center"
                                                    >
                                                        <template slot-scope="scope">
                                                            <span>
                                                                {{
                                                                    scope.row.columns[index]
                                                                        .overLimitMeasurementRatioAverage
                                                                }}
                                                            </span>
                                                        </template>
                                                    </vxe-table-column>
                                                    <vxe-table-column
                                                        field="columns"
                                                        title="累计"
                                                        min-width="105"
                                                        align="center"
                                                    >
                                                        <template slot-scope="scope">
                                                            <span>
                                                                {{
                                                                    scope.row.columns[index]
                                                                        .overLimitMeasurementRatioAccrued
                                                                }}
                                                            </span>
                                                        </template>
                                                    </vxe-table-column>
                                                </vxe-table-colgroup>
                                            </template>
                                        </vxe-table>
                                    </el-col>
                                </el-tab-pane>
                                <el-tab-pane label="平均超标天数" name="first-third">
                                    <el-col :span="24">
                                        <vxe-table
                                            size="mini"
                                            border
                                            stripe
                                            :row-config="{ isCurrent: true, isHover: true }"
                                            :data="serialData11"
                                            :height="height"
                                            style="width: 100%"
                                            v-loading="isLoading"
                                            header-cell-class-name="table_header"
                                            @cell-click="cellClickEvent"
                                            :cell-style="cellStyle"
                                            ref="classification3"
                                        >
                                            <vxe-table-colgroup
                                                field="rowName"
                                                title="名称"
                                                min-width="180"
                                                align="center"
                                                fixed="left"
                                            ></vxe-table-colgroup>

                                            <template v-for="(item, index) in serialData11[0].columns">
                                                <vxe-table-colgroup
                                                    :title="item.harmonicName"
                                                    :key="index"
                                                    show-overflow-tooltip
                                                    min-width="210"
                                                    align="center"
                                                    field="averageOverDay"
                                                >
                                                    <template slot-scope="scope">
                                                        <span>
                                                            {{ scope.row.columns[index].averageOverDay }}
                                                        </span>
                                                    </template>
                                                </vxe-table-colgroup>
                                            </template>
                                        </vxe-table>
                                    </el-col>
                                </el-tab-pane>
                            </el-tabs>
                            <el-col :span="12">
                                <!-- <div style="margin:10px">
                  <el-select
                    style="width: 90px; margin-left: 10px"
                    v-model="intervald"
                    @change="interchange"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in timeOptions"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                  <el-select
                    style="width: 90px; margin-left: 10px"
                    v-model="intervald"
                    @change="interchange"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in timeOptions"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                  <el-button type="primary" class="ml10" icon="el-icon-search"
                    >查询</el-button
                  >
                </div> -->

                                <div class="box" id="box1" v-loading="isLoading3">
                                    <div id="electr1" style="width: 100%"></div>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="box" id="box2" v-loading="isLoading3">
                                    <div id="electr2" style="width: 100%"></div>
                                </div>
                            </el-col>
                        </el-tab-pane>
                        <el-tab-pane label="暂态指标" name="second">
                            <el-tabs :tab-position="tabPosition" v-model="active_active" @tab-click="handleClick222">
                                <el-tab-pane label="超标监测点数(个)" name="second-first">
                                    <el-col :span="24">
                                        <vxe-table
                                            size="mini"
                                            border
                                            stripe
                                            :row-config="{ isCurrent: true, isHover: true }"
                                            :data="serialData22"
                                            :height="height"
                                            style="width: 100%"
                                            v-loading="isLoading"
                                            header-cell-class-name="table_header"
                                            @cell-click="cellClickEvent"
                                            :cell-style="cellStyle"
                                            ref="classification11"
                                        >
                                            <vxe-table-column
                                                field="rowName"
                                                title="名称"
                                                width="150"
                                                align="center"
                                                fixed="left"
                                            ></vxe-table-column>

                                            <template v-for="(item, index) in serialData22[0].columns">
                                                <vxe-table-colgroup
                                                    :title="item.eventName"
                                                    :key="index"
                                                    show-overflow-tooltip
                                                    width="150"
                                                    align="center"
                                                >
                                                    <vxe-table-column
                                                        field="averageOverDay"
                                                        title="日均"
                                                        min-width="105"
                                                        align="center"
                                                    >
                                                        <template slot-scope="scope">
                                                            <span>
                                                                {{ scope.row.columns[index].eventMeasurementAverage }}
                                                            </span>
                                                        </template>
                                                    </vxe-table-column>
                                                    <vxe-table-column
                                                        field="overDay"
                                                        title="累计"
                                                        min-width="105"
                                                        align="center"
                                                    >
                                                        <template slot-scope="scope">
                                                            <span>
                                                                {{ scope.row.columns[index].eventMeasurementAccrued }}
                                                            </span>
                                                        </template>
                                                    </vxe-table-column>
                                                </vxe-table-colgroup>
                                            </template>
                                        </vxe-table>
                                    </el-col>
                                </el-tab-pane>
                                <el-tab-pane label="超标监测点数占比(%)" name="second-second">
                                    <el-col :span="24">
                                        <vxe-table
                                            size="mini"
                                            border
                                            stripe
                                            :row-config="{ isCurrent: true, isHover: true }"
                                            :data="serialData22"
                                            :height="height"
                                            style="width: 100%"
                                            v-loading="isLoading"
                                            header-cell-class-name="table_header"
                                            @cell-click="cellClickEvent"
                                            :cell-style="cellStyle"
                                            ref="classification22"
                                        >
                                            <vxe-table-column
                                                field="rowName"
                                                title="名称"
                                                width="150"
                                                fixed="left"
                                                align="center"
                                            ></vxe-table-column>

                                            <template v-for="(item, index) in serialData22[0].columns">
                                                <vxe-table-colgroup
                                                    :title="item.eventName"
                                                    :key="index"
                                                    show-overflow-tooltip
                                                    width="150"
                                                    align="center"
                                                >
                                                    <vxe-table-column
                                                        field="averageOverDay"
                                                        title="日均"
                                                        min-width="105"
                                                        align="center"
                                                    >
                                                        <template slot-scope="scope">
                                                            <span>
                                                                {{
                                                                    scope.row.columns[index]
                                                                        .eventMeasurementRatioAverage
                                                                }}
                                                            </span>
                                                        </template>
                                                    </vxe-table-column>
                                                    <vxe-table-column
                                                        field="overDay"
                                                        title="累计"
                                                        min-width="105"
                                                        align="center"
                                                    >
                                                        <template slot-scope="scope">
                                                            <span>
                                                                {{
                                                                    scope.row.columns[index]
                                                                        .eventMeasurementRatioAccrued
                                                                }}
                                                            </span>
                                                        </template>
                                                    </vxe-table-column>
                                                </vxe-table-colgroup>
                                            </template>
                                        </vxe-table>
                                    </el-col>
                                </el-tab-pane>
                                <el-tab-pane label="暂态发生次数" name="second-third">
                                    <el-col :span="24">
                                        <vxe-table
                                            size="mini"
                                            border
                                            stripe
                                            :row-config="{ isCurrent: true, isHover: true }"
                                            :data="serialData22"
                                            :height="height"
                                            style="width: 100%"
                                            v-loading="isLoading"
                                            header-cell-class-name="table_header"
                                            @cell-click="cellClickEvent"
                                            :cell-style="cellStyle"
                                            ref="classification33"
                                        >
                                            <vxe-table-colgroup
                                                field="rowName"
                                                title="名称"
                                                width="150"
                                                align="center"
                                                fixed="left"
                                            ></vxe-table-colgroup>

                                            <template v-for="(item, index) in serialData22[0].columns">
                                                <vxe-table-colgroup
                                                    :title="item.eventName"
                                                    :key="index"
                                                    show-overflow-tooltip
                                                    min-width="210"
                                                    align="center"
                                                    field="eventCount"
                                                >
                                                    <template slot-scope="scope">
                                                        <span>
                                                            {{ scope.row.columns[index].eventCount }}
                                                        </span>
                                                    </template>
                                                </vxe-table-colgroup>
                                            </template>
                                        </vxe-table>
                                    </el-col>
                                </el-tab-pane>
                                <el-tab-pane label="暂态发生频次" name="second-fourth">
                                    <el-col :span="24">
                                        <vxe-table
                                            size="mini"
                                            border
                                            stripe
                                            :row-config="{ isCurrent: true, isHover: true }"
                                            :data="serialData22"
                                            :height="height"
                                            style="width: 100%"
                                            v-loading="isLoading"
                                            header-cell-class-name="table_header"
                                            @cell-click="cellClickEvent"
                                            :cell-style="cellStyle"
                                            ref="classification44"
                                        >
                                            <vxe-table-colgroup
                                                field="rowName"
                                                title="名称"
                                                width="150"
                                                align="center"
                                                fixed="left"
                                            ></vxe-table-colgroup>

                                            <template v-for="(item, index) in serialData22[0].columns">
                                                <vxe-table-colgroup
                                                    :title="item.eventName"
                                                    :key="index"
                                                    show-overflow-tooltip
                                                    min-width="210"
                                                    align="center"
                                                    field="eventFreq"
                                                >
                                                    <template slot-scope="scope">
                                                        <span>
                                                            {{ scope.row.columns[index].eventFreq }}
                                                        </span>
                                                    </template>
                                                </vxe-table-colgroup>
                                            </template>
                                        </vxe-table>
                                    </el-col>
                                </el-tab-pane>
                            </el-tabs>
                            <el-col :span="12">
                                <div class="box" ref="getHeight" id="box3" v-loading="isLoading3">
                                    <div id="electr3" style="width: 100%"></div>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="box" ref="getHeight" id="box4" v-loading="isLoading3">
                                    <div id="electr4" style="width: 100%"></div>
                                </div>
                            </el-col>
                        </el-tab-pane>
                    </el-tabs>
                </div>
            </el-col>
        </el-row>
    </div>
</template>

<script>
import { dicData } from '@/assets/commjs/dictypeData'
import {
    getRStatHarmonicIcon2,
    getRStatEventIcon2, //折线图
    getAllRStatEventM, //查询
    getRStatEventIcon, //柱子图
    getAllRStatHarmonicM,
    getRStatHarmonicIcon
} from '@/api/Statistical-analysis/indicatorClassification'
import Area from '@/views/components/Area/Area.vue'
import Timslot from './Timeslot.vue'
import Timeinterval from '@/views/components/Timeinterval.vue'
export default {
    components: { Area, Timslot, Timeinterval },
    data() {
        return {
            tab: '',
            rowName: '',
            tabLabel: '超标监测点数(个)',
            echarts1data: { data: [] },
            echarts2data: { data: [] },
            kai: true,
            title: '',
            value11: '',
            value22: '',
            option11: [],
            option22: [],
            type: '3',
            active_active: 'first-first',
            zoom: undefined, //图表焦点校验
            start: '',
            end: '',
            height: null,
            getHeight: '',
            tabPosition: 'top',
            active: 'first',
            isLoading: false,
            isLoading2: false,
            isLoading3: false,
            isLoading4: false,
            serialData11: [{ columns: [] }],
            serialData22: [{ columns: [] }],
            max: 0,
            myChart1: null,
            myChart2: null,
            myChart3: null,
            myChart4: null,
            timeOptions: [
                { label: '年份', value: 1 },
                { label: '季度', value: 2 },
                { label: '月份', value: 3 }
            ]
        }
    },
    created() {
        var code11 = 'Monitoring_Labels' //干扰源类型
        var code22 = 'Steady_Statis' //指标类型
        this.option11 = dicData(code11, [])
        this.option22 = dicData(code22, [])

        this.value11 = this.option11[0].id
        this.title = this.option11[0].name
        this.value22 = this.option22[0].id
        this.rowName = this.option22[0].name
    },
    mounted() {
        //echarts图表调用

        this.setHeight()
        window.addEventListener('resize', this.setHeight)
        this.steady()
    },
    beforeDestroy() {
        window.removeEventListener('resize', this.setHeight)
    },
    methods: {
        setHeight() {
            this.height = window.sessionStorage.getItem('appheight') / 2 - 100

            let domID1 = document.getElementById('electr1')
            let domID2 = document.getElementById('electr2')
            let domID3 = document.getElementById('electr3')
            let domID4 = document.getElementById('electr4')
            let box1 = document.getElementById('box1')
            let box2 = document.getElementById('box2')
            let box3 = document.getElementById('box3')
            let box4 = document.getElementById('box4')

            ;(domID1.style.width = (window.sessionStorage.getItem('appwidth') - 40) / 2 + 'px'),
                (domID1.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px')
            box1.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px'
            ;(domID2.style.width = (window.sessionStorage.getItem('appwidth') - 40) / 2 + 'px'),
                (domID2.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px')
            box2.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px'
            ;(domID3.style.width = (window.sessionStorage.getItem('appwidth') - 40) / 2 + 'px'),
                (domID3.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px')
            box3.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px'
            ;(domID4.style.width = (window.sessionStorage.getItem('appwidth') - 40) / 2 + 'px'),
                (domID4.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px')
            box4.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px'

            // if (this.myChart1 && this.myChart2 && this.myChart3 && this.myChart4) {
            //     this.myChart1.resize()
            //     this.myChart2.resize()
            //     this.myChart3.resize()
            //     this.myChart4.resize()
            // }
        },
        changefn(val) {
            this.option11.forEach(item => {
                if (val == item.id) {
                    this.title = item.name
                }
            })
        },
        dc() {
            // console.log(this.serialData1, "this.serialData1");
            if (this.active_active == 'first-first') {
                this.$refs.classification1.exportData({
                    filename: 'export1', // 文件名字
                    sheetName: 'Sheet1',
                    type: 'xlsx', //导出文件类型 xlsx 和 csv
                    useStyle: true,
                    isFooter: true,
                    data: this.serialData11 // 数据源 // 过滤那个字段导出 // columnFilterMethod: function(column, $columnIndex) { //   return !(column.$columnIndex === 0 ) //   // 0是复选框 不导出 // }
                })
            }
            if (this.active_active == 'first-second') {
                this.$refs.classification2.exportData({
                    filename: 'export2', // 文件名字
                    sheetName: 'Sheet1',
                    type: 'xlsx', //导出文件类型 xlsx 和 csv
                    useStyle: true,
                    isFooter: true,
                    data: this.serialData11 // 数据源 // 过滤那个字段导出 // columnFilterMethod: function(column, $columnIndex) { //   return !(column.$columnIndex === 0 ) //   // 0是复选框 不导出 // }
                })
            }
            if (this.active_active == 'first-third') {
                this.$refs.classification3.exportData({
                    filename: 'export3', // 文件名字
                    sheetName: 'Sheet1',
                    type: 'xlsx', //导出文件类型 xlsx 和 csv
                    useStyle: true,
                    isFooter: true,
                    data: this.serialData11 // 数据源 // 过滤那个字段导出 // columnFilterMethod: function(column, $columnIndex) { //   return !(column.$columnIndex === 0 ) //   // 0是复选框 不导出 // }
                })
            }
            if (this.active_active == 'second-first') {
                this.$refs.classification11.exportData({
                    filename: 'export4', // 文件名字
                    sheetName: 'Sheet1',
                    type: 'xlsx', //导出文件类型 xlsx 和 csv
                    useStyle: true,
                    isFooter: true,
                    data: this.serialData22 // 数据源 // 过滤那个字段导出 // columnFilterMethod: function(column, $columnIndex) { //   return !(column.$columnIndex === 0 ) //   // 0是复选框 不导出 // }
                })
            }
            if (this.active_active == 'second-second') {
                this.$refs.classification22.exportData({
                    filename: 'export5', // 文件名字
                    sheetName: 'Sheet1',
                    type: 'xlsx', //导出文件类型 xlsx 和 csv
                    useStyle: true,
                    isFooter: true,
                    data: this.serialData22 // 数据源 // 过滤那个字段导出 // columnFilterMethod: function(column, $columnIndex) { //   return !(column.$columnIndex === 0 ) //   // 0是复选框 不导出 // }
                })
            }
            if (this.active_active == 'second-third') {
                this.$refs.classification33.exportData({
                    filename: 'export6', // 文件名字
                    sheetName: 'Sheet1',
                    type: 'xlsx', //导出文件类型 xlsx 和 csv
                    useStyle: true,
                    isFooter: true,
                    data: this.serialData22 // 数据源 // 过滤那个字段导出 // columnFilterMethod: function(column, $columnIndex) { //   return !(column.$columnIndex === 0 ) //   // 0是复选框 不导出 // }
                })
            }
            if (this.active_active == 'second-fourth') {
                this.$refs.classification44.exportData({
                    filename: 'export7', // 文件名字
                    sheetName: 'Sheet1',
                    type: 'xlsx', //导出文件类型 xlsx 和 csv
                    useStyle: true,
                    isFooter: true,
                    data: this.serialData22 // 数据源 // 过滤那个字段导出 // columnFilterMethod: function(column, $columnIndex) { //   return !(column.$columnIndex === 0 ) //   // 0是复选框 不导出 // }
                })
            }
        },
        handleClick111(tab) {
            this.tab = tab

            if (tab.paneName == 'second') {
                this.option22 = dicData('Event_Statis', [])
                this.value22 = this.option22[0].id
                this.rowName = this.option22[0].name
                this.active_active = 'second-first'
                this.tabLabel = '超标监测点数(个)'
                this.account1()
            } else {
                this.option22 = dicData('Steady_Statis', [])
                this.value22 = this.option22[0].id
                this.rowName = this.option22[0].name
                this.active_active = 'first-first'
                this.tabLabel = '超标监测点数(个)'
                this.account()
            }
            // console.log("🚀 ~ handleClick111 ~ this.option22:", this.option22)
        },
        handleClick11(tab, click) {
            this.tabLabel = tab.label
            this.getCensus()
        },
        handleClick222(tab, click) {
            this.tabLabel = tab.label
            this.getCensus()
        },
        time(val) {
            ;(this.start = val[0]), (this.end = val[1])
            this.type = val[2]
            if (this.kai) {
                this.account()
            }
        },
        handleNodeClick(data) {},

        //方法调用获取稳态指标超标统计数据接口
        steady() {
            this.isLoading = true
            if (this.tab.paneName == 'second') {
                getRStatEventIcon2({
                    id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                    type: this.$refs.interval.intervald,
                    startTime: this.$refs.interval.timeValue[0],
                    endTime: this.$refs.interval.timeValue[1],
                    monitorID: this.value11,
                    stasisID: this.value22
                }).then(res => {
                    this.echarts2data = res

                    this.getCensus()
                    this.isLoading = false
                })

                getRStatEventIcon({
                    id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                    type: this.$refs.interval.intervald,
                    startTime: this.$refs.interval.timeValue[0],
                    endTime: this.$refs.interval.timeValue[1],
                    // endTime: this.start.slice(0, this.start.length - 2) + "31",
                    monitorID: this.value11,
                    stasisID: this.value22
                }).then(res => {
                    this.echarts1data = res

                    this.getCensus()
                    this.isLoading = false
                })

                getAllRStatEventM({
                    id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                    type: this.$refs.interval.intervald,
                    startTime: this.$refs.interval.timeValue[0],
                    endTime: this.$refs.interval.timeValue[1]
                }).then(res => {
                    this.isLoading = false
                    this.serialData22 = res.data
                })
            } else {
                getRStatHarmonicIcon2({
                    id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                    type: this.$refs.interval.intervald,
                    startTime: this.$refs.interval.timeValue[0],
                    endTime: this.$refs.interval.timeValue[1],
                    monitorID: this.value11,
                    stasisID: this.value22
                }).then(res => {
                    this.echarts2data = res
                    this.getCensus()
                    this.isLoading = false
                })

                getRStatHarmonicIcon({
                    id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                    type: this.$refs.interval.intervald,
                    startTime: this.$refs.interval.timeValue[0],
                    endTime: this.$refs.interval.timeValue[1],
                    // endTime: this.start.slice(0, this.start.length - 2) + "31",
                    monitorID: this.value11,
                    stasisID: this.value22
                }).then(res => {
                    this.echarts1data = res
                    this.getCensus()
                    this.isLoading = false
                })
                getAllRStatHarmonicM({
                    id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                    type: this.$refs.interval.intervald,
                    startTime: this.$refs.interval.timeValue[0],
                    endTime: this.$refs.interval.timeValue[1]
                }).then(res => {
                    this.isLoading = false
                    this.serialData11 = res.data
                })
            }
        },
        cellStyle(row, column, rowIndex, columnIndex) {
            if (row.columnIndex == 2 || row.columnIndex == 3 || row.columnIndex == 4 || row.columnIndex == 5) {
                return 'font-weight: 100;'
            }
        },
        //监测终端统计echarts图表
        async getCensus() {
            let echartsColor = JSON.parse(window.localStorage.echartsColor)
            this.max = 0
            this.isLoading3 = true

            let echarts = require('echarts')
            let domID1 = document.getElementById('electr1')
            let domID2 = document.getElementById('electr2')
            let domID3 = document.getElementById('electr3')
            let domID4 = document.getElementById('electr4')
            let box1 = document.getElementById('box1')
            let box2 = document.getElementById('box2')
            let box3 = document.getElementById('box3')
            let box4 = document.getElementById('box4')
            this.isLoading3 = false
            setTimeout(() => {
                ;(domID1.style.width = (window.sessionStorage.getItem('appwidth') - 40) / 2 + 'px'),
                    (domID1.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px')
                box1.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px'

                this.isLoading3 = false
            }, 0)
            setTimeout(() => {
                ;(domID2.style.width = (window.sessionStorage.getItem('appwidth') - 40) / 2 + 'px'),
                    (domID2.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px')
                box2.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px'

                this.isLoading3 = false
            }, 0)
            setTimeout(() => {
                ;(domID3.style.width = (window.sessionStorage.getItem('appwidth') - 40) / 2 + 'px'),
                    (domID3.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px')
                box3.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px'

                this.isLoading3 = false
            }, 0)
            setTimeout(() => {
                ;(domID4.style.width = (window.sessionStorage.getItem('appwidth') - 40) / 2 + 'px'),
                    (domID4.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px')
                box4.style.height = window.sessionStorage.getItem('appheight') / 2 - 130 + 'px'

                this.isLoading3 = false
            }, 0)
            this.myChart1 = echarts.init(domID1)
            this.myChart2 = echarts.init(domID2)
            this.myChart3 = echarts.init(domID3)
            this.myChart4 = echarts.init(domID4)

            let list = []
            let list1 = []
            let list2 = []
            let list3 = []
            let list4 = []
            if (this.tab.paneName == 'second') {
                if (this.tabLabel == '超标监测点数(个)') {
                    this.echarts1data.data.forEach(i1 => {
                        if (i1.eventMeasurementAverage > this.max) {
                            this.max = i1.eventMeasurementAverage
                        }
                        if (i1.eventMeasurementAccrued > this.max) {
                            this.max = i1.eventMeasurementAccrued
                        }
                    })

                    this.echarts1data.data.forEach(i => {
                        if (i.eventMeasurementAverage == 0) {
                            i.eventMeasurementAverage = this.max * 0.03
                        }
                        if (i.eventMeasurementAccrued == 0) {
                            i.eventMeasurementAccrued = this.max * 0.03
                        }
                    })

                    this.echarts2data.data.forEach(i => {
                        list3.push(i.eventMeasurement)
                        list4.push(i.date)
                    })

                    this.echarts1data.data.forEach(i => {
                        list.push(i.eventName)
                        list1.push(i.eventMeasurementAverage)
                        list2.push(i.eventMeasurementAccrued)
                    })
                } else if (this.tabLabel == '超标监测点数占比(%)') {
                    this.echarts1data.data.forEach(i1 => {
                        if (i1.eventMeasurementRatioAverage > this.max) {
                            this.max = i1.eventMeasurementRatioAverage
                        }
                        if (i1.eventMeasurementRatioAccrued > this.max) {
                            this.max = i1.eventMeasurementRatioAccrued
                        }
                    })

                    this.echarts1data.data.forEach(i => {
                        if (i.eventMeasurementRatioAverage == 0) {
                            i.eventMeasurementRatioAverage = this.max * 0.03
                        }
                        if (i.eventMeasurementRatioAccrued == 0) {
                            i.eventMeasurementRatioAccrued = this.max * 0.03
                        }
                    })

                    this.echarts2data.data.forEach(i => {
                        list3.push(i.eventMeasurementRatio)
                        list4.push(i.date)
                    })

                    this.echarts1data.data.forEach(i => {
                        list.push(i.eventName)
                        list1.push(i.eventMeasurementRatioAverage)
                        list2.push(i.eventMeasurementRatioAccrued)
                    })
                } else if (this.tabLabel == '暂态发生次数') {
                    this.echarts1data.data.forEach(i1 => {
                        if (i1.eventCount > this.max) {
                            this.max = i1.eventCount
                        }
                        if (i1.eventCount > this.max) {
                            this.max = i1.eventCount
                        }
                    })

                    this.echarts1data.data.forEach(i => {
                        if (i.eventCount == 0) {
                            i.eventCount = this.max * 0.03
                        }
                        if (i.eventCount == 0) {
                            i.eventCount = this.max * 0.03
                        }
                    })

                    this.echarts2data.data.forEach(i => {
                        list3.push(i.eventCount)
                        list4.push(i.date)
                    })
                    this.echarts1data.data.forEach(i => {
                        list.push(i.eventName)
                        list1.push(i.eventCount)
                        list2.push(i.eventCount)
                    })
                } else if (this.tabLabel == '暂态发生频次') {
                    this.echarts1data.data.forEach(i1 => {
                        if (i1.eventFreq > this.max) {
                            this.max = i1.eventFreq
                        }
                        if (i1.eventFreq > this.max) {
                            this.max = i1.eventFreq
                        }
                    })

                    this.echarts1data.data.forEach(i => {
                        if (i.eventFreq == 0) {
                            i.eventFreq = this.max * 0.03
                        }
                        if (i.eventFreq == 0) {
                            i.eventFreq = this.max * 0.03
                        }
                    })

                    this.echarts2data.data.forEach(i => {
                        list3.push(i.eventFreq)
                        list4.push(i.date)
                    })
                    this.echarts1data.data.forEach(i => {
                        list.push(i.eventName)
                        list1.push(i.eventFreq)
                        list2.push(i.eventFreq)
                    })
                }
            } else {
                if (this.tabLabel == '超标监测点数(个)') {
                    this.echarts1data.data.forEach(i1 => {
                        if (i1.overLimitMeasurementAverage > this.max) {
                            this.max = i1.overLimitMeasurementAverage
                        }
                        if (i1.overLimitMeasurementAccrued > this.max) {
                            this.max = i1.overLimitMeasurementAccrued
                        }
                    })

                    this.echarts1data.data.forEach(i => {
                        if (i.overLimitMeasurementAverage == 0) {
                            i.overLimitMeasurementAverage = this.max * 0.03
                        }
                        if (i.overLimitMeasurementAccrued == 0) {
                            i.overLimitMeasurementAccrued = this.max * 0.03
                        }
                    })

                    this.echarts2data.data.forEach(i => {
                        list3.push(i.num)
                        list4.push(i.date)
                    })

                    this.echarts1data.data.forEach(i => {
                        list.push(i.rowName)
                        list1.push(i.overLimitMeasurementAverage)
                        list2.push(i.overLimitMeasurementAccrued)
                    })
                } else if (this.tabLabel == '超标监测点数占比(%)') {
                    this.echarts1data.data.forEach(i1 => {
                        if (i1.overLimitMeasurementRatioAverage > this.max) {
                            this.max = i1.overLimitMeasurementRatioAverage
                        }
                        if (i1.overLimitMeasurementRatioAccrued > this.max) {
                            this.max = i1.overLimitMeasurementRatioAccrued
                        }
                    })

                    this.echarts1data.data.forEach(i => {
                        if (i.overLimitMeasurementRatioAverage == 0) {
                            i.overLimitMeasurementRatioAverage = this.max * 0.03
                        }
                        if (i.overLimitMeasurementRatioAccrued == 0) {
                            i.overLimitMeasurementRatioAccrued = this.max * 0.03
                        }
                    })

                    this.echarts2data.data.forEach(i => {
                        list3.push(i.overLimitMeasurementRatioAverage)
                        list4.push(i.date)
                    })

                    this.echarts1data.data.forEach(i => {
                        list.push(i.rowName)
                        list1.push(i.overLimitMeasurementRatioAverage)
                        list2.push(i.overLimitMeasurementRatioAccrued)
                    })
                } else if (this.tabLabel == '平均超标天数') {
                    this.echarts1data.data.forEach(i1 => {
                        if (i1.averageOverDay > this.max) {
                            this.max = i1.averageOverDay
                        }
                        if (i1.averageOverDay > this.max) {
                            this.max = i1.averageOverDay
                        }
                    })

                    this.echarts1data.data.forEach(i => {
                        if (i.averageOverDay == 0) {
                            i.averageOverDay = this.max * 0.03
                        }
                        if (i.averageOverDay == 0) {
                            i.averageOverDay = this.max * 0.03
                        }
                    })

                    this.echarts2data.data.forEach(i => {
                        list3.push(i.averageOverDay)
                        list4.push(i.date)
                    })
                    this.echarts1data.data.forEach(i => {
                        list.push(i.rowName)
                        list1.push(i.averageOverDay)
                        list2.push(i.averageOverDay)
                    })
                }
            }

            let _this = this

            let option = {
                title: {
                    text: this.title + `(${this.rowName})`,
                    top: 20,
                    left: 'center'
                },
                tooltip: {
                    trigger: 'axis',

                    axisPointer: {
                        type: 'shadow',
                        label: {
                            color: '#fff',
                            fontSize: 16
                        }
                    },
                    textStyle: {
                        color: '#fff',
                        fontStyle: 'normal',
                        opacity: 0.35,
                        fontSize: 14
                    },
                    backgroundColor: 'rgba(0,0,0,0.35)',
                    borderWidth: 0,
                    formatter: function (params) {
                        var tips = ''
                        tips += params[0].name + '</br/>'
                        for (var i = 0; i < params.length; i++) {
                            if (params[i].value == _this.max * 0.03) {
                                tips += params[i].seriesName + ':0<br/>'
                            } else {
                                tips += params[i].seriesName + ':' + params[i].value + '<br/>'
                            }
                        }
                        return tips
                    }
                },
                legend: {
                    right: 40,
                    top: 20,
                    data: [
                        { name: '日均', itemStyle: { color: echartsColor.FigureColor[0] } },
                        { name: '累计', itemStyle: { color: echartsColor.FigureColor[1] } }
                    ],
                    itemWidth: 16,
                    itemHeight: 16,
                    itemGap: 28,
                    textStyle: {
                        color: echartsColor.WordColor,
                        rich: {
                            a: {
                                verticalAlign: 'middle'
                            }
                        },

                        padding: [2, 0, 0, 0] //[上、右、下、左]
                    }
                },
                grid: {
                    top: '20%',
                    left: '3%',
                    right: '4%',
                    bottom: '40',
                    containLabel: true
                },
                xAxis: [
                    {
                        type: 'category',

                        data: list,
                        axisTick: { show: false },
                        axisLine: {
                            lineStyle: {
                                color: echartsColor.thread
                            }
                        },
                        axisLabel: {
                            color: echartsColor.WordColor
                            // rotate: 30,
                            // interval: 0
                        }
                    }
                ],
                yAxis: [
                    {
                        name:
                            this.tabLabel == '平均超标天数'
                                ? '单位：天/点'
                                : this.tabLabel == '超标监测点数占比(%)'
                                ? '单位：%'
                                : '单位：个',

                        minInterval: 1,
                        nameTextStyle: {
                            color: echartsColor.WordColor
                        },
                        axisLine: {
                            show: true,
                            lineStyle: {
                                color: echartsColor.thread
                            }
                        },
                        axisLabel: {
                            color: echartsColor.WordColor
                        },
                        splitLine: {
                            lineStyle: {
                                // 使用深浅的间隔色
                                color: [echartsColor.thread],
                                type: 'dashed',
                                opacity: 0.5
                            }
                        }
                    }
                ],
                dataZoom: [
                    {
                        show: true,
                        height: 12,
                        xAxisIndex: [0],
                        bottom: '3%',
                        start: 0,
                        end: 100,
                        handleIcon:
                            'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
                        handleSize: '110%',
                        handleStyle: {
                            color: '#d3dee5'
                        },
                        textStyle: {
                            color: '#fff'
                        },
                        borderColor: '#90979c'
                    },
                    {
                        type: 'inside',
                        show: true,
                        height: 15,
                        start: 0,
                        end: 100
                    }
                ],
                series: [
                    {
                        name: '日均',
                        type: 'bar',
                        data: list1,
                        barMinHeight: 5,
                        barMaxWidth: '30px',
                        itemStyle: {
                            normal: {
                                color: function (params) {
                                    if (params.value == _this.max * 0.03) {
                                        return new echarts.graphic.LinearGradient(
                                            0,
                                            1,
                                            0,
                                            0,
                                            [
                                                {
                                                    offset: 1,
                                                    color: '#ccc'
                                                }
                                            ],
                                            false
                                        )
                                    } else {
                                        return new echarts.graphic.LinearGradient(
                                            0,
                                            1,
                                            0,
                                            0,
                                            [
                                                {
                                                    offset: 1,
                                                    color: echartsColor.FigureColor[0]
                                                }
                                            ],
                                            false
                                        )
                                    }
                                },

                                label: {
                                    formatter: function (params) {
                                        if (params.value == _this.max * 0.03) {
                                            return ''
                                        } else {
                                            return params.value
                                        }
                                    },
                                    show: true,
                                    textStyle: {
                                        label: { show: true, position: 'top' },
                                        color: echartsColor.WordColor
                                    },
                                    fontSize: 12
                                }
                            }
                        }
                    },
                    {
                        name: '累计',
                        type: 'bar',
                        data: list2,
                        barMinHeight: 5,
                        barMaxWidth: '30px',
                        itemStyle: {
                            normal: {
                                color: function (params) {
                                    if (params.value == _this.max * 0.03) {
                                        return new echarts.graphic.LinearGradient(
                                            0,
                                            1,
                                            0,
                                            0,
                                            [
                                                {
                                                    offset: 1,
                                                    color: '#ccc'
                                                }
                                            ],
                                            false
                                        )
                                    } else {
                                        return new echarts.graphic.LinearGradient(
                                            0,
                                            1,
                                            0,
                                            0,
                                            [
                                                {
                                                    offset: 1,
                                                    color: echartsColor.FigureColor[1]
                                                }
                                            ],
                                            false
                                        )
                                    }
                                },

                                label: {
                                    formatter: function (params) {
                                        if (params.value == _this.max * 0.03) {
                                            return ''
                                        } else {
                                            return params.value
                                        }
                                    },
                                    show: true,
                                    textStyle: {
                                        label: { show: true, position: 'top' },
                                        color: echartsColor.WordColor
                                    },
                                    fontSize: 12
                                }
                            }
                        }
                    }
                ]
            }
            let option1 = {
                title: {
                    text: this.title + `(${this.rowName})`,
                    top: 20,
                    left: 'center'
                },
                tooltip: {
                    trigger: 'axis',
                    axisPointer: {
                        type: 'shadow',
                        label: {
                            color: '#fff',
                            fontSize: 16
                        }
                    },
                    textStyle: {
                        color: '#fff',
                        fontStyle: 'normal',
                        opacity: 0.35,
                        fontSize: 14
                    },
                    backgroundColor: 'rgba(0,0,0,0.35)',
                    borderWidth: 0
                },
                legend: {
                    right: 40,
                    top: 20,
                    data: [{ name: '日计', itemStyle: { color: echartsColor.FigureColor[0] } }],
                    textStyle: {
                        color: echartsColor.WordColor,
                        rich: {
                            a: {
                                verticalAlign: 'middle'
                            }
                        },

                        padding: [2, 0, 0, 0] //[上、右、下、左]
                    }
                },
                grid: {
                    top: '20%',
                    left: '3%',
                    right: '4%',
                    bottom: '40',
                    containLabel: true
                },
                dataZoom: [
                    {
                        show: true,
                        height: 12,
                        xAxisIndex: [0],
                        bottom: '3%',
                        start: 0,
                        end: 100,
                        handleIcon:
                            'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
                        handleSize: '110%',
                        handleStyle: {
                            color: '#d3dee5'
                        },
                        textStyle: {
                            color: '#fff'
                        },
                        borderColor: '#90979c'
                    },
                    {
                        type: 'inside',
                        show: true,
                        height: 15,
                        start: 0,
                        end: 100
                    }
                ],
                toolbox: {
                    feature: {
                        saveAsImage: { show: true }
                    }
                },
                xAxis: {
                    type: 'category',

                    data: list4,
                    axisTick: { show: false },
                    axisLine: {
                        lineStyle: {
                            color: echartsColor.thread
                        }
                    },
                    axisLabel: {
                        color: echartsColor.WordColor
                        // rotate: 30,
                        // interval: 0
                    }
                },
                yAxis: [
                    {
                        name:
                            this.tabLabel == '平均超标天数'
                                ? '单位：天/点'
                                : this.tabLabel == '超标监测点数占比(%)'
                                ? '单位：%'
                                : this.tabLabel == '暂态发生频次'
                                ? '单位：次'
                                : this.tabLabel == '暂态发生次数'
                                ? '单位：次'
                                : '单位：个',

                        minInterval: 1,
                        nameTextStyle: {
                            color: echartsColor.WordColor
                        },
                        axisLine: {
                            show: true,
                            lineStyle: {
                                color: echartsColor.thread
                            }
                        },
                        axisLabel: {
                            color: echartsColor.WordColor
                        },
                        splitLine: {
                            lineStyle: {
                                // 使用深浅的间隔色
                                color: [echartsColor.thread],
                                type: 'dashed',
                                opacity: 0.5
                            }
                        }
                    }
                ],
                series: [
                    {
                        name: '日计',
                        type: 'line',
                        stack: 'Total',
                        data: list3,
                        itemStyle: {
                            normal: { show: true, color: echartsColor.FigureColor[0] }
                        }
                    }
                ]
            }
            if (this.tabLabel == '平均超标天数' || this.tabLabel == '暂态发生频次' || this.tabLabel == '暂态发生次数') {
                option = {
                    title: {
                        text: this.title + `(${this.rowName})`,
                        top: 20,
                        left: 'center'
                    },
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {
                            type: 'shadow',
                            label: {
                                color: '#fff',
                                fontSize: 16
                            }
                        },
                        textStyle: {
                            color: '#fff',
                            fontStyle: 'normal',
                            opacity: 0.35,
                            fontSize: 14
                        },
                        formatter: function (params) {
                            var tips = ''
                            tips += params[0].name + '</br/>'
                            for (var i = 0; i < params.length; i++) {
                                if (params[i].value == _this.max * 0.03) {
                                    tips += params[i].seriesName + ':0<br/>'
                                } else {
                                    tips += params[i].seriesName + ':' + params[i].value + '<br/>'
                                }
                            }
                            return tips
                        },
                        backgroundColor: 'rgba(0,0,0,0.35)',
                        borderWidth: 0
                    },
                    legend: {
                        right: 40,
                        top: 20,
                        data: [
                            {
                                name:
                                    this.tabLabel == '平均超标天数'
                                        ? '平均超标天数'
                                        : this.tabLabel == '暂态发生频次'
                                        ? '暂态发生频次'
                                        : this.tabLabel == '暂态发生次数'
                                        ? '暂态发生次数'
                                        : '',
                                itemStyle: { color: echartsColor.FigureColor[0] }
                            }
                        ],
                        itemWidth: 16,
                        itemHeight: 16,
                        itemGap: 28,
                        textStyle: {
                            color: echartsColor.WordColor,
                            rich: {
                                a: {
                                    verticalAlign: 'middle'
                                }
                            },

                            padding: [2, 0, 0, 0] //[上、右、下、左]
                        }
                    },
                    grid: {
                        top: '20%',
                        left: '3%',
                        right: '4%',
                        bottom: '40',
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: 'category',
                            data: list,
                            axisTick: { show: false },
                            axisLine: {
                                lineStyle: {
                                    color: echartsColor.thread
                                }
                            },
                            axisLabel: {
                                color: echartsColor.WordColor
                                // rotate: 30,
                                // interval: 0
                            }
                        }
                    ],
                    yAxis: [
                        {
                            name: this.tabLabel == '平均超标天数' ? '单位：天/点' : '单位：次',

                            minInterval: 1,
                            nameTextStyle: {
                                color: echartsColor.WordColor
                            },
                            axisLine: {
                                show: true,
                                lineStyle: {
                                    color: echartsColor.thread
                                }
                            },
                            axisLabel: {
                                color: echartsColor.WordColor
                            },
                            splitLine: {
                                lineStyle: {
                                    // 使用深浅的间隔色
                                    color: [echartsColor.thread],
                                    type: 'dashed',
                                    opacity: 0.5
                                }
                            }
                        }
                    ],
                    dataZoom: [
                        {
                            show: true,
                            height: 12,
                            xAxisIndex: [0],
                            bottom: '3%',
                            start: 0,
                            end: 100,
                            handleIcon:
                                'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
                            handleSize: '110%',
                            handleStyle: {
                                color: '#d3dee5'
                            },
                            textStyle: {
                                color: '#fff'
                            },
                            borderColor: '#90979c'
                        },
                        {
                            type: 'inside',
                            show: true,
                            height: 15,
                            start: 0,
                            end: 100
                        }
                    ],
                    series: [
                        {
                            name:
                                this.tabLabel == '平均超标天数'
                                    ? '平均超标天数'
                                    : this.tabLabel == '暂态发生频次'
                                    ? '暂态发生频次'
                                    : this.tabLabel == '暂态发生次数'
                                    ? '暂态发生次数'
                                    : '',
                            type: 'bar',
                            data: list1,
                            barMinHeight: 5,
                            barMaxWidth: '30px',
                            itemStyle: {
                                normal: {
                                    color: function (params) {
                                        if (params.value == _this.max * 0.03) {
                                            return new echarts.graphic.LinearGradient(
                                                0,
                                                1,
                                                0,
                                                0,
                                                [
                                                    {
                                                        offset: 1,
                                                        color: '#ccc'
                                                    }
                                                ],
                                                false
                                            )
                                        } else {
                                            return new echarts.graphic.LinearGradient(
                                                0,
                                                1,
                                                0,
                                                0,
                                                [
                                                    {
                                                        offset: 1,
                                                        color: echartsColor.FigureColor[0]
                                                    }
                                                ],
                                                false
                                            )
                                        }
                                    },

                                    label: {
                                        formatter: function (params) {
                                            if (params.value == _this.max * 0.03) {
                                                return ''
                                            } else {
                                                return params.value
                                            }
                                        },
                                        show: true,
                                        textStyle: {
                                            label: { show: true, position: 'top' },
                                            color: echartsColor.WordColor
                                        },
                                        fontSize: 12
                                    }
                                }
                            }
                        }
                    ]
                }
            }
            option && this.myChart1.setOption(option, true)
            window.echartsArr.push(this.myChart1)
            option1 && this.myChart2.setOption(option1, true)
            window.echartsArr.push(this.myChart2)
            option && this.myChart3.setOption(option, true)
            window.echartsArr.push(this.myChart3)
            option1 && this.myChart4.setOption(option1, true)
            window.echartsArr.push(this.myChart4)
            setTimeout(function () {
                // this.myChart1.resize()
                // this.myChart2.resize()
                // this.myChart3.resize()
                // this.myChart4.resize()
            }, 0)
        },

        //方法调用台账统计数据接口
        account1() {
            this.kai = false
            // var code11 = "Monitoring_Labels"; //干扰源类型
            // var code22 = "Event_Statis"; //指标类型
            // this.option11 = dicData(code11, [], 1);
            // this.option22 = dicData(code22, [], 1);
            // this.option11.shift();
            // this.option22.shift();
            // this.value11 = this.option11[0].id;
            // this.value22 = this.option22[0].id;

            this.isLoading = true
            this.isLoading2 = true
            this.isLoading = false
            //监测终端统计单位表格数据
            getAllRStatEventM({
                id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                type: this.$refs.interval.intervald,
                startTime: this.$refs.interval.timeValue[0],
                endTime: this.$refs.interval.timeValue[1]
            }).then(res => {
                this.isLoading = false
                this.serialData22 = res.data
            })

            getRStatEventIcon2({
                id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                type: this.$refs.interval.intervald,
                startTime: this.$refs.interval.timeValue[0],
                endTime: this.$refs.interval.timeValue[1],
                monitorID: this.value11,
                stasisID: this.value22
            }).then(res => {
                this.echarts2data = res

                getRStatEventIcon({
                    id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                    type: this.$refs.interval.intervald,
                    startTime: this.$refs.interval.timeValue[0],
                    endTime: this.$refs.interval.timeValue[1],
                    // harmonicID:this.value11,
                    // measurementTypeClassID:this.value22,
                    monitorID: this.value11,
                    stasisID: this.value22
                }).then(res => {
                    this.echarts1data = res

                    this.getCensus()
                })
            })
        },
        account() {
            this.kai = false
            // var code11 = "Monitoring_Labels"; //干扰源类型
            // var code22 = "Steady_Statis"; //指标类型
            // this.option11 = dicData(code11, [], 1);
            // this.option22 = dicData(code22, [], 1);
            // this.option11.shift();
            // this.option22.shift();
            // this.value11 = this.option11[0].id;
            // this.value22 = this.option22[0].id;

            this.isLoading = true
            this.isLoading2 = true
            this.isLoading = false
            //监测终端统计单位表格数据
            getAllRStatHarmonicM({
                id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                type: this.$refs.interval.intervald,
                startTime: this.$refs.interval.timeValue[0],
                endTime: this.$refs.interval.timeValue[1]
            }).then(res => {
                this.isLoading = false
                this.serialData11 = res.data
            })

            getRStatHarmonicIcon({
                id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                type: this.$refs.interval.intervald,
                startTime: this.$refs.interval.timeValue[0],
                endTime: this.$refs.interval.timeValue[1]
                // harmonicID:this.value11,
                // measurementTypeClassID:this.value22,
            }).then(res => {
                this.echarts1data = res

                this.getCensus()
            })
            getRStatHarmonicIcon2({
                id: JSON.parse(window.sessionStorage.getItem('Info')).deptId,
                type: this.$refs.interval.intervald,
                startTime: this.$refs.interval.timeValue[0],
                endTime: this.$refs.interval.timeValue[1]
            }).then(res => {
                this.echarts2data = res

                this.getCensus()
            })
        },
        // 点击行
        cellClickEvent({ row, column }) {
            this.rowName = row.rowName
            this.option22.map(item => (item.name == row.rowName ? (this.value22 = item.id) : ''))
            this.steady()
        }
    }
}
</script>

<style lang="less" scoped>
@import url('../../../styles/comStyle.less');
::v-deep .el-table .cell {
    text-align: center;
}
::v-deep .el-tabs--border-card > .el-tabs__content {
    padding: 10px;
}
.prop {
    font-weight: 100;
}
::v-deep .el-table th.el-table__cell.is-leaf {
    border-right: 1px solid #ebeef5;
}
::v-deep .el-table td.el-table__cell {
    border-right: 1px solid #ebeef5;
}
// ::v-deep .el-table--border .el-table__cell, .el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed{
//   border-right:1px solid #999;
//   border-bottom:1px solid #999;
// }
// ::v-deep  .el-table th.el-table__cell.is-leaf {
//   border-right:1px solid #999;
//   border-bottom:1px solid #999;
// }
// ::v-deep .el-table .el-table__header tr, .el-table .el-table__header th{
//   border-right:1px solid #999;
//   border-bottom:1px solid #999;
// }
// ::v-deep  .el-table td.el-table__cell {
//   border-right:1px solid #999;
//   border-bottom:1px solid #999;
// }
</style>
