<template>
    <div class="personBox" id="zdrxxtj">
        <div class="asideTitle mt60">
            <div>
                <span class="title">重点人信息统计</span>
                <span :class="active == it ? 'active'+`${idx}`:''" @click="changeDate(it)" class="tabsBtn pointer" v-for="(it,idx) in btns" :key="it">{{ it }}</span>
            </div>
            <span style="color:#00B7FF;" class="f12 pointer">查看更多 》</span>
        </div>
        <div class="asideCnt">
            <div class="seachBox flex">
                <!-- 搜索 -->
                <MOSTY.Select v-model="listQuery.bqm" style="width: 120px;margin-right:10px" :dictEnum="search.xd" clearable placeholder="选择标签" />
                <MOSTY.Other v-model="listQuery.nr" clearable placeholder="输入内容" />
                <el-button type="primary">搜索</el-button>
            </div>
            <MyTable @changePage="changePage" customClass="zdy_peo_table" :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight" :key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" >
            </MyTable>
        </div>
    </div>
</template>

<script setup>
import * as MOSTY from "@/components/MyComponents/index";
import MyTable from "@/components/aboutTable/DarkTable.vue";
import { reactive, ref,onMounted } from "vue";
const btns = ref(['重点人','重点群体'])
const active = ref('重点人');
const pageData = reactive({
  tableData: [
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
    { xm: "王五", sfzh: "330102199505057890", bq: "吸毒人员" },
  
  ],
  keyCount: 0,
  tableConfiger: {
    loading: false,
    rowHieght: 61,
    haveControls: false,
    showSelectType: "null",
    stripe:true
  },
  total: 0,
  pageConfiger: {
    pageSize: 20,
    pageNum: 1
  }, //分页
  tableColumn: [
    { label: "姓名", prop: "xm", showOverflowTooltip: true },
    { label: "身份证号码", prop: "sfzh",showOverflowTooltip: true },
    { label: "标签", prop: "bq",showOverflowTooltip: true },
  ]
});
const search = reactive({
  xd: [
    { label: "吸毒", value: "10" },
    { label: "贩毒", value: "20" }
  ],
});
const listQuery = ref([])
onMounted(() => {
  tabHeightFn();
  window.onresize = function () {
    tabHeightFn();
  };
});

const changeDate = (val) =>{
    active.value = val;
}
// 滚动分页加载
const changePage = () =>{

}
// 表格高度计算
const tabHeightFn = () => {
  pageData.tableHeight =  document.getElementById('zdrxxtj').offsetHeight - 160;
};

</script>
<style lang="scss" scoped>
@import "@/assets/css/homeScreen.scss";
.personBox{
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0 10px;
    box-sizing: border-box;
    .seachBox{
        height: 40px;
        margin: 10px 0;
    }
    ::v-deep .el-input__inner{
        background: rgba(0,22,83,0.4);
        border-radius: 0;
        border: 1px solid #0072FF;
        color: #fff;
        height: 40px;
    }
    ::v-deep .el-button {
        height: 40px;
        border-radius: 0 4px 4px 0;
    }
}
.tabsBtn{
    font-size: 12px;
    padding: 5px 10px;
    background: #17459E;
    border: 1px solid #36A0FF;
    box-shadow: inset 0 0 1px #5D82D9;
}
.active0{
    background: #36A0FF;
    border-radius: 4px 0px 0px 4px;
    border: 1px solid #36A0FF;
}
.active1{
    background: #36A0FF;
    border-radius: 0px 4px 4px 0px;
    border: 1px solid #36A0FF;
}
.transition {
  transition: all 0.5s;
}
</style>
<style lang="scss">
.zdy_peo_table td.el-table__cell {
    color: #ffffff !important;
}
.zdy_peo_table th.el-table__cell {
    color: #ffffff !important;
    font-size: 15px;
}
.zdy_peo_table .el-table__body tr.el-table__row--striped td.el-table__cell{
    background: transparent !important;
}
.zdy_peo_table  .table_blue_row{
    background: linear-gradient( to right, #001D4B 0%, rgba(0,29,75,0.1) 100%) !important;
}
</style>