<template>
    <div class="bbsl-common-page" @click="commonPageClick">
        <div class="bbsl-table-search">
            <el-form v-model="queryParam" :inline="true">
                <el-row :gutter="10">
                    <el-col :span="6">
                        <el-form-item label="河流名称">
                            <el-select
                                size="mini"
                                filterable
                                v-model="queryParam.params.rvCode"
                                clearable
                                placeholder="请选择河流名称"
                            >
                                <el-option
                                    v-for="item in rvNames"
                                    :key="item.id"
                                    :label="item.name"
                                    :value="item.code"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="测点名称">
                            <el-input
                                size="mini"
                                clearable
                                placeholder="请输入测点名称"
                                v-model="queryParam.params.stnm"
                            ></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="测站">
                            <el-select
                                size="mini"
                                filterable
                                v-model="queryParam.params.stcd"
                                clearable
                                placeholder="请选择测站"
                            >
                                <el-option
                                    v-for="item in stcds"
                                    :key="item.id"
                                    :label="item.stnm"
                                    :value="item.stcd"
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item>
                            <el-button
                                type="primary"
                                icon="el-icon-search"
                                size="mini"
                                @click="onClickSearch"
                                >搜索</el-button
                            >
                            <el-button
                                icon="el-icon-refresh"
                                size="mini"
                                @click="resetQuery"
                                >重置</el-button
                            >
                            <el-button
                                size="mini"
                                icon="el-icon-download"
                                type="warning"
                                @click="updateExcl"
                                >导出</el-button
                            >
                            <el-button type="text" @click.stop="openMore"
                                >更多
                                <i
                                    :class="
                                        showMore
                                            ? 'el-icon-arrow-up'
                                            : 'el-icon-arrow-down'
                                    "
                                ></i>
                            </el-button>
                        </el-form-item>
                    </el-col>
                </el-row>
                <div
                    class="bbsl-search-more"
                    style="width: 1200px"
                    v-if="showMore"
                >
                    <el-row :gutter="10">
                        <el-col :span="6">
                            <el-form-item label="水势">
                                <el-select
                                    size="mini"
                                    v-model="queryParam.params.wptn"
                                    clearable
                                    placeholder="请选择水势"
                                >
                                    <el-option
                                        v-for="item in wptns"
                                        :key="item.id"
                                        :label="item.name"
                                        :value="item.value"
                                    ></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="在线状态">
                                <el-select
                                    size="mini"
                                    v-model="queryParam.params.usfl"
                                    clearable
                                    placeholder="请选择在线状态"
                                >
                                    <el-option
                                        v-for="item in statuss"
                                        :key="item.value"
                                        :label="item.name"
                                        :value="item.value"
                                    >
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="应用分类">
                                <el-select
                                    size="mini"
                                    v-model="queryParam.params.appType"
                                    clearable
                                    placeholder="请选择应用分类"
                                >
                                    <el-option
                                        v-for="item in czyyfl"
                                        :key="item.value"
                                        :label="item.name"
                                        :value="item.value"
                                    >
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="行政区划">
                                <el-cascader
                                    clearable
                                    filterable
                                    size="mini"
                                    :options="basAdNames"
                                    v-model="queryParam.params.addvcd"
                                    :props="setKesLabel"
                                    @change="onhouChange"
                                >
                                    <template slot-scope="{node, data}">
                                        <span>{{ data.name }}</span>
                                        <span v-if="!node.isLeaf">
                                            ({{
                                                data.children === []
                                                    ? ''
                                                    : data.children.length
                                            }})
                                        </span>
                                    </template>
                                </el-cascader>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </div>
            </el-form>
        </div>
        <div class="bbsl-table-content" ref="contentPanel">
            <div class="bbsl-btn-content" ref="btnPanel"></div>
            <!-- 
        :row-key="getRowKey"
        @selection-change="handleSelectionChange" 
        ref="multipleSelection"-->
            <el-table
                :row-class-name="rowStyle"
                size="mini"
                :height="tableMaxHeight - 50"
                :style="{width: '100%'}"
                v-loading="loading"
                border
                :data="tableData"
                :header-cell-style="{'text-align': 'center'}"
                :cell-style="{'text-align': 'center'}"
            >
                <el-table-column
                    fixed
                    type="index"
                    width="55"
                    label="序号"
                ></el-table-column>
                <el-table-column
                    min-width="110"
                    fixed
                    sortable
                    prop="stcd"
                    label="测站编码"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    min-width="130"
                    fixed
                    sortable
                    prop="stnm"
                    label="测站名称"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    min-width="150"
                    sortable
                    fixed
                    prop="tm"
                    label="上报时间"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                    min-width="140"
                    sortable
                    prop="rvName"
                    label="所属河流"
                    show-overflow-tooltip
                >
                </el-table-column>
                <!-- <el-table-column min-width="180"
                         sortable
                         prop="stlc"
                         label="测站地址"
                         show-overflow-tooltip>
        </el-table-column> -->
                <!-- <el-table-column
          min-width="150"
          sortable
          prop="areaName"
          label="行政区划"
          show-overflow-tooltip
        ></el-table-column> -->

                <el-table-column
                    min-width="150"
                    sortable
                    prop="z"
                    label="水位(m)"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                    min-width="150"
                    sortable
                    prop="transfinite"
                    label="超限"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    min-width="150"
                    sortable
                    prop="ensureValue"
                    label="保证线"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    min-width="150"
                    sortable
                    prop="alertValue"
                    label="警戒线"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                    min-width="150"
                    sortable
                    prop="q"
                    label="流量(m/s)"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                    min-width="100"
                    sortable
                    prop="rwptn"
                    label="水势"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                    min-width="180"
                    sortable
                    prop="xsavv"
                    label="断面平均流速(m/s)"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    min-width="180"
                    sortable
                    prop="xsmxv"
                    label="断面最大流速(m/s)"
                    show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                    min-width="110"
                    sortable
                    prop="warnGrade"
                    label="报警等级"
                    show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                    min-width="150"
                    sortable
                    prop="warnVal"
                    label="报警阈值"
                    show-overflow-tooltip
                ></el-table-column>

                <el-table-column
                    min-width="110"
                    sortable
                    prop="appTypeName"
                    label="应用分类"
                    show-overflow-tooltip
                >
                </el-table-column>

                <el-table-column
                    min-width="110"
                    sortable
                    prop="usfl"
                    label="在线状态"
                    show-overflow-tooltip
                >
                    <template slot-scope="scope">
                        <!-- <span v-if="scope.row.usfl === 1 || scope.row.usfl === '1'"
              >在线</span
            >
            <span v-if="scope.row.usfl === 0 || scope.row.usfl === '0'"
              >不在线</span
            >
            <span v-else>----</span> -->
                        <span
                            :style="{
                                color:
                                    scope.row.usfl === 1 ||
                                    scope.row.usfl === '1'
                                        ? '#09ef09'
                                        : 'red',
                            }"
                            v-if="
                                scope.row.usfl === 1 || scope.row.usfl === '1'
                            "
                            >在线</span
                        >
                        <span
                            :style="{
                                color:
                                    scope.row.usfl === 0 ||
                                    scope.row.usfl === '0'
                                        ? 'red'
                                        : '#09ef09',
                            }"
                            v-if="
                                scope.row.usfl === 0 || scope.row.usfl === '0'
                            "
                            >不在线</span
                        >
                    </template>
                </el-table-column>
                <el-table-column
                    fixed="right"
                    min-width="150"
                    sortable
                    label="操作"
                    show-overflow-tooltip
                >
                    <template slot-scope="scope">
                        <el-button
                            size="mini"
                            plain
                            @click="openDate(scope.row)"
                            >水位曲线图</el-button
                        >
                    </template>
                </el-table-column>
            </el-table>
            <el-pagination
                ref="paginationPanel"
                class="bbsl-pagination"
                align="right"
                background
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="queryParam.pageBean.page"
                :page-sizes="[20, 30, 40, 50]"
                :page-size="queryParam.pageBean.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="total"
            ></el-pagination>
        </div>
        <el-dialog
            :title="this.title + '曲线图'"
            width="80%"
            top="8vh"
            :before-close="handleClose"
            :visible.sync="showFormDias"
        >
            <div class="serchBlock" style="margin: 0 0 10px 0">
                <span>选择日期：</span>
                <el-date-picker
                    size="mini"
                    style="width: 350px"
                    @change="changeChart"
                    v-model="times"
                    format="yyyy-MM-dd HH:mm:ss"
                    value-format="yyyy-MM-dd HH:mm:ss"
                    type="datetimerange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    :clearable="false"
                >
                </el-date-picker>
            </div>
            <div style="width: 100%; height: 500px; display: flex">
                <el-table
                    style="width: 40%"
                    :data="echartLiat"
                    v-loading="loadingChartData"
                    stripe
                    height="500"
                >
                    <el-table-column label="序号" type="index" align="center" />
                    <el-table-column
                        label="时间"
                        prop="tm"
                        align="center"
                        show-overflow-tooltip
                    />
                    <el-table-column
                        label="水位"
                        prop="zz"
                        align="center"
                        show-overflow-tooltip
                    />
                </el-table>
                <div
                    id="echartsBox"
                    style="width: 60%; height: 500px"
                    ref="box"
                ></div>
            </div>
            <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="handleClose">退 出</el-button>
            </span>
        </el-dialog>
        <riverDerivedData
            ref="Time"
            :appType="queryParam.params.appType"
        ></riverDerivedData>
    </div>
