<tabset class="bg-white p-0" justified="true">
  <tab *ngFor="let u of this.uploadList; let i = index">
    <ng-template tabHeading *ngIf="this.uploadList.length>1||imageList.length>=1">
      <span class="table-sort" style="white-space: nowrap;"><em class="far fa-file fa-fw"></em>
        <!--          {{u.file_type.toLowerCase().indexOf('pdf') >= 0?'PDF材料'+(i+1):(u.file_type.toLowerCase().indexOf('mp4') >= 0?'视频材料'+(i+1):'')}}-->
        {{u.file_name}}
      </span>
    </ng-template>
    <div style="text-align: center;">
      <div *ngIf="u.file_type.toLowerCase().indexOf('pdf') >= 0">
        <div style="text-align: right;margin-top: 2px;margin-bottom: 2px;margin-right: 80px;">
          <button class="btn btn-secondary" type="button" (click)="rotaitionL(i)">左旋转</button>&nbsp;
          <button class="btn btn-secondary" type="button" (click)="rotaitionR(i)">右旋转</button>&nbsp;
          <button class="btn btn-secondary" type="button" (click)="zoomIn(i)">缩小</button>&nbsp;
          <button class="btn btn-secondary" type="button" (click)="zoomOut(i)">放大</button>&nbsp;
          <button class="btn btn-secondary" type="button" (click)="download(u['file_path'])">下载</button>&nbsp;
          <a href="" style="display:none" target="_blank" id="file_down"></a>
        </div>

        <pdf-viewer [src]="u['file_path']" [c-maps-url]="'assets/cmaps/'" [render-text]="true" [show-borders]="true"
                    style="display: block;height: 530px;"
                    (after-load-complete)="fileLoadCompeleted()" (error)="onError()" [zoom]="zoomStep[i]||1.3"
                    [rotation]="rotation[i]||0" [fit-to-page]="true"></pdf-viewer>
      </div>

      <video *ngIf="u.file_type.toLowerCase().indexOf('mp4') >= 0" [src]="u['file_path']" controls="controls"
             style="width: 800px;" ng-if="u.file_type.toLowerCase().indexOf('mp4') > 0">
        您的浏览器不支持 video 播放。
      </video>
    </div>
  </tab>
  <tab *ngIf="imageList&&imageList.length>=1">
    <ng-template tabHeading>
      <span class="table-sort" style="white-space: nowrap;"><em class="far fa-file fa-fw"></em> 图片材料-共{{imageList.length}}张</span>
    </ng-template>
<!--    <ngx-image-viewer [src]="imageList" [config]="{customBtns:[{name: 'link', icon: 'fa fa-paperclip'}]}"-->
<!--                      style="display: block;height: 600px;"-->
<!--                      (customEvent)="handleImageEvent($event)"></ngx-image-viewer>-->
    <ngx-image-viewer [src]="imageList"  style="display: block;height: 600px;" ></ngx-image-viewer>
  </tab>
</tabset>


