<!--
  @description:候选人公示-供应商展示弹框
  @Modifier: haofengxian
  @routerPath:
  @date: 2020-12-19-10:04
-->
<template>
  <el-dialog
    v-dialogDrag
    :visible.sync="candidateSupplierInfoDialog"
    :close-on-click-modal="false"
    title="查看候选人"
    width="840px"
    append-to-body
    custom-class="el-dialog__body-p8 el-dialog_table"
  >
    <div>
      <el-table
        ref="singleTable"
        v-loading="loading"
        :data="list"
        class="pointer"
        highlight-current-row
        size="mini"
      >
        <el-table-column type="index" label="序号" align="center" width="80" />
        <el-table-column label="候选人名称" header-align="center">
          <template slot-scope="scope">
            {{ list[scope.$index] }}
          </template>
        </el-table-column>
      </el-table>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="candidateSupplierInfoDialog = false">关 闭</el-button>
    </span>
  </el-dialog>
</template>

<script>
/* api*/
import { getCandidateSupplierInfo } from '@api/bidding/bidCalibration'
export default {
  name: 'CandidateSupplierInfoDialog',
  data() {
    return {
      list: [],
      loading: true,
      candidateSupplierInfoDialog: false // 是否打开弹框
    }
  },
  methods: {
    // 打开弹框获取候选人信息
    openDialogGetCandidateSupplierInfo(stageId) {
      this.candidateSupplierInfoDialog = true // 打开弹框
      getCandidateSupplierInfo(stageId).then(res => {
        this.loading = false
        this.list = res.data
      }).catch(() => {
        this.loading = false
      })
    }
  }
}
</script>

<style scoped>

</style>
