<template>
   <div class="h100">
     <common-layout

       ref="layoutRef"
       :filter-form="dataImputationRecordHomeFilterForm()"
       :table-header="dataImputationRecordHomeTableHeader"
       :get-table-list="getTableList"

       :form-attrs="{
       spanAttrs:{
         span:4
       }
       }"
     :table-attrs="{
       'has-operation':true
     }">
      <template #operation="{data}">
        <el-button type="info" @click="$emit('changeOperation','detail',data)">查看详情</el-button>
      </template>
     </common-layout>
   </div>
</template>

<script>
import CommonLayout from "@/components/CommonLayout.vue";
import {ref} from "vue";
import {dataImputationRecordHomeFilterForm} from "@/data/all-forms";
import {dataImputationRecordHomeTableHeader} from "@/data/all-table-header";
import {getDataImputationRecordHomeTableData} from "@/service/data-gj/data-imputation-record";
import {useActiveGetTableData} from "@/unit/use-method/usePagination";

export default {
  name: "DataImputationRecordHome",
  components: {CommonLayout},
  setup() {
    useActiveGetTableData(getTableList)
    const layoutRef = ref(null)
    function getTableList() {
      getDataImputationRecordHomeTableData({
        CATALOG_NAME:layoutRef.value.form.CATALOG_NAME,
        UNIT_CODE:layoutRef.value.form.UNIT_CODE,
        START_DATE:layoutRef.value.form.START_DATE,
        END_DATE:layoutRef.value.form.END_DATE,
        pageIndex:layoutRef.value.pageIndex,
        pageSize:layoutRef.value.pageSize,

      }).then(res => {
        layoutRef.value.getResData(res.msg[0].Rows||[],res.msg[0].TotalRowCount)
      })

    }
    return {
      getTableList,
      layoutRef,
      dataImputationRecordHomeFilterForm,
      dataImputationRecordHomeTableHeader
    }
  }
}
</script>

<style scoped lang="scss">

</style>
