Ver código fonte

Merge branch 'master' of http://git.fmode.cn:3000/bin/edu-textbook

cehn 7 meses atrás
pai
commit
dc2d25fe55

+ 339 - 326
projects/textbook/src/modules/common/textbook-details/textbook-details.component.html

@@ -1,9 +1,5 @@
 <div class="site-page-header">
-  <nz-page-header
-    nzTitle="教材详情 - {{ textBook?.title }}"
-    nzSubtitle=""
-    style="padding: 0"
-  >
+  <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>返回
@@ -11,105 +7,117 @@
     </nz-breadcrumb>
   </nz-page-header>
 </div>
-<div class="content" #scroll>
+<div class="content">
   <div nz-row>
     <div nz-col nzSpan="18">
       <div id="anchor1" class="occupy" style="height: 100px;"></div>
-      <div class="templ1" #templ1 style="width: 500px; height: 700px">
+      <div class="templ1" #templ1 style="width: 500px; ">
         <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?.code }}-{{ textBook?.majorPoniter?.name }}</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 class="value">{{ textBook?.approval }}
               @if (textBook?.approval&&textBook?.approval!='否') {
-                <a (click)="openFile(textBook?.approvedImgUrl)">
-                  <span nz-icon nzType="file" nzTheme="outline"></span>
-                  教材获批截图
-                </a>
+              <a (click)="openFile(textBook?.approvedImgUrl)">
+                <span nz-icon nzType="file" nzTheme="outline"></span>
+                教材获批截图
+              </a>
               }
             </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-dd" }}/{{
-                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="label">申报类型</div>
             <div class="value">
-              @for (item of textBook?.importantProject; track $index) {
-                <p>{{item}} {{item=='其他省部级及以上项目'?'-'+textBook?.importantProjectOther:''}}</p>
-              }
+              {{ textBook?.type }}
+              {{ textBook?.type == "全册" ? textBook?.typeNumber + "册" : "" }}
             </div>
           </div>
+
+          <nz-collapse>
+            @for (volume of eduTextbookVolumeList; track $index) {
+            <nz-collapse-panel [nzHeader]="$index+1+'册'" [nzActive]="'true'">
+              <div class="row">
+                <div class="label">第一主编(作者)</div>
+                <div class="value">{{ volume?.author }}</div>
+              </div>
+              <div class="row">
+                <div class="label">第一主编(作者)单位</div>
+                <div class="value">{{ volume?.unit }}</div>
+              </div>
+
+
+              <div class="row">
+                <div class="label">教材主要语种类型</div>
+                <div class="value">{{ volume?.lang }}</div>
+              </div>
+              <div class="row">
+                <div class="label">国际标准书号</div>
+                <div class="value">{{ volume?.ISBN }}</div>
+              </div>
+              <div class="row">
+                <div class="label">其他主编姓名</div>
+                <div class="value">{{ volume?.authors || '-'}}</div>
+              </div>
+              <div class="row">
+                <div class="label">其他编者姓名</div>
+                <div class="value">{{ volume?.editor || '-'}}</div>
+              </div>
+
+              <div class="row">
+                <div class="label">出版单位</div>
+                <div class="value">{{ volume?.editionUnit }}</div>
+              </div>
+              <div class="row">
+                <div class="label">初版时间</div>
+                <div class="value">
+                  {{ volume?.editionFirst?.iso | date : "yyyy-MM" }}
+                </div>
+              </div>
+              <div class="row">
+                <div class="label">载体形式</div>
+                <div class="value">{{ volume?.carrierShape }}</div>
+              </div>
+              <div class="row">
+                <div class="label">本版出版时间及版次</div>
+                <div class="value">
+                  {{ volume?.editionDate?.iso | date : "yyyy-MM" }}/{{
+                  volume?.editionNumber
+                  }}
+                </div>
+              </div>
+              <div class="row">
+                <div class="label">最新印次时间及印次</div>
+                <div class="value">
+                  {{ volume?.printDate?.iso | date : "yyyy-MM-dd" }}/{{
+                  volume?.printNumber
+                  }}
+                </div>
+              </div>
+              <div class="row">
+                <div class="label">初版以来合计印数</div>
+                <div class="value">{{ volume?.printSum }}</div>
+              </div>
+              <div class="row">
+                <div class="label">初版以来是否曾列为重点项目</div>
+                <div class="value">
+                  @for (item of volume?.importantProject; track $index) {
+                  <p>{{item}} {{item=='其他省部级及以上项目'?'-'+volume?.importantProjectOther:''}}</p>
+                  }
+                </div>
+              </div>
+            </nz-collapse-panel>
+            }
+          </nz-collapse>
+
+
           <!-- <div class="row">
             <div class="label">版权页截图</div>
             <div class="value">
