Browse Source

ExtendApi Image

MaxKey 2 years ago
parent
commit
df2f99088a

+ 13 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-extend-api-details-editer/app-extend-api-details-editer.component.ts

@@ -60,9 +60,9 @@ export class AppExtendApiDetailsEditerComponent implements OnInit {
     submitting: boolean;
     submitting: boolean;
     model: Apps;
     model: Apps;
   } = {
   } = {
-      submitting: false,
-      model: new Apps()
-    };
+    submitting: false,
+    model: new Apps()
+  };
 
 
   formGroup: FormGroup = new FormGroup({});
   formGroup: FormGroup = new FormGroup({});
 
 
@@ -85,12 +85,21 @@ export class AppExtendApiDetailsEditerComponent implements OnInit {
     private msg: NzMessageService,
     private msg: NzMessageService,
     @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
     private cdr: ChangeDetectorRef
     private cdr: ChangeDetectorRef
-  ) { }
+  ) {}
 
 
   ngOnInit(): void {
   ngOnInit(): void {
     if (this.isEdit) {
     if (this.isEdit) {
       this.appsExtendApiDetailsService.get(`${this.id}`).subscribe(res => {
       this.appsExtendApiDetailsService.get(`${this.id}`).subscribe(res => {
         this.form.model.init(res.data);
         this.form.model.init(res.data);
+        this.previewImage = this.form.model.iconBase64.toString();
+        this.fileList = [
+          {
+            uid: this.form.model.id.toString(),
+            name: this.form.model.appName.toString(),
+            status: 'done',
+            url: this.previewImage
+          }
+        ];
         this.initExtraAttr(res.data);
         this.initExtraAttr(res.data);
       });
       });
     } else {
     } else {