Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
		| @ -97,18 +97,32 @@ export class MenuManagerComponentsIndexComponent implements OnInit { | |||||||
|       nzTitle: '<i>删除确认</i>', |       nzTitle: '<i>删除确认</i>', | ||||||
|       nzContent: `是否确认删除?`, |       nzContent: `是否确认删除?`, | ||||||
|       nzOnOk: () => { |       nzOnOk: () => { | ||||||
|         this.deleteMenuByAppID(type === 0 ? 'A48F72F0A304427F921794BAD86B3522' : this.envSrv.env.appId); |         this.getMenuByAppID(type === 0 ? 'A48F72F0A304427F921794BAD86B3522' : this.envSrv.env.appId); | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   deleteMenuByAppID(appId: string) { |   getMenuByAppID(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; | ||||||
|  |         if (res.data?.length > 0) { | ||||||
|  |           this.deleteMenuByAppID(res.data); | ||||||
|  |         } else { | ||||||
|  |           this.service.msgSrv.success('菜单已清空'); | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   deleteMenuByAppID(arr: Array<any>) { | ||||||
|  |     let ids: any[] = arr?.map(item => item.id) || []; | ||||||
|  |     arr.forEach(item => { | ||||||
|  |       if (item.children?.length > 0) { | ||||||
|  |         this.deleteMenuByAppID(item.children); | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  |     this.service.request(this.service.$api_del_many, ids).subscribe(res => {}); | ||||||
|  |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -15,7 +15,7 @@ export class MenuManagerService extends BaseService { | |||||||
|   $api_get_one = `/api/mdc/cuc/functionInfo/getAllFunctionInfoByAppId?_allow_badcode=true`; |   $api_get_one = `/api/mdc/cuc/functionInfo/getAllFunctionInfoByAppId?_allow_badcode=true`; | ||||||
|  |  | ||||||
|   // 删除多个菜单 |   // 删除多个菜单 | ||||||
|   $api_del_many = `/scm/cuc/cuc/functionInfo/deletebatchFunctionInfo`; |   $api_del_many = `/api/mdc/cuc/functionInfo/deletebatchFunctionInfo`; | ||||||
|  |  | ||||||
|   constructor(public injector: Injector) { |   constructor(public injector: Injector) { | ||||||
|     super(injector); |     super(injector); | ||||||
|  | |||||||
| @ -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; | ||||||
|  |     setTimeout(() => { | ||||||
|       this.st.load(); |       this.st.load(); | ||||||
|  |     }, 200); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   addPromoter(item?: any) { |   addPromoter(item?: any) { | ||||||
|  | |||||||
| @ -3,7 +3,7 @@ | |||||||
|   "data": { |   "data": { | ||||||
|     "menu": [ |     "menu": [ | ||||||
|       { |       { | ||||||
|         "text": "样例", |         "text": "主导航", | ||||||
|         "hideInBreadcrumb": true, |         "hideInBreadcrumb": true, | ||||||
|         "children": [ |         "children": [ | ||||||
|           { |           { | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| { | { | ||||||
|   "menu": [ |   "menu": [ | ||||||
|     { |     { | ||||||
|       "text": "样例", |       "text": "主导航", | ||||||
|       "hideInBreadcrumb": true, |       "hideInBreadcrumb": true, | ||||||
|       "children": [ |       "children": [ | ||||||
|         { |         { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user