/*
 *@description:导入
 *@author: hudw
 *@date: 2022-04-18 11:49:52
*/
<template>
  <import-excel ref="exc" type="primary" :icon='null' :beforeUpload="beforeUpload" :formItmes="items" label="导入文件"
    :remoteUrl="importUrl" :downloadFileName="fileName" :radio="radio" :tmpUrl="tmpUrl" v-on="$listeners">
<slot>导入</slot>
</import-excel>
</template>

<script>
import importExcel from "./import-excel/index.import.vue"
const items = [
  {
    type: 'radio',
    style: 'margin-top:10px',
    name: "isRadio",
    wrapperCol: { push: 6, span: 10 },
    value: 0,
    options: [{
      label: '导入到提交',
      value: 1,
    }, {
      label: '导入到草稿',
      value: 0,
    }]
  }
]
export default {
  name: 'import-button',
  props: {
    fileName: '',
    radio: false,
    importUrl: '',
    tmpUrl: '',


  },
  components: { importExcel },
  data() {
    return {
      items
    };
  },
  mounted() {

  },
  computed: {

  },
  methods: {
    beforeUpload(data) {
      // this.$refs.exc.loading=true

      return data
    },
    handleMenuClick() {

    },
    modelDown() {
      if (!this.tmpUrl) {
        alert('暂无模板下载')
      }
    },



  },
};
</script>
