<template>
  <div>
    <el-dialog
      :visible.sync="dialogVisible"
      :title="dialogTitle"
      width="600px"
      @close="dialogVisible = false"
    >
      <p class="line_item">
        <span>本次导入：</span>
        {{total}}笔
      </p>
      <p class="line_item">
        <span>忽略数：</span>
        {{form.ignoreNum}}
      </p>
      <p class="line_item">
        <span>失败数：</span>
        {{form.loseNum}}
      </p>
      <p class="line_item">
        <span>成功数：</span>
        {{form.successNum}}
      </p>
      <el-row style="text-align:center">
        <btn-export
        size="small"
        type="primary"
        templateCode="zrzhangshiqi01"
        :queryParas="queryParams"
        :btnName="$t('projectCompany.downloaddetail')"
      ></btn-export>
      <btn-export
        size="small"
        style="margin-left: 16px"
        type="primary"
        templateCode="jinbiao1014"
        :queryParas="queryParams"
        :btnName="$t('projectCompany.wechatDoanload')"
      ></btn-export>
      </el-row>
    </el-dialog>
  </div>
</template>

<script>
import BaseEdit from '@/pages/projectCompany/projectCompanyEditPage.js'
import { btnExport } from 'newepoch-components'
export default {
  components: { btnExport },
  props: {
    dialogTitle: {
      type: String,
      default: ''
    }
  },
  extends: new BaseEdit(),
  data () {
    return {
      queryParams: {}
    }
  },
  methods: {},
  computed: {
    total () {
      const { ignoreNum, loseNum, successNum } = this.form
      return ignoreNum + loseNum + successNum
    }
  },
  watch: {
    visible (old) {
      if (old) {
        const { importBatchNo } = this.form
        this.queryParams = {
          batchNo: importBatchNo
        }
      } else {
      }
    }
  }
}
</script>

<style  scoped>
p.no_top_bottom {
  margin-top: 0;
  margin-bottom: 0;
  text-align: center;
}
.line_item {
  text-align: center;
  font-size: 16px;
}
.line_item span {
  width: 80px;
  display: inline-block;
  margin-right: 10px;
}
</style>
