<div class="task">
    <div class="transfer_recode" ng-if="!!tasklist.length">
        <div class="transfer_header">
            <i class="upload_img"></i>
            <span>当前上传任务</span>
        </div>
        <div class="transfer_operator">
            <span ng-show="!showStartBtn" ng-click='stopQueue()'><i class="img_pause"></i>全部暂停</span>
            <span ng-show="showStartBtn" ng-click='startQueue()'><i class="img_start"></i>全部开始</span>
            <span ng-click='clearQueue()'><i class="img_delete"></i>全部取消</span>
        </div>
    </div>

    <!--<div class="transfer_recode" ng-if="!!tasklist.length">-->
        <!--<button ng-click='clearQueue()'>全部取消</button>-->
        <!--<button ng-show="!showStartBtn" ng-click='stopQueue()'>全部暂停</button>-->
        <!--<button ng-show="showStartBtn" ng-click='startQueue()'>全部开始</button>-->
    <!--</div>-->
    <ul ng-show="tasklist.length" class="downlist" style="position: relative;height: calc(100% - 50px);">
        <md-virtual-repeat-container id="complete_list-container">
            <li md-virtual-repeat="task in tasklist">
                <div class="y-row" >
                    <div class="column progress">
                        <div class="name" title="{{task.name}}">
                            {{task.name}}
                        </div>

                        <div class="progress-linear">
                            <div class="inner-linear" style="width:{{task.size? (task.end_len / (task.size ))*100 :1 }}%">
                            </div>
                        </div>
                    </div>
                    <div class="initial time">
                        <span>
                            {{task.show_time|| '--'}}
                        </span>
                    </div>

                    <div class="initial speed">
                        <span ng-if="task.status===0 ">
                        排队中
                    </span>
                        <span ng-if="task.status===-1">
                        已暂停
                    </span>
                        <span ng-if="task.status===-2">
                        停止
                    </span>
                        <span ng-if="task.status===2">
                        完成中
                    </span>
                        <span ng-if="task.status===1">
                        {{ task.speed | formByteLength}}/s
                     </span>
                        <span ng-if="task.status===-4">
                       正在读取文件
                     </span>
                        <span style="color:red" ng-if="task.status===505">
                        大小超过限制
                     </span>
                        <span style="color:red" ng-if="task.status===508">
                        空间不足
                     </span>
                        <span style="color:red" ng-if="task.status===-5">
                        网络错误
                     </span>
                        <span style="color:red" ng-if="task.status===404 || task.status===777">
                        文件读取失败
                     </span>
                    </div>
                    <div class="initial status" ng-if="task.status!=404">
                        {{ task.end_len | formByteLength}} / {{ task.size | formByteLength}}
                    </div>
                    <div class="initial opt">
                        <span title="暂停">
                            <svg ng-click="pause(task)" ng-if="task.status >= 0" class="icon" aria-hidden="true" >
                                <use xlink:href="#icon-zanting1"></use>
                            </svg>
                        </span>
                        <span title="开始">
                            <svg ng-click="pause(task)" ng-if="task.status < 0" class="icon" aria-hidden="true" >
                                <use xlink:href="#icon-zanting"></use>
                            </svg>
                        </span>
                        <span title="删除">
                            <svg ng-click="delTask(task)" class="icon" aria-hidden="true" >
                                <use xlink:href="#icon-recycle"></use>
                            </svg>
                        </span>
                    </div>
                </div>
            </li>
        </md-virtual-repeat-container>
    </ul>
    <div ng-if="!tasklist.length" class="transfer-empty">
    </div>
</div>