فهرست منبع

资源管理无法添加资源 #I7EPYO

MaxKey 1 سال پیش
والد
کامیت
5b80acae2d

+ 4 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/resources/resource-editer/resource-editer.component.ts

@@ -41,6 +41,8 @@ import { ResourcesService } from '../../../../service/resources.service';
 })
 export class ResourceEditerComponent implements OnInit {
   @Input() id?: String;
+  @Input() appId?: String;
+  @Input() appName?: String;
   @Input() parentNode?: NzTreeNode;
   @Input() isEdit?: boolean;
 
@@ -71,6 +73,8 @@ export class ResourceEditerComponent implements OnInit {
       });
     } else {
       if (this.parentNode) {
+        this.form.model.appId = this.appId || '';
+        this.form.model.appName = this.appName || '';
         this.form.model.parentId = this.parentNode?.key;
         this.form.model.parentName = this.parentNode?.title;
       }

+ 3 - 1
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/resources/resources.component.ts

@@ -149,7 +149,9 @@ export class ResourcesComponent implements OnInit {
       nzComponentParams: {
         isEdit: false,
         parentNode: this.treeNodes.activated,
-        id: ''
+        id: '',
+        appId: this.query.params.appId,
+        appName: this.query.params.appName
       },
       nzOnOk: () => new Promise(resolve => setTimeout(resolve, 1000))
     });