warrior преди 8 месеца
родител
ревизия
7dc79ddeb3

+ 2 - 3
projects/textbook/src/modules/nav-author/components/attachment/attachment.component.ts

@@ -73,7 +73,7 @@ export class AttachmentComponent implements OnInit {
     unitMaterial: FormControl<object | any>; //申报单位承诺意见材料
     accept: FormControl<string>; //填写诚信承诺
   }> = this.fb.group({
-    textbookTypes: ['', [Validators.required]],
+    textbookTypes: [''],
     textbookFiles: [
       [
         {
@@ -166,7 +166,6 @@ export class AttachmentComponent implements OnInit {
       this.validateForm = this.fb.group({
         textbookTypes: [
           this.eduTextbook.get('textbookTypes'),
-          [Validators.required]
         ],
         textbookFiles: [
           this.eduTextbook.get('textbookFiles') ||
@@ -269,8 +268,8 @@ export class AttachmentComponent implements OnInit {
       });
       this.msg.warning('请填写完整信息');
     }
-    await this.saveEduTextbook(params, this.validateForm.valid && opinionsVrifly && authorSignVrifly);
     if (event == 'save') {
+      await this.saveEduTextbook(params, this.validateForm.valid && opinionsVrifly && authorSignVrifly);
       this.modal.success({
         nzTitle: '您已填写完成',
         nzContent: '<p>已保存并且至空间</p>',

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

@@ -180,11 +180,11 @@ export class BasicInComponent implements OnInit {
       printNumber: [this.eduTextbook?.get('printNumber') || 0, [Validators.required]],
       printSum: [this.eduTextbook?.get('printSum') || 0, [Validators.required]],
       importantProject: [this.eduTextbook?.get('importantProject') || '', [Validators.required]],
-      importantProjectOther: [this.eduTextbook?.get('importantProjectOther') || '', [Validators.required]],
+      importantProjectOther: [this.eduTextbook?.get('importantProjectOther') || ''],
       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]],
-      // remember: [true],
     });
+    this.onChangeRadio()
   }
   //校验其他省部级及以上项目是否需填
   onChangeRadio(){

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

@@ -157,7 +157,7 @@ export class TextbookPertainComponent implements OnInit {
         ],
       });
       this.authorList = this.eduTextbook.get('authorList') || this.authorList
-      this.achievementOptions = this.eduTextbook.get('achievementOptions') || this.authorList
+      this.achievementOptions = this.eduTextbook.get('achievementOptions') || this.achievementOptions
     }
   }
   async submitForm(event?: string): Promise<void> {

+ 2 - 2
projects/textbook/src/schemas/EduTextbook.ts

@@ -14,7 +14,7 @@ export const EduTextbook:ParseSchema = {
             name:"编辑",
             place:"item",
             show:(options:{object:Parse.Object})=>{
-                if(location?.pathname=='/nav-author/manage/space'){
+                if(location?.pathname=='/nav-author/manage/space' && !options.object.get('render')){
                     return true
                 }
                 return false
@@ -53,7 +53,7 @@ export const EduTextbook:ParseSchema = {
             name:"删除",
             place:"item",
             show:(options:{object:Parse.Object})=>{
-                if(location?.pathname=='/nav-author/manage/space'){
+                if(location?.pathname=='/nav-author/manage/space' && !options.object.get('render')){
                     return true
                 }
                 return false