xll 2 meses atrás
pai
commit
b7cd3f9292

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

@@ -277,7 +277,7 @@
     </p>
     }
     }
-    <app-comp-upload [type]="'pdf'" [width]="320" [maxlenght]="99" (change)="upload($event, 'moreMaterial')"
+    <app-comp-upload [files]="moreMaterial" [type]="'pdf'" [width]="320" [maxlenght]="99" (change)="upload($event, 'moreMaterial')"
       title="上传文件"></app-comp-upload>
 
     <div class="text upText" style="margin: 10px 0">

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

@@ -365,7 +365,10 @@ export class AttachmentComponent implements OnInit {
     return isComplete;
   }
   upload(e: any, type: string, index?: any) {
+    console.log('上传材料发生改变')
     let file = e[(e?.length - 1) || 0];
+    console.log(e)
+    console.log(this.moreMaterial)
     if (type == 'copyrightImgUrl' || type == 'CIPImgUrl') {
       this[type] = file?.url
     } else if (type == 'selfResults' || type == 'expertOpinion' ||
@@ -373,7 +376,8 @@ export class AttachmentComponent implements OnInit {
       this[type].url = file?.url
       this[type].name = file?.name
     } else if (type == 'moreMaterial'  ) {
-      this[type] = [...(this[type] || []), { name: file.name, url: file.url }]
+      // this[type] = [...(this[type] || []), { name: file?.name, url: file?.url }]
+      this[type] = e
     }else if (type == 'signature' || type == 'examine') {
       this.authorList[index][type] = file?.url
     }else if(type == 'cipProveFile'){

+ 2 - 0
projects/textbook/src/modules/nav-author/components/textbook-content/textbook-content.component.html

@@ -52,6 +52,7 @@
             <textarea
               style="min-height: 260px"
               rows="4"
+              maxlength="1000"
               formControlName="innovateExplain"
               placeholder="请输入本教材与同类教材相比较,突出的特色及改革创新点"
               nz-input
@@ -70,6 +71,7 @@
         >
           <nz-textarea-count [nzMaxCharacterCount]="1000">
             <textarea
+            maxlength="1000"
               style="min-height: 260px"
               rows="4"
               formControlName="influence"