<!--
  @description: 立项-预览-相关机构信息
  @Modifier：肖文龙
  @routerPath:
  @date：  2019-12-18 16:31:42
-->
<template>
  <div>
    <div class="page-title">
      招标人信息
    </div>
    <!--主招表人信息-->
    <section>
      <table class="tableData">
        <tr>
          <td> {{ buyersNameLabel }}</td>
          <td>{{ formData.buyersName }}</td>
          <td>联系人</td>
          <td>{{ formData.buyersLinkerName }}</td>
        </tr>
        <tr>
          <td>电话</td>
          <td>{{ formData.buyersLinkerTel }}</td>
          <td>邮箱</td>
          <td>{{ formData.buyersLinkerEmail }}</td>
        </tr>
        <tr v-if="bidProjectSystemSourceType">
          <td>所属公司</td>
          <td>{{ formData.belongCompany }}</td>
          <td>传真</td>
          <td>{{ formData.fax }}</td>
        </tr>
        <tr>
          <td>地址</td>
          <td colspan="3">
            {{ formData.buyersLinkerAddress }}
          </td>
        </tr>
      </table>
    </section>
    <!--添加多招标人信息-->
    <section v-for="(item,index ) in formData.projectBuyersList" :key="index" class="mb16">
      <table class="tableData">
        <tr>
          <td>招标人</td>
          <td>{{ item.buyersName }}</td>
          <td>联系人</td>
          <td>{{ item.buyersLinkerName }}</td>
        </tr>
        <tr>
          <td>电话</td>
          <td>{{ item.buyersLinkerTel }}</td>
          <td>邮箱</td>
          <td>{{ item.buyersLinkerEmail }}</td>
        </tr>
        <tr>
          <td>所属公司</td>
          <td>{{ item.belongCompany }}</td>
          <td>传真</td>
          <td>{{ item.fax }}</td>
        </tr>
        <tr>
          <td>地址</td>
          <td colspan="3">
            {{ item.buyersLinkerAddress }}
          </td>
        </tr>
      </table>
    </section>
    <!--代理机构信息-->
    <section v-if="isShowAgencyInfo">
      <div class="page-title">
        代理机构信息
      </div>
      <table class="tableData">
        <tr>
          <td>代理机构</td>
          <td>{{ formData.agentName }}</td>
          <td>联系人</td>
          <td>{{ formData.agentLinkerName }}</td>
        </tr>
        <tr>
          <td>电话</td>
          <td>{{ formData.agentLinkerTel }}</td>
          <td>邮箱</td>
          <td>{{ formData.agentLinkerEmail }}</td>
        </tr>
        <!--        <tr>
          <td>项目经理发短信手机号</td>
          <td>{{ formData.projectManagerNotePhone }}</td>
        </tr>-->
        <tr>
          <td>地址</td>
          <td colspan="3">
            {{ formData.agentLinkerAddress }}
          </td>
        </tr>
      </table>
    </section>
  </div>
</template>

<script>
import { queryTenderProjectDepartInfo } from '@/api/bidding/biddingProject'
import { bidProjectCommon } from '../mixins/bidProjectCommon' // mixins混入公共方法
export default {
  name: 'BidProjectDepart',
  mixins: [bidProjectCommon],
  data() {
    return {
      formData: {}
    }
  },
  created() {
    let tenderId = ''
    tenderId = this.projectData.id ? this.projectData.id : this.$route.params.id
    if (this.$route.query.id) tenderId = this.$route.query.id // 传参方式都改完删除
    this.initData(tenderId)// 查询招标项目基本信息
  },
  methods: {
    initData(tenderId) {
      queryTenderProjectDepartInfo(tenderId).then((response) => {
        this.formData = response.data
      })
    }
  }
}
</script>

<style lang="less" scoped>

</style>