@@ -125,7 +133,7 @@
         </div>
       </div>
       <div id="anchor2" class="occupy" style="height: 60px;"></div>
-      <div class="templ" >
+      <div class="templ">
         <div class="title">教材适用情况</div>
         <div class="base-content">
           <div class="row">
@@ -154,172 +162,174 @@
         </div>
       </div>
       <div id="anchor3" class="occupy" style="height: 60px;"></div>
-      <div class="templ" >
-      <div id="anchor3_1" class="occupy" style="height: 60px;"></div>
-      <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 nzEllipsis nzWidth="120px" nzLeft>姓名</th>
-                <th nzEllipsis nzWidth="120px">单位</th>
-                <th nzEllipsis nzWidth="120px">出生年月</th>
-                <th nzEllipsis nzWidth="120px">国籍</th>
-                <th nzEllipsis nzWidth="120px">职务</th>
-                <th nzEllipsis nzWidth="120px">职称</th>
-                <th nzEllipsis nzWidth="120px">手机号码</th>
-                <th nzEllipsis nzWidth="120px">电子邮箱</th>
-                <th nzEllipsis nzWidth="120px">分工</th>
-                <!-- <th nzEllipsis nzWidth="120px">签名</th> -->
-                <!-- <th nzEllipsis nzWidth="120px">政治审查表</th> -->
-              </tr>
-            </thead>
-            <tbody>
-              @for (data of textBook?.authorList; track data.mobile;let index =
-              $index) {
-              <tr>
-                <td nzEllipsis nzLeft>
-                  {{ data.name }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.unit }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.birth?.iso | date : "yyyy-MM" }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.nationality }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.job }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.title }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.mobile }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.email }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.work }}
-                </td>
-                <!-- <td nzEllipsis>
-                  <a (click)="openFile(data?.signature)">签名文件</a>
-                </td> -->
-                <!-- <td nzEllipsis>
-                  <a (click)="openFile(data?.examine)">政治审查表</a>
-                </td> -->
-              </tr>
-              }
-            </tbody>
-          </nz-table>
-        </div>
+      <div class="templ">
+        <div id="anchor3_1" class="occupy" style="height: 60px;"></div>
+        <div class="title">作者信息</div>
+
+
+        <nz-collapse>
+          @for (volume of eduTextbookVolumeList; track $index) {
+          <nz-collapse-panel [nzHeader]="$index+1+'册'" [nzActive]="'true'">
+            <div class="text mar10">
+              作者(含主编,不超过 6 人,教材中明确出现姓名)
+            </div>
+            <div class="base-content">
+              <nz-table #basicTable [nzShowPagination]="false" [nzData]="volume?.authorList" [nzScroll]="{
+                  x: (templ1.style.width || '1000') + 'px',
+                  y: '240px'
+                }">
+                <thead>
+                  <tr>
+                    <th nzEllipsis nzWidth="120px" nzLeft>姓名</th>
+                    <th nzEllipsis nzWidth="120px">单位</th>
+                    <th nzEllipsis nzWidth="120px">出生年月</th>
+                    <th nzEllipsis nzWidth="120px">国籍</th>
+                    <th nzEllipsis nzWidth="120px">职务</th>
+                    <th nzEllipsis nzWidth="120px">职称</th>
+                    <th nzEllipsis nzWidth="120px">手机号码</th>
+                    <th nzEllipsis nzWidth="120px">电子邮箱</th>
+                    <th nzEllipsis nzWidth="120px">分工</th>
+                    <!-- <th nzEllipsis nzWidth="120px">签名</th> -->
+                    <!-- <th nzEllipsis nzWidth="120px">政治审查表</th> -->
+                  </tr>
+                </thead>
+                <tbody>
+                  @for (data of volume?.authorList; track data.mobile;let index =
+                  $index) {
+                  <tr>
+                    <td nzEllipsis nzLeft>
+                      {{ data.name }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.unit }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.birth?.iso | date : "yyyy-MM" }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.nationality }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.job }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.title }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.mobile }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.email }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.work }}
+                    </td>
+                  </tr>
+                  }
+                </tbody>
+              </nz-table>
+            </div>
+
+            <div id="anchor3_2" class="occupy" style="height: 60px;"></div>
+            <div class="text mar10">第一主编(作者)情况</div>
+            <div class="base-content">
+              <div class="text-tips">1.相关教学经历</div>
+              <div class="note">
+                {{ volume?.authorDetails }}
+              </div>
+              <div class="text-tips">2.相关科学研究项目、成果或论文专著(限5项)</div>
+              <nz-table #basicTable [nzShowPagination]="false" [nzData]="volume?.achievementOptions" [nzScroll]="{
+                  x: (templ1.style.width || '1000') + 'px',
+                  y: '240px'
+                }" nzTableLayout="fixed">
+                <thead>
+                  <tr>
+                    <th nzWidth="80px" nzLeft nzAlign="right">序号</th>
+                    <th nzWidth="160px" nzEllipsis>名称</th>
+                    <th nzWidth="160px">来源/出版单位</th>
+                    <th nzWidth="80px">时间</th>
+                  </tr>
+                </thead>
+                <tbody>
+                  @for (data of volume?.achievementOptions; track data.name;let
+                  index = $index) {
+                  <tr>
+                    <td nzEllipsis nzLeft nzAlign="right">{{ index + 1 }}</td>
+                    <td nzEllipsis>
+                      {{ data.name }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.unit }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.date?.iso | date : "yyyy-MM" }}
+                    </td>
+                  </tr>
+                  }
+                </tbody>
+              </nz-table>
+            </div>
+
+          </nz-collapse-panel>
+          }
+        </nz-collapse>
+
 
