Quellcode durchsuchen

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

ryanemax vor 7 Monaten
Ursprung
Commit
6c84682492
17 geänderte Dateien mit 532 neuen und 241 gelöschten Zeilen
  1. 1 0
      projects/textbook/src/app/comp-manage/comp-manage.component.scss
  2. 1 1
      projects/textbook/src/app/comp-manage/comp-manage.component.ts
  3. 1 0
      projects/textbook/src/app/textbook/textbook.component.html
  4. 105 2
      projects/textbook/src/app/textbook/textbook.component.ts
  5. 37 18
      projects/textbook/src/modules/nav-author/components/attachment/attachment.component.html
  6. 258 159
      projects/textbook/src/modules/nav-author/components/attachment/attachment.component.ts
  7. 3 3
      projects/textbook/src/modules/nav-author/components/basic-in/basic-in.component.html
  8. 9 9
      projects/textbook/src/modules/nav-author/components/basic-in/basic-in.component.ts
  9. 1 1
      projects/textbook/src/modules/nav-author/components/textbook-pertain/textbook-pertain.component.html
  10. 24 5
      projects/textbook/src/modules/nav-author/components/textbook-pertain/textbook-pertain.component.ts
  11. 6 10
      projects/textbook/src/modules/nav-province-contact/submitted/complete/complete.component.html
  12. 20 8
      projects/textbook/src/modules/nav-province-contact/submitted/complete/complete.component.scss
  13. 1 1
      projects/textbook/src/modules/nav-province-contact/submitted/complete/complete.component.ts
  14. 6 8
      projects/textbook/src/modules/nav-province-contact/submitted/export-file/export-file.component.scss
  15. 28 6
      projects/textbook/src/modules/nav-province-contact/submitted/export-list/export-list.component.html
  16. 20 8
      projects/textbook/src/modules/nav-province-contact/submitted/export-list/export-list.component.scss
  17. 11 2
      projects/textbook/src/modules/nav-province-contact/submitted/export-list/export-list.component.ts

+ 1 - 0
projects/textbook/src/app/comp-manage/comp-manage.component.scss

@@ -32,6 +32,7 @@
     flex: 1;
     background-color: white;
     border-radius: 10px;
+    position: relative;
   }
 }
 

+ 1 - 1
projects/textbook/src/app/comp-manage/comp-manage.component.ts

