Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -41,15 +41,20 @@ export class AuthGuard extends ACLGuard {
|
||||
}
|
||||
|
||||
canActivate(route: ActivatedRouteSnapshot, _state: RouterStateSnapshot): Observable<boolean> {
|
||||
if (Object.keys(route.params)?.length > 0 || !route.routeConfig?.path) {
|
||||
return this.handle(route, _state, 1);
|
||||
} else {
|
||||
return this.handle(route, _state, 1, _state?.url);
|
||||
}
|
||||
// if (Object.keys(route.params)?.length > 0 || !route.routeConfig?.path) {
|
||||
// return super.canActivate(route, _state);
|
||||
// } else {
|
||||
// return super.canActivate(route, _state);
|
||||
// }
|
||||
return super.canActivate(route, _state);
|
||||
}
|
||||
|
||||
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
|
||||
return this.handle(childRoute, state, 2, this.settingRoute(childRoute.params, state.url));
|
||||
if (childRoute.routeConfig?.loadChildren) {
|
||||
return super.canActivateChild(childRoute, state);
|
||||
} else {
|
||||
return this.handle(childRoute, state, 2, this.settingRoute(childRoute.params, state.url));
|
||||
}
|
||||
}
|
||||
|
||||
private handle(route: ActivatedRouteSnapshot, state: RouterStateSnapshot, type: 1 | 2, router?: string): Observable<boolean> {
|
||||
@ -65,11 +70,6 @@ export class AuthGuard extends ACLGuard {
|
||||
return this.baseService.request('/api/mdc/cuc/functionButton/getUserFunctionButton', { link: router }).pipe(
|
||||
switchMap(res => {
|
||||
if (res) {
|
||||
// if (router === '/ticket/invoice-requested') {
|
||||
// this.srv1.setAbility(['TICKET-INVOICE-REQUESTED-list']);
|
||||
// } else {
|
||||
// this.srv1.setAbility(res.abilities || []);
|
||||
// }
|
||||
this.srv1.setAbility(res.abilities || []);
|
||||
this.menuService.resume();
|
||||
}
|
||||
@ -82,6 +82,12 @@ export class AuthGuard extends ACLGuard {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据参数拼接原始路由
|
||||
* @param params 参数
|
||||
* @param route 实际路由
|
||||
* @returns
|
||||
*/
|
||||
private settingRoute(params: any, route: string) {
|
||||
let _route = route;
|
||||
if (_route.indexOf('?') > -1) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div nz-dropdown [nzDropdownMenu]="userMenu" nzPlacement="bottomRight" class="alain-pro__header-item">
|
||||
<nz-avatar [nzSrc]="settings.user.avatar" nzSize="small" class="mr-sm"></nz-avatar>
|
||||
{{ settings.user.name }}
|
||||
{{ settings.user.realName }}
|
||||
</div>
|
||||
<nz-dropdown-menu #userMenu="nzDropdownMenu">
|
||||
<div nz-menu class="width-sm">
|
||||
|
||||
@ -180,7 +180,7 @@ export class FreightComponentsListComponent implements OnInit {
|
||||
{ title: '网络货运人', className: 'text-center', index: 'netTranName' },
|
||||
{ title: '常用服务', className: 'text-center', index: 'oftenUsedServices', type: 'enum', enum: { 10: '整车发货', 20: '大宗发货' } },
|
||||
{ title: '推广业务员', className: 'text-center', render: 'promotersTelephone' },
|
||||
{ title: '注册渠道', className: 'text-center', index: 'source', type: 'enum', enum: { 1: '用户注册', 2: '货主添加' } },
|
||||
{ title: '注册渠道', className: 'text-center', index: 'source', type: 'enum', enum: { 1: '货主注册', 2: '平台添加' } },
|
||||
{
|
||||
title: '企业状态',
|
||||
className: 'text-center',
|
||||
|
||||
@ -152,14 +152,13 @@ export class FreightComponentsUserComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
certificationStatus: {
|
||||
stateLocked: {
|
||||
type: 'string',
|
||||
title: '状态',
|
||||
enum: [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '待审核', value: 0 },
|
||||
{ label: '正常', value: 1 },
|
||||
{ label: '冻结', value: 2 }
|
||||
{ label: '正常', value: 0 },
|
||||
{ label: '冻结', value: 1 }
|
||||
],
|
||||
default: '',
|
||||
ui: {
|
||||
|
||||
@ -61,6 +61,7 @@
|
||||
},
|
||||
{
|
||||
"text": "货主员工详情",
|
||||
"hide": true,
|
||||
"icon": "anticon anticon-dashboard",
|
||||
"link": "/usercenter/freight/user/view/:id"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user