</template>
<script>
import riverDerivedData from './model/riverDerivedData.vue'
import swStQuery from '@/api/monitor/resMonitor/swStQuery.js'
import dictUtils from '@/components/dict/DictSelectUtils.js'
import {TableMixin} from '@/mixins/tableMixin'
import req from '@/request.js'
import * as echarts from 'echarts'
export default {
    name: 'resWaterChilfren',
    components: {
        riverDerivedData,
    },
    mixins: [TableMixin],
    data() {
        return {
            title: '',
            yjdjs: [],
            loading: false,
            basAdNames: [], //行政区
            wptns: [], //水势下拉
            rvNames: [], //河流树
            stcds: [], //测站下拉
            statuss: [
                {name: '在线', value: '1'},
                {name: '不在线', value: '0'},
            ],
            multipleSelection: [], // 复选框
            setKesLabel: {
                value: 'code',
                label: 'name',
                children: 'children',
            },
            setKesLabels: {
                value: 'code',
                label: 'name',
                children: 'children',
            },
            queryParam: {
                pageBean: {
                    pageSize: 20,
                    page: 1,
                },
                params: {
                    appType: null,
                    rvCode: null,
                    stcd: null,
                    stnm: null,
                    addvcd: null,
                    usfl: null,
                    wptn: null, //水势
                },
            },
            tableData: [],
            pId: '',
            total: 0,
            showFormDias: false,
            dates: [],
            dangerdz: [],
            dangerjz: [],
            dangerzs: [], //水位
            dangerQ: [], //流量
            echartLiat: [],
            loadingChartData: false,
            czyyfl: [],
            times: [], //选择时间
            query: {
                stcd: null,
                stnm: null,
                startTime: null,
                endTime: null,
            },
            timeList: [],
            jzList: [],
            bzList: [],
            fhList: [],
            zgList: [],
            zzList: [],
            StationId: '',
        }
    },
    created() {
        this.StationId = window.sessionStorage.getItem('StationId')
        this.czyyfl = dictUtils.getDictItemsFromCache('czyyfl')
        if (
            this.StationId != '' &&
            this.StationId != null &&
            this.StationId != undefined
        ) {
            this.queryParam.params.stcd = this.StationId
            this.queryParam.pageBean.page = 1
            this.getDateList()
            this.getSysDict()
            window.sessionStorage.removeItem('StationId')
        } else {
            this.getSysDict()
        }
    },
    mounted() {
        //自动刷新获取数据(1000*60*10=>毫秒*秒*分钟，此时表示为10分钟)
        this.refreshData = setInterval(() => {
            this.getDateList()
        }, 1000 * 60 * 10)
    },
    //生命周期若已设置定时器，需清空定时器beforeDestroy()
    beforeDestroy() {
        this.refreshData = null
    },
    methods: {
        // 导出表格弹窗显示
        updateExcl() {
            this.$refs.Time.openShare()
        },
        openMore() {
            this.showMore = !this.showMore
        },
        onhouChange(val) {
            if (val) {
                this.queryParam.params.addvcd = val[val.length - 1]
            } else {
                this.queryParam.params.addvcd = null
            }
        },
        handleSizeChange(val) {
            this.queryParam.pageBean.pageSize = val
            this.getDateList()
        },
        handleCurrentChange(val) {
            this.queryParam.pageBean.page = val
            this.getDateList()
        },
        openDate(val) {
            this.echartLiat = []
            this.loadingChartData = true
            this.title = val.stnm
            this.query.startTime = null //每次打开弹窗时清空上次手动选择的时间
            this.query.endTime = null //每次打开弹窗时清空上次手动选择的时间
            this.times = [] //每次打开弹窗时清空上次手动选择的时间
            this.query.stcd = val.stcd //点击打开曲线图时赋值
            this.query.stnm = val.stnm //点击打开曲线图时赋值
            var moment = require('moment') //打开时默认时间为一天前至获取当前年月日时分秒
            var _today = moment()
            this.showFormDias = true
            let endTime = moment().format('L') //当前年月日
            let time = moment().format('LTS') //当前时分秒
            endTime = endTime.replace(/\//g, '-')
            endTime = endTime + ' ' + time
            let startTime = _today
                .subtract(1, 'days')
                .format('YYYY-MM-DD') /*前一天的时间*/
            startTime = startTime + ' ' + time
            this.query.startTime = startTime
            this.query.endTime = endTime
            this.times = [startTime, endTime]
            let data = {
                query: {
                    stnm: val.stnm,
                    stcd: val.stcd,
                    startTime: startTime,
                    endTime: endTime,
                    sttp: val.sttp,
                },
            }
            this.timeList = []
            this.jzList = []
            this.bzList = []
            this.fhList = []
            this.zgList = []
            this.zzList = []
            this.echartLiat = []
            swStQuery.getChartsList(data.query, (res) => {
                this.echartLiat = res.value
                if (res.value.length) {
                    this.echartLiat.forEach((e) => {
                        this.timeList.push(e.tm)
                        this.jzList.push(e.jz)
                        this.bzList.push(e.bz)
                        this.fhList.push(e.fh)
                        this.zgList.push(e.zg)
                        this.zzList.push(e.zz)
                    })
                    // this.dates = this.echartLiat.map((item) => {
                    //   return item.tm
                    // })
                    // this.dangerdz = this.echartLiat.map((item) => {
                    //   return item.dz
                    // })
                    // this.dangerjz = this.echartLiat.map((item) => {
                    //   return item.jz
                    // })
                    // this.dangerzs = this.echartLiat.map((item) => {
                    //   return item.zz
                    // })
                    // this.dangerQ = this.echartLiat.map((item) => {
                    //   return item.q
                    // })
                    this.$nextTick(() => {
                        this.getCharts()
                    })
                } else {
                    this.timeList = []
                    this.jzList = []
                    this.bzList = []
                    this.fhList = []
                    this.zgList = []
                    this.zzList = []
                    this.$nextTick(() => {
                        this.getCharts()
                    })
                }
                this.loadingChartData = false
            })
        },
        changeChart(val) {
            this.echartLiat = []
            this.loadingChartData = true
            if (val) {
                this.query.startTime = val[0]
                this.query.endTime = val[1]
                this.timeList = []
                this.jzList = []
                this.bzList = []
                this.fhList = []
                this.zgList = []
                this.zzList = []
                this.echartLiat = []
                swStQuery.getChartsList(this.query, (res) => {
                    if (res.value.length) {
                        this.echartLiat = res.value
                        this.echartLiat.forEach((e) => {
                            this.timeList.push(e.tm)
                            this.jzList.push(e.jz)
                            this.bzList.push(e.bz)
                            this.fhList.push(e.fh)
                            this.zgList.push(e.zg)
                            this.zzList.push(e.zz)
                        })
                    }
                    this.$nextTick(() => {
                        console.log(this.dangerzs, 666)
                        this.getCharts()
                    })
                    this.loadingChartData = false
                })
            } else {
                this.loadingChartData = false
                this.$message.warning('请选择查询时间范围！')
                this.query.startTime = ''
                this.query.endTime = ''
                this.times = []
                this.timeList = []
                this.jzList = []
                this.bzList = []
                this.fhList = []
                this.zgList = []
                this.zzList = []
                this.echartLiat = []
                this.$nextTick(() => {
                    this.getCharts()
                })
                return
                swStQuery.getChartsList(this.query, (res) => {
                    if (res.value.length) {
                        this.echartLiat = res.value
                        this.echartLiat.forEach((e) => {
                            this.timeList.push(e.tm)
                            this.jzList.push(e.jz)
                            this.bzList.push(e.bz)
                            this.fhList.push(e.fh)
                            this.zgList.push(e.zg)
                            this.zzList.push(e.zz)
                        })
                    }
                    this.$nextTick(() => {
                        console.log(this.dangerzs, 777)
                        this.getCharts()
                    })
                    this.loadingChartData = false
                })
            }
        },
        getCharts() {
            let chartDom = document.getElementById('echartsBox')
            let myChart = echarts.init(chartDom)
            let option = {
                title: {
                    text: '',
                },
                tooltip: {
                    trigger: 'axis',
                },
                legend: {
                    data: ['保证水位', '警戒水位', '当前水位'],
                },
                grid: {
                    left: '8%',
                    right: '4%',
                    bottom: '6%',
                    containLabel: true,
                },
                // toolbox: {
                //   feature: {
                //     saveAsImage: {},
                //   },
                // },
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    data: this.timeList,
                },
                yAxis: {
                    type: 'value',
                    scale: true,
                },
                series: [
                    {
                        name: '保证水位',
                        type: 'line',
                        emphasis: {
                            focus: 'series',
                        },
                        data: this.bzList,
                        itemStyle: {
                            normal: {
                                color: 'yellow',
                                lineStyle: {
                                    color: 'yellow',
                                },
                            },
                        },
                    },
                    {
                        name: '警戒水位',
                        type: 'line',
                        emphasis: {
                            focus: 'series',
                        },
                        data: this.jzList,
                        itemStyle: {
                            normal: {
                                color: '#b22222',
                                lineStyle: {
                                    color: '#b22222',
                                },
                            },
                        },
                    },

                    {
                        name: '当前水位',
                        type: 'line',
                        emphasis: {
                            focus: 'series',
                        },
                        data: this.zzList,
                        itemStyle: {
                            color: '#0091ff',
                        },
                    },
                ],
            }
            option && myChart.setOption(option)
        },
        floatSub(arg1, arg2) {
            var r1, r2, m, n
            try {
                r1 = arg1.toString().split('.')[1].length
            } catch (e) {
                r1 = 0
            }
            try {
                r2 = arg2.toString().split('.')[1].length
            } catch (e) {
                r2 = 0
            }
            m = Math.pow(10, Math.max(r1, r2))
            console.log(m)
            //动态控制精度长度
            n = r1 >= r2 ? r1 : r2
            return ((arg1 * m - arg2 * m) / m).toFixed(n)
        },
        getDateList() {
            this.loading = true
            this.tableData = []
            swStQuery.ListGets(this.queryParam, (res) => {
                this.total = res.value.total
                this.tableData = JSON.parse(JSON.stringify(res.value.rows))
                this.tableData.forEach((e) => {
                    this.wptns.forEach((w) => {
                        if (e.rwptn == w.value) {
                            e.rwptn = w.name
                        }
                    })
                    this.yjdjs.forEach((c) => {
                        if (e.warnGrade == c.value) {
                            e.level = c.name
                        }
                    })
                    this.czyyfl.forEach((c) => {
                        if (e.appType == c.value) {
                            e.appTypeName = c.name
                        }
                    })
                    e.thresholdData.forEach((t) => {
                        if (t.gradeName == '警戒') {
                            e.alertValue = t.fsltdz
                        } else if (t.gradeName == '保证') {
                            e.ensureValue = t.fsltdz
                        }
                    })
                    if (e.z > e.alertValue) {
                        e.transfinite = this.floatSub(e.z, e.alertValue)
                    } else {
                        e.transfinite = '--'
                    }
                })
                this.$set(this.tableData)
                this.loading = false
            })
        },
        handleSelectionChange(val) {
            this.multipleSelection = val.map((item) => {
                return item.id
            })
        },

        handleClose() {
            this.echartLiat = []
            this.showFormDias = false
        },
        // // 点击查询
        onClickSearch() {
            this.queryParam.pageBean.page = 1
            this.getDateList()
        },
        // 重置
        resetQuery() {
            this.queryParam.params = {}
            this.onClickSearch()
        },
        rowStyle({row, rowIndex}) {
            if (row.warnGrade == '2') {
                return 'orange_class'
            } else if (row.warnGrade == '1') {
                return 'error_class'
            } else if (row.warnGrade == 3) {
                return 'success_class'
            }
            return ''
        },
        //获取字典数据
        getSysDict() {
            let portal = window.context.portal
            return new Promise((resolve, reject) => {
                req.post(
                    portal + '/sys/sysDictionary/v1/queryAllDictItems'
                ).then(
                    (response) => {
                        resolve(response.data)
                        this.yjdjs = response.data.yjdj
                        this.wptns = response.data.ss //水电站类型
                        // 行政区查询
                        swStQuery.getbasAdName({}, (res) => {
                            this.basAdNames = res.value
                        })
                        swStQuery.getrvName({}, (res) => {
                            this.rvNames = res.value
                        })
                        swStQuery.getStcd({}, (res) => {
                            this.stcds = res.value
                        })

                        this.getDateList()
                    },
                    (error) => {
                        reject(error)
                    }
                )
            })
        },
    },
}
</script>
<style lang="scss">
.btn-content {
  display: flex;
}

