<template>
  <div class="page-box" v-loading="Loading.appMainLoading">
    <tablePagination
      v-if="apiColumns_Table"
      :currenButtonData="currenButtonData"
      :tableData="tableData"
      :tableLoading="Loading.tableLoading"
      :tableColumns="apiColumns_Table"
      @rowDrop="rowDrop"
      :totalCount="totalCount"
      :multipleSelection="multipleSelection"
      :MaxResultCount="PageListParams.MaxResultCount"
      @topbutton="topbutton"
      @inlineDialog="inlineDialog"
      @sortChange="sortChange"
      @alertoldSkipCount="alertoldSkipCount"
      @alterResultCount="alterResultCount"
      @handleSelectionChange="handleSelectionChange"
      :currentPageProps="oldSkipCount"
      :quicklySearchOption="quicklySearchOption"
      @quicklySearchClick="quicklySearchClick"
      @quicklySearchClear="quicklySearchClear"
      :primarySearchOption="primarySearchOption"
      @overallSearchFormClick="overallSearchFormClick"
      :httpOverallSearchData="httpOverallSearchData"
    ></tablePagination>
    <curren-Drawer
      :title="apiColumns_DesTions"
      :tableColumns="apiColumns_DetailsTable"
      :tabsDesTions="apiColumns_DesTions"
      :DrawerLoading="Loading.DrawerLoading"
      :drawer="displayDialog.detailsDialog"
      :Butttondata="[]"
      :propsData="propsData"
      @drawerShut="(val) => (displayDialog.detailsDialog = val)"
      @drawerbutton="drawerbutton"
      @handleCommand="drawerHandle"
      @close-value="closeValue"
      :totalCount="totalCountDetails"
      :currentPage="oldSkipCountDetails"
      :MaxResultCount="MaxResultCountDetails"
      @alterResultCountDetails="alterResultCountDetails"
      @alertoldSkipCountDetails="alertoldSkipCountDetails"
    ></curren-Drawer>
  </div>
</template>
<script>
import { tableMixins } from "@/mixins/TableMixins";
import { LoadingMixins } from "@/mixins/LoadingMixins";
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins"
import { mixins } from "@/mixins/mixins";
import { filterSelectMixins } from '@/mixins/filter-Select'
import { getToken } from '@/utils/auth'
import  * as tableColumns_api from "@/utils/tableColumns_api/index" //全局从接口缓存的表头
import  * as tabsDesTions_api from "@/utils/tabsDesTions_api/index" //全局从接口缓存的详情
import  * as detailsTableColumns_api from "@/utils/detailsTableColumns_api/index" //全局从接口缓存的详情


export default {
  name: "IncomingData",
  mixins: [
    tableMixins,
    LoadingMixins,
    drawerMixins,
    TableHeaderMixins,
    mixins,
    filterSelectMixins,
    newAndEdiDialogMixins
  ],
  data() {
    return {
      //常用按钮数据
      currenButtonData: [
        this.defaultExportBtn({
          isRedundance:true,
          isDetailExport:true
        }),//导出
        this.defaultFreshBtn(),//刷新
        this.defaultFilterBtn(),//筛选
      ],
    };
  },
  mounted() {
    this.initApiColumns()
    this.paging();
  },
  methods: {
    // 获取通过api的表头数据，不可以在初始化处理，因为接口返回问题
    initApiColumns(){
      this.apiColumns_Table = tableColumns_api[this.$route.name]
      this.apiColumns_DesTions = tabsDesTions_api[this.$route.name]
      this.apiColumns_DetailsTable = detailsTableColumns_api[this.$route.name]
    },
  }
}
</script>
<style lang="scss" scoped>
@import "@/styles/basicData.scss";
</style>