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

     :table-header="safeRecordHomeTableHeader"
     :filter-form="safeRecordHomeFilterForm()"
     :get-table-list="getTableList"
      ref="layoutRef"


     :form-attrs="{
       spanAttrs: {
         span:5
       }
     }"
     :table-attrs="{


     }"


   >
  <template #RUN_STATES="{data}">
    {{data['RUN_STATES'] === '1'?'成功':'失败'}}
  </template>
   </common-layout>
 </div>
</template>

<script>
import CommonLayout from "@/components/CommonLayout.vue";
import {safeRecordHomeFilterForm} from "@/data/all-forms";
import {ref} from "vue";
import {safeRecordHomeTableHeader} from "@/data/all-table-header";
import {getSafeRecordHomeTableD} from "@/service/zsk/safe-record";

export default {
  name: "SafeRecord",
  components: {CommonLayout},
  setup() {
    const layoutRef = ref(null)
    function getTableList(){
      getSafeRecordHomeTableD({
        pageIndex:layoutRef.value.pageIndex,
        pageSize:layoutRef.value.pageSize,
        CATALOG_NAME:layoutRef.value.form.CATALOG_NAME,
        UNIT_CODE:layoutRef.value.form.UNIT_CODE,
      }).then(res =>{
        layoutRef.value.getResData(res.msg[0].Rows||[],res.msg[0].TotalRowCount)
      })
    }
    return {
      safeRecordHomeFilterForm,
      layoutRef,
      getTableList,
      safeRecordHomeTableHeader
    }
  }
}
</script>

<style scoped lang="scss">

</style>
