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_menus = `/scm/cuc/cuc/functionInfo/getUserHaveFunctionsList`;
|
||||
public $api_get_current_user_menus = `/api/mdc/cuc/functionInfo/getUserHaveFunctionsList`;
|
||||
|
||||
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 menuData = this.httpClient
|
||||
// .post(this.coreSrv.$api_get_current_user_menus, {
|
||||
// appId: this.coreSrv.envSrv.getEnvironment().appId
|
||||
// })
|
||||
// .pipe(map((res: any) => res.data));
|
||||
const menuData = this.httpClient.get('assets/mocks/menu-data.json').pipe(map((res: any) => res.data.menu));
|
||||
const menuData = this.httpClient
|
||||
.post(this.coreSrv.$api_get_current_user_menus, {
|
||||
appId: this.coreSrv.envSrv.getEnvironment().appId
|
||||
})
|
||||
.pipe(
|
||||
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);
|
||||
}
|
||||
|
||||
@ -8,14 +8,14 @@
|
||||
</ng-template>
|
||||
<ng-template #mainLink let-i>
|
||||
<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">
|
||||
<em>{{ i.badge }}</em>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #subLink let-i>
|
||||
<a *ngIf="!i.externalLink" [routerLink]="i.link" [target]="i.target">{{ i.text }} </a>
|
||||
<a *ngIf="i.externalLink" [attr.href]="i.externalLink" [attr.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.title }} </a>
|
||||
</ng-template>
|
||||
<ul *ngIf="menus" nz-menu [nzMode]="mode" [nzTheme]="pro.theme"
|
||||
[nzInlineCollapsed]="pro.isMobile ? false : pro.collapsed">
|
||||
@ -36,7 +36,7 @@
|
||||
<ng-template #l1TitleTpl>
|
||||
<span title class="alain-pro__menu-title">
|
||||
<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">
|
||||
<em>{{ l1.badge }}</em>
|
||||
</div>
|
||||
@ -49,7 +49,7 @@
|
||||
(click)="closeCollapsed()">
|
||||
<ng-template [ngTemplateOutlet]="subLink" [ngTemplateOutletContext]="{ $implicit: l2 }"></ng-template>
|
||||
</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)">
|
||||
<ul>
|
||||
<ng-container *ngFor="let l3 of l2.children">
|
||||
|
||||
@ -78,12 +78,12 @@ export class DriverAccountComponent implements OnInit {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
name: {
|
||||
userName: {
|
||||
type: 'string',
|
||||
title: '司机姓名',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
idNo: {
|
||||
certificateNumber: {
|
||||
type: 'string',
|
||||
title: '证件号码',
|
||||
ui: { placeholder: '请输入' }
|
||||
|
||||
@ -89,7 +89,7 @@ export class FreightAccountComponent implements OnInit {
|
||||
title: '企业名称',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
name: {
|
||||
userName: {
|
||||
type: 'string',
|
||||
title: '联系人',
|
||||
ui: { placeholder: '请输入' }
|
||||
|
||||
@ -52,7 +52,7 @@ export class ApiAuthComponent implements OnInit {
|
||||
this.listOfMapData.forEach(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 [nzIndentSize]="item.level! * 20" [nzShowExpand]="!!item.children" [(nzExpand)]="item.expand"
|
||||
(nzExpandChange)="service.collapse(mapOfExpandedData[data.key], item, $event)">
|
||||
{{ item.text }}
|
||||
{{ item.title }}
|
||||
</td>
|
||||
<td>{{ item.keyCode }}</td>
|
||||
<td>{{ item.link }}</td>
|
||||
|
||||
@ -33,7 +33,7 @@ export class MenuModalComponent implements OnInit {
|
||||
initSF(data?: any) {
|
||||
this.schema = {
|
||||
properties: {
|
||||
text: {
|
||||
title: {
|
||||
title: '菜单名称',
|
||||
type: 'string',
|
||||
default: this.formData.text,
|
||||
@ -99,7 +99,7 @@ export class MenuModalComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['text']
|
||||
required: ['title']
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
@ -137,10 +137,9 @@ export class MenuModalComponent implements OnInit {
|
||||
shortcut: 0,
|
||||
hideInBreadcrumb: 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 => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success(this.formData.id ? '修改菜单成功' : '新增菜单成功');
|
||||
|
||||
Reference in New Issue
Block a user