forked from dotnetcore/osharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(ng-alain):优化高级搜索,将高级搜索的弹窗与button合并到一个html
- Loading branch information
Showing
15 changed files
with
299 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
tests/web/ui/ng-alain7/src/app/routes/systems/pack/pack.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
<nz-card> | ||
<div> | ||
<button nz-button (click)="st.reload()"><i nz-icon nzType="reload" nzTheme="outline"></i>刷新</button> | ||
<app-ad-search-button [request]="request" [columns]="columns" [searchModal]="searchModal" (submited)="search($event)"></app-ad-search-button> | ||
<app-ad-search [request]="request" [columns]="columns" (submited)="search($event)"></app-ad-search> | ||
</div> | ||
<st #st [data]="readUrl" [columns]="columns" [req]="req" [res]="res" [(pi)]="request.PageCondition.PageIndex" [(ps)]="request.PageCondition.PageSize" [page]="page" size="small" | ||
[scroll]="{x:'1200px'}" multiSort (change)="change($event)" (error)="error($event)"></st> | ||
</nz-card> | ||
|
||
<!--高级搜索--> | ||
<app-ad-search #searchModal [request]="request" [columns]="columns" (submited)=search($event)></app-ad-search> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 32 additions & 66 deletions
98
tests/web/ui/ng-alain7/src/app/shared/components/ad-search/ad-search.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,32 @@ | ||
<nz-modal #modal [(nzVisible)]="visible" [nzTitle]="title" [nzClosable]="false" [nzContent]="content" [nzFooter]="footer" [nzBodyStyle]="{'max-height':'600px', 'overflow-y': 'auto'}"> | ||
<ng-template #footer> | ||
<button nz-button type="button" (click)="close()">关闭</button> | ||
<button nz-button type="button" (click)="reset()">重置</button> | ||
<button nz-button type="submit" [nzType]="'primary'" (click)="submit()">搜索</button> | ||
</ng-template> | ||
<ng-template #content> | ||
<ng-container *ngTemplateOutlet="groupTpl;context:{$implicit:group, parentGroup:null}"></ng-container> | ||
<ng-template #groupTpl let-group let-parentGroup="parentGroup"> | ||
<div class="group-box" *ngIf="group" [ngStyle]="{'background-color': group.Level%2==0?'#eee':'#fff'}"> | ||
<ng-container *ngFor="let subGroup of group.Groups"> | ||
<ng-container *ngTemplateOutlet="groupTpl;context:{$implicit:subGroup, parentGroup:group}"></ng-container> | ||
</ng-container> | ||
<ng-container *ngFor="let rule of group.Rules"> | ||
<ng-container *ngTemplateOutlet="ruleTpl;context:{$implicit:rule, group:group}"></ng-container> | ||
</ng-container> | ||
<div nz-row class="group-operate"> | ||
<nz-select [(ngModel)]="group.Operate" nzSize="small"> | ||
<nz-option *ngFor="let entry of groupOperateEntries" [nzValue]="entry.Operate" [nzLabel]="entry.Display"></nz-option> | ||
</nz-select> | ||
<button nz-button nzSize="small" (click)="addGroup(group)">增加分组</button> | ||
<button nz-button nzSize="small" (click)="addRule(group)">增加条件</button> | ||
<button nz-button nzSize="small" (click)="removeGroup(group,parentGroup)" *ngIf="group.Level>1">删除分组</button> | ||
</div> | ||
</div> | ||
</ng-template> | ||
<ng-template #ruleTpl let-rule let-group="group"> | ||
<div nz-row> | ||
<div class="rule-box"> | ||
<nz-select [(ngModel)]="rule.Field" nzSize="small" (ngModelChange)="fieldChange($event, rule)" nzPlaceHolder="选择属性" class="f-left" style="width: 100px;"> | ||
<nz-option *ngFor="let column of columns" [nzValue]="column.index" [nzLabel]="column.title"></nz-option> | ||
</nz-select> | ||
<nz-select [(ngModel)]="rule.Operate" nzSize="small" class="f-left" style="width: 105px;"> | ||
<nz-option *ngFor="let entry of rule.entries" [nzValue]="entry.Operate" [nzLabel]="entry.Display"></nz-option> | ||
</nz-select> | ||
<div class="f-left"> | ||
<ng-container [ngSwitch]="rule.control"> | ||
<ng-container *ngSwitchCase="'enum'"> | ||
<nz-select [(ngModel)]="rule.Value" nzSize="small" style="width: 120px;"> | ||
<nz-option *ngFor="let enum of rule.enums" [nzValue]="enum.value" [nzLabel]="enum.label"></nz-option> | ||
</nz-select> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="'number'"> | ||
<nz-input-number [(ngModel)]="rule.Value" nzSize="small"></nz-input-number> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="'date'"> | ||
<div style="width:200px;"> | ||
<nz-date-picker nzShowTime [(ngModel)]="rule.Value" nzFormat="yyyy-MM-dd HH:mm" nzPlaceHolder="选择时间" nzSize="small"></nz-date-picker> | ||
</div> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="'boolean'"> | ||
<nz-switch [(ngModel)]="rule.Value"></nz-switch> | ||
</ng-container> | ||
<ng-container *ngSwitchDefault> | ||
<input nz-input [(ngModel)]="rule.Value" nzSize="small" /> | ||
</ng-container> | ||
</ng-container> | ||
</div> | ||
<button nz-button (click)="removeRule(rule, group)" nzType="default" nzSize="small" nzShape="circle" class="f-left" nz-tooltip="删除条件"> | ||
<i nz-icon nzType="close" nzTheme="outline"></i> | ||
</button> | ||
</div> | ||
</div> | ||
</ng-template> | ||
</ng-template> | ||
</nz-modal> | ||
<label style="margin-left: 8px;">搜索:</label> | ||
<nz-select [(ngModel)]="rule.Field" (ngModelChange)="fieldChange($event)" style="width:100px;" nzPlaceHolder="选择属性"> | ||
<nz-option *ngFor="let column of columns" [nzLabel]="column.title" [nzValue]="column.index"></nz-option> | ||
</nz-select> | ||
<ng-container [ngSwitch]="rule.control"> | ||
<ng-container *ngSwitchCase="'enum'"> | ||
<nz-select [(ngModel)]="rule.Value" nzSize="default" style="width: 120px; margin-left: 8px;"> | ||
<nz-option *ngFor="let enum of rule.enums" [nzValue]="enum.value" [nzLabel]="enum.label"></nz-option> | ||
</nz-select> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="'number'"> | ||
<nz-input-number [(ngModel)]="rule.Value" nzSize="default" style="margin-left: 8px;"></nz-input-number> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="'date'"> | ||
<div style="width:200px;"> | ||
<nz-date-picker nzShowTime [(ngModel)]="rule.Value" nzFormat="yyyy-MM-dd HH:mm" nzPlaceHolder="选择时间" nzSize="default" style="margin-left:8px; width:190px;"></nz-date-picker> | ||
</div> | ||
</ng-container> | ||
<ng-container *ngSwitchCase="'boolean'"> | ||
<nz-switch [(ngModel)]="rule.Value"></nz-switch> | ||
</ng-container> | ||
<ng-container *ngSwitchDefault> | ||
<input nz-input [(ngModel)]="rule.Value" style="width:150px;margin-left: 8px;" placeholder="搜索字符串"> | ||
</ng-container> | ||
</ng-container> | ||
<nz-dropdown-button (nzClick)="search()" style="margin-left: 8px;"> <i nz-icon type="search" theme="outline"></i> 搜索 | ||
<ul nz-menu> | ||
<li nz-menu-item (click)="adSearch()"><i nz-icon type="search" theme="outline"></i>高级搜索</li> | ||
<li nz-menu-item (click)="reset()"><i nz-icon type="reload" theme="outline"></i>重置</li> | ||
</ul> | ||
</nz-dropdown-button> | ||
<app-ad-search-modal #searchModal [request]="request" [columns]="columns" (submited)=adSearchSubmited($event)></app-ad-search-modal> |
Oops, something went wrong.