.el-select-dropdown__item span {
  color: rgb(51, 51, 51) !important;
}

.el-select-dropdown__item {
  color: #9a9a9a !important;
}

.el-select-dropdown__item.hover,
.el-select-dropdown__item:hover {
  background: #f5f7fa;
}

.btn-content :first-child {
  margin: 0 0 0 0 !important;
}

.el-switch__label--left {
  position: relative;
  left: 45px;
  color: #fff;
  z-index: -1111;
}

.el-switch__core {
  width: 50px !important;
}

.success_class {
  td {
    div {
      color: red !important;
    }
  }
}

.orange_class {
  td {
    div {
      color: #FFAE00 !important;
    }
  }
}

.error_class {
  td {
    div {
      color: rgb(185, 185, 0) !important;
    }
  }
}

.el-switch__label--right {
  position: relative;
  right: 46px;
  color: #fff;
  z-index: -1111;
}

.el-switch__label--right.is-active {
  z-index: 1111;
  color: #fff !important;
}

.el-switch__label--left.is-active {
  z-index: 1111;
  color: #9c9c9c !important;
}

.sampling {
  ::v-deep .el-dialog__body {
    padding: 30px 20px 0 20px;
  }
}

::-webkit-scrollbar {
  background: #fff !important;
}

.bbsl-pagination {
  bottom: 70px !important;
}

.pagination {
  position: fixed;
  bottom: 20px;
  right: 20px;
}

.bbsl-table-content {
  height: calc(100% - 106px);
}
</style>