-      <div id="anchor3_2" class="occupy" style="height: 60px;"></div>
-      <div class="text mar10" >第一主编(作者)情况</div>
-        <div class="base-content">
-          <div class="text-tips">1.相关教学经历</div>
-          <div class="note">
-            {{ textBook?.authorDetails }}
-          </div>
-          <div class="text-tips">2.相关科学研究项目、成果或论文专著(限5项)</div>
-          <nz-table
-            #basicTable
-            [nzShowPagination]="false"
-            [nzData]="textBook?.achievementOptions"
-            [nzScroll]="{
-              x: (templ1.style.width || '1000') + 'px',
-              y: '240px'
-            }"
-            nzTableLayout="fixed"
-          >
-            <thead>
-              <tr>
-                <th nzWidth="80px" nzLeft nzAlign="right">序号</th>
-                <th nzWidth="160px" nzEllipsis>名称</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 nzEllipsis nzLeft nzAlign="right">{{ index + 1 }}</td>
-                <td nzEllipsis>
-                  {{ data.name }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.unit }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.date?.iso | date : "yyyy-MM" }}
-                </td>
-              </tr>
-              }
-            </tbody>
-          </nz-table>
-        </div>
       </div>
       <div id="anchor4" class="occupy" style="height: 60px;"></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 nzEllipsis nzLeft nzAlign="right">{{ index + 1 }}</td>
