<template>
    <div class="box">
        <div class="searchBar">
            <el-card class="box-card">
                <!-- <div slot="header" class="clearfix" style="font-size:15px">
                    <span>查询条件</span>
                </div> -->
                <el-form :inline="true" :model="formInline" class="demo-form-inline">
            <el-row :gutter="1">
                <el-form-item label="查询条件">
                </el-form-item>
                <el-form-item label="维度">
                <el-select v-model="value"  placeholder="请选择">
                <el-option
                    v-for="item in options"
                    :key="item.name"
                    :label="item.name"
                    :value="item.id">
                </el-option>
                </el-select>
                </el-form-item>
                <el-form-item label="选择时间：">
                <el-date-picker
                    v-model="timedate"
                    value-format="yyyy-MM-dd"
                    type="daterange"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    format="yyyy-MM-dd"
                >
                </el-date-picker>
                </el-form-item>

                <el-form-item>
                <el-button type="primary" @click="queryApData" :plain="true"
                    >查询</el-button
                >
                </el-form-item>
                <el-form-item>
                <el-button type="primary" @click="toExcel()">导出</el-button>
                </el-form-item>
            </el-row>
            </el-form>
            </el-card>
            <el-table
            id="callthepolicetable"
            :data="gridData"
            :row-style="{ height: '10px' }" 
            :cell-style="{ textAlign: 'center',padding:'1px' }" 
            :header-cell-style="headStyle"
            @sort-change="changeTableSort"
            style="font-size: 10px;margin-top:1%">
            <el-table-column label="报警信息统计排行">
            <!-- <el-table-column
              type="index"
              width="40">
            </el-table-column> -->
            <el-table-column
              type="index"
              label="序号"
               width="605">
            </el-table-column>
            <el-table-column
              prop="name"
              label="名称"
              width="605">
            </el-table-column>
            <el-table-column
            :sortable="'custom'"
              prop="frequencyday"
              label="频率（次）"
               width="605">
            </el-table-column>
            </el-table-column>        
       </el-table>
       <div style="margin-top:1%"> 
       <div id="chartHistogram" style="width: 100%; height: 250px; margin: auto"></div>
       </div>
       </div>
    </div>
</template>
<script>
    import rankingCallThePolice from "@assets/js/performanceAnalysis/rankingCallThePolice";
    export default rankingCallThePolice;
</script>
<style lang="scss" scoped>
    @import "@assets/css/performanceAnalysis/rankingCallThePolice.scss";
</style>