<script setup name="reformCheck">
import { onMounted, reactive, ref } from 'vue'
import { list } from '@/http/apis/performanceEvaluation/reformCheck'
const tableListRef = ref(),
  column = reactive([
    {
      label: '序号',
      type: 'index',
      width: '80'
    },
    {
      label: '评价计划',
      key: 'name',
      prop: 'name'
    },
    {
      label: '待核查项目',
      key: 'unRectifyAuditNumber',
      prop: 'unRectifyAuditNumber'
    },
    {
      label: '已核查项目',
      key: 'rectifiedAuditNumber',
      prop: 'rectifiedAuditNumber'
    },
    {
      label: '操作',
      slot: 'action',
      fixed: 'right',
      width: '80'
    }
  ]),
  data = ref([]),
  total = ref(0),
  getTableData = async (pageParams = tableListRef.value.pageParams) => {
    const res = await list({
      ...pageParams
    })
    data.value = res.data.records
    total.value = res.data.total
  }
onMounted(() => {
  getTableData()
})
</script>

<template>
  <div>
    <el-card>
      <template #header>列表</template>
      <table-list
        ref="tableListRef"
        :column="column"
        :data="data"
        :total="total"
        @get-table-data="getTableData"
      >
        <template #action="{scope}">
          <a @click="$router.push({name:'reformCheckProjectList',query:{title:scope.row.name,planId:scope.row.id}})">详情</a>
        </template>
      </table-list>
    </el-card>
  </div>
</template>
