<!--
  @description: 签章情况
  @Modifier：ysg
  @date2020-09-22- 11:20
-->
<template>
  <el-dialog
    v-dialogDrag
    :visible.sync="dialogData.dialog"
    :close-on-click-modal="false"
    :lock-scroll="false"
    title="文件查看情况"
    width="840px"
    custom-class="el-dialog__body-p8 el-dialog_table"
  >
    <div>
      <el-table
        ref="smallTable"
        v-loading="loading"
        :data="tableData"
        class="pointer"
      >
        <el-table-column
          type="index"
          label="序号"
          align="center"
          width="60"
        />
        <el-table-column
          prop="personTypeName"
          label="专家/供应商"
          align="center"
          width="160"
        />
        <el-table-column
          prop="linker"
          label="联系人姓名"
          header-align="center"
          align="center"
          min-width="110"
        />
        <el-table-column
          prop="linkerTel"
          label="联系电话"
          min-width="150"
          header-align="center"
          align="center"
        />
        <!-- isFinishSignature -->
        <el-table-column
          prop="exchangeStatus"
          label="状态"
          width="125"
          header-align="center"
          align="center"
        >
          <template slot-scope="scope">
            {{ filterDictText(exchangeStatus, scope.row.exchangeStatus) }}
          </template>
        </el-table-column>
      </el-table>
    </div>
  </el-dialog>
</template>

<script>
import {
  qryExchangeEvalReportSignatureListInfoManager
} from '@/api/procurement/procurementEvaluation'
/* 公共参数方法*/
import { ListMixin } from '@/mixins/ListMixin'
import { filterDictText } from '@assets/js/utils'// 常用方法
import { commonMxin } from '@/mixins/commonMxin'
/* 混合开发方法-参数字段*/
import { procurementSelectMixin } from '../../procurementDocuments/procurementEvaluationResults/mixins/procurementSelectMixin' // 公共方法
export default {
  name: 'SignatureSealDialog',
  mixins: [ListMixin, commonMxin, procurementSelectMixin],
  props: {
    dialogData: {
      type: Object,
      default: function() {
        return
      }
    }
  },
  data() {
    return {
      loading: false,
      tableData: []
    }
  },
  watch: {
    'dialogData.dialog'(val) {
      // 打开弹框加载数据
      if (val) {
        // 根据项目信息选择的采购方式来动态改变数据
        this.loadData()
        // 查字典项
        this.inPcode()
      }
    }
  },
  methods: {
    filterDictText, // 字典值替换文本通用方法
    // 加载数据
    loadData() {
      this.loading = true
      const params = { reportId: this.dialogData.id } // 查询条件
      qryExchangeEvalReportSignatureListInfoManager(params).then(res => {
        if (res.header.ret === '0') {
          this.loading = false
          this.tableData = res.data
        }
      })
    }
  }
}
</script>

<style scoped lang="less">
</style>