-                <td nzEllipsis>
-                  {{ data.date?.iso | date : "yyyy-MM" }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.wordage }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.num }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.sumNum }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.accolade }}
-                </td>
-              </tr>
-              }
-            </tbody>
-          </nz-table>
+
+          <nz-collapse>
+            @for (volume of eduTextbookVolumeList; track $index) {
+            <nz-collapse-panel [nzHeader]="$index+1+'册'" [nzActive]="'true'">
+
+              <nz-table #basicTable [nzShowPagination]="false" [nzData]="volume?.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 volume?.courses; track data;let index = $index) {
+                  <tr>
+                    <td nzEllipsis nzLeft nzAlign="right">{{ index + 1 }}</td>
+                    <td nzEllipsis>
+                      {{ data.date?.iso | date : "yyyy-MM" }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.wordage }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.num }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.sumNum }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.accolade }}
+                    </td>
+                  </tr>
+                  }
+                </tbody>
+              </nz-table>
+            </nz-collapse-panel>
+            }
+          </nz-collapse>
+
+
+
+
         </div>
       </div>
       <div id="anchor4" id="anchor5" class="occupy" style="height: 60px;"></div>
@@ -332,7 +342,7 @@
         </div>
       </div>
       <div id="anchor4" id="anchor6" class="occupy" style="height: 60px;"></div>
-      <div class="templ" >
+      <div class="templ">
         <div class="title">申报教材应用情况及社会影响力</div>
         <div class="base-content">
           <div class="note">
@@ -355,82 +365,90 @@
         </div>
       </div>
       <div id="anchor4" id="anchor7" class="occupy" style="height: 60px;"></div>
-      <div class="templ" >
+      <div class="templ">
         <div class="title">附件材料</div>
-        <div class="base-content" >
-          <nz-table
-          style="margin-bottom: 20px;"
-            #basicTable
-            [nzShowPagination]="false"
-            [nzData]="textBook?.authorList"
-            [nzScroll]="{
+        <div class="base-content">
+
+
+          <nz-collapse>
+            @for (volume of eduTextbookVolumeList; track $index) {
+            <nz-collapse-panel [nzHeader]="$index+1+'册'" [nzActive]="'true'">
+
+              <nz-table style="margin-bottom: 20px;" #basicTable [nzShowPagination]="false"
+                [nzData]="volume?.authorList" [nzScroll]="{
               x: (templ1.style.width || '1000') + 'px',
               y: '240px'
-            }"
-          >
-            <thead>
-              <tr>
-                <th nzEllipsis nzWidth="120px" nzLeft>姓名</th>
-                <th nzEllipsis nzWidth="120px" nzLeft>政治审查表</th>
-                <th nzEllipsis nzWidth="120px">单位</th>
-                <th nzEllipsis nzWidth="120px">出生年月</th>
-                <th nzEllipsis nzWidth="120px">国籍</th>
-                <th nzEllipsis nzWidth="120px">职务</th>
-                <th nzEllipsis nzWidth="120px">职称</th>
-                <th nzEllipsis nzWidth="120px">手机号码</th>
-                <th nzEllipsis nzWidth="120px">电子邮箱</th>
-                <th nzEllipsis nzWidth="120px">分工</th>
-                <!-- <th nzEllipsis nzWidth="120px">签名</th> -->
-              </tr>
-            </thead>
-            <tbody>
-              @for (data of textBook?.authorList; track data.mobile;let index =
-              $index) {
-              <tr>
-                <td nzEllipsis nzLeft>
-                  {{ data.name }}
-                </td>
-                 <td nzEllipsis nzLeft>
-                  <a (click)="openFile(data?.examine)">政治审查表</a>
-                </td>
-                <td nzEllipsis>
-                  {{ data.unit }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.birth?.iso | date : "yyyy-MM" }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.nationality }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.job }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.title }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.mobile }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.email }}
-                </td>
-                <td nzEllipsis>
-                  {{ data.work }}
-                </td>
-                <!-- <td nzEllipsis>
+            }">
+                <thead>
+                  <tr>
+                    <th nzEllipsis nzWidth="120px" nzLeft>姓名</th>
+                    <th nzEllipsis nzWidth="120px" nzLeft>政治审查表</th>
+                    <th nzEllipsis nzWidth="120px">单位</th>
+                    <th nzEllipsis nzWidth="120px">出生年月</th>
+                    <th nzEllipsis nzWidth="120px">国籍</th>
+                    <th nzEllipsis nzWidth="120px">职务</th>
+                    <th nzEllipsis nzWidth="120px">职称</th>
+                    <th nzEllipsis nzWidth="120px">手机号码</th>
+                    <th nzEllipsis nzWidth="120px">电子邮箱</th>
+                    <th nzEllipsis nzWidth="120px">分工</th>
+                    <!-- <th nzEllipsis nzWidth="120px">签名</th> -->
+                  </tr>
+                </thead>
+                <tbody>
+                  @for (data of volume?.authorList; track data.mobile;let index =
+                  $index) {
+                  <tr>
+                    <td nzEllipsis nzLeft>
+                      {{ data.name }}
+                    </td>
+                    <td nzEllipsis nzLeft>
+                      <a (click)="openFile(data?.examine)">政治审查表</a>
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.unit }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.birth?.iso | date : "yyyy-MM" }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.nationality }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.job }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.title }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.mobile }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.email }}
+                    </td>
+                    <td nzEllipsis>
+                      {{ data.work }}
+                    </td>
+                    <!-- <td nzEllipsis>
                   <a (click)="openFile(data?.signature)">签名文件</a>
                 </td> -->
