浏览代码

更新上传组件审查权限参数

warrior 1 月之前
父节点
当前提交
9735d0d301

+ 6 - 0
projects/textbook/src/app/comp-upload/comp-upload.component.ts

@@ -26,6 +26,8 @@ export class CompUploadComponent implements OnInit {
   @Input('size') size: number = 2048; //上传文件限制大小单位KB
 
   @Input('acl') acl: "public-read-write" | "public-read" | "private" | "default" = "default"
+  @Input('authority') authority: boolean = true; //查看权限
+
 
   get accept() {
     let type;
@@ -159,6 +161,10 @@ export class CompUploadComponent implements OnInit {
     //   (item: any) => item.url == e.url
     // );
     // let file = this.Previewfilelist[index]?.url;
+    if(!this.authority){
+      this.msg.error(`暂无查阅权限`);
+      return
+    }
     let url = e?.url
     if (!/\.(jpg|jpeg|png|GIF|JPG|PNG)$/.test(url)) {
       if(this.acl == 'private'){

+ 4 - 0
projects/textbook/src/modules/nav-admin/components/collect-textbook/collect-textbook.component.html

@@ -352,6 +352,7 @@
               #children
               [eduTextbookVolume]="panel"
               [review]="true"
+              [authority]="false"
             ></app-upload-collect>
           </div>
           <ng-template #expandedIcon let-active>
@@ -371,6 +372,7 @@
         #children
         [review]="true"
         [eduTextbookVolume]="currentTextbook?.get('childrens')[0]"
+        [authority]="false"
       ></app-upload-collect>
       }
     </div>
@@ -415,6 +417,7 @@
             <app-upload-collect
               #children
               [eduTextbookVolume]="panel"
+              [authority]="false"
             ></app-upload-collect>
           </div>
           <ng-template #expandedIcon let-active>
@@ -433,6 +436,7 @@
       <app-upload-collect
         #children
         [eduTextbookVolume]="currentTextbook?.get('childrens')[0]"
+        [authority]="false"
       ></app-upload-collect>
       }
     </div>

+ 2 - 0
projects/textbook/src/modules/nav-province-contact/components/upload-collect/upload-collect.component.html

@@ -74,6 +74,7 @@
           [size]="512000"
           [maxlenght]="10"
           [acl]="'private'"
+          [authority]="authority"
         ></app-comp-upload>
       </div>
     </div>
@@ -141,6 +142,7 @@
           [size]="512000"
           [maxlenght]="10"
           [acl]="'private'"
+          [authority]="authority"
         ></app-comp-upload>
       </div>
       }

+ 1 - 1
projects/textbook/src/modules/nav-province-contact/components/upload-collect/upload-collect.component.ts

@@ -24,7 +24,7 @@ export class UploadCollectComponent implements OnInit {
   @Input('review') review: boolean = false; //只读
   @Input('eduTextbookVolume') eduTextbookVolume: Parse.Object | undefined;
   @Output() save: EventEmitter<any> = new EventEmitter<any>();
-
+  @Input('authority') authority: boolean = true; //编辑查看权限
   collectFiles: Array<any> = []; //纸质教材PDF文件列表
   collectDigitFiles: Array<any> = []; //数字资源PDF文件列表
   collectLink: link = {