apps sortindex

This commit is contained in:
MaxKey 2022-12-22 09:54:43 +08:00
parent c20c79f3f4
commit 747aa70225
3 changed files with 156 additions and 162 deletions

View File

@ -6,60 +6,44 @@
<nz-form-item>
<nz-form-label nzFor="appName">{{ 'mxk.apps.name' | i18n }}</nz-form-label>
<nz-form-control>
<input
nz-input
[(ngModel)]="query.params.appName"
[ngModelOptions]="{ standalone: true }"
name="appName"
placeholder=""
id="appName"
/>
<input nz-input [(ngModel)]="query.params.appName" [ngModelOptions]="{ standalone: true }" name="appName"
placeholder="" id="appName" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="query.expandForm ? 24 : 10" [class.text-right]="query.expandForm">
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
<button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' | i18n }}</button>
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
i18n }}</button>
<button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' |
i18n }}</button>
<button nz-button (click)="query.expandForm = !query.expandForm" class="mx-sm" style="display: none">
{{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button
>
{{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button>
<button nz-button nzType="primary" (click)="onSubmit($event)">{{ 'mxk.text.confirm' | i18n }}</button>
</div>
</div>
</form>
<nz-table
#dynamicTable
nzTableLayout="auto"
nzBordered
nzShowSizeChanger
[nzData]="query.results.rows"
[nzFrontPagination]="false"
[nzTotal]="query.results.records"
[nzPageSizeOptions]="query.params.pageSizeOptions"
[nzPageSize]="query.params.pageSize"
[nzPageIndex]="query.params.pageNumber"
[nzLoading]="this.query.tableLoading"
(nzQueryParams)="onQueryParamsChange($event)"
nzWidth="100%"
>
<nz-table #dynamicTable nzTableLayout="auto" nzBordered nzShowSizeChanger [nzData]="query.results.rows"
[nzFrontPagination]="false" [nzTotal]="query.results.records" [nzPageSizeOptions]="query.params.pageSizeOptions"
[nzPageSize]="query.params.pageSize" [nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
(nzQueryParams)="onQueryParamsChange($event)" nzWidth="100%">
<thead>
<tr>
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
(nzCheckedChange)="onTableAllChecked($event)"></th>
<th nzAlign="center" style="display: none">Id</th>
<th nzAlign="center">{{ 'mxk.apps.icon' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.apps.name' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.apps.category' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.text.sortIndex' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of query.results.rows">
<td
[nzChecked]="query.tableCheckedId.has(data.id)"
[nzDisabled]="data.disabled"
(nzCheckedChange)="onTableItemChecked(data.id, $event)"
></td>
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
<td nzAlign="center"><img height="30" border="0px" src="{{ data.iconBase64 }}" /></td>
<td nzAlign="left"> {{ data.appName }}</td>
<td nzAlign="left">
@ -92,6 +76,9 @@
<div *ngIf="data.category == '1911'">{{ 'mxk.apps.category.1911' | i18n }}</div>
<div *ngIf="data.category == '1912'">{{ 'mxk.apps.category.1912' | i18n }}</div>
</td>
<td nzAlign="left"> {{ data.sortIndex }}</td>
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
style="color: green"></i></td>
</tr>
</tbody>
</nz-table>

View File

@ -81,6 +81,7 @@
<th nzAlign="center">{{ 'mxk.apps.name' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.apps.protocol' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.apps.category' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.text.sortIndex' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
<th nzAlign="center" class="table_cell_action_2">{{ 'mxk.text.action' | i18n }}</th>
</tr>
@ -126,11 +127,13 @@
<div *ngIf="data.category == '1911'">{{ 'mxk.apps.category.1911' | i18n }}</div>
<div *ngIf="data.category == '1912'">{{ 'mxk.apps.category.1912' | i18n }}</div>
</td>
<td nzAlign="left"> {{ data.sortIndex }}</td>
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
style="color: green"></i></td>
<td nzAlign="center" nzBreakWord="false">
<div nz-col>
<button nz-button type="button" (click)="onEdit($event, data.id, data.protocol)">{{ 'mxk.text.edit' | i18n }}</button>
<button nz-button type="button" (click)="onEdit($event, data.id, data.protocol)">{{ 'mxk.text.edit' | i18n
}}</button>
<button nz-button nz-dropdown [nzDropdownMenu]="menuMoreAction">
{{ 'mxk.text.moreaction' | i18n }}
@ -139,8 +142,7 @@
<nz-dropdown-menu #menuMoreAction="nzDropdownMenu">
<ul nz-menu>
<li nz-menu-item (click)="onResourcesMgmt($event, data.id, data.appName)">{{
'mxk.apps.resources' | i18n
<li nz-menu-item (click)="onResourcesMgmt($event, data.id, data.appName)">{{ 'mxk.apps.resources' | i18n
}}</li>
<li nz-menu-item (click)="onDelete($event, data.id)">{{ 'mxk.text.delete' | i18n }}</li>
</ul>

View File

@ -12,10 +12,10 @@
</div>
<div nz-col [nzSpan]="query.expandForm ? 24 : 10" [class.text-right]="query.expandForm">
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
i18n }}</button>
<button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' |
i18n }}</button>
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n
}}</button>
<button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' | i18n
}}</button>
<button nz-button (click)="query.expandForm = !query.expandForm" class="mx-sm" style="display: none">
{{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button>
<button nz-button nzType="primary" (click)="onSubmit($event)">{{ 'mxk.text.confirm' | i18n }}</button>
@ -33,6 +33,8 @@
<th nzAlign="center">{{ 'mxk.apps.icon' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.apps.name' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.apps.category' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.text.sortIndex' | i18n }}</th>
<th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
</tr>
</thead>
<tbody>
@ -75,6 +77,9 @@
<div *ngIf="data.category == '1911'">{{ 'mxk.apps.category.1911' | i18n }}</div>
<div *ngIf="data.category == '1912'">{{ 'mxk.apps.category.1912' | i18n }}</div>
</td>
<td nzAlign="left"> {{ data.sortIndex }}</td>
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
style="color: green"></i></td>
</tr>
</tbody>
</nz-table>