-               
-              </tr>
-              }
-            </tbody>
-          </nz-table>
+
+                  </tr>
+                  }
+                </tbody>
+              </nz-table>
+            </nz-collapse-panel>
+            }
+          </nz-collapse>
+
+
+
+
           <div class="row" style="margin-top: 10px">
             <div class="label">图书编校质量自查结果记录表</div>
             <div class="value">
               <a (click)="openFile(textBook?.selfResults?.url)">{{
                 textBook?.selfResults?.name
-              }}</a>
+                }}</a>
             </div>
           </div>
           <div class="row">
@@ -438,7 +456,7 @@
             <div class="value">
               <a (click)="openFile(textBook?.expertOpinion?.url)">{{
                 textBook?.expertOpinion?.name
-              }}</a>
+                }}</a>
             </div>
           </div>
           <div class="row">
@@ -446,7 +464,7 @@
             <div class="value">
               <a (click)="openFile(textBook?.evidence?.url)">{{
                 textBook?.evidence?.name
-              }}</a>
+                }}</a>
             </div>
           </div>
           <div class="row">
@@ -465,22 +483,22 @@
             <div class="label"> CIP 相关证明截图</div>
             <div class="value">
               @for (item of textBook?.cipProveFile; track item.name) {
-                <a (click)="openFile(item.url)" style="margin-right: 10px">{{
-                  item.name
+              <a (click)="openFile(item.url)" style="margin-right: 10px">{{
+                item.name
                 }}</a>
-                <br>
-                }
+              <br>
+              }
             </div>
           </div>
-         
-          
+
+
           <div class="row">
             <div class="label">其他材料</div>
             <div class="value">
               @for (item of textBook?.moreMaterial; track item.name) {
               <a (click)="openFile(item.url)" style="margin-right: 10px">{{
                 item.name
-              }}</a>
+                }}</a>
               <br>
               }
             </div>
@@ -537,7 +555,7 @@
           </nz-table>
         </div>
       </div> -->
- 
+
       <!-- <div class="templ">
         <div class="title">初评推荐意见</div>
         <div class="base-content">
@@ -582,13 +600,8 @@
 @if (user?.id == textBook?.user?.objectId && !textBook?.discard && !textBook?.render)
 {
 <div class="footer">
-  <button
-    nz-button
-    nzType="primary"
-    style="background: #3e49b3; border: 1px #3e49b3"
-    (click)="edit()"
-  >
+  <button nz-button nzType="primary" style="background: #3e49b3; border: 1px #3e49b3" (click)="edit()">
     编辑教材
   </button>
 </div>
-}
+}

+ 59 - 0
projects/textbook/src/modules/common/textbook-details/textbook-details.component.ts

@@ -9,6 +9,10 @@ import { ReactiveFormsModule } from '@angular/forms';
 import { NzAnchorModule } from 'ng-zorro-antd/anchor';
 import { DatePipe } from '@angular/common';
 import Parse from 'parse';
