xll 7 months ago
parent
commit
f3f5d172d9

+ 12 - 3
projects/textbook/src/modules/nav-author/apply/apply.component.html

@@ -1,6 +1,6 @@
 <div id="top"></div>
 <div id="top"></div>
 <div class="site-page-header">
 <div class="site-page-header">
-  <nz-page-header nzTitle="创建/编辑空间" nzSubtitle="" style="padding: 0">
+  <nz-page-header [nzTitle]="eduId?'编辑教材':'创建教材'" nzSubtitle="" style="padding: 0">
     <nz-breadcrumb nz-page-header-breadcrumb>
     <nz-breadcrumb nz-page-header-breadcrumb>
       <div class="back" (click)="back()">
       <div class="back" (click)="back()">
         <span nz-icon nzType="left" nzTheme="outline"></span>返回
         <span nz-icon nzType="left" nzTheme="outline"></span>返回
@@ -12,7 +12,8 @@
       <nz-step nzTitle="填写基本信息" nzDescription=""></nz-step>
       <nz-step nzTitle="填写基本信息" nzDescription=""></nz-step>
       <nz-step nzTitle="填写教材适用情况" nzDescription=""></nz-step>
       <nz-step nzTitle="填写教材适用情况" nzDescription=""></nz-step>
       <nz-step nzTitle="填写教材内容" nzDescription=""></nz-step>
       <nz-step nzTitle="填写教材内容" nzDescription=""></nz-step>
-      <nz-step nzTitle="上传附件及承诺" nzDescription=""></nz-step>
+      <nz-step nzTitle="填写承诺内容" nzDescription=""></nz-step>
+      <nz-step nzTitle="上传附件材料" nzDescription=""></nz-step>
     </nz-steps>
     </nz-steps>
   </div>
   </div>
 </div>
 </div>
@@ -41,7 +42,15 @@
       (save)="save()"
       (save)="save()"
       (maxWidth)="(submitComp.style.width)"
       (maxWidth)="(submitComp.style.width)"
     ></app-textbook-content>
     ></app-textbook-content>
-    } @case (3) {
+    }@case (3) {
+      <app-faith
+        [eduTextbook]="textBook"
+        (state)="changeState($event)"
+        (save)="save()"
+        (maxWidth)="(submitComp.style.width)"
+      ></app-faith>
+      } 
+    @case (4) {
     <app-attachment
     <app-attachment
       [eduTextbook]="textBook"
       [eduTextbook]="textBook"
       (state)="changeState($event)"
       (state)="changeState($event)"

+ 7 - 1
projects/textbook/src/modules/nav-author/apply/apply.component.ts

@@ -6,6 +6,7 @@ import { BasicInComponent } from '../components/basic-in/basic-in.component';
 import { TextbookPertainComponent } from '../components/textbook-pertain/textbook-pertain.component';
 import { TextbookPertainComponent } from '../components/textbook-pertain/textbook-pertain.component';
 import { TextbookContentComponent } from '../components/textbook-content/textbook-content.component';
 import { TextbookContentComponent } from '../components/textbook-content/textbook-content.component';
 import { AttachmentComponent } from '../components/attachment/attachment.component';
 import { AttachmentComponent } from '../components/attachment/attachment.component';
+import { FaithComponent } from '../components/faith/faith.component';
 // import { NzLayoutModule } from 'ng-zorro-antd/layout';
 // import { NzLayoutModule } from 'ng-zorro-antd/layout';
 import Parse from 'parse';
 import Parse from 'parse';
 
 
@@ -18,6 +19,7 @@ import Parse from 'parse';
     TextbookPertainComponent,
     TextbookPertainComponent,
     TextbookContentComponent,
     TextbookContentComponent,
     AttachmentComponent,
     AttachmentComponent,
+    FaithComponent
   ],
   ],
   standalone: true,
   standalone: true,
   templateUrl: './apply.component.html',
   templateUrl: './apply.component.html',
