<nz-table
  #basicTable
  [nzData]="authorList"
  [nzScroll]="{ x: (maxWidth || '1200') + 'px' }"
>
  <thead>
    <tr>
      <th nzWidth="80px" nzLeft nzAlign="right">序号</th>
      <th nzWidth="160px" nzLeft>姓名</th>
      <th nzWidth="160px">单位</th>
      <th nzWidth="160px">出生年月</th>
      <th nzWidth="160px">国籍</th>
      <th nzWidth="160px">职务</th>
      <th nzWidth="160px">职称</th>
      <th nzWidth="300px">手机号码</th>
      <th nzWidth="160px">电子邮箱</th>
      <th nzWidth="160px">分工</th>
      <!-- <th nzWidth="120px" nzRight>
            作者诚信承诺签名
            <span style="color: red;">*</span>
          </th> -->

      <!-- <th nzWidth="120px" nzRight>其他编者</th> -->
      <th nzWidth="120px" nzRight>
        作者政治审查表
        <span style="color: red">*</span>
      </th>
      <th nzWidth="100px" nzRight>操作</th>
    </tr>
  </thead>
  <tbody>
    @for (data of authorList; track data.mobile;let index = $index) {
    <tr>
      <td nzLeft nzAlign="right">{{ index + 1 }}</td>
      <td nzLeft>
        {{ data.name }}
      </td>
      <td>
        {{ data.unit }}
      </td>
      <td>
        {{ data.birth | date : "yyyy-MM" }}
      </td>
      <td>
        {{ data.nationality }}
      </td>
      <td>
        {{ data.job }}
      </td>
      <td>
        {{ data.title }}
      </td>
      <td>
        {{ data.mobile }}
      </td>
      <td>
        {{ data.email }}
      </td>
      <td>
        {{ data.work }}
      </td>
      <!-- <td nzRight>
        @if (data.otherEditor) {
        <a style="color: #3e49b3" (click)="openFile(data.otherEditor)"
          >政治审查意见</a
        >
        }
        <app-comp-upload
          [type]="'pdf'"
          (change)="upload($event, 'otherEditor', index)"
        ></app-comp-upload>
      </td> -->
      <td nzRight>
        @if (data.examine) {
        <a style="color: #3e49b3" (click)="openFile(data.examine)"
          >政治审查表
        </a>
        }
        <app-comp-upload
          [type]="'pdf'"
          (change)="upload($event, 'examine', index)"
        ></app-comp-upload>
      </td>
      <td nzRight>
        <!-- <a (click)="onPush('authorList', index)"><span nz-icon style="font-size: 20px; margin-right: 10px"
                nzType="plus-circle" nzTheme="outline"></span></a> -->
        @if (authorList.length > 1) {
        <a (click)="onDel(index)"
          ><span
            nz-icon
            style="font-size: 20px"
            nzType="delete"
            nzTheme="outline"
          ></span
        ></a>
        }@else {
        <span
          nz-icon
          style="font-size: 20px"
          nzType="delete"
          nzTheme="outline"
        ></span>
        }
      </td>
    </tr>
    }
  </tbody>
</nz-table>
<div class="val" style="width: 100%">
  <div class="text">其他编者</div>
  @if (showUpload) {
  <app-comp-upload
    [files]="
      otherEditor ? [{ url: otherEditor, name: '其他编者政治审查意见' }] : []
    "
    [type]="'pdf'"
    [width]="320"
    (change)="upload($event, 'otherEditor')"
    title="上传文件"
  ></app-comp-upload>
  }
  <div class="text upText">支持上传PDF，大小不超过 2M</div>
</div>
