<script setup name="finalReview">
import { onMounted, reactive, ref } from 'vue'
const tableListRef = ref(),
  column = reactive([
    {
      label: '序号',
      type: 'index',
      width: '80'
    },
    {
      label: '计划名称',
      key: 'name',
      prop: 'name',
      minWidth: '200'
    },
    {
      label: '评价时间',
      slot: 'time',
      width: '280'
    },
    {
      label: '评价项目数量',
      key: 'nums',
      prop: 'nums',
      minWidth: '120'
    },
    {
      label: '操作',
      slot: 'action',
      fixed: 'right',
      width: '80'
    }
  ]),
  data = ref([]),
  total = ref(1),
  getTableData = async (pageParams = tableListRef.value.pageParams) => {
    data.value = [
      {
        name: '2022年软件类项目绩效评价',
        time1: '2023-11-21 ~ 2023-11-30',
        time2: '2023-12-01 ~ 2022-12-15',
        time3: '2023-11-16 ~ 2023-12-30',
        nums: 36
      }
    ]
  }
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 #time="{ scope }">
          <p>自评：{{ scope.row.time1 }}</p>
          <p>复评：{{ scope.row.time2 }}</p>
          <p>核查：{{ scope.row.time3 }}</p>
        </template>
        <template #action="{ scope }">
          <a @click="$router.push({name:'finalProjectList',query:{id:scope.row.id}})">核查</a>
        </template>
      </table-list>
    </el-card>
  </div>
</template>
