<!--
  @description: 评标步骤退回表格
  @author: yf
  @routerPath:
  @date: 2020-8-24 17:28:58
-->
<template>
  <div>
    <el-table
      v-loading="loading"
      :data="tableData"
      highlight-current-row
    >
      <el-table-column type="index" label="序号" width="50" align="center" />
      <el-table-column label="申请专家" width="120" prop="expertName" align="left" />
      <el-table-column label="申请步骤" min-width="150" prop="taskName" align="left" />
      <el-table-column label="申请原因" min-width="250" prop="applicateReason" align="left" />
      <el-table-column label="状态" min-width="250" prop="auditStatus" align="left">
        <template slot-scope="scope">
          {{ filterDictText(auditStatusList, scope.row.auditStatus) }}
        </template>
      </el-table-column>
      <el-table-column label="操作" width="100" align="center">
        <template slot-scope="scope">
          <gx-link v-if="scope.row.auditStatus === '00'" :code="'001_005_001'" type="primary" @click="reauthorization(scope.row)">
            [审批]
          </gx-link>
        </template>
      </el-table-column>
    </el-table>
    <!-- 重新授权评审弹框 -->
    <evaluation-reauthorization :dialog-data="dialogData" :get-tender-base="getTenderBase" @initData="initData" @reloadDriver="reloadDriver" />
  </div>
</template>

<script>
/* 公用方法*/
import { filterDictText } from '@/assets/js/utils'// 常用方法
/* 混合开发方法-参数字段*/
import { procurementSelectMixin } from './mixins/procurementSelectMixin' // 公共方法
/* api接口*/
import { listProcedureAudit } from '@/api/procurement/procurementEvaluation'
import evaluationReauthorization from '../../procurementEvaluation/procurementReviewAudit/procurementReauthorization-dialog'
export default {
  name: 'EvaluationReauthorization',
  components: {
    'evaluation-reauthorization': evaluationReauthorization
  },
  mixins: [procurementSelectMixin],
  props: {
    getTenderBase: {
      type: Object,
      default: function() {
        return {}
      }
    }
  },
  data() {
    return {
      loading: false, // loading效果
      dialogData: {
        dialog: false, // 弹框显示
        tableData: {} // 传入弹框的数据
      },
      tableData: [] // 信息列表
    }
  },
  created() {
    setTimeout(() => {
      this.initData()
    })
  },
  methods: {
    filterDictText,
    // 评审步骤退回列表
    initData() {
      listProcedureAudit(this.getTenderBase.packId).then(res => {
        this.tableData = res.data
      })
    },
    // 重新授权
    reauthorization(row) {
      this.dialogData.dialog = true
      this.dialogData.tableData = row
    },
    // 刷新驱动
    reloadDriver() {
      this.$emit('reloadRollbackData')
    }
  }
}

</script>
<style scoped>
</style>

