
<!--
  @description:专家回避单位查看组件
  @Modifier: wxy
  @routerPath:
  @date:  2020-09-08 10:35:00
-->
<template>
  <div class="projectInfoDetail">
    <div class="page-title">
      8.回避单位
    </div>
    <section>
      <el-table ref="smallTable" :data="tableData" class="tableLimit" border>
        <el-table-column
          prop="comName"
          label="单位名称"
          header-align="center"
          align="center"
          min-width="140"
        />
        <el-table-column
          prop="comCode"
          label="单位组织机构代码"
          header-align="center"
          align="center"
          min-width="140"
        />
        <el-table-column
          prop="reason"
          label="回避原因"
          header-align="center"
          align="center"
          min-width="140"
        />
      </el-table>
    </section>
  </div>
</template>

<script>
/* 接口*/
import { queryAllTBExpertAvoidCompanyInfo } from '@/api/expert/expertscloud.js'
export default {
  data() {
    return {
      tableData: [], // 回避单位信息
      reasonList: [] // 字典信息
    }
  },
  created() {
    // 获取回避单位信息
    this.initData()
    // 字典信息查询的key
    const data = ['avoid_reason']
    this.$store.dispatch('getGroupType', data).then(res => {
      this.reasonList = res.res.avoid_reason.data.typeList
    })
  },
  methods: {
    initData() {
      const data = {
        expertId: this.$route.params.expertId
      } // 专家id
      queryAllTBExpertAvoidCompanyInfo(data).then(res => {
        this.tableData = res.data.records // 回避单位
      }).catch(() => {})
    }
  }
}
</script>

<style lang='less' scoped>
.baseInfo{
   font-weight: bolder;
}
</style>
