<div class="textbook-table">
  <div class="tool">
    <div class="search">
      <nz-input-group style="width: 280px" [nzPrefix]="prefixTemplateUser">
        <input
          type="text"
          nz-input
          placeholder="输入教材名称 / ISBN / 作者名搜索"
          [(ngModel)]="searchValue"
          (ngModelChange)="onSearch($event)"
        />
      </nz-input-group>
      <ng-template #prefixTemplateUser
        ><span nz-icon nzType="search"></span
      ></ng-template>
    </div>
    @if (filterObj?.btns?.verify && count != 0) {
    <div class="sbt" (click)="submitted()">提交推荐教材列表</div>
    }
    @if (filterObj?.btns?.exportExcel) {
      <div class="sbt" (click)="export()">导出汇总表</div>
    }
  </div>
  <nz-table
    #tableData
    [nzData]="textbookList"
    [nzTotal]="count"
    [(nzPageSize)]="limit"
    [nzPageIndex]="pageIndex"
    style="margin: 10px 0"
    [nzLoading]="loading"
    nzSize="middle"
    [nzFrontPagination]="false"
    [nzScroll]="{ x: (maxWidth || '1200') + 'px', y: '580px' }"
    nzTableLayout="fixed"
    [nzPageSizeOptions]="[10, 20, 30, 40, 50]"
    nzShowSizeChanger
    (nzPageIndexChange)="pageIndexChange($event)"
    (nzPageSizeChange)="onPageSizeChange($event)"
  >
    @if(filterObj?.showMore){
    <thead>
      <tr>
        @if (filterObj.isCheck) {
        <th
          nzWidth="50px"
          nzLeft
          [nzChecked]="checkedAll"
          [nzIndeterminate]="false"
          nzLabel="Select all"
          (nzCheckedChange)="onAllChecked($event)"
        ></th>
        <th nzEllipsis nzWidth="80px">申报编号</th>
        }@else{
        <th nzEllipsis nzWidth="160px" nzLeft>申报编号</th>
        }
        <th nzEllipsis nzWidth="120px">教材名称</th>
        <th nzEllipsis nzWidth="120px">ISBN</th>
        <th nzEllipsis nzWidth="180px">第一主编/作者</th>
        <th
          nzEllipsis
          nzWidth="120px"
          [nzShowFilter]="true"
          [nzFilters]="listOfColumns.lang.listOfFilter"
          (nzFilterChange)="listOfColumns.lang.onChange($event)"
        >
          主要语种类型
        </th>
        <!-- <th
          nzEllipsis
          nzWidth="180px"
          [nzShowFilter]="true"
          [nzFilters]="listOfColumns.majorPoniter.listOfFilter"
          (nzFilterChange)="listOfColumns.majorPoniter.onChange($event)"
        >
          所属学科专业类
        </th> -->
        <th
          nzEllipsis
          nzWidth="180px"
          [nzShowFilter]="true"
          [nzFilters]="listOfColumns.discipline.listOfFilter"
          (nzFilterChange)="listOfColumns.discipline.onChange($event)"
        >
          教材所属学科专业类
        </th>
        <th
          nzEllipsis
          nzWidth="180px"
          [nzShowFilter]="true"
          [nzFilters]="listOfColumns.editionUnit.listOfFilter"
          (nzFilterChange)="listOfColumns.editionUnit.onChange($event)"
        >
          出版单位
        </th>
        <th
          nzEllipsis
          nzWidth="180px"
          [nzShowFilter]="true"
          [nzFilters]="listOfColumns.approval.listOfFilter"
          (nzFilterChange)="listOfColumns.approval.onChange($event)"
        >
          重点立项教材
        </th>
        <th
          nzEllipsis
          nzWidth="180px"
          [nzShowFilter]="true"
          [nzFilters]="listOfColumns.carrierShape.listOfFilter"
          (nzFilterChange)="listOfColumns.carrierShape.onChange($event)"
        >
          载体形式
        </th>
        <th
          nzEllipsis
          nzWidth="180px"
          [nzShowFilter]="true"
          [nzFilters]="listOfColumns.department.listOfFilter"
          (nzFilterChange)="listOfColumns.department.onChange($event)"
        >
          申报部门
        </th>
        @if (filterObj.btns.eduReivew) { @if (filterObj.btns?.mark) {
        <th
          nzEllipsis
          nzWidth="100px"
          [nzShowFilter]="true"
          [nzFilters]="listOfColumns.status.listOfFilter"
          (nzFilterChange)="listOfColumns.status.onChange($event)"
          nzRight
        >
          评审状态
        </th>
        }
        <th nzEllipsis nzWidth="80px" nzRight>评审分值</th>
        }
        <th nzEllipsis nzWidth="50px" nzRight>操作</th>
      </tr>
    </thead>
    @if (textbookList.length > 0) {
    <tbody>
      @for (data of textbookList; track data.id) {
      <tr>
        @if (filterObj.isCheck) {
        <td
          nzEllipsis
          nzLeft
          [nzChecked]="setOfCheckedId.has(data.id)"
          (nzCheckedChange)="onItemChecked(data.id, $event)"
        ></td>
        <td
          nzEllipsis
          (click)="toUrl(path + '/' + data.id)"
          nz-popover
          [nzPopoverContent]="contentTemplate"
        >
          {{ data?.get("code") }}
          <ng-template #contentTemplate>
            <div style="max-width: 400px">
              {{ data?.get("code") }}
            </div>
          </ng-template>
        </td>
        }@else {
        <td nzEllipsis nzLeft nz-popover [nzPopoverContent]="contentTemplate">
          {{ data?.get("code") }}
          <ng-template #contentTemplate>
            <div style="max-width: 400px">
              {{ data?.get("code") }}
            </div>
          </ng-template>
        </td>
        }
        <td
          nzEllipsis
          class="activeTd"
          (click)="toUrl(path + '/' + data.id)"
          nz-popover
          [nzPopoverContent]="contentTemplate"
        >
          {{ data?.get("title") || "-" }}
          <ng-template #contentTemplate>
            <div style="max-width: 400px">
              {{ data?.get("title") || "-" }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplateISBN"
          #ISBN
        >
          {{ fromatFiled(data?.get("childrens"), "ISBN") }}
          <ng-template #contentTemplateISBN>
            <div style="max-width: 400px">
              {{ ISBN.innerText }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplateauthor"
          #author
        >
          {{ fromatFiled(data?.get("childrens"), "author") }}
          <ng-template #contentTemplateauthor>
            <div style="max-width: 400px">
              {{ author.innerText }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplatelang"
          #lang
        >
          {{ fromatFiled(data?.get("childrens"), "lang") }}
          <ng-template #contentTemplatelang>
            <div style="max-width: 400px">
              {{ lang.innerText }}
            </div>
          </ng-template>
        </td>
        <td nzEllipsis nz-popover [nzPopoverContent]="contentTemplatemajor">
          {{
            (data?.get("discipline")?.code || "") +
              " " +
              (data?.get("discipline")?.name || "")
          }}
          <ng-template #contentTemplatemajor>
            <div style="max-width: 400px">
              {{
                (data?.get("discipline")?.code || "") +
                  " " +
                  (data?.get("discipline")?.name || "")
              }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplateeditionUnit"
          #editionUnit
        >
          {{ fromatFiled(data?.get("childrens"), "editionUnit") }}
          <ng-template #contentTemplateeditionUnit>
            <div style="max-width: 400px">
              {{ editionUnit.innerText }}
            </div>
          </ng-template>
        </td>
        <td nzEllipsis nz-popover [nzPopoverContent]="contentTemplateapproval">
          {{ data?.get("approval") || "否" }}
          <ng-template #contentTemplateapproval>
            <div style="max-width: 400px">
              {{ data?.get("approval") || "否" }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplatecarrierShape"
          #carrierShape
        >
          {{ fromatFiled(data?.get("childrens"), "carrierShape") }}
          <ng-template #contentTemplatecarrierShape>
            <div style="max-width: 400px">
              {{ carrierShape.innerText }}
            </div>
          </ng-template>
        </td>
        <td nzEllipsis nz-popover [nzPopoverContent]="contentTemplatename">
          {{ data?.get("department")?.get("name") || "-" }}
          <ng-template #contentTemplatename>
            <div style="max-width: 400px">
              {{ data?.get("department")?.get("name") || "-" }}
            </div>
          </ng-template>
        </td>
        @if (filterObj.btns.eduReivew) { @if (filterObj.btns?.mark) {
        <td nzEllipsis [nzAlign]="'center'" nzRight>
          @if (scoreMap[data.id]?.status == '已评审') {
          <nz-tag nzColor="success">已评审</nz-tag>
          } @else if (scoreMap[data.id]?.status == '已保存') {
          <nz-tag nzColor="warning">已保存</nz-tag>
          }@else {
          <nz-tag nzColor="processing">未评审</nz-tag>
          }
        </td>
        }
        <td nzEllipsis [nzAlign]="'right'" nzRight>
          {{ scoreMap[data.id]?.score ?? "-" }}
        </td>
        }
        <td nzEllipsis nzRight>
          @if(manage){
          <button
            nz-button
            nz-dropdown
            [nzDropdownMenu]="menu"
            [nzPlacement]="'bottomLeft'"
          >
            <span nz-icon nzType="ellipsis" nzTheme="outline"></span>
          </button>
          <nz-dropdown-menu #menu="nzDropdownMenu">
            <ul nz-menu>
              @if(filterObj.btns.eduReivew){
              <li nz-menu-item>
                <button
                  (click)="onlinePreview(data.id)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="eye" nzTheme="outline"></span>在线预览
                </button>
              </li>
              }@if(filterObj.btns.edit){
              <li nz-menu-item>
                <button
                  (click)="toUrl('/nav-author/manage/apply', { id: data.id })"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="edit" nzTheme="outline"></span>编辑教材
                </button>
              </li>
              }@if(filterObj.btns.review){
              <li nz-menu-item>
                <button
                  nz-button
                  (click)="toUrl('/common/textbook/details/' + data.id)"
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="read" nzTheme="outline"></span>预览教材
                </button>
              </li>
              } @if(filterObj.btns.star){
              <li nz-menu-item>
                <button
                  (click)="updateStatus(data, true)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="star" nzTheme="outline"></span>加入推荐
                </button>
              </li>
              }@if(filterObj.btns.beforSubmit){
              <li nz-menu-item>
                <button
                  nz-button
                  (click)="beforSubmit(data)"
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="upload" nzTheme="outline"></span
                  >提交至工作联系人
                </button>
              </li>
              } @if(filterObj.btns.export){
              <li nz-menu-item>
                <button
                  (click)="exportProcess(data)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="export" nzTheme="outline"></span
                  >导出申报书及附件
                </button>
              </li>
              } @if(filterObj.btns.reject){
              <li nz-menu-item>
                <button
                  (click)="reject(data)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="rollback" nzTheme="outline"></span
                  >退回教材
                </button>
              </li>
              } @if(filterObj.btns.remove){
              <li nz-menu-item>
                <button
                  (click)="updateStatus(data, false)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span
                    nz-icon
                    nzType="vertical-align-bottom"
                    nzTheme="outline"
                  ></span
                  >移除推荐
                </button>
              </li>
              } @if(filterObj.btns.submit){
              <li nz-menu-item>
                <button
                  nz-button
                  (click)="submit(data)"
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="upload" nzTheme="outline"></span
                  >提交教材
                </button>
              </li>
              } @if(filterObj.btns.mark){
              <li nz-menu-item>
                <button
                  (click)="onMarking(data.id, scoreMap[data.id]?.status)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="form" nzTheme="outline"></span>打分
                </button>
              </li>
              } @if(filterObj.btns.isDelete){
              <li nz-menu-item>
                <button
                  (click)="del(data)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="delete" nzTheme="outline"></span
                  >删除教材
                </button>
              </li>
              }
            </ul>
          </nz-dropdown-menu>
          } @else { - }
        </td>
      </tr>
      }
    </tbody>
    } }@else {
    <thead>
      <tr>
        @if (filterObj.isCheck) {
        <th
          nzWidth="50px"
          nzLeft
          [nzChecked]="checkedAll"
          [nzIndeterminate]="false"
          nzLabel="Select all"
          (nzCheckedChange)="onAllChecked($event)"
        ></th>
        @if (!filterObj?.btns?.submit) {
        <th nzEllipsis nzWidth="100px">申报编号</th>
        }
        <th nzEllipsis nzWidth="120px">教材名称</th>
        }@else if(filterObj?.btns?.submit){
        <th nzEllipsis nzLeft nzWidth="120px">教材名称</th>
        }@else {
        <th nzEllipsis nzWidth="100px" nzLeft>申报编号</th>
        <th nzEllipsis nzWidth="120px">教材名称</th>
        }
        <th nzEllipsis nzWidth="50px">册数</th>
        <th nzEllipsis nzWidth="70px">状态</th>
        <th nzEllipsis nzWidth="120px">第一主编/作者</th>
        <th nzEllipsis nzWidth="80px">所属单位</th>
        <th nzEllipsis nzWidth="120px">教材所属学科专业类</th>
        <th nzEllipsis nzWidth="80px">主要语种类型</th>
        <th nzEllipsis nzWidth="80px">ISBN</th>
        <th nzEllipsis nzWidth="120px">出版单位</th>
        <th nzEllipsis nzWidth="50px" nzRight>操作</th>
      </tr>
    </thead>
    @if (textbookList.length > 0) {
    <tbody>
      @for (data of textbookList; track data.id) {
      <tr>
        @if (filterObj.isCheck) {
        <td
          nzEllipsis
          nzLeft
          [nzChecked]="setOfCheckedId.has(data.id)"
          (nzCheckedChange)="onItemChecked(data.id, $event)"
        ></td>
        @if (!filterObj?.btns?.submit) {
        <td
          nzEllipsis
          class="activeTd"
          (click)="toUrl(path + '/' + data.id)"
          nz-popover
          [nzPopoverContent]="contentTemplate"
        >
          {{ data?.get("code") }}
          <ng-template #contentTemplate>
            <div style="max-width: 400px">
              {{ data?.get("code") }}
            </div>
          </ng-template>
        </td>
        }
        <td
          nzEllipsis
          class="activeTd"
          (click)="toUrl(path + '/' + data.id)"
          nz-popover
          [nzPopoverContent]="contentTemplatetitle"
        >
          {{ data?.get("title") || "-" }}
          <ng-template #contentTemplatetitle>
            <div style="max-width: 400px">
              {{ data?.get("title") || "-" }}
            </div>
          </ng-template>
        </td>
        }@else if(filterObj?.btns?.submit){
        <td
          nzEllipsis
          nzLeft
          class="activeTd"
          (click)="toUrl(path + '/' + data.id)"
          nz-popover
          [nzPopoverContent]="contentTemplatetitle"
        >
          {{ data?.get("title") || "-" }}
          <ng-template #contentTemplatetitle>
            <div style="max-width: 400px">
              {{ data?.get("title") || "-" }}
            </div>
          </ng-template>
        </td>
        } @else {
        <td nzLeft nz-popover [nzPopoverContent]="contentTemplate">
          {{ data?.get("code") }}
          <ng-template #contentTemplate>
            <div style="max-width: 400px">
              {{ data?.get("code") || "-" }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
          class="activeTd"
          (click)="toUrl(path + '/' + data.id)"
          nz-popover
          [nzPopoverContent]="contentTemplatetitle"
        >
          {{ data?.get("title") || "-" }}
          <ng-template #contentTemplatetitle>
            <div style="max-width: 400px">
              {{ data?.get("title") || "-" }}
            </div>
          </ng-template>
        </td>
        }

        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplatetypeNumber"
        >
          {{
            data?.get("type") == "单本"
              ? "单本"
              : "全册 - " + data?.get("typeNumber") || "-"
          }}
          <ng-template #contentTemplatetypeNumber>
            <div style="max-width: 400px">
              {{
                data?.get("type") == "单本"
                  ? "单本"
                  : "全册 - " + data?.get("typeNumber") || "-"
              }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
        >
          <nz-tag [nzColor]="getStatusColor(data?.get('status')).color">{{getStatusColor(data?.get("status")).text}}</nz-tag>
        </td>
        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplateauthor"
          #author
        >
          {{ fromatFiled(data?.get("childrens"), "author") }}
          <ng-template #contentTemplateauthor>
            <div style="max-width: 400px">
              {{ author.innerText }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplateunit"
          #unit
        >
          {{ fromatFiled(data?.get("childrens"), "unit") }}
          <ng-template #contentTemplateunit>
            <div style="max-width: 400px">
              {{ unit.innerText }}
            </div>
          </ng-template>
        </td>
        <td nzEllipsis nz-popover [nzPopoverContent]="contentTemplatemajor">
          <!-- {{ data?.get("major")?.name || "-" }} -->
          {{
            (data?.get("discipline")?.code || "") +
              " " +
              (data?.get("discipline")?.name || "")
          }}
          <ng-template #contentTemplatemajor>
            <div style="max-width: 400px">
              {{
                (data?.get("discipline")?.code || "") +
                  " " +
                  (data?.get("discipline")?.name || "")
              }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplatelang"
          #lang
        >
          {{ fromatFiled(data?.get("childrens"), "lang") }}
          <ng-template #contentTemplatelang>
            <div style="max-width: 400px">
              {{ lang.innerText }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplateISBN"
          #ISBN
        >
          {{ fromatFiled(data?.get("childrens"), "ISBN") }}
          <ng-template #contentTemplateISBN>
            <div style="max-width: 400px">
              {{ ISBN.innerText }}
            </div>
          </ng-template>
        </td>
        <td
          nzEllipsis
          nz-popover
          [nzPopoverContent]="contentTemplateeditionUnit"
          #editionUnit
        >
          {{ fromatFiled(data?.get("childrens"), "editionUnit") }}
          <ng-template #contentTemplateeditionUnit>
            <div style="max-width: 400px">
              {{ editionUnit.innerText }}
            </div>
          </ng-template>
        </td>
        <td nzEllipsis nzRight>
          @if(manage){
          <button
            nz-button
            nz-dropdown
            [nzDropdownMenu]="menu"
            [nzPlacement]="'bottomLeft'"
          >
            <span nz-icon nzType="ellipsis" nzTheme="outline"></span>
          </button>
          <nz-dropdown-menu #menu="nzDropdownMenu">
            <ul nz-menu>
              @if(filterObj.btns.edit){
              <li nz-menu-item>
                <button
                  (click)="toUrl('/nav-author/manage/apply', { id: data.id })"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="edit" nzTheme="outline"></span>编辑教材
                </button>
              </li>
              }@if(filterObj.btns.uploadPDF && !data?.get('authorSignPDF')?.url){
              <li nz-menu-item>
                <button
                  (click)="toUrl('/common/textbook/plug-pdf/'+ data.id)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="file-pdf" nzTheme="outline"></span>补充签名附件
                </button>
              </li>
              }@if(filterObj.btns.review){
              <li nz-menu-item>
                <button
                  nz-button
                  (click)="toUrl('/common/textbook/details/' + data.id)"
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="read" nzTheme="outline"></span>预览教材
                </button>
              </li>
              } @if(filterObj.btns.star){
              <li nz-menu-item>
                <button
                  (click)="updateStatus(data, true)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="star" nzTheme="outline"></span>加入推荐
                </button>
              </li>
              } @if(filterObj.btns.beforSubmit){
              <li nz-menu-item>
                <button
                  nz-button
                  (click)="beforSubmit(data)"
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="upload" nzTheme="outline"></span
                  >提交至工作联系人
                </button>
              </li>
              } @if(filterObj.btns.export){
              <li nz-menu-item>
                <button
                  (click)="exportProcess(data)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="export" nzTheme="outline"></span
                  >导出申报书及附件
                </button>
              </li>
              } @if(filterObj.btns.reject){
              <li nz-menu-item>
                <button
                  (click)="reject(data)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="rollback" nzTheme="outline"></span
                  >退回教材
                </button>
              </li>
              } @if(filterObj.btns.remove){
              <li nz-menu-item>
                <button
                  (click)="updateStatus(data, false)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span
                    nz-icon
                    nzType="vertical-align-bottom"
                    nzTheme="outline"
                  ></span
                  >移除推荐
                </button>
              </li>
              } @if(filterObj.btns.submit){
              <li nz-menu-item>
                <button
                  nz-button
                  (click)="submit(data)"
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="upload" nzTheme="outline"></span
                  >提交教材
                </button>
              </li>
              } @if(filterObj.btns.isDelete){
              <li nz-menu-item>
                <button
                  (click)="del(data)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="delete" nzTheme="outline"></span
                  >删除教材
                </button>
              </li>
              } @if(filterObj.btns.restore){
              <li nz-menu-item>
                <button
                  (click)="restore(data)"
                  nz-button
                  nzType="link"
                  style="color: #231c1f"
                >
                  <span nz-icon nzType="undo" nzTheme="outline"></span>恢复教材
                </button>
              </li>
              }
              @if(filterObj.btns.changStatus && this.tbookSer.profile.identity === '国家级管理员'){
                <li nz-menu-item>
                  <button
                    (click)="openStateModal(data)"
                    nz-button
                    nzType="link"
                    style="color: #231c1f"
                  >
                    <span nz-icon nzType="retweet" nzTheme="outline"></span>变更状态
                  </button>
                </li>
              }
            </ul>
          </nz-dropdown-menu>
          } @else { - }
        </td>
      </tr>
      }
    </tbody>
    } }
  </nz-table>
  @if (textbookList.length == 0) {
  <nz-empty nzNotFoundImage="/img/group-empty.png"></nz-empty>
  }
</div>
<!-- 全选操作：批量操作 -->
@if (filterObj.isCheck && setOfCheckedId.size && !filterObj?.showText) {
<div class="batch-toolbar-modal" [style.left]="'calc(50% - ' + calc + 'px)'">
  <div class="batch-toolbar">
    <div class="styles_counter__18S08">
      <span>已选</span>
      <span class="styles_num__178Wa">{{ setOfCheckedId.size }}</span>
    </div>
    @if(filterObj.btns.reject){
    <div class="batch-toolbar-actions">
      <div class="ant-space ant-space-horizontal ant-space-align-center">
        <div class="ant-space-item" style="margin-right: 16px">
          <button nz-button nzType="text" (click)="reject()">
            <span nz-icon nzTheme="outline" nzType="rollback"></span>
            批量退回
          </button>
        </div>
      </div>
    </div>
    } @if(filterObj.btns.star){
    <div class="styles_cancel__AARoT">
      <button nz-button nzType="text" (click)="updateStatus(undefined, true)">
        <span nz-icon nzType="star" nzTheme="outline"></span>
        批量推荐
      </button>
    </div>
    } @if(filterObj.btns.remove){
    <div class="batch-toolbar-actions">
      <div class="ant-space ant-space-horizontal ant-space-align-center">
        <div class="ant-space-item" style="margin-right: 16px">
          <button
            nz-button
            nzType="text"
            (click)="updateStatus(undefined, false)"
          >
            <span
              nz-icon
              nzType="vertical-align-bottom"
              nzTheme="outline"
            ></span>
            移除推荐
          </button>
        </div>
      </div>
    </div>
    } @if(filterObj.btns.export){
    <div class="styles_cancel__AARoT">
      <button nz-button nzType="text" (click)="exportProcess()">
        <span nz-icon nzType="export" nzTheme="outline"></span>
        批量导出
      </button>
    </div>
    } @if(filterObj.btns.isDelete){
    <div class="batch-toolbar-actions">
      <div class="ant-space ant-space-horizontal ant-space-align-center">
        <div class="ant-space-item" style="margin-right: 16px">
          <button nz-button nzType="text" (click)="del()">
            <span nz-icon nzType="delete" nzTheme="outline"></span>
            删除
          </button>
        </div>
      </div>
    </div>
    } @if(filterObj.btns.submit){
    <div class="styles_cancel__AARoT">
      <button nz-button nzType="text" (click)="submit()">
        <span nz-icon nzType="upload" nzTheme="outline"></span>
        批量提交
      </button>
    </div>
    } @if(filterObj.btns.beforSubmit){
    <div class="styles_cancel__AARoT">
      <button nz-button nzType="text" (click)="beforSubmit()">
        <span nz-icon nzType="upload" nzTheme="outline"></span>
        批量提交
      </button>
    </div>
    } @if(filterObj.btns.restore){
    <div class="batch-toolbar-actions">
      <div class="ant-space ant-space-horizontal ant-space-align-center">
        <div class="ant-space-item" style="margin-right: 16px">
          <button nz-button nzType="text" (click)="restore()">
            <span nz-icon nzType="undo" nzTheme="outline"></span>
            恢复教材
          </button>
        </div>
      </div>
    </div>
    }
    <div class="styles_cancel__AARoT">
      <button nz-button nzType="text" (click)="onAllChecked(false)">
        取消选中
      </button>
    </div>
  </div>
</div>
}
<nz-modal nzOkDanger [(nzVisible)]="isVisible" nzTitle="你将变更教材状态（危险操作）" (nzOnCancel)="isVisible = false" (nzOnOk)="onChangeStatus()">
  <ng-container *nzModalContent>
    <div class="">当前状态 {{getStatusColor(currentStatuesParse?.get('status')).text}}</div>
    <nz-radio-group [(ngModel)]="upStatus">
      <label nz-radio nzValue="102">未提交</label>
      <label nz-radio nzValue="200">已提交</label>
      <label nz-radio nzValue="300">已退回</label>
      <label nz-radio nzValue="400">已报送</label>
    </nz-radio-group>
  </ng-container>
</nz-modal>
<div class="loading" [hidden]="!showLoading">
  <nz-spin nzSimple [nzSize]="'large'"></nz-spin>
</div>
