cehn hace 7 meses
padre
commit
415b53485a

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

@@ -27,7 +27,7 @@ import Parse from 'parse';
 })
 export class ApplyComponent implements OnInit {
   textBook: Parse.Object | any;
-  state: number = 0;
+  state: number = 2;
   get stateMap() {
     let map: any = {
       '0': '教材基本信息',

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

@@ -36,10 +36,9 @@
       >
         <nz-input-group>
           <nz-select
-            style="width: 80%"
             nzShowSearch
             nzAllowClear
-            nzPlaceHolder="填写 6 位专业代码选择"
+            nzPlaceHolder="填写 4 位专业代码选择"
             formControlName="majorPoniter"
             (ngModelChange)="changeCode()"
             (nzOnSearch)="getCode($event)"

+ 1 - 1
projects/textbook/src/modules/nav-author/components/create/author/author.component.ts

@@ -93,7 +93,7 @@ export class AuthorComponent implements OnInit {
   ) {}
 
   ngOnInit() {
-    let id = this?.eduTextbookVolume?.id;
+    let id = this?.eduTextbookVolume?.id || this?.eduTextbookVolume?.objectId;
     if (id) {
       this.getEduTextbookVolume(id);
     }

+ 28 - 50
projects/textbook/src/modules/nav-author/components/create/content/content.component.ts

@@ -1,6 +1,4 @@
 import { Component, OnInit } from '@angular/core';
-
-
 import { Input, Output, EventEmitter } from '@angular/core';
 import { CommonCompModule } from '../../../../../services/common.modules';
 import { NzSelectModule } from 'ng-zorro-antd/select';
@@ -12,16 +10,15 @@ import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
 import { NzTableModule } from 'ng-zorro-antd/table';
 import { NzModalService } from 'ng-zorro-antd/modal';
 import Parse from 'parse';
-import {
-  FormControl,
-  FormGroup,
-  NonNullableFormBuilder,
-  Validators,
-} from '@angular/forms';
+// import {
+//   FormControl,
+//   FormGroup,
+//   NonNullableFormBuilder,
+//   Validators,
+// } from '@angular/forms';
 import { textbookServer } from '../../../../../services/textbook';
 import { CreatedService } from '../../../../../services/created.service'
 
-
 interface course {
   date: Date | any,
   wordage: number | any,
@@ -49,16 +46,14 @@ interface course {
 })
 export class ContentComponent implements OnInit {
 
-  @Input('eduTextbookVolumeId') eduTextbookVolumeId: any;
+  @Input('eduTextbook') eduTextbook: any;
+  @Input('eduTextbookVolume') eduTextbookVolume: Parse.Object | any;
 
 
-  @Input('eduTextbook') eduTextbook: any;
   @Input('maxWidth') maxWidth: number = 0;
   @Output() state: EventEmitter<any> = new EventEmitter<any>();
   @Output() save: EventEmitter<any> = new EventEmitter<any>();
-  validateForm: FormGroup<{
-  }> = this.fb.group({
-  });
+
   //申报教材建设历程
   courses: Array<course> = [
     {
@@ -71,53 +66,36 @@ export class ContentComponent implements OnInit {
   ];
   constructor(
     public tbookSer: textbookServer,
-    private fb: NonNullableFormBuilder,
     private modal: NzModalService,
     private msg: NzMessageService,
     private creatSev: CreatedService
   ) { }
 
-
-
-  /**分册记录Parse */
-  eduTextbookVolume: Parse.Object | any
-  /**获取扩展分册记录 */
-  async getEduTextbookVolume() {
-    console.log('传递的分册id' + this.eduTextbookVolumeId)
-    if (this.eduTextbookVolumeId) {
-      let query = new Parse.Query('EduTextbookVolume')
-      this.eduTextbookVolume = await query.get(this.eduTextbookVolumeId)
-      console.log(this.eduTextbookVolume);
-    } else {
-      console.log("分册id未传递")
-    }
+  ngOnInit() {
+    this.refersh()
   }
-
   ngAfterViewInit(): void {
-    //Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
-    //Add 'implements AfterViewInit' to the class.
   }
-
-
   async refersh() {
     await this.getEduTextbookVolume()
     if (this.eduTextbookVolume?.id) {
-
       this.creatSev.type = this.eduTextbookVolume.get('type')
       this.creatSev.typeNumber = this.eduTextbookVolume.get('typeNumber')
-
-      this.validateForm = this.fb.group({
-      });
-      console.log(this.validateForm.value);
       this.courses = this.eduTextbookVolume.get('courses') || this.courses
     }
   }
-  ngOnInit() {
-    this.refersh()
+
+  /**获取扩展分册记录 */
+  async getEduTextbookVolume() {
+    let id = this?.eduTextbookVolume?.id || this?.eduTextbookVolume?.objectId;
+    console.log('传递的分册id' + id)
+    if (id) {
+      let query = new Parse.Query('EduTextbookVolume')
+      this.eduTextbookVolume = await query.get(id)
+      console.log(this.eduTextbookVolume);
+    }
   }
 
-  changeCode() { }
-  getCode(e: any) { }
   //添加作者信息
   onPush(idx: number) {
     this.courses.splice(idx + 1, 0, {
@@ -134,12 +112,12 @@ export class ContentComponent implements OnInit {
     this.courses.splice(idx, 1);
   }
 
-  async saveEduTextbook() {
-    console.log('执行子组件方法')
-    this.eduTextbookVolume?.set('courses', this.courses)
-    await this.eduTextbookVolume?.save()
+  async submitForm(): Promise<boolean> {
+    let coursesVrifly = !this.courses.some((item) =>
+      Object.values(item).some((val) => val == '' || val == undefined)
+    );
+    this.eduTextbookVolume?.set('courses', this.courses);
+    await this.eduTextbookVolume?.save();
+    return coursesVrifly;
   }
-
-
-
 }

+ 62 - 38
projects/textbook/src/modules/nav-author/components/textbook-content/textbook-content.component.html

@@ -1,29 +1,44 @@
 <div class="entry">
-
-
   <form
     nz-form
     [formGroup]="validateForm"
     class="login-form"
     (ngSubmit)="submitForm()"
   >
-
-  
-
-@if (type=='全册') {
-  <nz-collapse>
-    @for (panel of eduTextbookVolumeList; track $index; let pindex = $index) {
-    <nz-collapse-panel [nzHeader]="pindex+1+'册'" [nzActive]="'true'">
-      <app-three  #children [eduTextbookVolumeId]="panel?.id"></app-three>
-    </nz-collapse-panel>
-    }
-  </nz-collapse>
-}@else {
-  @if(eduTextbookVolumeId){
-    <app-three  #children [eduTextbookVolumeId]="eduTextbookVolumeId"></app-three>
-  }
-
-}
+    @if (type=='全册') {
+    <nz-collapse [nzBordered]="false">
+      @for (panel of eduTextbook?.get('childrens'); track $index; let pindex =
+      $index) {
+      <nz-collapse-panel
+        [nzHeader]="pindex + 1 + '册'"
+        [nzActive]="false"
+        [nzHeader]="title"
+        nzExpandedIcon="caret-right"
+        style="
+          background: #f7f7f7;
+          border-radius: 4px;
+          margin-bottom: 24px;
+          border: 0px;
+        "
+      >
+        <ng-template #title>
+          <span class="panel-title">{{ "分册" + ($index + 1) }}</span>
+        </ng-template>
+        <app-three
+          #children
+          [eduTextbook]="eduTextbook?.id"
+          [eduTextbookVolume]="panel"
+        ></app-three>
+      </nz-collapse-panel>
+      }
+    </nz-collapse>
+    }@else { @if(eduTextbookVolumeId){
+    <app-three
+      #children
+      [eduTextbook]="eduTextbook?.id"
+      [eduTextbookVolume]="eduTextbook?.get('childrens')[0]"
+    ></app-three>
+    } }
 
     <div class="author-content">
       <div class="nav">申报教材特色及创新</div>
@@ -33,15 +48,15 @@
           nzErrorTip="请输入本教材与同类教材相比较,突出的特色及改革创新点"
           style="width: 100%"
         >
-        <nz-textarea-count [nzMaxCharacterCount]="1000">
-          <textarea
-            style="min-height: 260px;"
-            rows="4"
-            formControlName="innovateExplain"
-            placeholder="请输入本教材与同类教材相比较,突出的特色及改革创新点"
-            nz-input
-          ></textarea>
-        </nz-textarea-count>
+          <nz-textarea-count [nzMaxCharacterCount]="1000">
+            <textarea
+              style="min-height: 260px"
+              rows="4"
+              formControlName="innovateExplain"
+              placeholder="请输入本教材与同类教材相比较,突出的特色及改革创新点"
+              nz-input
+            ></textarea>
+          </nz-textarea-count>
         </nz-form-control>
       </nz-form-item>
     </div>
@@ -53,15 +68,15 @@
           nzErrorTip="概述选用本教材的范围及学校,教学效果及评价"
           style="width: 100%"
         >
-        <nz-textarea-count [nzMaxCharacterCount]="1000">
-          <textarea
-            style="min-height: 260px;"
-            rows="4"
-            formControlName="influence"
-            placeholder="概述选用本教材的范围及学校,教学效果及评价"
-            nz-input
-          ></textarea>
-        </nz-textarea-count>
+          <nz-textarea-count [nzMaxCharacterCount]="1000">
+            <textarea
+              style="min-height: 260px"
+              rows="4"
+              formControlName="influence"
+              placeholder="概述选用本教材的范围及学校,教学效果及评价"
+              nz-input
+            ></textarea>
+          </nz-textarea-count>
         </nz-form-control>
       </nz-form-item>
     </div>
@@ -84,7 +99,16 @@
   >
     上一页
   </button>
-  <button nz-button style="background: #3e49b3; border: 1px #3e49b3" nzType="primary" (click)="submitForm('next')">
+  <button
+    nz-button
+    style="background: #3e49b3; border: 1px #3e49b3"
+    nzType="primary"
+    (click)="submitForm('next')"
+  >
     下一页
   </button>
 </div>
+
+<div class="loading" [hidden]="!saveLoading">
+  <nz-spin nzSimple [nzSize]="'large'"></nz-spin>
+</div>

+ 20 - 1
projects/textbook/src/modules/nav-author/components/textbook-content/textbook-content.component.scss

@@ -37,7 +37,13 @@
     background: #3e49b314;
     border-radius: 6px;
   }
-
+  .panel-title{
+    font-family: PingFang SC;
+    font-size: 16px;
+    font-weight: 500;
+    line-height: 22px;
+    text-align: left;
+  }
 }
 .footer{
   display: flex;
@@ -47,4 +53,17 @@
   // width: 200px;
   justify-content: end;
   // padding-right: 100px;
+}
+.loading{
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100vw;
+  text-align: center;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: rgb(0 0 0 / 30%);
+  z-index: 99;
 }

+ 175 - 149
projects/textbook/src/modules/nav-author/components/textbook-content/textbook-content.component.ts

@@ -16,20 +16,18 @@ import {
   Validators,
 } from '@angular/forms';
 import { textbookServer } from '../../../../services/textbook';
-import { CreatedService } from '../../../../services/created.service'
-import{ContentComponent} from '../create/content/content.component'
+import { CreatedService } from '../../../../services/created.service';
+import { ContentComponent } from '../create/content/content.component';
 import { NzCollapseModule } from 'ng-zorro-antd/collapse';
 
-import {  ViewChildren, QueryList } from '@angular/core';
-
-
+import { ViewChildren, QueryList } from '@angular/core';
 
 interface course {
-  date: Date|any,
-  wordage: number|any,
-  num: number|any,
-  sumNum:number|any,
-  accolade:string
+  date: Date | any;
+  wordage: number | any;
+  num: number | any;
+  sumNum: number | any;
+  accolade: string;
 }
 
 @Component({
@@ -49,7 +47,7 @@ interface course {
   templateUrl: './textbook-content.component.html',
   styleUrls: ['./textbook-content.component.scss'],
 })
-export class TextbookContentComponent  implements OnInit {
+export class TextbookContentComponent implements OnInit {
   @Input('eduTextbook') eduTextbook: any;
   @Input('maxWidth') maxWidth: number = 0;
   @Output() state: EventEmitter<any> = new EventEmitter<any>();
@@ -64,11 +62,11 @@ export class TextbookContentComponent  implements OnInit {
   //申报教材建设历程
   courses: Array<course> = [
     {
-      date: '',//出版时间
-      wordage: '',//字数
-      num: '',//重印次数
-      sumNum:'',//本版总印数
-      accolade:''//获奖励情况
+      date: '', //出版时间
+      wordage: '', //字数
+      num: '', //重印次数
+      sumNum: '', //本版总印数
+      accolade: '', //获奖励情况
     },
   ];
   constructor(
@@ -76,188 +74,216 @@ export class TextbookContentComponent  implements OnInit {
     private fb: NonNullableFormBuilder,
     private modal: NzModalService,
     private msg: NzMessageService,
-    private creatSev:CreatedService
-  ) { }
-
-loading=false
- /**扩展表记录 */
- eduTextbookVolumeList: Array<any> = []
- /**获取扩展表记录 */
- async getEduTextbookVolumeList() {
-   if (this.typeNumber && this.typeNumber > 12) {
-     this.typeNumber = 12
-   }
-   console.log(this.type, this.typeNumber)
-   let query = new Parse.Query('EduTextbookVolume')
-   query.equalTo('eduTextbook', this.eduTextbook?.id)
-   query.select('objectId')
-   query.ascending('createdAt')//小到大
-   query.notEqualTo('isDeleted', true)
-   if (this.type == '全册') {
-     query.limit(this.typeNumber)
-   } else {
-     query.limit(1)
-   }
-   let list = await query.find()
-   console.log(list)
-   if (this.type == '全册') {
-     this.eduTextbookVolumeList = new Array(this.typeNumber).fill({ objectId: '' })
-     for (let i in list) {
-       this.eduTextbookVolumeList[i] = list[i]
-     }
-   } else {
-     this.eduTextbookVolumeList[0] = list[0]
-     console.log(this.eduTextbookVolumeList)
-     this.eduTextbookVolumeId=list[0]?.id
-   }
-
- }
- /** 册数*/
- typeNumber:any
- /** 申报类型*/
- type:any
-/** 单册时该册id*/
- eduTextbookVolumeId:any
+    private creatSev: CreatedService
+  ) {}
 
+  loading = false;
+  /**扩展表记录 */
+  eduTextbookVolumeList: Array<any> = [];
+  /**获取扩展表记录 */
+  async getEduTextbookVolumeList() {
+    if (this.typeNumber && this.typeNumber > 12) {
+      this.typeNumber = 12;
+    }
+    console.log(this.type, this.typeNumber);
+    let query = new Parse.Query('EduTextbookVolume');
+    query.equalTo('eduTextbook', this.eduTextbook?.id);
+    query.select('objectId');
+    query.ascending('createdAt'); //小到大
+    query.notEqualTo('isDeleted', true);
+    if (this.type == '全册') {
+      query.limit(this.typeNumber);
+    } else {
+      query.limit(1);
+    }
+    let list = await query.find();
+    console.log(list);
+    if (this.type == '全册') {
+      this.eduTextbookVolumeList = new Array(this.typeNumber).fill({
+        objectId: '',
+      });
+      for (let i in list) {
+        this.eduTextbookVolumeList[i] = list[i];
+      }
+    } else {
+      this.eduTextbookVolumeList[0] = list[0];
+      console.log(this.eduTextbookVolumeList);
+      this.eduTextbookVolumeId = list[0]?.id;
+    }
+  }
+  /** 册数*/
+  typeNumber: any;
+  /** 申报类型*/
+  type: any;
+  /** 单册时该册id*/
+  eduTextbookVolumeId: any;
 
   ngAfterViewInit(): void {
-    this.typeNumber = this.eduTextbook?.get('typeNumber')
-    this.type = this.eduTextbook?.get('type')
-    this.getEduTextbookVolumeList()
-    this.creatSev.getEduTextbookVolumeList(this.eduTextbook.id)
+    this.typeNumber = this.eduTextbook?.get('typeNumber');
+    this.type = this.eduTextbook?.get('type');
+    this.getEduTextbookVolumeList();
+    this.creatSev.getEduTextbookVolumeList(this.eduTextbook.id);
   }
 
-  
   ngOnInit() {
     if (this.eduTextbook.id) {
-
-      this.creatSev.type=this.eduTextbook.get('type')
-      this.creatSev.typeNumber=this.eduTextbook.get('typeNumber')
-
-
+      this.creatSev.type = this.eduTextbook.get('type');
+      this.creatSev.typeNumber = this.eduTextbook.get('typeNumber');
 
       this.validateForm = this.fb.group({
-        innovateExplain: [this.eduTextbook.get('innovateExplain'), [Validators.required]],
+        innovateExplain: [
+          this.eduTextbook.get('innovateExplain'),
+          [Validators.required],
+        ],
         influence: [this.eduTextbook.get('influence'), [Validators.required]],
       });
       console.log(this.validateForm.value);
-      this.courses = this.eduTextbook.get('courses') || this.courses
+      this.courses = this.eduTextbook.get('courses') || this.courses;
     }
   }
   async submitForm(event?: string): Promise<void> {
+    let params: any = this.validateForm.value;
+    console.log(params);
     if (event == 'pre') {
       this.state.emit({ type: 'pre' });
-      return
-    }
-    console.log(this.validateForm.value);
-    let coursesVrifly = !this.courses.some(item=>Object.values(item).some(val=> val == '' || val == undefined))
-    if (this.validateForm.valid) {
-      let params: any = this.validateForm.value;
-      if (event == 'next') {
-        if(!coursesVrifly){
-          this.msg.warning('申报教材建设历程填写不完整')
-          return
-        }
-        await this.saveEduTextbook(params, true);
-        this.state.emit({ type: 'next', textBook: this.eduTextbook });
-      }
-    } else {
-      if (event == 'save') {
-        let params: any = this.validateForm.value;
-        await this.saveEduTextbook(params, (this.validateForm.valid && coursesVrifly));
-        this.modal.success({
-          nzTitle: '保存成功',
-          nzContent: '<p>已保存并且至空间</p>',
-          nzOnOk: () => console.log('Info OK'),
-        });
-        return;
-      }
-      if (event == 'next') {
-      let params: any = this.validateForm.value;
-      await this.saveEduTextbook(params, false);
-        this.state.emit({ type: 'next', textBook: this.eduTextbook });
-      }
-      // Object.values(this.validateForm.controls).forEach((control) => {
-      //   if (control.invalid) {
-      //     control.markAsDirty();
-      //     control.updateValueAndValidity({ onlySelf: true });
-      //   }
-      // });
-      // this.msg.warning('请填写完整信息');
+      return;
     }
+    // let coursesVrifly = !this.courses.some(item=>Object.values(item).some(val=> val == '' || val == undefined))
     if (event == 'save') {
-      let params = this.validateForm.value;
-      await this.saveEduTextbook(params, (this.validateForm.valid && coursesVrifly));
+      await this.saveEduTextbook(params, this.validateForm.valid);
       this.modal.success({
         nzTitle: '保存成功',
         nzContent: '<p>已保存并且至空间</p>',
         nzOnOk: () => console.log('Info OK'),
       });
+      return;
     }
+    if (event == 'next') {
+      await this.saveEduTextbook(params, this.validateForm.valid);
+      this.state.emit({ type: 'next', textBook: this.eduTextbook });
+      return;
+    }
+    // if (this.validateForm.valid) {
+    //   let params: any = this.validateForm.value;
+    //   if (event == 'next') {
+    //     // if(!coursesVrifly){
+    //     //   this.msg.warning('申报教材建设历程填写不完整')
+    //     //   return
+    //     // }
+    //     await this.saveEduTextbook(params, true);
+    //     this.state.emit({ type: 'next', textBook: this.eduTextbook });
+    //   }
+    // } else {
+    //   if (event == 'save') {
+    //     let params: any = this.validateForm.value;
+    //     await this.saveEduTextbook(params, this.validateForm.valid);
+    //     this.modal.success({
+    //       nzTitle: '保存成功',
+    //       nzContent: '<p>已保存并且至空间</p>',
+    //       nzOnOk: () => console.log('Info OK'),
+    //     });
+    //     return;
+    //   }
+    //   if (event == 'next') {
+    //   let params: any = this.validateForm.value;
+    //   await this.saveEduTextbook(params, false);
+    //     this.state.emit({ type: 'next', textBook: this.eduTextbook });
+    //   }
+    //   // Object.values(this.validateForm.controls).forEach((control) => {
+    //   //   if (control.invalid) {
+    //   //     control.markAsDirty();
+    //   //     control.updateValueAndValidity({ onlySelf: true });
+    //   //   }
+    //   // });
+    //   // this.msg.warning('请填写完整信息');
+    // }
+    // if (event == 'save') {
+    //   let params = this.validateForm.value;
+    //   await this.saveEduTextbook(params, this.validateForm.valid);
+    //   this.modal.success({
+    //     nzTitle: '保存成功',
+    //     nzContent: '<p>已保存并且至空间</p>',
+    //     nzOnOk: () => console.log('Info OK'),
+    //   });
+    // }
   }
   changeCode() {}
   getCode(e: any) {}
   //添加作者信息
   onPush(idx: number) {
-    this.courses.splice(idx+1, 0, {
+    this.courses.splice(idx + 1, 0, {
       date: '',
       wordage: '',
       num: '',
-      sumNum:'',
-      accolade:''
+      sumNum: '',
+      accolade: '',
     });
   }
   //删除作者信息
   onDel(idx: number) {
-    if(this.courses?.length==1)return
+    if (this.courses?.length == 1) return;
     this.courses.splice(idx, 1);
   }
 
-
-
   @ViewChildren(ContentComponent) children: QueryList<ContentComponent> | any;
 
-    /**上传分册数据 */
-    async saveEduTextbookVolume(eduTextbookId?: any) {
-      console.log(eduTextbookId)
-      let arr = [] //存储返回的数组id
-      let isVrifly = true //默认都通过,若一项填写未完成,则不通过
-      return Promise.all(this.children.map(async (comp: any) => {
-        console.log(comp);
-        let req = await comp.saveEduTextbook(eduTextbookId||this.eduTextbook?.id)
-        console.log(req)
-        // arr.push(comp.saveEduTextbook())
-        //加上子组件返回是否填写完成的方法
-        // return arr
-      })).then(data => {
-        console.log(data);
+  /**上传分册数据 */
+  async saveEduTextbookVolume() {
+    let arr = []; //存储返回的数组id
+    let isVrifly = true; //默认都通过,若一项填写未完成,则不通过
+    return Promise.all(
+      this.children.map(async (comp: any) => {
+        let req = await comp.submitForm();
+        // console.log(req)
+        if (!req) {
+          isVrifly = false;
+        }
+        return isVrifly;
       })
-    }
-
+    ).then((data) => {
+      console.log(isVrifly);
+      return isVrifly;
+    });
+  }
+  saveLoading: boolean = false;
   async saveEduTextbook(params: any, isComplete: boolean) {
     console.log(params);
     if (!this.eduTextbook) {
       this.msg.error('请先创建教材');
       return;
     }
-    //如果填写未完整,仅保存,状态修改待完善101
-    if (this.eduTextbook.get('status') == '102' && !isComplete) {
-      this.eduTextbook?.set('status', '101');
-      this.eduTextbook.set('complete', false)
-    } else if (!this.eduTextbook.get('status')) {
-      this.eduTextbook?.set('status', '101');
+    if (this.saveLoading) return;
+    this.saveLoading = true;
+    try {
+      //如果填写未完整,仅保存,状态修改待完善101
+      let complete = await this.saveEduTextbookVolume();
+      isComplete = isComplete && complete;
+      if (this.eduTextbook.get('status') == '102' && !isComplete) {
+        this.eduTextbook?.set('status', '101');
+        this.eduTextbook.set('complete', false);
+      } 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.innovateExplain &&
+        this.eduTextbook?.set('innovateExplain', params.innovateExplain);
+      params.influence && this.eduTextbook?.set('influence', params.influence);
+      // this.eduTextbook?.set('courses', this.courses);
+      await this.eduTextbook?.save();
+      this.saveLoading = false;
+      if (!isComplete) {
+        this.msg.warning('保存成功,但存在未填写完成项');
+      }
+      return;
+    } catch (err) {
+      console.warn('保存错误:', err);
+      this.saveLoading = false;
+      this.msg.error('保存出错');
     }
-    this.eduTextbook?.set('user', Parse.User.current()?.toPointer());
-    this.eduTextbook?.set('company', {
-      __type: 'Pointer',
-      className: 'Company',
-      objectId: this.tbookSer.company,
-    });
-    params.innovateExplain && this.eduTextbook?.set('innovateExplain', params.innovateExplain);
-    params.influence && this.eduTextbook?.set('influence', params.influence);
-    this.eduTextbook?.set('courses', this.courses);
-    await this.eduTextbook?.save();
-    await this.saveEduTextbookVolume()
-    return;
   }
 }

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

@@ -69,7 +69,7 @@
   left: 0;
   width: 100vw;
   text-align: center;
-  height: 100vh;
+  height: 100%;
   display: flex;
   align-items: center;
   justify-content: center;