<div class="site-page-header">
  <nz-page-header
    nzTitle="教材详情 - {{textBook?.title}}"
    nzSubtitle=""
    style="padding: 0"
  >
    <nz-breadcrumb nz-page-header-breadcrumb>
      <div class="back" (click)="back()">
        <span nz-icon nzType="left" nzTheme="outline"></span>返回
      </div>
    </nz-breadcrumb>
  </nz-page-header>
</div>
<div class="content">
  <div nz-row>
    <div nz-col nzSpan="18" #scroll>
      <div class="templ1" #templ1 style="width: 500px; height: 700px">
        <div class="title">教材基本信息</div>
        <div class="base-content">
          <div class="row">
            <div class="label">申报教材名称</div>
            <div class="value">{{textBook?.title}}</div>
          </div>
          <div class="row">
            <div class="label">第一主编（作者）</div>
            <div class="value">{{textBook?.author}}</div>
          </div>
          <div class="row">
            <div class="label">第一主编（作者）单位</div>
            <div class="value">{{textBook?.unit}}</div>
          </div>
          <div class="row">
            <div class="label">申报类型</div>
            <div class="value">{{textBook?.type}} {{textBook?.type == '全册' ? textBook?.typeNumber + '册': ''}}</div>
          </div>
          <div class="row">
            <div class="label">教材应用对象及所属学科专业类</div>
            <div class="value">{{textBook?.majorPoniter}}</div>
          </div>
          <div class="row">
            <div class="label">教材主要语种类型</div>
            <div class="value">{{textBook?.lang}}</div>
          </div>
          <div class="row">
            <div class="label">国际标准书号</div>
            <div class="value">{{textBook?.ISBN}}</div>
          </div>
          <div class="row">
            <div class="label">其他主编姓名</div>
            <div class="value">{{textBook?.authors}}</div>
          </div>
          <div class="row">
            <div class="label">其他编者姓名</div>
            <div class="value">{{textBook?.editor}}</div>
          </div>
          <div class="row">
            <div class="label">是否为重点立项教材</div>
            <div class="value">{{textBook?.approval}}</div>
          </div>
          <div class="row">
            <div class="label">出版单位</div>
            <div class="value">{{textBook?.editionUnit}}</div>
          </div>
          <div class="row">
            <div class="label">初版时间</div>
            <div class="value">{{textBook?.editionFirst?.iso | date :'yyyy-MM'}}</div>
          </div>
          <div class="row">
            <div class="label">载体形式</div>
            <div class="value">{{textBook?.carrierShape}}</div>
          </div>
          <div class="row">
            <div class="label">本版出版时间及版次</div>
            <div class="value">{{textBook?.editionDate?.iso | date :'yyyy-MM'}}/{{textBook?.editionNumber}}</div>
          </div>
          <div class="row">
            <div class="label">最新印次时间及印次</div>
            <div class="value">{{textBook?.printDate?.iso | date :'yyyy-MM'}}/{{textBook?.printNumber}}</div>
          </div>
          <div class="row">
            <div class="label">初版以来合计印数</div>
            <div class="value">{{textBook?.printSum}}</div>
          </div>
          <div class="row">
            <div class="label">初版以来是否曾列为重点项目</div>
            <div class="value">{{textBook?.importantProject}}</div>
          </div>
          <div class="row">
            <div class="label">版权页截图</div>
            <div class="value"><a (click)="openFile(textBook?.copyrightImgUrl)">截图文件</a></div>
          </div>
          <div class="row">
            <div class="label">中国版本图书馆 CIP 查询截图</div>
            <div class="value"><a (click)="openFile(textBook?.CIPImgUrl)">查询截图</a></div>
          </div>
        </div>
      </div>
      <div class="templ">
        <div class="title">教材适用情况</div>
        <div class="base-content">
          <div class="row">
            <div class="label">适用专业代码（六位）及名称</div>
            <div class="value">{{textBook?.major?.code}}/{{textBook?.major?.name}}</div>
          </div>
          <div class="row">
            <div class="label">适用课程</div>
            <div class="value">{{textBook?.lessons}}</div>
          </div>
          <div class="row">
            <div class="label">课程学时</div>
            <div class="value">{{textBook?.period}}</div>
          </div>
          <div class="row">
            <div class="label">适用课程性质</div>
            <div class="value">
              @for (tag of textBook?.characteristic; track tag) {
                @if (tag.checked){
                  <nz-tag>{{tag.label}}</nz-tag>
                }
              }</div>
          </div>
        </div>
      </div>
      <div class="templ">
        <div class="title">教材适用情况</div>
        <div class="text mar10">
          作者（含主编，不超过 6 人，教材中明确出现姓名）
        </div>
        <div class="base-content">
          <nz-table
            #basicTable
            [nzShowPagination]="false"
            [nzData]="textBook?.authorList"
            [nzScroll]="{
              x: (templ1.style.width || '1000') + 'px',
              y: '240px'
            }"
          >
            <thead>
              <tr>
                <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="160px">手机号码</th>
                <th nzWidth="160px">电子邮箱</th>
                <th nzRight>分工</th>
              </tr>
            </thead>
            <tbody>
              @for (data of textBook?.authorList; track data.mobile;let index =
              $index) {
              <tr>
                <td nzLeft>
                  {{ data.name }}
                </td>
                <td>
                  {{ data.unit }}
                </td>
                <td>
                  {{ data.birth?.iso | 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 nzRight>
                  {{ data.work }}
                </td>
              </tr>
              }
            </tbody>
          </nz-table>
        </div>

        <div class="text mar10">第一主编（作者）情况</div>
        <div class="base-content">
          <div class="text-tips">相关教学经历</div>
          <div class="note">
            {{ textBook?.authorDetails }}
          </div>
          <div class="text-tips">相关科学研究项目、成果或论文专著（限5项）</div>
          <nz-table
            #basicTable
            [nzShowPagination]="false"
            [nzData]="textBook?.achievementOptions"
            [nzScroll]="{
              x: (templ1.style.width || '1000') + 'px',
              y: '240px'
            }"
          >
            <thead>
              <tr>
                <th nzWidth="80px" nzLeft nzAlign="right">序号</th>
                <th nzWidth="160px" nzLeft>名称</th>
                <th nzWidth="160px">来源/出版单位</th>
                <th nzWidth="80px">时间</th>
              </tr>
            </thead>
            <tbody>
              @for (data of textBook?.achievementOptions; track data.name;let
              index = $index) {
              <tr>
                <td nzLeft nzAlign="right">{{ index + 1 }}</td>
                <td nzLeft>
                  {{ data.name }}
                </td>
                <td>
                  {{ data.unit }}
                </td>
                <td>
                  {{ data.date?.iso | date : "yyyy-MM" }}
                </td>
              </tr>
              }
            </tbody>
          </nz-table>
        </div>
      </div>
      <div class="templ">
        <div class="title">申报教材建设历程</div>
        <div class="base-content">
          <nz-table
            #basicTable
            [nzShowPagination]="false"
            [nzData]="textBook?.courses"
            [nzScroll]="{
              x: (templ1.style.width || '1000') + 'px',
              y: '240px'
            }"
          >
            <thead>
              <tr>
                <th nzWidth="80px" nzLeft nzAlign="right">版次</th>
                <th nzWidth="120px">出版时间</th>
                <th nzWidth="100px">字数</th>
                <th nzWidth="100px">重印次数</th>
                <th nzWidth="100px">本版总印数</th>
                <th nzWidth="200px">获奖励情况</th>
              </tr>
            </thead>
            <tbody>
              @for (data of textBook?.courses; track data;let index = $index) {
              <tr>
                <td nzLeft nzAlign="right">{{ index + 1 }}</td>
                <td>
                  {{ data.date?.iso | date : "yyyy-MM" }}
                </td>
                <td>
                  {{ data.wordage }}
                </td>
                <td>
                  {{ data.num }}
                </td>
                <td>
                  {{ data.sumNum }}
                </td>
                <td>
                  {{ data.accolade }}
                </td>
              </tr>
              }
            </tbody>
          </nz-table>
        </div>
      </div>
      <div class="templ">
        <div class="title">申报教材特色及创新</div>
        <div class="base-content">
          <div class="note">
            {{ textBook?.innovateExplain }}
          </div>
        </div>
      </div>
      <div class="templ">
        <div class="title">申报教材应用情况及社会影响力</div>
        <div class="base-content">
          <div class="note">
            {{ textBook?.influence }}
          </div>
        </div>
      </div>
      <div class="templ">
        <div class="title">附件材料</div>
        <div class="base-content">
          <div class="row">
            <div class="label">教材电子版</div>
            <div class="value">
              @for (item of textBook?.textbookFiles; track item.name) {
              <a style="margin-right: 10px" [href]="item.url">{{
                item.name
              }}</a>
              }
            </div>
          </div>
          <div class="row">
            <div class="label">教材数字内容链接地址、账号</div>
            <div class="value">
              @for (item of textBook?.links; track item) {
              <li>{{ item }}</li>
              }
            </div>
          </div>
          <div class="text-tips">所有作者政治审查意见</div>
          <nz-table
            #basicTable
            [nzShowPagination]="false"
            [nzData]="textBook?.opinions"
            [nzScroll]="{
              x: (templ1.style.width || '1000') + 'px',
              y: '240px'
            }"
          >
            <thead>
              <tr>
                <th nzWidth="80px" nzLeft nzAlign="right">序号</th>
                <th nzWidth="100px">作者</th>
                <th nzWidth="100px">单位</th>
                <th nzWidth="100px">出生年月</th>
                <th nzWidth="100px">国籍</th>
                <th nzWidth="100px" nzRight>作者政治审查表</th>
              </tr>
            </thead>
            <tbody>
              @for (data of textBook?.opinions; track data.name;let index =
              $index) {
              <tr>
                <td nzLeft nzAlign="right">{{ index + 1 }}</td>
                <td>
                  {{ data.name }}
                </td>
                <td>
                  {{ data.unit }}
                </td>
                <td>
                  {{ data.birth | date : "yyyy-MM" }}
                </td>
                <td>
                  {{ data.nationality }}
                </td>
                <td nzRight>
                  <a [href]="data.reviewFile.url">{{ data.reviewFile.name }}</a>
                </td>
              </tr>
              }
            </tbody>
          </nz-table>
          <div class="row" style="margin-top: 10px">
            <div class="label">图书编校质量自查结果记录表</div>
            <div class="value">
              <a [href]="textBook?.selfResults?.url">{{
                textBook?.selfResults?.name
              }}</a>
            </div>
          </div>
          <div class="row">
            <div class="label">专家审核意见表</div>
            <div class="value">
              <a [href]="textBook?.expertOpinion?.url">{{
                textBook?.expertOpinion?.name
              }}</a>
            </div>
          </div>
          <div class="row">
            <div class="label">教材使用情况证明材料</div>
            <div class="value">
              <a [href]="textBook?.evidence?.url">{{ textBook?.evidence?.name }}</a>
            </div>
          </div>
          <div class="row">
            <div class="label">其他材料</div>
            <div class="value">
              @for (item of textBook?.moreMaterial; track item.name) {
              <a style="margin-right: 10px" [href]="item.url">{{
                item.name
              }}</a>
              }
            </div>
          </div>
        </div>
      </div>
      <div class="templ">
        <div class="title">教材作者诚信承诺</div>
        <div class="base-content">
          <nz-table
            #basicTable
            [nzShowPagination]="false"
            [nzData]="textBook?.authorSign"
            [nzScroll]="{
              x: (templ1.style.width || '1000') + 'px',
              y: '240px'
            }"
          >
            <thead>
              <tr>
                <th nzWidth="80px" nzLeft nzAlign="right">序号</th>
                <th nzWidth="100px">作者</th>
                <th nzWidth="100px">单位</th>
                <th nzWidth="100px">出生年月</th>
                <th nzWidth="100px">国籍</th>
                <th nzWidth="100px" nzRight>作者签名</th>
              </tr>
            </thead>
            <tbody>
              @for (data of textBook?.authorSign; track data.name;let index =
              $index) {
              <tr>
                <td nzLeft nzAlign="right">{{ index + 1 }}</td>
                <td>
                  {{ data.name }}
                </td>
                <td>
                  {{ data.unit }}
                </td>
                <td>
                  {{ data.birth?.iso | date : "yyyy-MM" }}
                </td>
                <td>
                  {{ data.nationality }}
                </td>
                <td nzRight>
                  <a [href]="data.reviewFile?.url">{{ data.reviewFile?.name }}</a>
                </td>
              </tr>
              }
            </tbody>
          </nz-table>
        </div>
      </div>
      <div class="templ">
        <div class="title">申报单位承诺意见</div>
        <div class="base-content">
          <div class="row">
            <div class="label">申报单位承诺意见材料</div>
            <div class="value">
              <a style="margin-right: 10px" [href]="textBook?.unitMaterial?.url">{{textBook?.unitMaterial?.name}}</a>
            </div>
          </div>
        </div>
      </div>
      <!-- <div class="templ">
        <div class="title">初评推荐意见</div>
        <div class="base-content">
          <div class="row">
            <div class="label">省级教育行政部门初评专家组意见</div>
            <div class="value">
              <span style="color:#231C1F99">暂未填写</span>
            </div>
          </div>
          <div class="row">
            <div class="label">省级教育行政部门意见</div>
            <div class="value">
              <span style="color:#231C1F99">暂无</span>
            </div>
          </div>
        </div>
      </div> -->
    </div>

    <div nz-col nzSpan="6">
      <nz-anchor
        style="position: fixed"
        (nzClick)="handleClick($event)"
        [nzShowInkInFixed]="true"
        [nzShowInkInFixed]="true"
      >
        <nz-link nzHref="#templ1" nzTitle="教材基本信息"></nz-link>
        <nz-link
          nzHref="#components-anchor-demo-static"
          nzTitle="教材适用情况"
        ></nz-link>
        <nz-link nzHref="#api" nzTitle="作者信息">
          <nz-link nzHref="#nz-anchor" nzTitle="作者"></nz-link>
          <nz-link nzHref="#nz-link" nzTitle="第一主编（作者）情况"></nz-link>
        </nz-link>
        <nz-link nzHref="#base" nzTitle="申报教材建设历程"></nz-link>
        <nz-link nzHref="#base" nzTitle="申报教材特色及创新"></nz-link>
        <nz-link
          nzHref="#base"
          nzTitle="申报教材应用情况及社会影响力"
        ></nz-link>
        <nz-link nzHref="#base" nzTitle="附件材料清单"></nz-link>
        <nz-link nzHref="#base" nzTitle="教材作者诚信承诺"></nz-link>
        <nz-link nzHref="#base" nzTitle="申报单位承诺意见"></nz-link>
        <!-- <nz-link nzHref="#base" nzTitle="初评推荐意见"></nz-link> -->
      </nz-anchor>
    </div>
  </div>
</div>
@if (!textBook?.discard && !textBook?.render) {
  <div class="footer">
    <button
      nz-button
      nzType="primary"
      style="background: #3e49b3; border: 1px #3e49b3"
      (click)="edit()"
    >
    编辑教材
    </button>
  </div>
}
