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"> |
||||
<ng-template #titleTemplate> |
||||
<div> |
||||
{{item.title}} |
||||
<i |
||||
class="tab-remove-btn" |
||||
nz-icon nzType="close" |
||||
nzTheme="outline" |
||||
(click)="closeTab(item.path)" |
||||
></i> |
||||
</div> |
||||
</ng-template> |
||||
</nz-tab> |
||||
|
||||
|
||||
<nz-tabset [(nzSelectedIndex)]="activatedMenuIndex" nzType="editable-card" nzHideAdd (nzClose)="closeTab($event)"> |
||||
<nz-tab *ngFor="let tab of tabs; let i = index" [nzClosable]="i > 0" (nzSelect)="toggleTab(tab.path)" [nzTitle]="tab.title"></nz-tab> |
||||
</nz-tabset> |
||||
<nz-card [nzBordered]="false" [nzBodyStyle]="{ padding: '12px'}"> |
||||
<router-outlet></router-outlet> |
||||
</div> |
||||
</nz-card> |
||||
|
||||
|
@ -1,2 +1 @@ |
||||
首页 |
||||
<div style="width: 100%; height: calc(100vh - 134px);"></div> |
||||
<p>首页</p> |
||||
|
@ -1,29 +1,88 @@ |
||||
<div nz-row [nzGutter]="16"> |
||||
|
||||
<!-- |
||||
<div nz-col nzSpan="12"> |
||||
<nz-card nzTitle="系统菜单"> |
||||
<nz-tree |
||||
nzBlockNode |
||||
[nzData]="menuData" |
||||
|
||||
[nzTreeTemplate]="nzTreeTemplate" |
||||
[nzData]="menuTree" |
||||
[nzShowLine]="true" |
||||
[nzExpandAll]="true" |
||||
(nzClick)="clickNode($event)" |
||||
[nzMultiple]="false" |
||||
></nz-tree> |
||||
<ng-template #nzTreeTemplate let-node let-origin="origin"> |
||||
<!–<span class="custom-node"> |
||||
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)"> |
||||
<span nz-icon [nzType]="node.isExpanded ? 'folder-open' : 'folder'" (click)="openFolder(node)"></span> |
||||
<span class="folder-name">{{ node.title }}</span> |
||||
<span class="folder-desc">created by {{ origin.author | lowercase }}</span> |
||||
</span> |
||||
<span *ngIf="node.isLeaf" (contextmenu)="contextMenu($event, menu)"> |
||||
<span nz-icon nzType="file"></span> |
||||
<span class="file-name">{{ node.title }}</span> |
||||
<span class="file-desc">modified by {{ origin.author | lowercase }}</span> |
||||
</span> |
||||
</span>–> |
||||
</nz-card> |
||||
</div> |
||||
|
||||
<div nz-col nzSpan="12"> |
||||
<nz-card nzTitle="菜单详情" [nzExtra]="extraTemplate" [nzBodyStyle]="{ padding: '0px'}"> |
||||
<nz-descriptions nzBordered |
||||
nzLayout="vertical" |
||||
[nzSize]="'small'" |
||||
[nzColumn]="{ xxl: 2, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }" |
||||
> |
||||
<nz-descriptions-item nzTitle="父级菜单">{{menuDetail.parentMenu?menuDetail.parentMenu.menuName:'无'}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="菜单名称">{{menuDetail.menuName?menuDetail.menuName:'无'}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="菜单类型">{{menuDetail.menuType| menuType}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="菜单URL">{{menuDetail.menuUrl?menuDetail.menuUrl:'无'}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="菜单图标">{{menuDetail.name?menuDetail.name:'无'}}</nz-descriptions-item> |
||||
<nz-descriptions-item nzTitle="菜单描述">{{menuDetail.menuDesc?menuDetail.menuDesc:'无'}}</nz-descriptions-item> |
||||
</nz-descriptions> |
||||
</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> |
||||
<nz-dropdown-menu #menu="nzDropdownMenu"> |
||||
<ul nz-menu> |
||||
<!– <li nz-menu-item (click)="selectDropdown()">Action 1</li> |
||||
<li nz-menu-item (click)="selectDropdown()">Action 2</li>–> |
||||
</ul> |
||||
</nz-dropdown-menu> |
||||
--> |
||||
</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