<template>
  <div class="dataCenter">
    <div class="header">草稿箱</div>
    <div class="content">
      <customs-table
        ref="table"
        :table-data="tableData"
        :columns="columns"
        :header-class="'newHeader'"
        :list-loading="listLoading"
        :current-page="pageIndex"
        :total-count="total"
        :page-sizes="pageSizes"
        :page-size="pageSize"
        @pageSizeChange="handleSizeChange"
        @currentPageChange="handleCurrentChange"
      />
    </div>
  </div>
</template>
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
export default {
  // 数据概览
  name: "",
  components: {
    CustomsTable,
  },
  mixins: [paginationMixin],
  data() {
    return {
      listLoading: false,
      selectedIndex: sessionStorage.getItem("homeSelectedIndex") - 0 || 0,
      headList: ["社区筛查", "医院筛查", "体检筛查"],
      columns: [
        {
          label: "医联体",
          minWidth: 120,
          value: "groupName",
        },
        {
          label: "姓名",
          minWidth: 120,
          value: "name",
        },
        {
          label: "性别",
          minWidth: 120,
          value: "sex",
        },

        {
          label: "身份证",
          minWidth: 120,
          value: "idCard",
        },

        {
          label: "年龄",
          minWidth: 120,
          value: "age",
        },

        {
          label: "筛查时间",
          minWidth: 120,
          value: "screenTime",
        },

        {
          label: "风险评估结果",
          minWidth: 120,
          value: "result",
        },
        {
          label: "上次随访时间",
          minWidth: 120,
          value: "targetFieldCode",
        },
        {
          label: "筛查审核状态",
          minWidth: 180,
          value: "createTime",
        },
        {
          label: "操作",
          width: 220,
          fixed: "right",
          operType: "button",
          operations: [
            {
              func: this.rowOpration,
              formatter(row) {
                return {
                  label: "编辑",
                  type: "text",
                }
              },
            },
            {
              func: this.rowOpration,
              formatter(row) {
                return {
                  label: "删除",
                  type: "text",
                }
              },
              style: {
                color: "#FA6400",
              },
            },
          ],
        },
      ],
      tableData: [
        {
          name: "1",
          1: 2,
        },
      ],
    }
  },
  watch: {},
  mounted() {},
  methods: {
    setSelectedIndex(i) {
      console.log(this.selectedIndex)
      this.selectedIndex = i
      sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
    },
  },
}
</script>
<style lang="scss" scoped>
.dataCenter {
  padding: 24px 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  .header {
    display: flex;
    text-indent: 24px;
    margin-bottom: 20px;
    height: 50px;
    line-height: 32px;
    font-size: 14px;
    font-family: AlibabaPuHuiTiR;
    color: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid #f3f3f3;
  }
  .content {
    padding: 0 24px;
  }
}
</style>