<!--
  @description: 投标人数未达到3家的标段
  @Modifier: yangzy
  @routerPath: /bidding/bidOpening/bidOpeningMonitor/bidOpeningMonitorDetail/bidNoThreeData-detail
  @date: 2021/02/05 13:23:41
-->
<template>
  <div>
    <dl class="projectInfoDetail">
      <dd>
        <el-table
          v-loading="loading"
          :data="tableData"
        >
          <el-table-column
            type="index"
            label="序号"
            min-width="60px"
            align="center"
          />
          <el-table-column
            prop="packNo"
            label="标段（包）编号"
            header-align="center"
            min-width="140px"
          />
          <el-table-column
            prop="packName"
            label="标段（包）名称"
            header-align="center"
            min-width="140px"
          />
          <el-table-column
            prop="bidNum"
            label="投标人数"
            min-width="140px"
            align="center"
          />
          <el-table-column
            prop="queryTime"
            label="查询时间"
            align="center"
            min-width="140px"
          />
        </el-table>
      </dd>
    </dl>
  </div>
</template>
<script>
/* api */
import { getOpenBidNoThreeData } from '@/api/bidding/bidOpening' // 投标人数未达到3家的标段
/* 公用方法*/
import { filterObj } from '@/assets/js/utils'// 过滤空的key
/* 混合开发方法-参数字段*/
import { ListMixin } from '@/mixins/ListMixin'// 分页
/* 组件*/
import pagination from '@comp/common/pagination/pagination'// 分页

export default {
  name: 'BidNoThreeDataDetail',
  components: {
    pagination// 分页
  },
  mixins: [ListMixin],
  props: {
    bidNoThree: {
      type: Object,
      default: function() {
        return {}
      }
    }
  },
  data() {
    return {
      loading: false, // 列表loading
      tableData: [], // 列表
      fromData: {
        packCount: '' // 不足3家标段数
      }
    }
  },
  methods: {
    // 加载数据
    loadData() {
      const params = this.getParams()// 查询条件
      getOpenBidNoThreeData(params).then(response => {
        this.list = response.data.records
        this.paginationData.total = response.data.total
      }).catch(() => {

      })
    },
    // 查询条件
    getParams() {
      // 获取单位id
      const param = Object.assign({}, this.bidNoThree)
      param.pageNo = this.paginationData.pageNo
      param.pageSize = this.paginationData.pageSize
      return filterObj(param)// 过滤空的key
    },
    // 查询数据
    bidNoThreeData() {
      this.tableData = []
      this.loading = true
      getOpenBidNoThreeData(this.bidNoThree).then(response => {
        this.loading = false
        this.tableData = response.data
        this.fromData.packCount = response.data.size
      }).catch(() => {
        this.loading = false
      })
    }
  }
}
</script>
<style lang="less" scoped>

</style>