@@ -38,10 +40,14 @@ export class ApplyComponent implements OnInit {
   showFrom: boolean = false;
   showFrom: boolean = false;
 
 
   constructor(private router: Router, private activeRoute: ActivatedRoute) {}
   constructor(private router: Router, private activeRoute: ActivatedRoute) {}
-
+/** 路由传递教材id*/
+eduId:any
   async ngOnInit() {
   async ngOnInit() {
+    let that = this
     this.activeRoute.paramMap.subscribe(async (params) => {
     this.activeRoute.paramMap.subscribe(async (params) => {
       let id = params.get('id');
       let id = params.get('id');
+      that.eduId = id
+      console.log(that.eduId)
       if (id) {
       if (id) {
         let query = new Parse.Query('EduTextbook');
         let query = new Parse.Query('EduTextbook');
         query.equalTo('objectId', id);
         query.equalTo('objectId', id);

+ 153 - 173
projects/textbook/src/modules/nav-author/components/attachment/attachment.component.html

@@ -1,182 +1,98 @@
 <div class="entry">
 <div class="entry">
   <!-- <form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()"> -->
   <!-- <form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()"> -->
-  
-  
-  
-    <div class="author-content">
-      <div class="title">所有作者政治审查意见</div>
-      <div class="text">
-        <span style="color: red;">*</span>
-        从本申报平台 
-        <a (click)="downloadFile('教材编写人员政治审查表.docx')">下载格式要求</a>
-         后,对应作者姓名上传“作者政治审查表”,支持 PDF、JPG、JPEG、PNG 格式,大小不超过 2M。作者单位党委对作者进行审查,对政治思想表现情况进行评价,确保作者的正确政治方向、价值取向,无违法违纪等记录。
-        教材编写成员涉及多个不同单位时需要各单位分别出具意见,并由所在单位党委盖章。</div>
-     
-
-
-
-        
-        <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>
+
+
+
+  <div class="author-content">
+    <div class="title">1.所有作者政治审查意见(必须上传 )</div>
+    <div class="text">
+      <span style="color: red;">*</span>
+      从本申报平台
+      <a (click)="downloadFile('教材编写人员政治审查表.docx')">下载格式要求</a>
+      后,对应作者姓名上传“作者政治审查表”,支持 PDF、JPG、JPEG、PNG 格式,大小不超过 2M。作者单位党委对作者进行审查,对政治思想表现情况进行评价,确保作者的正确政治方向、价值取向,无违法违纪等记录。
+      教材编写成员涉及多个不同单位时需要各单位分别出具意见,并由所在单位党委盖章。
+    </div>
+    <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>
                 <span style="color: red;">*</span>
-              </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>
+              </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.signature) {
                 @if (data.signature) {
                   <a style="color: #3e49b3;" (click)="openFile(data.signature)">签名文件</a>
                   <a style="color: #3e49b3;" (click)="openFile(data.signature)">签名文件</a>
                 }
                 }
                 <app-comp-upload (change)="upload($event, 'signature',index)"></app-comp-upload>
                 <app-comp-upload (change)="upload($event, 'signature',index)"></app-comp-upload>
-              </td>
-              <td nzRight>
-                @if (data.examine) {
-                <a style="color: #3e49b3;" (click)="openFile(data.examine)">政治审查表 </a>
-                }
-                <app-comp-upload (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> -->
-                <a (click)="onDel('authorList', index)"><span nz-icon style="font-size: 20px" nzType="delete"
-                    nzTheme="outline"></span></a>
-              </td>
-            </tr>
+              </td> -->
+          <td nzRight>
+            @if (data.examine) {
+            <a style="color: #3e49b3;" (click)="openFile(data.examine)">政治审查表 </a>
             }
             }
-          </tbody>
-        </nz-table>
-
-
-
-    </div>
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-    <div class="author-content">
-    <div class="title">教材版权信息</div>
-    <nz-form-item class="row" style="margin-bottom: 16px">
-     <nz-form-label class="label" [nzNoColon]="true" [nzSm]="10" [nzXs]="10" nzRequired>版权页截图</nz-form-label>
-      <nz-form-control class="val" nzErrorTip="请上传版权页截图" style="width: 100%">
-        @if (copyrightImgUrl) {
-        <a style="color: #3e49b3;" (click)="openFile(copyrightImgUrl)">
-          <span nz-icon nzType="file" nzTheme="outline"></span>
-          版权页截图
-        </a>
-        }
-        <app-comp-upload [type]="'pdf'" [width]="320" [type]="'pdf'" (change)="upload($event, 'copyrightImgUrl')" title="上传PDF"></app-comp-upload>
-
-        <div class="text upText" style="margin: 10px 0">
-          支持上传PDF,大小不超过 2M
-        </div>
-      </nz-form-control>
-    </nz-form-item>
-    
-    <nz-form-item class="row" style="margin-bottom: 16px">
-      <nz-form-label class="label" [nzNoColon]="true" [nzSm]="10" [nzXs]="10" nzRequired>中国版本图书馆 CIP
-        查询截图</nz-form-label>
-      <nz-form-control class="val" nzErrorTip="请上传中国版本图书馆 CIP 查询截图" style="width: 100%">
-        @if (CIPImgUrl) {
-        <a style="color: #3e49b3;" (click)="openFile(CIPImgUrl)">
-          <span nz-icon nzType="file" nzTheme="outline"></span>
-          CIP 查询截图
-        </a>
+            <app-comp-upload (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> -->
+            <a (click)="onDel('authorList', index)"><span nz-icon style="font-size: 20px" nzType="delete"
+                nzTheme="outline"></span></a>
+          </td>
+        </tr>
         }
         }
-        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'CIPImgUrl')" title="上传PDF"></app-comp-upload>
-
-        <div class="text upText" style="margin: 10px 0">
-          支持批量上传 PDF 格式,单个文件大小不超过 2M。
-        </div>
-      </nz-form-control>
-    </nz-form-item>
-
-
-
-    <div class="author-content">
-      <div class="text">如 CIP 数据中无“教材”字样的,须再上传内容提要或前言或后记中可以证明本书为教材的相关内容截图</div>
-      @if (cipProveFile.length>0) {
-      @for (url of cipProveFile; track $index) {
-      <p>
-        <a style="color: #3e49b3;font-size: 14px;" (click)="openFile(url?.url)">
-          <span nz-icon nzType="file" nzTheme="outline"></span>
-          CIP 相关截图 {{$index+1}}
-        </a>
-      </p>
-      }
-      }
-      <app-comp-upload [type]="'pdf'" [width]="320" [maxlenght]="99" (change)="upload($event, 'cipProveFile')"
-        title="上传PDF"></app-comp-upload>
-  
-      <div class="text upText" style="margin: 10px 0">
-        支持上传PDF,大小不超过 2M
-      </div>
-    </div>
-
-
-
-
-
+      </tbody>
+    </nz-table>
   </div>
   </div>
+ 
   <div class="author-content">
   <div class="author-content">
-    <div class="title">图书编校质量自查结果记录表</div>
+    <div class="title">2.图书编校质量自查结果记录表(必须上传)</div>
     <div class="text">
     <div class="text">
       教材出版单位对申报教材的编校质量自查后,按要求提供图书编校质量自查结果记录表,并加盖出版社公章。全册教材的不同分册以不同文件分别上传。<a
       教材出版单位对申报教材的编校质量自查后,按要求提供图书编校质量自查结果记录表,并加盖出版社公章。全册教材的不同分册以不同文件分别上传。<a
         (click)="downloadFile('图书编校质量自查结果记录表.docx')">下载模板</a>
         (click)="downloadFile('图书编校质量自查结果记录表.docx')">下载模板</a>
@@ -190,7 +106,8 @@
           自查结果记录表
           自查结果记录表
         </a>
         </a>
         }
         }
-        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'selfResults')" title="上传PDF"></app-comp-upload>
+        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'selfResults')"
+          title="上传PDF"></app-comp-upload>
         <div class="text upText" style="margin: 10px 0">
         <div class="text upText" style="margin: 10px 0">
           支持上传PDF,大小不超过 2M
           支持上传PDF,大小不超过 2M
         </div>
         </div>
@@ -198,7 +115,7 @@
     </nz-form-item>
     </nz-form-item>
   </div>
   </div>
   <div class="author-content">
   <div class="author-content">
-    <div class="title">专家审查意见表</div>
+    <div class="title">3.专家审查意见表(必须上传)</div>
     <div class="text">
     <div class="text">
       由第一主编所在单位和出版机构邀请校内外相关学科专业领域专家,对教材进行思想性、学术性审核。专家不少于
       由第一主编所在单位和出版机构邀请校内外相关学科专业领域专家,对教材进行思想性、学术性审核。专家不少于
       3
       3
@@ -213,7 +130,8 @@
           专家审查意见表
           专家审查意见表
         </a>
         </a>
         }
         }
-        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'expertOpinion')" title="上传PDF"></app-comp-upload>
+        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'expertOpinion')"
+          title="上传PDF"></app-comp-upload>
         <div class="text upText" style="margin: 10px 0">
         <div class="text upText" style="margin: 10px 0">
           支持批量上传 PDF、JPG、JPEG、PNG 格式,单个大小不超过 2M
           支持批量上传 PDF、JPG、JPEG、PNG 格式,单个大小不超过 2M
         </div>
         </div>
@@ -221,7 +139,7 @@
     </nz-form-item>
     </nz-form-item>
   </div>
   </div>
   <div class="author-content">
   <div class="author-content">
