
<!--
  @description:专家历史评标记录查看组件
  @Modifier: wxy
  @routerPath:
  @date:  2020-09-08 9:41:26
-->
<template>
  <div class="projectInfoDetail">
    <div class="page-title">
      7.历史评标记录
    </div>
    <section>
      <el-table ref="smallTable" :data="tableData" class="tableLimit" border>
        <el-table-column
          prop="projectName"
          label="项目名称"
          header-align="center"
          align="center"
          min-width="140"
        />
        <el-table-column
          prop="money"
          label="金额（万元）"
          header-align="center"
          align="center"
          min-width="140"
        />
        <el-table-column
          prop="theDate"
          label="评标时间"
          header-align="center"
          align="center"
          min-width="140"
        >
          <template slot-scope="scope">
            <span>{{ $Moment(scope.row.theDate).format(momentDate) }}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="certifier"
          label="证明人"
          header-align="center"
          align="center"
          min-width="140"
        />
        <el-table-column
          prop="certifierPhone"
          label="证明人联系方式"
          header-align="center"
          align="center"
          min-width="140"
        />
        <el-table-column label="操作" align="center" min-width="150" fixed="right">
          <template slot-scope="scope">
            <el-link
              type="primary"
              @click.stop="clickDetail(scope.row)"
            >
              [查看]
            </el-link>
          </template>
        </el-table-column>
      </el-table>
    </section>
    <ExpertHistorEvaluationDetailDialog v-if="dialogData.dialog" :dialog-data="dialogData" />
  </div>
</template>

<script>
/* 接口*/
import { getExpertEvaluationHistoryById } from '@/api/expert/expertscloud'
import { commonMxin } from '@/mixins/commonMxin'
/* 组件 */
import ExpertHistorEvaluationDetailDialog from '@/views/expert/experImprovetBaseInfo/expertHistorEvaluation/expertHistorEvaluationDetail-dialog'
export default {
  components: {
    ExpertHistorEvaluationDetailDialog
  },
  mixins: [commonMxin],
  data() {
    return {
      // 历史评标记录
      tableData: [],
      // 弹框数据
      dialogData: {
        dialog: false,
        id: ''
      }
    }
  },
  created() {
    // 获取历史评标记录
    this.initData()
  },
  methods: {
    initData() {
      const data = {
        expertId: this.$route.params.expertId
      }// 专家id
      getExpertEvaluationHistoryById(data).then(res => {
        this.tableData = res.data.records // 历史评标记录
      }).catch(() => {})
    },
    // 专家历史评标记录查看-弹框控制
    clickDetail(row) {
      this.dialogData = {
        dialog: true,
        id: row.id
      }
    }
  }
}
</script>

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