<template>
  <div>
    <Modal v-model="showDetailModal" v-drag footer-hide title="人员管理-人员培训计划详情" width="700">
      <div class="maxHeight">
        <table class="tableClass">
          <tbody>
            <tr>
              <th>状态</th>
              <td>{{ obj.status }}</td>
              <th>培训名称</th>
              <td>{{ obj.name }}</td>
            </tr>
            <tr>
              <th>培训类型</th>
              <td>{{ obj.pxlx }}</td>
              <th>负责人</th>
              <td>{{ obj.chargerName }}</td>
            </tr>
            <tr>
              <th>培训人员</th>
              <td colspan="3">
                {{ obj.staffNames }}
              </td>
            </tr>
            <tr>
              <th>培训开始日期</th>
              <td>{{ obj.beginDate?$dateformat(obj.beginDate,'yyyy-mm-dd'):'' }}</td>
              <th>培训结束日期</th>
              <td>{{ obj.endDate?$dateformat(obj.endDate,'yyyy-mm-dd'):'' }}</td>
            </tr>
            <tr>
              <th>培训内容</th>
              <td>{{ obj.trainContent }}</td>
              <th>培训目标</th>
              <td>{{ obj.trainAim }}</td>
            </tr>
            <tr>
              <th>考核办法</th>
              <td>{{ obj.assessment }}</td>
              <th>备注</th>
              <td>{{ obj.remark }}</td>
            </tr>
            <tr>
              <th>编制人</th>
              <td>{{ obj.userName }}</td>
              <th>编制时间</th>
              <td>{{ obj.ltime?$dateformat(obj.ltime,'yyyy-mm-dd'):'' }}</td>
            </tr>
            <tr>
              <th>审批人</th>
              <td>{{ obj.approver }}</td>
              <th>审批时间</th>
              <td>{{ obj.approvDate?$dateformat(obj.approvDate,'yyyy-mm-dd'):'' }}</td>
            </tr>
          </tbody>
        </table>
      </div>
    </Modal>
  </div>
</template>
<script>
/**
 * 人员管理-人员培训计划详情
 */

export default {
  data() {
    return {
      obj: {},
      type: '',
      showDetailModal: false
    }
  },
  methods: {
    _open(obj) {
      this.showDetailModal = true
      this.obj = obj
      if (this.obj.type === 0) {
        this.type = '对内'
      } else if (this.obj.type === 1) {
        this.type = '对外'
      }
      this.obj.status = obj.status.display
    }
  }
}
</script>
