This commit is contained in:
Taric Xin
2022-01-12 13:14:15 +08:00
parent ad33c512f1
commit 673b27a935
3 changed files with 21 additions and 7 deletions

View File

@ -105,10 +105,21 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
deleteMenuByAppID(appId: string) {
this.service.request(this.service.$api_get_one, { appId }, 'POST', false).subscribe(res => {
console.log(res);
if (res) {
this.menus = res;
const menus = res.data;
console.log(this.getIds(res.data));
}
});
}
getIds(arr: Array<any>): Array<string> {
let ids: any[] = [];
arr.forEach(item => {
if (item.children?.length > 0) {
ids = [...ids, this.getIds(item.children)];
}
});
return ids;
}
}

View File

@ -21,8 +21,8 @@
<nz-card class="content-box">
<nz-tabset [nzSelectedIndex]="1">
<nz-tab nzTitle="全部" (nzClick)="selectChange(null)"></nz-tab>
<nz-tab nzTitle="待审核" (nzClick)="selectChange(0)"></nz-tab>
<nz-tab nzTitle="已审核" (nzClick)="selectChange(1)"></nz-tab>
<nz-tab nzTitle="待审核" (nzClick)="selectChange(10)"></nz-tab>
<nz-tab nzTitle="已审核" (nzClick)="selectChange(20)"></nz-tab>
</nz-tabset>
<!-- 数据列表 -->

View File

@ -22,7 +22,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
promoterModal!: any;
promotersTelephone = '';
resourceStatus: any = 0;
resourceStatus: any = 10;
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
/**
@ -30,7 +30,8 @@ export class UserCenterComponentsDriverComponent implements OnInit {
*/
get reqParams() {
const params: any = {
...(this.sf && this.sf.value)
...(this.sf && this.sf.value),
auditStatus: this.resourceStatus
};
if (this.sf?.value.effectiveDate) {
Object.assign(params, {
@ -55,7 +56,9 @@ export class UserCenterComponentsDriverComponent implements OnInit {
selectChange(e: any) {
this.resourceStatus = e;
setTimeout(() => {
this.st.load();
}, 200);
}
addPromoter(item?: any) {