@@ -124,7 +124,7 @@ export class CompManageComponent implements OnInit {
       },
       {
         id:'2',
-        name:'用户过来',
+        name:'用户管理',
         child:[
           {
             id:'2-1',

+ 1 - 0
projects/textbook/src/app/textbook/textbook.component.html

@@ -32,6 +32,7 @@
     [nzFrontPagination]="false"
     [nzScroll]="{ x: (maxWidth || '1200') + 'px' }"
     nzTableLayout="fixed"
+    (nzPageIndexChange)="pageIndexChange($event)"
   >
     <thead>
       <tr>

+ 105 - 2
projects/textbook/src/app/textbook/textbook.component.ts

@@ -59,7 +59,7 @@ export class TextbookComponent implements OnInit {
   setOfCheckedId = new Set<string>();
   searchValue: string = '';
   manage: boolean = false;
-  eduProcessId:any = '' //流程id,verify存在时需要
+  eduProcessId: any = ''; //流程id,verify存在时需要
   constructor(
     public tbookSer: textbookServer,
     private route: Router,
@@ -77,7 +77,7 @@ export class TextbookComponent implements OnInit {
       }
     });
   }
-  async getTextbook(val?: string) {
+  async getTextbook(val?: string, exported?: boolean): Promise<any[] | void> {
     this.loading = true;
     let query = new Parse.Query('EduTextbook');
     if (val) {
@@ -124,6 +124,11 @@ export class TextbookComponent implements OnInit {
     } else {
       query.notEqualTo('discard', true);
     }
+    if (exported) {
+      let r = await query.find();
+      this.loading = false;
+      return r;
+    }
     // query.include('department');
     this.count = await query.count();
     query.limit(this.limit);
@@ -136,6 +141,12 @@ export class TextbookComponent implements OnInit {
     console.log(e);
     this.getTextbook(e);
   }
+  //分页切换
+  pageIndexChange(e: any) {
+    console.log(e);
+    this.pageSize = e;
+    this.getTextbook(this.searchValue);
+  }
   //全选
   onAllChecked(checked: boolean) {
     console.log(checked);
@@ -303,4 +314,96 @@ export class TextbookComponent implements OnInit {
     }
     this.route.navigate([url]);
   }
+
+  //导出
+  async export() {
+    let data: any = await this.getTextbook('',true);
+    let table = `<table border="1px" cellspacing="0" cellpadding="0">
+        <thead>
+          <tr>
+            <th>申报编号</th>
+            <th>教材名称</th>
+            <th>册数</th>
+            <th>第一主编/作者</th>
+            <th>所属单位</th>
+            <th>所属本科专业</th>
+            <th>主要语种类型</th>
+            <th>ISBN</th>
+            <th>出版单位</th>
+          </tr>
+        </thead>
+        <tbody>
+        `;
+    let _body = '';
+    for (var row = 0; row < data.length; row++) {
+      _body += '<tr>';
+      _body += '<td>';
+      _body += `${row + 1}`;
+      _body += '</td>';
+
+      _body += '<td>';
+      _body += ` &nbsp;${data[row].get('title') || '-'}`;
+      _body += '</td>';
+
+      _body += '<td>';
+      _body += `${
+        data[row]?.get('type') == '单册'
+          ? '单册'
+          : data[row]?.get('typeNumber') || '-'
+      }`;
+      _body += '</td>';
+
+      _body += '<td>';
+      _body += `${data[row]?.get('author') || '-'}`;
+      _body += '</td>';
+
+      _body += '<td>';
+      _body += `${data[row]?.get('unit') || '-'}`;
+      _body += '</td>';
+
+      _body += '<td>';
+      _body += `${data[row]?.get('major').name || '-'}`;
+      _body += '</td>';
+
+      _body += '<td>';
+      _body += `${data[row]?.get('lang') || '-'}`;
+      _body += '</td>';
+
+      _body += '<td>';
+      _body += `${data[row]?.get('ISBN') || '-'}`;
+      _body += '</td>';
+
+      _body += '<td>';
+      _body += `${data[row]?.get('editionUnit') || '-'}`;
+      _body += '</td>';
+      _body += '</tr>';
+    }
+    table += _body;
+    table += '</tbody>';
+    table += '</table>';
+    let title = '申报流程列表';
+    this.excel(table, `${title}.xls`);
+  }
+  excel(data: any, filename: string) {
+    let html =
+      "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>";
+    html +=
+      '<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">';
+    html += '<meta http-equiv="content-type" content="application/vnd.ms-excel';
+    html += '; charset=UTF-8">';
+    html += '<head>';
+    html += '</head>';
+    html += '<body>';
+    html += data;
+    html += '</body>';
+    html += '</html>';
+    let uri =
+      'data:application/vnd.ms-excel;charset=utf-8,' + encodeURIComponent(html);
+    let link = document.createElement('a');
+    link.href = uri;
+    link.download = `${filename}`;
+    document.body.appendChild(link);
+    link.click();
+    document.body.removeChild(link);
+  }
 }

+ 37 - 18
projects/textbook/src/modules/nav-author/components/attachment/attachment.component.html

@@ -9,13 +9,15 @@
       <div class="title">教材电子版</div>
       <div class="text">
         教材出版单位配合按要求上传各地推荐的本单位出版的纸质教材最新印次的完整PDF电子版;数字教材上传全部教材内容电子版或填写能够查看全部教材内容的链接地址、账号;纸质教材附带数字资源的,上传纸质教材最新印次的完整PDF电子版,以及全部数字资源电子版或能够查看全部数字资源内容的链接地址、账号
-      </div> -->
-      <!-- <nz-checkbox-group
+      </div>
+
+      <nz-checkbox-group  //nz-checkbox-group注释
         style="margin: 10px 0"
         formControlName="textbookTypes"
         [(ngModel)]="checkOptionsOne"
-      ></nz-checkbox-group> -->
-      <!-- <label nz-checkbox [ngModelOptions]="{ standalone: true }" [ngModel]="true">纸质教材</label>
+      ></nz-checkbox-group>
+
+      <label nz-checkbox [ngModelOptions]="{ standalone: true }" [ngModel]="true">纸质教材</label>
       <label nz-checkbox [ngModelOptions]="{ standalone: true }" [ngModel]="true">电子教材 / 资源</label>
       <div nz-row>
         <div nz-col nzSpan="12">
@@ -78,6 +80,16 @@
         </div>
       </div>
     </div> -->
+
+
+
+
+
+
+
+
+
+
     <!-- <div class="author-content">
       <div class="title">所有作者政治审查意见</div>
       <div class="text">
@@ -181,6 +193,15 @@
         </tbody>
       </nz-table>
     </div> -->
+
+
+
+
+
+
+
+
+
     <div class="author-content">
       <div class="title">教材版权信息</div>
       
@@ -198,16 +219,8 @@
           nzErrorTip="请上传版权页截图"
           style="width: 100%"
         >
-          <nz-upload
-            formControlName="selfResults"
-            nzAction="https://www.mocky.io/v2/5cc8019d300000980a055e76"
-            [nzHeaders]="{ authorization: 'authorization-text' }"
-            (nzChange)="handleChange($event)"
-          >
-            <div style="color: #3e49b3">
-              <span nz-icon nzType="upload"></span>上传文件
-            </div>
-          </nz-upload>
+        <app-comp-upload [width]="320" (change)="upload($event, 'copyrightImgUrl')" title="上传截图"></app-comp-upload>
+
           <div class="text upText" style="margin: 10px 0">
             支持批量上传 PDF、JPG、JPEG、PNG 格式,单个文件大小不超过 2M
           </div>
@@ -227,7 +240,7 @@
           nzErrorTip="请上传中国版本图书馆 CIP 查询截图"
           style="width: 100%"
         >
-          <nz-upload
+          <!-- <nz-upload
             formControlName="selfResults"
             nzAction="https://www.mocky.io/v2/5cc8019d300000980a055e76"
             [nzHeaders]="{ authorization: 'authorization-text' }"
@@ -236,7 +249,9 @@
             <div style="color: #3e49b3">
               <span nz-icon nzType="upload"></span>上传文件
             </div>
-          </nz-upload>
+          </nz-upload> -->
+          <app-comp-upload [width]="320" (change)="upload($event, 'CIPImgUrl')" title="上传截图"></app-comp-upload>
+
           <div class="text upText" style="margin: 10px 0">
             支持批量上传 PDF 格式,单个文件大小不超过 2M。如 CIP 数据中无“教材”字样的,须再上传内容提要或前言或后记中可以证明本书为教材的相关内容截图
           </div>
@@ -360,7 +375,7 @@
       <div class="title">其他材料</div>
       <div class="text">其他佐证材料。</div>
 
-      <nz-upload
+      <!-- <nz-upload
         formControlName="moreMaterial"
         nzAction="https://www.mocky.io/v2/5cc8019d300000980a055e76"
         [nzHeaders]="{ authorization: 'authorization-text' }"
@@ -369,7 +384,9 @@
         <div style="color: #3e49b3">
           <span nz-icon nzType="upload"></span>上传文件
         </div>
-      </nz-upload>
+      </nz-upload> -->
+      <app-comp-upload [width]="320" (change)="upload($event, 'moreMaterial')" title="上传截图"></app-comp-upload>
+
       <div class="text upText" style="margin: 10px 0">
         支持批量上传 PDF、JPG、JPEG、PNG 格式,单个文件大小不超过 2M
       </div>
@@ -399,6 +416,8 @@
         </nz-form-control>
       </nz-form-item>
     </div> -->
+
+    
     <!-- <div class="author-content">
       <nz-form-label
         class="label"

+ 258 - 159
projects/textbook/src/modules/nav-author/components/attachment/attachment.component.ts

@@ -11,6 +11,8 @@ 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 {
   FormControl,
   FormGroup,
@@ -38,6 +40,7 @@ import { textbookServer } from '../../../../services/textbook';
     NzCheckboxModule,
     NzTableModule,
     NzUploadModule,
+    CompUploadComponent,
   ],
   standalone: true,
   templateUrl: './attachment.component.html',
@@ -63,26 +66,28 @@ export class AttachmentComponent implements OnInit {
   };
 
   validateForm: FormGroup<{
-    textbookTypes: FormControl<Array<string> | any>; //教材电子版
-    textbookFiles: FormControl<Array<string> | any>; //上传教材文件
-    links: FormControl<string>; //教材数字内容链接地址、账号
+    // textbookTypes: FormControl<Array<string> | any>; //教材电子版
+    // textbookFiles: FormControl<Array<string> | any>; //上传教材文件
+    // links: FormControl<string>; //教材数字内容链接地址、账号
     selfResults: FormControl<object | any>; //图书编校质量自查结果记录表
     expertOpinion: FormControl<object | any>; //专家审核意见表
     evidence: FormControl<object | any>; //教材使用情况证明材料
     moreMaterial: FormControl<Array<any> | any>; //其他材料
     unitMaterial: FormControl<object | any>; //申报单位承诺意见材料
-    accept: FormControl<string>; //填写诚信承诺
+    // accept: FormControl<string>; //填写诚信承诺
+    copyrightImgUrl: FormControl<string>; //版权页截图
+    CIPImgUrl: FormControl<string>; //中国版本图书馆CIP查询截图
   }> = this.fb.group({
-    textbookTypes: [''],
-    textbookFiles: [
-      [
-        {
-          url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
-        },
-      ],
-      [Validators.required]
-    ],
-    links: ['', [Validators.required]],
+    // textbookTypes: [''],
+    // textbookFiles: [
+    //   [
+    //     {
+    //       url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
+    //     },
+    //   ],
+    //   [Validators.required]
+    // ],
+    // links: ['', [Validators.required]],
     selfResults: [
       {
         name: '自查表.pdf',
@@ -123,67 +128,69 @@ export class AttachmentComponent implements OnInit {
       },
       [Validators.required]
     ],
-    accept: ['', [Validators.required, this.confirmationValidator]],
+    // accept: ['', [Validators.required, this.confirmationValidator]],
+    copyrightImgUrl: [''],
+    CIPImgUrl: [''],
   });
   checkOptionsOne = [
     { label: '纸质教材', value: '纸质教材', checked: true },
     { label: '电子教材 / 资源', value: '电子教材 / 资源', checked: true },
   ];
-  //所有作者政治审查意见
-  opinions: Array<opinionType> = [
-    {
-      name: '', //作者
-      unit: '', //单位
-      birth: '', //出生年月
-      nationality: '', //国籍
-      reviewFile: {
-        name: '自查表.pdf',
-        url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
-      }, //作者政治审查表/作者签名
-    },
-  ];
-  //所有作者签名
-  authorSign: Array<opinionType> = [
-    {
-      name: '', //作者
-      unit: '', //单位
-      birth: '', //出生年月
-      nationality: '', //国籍
-      reviewFile: {
-        name: '审查表.pdf',
-        url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
-      }, //作者政治审查表/作者签名
-    },
-  ];
+  // //所有作者政治审查意见
+  // opinions: Array<opinionType> = [
+  //   {
+  //     name: '', //作者
+  //     unit: '', //单位
+  //     birth: '', //出生年月
+  //     nationality: '', //国籍
+  //     reviewFile: {
+  //       name: '自查表.pdf',
+  //       url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
+  //     }, //作者政治审查表/作者签名
+  //   },
+  // ];
+  // //所有作者签名
+  // authorSign: Array<opinionType> = [
+  //   {
+  //     name: '', //作者
+  //     unit: '', //单位
+  //     birth: '', //出生年月
+  //     nationality: '', //国籍
+  //     reviewFile: {
+  //       name: '审查表.pdf',
+  //       url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
+  //     }, //作者政治审查表/作者签名
+  //   },
+  // ];
   constructor(
     public tbookSer: textbookServer,
     private fb: NonNullableFormBuilder,
     private msg: NzMessageService,
     private modal: NzModalService
-  ) {}
-  ngOnInit() {
+  ) { }
+  ngOnInit() { 
     if (this.eduTextbook.id) {
       this.validateForm = this.fb.group({
-        textbookTypes: [
-          this.eduTextbook.get('textbookTypes'),
-        ],
-        textbookFiles: [
-          this.eduTextbook.get('textbookFiles') ||
-            this.validateForm.value.textbookFiles,
-          [Validators.required]
-        ],
-        links: [
-          this.eduTextbook.get('links')?.join('\n') || '',
-          [Validators.required]
-        ],
+        // textbookTypes: [
+        //   this.eduTextbook.get('textbookTypes'),
+        // ],
+        // textbookFiles: [
+        //   this.eduTextbook.get('textbookFiles') ||
+        //   this.validateForm.value.textbookFiles,
+        //   [Validators.required]
+        // ],
+        // links: [
+        //   this.eduTextbook.get('links')?.join('\n') || '',
+        //   [Validators.required]
+        // ],
         selfResults: [
           this.eduTextbook.get('selfResults') ||
-            this.validateForm.value.selfResults,
+          this.validateForm.value.selfResults,
           [Validators.required]
         ],
         expertOpinion: [
           this.eduTextbook.get('expertOpinion') ||
-            this.validateForm.value.expertOpinion,
+          this.validateForm.value.expertOpinion,
           [Validators.required]
         ],
         evidence: [
@@ -193,16 +200,24 @@ export class AttachmentComponent implements OnInit {
         moreMaterial: [''],
         unitMaterial: [
           this.eduTextbook.get('unitMaterial') ||
-            this.validateForm.value.unitMaterial,
+          this.validateForm.value.unitMaterial,
           [Validators.required]
         ],
-        accept: [
-          this.eduTextbook.get('accept') || '',
-          [Validators.required, this.confirmationValidator]
+        // accept: [
+        //   this.eduTextbook.get('accept') || '',
+        //   [Validators.required, this.confirmationValidator]
+        // ],
+        copyrightImgUrl: [
+          this.eduTextbook.get('copyrightImgUrl') || '',
+          [Validators.required]
+        ],
+        CIPImgUrl: [
+          this.eduTextbook.get('CIPImgUrl') || '',
+          [Validators.required]
         ],
       });
-      this.opinions = this.eduTextbook.get('opinions') || this.opinions
-      this.authorSign = this.eduTextbook.get('authorSign') || this.authorSign
+      // this.opinions = this.eduTextbook.get('opinions') || this.opinions
+      // this.authorSign = this.eduTextbook.get('authorSign') || this.authorSign
     }
   }
   async submitForm(event?: string): Promise<void> {
@@ -211,36 +226,56 @@ export class AttachmentComponent implements OnInit {
       return;
     }
     console.log(this.validateForm.value);
-    let opinionsVrifly = !this.opinions.some((item) =>
-      Object.values(item).some((val) => val == '' || val == undefined)
-    );
-    let authorSignVrifly = !this.authorSign.some((item) =>
-      Object.values(item).some((val) => val == '' || val == undefined)
-    );
+    // let opinionsVrifly = !this.opinions.some((item) =>
+    //   Object.values(item).some((val) => val == '' || val == undefined)
+    // );
+    // let authorSignVrifly = !this.authorSign.some((item) =>
+    //   Object.values(item).some((val) => val == '' || val == undefined)
+    // );
     let params: any = this.validateForm.value;
+    console.log(this.validateForm)
     if (this.validateForm.valid) {
       console.log(this.validateForm.value);
       if (event == 'complete') {
-        if (!opinionsVrifly) {
-          this.msg.warning('所有作者政治审查意见填写不完整');
-          return;
-        }
-        if (!authorSignVrifly) {
-          this.msg.warning('上传所有作者签名填写不完整');
-          return;
-        }
+        // if (!opinionsVrifly) {
+        //   this.msg.warning('所有作者政治审查意见填写不完整');
+        //   return;
+        // }
+        // if (!authorSignVrifly) {
+        //   this.msg.warning('上传所有作者签名填写不完整');
+        //   return;
+        // }
         await this.saveEduTextbook(params, true);
         let textBookJson = this.eduTextbook.toJSON()
-        let ignoreFiled = ['typeNumber','importantProjectOther','createdAt','updatedAt'] //非必填字段
+        let ignoreFiled = [
+          'typeNumber',
+          'editionNumber', 
+          'importantProjectOther', 
+          'textbookFiles',
+          'createdAt', 
+          'updatedAt',
+          'copyright',
+          'authorSign',
+          'CIP',
+          'isDeleted',
+          'opinions',
+          'printNumber',
+          'printSum',
+          'render',
+          'importantProject',
+          'importantProjectOther',
+          'complete',
+          'links','recommend','printSun','discard','edition','eduProcess'
+        ] //非必填字段
         console.log(textBookJson);
-        let isVrifly = Object.keys(textBookJson).some((item:string)=>{
-          if(!ignoreFiled.includes(item) && (textBookJson[item] === '' || textBookJson[item] === undefined || textBookJson[item] === null)){
-            console.warn('字段未填写:'+item);
+        let isVrifly = Object.keys(textBookJson).some((item: string) => {
+          if (!ignoreFiled.includes(item) && (textBookJson[item] === '' || textBookJson[item] === undefined || textBookJson[item] === null)) {
+            console.warn('字段未填写:' + item);
             return true
           }
           return
         })
-        if(isVrifly){
+        if (isVrifly) {
           this.msg.warning('存在未填项')
           return
         }
@@ -252,7 +287,8 @@ export class AttachmentComponent implements OnInit {
       }
     } else {
       if (event == 'save') {
-        await this.saveEduTextbook(params, this.validateForm.valid && opinionsVrifly && authorSignVrifly);
+        // await this.saveEduTextbook(params, this.validateForm.valid && opinionsVrifly && authorSignVrifly);
+        await this.saveEduTextbook(params, this.validateForm.valid);
         this.modal.success({
           nzTitle: '保存成功',
           nzContent: '<p>已保存并且至空间</p>',
@@ -260,16 +296,62 @@ export class AttachmentComponent implements OnInit {
         });
         return;
       }
-      Object.values(this.validateForm.controls).forEach((control) => {
-        if (control.invalid) {
-          control.markAsDirty();
-          control.updateValueAndValidity({ onlySelf: true });
+
+
+
+
+
+
+
+      console.log(this.validateForm.value);
+      if (event == 'complete') {
+        await this.saveEduTextbook(params, true);
+        let textBookJson = this.eduTextbook.toJSON()
+        let ignoreFiled = ['typeNumber', 'importantProjectOther', 'createdAt', 'updatedAt'] //非必填字段
+        console.log(textBookJson);
+        let isVrifly = Object.keys(textBookJson).some((item: string) => {
+          if (!ignoreFiled.includes(item) && (textBookJson[item] === '' || textBookJson[item] === undefined || textBookJson[item] === null)) {
+            console.warn('字段未填写:' + item);
+            return true
+          }
+          return
+        })
+        if (isVrifly) {
+          this.msg.warning('存在未填项')
+          return
         }
-      });
-      this.msg.warning('请填写完整信息');
+        this.state.emit({ type: 'complete', textBook: this.eduTextbook });
+        this.eduTextbook.set('complete', true)
+        this.eduTextbook.set('status', '102')
+        await this.eduTextbook.save()
+        this.msg.success('已填写完成')
+      }
+
+
+
+
+
+      
+
+
+
+
+      // Object.values(this.validateForm.controls).forEach((control) => {
+      //   if (control.invalid) {
+      //     control.markAsDirty();
+      //     control.updateValueAndValidity({ onlySelf: true });
+      //   }
+      // });
+      // this.msg.warning('请填写完整信息');
+
+
+
+
+      
     }
     if (event == 'save') {
-      await this.saveEduTextbook(params, this.validateForm.valid && opinionsVrifly && authorSignVrifly);
+      // await this.saveEduTextbook(params, this.validateForm.valid && opinionsVrifly && authorSignVrifly);
+      await this.saveEduTextbook(params, this.validateForm.valid);
       this.modal.success({
         nzTitle: '您已填写完成',
         nzContent: '<p>已保存并且至空间</p>',
@@ -277,66 +359,66 @@ export class AttachmentComponent implements OnInit {
       });
     }
   }
-  changeCode() {}
-  getCode(e: any) {}
-  //添加作者信息
-  onPush(type: string, idx: number) {
-    switch (type) {
-      case 'opinions':
-        this.opinions.splice(idx + 1, 0, {
-          name: '', //作者
-          unit: '', //单位
-          birth: '', //出生年月
-          nationality: '', //国籍
-          reviewFile: '', //作者政治审查表/作者签名
-        });
-        break;
-      case 'authorSign':
-        this.authorSign.splice(idx + 1, 0, {
-          name: '', //作者
-          unit: '', //单位
-          birth: '', //出生年月
-          nationality: '', //国籍
-          reviewFile: '', //作者政治审查表/作者签名
-        });
-        break;
-    }
-  }
-  //删除作者信息
-  onDel(type: string, idx: number) {
-    switch (type) {
-      case 'opinions':
-        if (this.opinions.length <= 1) {
-          this.opinions = [
-            {
-              name: '', //作者
-              unit: '', //单位
-              birth: '', //出生年月
-              nationality: '', //国籍
-              reviewFile: '', //作者政治审查表/作者签名
-            },
-          ];
-          return;
-        }
-        this.opinions.splice(idx, 1);
-        break;
-      case 'authorSign':
-        if (this.authorSign.length <= 1) {
-          this.authorSign = [
-            {
-              name: '', //作者
-              unit: '', //单位
-              birth: '', //出生年月
-              nationality: '', //国籍
-              reviewFile: '', //作者政治审查表/作者签名
-            },
-          ];
-          return;
-        }
-        this.authorSign.splice(idx, 1);
-        break;
-    }
-  }
+  changeCode() { }
+  getCode(e: any) { }
+  // //添加作者信息
+  // onPush(type: string, idx: number) {
+  //   switch (type) {
+  //     case 'opinions':
+  //       this.opinions.splice(idx + 1, 0, {
+  //         name: '', //作者
+  //         unit: '', //单位
+  //         birth: '', //出生年月
+  //         nationality: '', //国籍
+  //         reviewFile: '', //作者政治审查表/作者签名
+  //       });
+  //       break;
+  //     case 'authorSign':
+  //       this.authorSign.splice(idx + 1, 0, {
+  //         name: '', //作者
+  //         unit: '', //单位
+  //         birth: '', //出生年月
+  //         nationality: '', //国籍
+  //         reviewFile: '', //作者政治审查表/作者签名
+  //       });
+  //       break;
+  //   }
+  // }
+  // //删除作者信息
+  // onDel(type: string, idx: number) {
+  //   switch (type) {
+  //     case 'opinions':
+  //       if (this.opinions.length <= 1) {
+  //         this.opinions = [
+  //           {
+  //             name: '', //作者
+  //             unit: '', //单位
+  //             birth: '', //出生年月
+  //             nationality: '', //国籍
+  //             reviewFile: '', //作者政治审查表/作者签名
+  //           },
+  //         ];
+  //         return;
+  //       }
+  //       this.opinions.splice(idx, 1);
+  //       break;
+  //     case 'authorSign':
+  //       if (this.authorSign.length <= 1) {
+  //         this.authorSign = [
+  //           {
+  //             name: '', //作者
+  //             unit: '', //单位
+  //             birth: '', //出生年月
+  //             nationality: '', //国籍
+  //             reviewFile: '', //作者政治审查表/作者签名
+  //           },
+  //         ];
+  //         return;
+  //       }
+  //       this.authorSign.splice(idx, 1);
+  //       break;
+  //   }
+  // }
   handleChange(info: NzUploadChangeParam): void {
     if (info.file.status !== 'uploading') {
       console.log(info.file, info.fileList);
@@ -366,12 +448,12 @@ export class AttachmentComponent implements OnInit {
       className: 'Company',
       objectId: this.tbookSer.company,
     });
-    params.textbookTypes &&
-      this.eduTextbook?.set('textbookTypes', params.textbookTypes);
-    params.textbookFiles &&
-      this.eduTextbook?.set('textbookFiles', params.textbookFiles);
-    let links = params.links.split(/[(\r\n)\r\n]+/);
-    links && this.eduTextbook?.set('links', links);
+    // params.textbookTypes &&
+    //   this.eduTextbook?.set('textbookTypes', params.textbookTypes);
+    // params.textbookFiles &&
+    //   this.eduTextbook?.set('textbookFiles', params.textbookFiles);
+    // let links = params.links.split(/[(\r\n)\r\n]+/);
+    // links && this.eduTextbook?.set('links', links);
     params.selfResults &&
       this.eduTextbook?.set('selfResults', params.selfResults);
     params.unitMaterial &&
@@ -381,10 +463,27 @@ export class AttachmentComponent implements OnInit {
     params.evidence && this.eduTextbook?.set('evidence', params.evidence);
     params.moreMaterial &&
       this.eduTextbook?.set('moreMaterial', params.moreMaterial);
-    params.accept && this.eduTextbook?.set('accept', params.accept);
-    this.opinions && this.eduTextbook?.set('opinions', this.opinions);
-    this.authorSign && this.eduTextbook?.set('authorSign', this.authorSign);
+    // params.accept && this.eduTextbook?.set('accept', params.accept);
+    this.eduTextbook?.set('copyrightImgUrl', params.copyrightImgUrl);
+    this.eduTextbook?.set('CIPImgUrl', params.CIPImgUrl);
+    // this.opinions && this.eduTextbook?.set('opinions', this.opinions);
+    // this.authorSign && this.eduTextbook?.set('authorSign', this.authorSign);
     await this.eduTextbook?.save();
     return;
   }
+  upload(e: any, type: string) {
+    console.log(e);
+    let file = e[0];
+    if (type == 'copyrightImgUrl' || type == 'CIPImgUrl') {
+      this.validateForm.value[type] = file
+    }else if(type == 'moreMaterial'){
+        this.validateForm.value[type]=e
+
+      // if(this.validateForm.value[type]){
+      //   this.validateForm.value[type].push(file)
+      // }else{
+      //   this.validateForm.value[type]=[file]
+      // }
+    }
+  }
 }

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

@@ -226,12 +226,12 @@
             @if (validateForm.value.importantProject == '其他省部级及以上项目') {
             <input type="text" formControlName="importantProjectOther" placeholder="请输入入选项目名称" nz-input />
             }
-            <label nz-radio nzValue=""></label>
+            <label nz-radio nzValue=""></label>
           </nz-radio-group>
         </nz-input-group>
       </nz-form-control>
     </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>版权页截图</nz-form-label>
       <nz-form-control nzErrorTip="请上传版权页截图" [nzSm]="12" [nzXs]="12">
         <nz-input-group>
@@ -253,7 +253,7 @@
           </div>
         </nz-input-group>
       </nz-form-control>
-    </nz-form-item>
+    </nz-form-item> -->
   </form>
 </div>
 <div class="footer">

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

@@ -95,8 +95,7 @@ export class BasicInComponent implements OnInit {
     importantProject: FormControl<string>; //初版以来是否列为重点项目
     importantProjectOther: FormControl<string>; //其他省部级及以上项目
     approvedImgUrl:FormControl<string>//重点立项教材获批截图
-    copyrightImgUrl: FormControl<string>; //版权页截图
-    CIPImgUrl: FormControl<string>; //中国版本图书馆CIP查询截图
+  
 
     // remember: FormControl<boolean>;
   }> = this.fb.group({
@@ -122,8 +121,8 @@ export class BasicInComponent implements OnInit {
     importantProject: ['', [Validators.required]],
     importantProjectOther: [''],
     approvedImgUrl:[''],
-    copyrightImgUrl: [''],
-    CIPImgUrl: [''],
+    // copyrightImgUrl: [''],
+    // CIPImgUrl: [''],
     // remember: [true],
   });
   /** 所属学科专业类显示数量*/
@@ -219,8 +218,8 @@ export class BasicInComponent implements OnInit {
       importantProject: [this.eduTextbook?.get('importantProject') || '', [Validators.required]],
       importantProjectOther: [this.eduTextbook?.get('importantProjectOther') || ''],
       approvedImgUrl: [this.eduTextbook?.get('approvedImgUrl') || 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf', [Validators.required]],
-      copyrightImgUrl: [this.eduTextbook?.get('copyrightImgUrl') || 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf', [Validators.required]],
-      CIPImgUrl: [this.eduTextbook?.get('CIPImgUrl') || 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf', [Validators.required]],
+      // copyrightImgUrl: [this.eduTextbook?.get('copyrightImgUrl') || 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf', [Validators.required]],
+      // CIPImgUrl: [this.eduTextbook?.get('CIPImgUrl') || 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf', [Validators.required]],
     });
     this.onChangeRadio()
   }
@@ -260,7 +259,8 @@ export class BasicInComponent implements OnInit {
   upload(e: any, type:string) {
     console.log(e);
     let file = e[0];
-    if(type == 'copyrightImgUrl' || type == 'CIPImgUrl' ||type=='approvedImgUrl'){
+    // if(type == 'copyrightImgUrl' || type == 'CIPImgUrl' ||type=='approvedImgUrl'){
+    if(type=='approvedImgUrl'){
       this.validateForm.value[type] = file
     }
   }
@@ -375,9 +375,9 @@ export class BasicInComponent implements OnInit {
     this.eduTextbook?.set('printSum', params.printSum);
     this.eduTextbook?.set('importantProject', params.importantProject);
     this.eduTextbook?.set('importantProjectOther', params.importantProjectOther);
-    this.eduTextbook?.set('copyrightImgUrl', params.copyrightImgUrl);
+    // this.eduTextbook?.set('copyrightImgUrl', params.copyrightImgUrl);
+    // this.eduTextbook?.set('CIPImgUrl', params.CIPImgUrl);
     this.eduTextbook?.set('approvedImgUrl',params.approvedImgUrl)
-    this.eduTextbook?.set('CIPImgUrl', params.CIPImgUrl);
     if(this.tbookSer.profile?.user?.department.objectId){
       this.eduTextbook?.set('department', {
         __type: 'Pointer',

+ 1 - 1
projects/textbook/src/modules/nav-author/components/textbook-pertain/textbook-pertain.component.html

@@ -145,7 +145,7 @@
         </tbody>
       </nz-table>
       <p>输入诚信承诺:本人自愿参加此次申报,已认真填写并检查以上材料,保证内容真实。</p>
-      <input nz-input placeholder="请输入承诺内容" [ngModelOptions]="{ standalone: true }" [(ngModel)]="promise" />
+      <input  formControlName="accept" nz-input placeholder="请输入承诺内容" />
     </div>
     <div class="author-content">
       <div class="nav">第一主编(作者)情况</div>

+ 24 - 5
projects/textbook/src/modules/nav-author/components/textbook-pertain/textbook-pertain.component.ts

@@ -13,6 +13,8 @@ import {
   FormControl,
   FormGroup,
   NonNullableFormBuilder,
+  ValidatorFn,
+  AbstractControl,
   Validators,
 } from '@angular/forms';
 import { textbookServer } from '../../../../services/textbook';
@@ -57,6 +59,18 @@ export class TextbookPertainComponent implements OnInit {
   @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 {};
+    };
   validateForm: FormGroup<{
     major: FormControl<string>; //适用专业代码及名称
     period: FormControl<number | any>; //课程学时
@@ -65,6 +79,8 @@ export class TextbookPertainComponent implements OnInit {
     // authorList: FormControl<Array<any> | any>; //作者信息
     authorDetails: FormControl<string>; //第一主编(作者)相关教学经历
     // achievement: FormControl<Array<any> | any>; //相关科学研究项目、成果或论文专著(限5项)
+    accept: FormControl<string>; //填写诚信承诺
+
   }> = this.fb.group({
     major: ['', [Validators.required]],
     period: ['', [Validators.required]],
@@ -73,7 +89,9 @@ export class TextbookPertainComponent implements OnInit {
     // authorList: ['', [Validators.required]],
     authorDetails: ['', [Validators.required]],
     // achievement: ['', [Validators.required]],
+    accept: ['', [Validators.required, this.confirmationValidator]],
   });
+ 
   //适用专业代码及名称
   selectList: Array<any> = [
     {
@@ -134,7 +152,7 @@ export class TextbookPertainComponent implements OnInit {
   ];
   workOptions = ['主编', '作者', '副主编', '写者'];
   /**诚信承诺 */
-  promise:string=''
+  accept:string=''
   constructor(
     public tbookSer: textbookServer,
     private fb: NonNullableFormBuilder,
@@ -164,6 +182,10 @@ export class TextbookPertainComponent implements OnInit {
           this.eduTextbook.get('authorDetails') || '',
           [Validators.required],
         ],
+        accept: [
+          this.eduTextbook.get('accept') || '',
+          [Validators.required, this.confirmationValidator]
+        ],
       });
       this.authorList = this.eduTextbook.get('authorList') || this.authorList
       console.log(this.authorList)
@@ -171,10 +193,6 @@ export class TextbookPertainComponent implements OnInit {
     }
   }
   async submitForm(event?: string): Promise<void> {
-    // if(this.promise!='本人自愿参加此次申报,已认真填写并检查以上材料,保证内容真实。'){
-    //   this.msg.warning('请输入承诺内容')
-    //   return
-    // }
     if (event == 'pre') {
       this.state.emit({ type: 'pre' });
       return
@@ -352,6 +370,7 @@ export class TextbookPertainComponent implements OnInit {
     params.authorDetails && this.eduTextbook?.set('authorDetails', params.authorDetails);
     this.eduTextbook?.set('authorList', this.authorList);
     this.eduTextbook?.set('achievementOptions', this.achievementOptions);
+    params.accept && this.eduTextbook?.set('accept', params.accept);
     await this.eduTextbook?.save();
     return;
   }

+ 6 - 10
projects/textbook/src/modules/nav-province-contact/submitted/complete/complete.component.html

@@ -1,15 +1,11 @@
 <div class="manage">
-  <nz-empty [nzNotFoundContent]="deadline+ '后可完成报送'"></nz-empty>
+  <nz-empty [nzNotFoundContent]="deadline + '后可完成报送'"></nz-empty>
 </div>
 
 <div class="footer">
-  <button nz-button disabled="true" nzType="default" style="margin-right: 20px">
-  </button>
-  <button
-    nz-button
-    nzType="primary"
-    disabled="true"
-  >
-    完成报送
-  </button>
+  <div class="tips">共 36 册(套)推荐报送教材</div>
+  <div class="btns">
+  <button nz-button disabled="true" nzType="default" style="margin-right: 20px">撤销公示</button>
+    <button nz-button nzType="primary" disabled="true">完成报送</button>
+  </div>
 </div>

+ 20 - 8
projects/textbook/src/modules/nav-province-contact/submitted/complete/complete.component.scss

@@ -8,14 +8,26 @@
   // justify-content: center;
 }
 .footer{
-  position: fixed;
-  bottom: 50px;
-  right: 10px;
+  position: absolute;
+  bottom: 10px;
+  width: 100%;
+  right: 0;
   display: flex;
-  margin: 10px auto;
   align-items: center;
-  justify-content: space-evenly;
-  // width: 200px;
-  justify-content: end;
-  padding-right: 100px;
+  justify-content: space-between;
+  padding: 0 10px;
+  .tips{
+    font-family: PingFang SC;
+    font-size: 16px;
+    font-weight: 400;
+    line-height: 24px;
+    text-align: left;
+    color: #231C1F99;
+  }
+  .btns{
+    display: flex;
+    align-items: center;
+    justify-content: space-evenly;
+    justify-content: end;
+  }
 }

+ 1 - 1
projects/textbook/src/modules/nav-province-contact/submitted/complete/complete.component.ts

@@ -10,7 +10,7 @@ import { NzEmptyModule } from 'ng-zorro-antd/empty';
   standalone: true,
 })
 export class CompleteComponent implements OnInit {
-  date: Date = new Date('2024/7/21');
+  date: Date = new Date('2024/7/31');
   t: any;
   deadline: string = '';
   time() {

+ 6 - 8
projects/textbook/src/modules/nav-province-contact/submitted/export-file/export-file.component.scss

@@ -22,14 +22,12 @@
   }
 }
 .footer{
-  position: fixed;
-  bottom: 50px;
-  right: 10px;
+  position: absolute;
+  bottom: 10px;
+  width: 100%;
+  right: 0;
   display: flex;
-  margin: 10px auto;
   align-items: center;
-  justify-content: space-evenly;
-  // width: 200px;
-  justify-content: end;
-  padding-right: 100px;
+  justify-content: flex-end;
+  padding: 0 10px;
 }

+ 28 - 6
projects/textbook/src/modules/nav-province-contact/submitted/export-list/export-list.component.html

@@ -1,11 +1,33 @@
 <div class="manage">
-  <div class="title">北京市“十四五”普通高等教育本科国家级规划教材第一次遴选推荐名单</div>
-  <app-textbook [filterObj]="filterObj"></app-textbook>
+  <div class="title">
+    {{
+      eduProcess?.get("name")
+    }}“十四五”普通高等教育本科国家级规划教材第一次遴选推荐名单
+  </div>
+  <app-textbook #textbook [filterObj]="filterObj"></app-textbook>
 </div>
 
-
 <div class="footer">
-  <button nz-button nzType="default"  style="margin-right: 20px">下载公示列表</button>
-  <button nz-button nzType="default" (click)="onChange('pre')" style="margin-right: 20px">上一页</button>
-  <button nz-button nzType="primary" (click)="onChange('next')" style="background: #3e49b3; border: 1px #3e49b3">下一步</button>
+  <div class="tips">共 36 册(套)推荐报送教材</div>
+  <div class="btns">
+    <button nz-button (click)="textbook.export()" nzType="default" style="margin-right: 20px">
+      下载公示列表
+    </button>
+    <button
+      nz-button
+      nzType="default"
+      (click)="onChange('pre')"
+      style="margin-right: 20px"
+    >
+      上一页
+    </button>
+    <button
+      nz-button
+      nzType="primary"
+      (click)="onChange('next')"
+      style="background: #3e49b3; border: 1px #3e49b3"
+    >
+      下一步
+    </button>
+  </div>
 </div>

+ 20 - 8
projects/textbook/src/modules/nav-province-contact/submitted/export-list/export-list.component.scss

@@ -8,14 +8,26 @@
   margin-bottom: 18px;
 }
 .footer{
-  position: fixed;
-  bottom: 50px;
-  right: 10px;
+  position: absolute;
+  bottom: 10px;
+  width: 100%;
+  right: 0;
   display: flex;
-  margin: 10px auto;
   align-items: center;
-  justify-content: space-evenly;
-  // width: 200px;
-  justify-content: end;
-  padding-right: 100px;
+  justify-content: space-between;
+  padding: 0 10px;
+  .tips{
+    font-family: PingFang SC;
+    font-size: 16px;
+    font-weight: 400;
+    line-height: 24px;
+    text-align: left;
+    color: #231C1F99;
+  }
+  .btns{
+    display: flex;
+    align-items: center;
+    justify-content: space-evenly;
+    justify-content: end;
+  }
 }

+ 11 - 2
projects/textbook/src/modules/nav-province-contact/submitted/export-list/export-list.component.ts

@@ -2,6 +2,7 @@ import { Component, EventEmitter, OnInit, Output } from '@angular/core';
 import { Router, ActivatedRoute } from '@angular/router';
 import { TextbookComponent } from '../../../../app/textbook/textbook.component';
 import { CommonCompModule } from '../../../../services/common.modules';
+import Parse from 'parse';
 
 @Component({
   selector: 'app-export-list',
@@ -13,13 +14,21 @@ import { CommonCompModule } from '../../../../services/common.modules';
 export class ExportListComponent implements OnInit {
   @Output() change: EventEmitter<any> = new EventEmitter<any>();
   textBookList: Parse.Object | any;
-
+  eduProcess?:Parse.Object
   filterObj: any = {
     isCheck: false,
   };
   constructor(private router: Router, private activeRoute: ActivatedRoute) {}
 
-  ngOnInit() {}
+  ngOnInit() {
+    this.activeRoute.paramMap.subscribe(async (params) => {
+      let id = params.get('id');
+      let query = new Parse.Query('EduProcess');
+      query.include('department');
+      query.equalTo('objectId', id);
+      this.eduProcess = await query.first();
+    });
+  }
   onChange(type: string) {
     if (type == 'next') {
       this.change.emit('next');