<!--
  @description: 开标大厅等待开标-开标倒计时界面-点击项目或者标段数 弹框--有效投标人不足三家列表-tab3（开标大厅-开标前查看）
  @Modifier: haoFx
  @routerPath:
  @date: 2020/3/18-17:48
-->
<template>
  <div>
    <el-table
      :data="notOpenPack"
    >
      <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="100"
      >
        <template slot-scope="scope">
          <span class="fontColor">{{ scope.row.validBidderNumber }}</span>
        </template>
      </el-table-column>
    </el-table>
    <!--分页组件-->
    <pagination :pagination-data="paginationData" @change="loadData" />
  </div>
</template>

<script>
/* 接口*/
import { listOpeningTenderPackagePages } from '@api/bidding/bidOpening'
/* 组件*/
import pagination from '@comp/common/pagination/pagination'// 分页
/* 混合开发方法-参数字段*/
import { ListMixin } from '@/mixins/ListMixin'// 分页
import { bidOpeningMixin } from '../mixins/bidOpeningMixin'
export default {
  name: 'ValidBidderList',
  components: {
    pagination
  },
  mixins: [ListMixin, bidOpeningMixin],
  props: {
    // 开标解密状态 00:未开启 01:已开启
    activeName: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      packageParams: {
        isSatisfyThreeBidder: '00' // 是否满足三家投标人 00 不满足三家 01 满足三家 null为全部
      },
      notOpenPack: [] // 不足三家标段列表
    }
  },
  watch: {
    activeName(val) {
      if (val === '02') {
        this.loadData()
      }
    }
  },
  methods: {
    // 获取有效投标人不足三家列表
    loadData() {
      const params = {
        ...this.openTypeStageIds,
        ... this.packageParams,
        pageNo: this.paginationData.pageNo,
        pageSize: this.paginationData.pageSize
      }
      listOpeningTenderPackagePages(params).then(response => {
        this.notOpenPack = response.data.records
        this.paginationData.total = response.data.total
      }).catch(() => {

      })
    }
  }
}
</script>

<style scoped lang="less">
  @import "../index";
</style>
