edit
This commit is contained in:
@ -105,10 +105,21 @@ export class MenuManagerComponentsIndexComponent implements OnInit {
|
|||||||
deleteMenuByAppID(appId: string) {
|
deleteMenuByAppID(appId: string) {
|
||||||
this.service.request(this.service.$api_get_one, { appId }, 'POST', false).subscribe(res => {
|
this.service.request(this.service.$api_get_one, { appId }, 'POST', false).subscribe(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
if (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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,8 +21,8 @@
|
|||||||
<nz-card class="content-box">
|
<nz-card class="content-box">
|
||||||
<nz-tabset [nzSelectedIndex]="1">
|
<nz-tabset [nzSelectedIndex]="1">
|
||||||
<nz-tab nzTitle="全部" (nzClick)="selectChange(null)"></nz-tab>
|
<nz-tab nzTitle="全部" (nzClick)="selectChange(null)"></nz-tab>
|
||||||
<nz-tab nzTitle="待审核" (nzClick)="selectChange(0)"></nz-tab>
|
<nz-tab nzTitle="待审核" (nzClick)="selectChange(10)"></nz-tab>
|
||||||
<nz-tab nzTitle="已审核" (nzClick)="selectChange(1)"></nz-tab>
|
<nz-tab nzTitle="已审核" (nzClick)="selectChange(20)"></nz-tab>
|
||||||
</nz-tabset>
|
</nz-tabset>
|
||||||
|
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export class UserCenterComponentsDriverComponent implements OnInit {
|
|||||||
promoterModal!: any;
|
promoterModal!: any;
|
||||||
promotersTelephone = '';
|
promotersTelephone = '';
|
||||||
|
|
||||||
resourceStatus: any = 0;
|
resourceStatus: any = 10;
|
||||||
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,7 +30,8 @@ export class UserCenterComponentsDriverComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
get reqParams() {
|
get reqParams() {
|
||||||
const params: any = {
|
const params: any = {
|
||||||
...(this.sf && this.sf.value)
|
...(this.sf && this.sf.value),
|
||||||
|
auditStatus: this.resourceStatus
|
||||||
};
|
};
|
||||||
if (this.sf?.value.effectiveDate) {
|
if (this.sf?.value.effectiveDate) {
|
||||||
Object.assign(params, {
|
Object.assign(params, {
|
||||||
@ -55,7 +56,9 @@ export class UserCenterComponentsDriverComponent implements OnInit {
|
|||||||
|
|
||||||
selectChange(e: any) {
|
selectChange(e: any) {
|
||||||
this.resourceStatus = e;
|
this.resourceStatus = e;
|
||||||
this.st.load();
|
setTimeout(() => {
|
||||||
|
this.st.load();
|
||||||
|
}, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
addPromoter(item?: any) {
|
addPromoter(item?: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user