<template>
  <div >
    <div class="content">
      <dataBreadcrumb :breads="breads"></dataBreadcrumb>
      <changeNav :navs="navs"></changeNav>
      <dataTable :table-data="tableData" :columns="columns" :is-index="true">
      </dataTable>
      <div class="centerButton">
        <el-button @click="back">返回</el-button>
      </div>
    </div>
  </div>
</template>

<script>
	
import {openInfolist} from '@api/supply/bid'
import dataTable from '@components/nopageTable.vue'
import dataBreadcrumb from '@components/dataBreadcrumb.vue'
import changeNav from '@components/changeNav.vue'
export default {
  components: {
    dataTable,
    dataBreadcrumb,
    changeNav
  },
  data() {
    return {
      navs: ['开标一览表查看'],
      breads: ['投标管理 ', '我参加的项目', '工作台'],
      tableData: [],
      columns: [{
        label: '投标人名称',
        prop: 'companyName'
      },
      {
        label: '投标报价(元)',
        prop: 'price'
      },
      {
        label: '是否签名',
        prop: 'isSign'
      }
      ] // 操作列
    }
  },
  methods: {
    back() {
      this.$router.go(-1)
    },
	  async getopenInfolist() {
		  let projectId=localStorage.getItem("projectId")
	        const {
	          data,
	          code
	        } = await openInfolist(projectId)
			for(let item of data){
				if(item.isSign){
					item.isSign="是"
				}else{
					item.isSign="否"
				}
			}
			this.tableData=data
	    }
  },
  created() {
  	this.getopenInfolist()
  }
}
</script>

<style scoped>
	.centerButton{
		margin-top: 100px;
	}
	
</style>
