<template>
    <div class="ImportResult">
      <dialog-edit :visible.sync="dialogVisible" :editModel="editModel" :form="form" :api="{}" :width="width"
                   :title="$t('regMsg.organization.ImportResult.importResult')" :footerVisible="false" :appendToBody="true">
        <p style="text-align: center">{{$t('regMsg.organization.ImportResult.importCount')}}{{form.importCount}}</p>
        <p style="text-align: center">{{$t('regMsg.organization.ImportResult.ignoreCount')}}{{form.ignoreCount}}</p>
        <p style="text-align: center">{{$t('regMsg.organization.ImportResult.errorCount')}}{{form.errorCount}}</p>
        <p style="text-align: center">{{$t('regMsg.organization.ImportResult.successCount')}}{{form.successCount}}</p>
        <div class="btnClass">
          <btn-export :xhr="$xhr" :templateCode="templateCode" :btnName="$t('regMsg.organization.ImportResult.downloadResult')"
                      :queryParas="beforeExport"
                      btnSize=""></btn-export>
          <auth-button size=""
                       :label="$t('common.close')"
                       @click="dialogVisible = false"
                       menuCode="menuCode"
                       perms="closePerms"></auth-button>
        </div>
      </dialog-edit>
    </div>
</template>

<script>
import { DialogEdit, authButton, btnExport } from 'newepoch-components'
import BaseEdit from '@/pages/baseEditPage'
export default {
  name: 'ImportResult',
  extends: new BaseEdit(),
  components: {
    DialogEdit,
    authButton,
    btnExport
  },
  data () {
    return {
      width: '500px',
      templateCode: 'zcjg001',
      exportParams: {
        batchNo: ''
      }
    }
  },
  computed: {
    beforeExport () {
      return {
        batchNo: this.form.resKeyId
      }
    }
  }
}
</script>

<style scoped lang="scss">
  @import "~@/styles/enterpriseInfoManage/organization/importResult.scss";
</style>
