<!-- <comp-table-list
  #list
  [schema]="Profile"
  *ngIf="className && fieldsArray"
  [className]="className"
  [fieldsArray]="fieldsArray"
  [queryParams]="queryParams"
></comp-table-list> -->
<nz-table
  #basicTable
  [nzData]="profiles"
  [nzScroll]="{ x: (maxWidth || '800') + 'px', y: '480px' }"
  [nzTotal]="profiles.length"
  [nzPageSize]="10"
  style="margin: 10px 0"
>
  <thead>
    <tr>
      <th nzWidth="120px" nzLeft>姓名</th>
      <th nzWidth="120px">电话号码</th>
      <th nzWidth="120px">邮箱</th>
      <th nzWidth="120px">注册时间</th>
      <th nzWidth="120px">是否填报人</th>
      @if (!disabled) {
      <th nzWidth="120px" nzRight>操作</th>
      }
    </tr>
  </thead>
  <tbody>
    @for (data of profiles; track data.id) {
    <tr>
      <td nzLeft>
        {{ data?.get("name") }}
      </td>
      <td>
        {{ data?.get("mobile") }}
      </td>
      <td>
        {{ data?.get("email") }}
      </td>
      <td>
        {{ data?.createdAt | date : "yyyy-MM-dd" }}
      </td>
      <td>
        <nz-switch [ngModel]="checked(data.id)" nzDisabled></nz-switch>
      </td>
      @if (!disabled) {
      <td nzRight>
        @if(checked(data.id)){
        <a (click)="onChange(data.id)" style="color: #c6233f">取消权限</a>
        }@else {
        <a (click)="onChange(data.id)">设置权限</a>
        }
      </td>
      }
    </tr>
    }
  </tbody>
</nz-table>
