<!--
  @description: 开标大厅等待开标-开标倒计时界面-点击项目或者标段数 弹框-tab2已开启标段列表
  @Modifier: haoFx
  @routerPath:
  @date: 2020/3/18-17:48
-->
<template>
  <div>
    <el-table
      :data="hasBeenOpenPackList"
    >
      <el-table-column
        type="index"
        label="序号"
        width="60px"
        align="center"
      />
      <el-table-column
        header-align="center"
        prop="tenderName"
        label="项目名称"
        min-width="230"
      />
      <el-table-column
        header-align="center"
        prop="tenderNo"
        label="项目编号"
        width="160"
      />
      <el-table-column
        header-align="center"
        label="标段名称"
        prop="packName"
        align="left"
        min-width="200"
      />
      <el-table-column
        label="标段编号"
        prop="packNo"
        align="center"
        min-width="180"
      />
      <el-table-column
        label="有效投标家次"
        prop="validBidderNumber"
        align="center"
        min-width="110"
      />
    </el-table>
    <!--分页组件-->
    <pagination :pagination-data="paginationData" @change="loadData" />
  </div>
</template>

<script>
/* 接口*/
import { listStartOpeningTenderPackagePages } from '@api/bidding/bidOpening'
/* 混合开发方法-参数字段*/
import { ListMixin } from '@/mixins/ListMixin'// 分页
import { bidOpeningMixin } from '../mixins/bidOpeningMixin'
/* 组件*/
import pagination from '@comp/common/pagination/pagination'// 分页
export default {
  name: 'HasBeenOpenList',
  components: {
    pagination
  },
  mixins: [ListMixin, bidOpeningMixin],
  props: {
    // 开标解密状态 00:未开启 01:已开启
    activeName: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      hasBeenOpenPackList: [] // 已开启标段列表
    }
  },
  watch: {
    activeName(val) {
      if (val === '01') {
        this.loadData()
      }
    }
  },
  methods: {
    // 获取已开启标段列表
    loadData() {
      const params = {
        ...this.openTypeStageIds,
        isStartOpeningDecryptStatus: this.activeName, // 开标解密状态 00:未开启 01:已开启
        pageNo: this.paginationData.pageNo,
        pageSize: this.paginationData.pageSize
      }
      listStartOpeningTenderPackagePages(params).then(response => {
        this.hasBeenOpenPackList = response.data.records
        this.paginationData.total = response.data.total
      }).catch(() => {

      })
    }
  }
}
</script>

<style scoped>

</style>
