edit
This commit is contained in:
@ -22,7 +22,7 @@ export class CoreService {
|
|||||||
public $api_get_current_user_info = `/scm/cuc/cuc/user/getUserDetail`;
|
public $api_get_current_user_info = `/scm/cuc/cuc/user/getUserDetail`;
|
||||||
|
|
||||||
// 获取当前用户所拥有的菜单
|
// 获取当前用户所拥有的菜单
|
||||||
public $api_get_current_user_menus = `/scm/cuc/cuc/functionInfo/getUserHaveFunctionsList`;
|
public $api_get_current_user_menus = `/api/mdc/cuc/functionInfo/getUserHaveFunctionsList`;
|
||||||
|
|
||||||
position = { lat: '', lng: '' };
|
position = { lat: '', lng: '' };
|
||||||
|
|
||||||
|
|||||||
@ -133,12 +133,18 @@ export class StartupService {
|
|||||||
const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token, {}).pipe(map((res: any) => res.data));
|
const userData = this.httpClient.post(this.userSrv.$api_get_user_by_token, {}).pipe(map((res: any) => res.data));
|
||||||
|
|
||||||
// 菜单数据
|
// 菜单数据
|
||||||
// const menuData = this.httpClient
|
const menuData = this.httpClient
|
||||||
// .post(this.coreSrv.$api_get_current_user_menus, {
|
.post(this.coreSrv.$api_get_current_user_menus, {
|
||||||
// appId: this.coreSrv.envSrv.getEnvironment().appId
|
appId: this.coreSrv.envSrv.getEnvironment().appId
|
||||||
// })
|
})
|
||||||
// .pipe(map((res: any) => res.data));
|
.pipe(
|
||||||
const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu));
|
map((res: any) => {
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
|
return res.data;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
// const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu));
|
||||||
|
|
||||||
return zip(appData, userData, menuData);
|
return zip(appData, userData, menuData);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,14 +8,14 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #mainLink let-i>
|
<ng-template #mainLink let-i>
|
||||||
<ng-template [ngTemplateOutlet]="icon" [ngTemplateOutletContext]="{ $implicit: i.icon }"></ng-template>
|
<ng-template [ngTemplateOutlet]="icon" [ngTemplateOutletContext]="{ $implicit: i.icon }"></ng-template>
|
||||||
<span class="alain-pro__menu-title-text" *ngIf="!pro.onlyIcon">{{ i.text }}</span>
|
<span class="alain-pro__menu-title-text" *ngIf="!pro.onlyIcon">{{ i.title }}</span>
|
||||||
<div *ngIf="i.badge" class="alain-pro__menu-title-badge">
|
<div *ngIf="i.badge" class="alain-pro__menu-title-badge">
|
||||||
<em>{{ i.badge }}</em>
|
<em>{{ i.badge }}</em>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #subLink let-i>
|
<ng-template #subLink let-i>
|
||||||
<a *ngIf="!i.externalLink" [routerLink]="i.link" [target]="i.target">{{ i.text }} </a>
|
<a *ngIf="!i.externalLink" [routerLink]="i.link" [target]="i.target">{{ i.title }} </a>
|
||||||
<a *ngIf="i.externalLink" [attr.href]="i.externalLink" [attr.target]="i.target">{{ i.text }} </a>
|
<a *ngIf="i.externalLink" [attr.href]="i.externalLink" [attr.target]="i.target">{{ i.title }} </a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ul *ngIf="menus" nz-menu [nzMode]="mode" [nzTheme]="pro.theme"
|
<ul *ngIf="menus" nz-menu [nzMode]="mode" [nzTheme]="pro.theme"
|
||||||
[nzInlineCollapsed]="pro.isMobile ? false : pro.collapsed">
|
[nzInlineCollapsed]="pro.isMobile ? false : pro.collapsed">
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<ng-template #l1TitleTpl>
|
<ng-template #l1TitleTpl>
|
||||||
<span title class="alain-pro__menu-title">
|
<span title class="alain-pro__menu-title">
|
||||||
<ng-template [ngTemplateOutlet]="icon" [ngTemplateOutletContext]="{ $implicit: l1.icon }"></ng-template>
|
<ng-template [ngTemplateOutlet]="icon" [ngTemplateOutletContext]="{ $implicit: l1.icon }"></ng-template>
|
||||||
<span class="alain-pro__menu-title-text" *ngIf="pro.isMobile || !pro.onlyIcon">{{ l1.text }}</span>
|
<span class="alain-pro__menu-title-text" *ngIf="pro.isMobile || !pro.onlyIcon">{{ l1.title }}</span>
|
||||||
<div *ngIf="l1.badge" class="alain-pro__menu-title-badge">
|
<div *ngIf="l1.badge" class="alain-pro__menu-title-badge">
|
||||||
<em>{{ l1.badge }}</em>
|
<em>{{ l1.badge }}</em>
|
||||||
</div>
|
</div>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
(click)="closeCollapsed()">
|
(click)="closeCollapsed()">
|
||||||
<ng-template [ngTemplateOutlet]="subLink" [ngTemplateOutletContext]="{ $implicit: l2 }"></ng-template>
|
<ng-template [ngTemplateOutlet]="subLink" [ngTemplateOutletContext]="{ $implicit: l2 }"></ng-template>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="!l2._hidden && l2.children!.length > 0" nz-submenu [nzTitle]="l2.text!" [nzOpen]="l2._open"
|
<li *ngIf="!l2._hidden && l2.children!.length > 0" nz-submenu [nzTitle]="l2.title!" [nzOpen]="l2._open"
|
||||||
[nzDisabled]="l2.disabled" (nzOpenChange)="openChange(l2, $event)">
|
[nzDisabled]="l2.disabled" (nzOpenChange)="openChange(l2, $event)">
|
||||||
<ul>
|
<ul>
|
||||||
<ng-container *ngFor="let l3 of l2.children">
|
<ng-container *ngFor="let l3 of l2.children">
|
||||||
|
|||||||
@ -78,12 +78,12 @@ export class DriverAccountComponent implements OnInit {
|
|||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: {
|
userName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '司机姓名',
|
title: '司机姓名',
|
||||||
ui: { placeholder: '请输入' }
|
ui: { placeholder: '请输入' }
|
||||||
},
|
},
|
||||||
idNo: {
|
certificateNumber: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '证件号码',
|
title: '证件号码',
|
||||||
ui: { placeholder: '请输入' }
|
ui: { placeholder: '请输入' }
|
||||||
|
|||||||
@ -89,7 +89,7 @@ export class FreightAccountComponent implements OnInit {
|
|||||||
title: '企业名称',
|
title: '企业名称',
|
||||||
ui: { placeholder: '请输入' }
|
ui: { placeholder: '请输入' }
|
||||||
},
|
},
|
||||||
name: {
|
userName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '联系人',
|
title: '联系人',
|
||||||
ui: { placeholder: '请输入' }
|
ui: { placeholder: '请输入' }
|
||||||
|
|||||||
@ -52,7 +52,7 @@ export class ApiAuthComponent implements OnInit {
|
|||||||
this.listOfMapData.forEach(item => {
|
this.listOfMapData.forEach(item => {
|
||||||
this.mapOfExpandedData[item.key] = this.service.convertTreeToList(item);
|
this.mapOfExpandedData[item.key] = this.service.convertTreeToList(item);
|
||||||
});
|
});
|
||||||
console.log(this.listOfMapData, this.mapOfExpandedData);
|
// console.log(this.listOfMapData, this.mapOfExpandedData);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,7 +70,7 @@
|
|||||||
<!-- <td nzWidth="70px" nzAlign="center" [nzChecked]="item.checked">{{ i+1 }}</td> -->
|
<!-- <td nzWidth="70px" nzAlign="center" [nzChecked]="item.checked">{{ i+1 }}</td> -->
|
||||||
<td [nzIndentSize]="item.level! * 20" [nzShowExpand]="!!item.children" [(nzExpand)]="item.expand"
|
<td [nzIndentSize]="item.level! * 20" [nzShowExpand]="!!item.children" [(nzExpand)]="item.expand"
|
||||||
(nzExpandChange)="service.collapse(mapOfExpandedData[data.key], item, $event)">
|
(nzExpandChange)="service.collapse(mapOfExpandedData[data.key], item, $event)">
|
||||||
{{ item.text }}
|
{{ item.title }}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ item.keyCode }}</td>
|
<td>{{ item.keyCode }}</td>
|
||||||
<td>{{ item.link }}</td>
|
<td>{{ item.link }}</td>
|
||||||
|
|||||||
@ -33,7 +33,7 @@ export class MenuModalComponent implements OnInit {
|
|||||||
initSF(data?: any) {
|
initSF(data?: any) {
|
||||||
this.schema = {
|
this.schema = {
|
||||||
properties: {
|
properties: {
|
||||||
text: {
|
title: {
|
||||||
title: '菜单名称',
|
title: '菜单名称',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: this.formData.text,
|
default: this.formData.text,
|
||||||
@ -99,7 +99,7 @@ export class MenuModalComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
required: ['text']
|
required: ['title']
|
||||||
};
|
};
|
||||||
this.ui = {
|
this.ui = {
|
||||||
'*': {
|
'*': {
|
||||||
@ -137,10 +137,9 @@ export class MenuModalComponent implements OnInit {
|
|||||||
shortcut: 0,
|
shortcut: 0,
|
||||||
hideInBreadcrumb: 0,
|
hideInBreadcrumb: 0,
|
||||||
functionType: 0,
|
functionType: 0,
|
||||||
sortId: this.sf.value.sortId?.toString() || null
|
sortId: this.sf.value.sortId?.toString() || null,
|
||||||
|
text: this.sf.value.title
|
||||||
};
|
};
|
||||||
console.log(params);
|
|
||||||
|
|
||||||
this.service.request(this.service.$api_add_one, params).subscribe(res => {
|
this.service.request(this.service.$api_add_one, params).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success(this.formData.id ? '修改菜单成功' : '新增菜单成功');
|
this.service.msgSrv.success(this.formData.id ? '修改菜单成功' : '新增菜单成功');
|
||||||
|
|||||||
Reference in New Issue
Block a user