|
@@ -1,19 +1,18 @@
|
|
|
/*
|
|
|
* Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
|
|
|
- *
|
|
|
+ *
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
* You may obtain a copy of the License at
|
|
|
- *
|
|
|
+ *
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
- *
|
|
|
+ *
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/
|
|
|
-
|
|
|
|
|
|
import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
|
|
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|
@@ -26,6 +25,7 @@ import { NzTableQueryParams } from 'ng-zorro-antd/table';
|
|
|
|
|
|
import { AccountsService } from '../../service/accounts.service';
|
|
|
import { set2String } from '../../shared/index';
|
|
|
+import { SelectAppsComponent } from '../apps/select-apps/select-apps.component';
|
|
|
import { AccountEditerComponent } from './account-editer/account-editer.component';
|
|
|
|
|
|
@Component({
|
|
@@ -109,6 +109,26 @@ export class AccountsComponent implements OnInit {
|
|
|
|
|
|
onReset(): void { }
|
|
|
|
|
|
+ onSelect(e: MouseEvent): void {
|
|
|
+ e.preventDefault();
|
|
|
+
|
|
|
+ const modal = this.modalService.create({
|
|
|
+ nzContent: SelectAppsComponent,
|
|
|
+ nzViewContainerRef: this.viewContainerRef,
|
|
|
+ nzComponentParams: {},
|
|
|
+ nzWidth: 700,
|
|
|
+ nzOnOk: () => new Promise(resolve => setTimeout(resolve, 1000))
|
|
|
+ });
|
|
|
+ // Return a result when closed
|
|
|
+ modal.afterClose.subscribe(result => {
|
|
|
+ if (result.refresh) {
|
|
|
+ this.query.params.appName = result.data.name;
|
|
|
+ //this.query.params.appId = result.data.id;
|
|
|
+ console.log(result);
|
|
|
+ this.fetch();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
onBatchDelete(e: MouseEvent): void {
|
|
|
e.preventDefault();
|
|
|
this.accountsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|