fix bug
This commit is contained in:
		| @ -177,15 +177,6 @@ export class WithdrawalsRecordComponent { | |||||||
|             placeholder: '请输入' |             placeholder: '请输入' | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         // refundStatus: { |  | ||||||
|         //   type: 'string', |  | ||||||
|         //   title: '提现状态', |  | ||||||
|         //   ui: { |  | ||||||
|         //     widget: 'dict-select', |  | ||||||
|         //     params: { dictKey: 'refund:apply:status' }, |  | ||||||
|         //     placeholder: '请选择' |  | ||||||
|         //   } |  | ||||||
|         // }, |  | ||||||
|         createTime: { |         createTime: { | ||||||
|           title: '提现时间', |           title: '提现时间', | ||||||
|           type: 'string', |           type: 'string', | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ | |||||||
|  * @Author       : Shiming |  * @Author       : Shiming | ||||||
|  * @Date         : 2022-03-21 09:26:45 |  * @Date         : 2022-03-21 09:26:45 | ||||||
|  * @LastEditors  : Shiming |  * @LastEditors  : Shiming | ||||||
|  * @LastEditTime : 2022-04-25 15:52:41 |  * @LastEditTime : 2022-04-25 16:19:24 | ||||||
|  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts |  * @FilePath     : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.ts | ||||||
|  * Copyright (C) 2022 huzhenhong. All rights reserved. |  * Copyright (C) 2022 huzhenhong. All rights reserved. | ||||||
|  */ |  */ | ||||||
| @ -88,6 +88,8 @@ export class ParterRebateManageMentAddComponent implements OnInit { | |||||||
|     }; |     }; | ||||||
|   } |   } | ||||||
|   ngOnInit() { |   ngOnInit() { | ||||||
|  |     console.log(this.ar.snapshot); | ||||||
|  |      | ||||||
|     this.addStatus = false; |     this.addStatus = false; | ||||||
|     this.initSF(); |     this.initSF(); | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -125,7 +125,7 @@ export class ParterRebateManageMentSettingComponent implements OnInit { | |||||||
|         buttons: [ |         buttons: [ | ||||||
|           { |           { | ||||||
|             text: '查看', |             text: '查看', | ||||||
|             click: _record => this.viewEvaluate(_record), |             click: _record => this.configAction(_record), | ||||||
|           }, |           }, | ||||||
|           { |           { | ||||||
|             text: '禁用', |             text: '禁用', | ||||||
| @ -187,8 +187,8 @@ export class ParterRebateManageMentSettingComponent implements OnInit { | |||||||
|           } |           } | ||||||
|         }); |         }); | ||||||
|   } |   } | ||||||
|   configAction() { |   configAction(value?: any) { | ||||||
|     this.router.navigate(['/partner/rebate/setting/add/', 1]) |     this.router.navigate(['/partner/rebate/setting/add/', '0'], {queryParams: value}) | ||||||
|   }  |   }  | ||||||
|   /** |   /** | ||||||
|    * 重置表单 |    * 重置表单 | ||||||
|  | |||||||
| @ -62,6 +62,7 @@ export class SettingRoleEditComponent implements OnInit { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   getRoleInfo() { |   getRoleInfo() { | ||||||
|  |     this.roleInfoData = [] | ||||||
|     const params = { |     const params = { | ||||||
|       id: this.params.id |       id: this.params.id | ||||||
|     }; |     }; | ||||||
|  | |||||||
| @ -19,6 +19,7 @@ export class SettingMenuComponent implements OnInit, OnChanges { | |||||||
|   defaultCheckedKeys: any[] = []; |   defaultCheckedKeys: any[] = []; | ||||||
|   functionList: any[] = []; |   functionList: any[] = []; | ||||||
|   allChecked = false; |   allChecked = false; | ||||||
|  |   changeIFT = false; | ||||||
|   indeterminate = true; |   indeterminate = true; | ||||||
|   @Input() type = 'edit'; |   @Input() type = 'edit'; | ||||||
|   @Input() source = ''; |   @Input() source = ''; | ||||||
| @ -58,7 +59,7 @@ export class SettingMenuComponent implements OnInit, OnChanges { | |||||||
|       }); |       }); | ||||||
|   } |   } | ||||||
|   addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) { |   addAuthority(origin: { id: any; all: any }, node: { buttonInfoList: any[] }, item?: { checked: any; functionButtonId: any }) { | ||||||
|     console.log(origin,node); |     console.log(origin); | ||||||
|      |      | ||||||
|     if (this.authority?.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) { |     if (this.authority?.length && this.authority.filter(authItem => authItem.authorityId === origin.id).length) { | ||||||
|       // 判断此菜单权限是否已经存在权限列表中 |       // 判断此菜单权限是否已经存在权限列表中 | ||||||
| @ -69,6 +70,23 @@ export class SettingMenuComponent implements OnInit, OnChanges { | |||||||
|           menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型 |           menuItem.buttonAuthorityIds = menuItem.buttonAuthorityIds || []; // 防止属性不存在,给属性指定数据类型 | ||||||
|           if (item) { |           if (item) { | ||||||
|             this.changeIF.emit(true); |             this.changeIF.emit(true); | ||||||
|  |             this.changeIFT = true | ||||||
|  |               // 判断此菜单下是否已有此按钮权限 | ||||||
|  |             // this.againGetBtn(id, origin); | ||||||
|  |             const params = { | ||||||
|  |               id: origin.id | ||||||
|  |             }; | ||||||
|  |             this.service.request(this.service.$api_getFunctionButtonInfo, params).subscribe(res => { | ||||||
|  |               if (res) { | ||||||
|  |                 let origins: any = {};  | ||||||
|  |                 origins.buttonInfoList = res; | ||||||
|  |                 origins.all = false; | ||||||
|  |                 console.log(origins); | ||||||
|  |                  | ||||||
|  |                 // 判断此菜单下是否已有此按钮权限 | ||||||
|  |                 this.againGetBtn(origin.id, origins); | ||||||
|  |               } | ||||||
|  |             }); | ||||||
|             // 单选 |             // 单选 | ||||||
|             if (item.checked) { |             if (item.checked) { | ||||||
|               if (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) { |               if (menuItem.buttonAuthorityIds.indexOf(item.functionButtonId) === -1) { | ||||||
| @ -329,7 +347,12 @@ export class SettingMenuComponent implements OnInit, OnChanges { | |||||||
|   } |   } | ||||||
|   // 再次请求,需要判断暂存权限数组是否已有此权限 |   // 再次请求,需要判断暂存权限数组是否已有此权限 | ||||||
|   againGetBtn(id: any, origin: any) { |   againGetBtn(id: any, origin: any) { | ||||||
|     if (this.authority && this.authority.length !== 0) { |     console.log(id,origin); | ||||||
|  |      | ||||||
|  |     console.log(this.authority); | ||||||
|  |     console.log(this.authority.length); | ||||||
|  |      | ||||||
|  |     if ((this.authority && this.authority.length !== 0)) { | ||||||
|       console.log('1111'); |       console.log('1111'); | ||||||
|        |        | ||||||
|       const buttonAuthorityIds: any = []; |       const buttonAuthorityIds: any = []; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user