-    <div class="title">教材使用情况证明材料</div>
+    <div class="title">4.教材使用情况证明材料(必须上传)</div>
     <div class="text">
     <div class="text">
       教材出版单位提供教材主要使用高校名单及使用情况证明材料,并加盖公章。
       教材出版单位提供教材主要使用高校名单及使用情况证明材料,并加盖公章。
       <!-- <a (click)="downloadFile('专家审查意见表.docx')">下载模板</a> -->
       <!-- <a (click)="downloadFile('专家审查意见表.docx')">下载模板</a> -->
@@ -235,15 +153,77 @@
           证明材料
           证明材料
         </a>
         </a>
         }
         }
-        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'evidence')" title="上传PDF"></app-comp-upload>
+        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'evidence')"
+          title="上传PDF"></app-comp-upload>
+        <div class="text upText" style="margin: 10px 0">
+          支持上传PDF,大小不超过 2M
+        </div>
+      </nz-form-control>
+    </nz-form-item>
+  </div>
+  <div class="author-content">
+    <div class="title">5.教材版权信息(必须上传)</div>
+    <nz-form-item class="row" style="margin-bottom: 16px">
+      <nz-form-label class="label" [nzNoColon]="true" [nzSm]="10" [nzXs]="10" nzRequired>版权页截图</nz-form-label>
+      <nz-form-control class="val" nzErrorTip="请上传版权页截图" style="width: 100%">
+        @if (copyrightImgUrl) {
+        <a style="color: #3e49b3;" (click)="openFile(copyrightImgUrl)">
+          <span nz-icon nzType="file" nzTheme="outline"></span>
+          版权页截图
+        </a>
+        }
+        <app-comp-upload [type]="'pdf'" [width]="320" [type]="'pdf'" (change)="upload($event, 'copyrightImgUrl')"
+          title="上传PDF"></app-comp-upload>
+
         <div class="text upText" style="margin: 10px 0">
         <div class="text upText" style="margin: 10px 0">
           支持上传PDF,大小不超过 2M
           支持上传PDF,大小不超过 2M
         </div>
         </div>
       </nz-form-control>
       </nz-form-control>
     </nz-form-item>
     </nz-form-item>
+
+    <nz-form-item class="row" style="margin-bottom: 16px">
+      <nz-form-label class="label" [nzNoColon]="true" [nzSm]="10" [nzXs]="10" nzRequired>中国版本图书馆 CIP
+        查询截图</nz-form-label>
+      <nz-form-control class="val" nzErrorTip="请上传中国版本图书馆 CIP 查询截图" style="width: 100%">
+        @if (CIPImgUrl) {
+        <a style="color: #3e49b3;" (click)="openFile(CIPImgUrl)">
+          <span nz-icon nzType="file" nzTheme="outline"></span>
+          CIP 查询截图
+        </a>
+        }
+        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'CIPImgUrl')"
+          title="上传PDF"></app-comp-upload>
+
+        <div class="text upText" style="margin: 10px 0">
+          支持批量上传 PDF 格式,单个文件大小不超过 2M。
+        </div>
+      </nz-form-control>
+    </nz-form-item>
+
+
+
+    <div class="author-content">
+      <div class="text">如 CIP 数据中无“教材”字样的,须再上传内容提要或前言或后记中可以证明本书为教材的相关内容截图</div>
+      @if (cipProveFile.length>0) {
+      @for (url of cipProveFile; track $index) {
+      <p>
+        <a style="color: #3e49b3;font-size: 14px;" (click)="openFile(url?.url)">
+          <span nz-icon nzType="file" nzTheme="outline"></span>
+          CIP 相关截图 {{$index+1}}
+        </a>
+      </p>
+      }
+      }
+      <app-comp-upload [type]="'pdf'" [width]="320" [maxlenght]="99" (change)="upload($event, 'cipProveFile')"
+        title="上传PDF"></app-comp-upload>
+
+      <div class="text upText" style="margin: 10px 0">
+        支持上传PDF,大小不超过 2M
+      </div>
+    </div>
   </div>
   </div>
   <div class="author-content">
   <div class="author-content">
