<template>
    <div class="app-container">
      <els-table
        :columns="columns"
        :tableData="tableData"
        :searchList="searchList"
        @getTableData="getTableData"
        :pageSet="pageSet"
        :option="tableOption"
        :tableLoading="tableLoading"
      ></els-table>
    </div>
</template>

<script setup name="CastingPlan">
import { init } from './index.jsx'
import {queryList} from "@/api/produce/castingPlan";
const { proxy } = getCurrentInstance();
const tableLoading = ref(false)
//表单数据
const tableData = ref([])
//表单接口请求
const getTableData = (searchVal) => {
  tableLoading.value = true
  queryList(searchVal).then(res=>{
    pageSet.value.total = res.total
    tableData.value = res.rows
    tableLoading.value = false
  }).catch(err=>{
    console.log(err)
  })
}
getTableData({ pageSize:10, pageNum:1 })
const {
  searchList,
  columns,
  pageSet,
  tableOption
} = init({})
</script>

<style lang="scss" scoped>

</style>
