<template>
<div class="burst-upload-content">
    <el-button type="primary" size="small" @click="getFileData">正在传输</el-button>
    <el-button type="primary" size="small" @click="getFileData">传输完成</el-button>
    <el-button type="primary" size="small" @click="getFileData">回收站</el-button>
    <p style="margin-bottom:12px;"></p>
    <WebUpload
            :fileNumLimit="fileNumLimit"
            :fileSize="fileSize"
            :chunkSize="chunkSize"
            :uploadSuffixUrl="uploadSuffixUrl"
            :options="options"
            :fileListData="tableData"
    > </WebUpload>
</div>
</template>
<script>
import WebUpload from './WebUpload'

export default {
    name: 'webupload',
    components:{
        WebUpload
    },
    data() {
        return {
            uploader:{},
            uploadBtnDisabled:false,
            uploadStaus:"el-icon-upload",
            tableData:[],//显示集合
            fileNumLimit:2,//文件总数
            fileSize:100*1024*1024*1024,//默认上传文件大小
            chunkSize:5*1024*1024,//默认文件片段
            uploadSuffixUrl:"http://192.168.10.128:9000/",
            options:{
                //允许上传的文件
                fileType:"doc,docx,pdf,xls,xlsx,ppt,pptx,gif,jpg,jpeg,bmp,png,rar,zip,mp4,avi",
                fileUploadUrl:"files/upload/",//上传地址
                fileCheckUrl:"upload/fileRecord/",//检测文件是否存在url
                checkChunkUrl:"upload/fileRecord/",//检测分片url
                mergeChunksUrl:"upload/complete/",//合并文件请求地址
                headers:{}
            }
        }
    },
    methods: {
        getFileData(){
            console.log("tableData:",this.tableData);
            console.log("tableData len:",this.tableData.length);
            var fListData=this.tableData;
            fListData.forEach(function (item) {
                console.log("item:",item)
            })
        }
    }
}
</script>
<style>
.burst-upload-content{
    width: calc( 100% - 20px);
    padding:10px;
    margin:0px auto;
    height: calc( 100% - 240px);
}
</style>