-    <div class="title">其他材料</div>
+    <div class="title">6.其他材料(可选上传)</div>
     <div class="text">其他佐证材料。</div>
     <div class="text">其他佐证材料。</div>
     @if (moreMaterial.length>0) {
     @if (moreMaterial.length>0) {
     @for (url of moreMaterial; track $index) {
     @for (url of moreMaterial; track $index) {

+ 4 - 4
projects/textbook/src/modules/nav-author/components/basic-in/basic-in.component.html

@@ -10,12 +10,12 @@
     </nz-form-item>
     </nz-form-item>
     <nz-form-item style="margin-bottom: 16px">
     <nz-form-item style="margin-bottom: 16px">
       <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>国际标准书号(ISBN)</nz-form-label>
       <nz-form-label [nzSm]="8" [nzNoColon]="true" [nzXs]="8" nzRequired>国际标准书号(ISBN)</nz-form-label>
-      <nz-form-control nzErrorTip="请输入国际标准书号" [nzSm]="12" [nzXs]="12">
+      <nz-form-control nzErrorTip="请输入国际标准书号,仅可输入数字" [nzSm]="12" [nzXs]="12">
         <nz-input-group nzSearch [nzAddOnAfter]="autoButton">
         <nz-input-group nzSearch [nzAddOnAfter]="autoButton">
-          <input type="text" nz-input formControlName="ISBN" placeholder="请输入国际标准书号" />
+          <input type="number" nz-input formControlName="ISBN" placeholder="请输入国际标准书号,仅可输入数字" />
         </nz-input-group>
         </nz-input-group>
         <ng-template #autoButton>
         <ng-template #autoButton>
-          <button (click)="autoCompleteByISBN()" nz-button nzType="primary">自动补全</button>
+          <button (click)="autoCompleteByISBN()" nz-button nzType="primary">获取教材信息</button>
         </ng-template>
         </ng-template>
       </nz-form-control>
       </nz-form-control>
     </nz-form-item>
     </nz-form-item>
@@ -66,7 +66,7 @@
               <label nz-radio nzValue="全册">全册</label>
               <label nz-radio nzValue="全册">全册</label>
               @if (validateForm.value.type =='全册') {
               @if (validateForm.value.type =='全册') {
               <nz-input-group style="flex: 1; margin-left: 20px" [nzSuffix]="suffixTemplateInfo">
               <nz-input-group style="flex: 1; margin-left: 20px" [nzSuffix]="suffixTemplateInfo">
-                <input min="2" type="number" formControlName="typeNumber" nz-input placeholder="输入册数" />
+                <input min="2"  type="number" [ngModelOptions]="{standalone: true}" [(ngModel)]="typeNumber" (ngModelChange)="typeNumberChange()" nz-input placeholder="输入册数" />
               </nz-input-group>
               </nz-input-group>
               <ng-template #suffixTemplateInfo> 册 </ng-template>
               <ng-template #suffixTemplateInfo> 册 </ng-template>
               }
               }

+ 23 - 13
projects/textbook/src/modules/nav-author/components/basic-in/basic-in.component.ts

@@ -78,6 +78,14 @@ export class BasicInComponent implements OnInit {
   disabledEditionDate=(current:Date):boolean=>{
   disabledEditionDate=(current:Date):boolean=>{
     return current< new Date(2022,11,1)
     return current< new Date(2022,11,1)
   }
   }
+    /** 全册次数*/
+    typeNumber:number=2
+    typeNumberChange(){
+      if(this.typeNumber<2){
+        this.msg.create('warning','不得小于两册')
+        this.typeNumber=2
+      }
+    }
   validateForm: FormGroup<{
   validateForm: FormGroup<{
     title: FormControl<string>; //申报教材名称
     title: FormControl<string>; //申报教材名称
     ISBN: FormControl<string>; //国际标准书号
     ISBN: FormControl<string>; //国际标准书号
@@ -86,7 +94,7 @@ export class BasicInComponent implements OnInit {
     unitType:FormControl<string>//第一主编(作者)单位类型
     unitType:FormControl<string>//第一主编(作者)单位类型
 
 
     type: FormControl<string>; //申报类型
     type: FormControl<string>; //申报类型
-    typeNumber: FormControl<number|any>; //全册次数
+    // typeNumber: FormControl<number|any>; //全册次数
 
 
     majorPoniter: FormControl<string>; //教材应用对象及所诉学科专业类
     majorPoniter: FormControl<string>; //教材应用对象及所诉学科专业类
     lang: FormControl<string>; //教材主要语种类型
     lang: FormControl<string>; //教材主要语种类型
@@ -117,7 +125,7 @@ export class BasicInComponent implements OnInit {
     author: ['', [Validators.required]],
     author: ['', [Validators.required]],
     unit: ['', [Validators.required]],
     unit: ['', [Validators.required]],
     type: ['', [Validators.required]],
     type: ['', [Validators.required]],
-    typeNumber: [2],
+    // typeNumber: [2],
     majorPoniter: ['', [Validators.required]],
     majorPoniter: ['', [Validators.required]],
     lang: ['', [Validators.required]],
     lang: ['', [Validators.required]],
     authors: [''],
     authors: [''],
@@ -238,7 +246,7 @@ export class BasicInComponent implements OnInit {
       code: '否',
       code: '否',
     }
     }
   ];
   ];
-  
+
   constructor(
   constructor(
     public tbookSer: textbookServer,
     public tbookSer: textbookServer,
     private fb: NonNullableFormBuilder,
     private fb: NonNullableFormBuilder,
@@ -262,6 +270,7 @@ export class BasicInComponent implements OnInit {
     }
     }
  
  
     this.approvedImgList[0].url = this.eduTextbook.get('approvedImgUrl')
     this.approvedImgList[0].url = this.eduTextbook.get('approvedImgUrl')
+    this.typeNumber = this.eduTextbook?.get('typeNumber') || 2
     // console.log(this.approvedImgList)
     // console.log(this.approvedImgList)
     console.log(this.eduTextbook);
     console.log(this.eduTextbook);
     this.validateForm = this.fb.group({
     this.validateForm = this.fb.group({
@@ -270,7 +279,7 @@ export class BasicInComponent implements OnInit {
       author: [this.eduTextbook?.get('author') || '', [Validators.required]],
       author: [this.eduTextbook?.get('author') || '', [Validators.required]],
       unit: [this.eduTextbook?.get('unit') || '', [Validators.required]],
       unit: [this.eduTextbook?.get('unit') || '', [Validators.required]],
       type: [this.eduTextbook?.get('type') || '', [Validators.required]],
       type: [this.eduTextbook?.get('type') || '', [Validators.required]],
-      typeNumber: [this.eduTextbook?.get('typeNumber') || 2],
+      // typeNumber: [this.eduTextbook?.get('typeNumber') || 2],
   
   
       majorPoniter: [this.eduTextbook?.get('majorPoniter') || '', [Validators.required]],
       majorPoniter: [this.eduTextbook?.get('majorPoniter') || '', [Validators.required]],
       lang: [this.eduTextbook?.get('lang') || '', [Validators.required]],
       lang: [this.eduTextbook?.get('lang') || '', [Validators.required]],
@@ -308,14 +317,14 @@ export class BasicInComponent implements OnInit {
     this.validateForm.controls.importantProjectOther.updateValueAndValidity();
     this.validateForm.controls.importantProjectOther.updateValueAndValidity();
     
     
     //校验全册册数是否需填
     //校验全册册数是否需填
-    if (this.validateForm.value.type == '单册') {
-      this.validateForm.controls.typeNumber.clearValidators();
-      this.validateForm.controls.typeNumber.markAsPristine();
-    } else {
-      this.validateForm.controls.typeNumber.setValidators(Validators.required);
-      this.validateForm.controls.typeNumber.markAsDirty();
-    }
-    this.validateForm.controls.typeNumber.updateValueAndValidity();
+    // if (this.validateForm.value.type == '单册') {
+    //   this.validateForm.controls.typeNumber.clearValidators();
+    //   this.validateForm.controls.typeNumber.markAsPristine();
+    // } else {
+    //   this.validateForm.controls.typeNumber.setValidators(Validators.required);
+    //   this.validateForm.controls.typeNumber.markAsDirty();
+    // }
+    // this.validateForm.controls.typeNumber.updateValueAndValidity();
 
 
     //校验教材获批截图是否需填
     //校验教材获批截图是否需填
     if (!this.validateForm.value.approval || this.validateForm.value.approval == '否') {
     if (!this.validateForm.value.approval || this.validateForm.value.approval == '否') {
@@ -408,7 +417,8 @@ export class BasicInComponent implements OnInit {
     this.eduTextbook?.set('author', params.author);
     this.eduTextbook?.set('author', params.author);
     this.eduTextbook?.set('unit', params.unit);
     this.eduTextbook?.set('unit', params.unit);
     this.eduTextbook?.set('type', params.type);
     this.eduTextbook?.set('type', params.type);
-    this.eduTextbook?.set('typeNumber', params.typeNumber);
+    // this.eduTextbook?.set('typeNumber', params.typeNumber);
+    this.eduTextbook?.set('typeNumber', this.typeNumber);
     this.eduTextbook?.set('majorPoniter', params.majorPoniter);
     this.eduTextbook?.set('majorPoniter', params.majorPoniter);
     this.eduTextbook?.set('lang', params.lang);
     this.eduTextbook?.set('lang', params.lang);
     this.eduTextbook?.set('authors', params.authors);
     this.eduTextbook?.set('authors', params.authors);

+ 193 - 0
projects/textbook/src/modules/nav-author/components/faith/faith.component.html

@@ -0,0 +1,193 @@
+<div class="entry">
+
+
+
+  
+ 
+  <div class="author-content">
+    <div class="title">2.图书编校质量自查结果记录表(必须上传)</div>
+    <div class="text">
+      教材出版单位对申报教材的编校质量自查后,按要求提供图书编校质量自查结果记录表,并加盖出版社公章。全册教材的不同分册以不同文件分别上传。<a
+        (click)="downloadFile('图书编校质量自查结果记录表.docx')">下载模板</a>
+    </div>
+    <nz-form-item class="row" style="margin-bottom: 16px">
+      <nz-form-label class="label" [nzNoColon]="true" [nzSm]="10" [nzXs]="10" nzRequired>上传图书编校质量自查结果记录表</nz-form-label>
+      <nz-form-control class="val" nzErrorTip="请上图书编校质量自查结果记录表" style="width: 100%">
+        @if (selfResults?.url) {
+        <a style="color: #3e49b3;" (click)="openFile(selfResults?.url)">
+          <span nz-icon nzType="file" nzTheme="outline"></span>
+          自查结果记录表
+        </a>
+        }
+        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'selfResults')"
+          title="上传PDF"></app-comp-upload>
+        <div class="text upText" style="margin: 10px 0">
+          支持上传PDF,大小不超过 2M
+        </div>
+      </nz-form-control>
+    </nz-form-item>
+  </div>
+  <div class="author-content">
+    <div class="title">3.专家审查意见表(必须上传)</div>
+    <div class="text">
+      由第一主编所在单位和出版机构邀请校内外相关学科专业领域专家,对教材进行思想性、学术性审核。专家不少于
+      3
+      名,其中半数以上为校外专家,专家分别实名评价并签字,并注明所在单位及专业身份。评价人不得是本教材的作者。<a (click)="downloadFile('专家审查意见表.docx')">下载模板</a>
+    </div>
+    <nz-form-item class="row" style="margin-bottom: 16px">
+      <nz-form-label class="label" [nzNoColon]="true" [nzSm]="10" [nzXs]="10" nzRequired>上传专家审查意见表</nz-form-label>
+      <nz-form-control class="val" nzErrorTip="请上传专家审查意见表" style="width: 100%">
+        @if (expertOpinion?.url) {
+        <a style="color: #3e49b3;" (click)="openFile(expertOpinion?.url)">
+          <span nz-icon nzType="file" nzTheme="outline"></span>
+          专家审查意见表
+        </a>
+        }
+        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'expertOpinion')"
+          title="上传PDF"></app-comp-upload>
+        <div class="text upText" style="margin: 10px 0">
+          支持批量上传 PDF、JPG、JPEG、PNG 格式,单个大小不超过 2M
+        </div>
+      </nz-form-control>
+    </nz-form-item>
+  </div>
+  <div class="author-content">
+    <div class="title">4.教材使用情况证明材料(必须上传)</div>
+    <div class="text">
+      教材出版单位提供教材主要使用高校名单及使用情况证明材料,并加盖公章。
+      <!-- <a (click)="downloadFile('专家审查意见表.docx')">下载模板</a> -->
+    </div>
+    <nz-form-item class="row" style="margin-bottom: 16px">
+      <nz-form-label class="label" [nzNoColon]="true" [nzSm]="10" [nzXs]="10" nzRequired>教材使用情况证明材料</nz-form-label>
+      <nz-form-control class="val" nzErrorTip="请上教材使用情况证明材料" style="width: 100%">
+        @if (evidence?.url) {
+        <a style="color: #3e49b3;" (click)="openFile(evidence?.url)">
+          <span nz-icon nzType="file" nzTheme="outline"></span>
+          证明材料
+        </a>
+        }
+        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'evidence')"
+          title="上传PDF"></app-comp-upload>
+        <div class="text upText" style="margin: 10px 0">
+          支持上传PDF,大小不超过 2M
+        </div>
+      </nz-form-control>
+    </nz-form-item>
+  </div>
+  <div class="author-content">
+    <div class="title">5.教材版权信息(必须上传)</div>
+    <nz-form-item class="row" style="margin-bottom: 16px">
+      <nz-form-label class="label" [nzNoColon]="true" [nzSm]="10" [nzXs]="10" nzRequired>版权页截图</nz-form-label>
+      <nz-form-control class="val" nzErrorTip="请上传版权页截图" style="width: 100%">
+        @if (copyrightImgUrl) {
+        <a style="color: #3e49b3;" (click)="openFile(copyrightImgUrl)">
+          <span nz-icon nzType="file" nzTheme="outline"></span>
+          版权页截图
+        </a>
+        }
+        <app-comp-upload [type]="'pdf'" [width]="320" [type]="'pdf'" (change)="upload($event, 'copyrightImgUrl')"
+          title="上传PDF"></app-comp-upload>
+
+        <div class="text upText" style="margin: 10px 0">
+          支持上传PDF,大小不超过 2M
+        </div>
+      </nz-form-control>
+    </nz-form-item>
+
+    <nz-form-item class="row" style="margin-bottom: 16px">
+      <nz-form-label class="label" [nzNoColon]="true" [nzSm]="10" [nzXs]="10" nzRequired>中国版本图书馆 CIP
+        查询截图</nz-form-label>
+      <nz-form-control class="val" nzErrorTip="请上传中国版本图书馆 CIP 查询截图" style="width: 100%">
+        @if (CIPImgUrl) {
+        <a style="color: #3e49b3;" (click)="openFile(CIPImgUrl)">
+          <span nz-icon nzType="file" nzTheme="outline"></span>
+          CIP 查询截图
+        </a>
+        }
+        <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'CIPImgUrl')"
+          title="上传PDF"></app-comp-upload>
+
+        <div class="text upText" style="margin: 10px 0">
+          支持批量上传 PDF 格式,单个文件大小不超过 2M。
+        </div>
+      </nz-form-control>
+    </nz-form-item>
+
+
+
+
+
+
+
+  <!-- <div class="author-content">
+    <div class="title">作者政治审核表</div>
+    <div class="text">
+      <span style="color: red;">*</span> 作者政治审核表
+      <a (click)="downloadFile('教材编写人员政治审查表.docx')">下载模板</a>
+    </div>
+    @if (examine.length>0) {
+    @for (url of examine; track $index) {
+    <p>
+      <a style="color: #3e49b3;font-size: 14px;" (click)="openFile(url?.url)">
+        <span nz-icon nzType="file" nzTheme="outline"></span>
+        作者政治审核表 {{$index+1}}
+      </a>
+    </p>
+    }
+    }
+    <app-comp-upload [type]="'pdf'" [width]="320" [maxlenght]="99" (change)="upload($event, 'examine')"
+      title="上传PDF"></app-comp-upload>
+
+    <div class="text upText" style="margin: 10px 0">
+      支持上传PDF,大小不超过 2M
+    </div>
+  </div> -->
+
+
+
+
+
+
+
+
+
+
+
+
+  <!-- <div class="author-content">
+      <div class="nav"><b>申报单位承诺意见</b></div>
+      <div class="text">
+        作者 /
+        主编所在高校主管领导或出版单位主管领导在申报单位承诺意见表格签字并加盖高校
+        / 出版单位公章后上传此项。<a (click)="downloadFile('申报单位承诺意见.docx')">下载模板</a>
+      </div>
+      <nz-form-item class="row" style="margin-bottom: 16px">
+        <nz-form-label class="label" [nzNoColon]="true" [nzSm]="16" [nzXs]="16" nzRequired>申报单位承诺意见材料</nz-form-label>
+        <nz-form-control class="val" nzErrorTip="请上传申报单位承诺意见材料" style="width: 450px">
+          @if (unitMaterial?.url) {
+            <a style="color: #3e49b3;" (click)="openFile(unitMaterial?.url)">
+              <span nz-icon nzType="file" nzTheme="outline"></span>
+              申报单位承诺意见
+            </a>
+          }
+          <app-comp-upload [type]="'pdf'" [width]="320" (change)="upload($event, 'unitMaterial')" title="上传PDF"></app-comp-upload>
+          <div class="text upText" style="margin: 10px 0">
+            支持上传PDF,大小不超过 2M
+          </div>
+        </nz-form-control>
+      </nz-form-item>
+    </div> -->
+  <!-- </form> -->
+
+
+
+
+</div>
+<div class="footer">
+  <button nz-button nzType="default" style="margin-right: 20px" (click)="submitForm('save')">
+    保存本页
+  </button>
+  <button nz-button nzType="default" style="margin-right: 20px" (click)="submitForm('pre')">
+    上一步
+  </button>
+</div>

+ 63 - 0
projects/textbook/src/modules/nav-author/components/faith/faith.component.scss

@@ -0,0 +1,63 @@
+.entry{
+    min-height: 500px;
+    font-family: PingFang SC;
+    .row{
+      display: flex;
+      flex-direction: column;
+      align-items: start;
+      width: 100%;
+      .label{
+        margin: 10px 0 6px;
+      }
+      .val{
+        min-height: auto;
+      }
+    }
+    .author-content{
+      .edit-icon{
+        color:#756B6D;
+      }
+      .nav{
+        font-family: PingFang SC;
+        font-size: 20px;
+        font-weight: 500;
+        line-height: 28px;
+        text-align: left;
+        margin: 20px 0 10px;
+      }
+      .title{
+        font-family: PingFang SC;
+        font-size: 16px;
+        font-weight: 600;
+        line-height: 22px;
+        text-align: left;
+        margin: 10px 0;
+      }
+      .text{
+        font-family: PingFang SC;
+        font-size: 14px;
+        font-weight: 400;
+        line-height: 22px;
+        text-align: left;
+      }
+    }
+    .tips{
+      margin-top: 10px;
+      padding: 10px;
+      background: #3e49b314;
+      border-radius: 6px;
+    }
+  
+  }
+  .footer{
+    display: flex;
+    margin: 10px auto;
+    align-items: center;
+    justify-content: space-evenly;
+    // width: 200px;
+    justify-content: end;
+    // padding-right: 100px;
+  }
+  .upText{
+    color: gray;
+  }

+ 24 - 0
projects/textbook/src/modules/nav-author/components/faith/faith.component.spec.ts

@@ -0,0 +1,24 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+import { IonicModule } from '@ionic/angular';
+
+import { FaithComponent } from './faith.component';
+
+describe('FaithComponent', () => {
+  let component: FaithComponent;
+  let fixture: ComponentFixture<FaithComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      declarations: [ FaithComponent ],
+      imports: [IonicModule.forRoot()]
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(FaithComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 455 - 0
projects/textbook/src/modules/nav-author/components/faith/faith.component.ts

@@ -0,0 +1,455 @@
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
+import { CommonCompModule } from '../../../../services/common.modules';
+import { NzSelectModule } from 'ng-zorro-antd/select';
+import { ReactiveFormsModule } from '@angular/forms';
+import { NzRadioModule } from 'ng-zorro-antd/radio';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzGridModule } from 'ng-zorro-antd/grid';
+import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
+import { NzTableModule } from 'ng-zorro-antd/table';
+import { NzUploadChangeParam } from 'ng-zorro-antd/upload';
+import { NzUploadModule } from 'ng-zorro-antd/upload';
+import { NzModalService } from 'ng-zorro-antd/modal';
+import Parse from 'parse';
+import { CompUploadComponent } from '../../../../app/comp-upload/comp-upload.component';
+import { DatePipe } from '@angular/common';
+import {
+  FormControl,
+  FormGroup,
+  NonNullableFormBuilder,
+  Validators,
+  ValidatorFn,
+  AbstractControl,
+} from '@angular/forms';
+import { textbookServer } from '../../../../services/textbook';
+import * as eduTextBook from '../../../../services/EduTextbook'
+import { HttpClient } from '@angular/common/http';
+import { Router } from '@angular/router'
+
+
+
+@Component({
+  imports: [
+    CommonCompModule,
+    ReactiveFormsModule,
+    NzSelectModule,
+    NzRadioModule,
+    NzGridModule,
+    NzCheckboxModule,
+    NzTableModule,
+    NzUploadModule,
+    CompUploadComponent,DatePipe,
+  ],
+  standalone: true,
+  selector: 'app-faith',
+  templateUrl: './faith.component.html',
+  styleUrls: ['./faith.component.scss'],
+  providers: [DatePipe],
+})
+export class FaithComponent  implements OnInit {
+
+
+  @Input('eduTextbook') eduTextbook: any;
+  @Input('maxWidth') maxWidth: number = 0;
+  @Output() state: EventEmitter<any> = new EventEmitter<any>();
+  @Output() save: EventEmitter<any> = new EventEmitter<any>();
+
+  //填写诚信承诺是否正确
+  confirmationValidator: ValidatorFn = (
+    control: AbstractControl
+  ): { [s: string]: boolean } => {
+    if (
+      control.value !=
+      '本人自愿参加此次申报,已认真填写并检查以上材料,保证内容真实'
+    ) {
+      return { required: true };
+    }
+    return {};
+  };
+
+
+  /** 版权页截图*/
+  copyrightImgUrl: string = ''
+  /** 中国版本图书馆CIP查询截图*/
+  CIPImgUrl: string = ''
+  /**cip证明材料 {name: '',url: '',} */
+  cipProveFile: Array<any> = []
+  /**图书编校质量自查结果记录表 */
+  selfResults: any = {
+    name: '',
+    url: '',
+  }
+  /** 专家审查意见表*/
+  expertOpinion: any = {
+    name: '',
+    url: '',
+  }
+  /** 教材使用情况证明材料*/
+  evidence: any = {
+    name: '',
+    url: '',
+  }
+  /**其他材料 {name: '',url: '',} */
+  moreMaterial: Array<any> = []
+
+  /**申报单位承诺意见 */
+  unitMaterial: any = {
+    name: '',
+    url: '',
+  }
+
+
+  // /**作者政治审核表 {name: '',url: '',} */
+  // examine: Array<any> = []
+
+
+  constructor(
+    public tbookSer: textbookServer,
+    private msg: NzMessageService,
+    private modal: NzModalService,
+    private http: HttpClient,
+    private router: Router
+  ) { }
+  ngOnInit() {
+    if (this.eduTextbook.id) {
+      this.copyrightImgUrl = this.eduTextbook?.get('copyrightImgUrl') || this.copyrightImgUrl
+      this.CIPImgUrl = this.eduTextbook?.get('CIPImgUrl') || this.CIPImgUrl
+      this.selfResults = this.eduTextbook?.get('selfResults') || this.selfResults
+      this.expertOpinion = this.eduTextbook?.get('expertOpinion') || this.expertOpinion
+      this.evidence = this.eduTextbook?.get('evidence') || this.evidence
+      this.moreMaterial = this.eduTextbook?.get('moreMaterial') || this.moreMaterial
+      this.cipProveFile = this.eduTextbook?.get('cipProveFile') || this.cipProveFile
+      this.unitMaterial = this.eduTextbook?.get('unitMaterial') || this.unitMaterial
+      // this.examine = this.eduTextbook?.get('examine') || this.examine
+      this.authorList = this.eduTextbook?.get('authorList')
+    }
+  }
+
+  /**本页必填是否存在空项 */
+  examineNull() {
+    let isNull = false
+    let msgList = []
+    if (this.copyrightImgUrl == '' || !this.copyrightImgUrl) {
+      msgList.push('版权页截图')
+      isNull = true
+    }
+    // if (this.CIPImgUrl == '' || !this.CIPImgUrl) {
+    //   if (this.cipProveFile?.length > 0) {
+    //     let isExist = this.cipProveFile.every(item => item?.url == '' || !item?.url)
+    //     if (isExist) {
+    //       msgList.push('CIP 相关内容截图')
+    //       isNull = true
+    //     }
+    //   } else {
+    //       msgList.push('CIP 查询截图')
+    //       isNull = true
+    //   }
+    // } 
+    if (this.CIPImgUrl == '' || !this.CIPImgUrl) {
+      msgList.push('CIP查询截图')
+      isNull = true
+    }
+    if (this.cipProveFile?.length > 0) {
+      let isExist = this.cipProveFile.every(item => item?.url == '' || !item?.url)
+      if (isExist) {
+        msgList.push('CIP证明材料')
+        isNull = true
+      }
+    }
+    if (this.selfResults.url == '' || !this.selfResults.url) {
+      msgList.push('自查结果记录表')
+      isNull = true
+    }
+    if (this.expertOpinion.url == '' || !this.expertOpinion.url) {
+      msgList.push('专家审查意见表')
+      isNull = true
+    }
+    if (this.evidence.url == '' || !this.evidence.url) {
+      msgList.push('证明材料')
+      isNull = true
+    }
+    if (this.moreMaterial?.length > 0) {
+      let isExist = this.moreMaterial.every(item => item?.url == '' || !item?.url)
+      if (isExist) {
+        msgList.push('其他材料')
+        isNull = true
+      }
+    }
+    // if (this.examine?.length <= 0) {
+    //   isNull = true
+    //   msgList.push('作者政治审核表')
+    // } else if (this.examine?.length > 0) {
+    //   let isExist = this.examine.every(item => item?.url == '' || !item?.url)
+    //   if (isExist) {
+    //     msgList.push('作者政治审核表')
+    //     isNull = true
+    //   }
+    // }
+    // if (this.unitMaterial.url == '' || !this.unitMaterial.url) {
+    //   msgList.push('申报单位承诺意见')
+    //   isNull = true
+    // }
+    // if (isNull) {
+    //   this.msg.create('error', `请上传完整 ${msgList.join()}`)
+    // }
+    return isNull
+  }
+
+  /**判断是否存在未填字段 */
+  isIgnoreFiledNull() {
+    let selectList = this.eduTextbook?.get('characteristic')
+    let check = false
+    for (let i in selectList) {
+      if (selectList[i].label == '通识课' || selectList[i].label == '公共基础课' || selectList[i].label == '专业课') {
+        if (selectList[i].checked) {
+          check = true
+          break;
+        }
+      }
+    }
+    if (!check) {
+      // this.msg.create('warning', '请返回选择适用课程性质')
+      return true
+    }
+
+    let eduColumn = eduTextBook.EduTextbook.fields
+    let ignoreFiled = [
+      'typeNumber', 'code', 'editionNumber', 'importantProjectOther',
+      'textbookFiles', 'createdAt', 'updatedAt', 'copyright', 'authorSign',
+      'CIP', 'isDeleted', 'opinions', 'printNumber', 'printSum', 'render',
+      'importantProject', 'importantProjectOther', 'complete', 'links', 'recommend',
+      'printSun', 'discard', 'edition', 'eduProcess', 'authors', 'editor',
+      'copyrightImgUrl', 'CIPImgurl', 'selfResults', 'expertOpinion', 'evidence',
+      'moreMaterial', 'unitMaterial', 'approvedImgUrl', 'department','CIPImgUrl','cipProveFile',
+      'examine'
+    ] //非必填字段
+    let textBookJson = this.eduTextbook.toJSON()
+
+
+    let isVrifly = Object.keys(eduColumn).some((item: string) => {
+      if (!ignoreFiled.includes(item) && (textBookJson[item] === '' || textBookJson[item] === undefined || textBookJson[item] === null)) {
+        console.warn('字段未填写:' + item)
+        return true
+      }
+      return
+    })
+    /* 检验authorList字段是否留空 */
+    let authorListAuth
+    console.log(this.authorList);
+    authorListAuth = this.authorList.some((obj:any)=>{
+      return Object.keys(obj).some((item: string) => !obj[item])
+    })
+    // console.log(authorListAuth);
+
+    if (isVrifly || authorListAuth) {
+      // this.msg.warning('存在未填项')
+      return true
+    } else {
+      return false
+    }
+  }
+
+  async submitForm(event?: string): Promise<void> {
+    let params = {
+      copyrightImgUrl: this.copyrightImgUrl,
+      CIPImgUrl: this.CIPImgUrl,
+      cipProveFile: this.cipProveFile,
+      selfResults: this.selfResults,
+      expertOpinion: this.expertOpinion,
+      evidence: this.evidence,
+      moreMaterial: this.moreMaterial,
+      // examine: this.examine,
+      authorList:this.authorList
+      // unitMaterial: this.unitMaterial,
+    }
+    let isPageNull = this.examineNull()//检查本页空项
+    let isIgnoreFiled = this.isIgnoreFiledNull()//检查数据空项
+    // console.log(isPageNull, isIgnoreFiled);
+    if (event == 'pre') {//上一步
+      this.state.emit({ type: 'pre' });
+      return;
+    }
+    await this.saveEduTextbook(params, (!isPageNull && !isIgnoreFiled));
+    if (event == 'complete') {
+      this.state.emit({ type: 'complete', textBook: this.eduTextbook });
+      if (isPageNull || isIgnoreFiled) {
+        console.log('教材填写不完整');
+      } else {
+        this.eduTextbook.set('complete', true)
+        this.eduTextbook.set('status', '102')
+        await this.eduTextbook.save()
+        this.msg.success('已填写完成')
+      }
+      this.router.navigate(['/nav-author/manage/space'])
+    } else if (event == 'save') {
+      this.modal.success({
+        nzTitle: '保存成功',
+        nzContent: '<p>已保存并且至空间</p>',
+        nzOnOk: () => console.log('Info OK'),
+      });
+      return;
+    }
+  }
+
+  async saveEduTextbook(params: any, isComplete: boolean) {
+    console.log(isComplete);
+    if (!this.eduTextbook) {
+      this.msg.error('请先创建教材');
+      return;
+    }
+    //如果填写未完整,仅保存,状态修改待完善101
+    if (this.eduTextbook.get('status') == '102' && !isComplete) {
+      this.eduTextbook?.set('status', '101');
+    } else if (!this.eduTextbook.get('status')) {
+      this.eduTextbook?.set('status', '101');
+    }
+    this.eduTextbook?.set('user', Parse.User.current()?.toPointer());
+    this.eduTextbook?.set('company', {
+      __type: 'Pointer',
+      className: 'Company',
+      objectId: this.tbookSer.company,
+    });
+    params.selfResults &&
+      this.eduTextbook?.set('selfResults', params.selfResults);
+    // params.unitMaterial &&
+    //   this.eduTextbook?.set('unitMaterial', params.unitMaterial);
+    params.expertOpinion &&
+      this.eduTextbook?.set('expertOpinion', params.expertOpinion);
+    params.evidence && this.eduTextbook?.set('evidence', params.evidence);
+    params.cipProveFile &&
+      this.eduTextbook?.set('cipProveFile', params.cipProveFile);
+    params.moreMaterial &&
+      this.eduTextbook?.set('moreMaterial', params.moreMaterial);
+    // params.examine &&
+    //   this.eduTextbook?.set('examine', params.examine);
+    this.eduTextbook?.set('copyrightImgUrl', params.copyrightImgUrl);
+    this.eduTextbook?.set('CIPImgUrl', params.CIPImgUrl);
+    this.eduTextbook?.set('authorList', params.authorList);
+    await this.eduTextbook?.save();
+    return;
+  }
+  upload(e: any, type: string, index?: any) {
+    let file = e[(e?.length - 1) || 0];
+    if (type == 'copyrightImgUrl' || type == 'CIPImgUrl') {
+      this[type] = file?.url
+    } else if (type == 'selfResults' || type == 'expertOpinion' ||
+      type == 'evidence' || type == 'unitMaterial') { 
+      this[type].url = file?.url
+      this[type].name = file?.name
+    } else if (type == 'moreMaterial'  || type == 'cipProveFile') {
+      this[type] = [...(this[type] || []), { name: file.name, url: file.url }]
+    }else if (type == 'signature' || type == 'examine') {
+      this.authorList[index][type] = file?.url
+    }
+    console.log(this.authorList)
+  }
+
+
+
+  /**获取文件名 */
+  getFileName(url: string) {
+    if (!url) return ''
+    let str = url?.split('/')[5]
+    let index = str?.indexOf('-')
+    let result = decodeURIComponent(str?.substring(index + 1))
+    return result || '未知文件名'
+  }
+
+  downloadFile(fileName: string) {
+    // let fileName = '十四五”普通高等教育本科国家级规划教材第一次遴选推荐申报表.docx'
+    const fileUrl = `../../../../../public/file/${fileName}`;
+    this.http.get(fileUrl, { responseType: 'blob' }).subscribe((blob) => {
+      const url = window.URL.createObjectURL(blob);
+      const a = document.createElement('a');
+      a.href = url;
+      a.download = fileName;
+      document.body.appendChild(a);
+      a.click();
+      document.body.removeChild(a);
+      window.URL.revokeObjectURL(url);
+    })
+  }
+  openFile(url: string) {
+    console.log(url);
+    window.open(url)
+  }
+
+
+  /**作者信息 */
+  authorList:Array<any>=[]
+
+   //添加作者信息
+   onPush(type: string, idx: number) {
+    switch (type) {
+      case 'authorList':
+        if (this.authorList?.length >= 6) {
+          this.msg.warning('最多添加6条');
+          break;
+        }
+        this.authorList.splice(idx + 1, 0, {
+          name: '',
+          unit: '',
+          birth: '',
+          nationality: '',
+          job: '',
+          title: '',
+          mobile: '',
+          email: '',
+          work: '',
+          signature: '',
+          examine: '',
+        });
+        break;
+      // case 'achievementOptions':
+      //   if (this.achievementOptions.length >= 5) {
+      //     this.msg.warning('最多添加5条');
+      //     return;
+      //   }
+      //   this.achievementOptions.splice(idx + 1, 0, {
+      //     name: '',
+      //     unit: '',
+      //     date: '',
+      //   });
+      //   break;
+    }
+  }
+   //删除作者信息
+   onDel(type: string, idx: number) {
+    switch (type) {
+      case 'authorList':
+        if (this.authorList.length == 1) {
+          this.authorList = [
+            {
+              name: '',
+              unit: '',
+              birth: '',
+              nationality: '',
+              job: '',
+              title: '',
+              mobile: '',
+              email: '',
+              work: '',
+              signature: '',
+              examine: '',
+            },
+          ];
+          return;
+        }
+        this.authorList.splice(idx, 1);
+        break;
+      // case 'achievementOptions':
+      //   if (this.achievementOptions.length == 1) {
+      //     this.achievementOptions = [
+      //       {
+      //         name: '',
+      //         unit: '',
+      //         date: '',
+      //       },
+      //     ];
+      //     return;
+      //   }
+      //   this.achievementOptions.splice(idx, 1);
+      //   break;
+    }
+  }
+}