<template>
  <a-modal
    :title="title"
    :width="800"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel"
    :ok-button-props="{ style: { display: 'none' } }"
    okText="保存"
    cancelText="关闭">

    <a-spin :spinning="confirmLoading">
      <SliceUpload
          ref="technicalUpload"
          :box-height="50"
          :max-file="9999"
          :can-download="false"
          accept=".csv,.txt"
          :dataLinkType='dataLinkType'
        />
    </a-spin>
  </a-modal>
</template>

<script>
import moment from "moment"
import JCron from "@/components/jeecg/JCron";
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
import SliceUpload from './SliceUpload'


  export default {
    name: "uploadModal",
    components: {
      JCron,
      JSelectMultiple,
      SliceUpload
    },
    data () {
      return {
        title:"操作",
        buttonStyle: 'solid',
        visible: false,
        confirmLoading: false,
        strategys:[],
        dataLinkType:''
      }
    },
    created () {
      
    },
    methods: {
      add () {
        this.visible =true;
        this.$refs.technicalUpload.deleteFile();
      },
      onOk(value) {
        this.model.startDate = moment(value[0],dateFormat);
        this.model.endDate = moment(value[1],dateFormat);
      },
      close () {
        this.$emit('ok');
        this.visible = false;
      },
      handleOk () {
        this.$emit('ok');
        this.close();
      },
      handleCancel () {
        this.$emit('ok');
        this.close()
      },
    }
  }
</script>

<style scoped>
.disabled{
  pointer-events: none;
}
</style>