<!--
  @description:专家职称信息查看-弹框
  @Modifier: wxy
  @routerPath:
  @date:  2020-09-08 10:10:43
-->
<template>
  <el-dialog
    v-dialogDrag
    :visible.sync="dialogData.dialog"
    :close-on-click-modal="false"
    title="查看职称信息"
    width="650px"
    append-to-body
    custom-class="el-dialog__body-p8 el-dialog_table"
  >
    <div class="main mb10">
      <table class="tableData">
        <tr>
          <td>证书名称</td>
          <td>
            {{ expertTitltInfo.certificateName }}
          </td>
        </tr>
        <tr>
          <td>职称等级</td>
          <td>
            {{ expertTitltInfo.titleLevel }}
          </td>
        </tr>
        <tr>
          <td>颁发机构</td>
          <td>
            {{ expertTitltInfo.authorityName }}
          </td>
        </tr>
        <tr>
          <td>证书编号</td>
          <td>
            {{ expertTitltInfo.certificateNo }}
          </td>
        </tr>
        <tr>
          <td>获得时间</td>
          <td>
            {{ expertTitltInfo.acquisitionDate }}
          </td>
        </tr>
      </table>
    </div>
  </el-dialog>
</template>

<script>
/* api */
import { queryTBExpertAvoidCompanyInfoById } from '@/api/expert/expertscloud'
/* 公共方法 */
import { expertWorkPerience } from '@/views/expert/expertInfo/expertWorkPerience/mixins/expertWorkPerience'
import { filterDictText } from '@/assets/js/utils'
import { expertInfo } from '@/views/expert/expertInfo/mixins/expertInfo'

export default {
  name: 'ExpertTitltInfoDetailDialog',
  mixins: [expertWorkPerience, expertInfo],
  props: {
    // 弹框展示状态
    dialogData: {
      type: Object,
      default: function() {
        return {
          dialog: false, // 展示状态
          id: ''// 编辑时才会有财务状况id
        }
      }
    }
  },
  data() {
    return {
      // expertTitltInfoData: {
      //   dialog: false, // 弹框展示状态
      //   id: ''
      // },
      // 上传附件参数
      expertTitltInfo: {}
    }
  },
  created() {
    // 获取数据
    const data = {
      id: this.dialogData.id
    }
    this.expertTitltInfoDetail(data)
  },
  methods: {
    filterDictText,
    // 获取任职经历详情
    expertTitltInfoDetail(data) {
      queryTBExpertAvoidCompanyInfoById(data).then(res => {
        this.expertTitltInfo = res.data
      })
    }
  }
}
</script>
