<!-- 工作统计 -->
<template>
  <div>
    <div class="h-layout space-between h-center">
      <div>
        <div class="h-layout">
          <div class="tool-item" @click="getList">
            <svg-icon name="refurbish" class="icon" />
            <span>刷新</span>
          </div>
        </div>
      </div>
    </div>
    <el-table
      ref="loading"
      class="table"
      v-loading="tableDataloading"
      :data="tableData"
      header-row-class-name="el-one-header"
      border
    >
      <el-table-column
        prop="cName"
        align="center"
        :resizable="true"
        label="村名"
      >
      </el-table-column>
      <el-table-column
        prop="aa"
        align="center"
        :resizable="true"
        label="常规工作"
      >
        <el-table-column
          prop="a"
          align="center"
          label="进行中"
        >
        </el-table-column>
        <el-table-column
          prop="b"
          align="center"
          label="已完成"
        ></el-table-column>
      </el-table-column>
      <el-table-column
        prop="bb"
        :resizable="true"
        align="center"
        label="督办工作"
      >
        <el-table-column
          prop="a"
          align="center"
          label="进行中"
        ></el-table-column>
        <el-table-column
          prop="b"
          align="center"
          label="已完成"
        ></el-table-column>
      </el-table-column>
      <el-table-column
        prop="yj"
        :resizable="true"
        align="center"
        label="应急工作"
      >
        <el-table-column
          prop="cz"
          align="center"
          label="进行中"
        ></el-table-column>
        <el-table-column
          prop="cz"
          align="center"
          label="已完成"
        ></el-table-column>
      </el-table-column>
      <el-table-column
        prop="dj"
        :resizable="true"
        align="center"
        label="党建工作"
      >
        <el-table-column
          prop="cz"
          align="center"
          label="进行中"
        ></el-table-column>
        <el-table-column
          prop="cz"
          align="center"
          label="已完成"
        ></el-table-column>
      </el-table-column>
    </el-table>
      <!-- <el-table-column key="年" label="每月达标率（%）">
        <el-table-column
          v-for="(item, index) in months"
          :key="item"
          :label="item"
        >
          <template #default="scope">
            <span>{{ scope.row.monthData[index].complianceRate }}</span>
          </template>
        </el-table-column> -->
    <!-- 分页 -->
    <el-pagination
      class="pagination"
      @size-change="getList"
      @current-change="getList"
      v-model:current-page="currentPage"
      :page-sizes="[10, 15, 20, 30]"
      v-model:page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
      background
    >
    </el-pagination>
  </div>
</template>

<script lang='ts' setup>
import { onMounted, reactive, ref } from "vue";
import { ElMessageBox } from "element-plus";

const search = ref([]);
const currentPage = ref(1);
const pageSize = ref(10);
const total = ref(0);
const tableData = ref([{ cName: "xxx村名",aa:{a:1,b:2},bb:[{a:'1',b:'2'}] }, { cName: "xxx村名" }]);
</script>

<style lang="scss" scoped>
.table {
    margin-top: 16px;
}
</style>
