You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<app-page class="p-3">
|
|
|
|
<ng-template #actionsTpl>
|
|
|
|
<nz-space>
|
|
|
|
<button *nzSpaceItem nz-button nzType="primary" (click)="onCreate()">新建</button>
|
|
|
|
</nz-space>
|
|
|
|
</ng-template>
|
|
|
|
<div class="flex flex-1">
|
|
|
|
<div class="flex-1">
|
|
|
|
<app-server-paginated-table
|
|
|
|
[tableAction]="actionsTpl"
|
|
|
|
[options]="table"
|
|
|
|
[renderColumn]="renderColumnTpl"
|
|
|
|
[formGroup]="queryForm"
|
|
|
|
>
|
|
|
|
<ng-template #renderColumnTpl let-data let-key="key" let-row="row">
|
|
|
|
@switch (key) {
|
|
|
|
@case ('status') {
|
|
|
|
<!-- <nz-badge
|
|
|
|
[nzText]="data === 0 ? '在职' : '离职'"
|
|
|
|
[nzStatus]="data === 0 ? 'processing' : 'error'"
|
|
|
|
/> -->
|
|
|
|
}
|
|
|
|
|
|
|
|
@default {
|
|
|
|
{{ data }}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-container *appTableForm>
|
|
|
|
<app-query-item label="名称" class="w-60">
|
|
|
|
<input nz-input placeholder="请输入" formControlName="name" />
|
|
|
|
</app-query-item>
|
|
|
|
</ng-container>
|
|
|
|
</app-server-paginated-table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</app-page>
|
|
|
|
|
|
|
|
<ng-template #drawerFooterTpl>
|
|
|
|
<nz-space>
|
|
|
|
<button *nzSpaceItem nz-button nzType="primary" (click)="onConfirm()">确定</button>
|
|
|
|
<button *nzSpaceItem nz-button nzType="default" (click)="onCancel()">取消</button>
|
|
|
|
</nz-space>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #formContentTpl>
|
|
|
|
<form nz-form nzLayout="vertical" [formGroup]="createForm">
|
|
|
|
<nz-form-item>
|
|
|
|
<nz-form-label nzRequired> 名称 </nz-form-label>
|
|
|
|
<nz-form-control [nzErrorTip]="errorTpl">
|
|
|
|
<input type="text" nz-input formControlName="name" placeholder="请输入名称" />
|
|
|
|
</nz-form-control>
|
|
|
|
</nz-form-item>
|
|
|
|
</form>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #errorTpl let-control>
|
|
|
|
<form-error-tips [control]="control"></form-error-tips>
|
|
|
|
</ng-template>
|