<template>
  <div class="view-carrierListExecutionRegistrationCompile-missionPlane">
    <div class="view-dataSpecies-right-registering">
      <div class="view-dataType-table">
        <MissionDetail />

        <LTable ref="table" :columns="columns" :dataSource="tableData" :options="options" :fetch="fetchTableData" :pagination="pagination"></LTable>
      </div>
    </div>
  </div>
</template>

<script>
import { getTaskExecondRegisterItem } from '@/api/carrierStandard/carrierListExecutionRegistration'
import { columns, options } from './index'

export default {
  name: 'carrierListExecutionRegistrationLook',
  data() {
    // 这里存放数据
    return {
      currentNodeKey: '',
      pagination: {
        total: 0,
        pageIndex: 1,
        pageSize: 10,
        searchValue: ''
      },
      columns: columns(this),
      options,
      tableData: [],
      renderKey: Math.random(),
      activeRow: {}
    }
  },
  created() {},
  methods: {
    async fetchTableData() {
      const { pageIndex, pageSize } = this.pagination
      const { taskId } = this.$route.params
      const {
        data: { list, totalCount }
      } = await getTaskExecondRegisterItem({
        aircaftCatalogId: '',
        taskId,
        pageIndex: pageIndex,
        pageSize: pageSize
      })
      this.tableData = list
      this.pagination.total = totalCount
    }
  }
}
</script>

<style lang="scss">
@import './index.scss';
</style>