+import { NzCollapseModule } from 'ng-zorro-antd/collapse';
+import { BrowserModule } from '@angular/platform-browser';
+import { CommonModule } from '@angular/common';
+
 @Component({
   selector: 'app-textbook-details',
   imports: [
@@ -16,6 +20,7 @@ import Parse from 'parse';
     ReactiveFormsModule,
     NzAnchorModule,
     DatePipe,
+    NzCollapseModule,CommonModule
   ],
   standalone: true,
   templateUrl: './textbook-details.component.html',
@@ -26,6 +31,59 @@ export class TextbookDetailsComponent implements OnInit {
   @ViewChild('templ1') templ1: any;
   user?:Parse.Object
   textBook: object | any = {}
+
+
+
+/**扩展表记录 */
+eduTextbookVolumeList: Array<any> = []
+/**获取扩展表记录 */
+async getEduTextbookVolumeList() {
+  if (this.textBook?.typeNumber && this.textBook?.typeNumber > 12) {
+    this.textBook.typeNumber = 12
+  }
+  console.log(this.textBook?.type, this.textBook?.typeNumber)
+  let query = new Parse.Query('EduTextbookVolume')
+  query.equalTo('eduTextbook', this.textBook?.objectId)
+  query.ascending('createdAt')//小到大
+  query.notEqualTo('isDeleted', true)
+  if (this.textBook?.type == '全册') {
+    query.limit(this.textBook?.typeNumber)
+  } else {
+    query.limit(1)
+  }
+  let req = await query.find()
+  let list = [] 
+  for(let i in req){
+    list.push(req[i].toJSON())
+  }
+  console.log(list)
+  if (this.textBook?.type == '全册') {
+    this.eduTextbookVolumeList = new Array(this.textBook?.typeNumber).fill({ objectId: '' })
+    for (let i in list) {
+      this.eduTextbookVolumeList[i] = list[i]
+    }
+  } else {
+    this.eduTextbookVolumeList[0] = list[0]
+    console.log(this.eduTextbookVolumeList)
+  }
+
+}
+/** 册数*/
+typeNumber:any
+/** 申报类型*/
+type:any
+
+
+
+
+
+
+
+
+
+
+
+
   constructor(private router: Router, private activeRoute: ActivatedRoute) {}
 
   ngOnInit() {
@@ -38,6 +96,7 @@ export class TextbookDetailsComponent implements OnInit {
         let r = await query.first();
         this.textBook = r?.toJSON()
         console.log(this.textBook);
+        this.getEduTextbookVolumeList()
       }
     });
   }

+ 38 - 0
projects/textbook/src/modules/nav-author/components/textbook-content/textbook-content.component.ts

@@ -146,6 +146,44 @@ export class TextbookContentComponent implements OnInit {
     console.log(params);
     if (event == 'pre') {
       this.state.emit({ type: 'pre' });
+      return
+    }
+    console.log(this.validateForm.value);
+    // let coursesVrifly = !this.courses.some(item=>Object.values(item).some(val=> val == '' || val == undefined))
+    let coursesVrifly = true
+    if (this.validateForm.valid) {
+      let params: any = this.validateForm.value;
+      if (event == 'next') {
+        if(!coursesVrifly){
+          this.msg.warning('申报教材建设历程填写不完整')
+          return
+        }
+        await this.saveEduTextbook(params, true);
+        this.state.emit({ type: 'next', textBook: this.eduTextbook });
+      }
+    } else {
+      if (event == 'save') {
+        let params: any = this.validateForm.value;
+        await this.saveEduTextbook(params, (this.validateForm.valid && coursesVrifly));
+        this.modal.success({
+          nzTitle: '保存成功',
+          nzContent: '<p>已保存并且至空间</p>',
+          nzOnOk: () => console.log('Info OK'),
+        });
+        return;
+      }
+      if (event == 'next') {
+      let params: any = this.validateForm.value;
+      await this.saveEduTextbook(params, false);
+        this.state.emit({ type: 'next', textBook: this.eduTextbook });
+      }
+      // Object.values(this.validateForm.controls).forEach((control) => {
+      //   if (control.invalid) {
+      //     control.markAsDirty();
+      //     control.updateValueAndValidity({ onlySelf: true });
+      //   }
+      // });
+      // this.msg.warning('请填写完整信息');
       return;
     }
     // let coursesVrifly = !this.courses.some(item=>Object.values(item).some(val=> val == '' || val == undefined))