xll 7 місяців тому
батько
коміт
b6f010d0c5

+ 164 - 113
projects/textbook/src/modules/nav-author/components/attachment/attachment.component.html

@@ -1,129 +1,180 @@
 <div class="entry">
   <!-- <form nz-form [formGroup]="validateForm" class="login-form" (ngSubmit)="submitForm()"> -->
-    <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 [width]="320" (change)="upload($event, 'copyrightImgUrl')" title="上传PDF"></app-comp-upload>
+  <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 [width]="320" (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 [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="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 [width]="320" (change)="upload($event, 'CIPImgUrl')" title="上传PDF"></app-comp-upload>
 
-          <div class="text upText" style="margin: 10px 0">
-            支持批量上传 PDF 格式,单个文件大小不超过 2M。如 CIP 数据中无“教材”字样的,须再上传内容提要或前言或后记中可以证明本书为教材的相关内容截图
-          </div>
-        </nz-form-control>
-      </nz-form-item>
-    </div>
     <div class="author-content">
-      <div class="title">图书编校质量自查结果记录表</div>
-      <div class="text">
-        教材出版单位对申报教材的编校质量自查后,按要求提供图书编校质量自查结果记录表,并加盖出版社公章。全册教材的不同分册以不同文件分别上传。<a (click)="downloadFile('图书编校质量自查结果记录表.docx')">下载模板</a>
+      <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 [width]="320" [maxlenght]="99" (change)="upload($event, 'cipProveFile')"
+        title="上传PDF"></app-comp-upload>
+  
+      <div class="text upText" style="margin: 10px 0">
+        支持上传PDF,大小不超过 2M
       </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 [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">专家审查意见表</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 [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">图书编校质量自查结果记录表</div>
+    <div class="text">
+      教材出版单位对申报教材的编校质量自查后,按要求提供图书编校质量自查结果记录表,并加盖出版社公章。全册教材的不同分册以不同文件分别上传。<a
+        (click)="downloadFile('图书编校质量自查结果记录表.docx')">下载模板</a>
     </div>
-    <div class="author-content">
-      <div class="title">教材使用情况证明材料</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 [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>
+    <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 [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">专家审查意见表</div>
+    <div class="text">
+      由第一主编所在单位和出版机构邀请校内外相关学科专业领域专家,对教材进行思想性、学术性审核。专家不少于
+      3
+      名,其中半数以上为校外专家,专家分别实名评价并签字,并注明所在单位及专业身份。评价人不得是本教材的作者。<a (click)="downloadFile('专家审查意见表.docx')">下载模板</a>
     </div>
-    <div class="author-content">
-      <div class="title">其他材料</div>
-      <div class="text">其他佐证材料。</div>
-      @if (moreMaterial.length>0) {
-        @for (url of moreMaterial; track $index) {
-          <p>
-            <a style="color: #3e49b3;" (click)="openFile(url?.url)">
-              <span nz-icon nzType="file" nzTheme="outline"></span>
-              佐证材料 {{$index+1}}
-            </a>
-          </p>
+    <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 [width]="320" [maxlenght]="99" (change)="upload($event, 'moreMaterial')" title="上传PDF"></app-comp-upload>
+        <app-comp-upload [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">教材使用情况证明材料</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 [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">其他材料</div>
+    <div class="text">其他佐证材料。</div>
+    @if (moreMaterial.length>0) {
+    @for (url of moreMaterial; 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 [width]="320" [maxlenght]="99" (change)="upload($event, 'moreMaterial')"
+      title="上传PDF"></app-comp-upload>
 
-      <div class="text upText" style="margin: 10px 0">
-        支持上传PDF,大小不超过 2M
-      </div>
+    <div class="text upText" style="margin: 10px 0">
+      支持上传PDF,大小不超过 2M
     </div>
+  </div>
+  <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 [width]="320" [maxlenght]="99" (change)="upload($event, 'examine')"
+      title="上传PDF"></app-comp-upload>
 
-    <!-- <div class="author-content">
+    <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">
         作者 /

+ 50 - 7
projects/textbook/src/modules/nav-author/components/attachment/attachment.component.ts

@@ -24,7 +24,7 @@ import {
 import { textbookServer } from '../../../../services/textbook';
 import * as eduTextBook from '../../../../services/EduTextbook'
 import { HttpClient } from '@angular/common/http';
-import { Router} from '@angular/router'
+import { Router } from '@angular/router'
 
 
 
@@ -69,6 +69,8 @@ export class AttachmentComponent implements OnInit {
   copyrightImgUrl: string = ''
   /** 中国版本图书馆CIP查询截图*/
   CIPImgUrl: string = ''
+  /**cip证明材料 {name: '',url: '',} */
+  cipProveFile: Array<any> = []
   /**图书编校质量自查结果记录表 */
   selfResults: any = {
     name: '',
@@ -93,12 +95,17 @@ export class AttachmentComponent implements OnInit {
     url: '',
   }
 
+
+  /**作者政治审核表 {name: '',url: '',} */
+  examine: Array<any> = []
+
+
   constructor(
     public tbookSer: textbookServer,
     private msg: NzMessageService,
     private modal: NzModalService,
     private http: HttpClient,
-    private router:Router
+    private router: Router
   ) { }
   ngOnInit() {
     if (this.eduTextbook.id) {
@@ -108,7 +115,9 @@ export class AttachmentComponent implements OnInit {
       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
     }
   }
 
@@ -121,9 +130,27 @@ export class AttachmentComponent implements OnInit {
       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
+        }
+      } else {
+          msgList.push('CIP 查询截图')
+          isNull = true
+      }
+    } 
+    // if (this.CIPImgUrl == '' || !this.CIPImgUrl) {
+    //   msgList.push('CIP查询截图')
+    //   isCipNull = true
+    // }else 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
@@ -143,6 +170,16 @@ export class AttachmentComponent implements OnInit {
         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
@@ -178,7 +215,7 @@ export class AttachmentComponent implements OnInit {
       'importantProject', 'importantProjectOther', 'complete', 'links', 'recommend',
       'printSun', 'discard', 'edition', 'eduProcess', 'authors', 'editor',
       'copyrightImgUrl', 'CIPImgurl', 'selfResults', 'expertOpinion', 'evidence',
-      'moreMaterial', 'unitMaterial', 'approvedImgUrl', 'department'
+      'moreMaterial', 'unitMaterial', 'approvedImgUrl', 'department','CIPImgUrl','cipProveFile'
     ] //非必填字段
     let textBookJson = this.eduTextbook.toJSON()
 
@@ -202,10 +239,12 @@ export class AttachmentComponent implements OnInit {
     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,
       // unitMaterial: this.unitMaterial,
     }
     await this.saveEduTextbook(params, true);
@@ -262,8 +301,12 @@ export class AttachmentComponent implements OnInit {
     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);
     await this.eduTextbook?.save();
@@ -277,7 +320,7 @@ export class AttachmentComponent implements OnInit {
       type == 'evidence' || type == 'unitMaterial') {
       this[type].url = file?.url
       this[type].name = file?.name
-    } else if (type == 'moreMaterial') {
+    } else if (type == 'moreMaterial' || type == 'examine' || type == 'cipProveFile') {
       this[type] = [...(this[type] || []), { name: file.name, url: file.url }]
     }
   }