parent
e12bb3c312
commit
634bfe0dc5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||||||
<p>sys-account works!</p> |
<p>系统账户</p> |
||||||
|
@ -1,18 +1,9 @@ |
|||||||
<div class="card-container" style="width: 100%;height: 100%"> |
|
||||||
<nz-tabset nzType="card" [(nzSelectedIndex)]="activatedMenuIndex"> |
|
||||||
<nz-tab *ngFor="let item of tabs" (nzSelect)="toggleTab(item.path)" [nzTitle]="titleTemplate"> |
<nz-tabset [(nzSelectedIndex)]="activatedMenuIndex" nzType="editable-card" nzHideAdd (nzClose)="closeTab($event)"> |
||||||
<ng-template #titleTemplate> |
<nz-tab *ngFor="let tab of tabs; let i = index" [nzClosable]="i > 0" (nzSelect)="toggleTab(tab.path)" [nzTitle]="tab.title"></nz-tab> |
||||||
<div> |
</nz-tabset> |
||||||
{{item.title}} |
<nz-card [nzBordered]="false" [nzBodyStyle]="{ padding: '12px'}"> |
||||||
<i |
<router-outlet></router-outlet> |
||||||
class="tab-remove-btn" |
</nz-card> |
||||||
nz-icon nzType="close" |
|
||||||
nzTheme="outline" |
|
||||||
(click)="closeTab(item.path)" |
|
||||||
></i> |
|
||||||
</div> |
|
||||||
</ng-template> |
|
||||||
</nz-tab> |
|
||||||
</nz-tabset> |
|
||||||
<router-outlet></router-outlet> |
|
||||||
</div> |
|
||||||
|
@ -1,2 +1 @@ |
|||||||
首页 |
<p>首页</p> |
||||||
<div style="width: 100%; height: calc(100vh - 134px);"></div> |
|
||||||
|
@ -1,29 +1,88 @@ |
|||||||
|
<div nz-row [nzGutter]="16"> |
||||||
|
|
||||||
<!-- |
<div nz-col nzSpan="12"> |
||||||
<nz-tree |
<nz-card nzTitle="系统菜单"> |
||||||
nzBlockNode |
<nz-tree |
||||||
[nzData]="menuData" |
[nzData]="menuTree" |
||||||
|
[nzShowLine]="true" |
||||||
[nzTreeTemplate]="nzTreeTemplate" |
[nzExpandAll]="true" |
||||||
></nz-tree> |
(nzClick)="clickNode($event)" |
||||||
<ng-template #nzTreeTemplate let-node let-origin="origin"> |
[nzMultiple]="false" |
||||||
<!–<span class="custom-node"> |
></nz-tree> |
||||||
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)"> |
</nz-card> |
||||||
<span nz-icon [nzType]="node.isExpanded ? 'folder-open' : 'folder'" (click)="openFolder(node)"></span> |
</div> |
||||||
<span class="folder-name">{{ node.title }}</span> |
|
||||||
<span class="folder-desc">created by {{ origin.author | lowercase }}</span> |
<div nz-col nzSpan="12"> |
||||||
</span> |
<nz-card nzTitle="菜单详情" [nzExtra]="extraTemplate" [nzBodyStyle]="{ padding: '0px'}"> |
||||||
<span *ngIf="node.isLeaf" (contextmenu)="contextMenu($event, menu)"> |
<nz-descriptions nzBordered |
||||||
<span nz-icon nzType="file"></span> |
nzLayout="vertical" |
||||||
<span class="file-name">{{ node.title }}</span> |
[nzSize]="'small'" |
||||||
<span class="file-desc">modified by {{ origin.author | lowercase }}</span> |
[nzColumn]="{ xxl: 2, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }" |
||||||
</span> |
> |
||||||
</span>–> |
<nz-descriptions-item nzTitle="父级菜单">{{menuDetail.parentMenu?menuDetail.parentMenu.menuName:'无'}}</nz-descriptions-item> |
||||||
</ng-template> |
<nz-descriptions-item nzTitle="菜单名称">{{menuDetail.menuName?menuDetail.menuName:'无'}}</nz-descriptions-item> |
||||||
<nz-dropdown-menu #menu="nzDropdownMenu"> |
<nz-descriptions-item nzTitle="菜单类型">{{menuDetail.menuType| menuType}}</nz-descriptions-item> |
||||||
<ul nz-menu> |
<nz-descriptions-item nzTitle="菜单URL">{{menuDetail.menuUrl?menuDetail.menuUrl:'无'}}</nz-descriptions-item> |
||||||
<!– <li nz-menu-item (click)="selectDropdown()">Action 1</li> |
<nz-descriptions-item nzTitle="菜单图标">{{menuDetail.name?menuDetail.name:'无'}}</nz-descriptions-item> |
||||||
<li nz-menu-item (click)="selectDropdown()">Action 2</li>–> |
<nz-descriptions-item nzTitle="菜单描述">{{menuDetail.menuDesc?menuDetail.menuDesc:'无'}}</nz-descriptions-item> |
||||||
</ul> |
</nz-descriptions> |
||||||
</nz-dropdown-menu> |
</nz-card> |
||||||
--> |
<ng-template #extraTemplate> |
||||||
|
<div nz-row [nzGutter]="12"> |
||||||
|
<div nz-col nzSpan="8"><button nz-button nzType="primary" (click)="openEditMenu()">添加</button></div> |
||||||
|
<div nz-col nzSpan="8"><button nz-button nzType="primary" (click)="openEditMenu()">修改</button></div> |
||||||
|
<div nz-col nzSpan="8"><button nz-button nzType="primary">删除</button></div> |
||||||
|
</div> |
||||||
|
</ng-template> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<nz-modal [(nzVisible)]="editMenuVisible" [nzFooter]="null" nzTitle="菜单" (nzOnCancel)=closeEditMenu()> |
||||||
|
<!-- <form nz-form [formGroup]="editMenuForm" (ngSubmit)="submitEditMenuForm()"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>菜单名称</nz-form-label> |
||||||
|
<nz-form-control [nzSm]="14" [nzXs]="24"> |
||||||
|
<input nz-input formControlName="menuName"/> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>菜单类型</nz-form-label> |
||||||
|
<nz-form-control [nzSm]="14" [nzXs]="24"> |
||||||
|
<input nz-input formControlName="menuType"/> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>菜单URL</nz-form-label> |
||||||
|
<nz-form-control [nzSm]="14" [nzXs]="24"> |
||||||
|
<input nz-input formControlName="menuUrl"/> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>菜单顺序</nz-form-label> |
||||||
|
<nz-form-control [nzSm]="14" [nzXs]="24"> |
||||||
|
<input nz-input formControlName="menuSort"/> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSm]="6" [nzXs]="24">图标URL</nz-form-label> |
||||||
|
<nz-form-control [nzSm]="14" [nzXs]="24"> |
||||||
|
<input nz-input formControlName="menuUrlImg"/> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSm]="6" [nzXs]="24">菜单描述</nz-form-label> |
||||||
|
<nz-form-control [nzSm]="14" [nzXs]="24"> |
||||||
|
<input nz-input formControlName="menuDesc"/> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
|
||||||
|
</form>--> |
||||||
|
</nz-modal> |
||||||
|
@ -0,0 +1,21 @@ |
|||||||
|
import { Pipe, PipeTransform } from '@angular/core'; |
||||||
|
|
||||||
|
@Pipe({ |
||||||
|
name: 'menuType', |
||||||
|
standalone: true |
||||||
|
}) |
||||||
|
export class MenuTypePipe implements PipeTransform { |
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
transform(value: number): string { |
||||||
|
switch (value) { |
||||||
|
case 1: |
||||||
|
return '菜单'; |
||||||
|
case 2: |
||||||
|
return '按钮'; |
||||||
|
default: |
||||||
|
return '未知'; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue