<!--
  @description: 专家库-抽取项目列表-随机抽取
  @Modifier: 肖文龙
  @routerPath:
  @date: 2020/8/26
-->
<template>
  <div>
    <el-table
      ref="smallTable"
      :data="tableData"
      class="tableLimit"
    >
      <el-table-column
        type="index"
        label="序号"
        width="60px"
        align="center"
      />
      <el-table-column
        prop="applyCode"
        align="center"
        label="抽取申请编号"
        min-width="170"
      />
      <el-table-column
        align="center"
        prop="tenderName"
        label="评标开始时间"
        min-width="120"
      >
        <template slot-scope="scope">
          {{ $Moment(scope.row.createTime).format(momentDateTime) }}
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        prop="createTime"
        label="评标结束时间"
        min-width="120"
      >
        <template slot-scope="scope">
          {{ $Moment(scope.row.createTime).format(momentDateTime) }}
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        prop="createTime"
        label="申请时间"
        min-width="120"
      >
        <template slot-scope="scope">
          {{ $Moment(scope.row.createTime).format(momentDateTime) }}
        </template>
      </el-table-column>
      <!--      <el-table-column-->
      <!--        header-align="center"-->
      <!--        prop="createTime"-->
      <!--        label="申请人"-->
      <!--        min-width="100"-->
      <!--      />-->
      <!--      <el-table-column-->
      <!--        header-align="center"-->
      <!--        prop="createTime"-->
      <!--        label="申请抽取专家"-->
      <!--        align="right"-->
      <!--        min-width="90"-->
      <!--      />-->
      <!--      <el-table-column-->
      <!--        header-align="center"-->
      <!--        prop="createTime"-->
      <!--        label="抽取成功专家"-->
      <!--        align="right"-->
      <!--        min-width="90"-->
      <!--      />-->
      <el-table-column
        align="center"
        label="抽取状态"
        prop="resultStatus"
        width="110"
      >
        <template slot-scope="scope">
          {{ filterDictText(extractStatusList,scope.row.resultStatus) }}
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        label="操作"
        width="160"
      >
        <template slot-scope="scope">
          <el-link
            type="primary"
            @click.stop="preview(scope.row)"
          >
            [查看抽取结果]
          </el-link>
          <el-link
            type="primary"
            @click.stop="smokingProject(scope.row)"
          >
            [补抽]
          </el-link>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
/* 公用方法*/
import { filterDictText } from '@/assets/js/utils'// 常用方法
/* 混合开发方法-参数字段*/
import { extractProjectMixin } from '../mixins/extractProjectMixins'// 字典信息
/* 组件*/
// import pagination from '@comp/common/pagination/pagination'// 分页

export default {
  name: 'TenderProjectList',
  components: {
    // pagination// 分页
  },
  mixins: [extractProjectMixin],
  props: {
    tableData: {
      type: Array,
      default: function() {
        return []
      }
    }
  },
  methods: {
    filterDictText, // 字典值替换文本通用方法
    // 查看抽取结果
    preview(row) {
      this.$router.push({
        name: 'extractProjectResult-detail',
        params: {
          id: row.id
        }
      })
    },
    // 补抽
    smokingProject(row) {
      this.$router.push({
        name: 'extractProjectMakeUpContent',
        params: {
          id: row.id
        }
      })
    }
  }
}
</script>
<style lang="less" scoped>

</style>
