mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 17:08:29 +08:00
Compare commits
3 Commits
0809627a2e
...
e715bca178
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e715bca178 | ||
|
|
1459f0fc8b | ||
|
|
1005df51b8 |
@ -8,23 +8,39 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="groupName">{{ 'mxk.groups.name' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="groupQuery.params.groupName" [ngModelOptions]="{ standalone: true }"
|
||||
name="groupName" placeholder="" id="groupName" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="groupQuery.params.groupName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="groupName"
|
||||
placeholder=""
|
||||
id="groupName"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8" [class.text-right]="groupQuery.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="groupQuery.submitLoading">{{
|
||||
'mxk.text.query' | i18n
|
||||
}}</button>
|
||||
}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</nz-card>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
||||
[nzData]="groupQuery.results.rows" [nzFrontPagination]="false" [nzTotal]="groupQuery.results.records"
|
||||
[nzPageSizeOptions]="groupQuery.params.pageSizeOptions" [nzPageSize]="groupQuery.params.pageSize"
|
||||
[nzPageIndex]="groupQuery.params.pageNumber" [nzLoading]="this.groupQuery.tableLoading"
|
||||
(nzQueryParams)="onGroupQueryParamsChange($event)">
|
||||
<nz-table
|
||||
#dynamicTable
|
||||
nzTableLayout="auto"
|
||||
nzSize="small"
|
||||
nzBordered
|
||||
nzShowSizeChanger
|
||||
[nzData]="groupQuery.results.rows"
|
||||
[nzFrontPagination]="false"
|
||||
[nzTotal]="groupQuery.results.records"
|
||||
[nzPageSizeOptions]="groupQuery.params.pageSizeOptions"
|
||||
[nzPageSize]="groupQuery.params.pageSize"
|
||||
[nzPageIndex]="groupQuery.params.pageNumber"
|
||||
[nzLoading]="this.groupQuery.tableLoading"
|
||||
(nzQueryParams)="onGroupQueryParamsChange($event)"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
@ -35,8 +51,11 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let data of groupQuery.results.rows">
|
||||
<td [nzChecked]="groupQuery.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
||||
(nzCheckedChange)="onGroupTableItemChecked(data.id, data.groupName, $event)"></td>
|
||||
<td
|
||||
[nzChecked]="groupQuery.tableCheckedId.has(data.id)"
|
||||
[nzDisabled]="data.disabled"
|
||||
(nzCheckedChange)="onGroupTableItemChecked(data.id, data.groupName, $event)"
|
||||
></td>
|
||||
<td nzAlign="left" style="display: none">
|
||||
<span>{{ data.id }}</span>
|
||||
</td>
|
||||
@ -55,26 +74,37 @@
|
||||
<div nz-col nzMd="10" nzSm="24">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="roleName">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
||||
<input nz-input [(ngModel)]="query.params.groupName" [ngModelOptions]="{ standalone: true }" readonly
|
||||
placeholder="" disabled />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.groupName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
readonly
|
||||
placeholder=""
|
||||
disabled
|
||||
/>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col nzMd="10" nzSm="24">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ '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 : 4" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ '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'">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -82,25 +112,47 @@
|
||||
<nz-card [nzBordered]="false">
|
||||
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n
|
||||
}}</button>
|
||||
<button nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'" nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div nz-col nzMd="24" nzSm="24">
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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)">
|
||||
<nz-table
|
||||
#dynamicTable
|
||||
nzTableLayout="auto"
|
||||
nzSize="small"
|
||||
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)"
|
||||
>
|
||||
<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.roles.name' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.apps.icon' | i18n }}</th>
|
||||
@ -111,8 +163,11 @@
|
||||
</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="left"> {{ data.groupName }}</td>
|
||||
<td nzAlign="center"><img height="30" border="0px" src="{{ data.iconBase64 }}" /></td>
|
||||
<td nzAlign="left"> {{ data.appName }}</td>
|
||||
@ -148,11 +203,18 @@
|
||||
</td>
|
||||
<td nzAlign="center" nzBreakWord="false">
|
||||
<div nz-col>
|
||||
<button nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger>{{ 'mxk.text.delete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -242,6 +242,10 @@ export class AccessComponent implements OnInit {
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
|
||||
//group list
|
||||
groupQuery: {
|
||||
params: {
|
||||
|
||||
@ -25,20 +25,6 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col nzMd="8" nzSm="24" *ngIf="query.expandForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="employeeNumber">{{ 'mxk.users.employeeNumber' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.employeeNumber"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
id="employeeNumber"
|
||||
name="employeeNumber"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col nzMd="8" nzSm="24" *ngIf="query.expandForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="startDatePicker">{{ 'mxk.text.startDate' | i18n }}</nz-form-label>
|
||||
@ -71,7 +57,7 @@
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ 'mxk.text.query' | i18n }}</button>
|
||||
<button nz-button type="submit" [nzType]="'primary'">{{ 'mxk.text.query' | i18n }}</button>
|
||||
<button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ 'mxk.text.reset' | i18n }}</button>
|
||||
<button nz-button (click)="query.expandForm = !query.expandForm" class="mx-sm">
|
||||
{{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button
|
||||
@ -82,9 +68,16 @@
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" (click)="onTerminate($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
||||
'mxk.text.terminate' | i18n
|
||||
}}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
(click)="onTerminate($event)"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.terminate' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="24">
|
||||
<nz-table
|
||||
|
||||
@ -162,4 +162,8 @@ export class SessionsComponent implements OnInit {
|
||||
this.query.results.rows.filter(({ disabled }) => !disabled).forEach(({ id }) => this.updateTableCheckedSet(id, checked));
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,12 +8,18 @@
|
||||
<nz-form-label nzFor="appName">{{ 'mxk.accounts.appName' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<nz-input-group nzSearch [nzAddOnAfter]="suffixButton">
|
||||
<input nz-input [(ngModel)]="query.params.appName" [ngModelOptions]="{ standalone: true }" name="appName"
|
||||
readonly placeholder="" id="appName" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.appName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="appName"
|
||||
readonly
|
||||
placeholder=""
|
||||
id="appName"
|
||||
/>
|
||||
</nz-input-group>
|
||||
<ng-template #suffixButton>
|
||||
<button nz-button nzType="primary" (click)="onSelect($event)" nzSearch>{{ 'mxk.text.select' | i18n
|
||||
}}</button>
|
||||
<button nz-button nzType="primary" (click)="onSelect($event)" nzSearch>{{ 'mxk.text.select' | i18n }}</button>
|
||||
</ng-template>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
@ -22,18 +28,24 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ 'mxk.accounts.username' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.username" [ngModelOptions]="{ standalone: true }" name="username"
|
||||
placeholder="" id="username" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.username"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="username"
|
||||
placeholder=""
|
||||
id="username"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ 'mxk.text.query' |
|
||||
i18n }}</button>
|
||||
<button nz-button type="submit" [nzType]="'primary'">{{ 'mxk.text.query' | i18n }}</button>
|
||||
<button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -41,19 +53,40 @@
|
||||
<nz-card>
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
|
||||
nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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)">
|
||||
<nz-table
|
||||
#dynamicTable
|
||||
nzTableLayout="auto"
|
||||
nzSize="small"
|
||||
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)"
|
||||
>
|
||||
<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.accounts.username' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.accounts.displayName' | i18n }}</th>
|
||||
@ -64,8 +97,11 @@
|
||||
</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="left" style="display: none">
|
||||
<span>{{ data.id }}</span>
|
||||
</td>
|
||||
@ -76,11 +112,18 @@
|
||||
|
||||
<td nzAlign="center" nzBreakWord="false">
|
||||
<div nz-col>
|
||||
<button nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)" nzDanger>{{
|
||||
'mxk.text.delete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -248,4 +248,8 @@ export class AccountsComponent implements OnInit {
|
||||
this.query.results.rows.filter(({ disabled }) => !disabled).forEach(({ id }) => this.updateTableCheckedSet(id, checked));
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,8 +7,14 @@
|
||||
<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>
|
||||
@ -34,12 +40,11 @@
|
||||
</div>
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 4" [class.text-right]="query.expandForm">
|
||||
<nz-form-item>
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ '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'">{{ '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
|
||||
>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
</div>
|
||||
@ -49,21 +54,43 @@
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" (click)="onAddSelectProtocol($event)" [nzType]="'primary'" class="mx-sm">{{
|
||||
'mxk.text.add' | i18n
|
||||
}}</button>
|
||||
}}</button>
|
||||
|
||||
<button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
|
||||
nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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"
|
||||
nzSize="small"
|
||||
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">{{ 'mxk.apps.icon' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.text.id' | i18n }}</th>
|
||||
@ -77,8 +104,11 @@
|
||||
</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.id }} </td>
|
||||
@ -115,15 +145,12 @@
|
||||
<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"> <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 type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
|
||||
}}</button>
|
||||
<button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n }}</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -300,4 +300,8 @@ export class AppsComponent implements OnInit {
|
||||
this.query.results.rows.filter(({ disabled }) => !disabled).forEach(({ id }) => this.updateTableCheckedSet(id, checked));
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,20 +25,6 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col nzMd="8" nzSm="24" *ngIf="query.expandForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="employeeNumber">{{ 'mxk.users.employeeNumber' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.employeeNumber"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
id="employeeNumber"
|
||||
name="employeeNumber"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col nzMd="8" nzSm="24" *ngIf="query.expandForm">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="startDatePicker">{{ 'mxk.text.startDate' | i18n }}</nz-form-label>
|
||||
@ -73,7 +59,7 @@
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ 'mxk.text.query' | i18n }}</button>
|
||||
<button nz-button type="submit" [nzType]="'primary'">{{ 'mxk.text.query' | i18n }}</button>
|
||||
<button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ 'mxk.text.reset' | i18n }}</button>
|
||||
<button nz-button (click)="query.expandForm = !query.expandForm" class="mx-sm">
|
||||
{{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button
|
||||
|
||||
@ -7,19 +7,17 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ 'mxk.adapters.name' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.name" [ngModelOptions]="{ standalone: true }" name="name"
|
||||
placeholder="" id="name" />
|
||||
<input nz-input [(ngModel)]="query.params.name" [ngModelOptions]="{ standalone: true }" name="name" placeholder="" id="name" />
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ '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'">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -27,31 +25,58 @@
|
||||
<nz-card>
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
|
||||
nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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"
|
||||
nzSize="small"
|
||||
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.adapters.name' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.adapters.protocol' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.text.sortIndex' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.text.description' | i18n }}</th>
|
||||
<th nzAlign="center"><a>{{ 'mxk.text.action' | i18n }}</a></th>
|
||||
<th nzAlign="center"
|
||||
><a>{{ 'mxk.text.action' | i18n }}</a></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="left" style="display: none">
|
||||
<span>{{ data.id }}</span>
|
||||
</td>
|
||||
@ -61,13 +86,19 @@
|
||||
<td nzAlign="left">{{ data.description }}</td>
|
||||
<td nzAlign="left" nzBreakWord="false">
|
||||
<div nz-col>
|
||||
<button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">{{ 'mxk.text.edit' |
|
||||
i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">{{ 'mxk.text.edit' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)" nzDanger>{{
|
||||
'mxk.text.delete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -217,4 +217,8 @@ export class AdaptersComponent implements OnInit {
|
||||
this.query.results.rows.filter(({ disabled }) => !disabled).forEach(({ id }) => this.updateTableCheckedSet(id, checked));
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,19 +7,24 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="connName">{{ 'mxk.connectors.connName' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.connName" [ngModelOptions]="{ standalone: true }" name="connName"
|
||||
placeholder="" id="connName" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.connName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="connName"
|
||||
placeholder=""
|
||||
id="connName"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ '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'">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -27,19 +32,41 @@
|
||||
<nz-card>
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
|
||||
nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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"
|
||||
nzSize="small"
|
||||
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.connectors.connName' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.connectors.justInTime' | i18n }}</th>
|
||||
@ -49,8 +76,11 @@
|
||||
</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="left" style="display: none">
|
||||
<span>{{ data.id }}</span>
|
||||
</td>
|
||||
@ -58,16 +88,22 @@
|
||||
<td nzAlign="left"> {{ data.connName }}</td>
|
||||
<td nzAlign="center" *ngIf="data.justInTime == 1">{{ 'mxk.text.yes' | i18n }}</td>
|
||||
<td nzAlign="center" *ngIf="data.justInTime == 0">{{ 'mxk.text.no' | i18n }}</td>
|
||||
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
|
||||
style="color: green"></i></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)">{{ 'mxk.text.edit' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)" nzDanger>{{
|
||||
'mxk.text.delete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -214,4 +214,8 @@ export class ConnectorsComponent implements OnInit {
|
||||
this.query.results.rows.filter(({ disabled }) => !disabled).forEach(({ id }) => this.updateTableCheckedSet(id, checked));
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,19 +7,24 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ 'mxk.socialsproviders.providerName' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.providerName" [ngModelOptions]="{ standalone: true }"
|
||||
name="providerName" placeholder="" id="providerName" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.providerName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="providerName"
|
||||
placeholder=""
|
||||
id="providerName"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ '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'">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -27,19 +32,41 @@
|
||||
<nz-card>
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
|
||||
nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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"
|
||||
nzSize="small"
|
||||
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.socialsproviders.icon' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.socialsproviders.provider' | i18n }}</th>
|
||||
@ -54,8 +81,11 @@
|
||||
</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="left" style="display: none">
|
||||
<span>{{ data.id }}</span>
|
||||
</td>
|
||||
@ -63,21 +93,25 @@
|
||||
<td nzAlign="left"> {{ data.provider }}</td>
|
||||
<td nzAlign="left"> {{ data.providerName }}</td>
|
||||
<td nzAlign="center"> {{ data.sortIndex }}</td>
|
||||
<td nzAlign="center"> <i *ngIf="data.display == 'true'" nz-icon nzType="check-circle" nzTheme="fill"
|
||||
style="color: green"></i></td>
|
||||
<td nzAlign="center"> <i *ngIf="data.scanCode == 'true'" nz-icon nzType="check-circle" nzTheme="fill"
|
||||
style="color: green"></i></td>
|
||||
<td nzAlign="center"> <i *ngIf="data.display == 'true'" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"></i></td>
|
||||
<td nzAlign="center"> <i *ngIf="data.scanCode == 'true'" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"></i></td>
|
||||
|
||||
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
|
||||
style="color: green"></i></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)">{{ 'mxk.text.edit' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)" nzDanger>{{
|
||||
'mxk.text.delete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -214,4 +214,8 @@ export class SocialsProviderComponent implements OnInit {
|
||||
this.query.results.rows.filter(({ disabled }) => !disabled).forEach(({ id }) => this.updateTableCheckedSet(id, checked));
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,19 +7,17 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ 'mxk.synchronizers.name' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.name" [ngModelOptions]="{ standalone: true }" name="name"
|
||||
placeholder="" id="name" />
|
||||
<input nz-input [(ngModel)]="query.params.name" [ngModelOptions]="{ standalone: true }" name="name" placeholder="" id="name" />
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ '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'">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -27,53 +25,71 @@
|
||||
<nz-card>
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
|
||||
nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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"
|
||||
nzSize="small"
|
||||
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 nzAlign="center" style="display: none">Id</th>
|
||||
<th nzAlign="center">{{ 'mxk.synchronizers.name' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.synchronizers.scheduler' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
|
||||
<th nzAlign="center" class="table_cell_action_5">{{ 'mxk.text.action' | i18n }}</th>
|
||||
</tr>
|
||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||
<th nzAlign="center" style="display: none">Id</th>
|
||||
<th nzAlign="center">{{ 'mxk.synchronizers.name' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.synchronizers.scheduler' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
|
||||
<th nzAlign="center" class="table_cell_action_5">{{ 'mxk.text.action' | 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="left" style="display: none">
|
||||
<span>{{ data.id }}</span>
|
||||
</td>
|
||||
|
||||
<td nzAlign="left"> {{ data.name }}</td>
|
||||
<td nzAlign="left"> {{ data.scheduler }}</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)="onSynchr($event, data.id)">{{ 'mxk.text.synchr'
|
||||
| i18n }}</button>
|
||||
<button nz-button type="button" (click)="onConfigFeild($event, data.id)">{{ 'mxk.text.mapping'
|
||||
| i18n }}</button>
|
||||
<button nz-button type="button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' |
|
||||
i18n }}</button>
|
||||
<button nz-button type="button" (click)="onDelete(data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
|
||||
}}</button>
|
||||
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<td nzAlign="left"> {{ data.name }}</td>
|
||||
<td nzAlign="left"> {{ data.scheduler }}</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)="onSynchr($event, data.id)">{{ 'mxk.text.synchr' | i18n }}</button>
|
||||
<button nz-button type="button" (click)="onConfigFeild($event, data.id)">{{ 'mxk.text.mapping' | i18n }}</button>
|
||||
<button nz-button type="button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' | i18n }}</button>
|
||||
<button nz-button type="button" (click)="onDelete(data.id)" nzDanger>{{ 'mxk.text.delete' | i18n }}</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</nz-table>
|
||||
</nz-card>
|
||||
|
||||
@ -26,8 +26,8 @@ import { NzTableQueryParams } from 'ng-zorro-antd/table';
|
||||
|
||||
import { SynchronizersService } from '../../../service/synchronizers.service';
|
||||
import { set2String } from '../../../shared/index';
|
||||
import { SynchronizerEditerComponent } from './synchronizer-editer/synchronizer-editer.component';
|
||||
import { SynchronizerConfigFieldComponent } from './synchronizer-config-field/synchronizer-config-field.component';
|
||||
import { SynchronizerEditerComponent } from './synchronizer-editer/synchronizer-editer.component';
|
||||
@Component({
|
||||
selector: 'app-synchronizers',
|
||||
templateUrl: './synchronizers.component.html',
|
||||
@ -150,7 +150,6 @@ export class SynchronizersComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
onEdit(e: MouseEvent, editId: String): void {
|
||||
e.preventDefault();
|
||||
const modal = this.modalService.create({
|
||||
@ -190,8 +189,7 @@ export class SynchronizersComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
onDelete( deleteId: String): void {
|
||||
onDelete(deleteId: String): void {
|
||||
this.synchronizersService.delete(deleteId).subscribe(res => {
|
||||
if (res.code == 0) {
|
||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||
@ -247,4 +245,8 @@ export class SynchronizersComponent implements OnInit {
|
||||
this.query.results.rows.filter(({ disabled }) => !disabled).forEach(({ id }) => this.updateTableCheckedSet(id, checked));
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,23 +8,39 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="groupName">{{ 'mxk.groups.name' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="groupQuery.params.groupName" [ngModelOptions]="{ standalone: true }"
|
||||
name="groupName" placeholder="" id="groupName" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="groupQuery.params.groupName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="groupName"
|
||||
placeholder=""
|
||||
id="groupName"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="8" [class.text-right]="groupQuery.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="groupQuery.submitLoading">{{
|
||||
'mxk.text.query' | i18n
|
||||
}}</button>
|
||||
}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</nz-card>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
||||
[nzData]="groupQuery.results.rows" [nzFrontPagination]="false" [nzTotal]="groupQuery.results.records"
|
||||
[nzPageSizeOptions]="groupQuery.params.pageSizeOptions" [nzPageSize]="groupQuery.params.pageSize"
|
||||
[nzPageIndex]="groupQuery.params.pageNumber" [nzLoading]="this.groupQuery.tableLoading"
|
||||
(nzQueryParams)="onGroupQueryParamsChange($event)">
|
||||
<nz-table
|
||||
#dynamicTable
|
||||
nzTableLayout="auto"
|
||||
nzSize="small"
|
||||
nzBordered
|
||||
nzShowSizeChanger
|
||||
[nzData]="groupQuery.results.rows"
|
||||
[nzFrontPagination]="false"
|
||||
[nzTotal]="groupQuery.results.records"
|
||||
[nzPageSizeOptions]="groupQuery.params.pageSizeOptions"
|
||||
[nzPageSize]="groupQuery.params.pageSize"
|
||||
[nzPageIndex]="groupQuery.params.pageNumber"
|
||||
[nzLoading]="this.groupQuery.tableLoading"
|
||||
(nzQueryParams)="onGroupQueryParamsChange($event)"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
@ -35,8 +51,11 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let data of groupQuery.results.rows">
|
||||
<td [nzChecked]="groupQuery.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
||||
(nzCheckedChange)="onGroupTableItemChecked(data.id, data.groupName, $event)"></td>
|
||||
<td
|
||||
[nzChecked]="groupQuery.tableCheckedId.has(data.id)"
|
||||
[nzDisabled]="data.disabled"
|
||||
(nzCheckedChange)="onGroupTableItemChecked(data.id, data.groupName, $event)"
|
||||
></td>
|
||||
<td nzAlign="left" style="display: none">
|
||||
<span>{{ data.id }}</span>
|
||||
</td>
|
||||
@ -55,25 +74,37 @@
|
||||
<div nz-col nzMd="8" nzSm="24">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="groupName">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
||||
<input nz-input [(ngModel)]="query.params.groupName" [ngModelOptions]="{ standalone: true }" readonly
|
||||
disabled placeholder="" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.groupName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
readonly
|
||||
disabled
|
||||
placeholder=""
|
||||
/>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col nzMd="8" nzSm="24">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ 'mxk.users.username' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.username" [ngModelOptions]="{ standalone: true }"
|
||||
name="username" placeholder="" id="username" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.username"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="username"
|
||||
placeholder=""
|
||||
id="username"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ 'mxk.text.query'
|
||||
| i18n }}</button>
|
||||
<button nz-button type="submit" [nzType]="'primary'">{{ 'mxk.text.query' | i18n }}</button>
|
||||
<button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -81,25 +112,47 @@
|
||||
<nz-card [nzBordered]="false">
|
||||
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n
|
||||
}}</button>
|
||||
<button nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'" nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div nz-col nzMd="24" nzSm="24">
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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)">
|
||||
<nz-table
|
||||
#dynamicTable
|
||||
nzTableLayout="auto"
|
||||
nzSize="small"
|
||||
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)"
|
||||
>
|
||||
<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">{{ 'mxk.roles.name' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.users.username' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.users.displayName' | i18n }}</th>
|
||||
@ -111,22 +164,32 @@
|
||||
</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="left"> {{ data.groupName }}</td>
|
||||
<td nzAlign="left"> {{ data.username }}</td>
|
||||
<td nzAlign="left"> {{ data.displayName }}</td>
|
||||
<td nzAlign="left"> {{ data.department }}</td>
|
||||
<td nzAlign="left"> {{ data.jobTitle }}</td>
|
||||
<td nzAlign="center"> {{ data.gender == 1 ? ('mxk.users.gender.female' | i18n) :
|
||||
('mxk.users.gender.male' | i18n) }}</td>
|
||||
<td nzAlign="center"> {{ data.gender == 1 ? ('mxk.users.gender.female' | i18n) : ('mxk.users.gender.male' | i18n) }}</td>
|
||||
<td nzAlign="center" nzBreakWord="false">
|
||||
<div nz-col>
|
||||
<button *ngIf="data.category == 'static'" nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button
|
||||
*ngIf="data.category == 'static'"
|
||||
nz-button
|
||||
type="button"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger>{{ 'mxk.text.delete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -267,6 +267,10 @@ export class GroupMembersComponent implements OnInit {
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
|
||||
//group list
|
||||
groupQuery: {
|
||||
params: {
|
||||
|
||||
@ -7,19 +7,24 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ 'mxk.groups.name' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.groupName" [ngModelOptions]="{ standalone: true }"
|
||||
name="groupName" placeholder="" id="groupName" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.groupName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="groupName"
|
||||
placeholder=""
|
||||
id="groupName"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ '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'">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -27,19 +32,41 @@
|
||||
<nz-card>
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
|
||||
nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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"
|
||||
nzSize="small"
|
||||
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.groups.name' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.groups.category' | i18n }}</th>
|
||||
@ -49,8 +76,11 @@
|
||||
</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="left" style="display: none">
|
||||
<span>{{ data.id }}</span>
|
||||
</td>
|
||||
@ -69,16 +99,20 @@
|
||||
|
||||
<nz-dropdown-menu #menuMoreAction="nzDropdownMenu">
|
||||
<ul nz-menu>
|
||||
<li nz-menu-item (click)="onMembers($event, data.id, data.groupName)">{{ 'mxk.groups.member' | i18n }}
|
||||
</li>
|
||||
<li nz-menu-item (click)="onPermissions($event, data.id, data.groupName)">{{ 'mxk.groups.permissions' |
|
||||
i18n }}</li>
|
||||
<li nz-menu-item
|
||||
<li nz-menu-item (click)="onMembers($event, data.id, data.groupName)">{{ 'mxk.groups.member' | i18n }} </li>
|
||||
<li nz-menu-item (click)="onPermissions($event, data.id, data.groupName)">{{ 'mxk.groups.permissions' | i18n }}</li>
|
||||
<li
|
||||
nz-menu-item
|
||||
*ngIf="data.roleCode != 'ROLE_ADMINISTRATORS' && data.roleCode != 'ROLE_ALL_USER' && data.roleCode != 'ROLE_MANAGERS'"
|
||||
nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)" nzDanger>{{
|
||||
'mxk.text.delete' | i18n }}</li>
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</li
|
||||
>
|
||||
</ul>
|
||||
</nz-dropdown-menu>
|
||||
</div>
|
||||
|
||||
@ -225,4 +225,8 @@ export class GroupsComponent implements OnInit {
|
||||
this.query.results.rows.filter(({ disabled }) => !disabled).forEach(({ id }) => this.updateTableCheckedSet(id, checked));
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,18 +7,23 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="orgName">{{ 'mxk.organizations.name' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.orgName" [ngModelOptions]="{ standalone: true }" name="orgName"
|
||||
placeholder="" id="orgName" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.orgName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="orgName"
|
||||
placeholder=""
|
||||
id="orgName"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ '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'">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -27,14 +32,32 @@
|
||||
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
|
||||
nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<div nz-col nzMd="6" nzSm="24" class="grid-border">
|
||||
<nz-tree nzShowLine="false" [nzCheckable]="treeNodes.checkable" nzBlockNode [nzData]="treeNodes.nodes"
|
||||
(nzClick)="activeNode($event)" (nzDblClick)="openFolder($event)" [nzTreeTemplate]="nzTreeTemplate"></nz-tree>
|
||||
<nz-tree
|
||||
nzShowLine="false"
|
||||
[nzCheckable]="treeNodes.checkable"
|
||||
nzBlockNode
|
||||
[nzData]="treeNodes.nodes"
|
||||
(nzClick)="activeNode($event)"
|
||||
(nzDblClick)="openFolder($event)"
|
||||
[nzTreeTemplate]="nzTreeTemplate"
|
||||
></nz-tree>
|
||||
<ng-template #nzTreeTemplate let-node let-origin="origin">
|
||||
<span class="custom-node">
|
||||
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)">
|
||||
@ -55,14 +78,24 @@
|
||||
</nz-dropdown-menu>
|
||||
</div>
|
||||
<div nz-col nzMd="18" nzSm="24" class="grid-border">
|
||||
<nz-table #dynamicTable nzBordered nzShowSizeChanger nzSize="small" [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
|
||||
nzBordered
|
||||
nzShowSizeChanger
|
||||
nzSize="small"
|
||||
[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" class="table_cell_action_2">{{ 'mxk.organizations.code' | i18n }}</th>
|
||||
<th nzAlign="center" class="table_cell_action_2">{{ 'mxk.organizations.name' | i18n }}</th>
|
||||
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.organizations.type' | i18n }}</th>
|
||||
@ -73,21 +106,22 @@
|
||||
</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="left">
|
||||
<span>{{ data.orgCode }}</span>
|
||||
</td>
|
||||
<td nzAlign="left"> {{ data.orgName }}</td>
|
||||
<td nzAlign="center" *ngIf="data.type == 'company'"> {{ 'mxk.organizations.type.company' | i18n }}</td>
|
||||
<td nzAlign="center" *ngIf="data.type == 'division'"> {{ 'mxk.organizations.type.division' | i18n }}</td>
|
||||
<td nzAlign="center" *ngIf="data.type == 'department'"> {{ 'mxk.organizations.type.department' | i18n }}
|
||||
</td>
|
||||
<td nzAlign="center" *ngIf="data.type == 'department'"> {{ 'mxk.organizations.type.department' | i18n }} </td>
|
||||
<td nzAlign="center" *ngIf="data.type == 'entity'"> {{ 'mxk.organizations.type.entity' | i18n }}</td>
|
||||
<td nzAlign="center" *ngIf="data.type == 'virtual'"> {{ 'mxk.organizations.type.virtual' | i18n }}</td>
|
||||
<td nzAlign="center"> {{ 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"> <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)">
|
||||
@ -95,11 +129,17 @@
|
||||
</button>
|
||||
<button
|
||||
*ngIf="data.parentId != null && data.parentId != '-1' && data.parentId != '0' && data.id != data.instId"
|
||||
nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
nz-button
|
||||
type="button"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)" nzDanger>{{
|
||||
'mxk.text.delete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -263,6 +263,10 @@ export class OrganizationsComponent implements OnInit {
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
|
||||
openFolder(data: NzTreeNode | NzFormatEmitEvent): void {
|
||||
// do something if u want
|
||||
if (data instanceof NzTreeNode) {
|
||||
|
||||
@ -468,8 +468,6 @@
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
</nz-tab>
|
||||
<nz-tab nzTitle="{{ 'mxk.users.tab.business.extra' | i18n }}">
|
||||
<div nz-row>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workPhoneNumber">{{ 'mxk.users.workPhoneNumber' | i18n }} </nz-form-label>
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
|
||||
@ -325,6 +325,10 @@ export class UsersComponent implements OnInit {
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
|
||||
openFolder(data: NzTreeNode | NzFormatEmitEvent): void {
|
||||
// do something if u want
|
||||
if (data instanceof NzTreeNode) {
|
||||
|
||||
@ -6,26 +6,30 @@
|
||||
<div nz-col nzMd="10" nzSm="24">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ 'mxk.resources.appName' | i18n }}</nz-form-label>
|
||||
<input nz-input [(ngModel)]="query.params.appName" [ngModelOptions]="{ standalone: true }" disabled
|
||||
placeholder="" />
|
||||
<input nz-input [(ngModel)]="query.params.appName" [ngModelOptions]="{ standalone: true }" disabled placeholder="" />
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col nzMd="10" nzSm="24">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="resourceName">{{ 'mxk.resources.name' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.resourceName" [ngModelOptions]="{ standalone: true }"
|
||||
name="resourceName" placeholder="" id="resourceName" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.resourceName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="resourceName"
|
||||
placeholder=""
|
||||
id="resourceName"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 4" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ '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'">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -34,14 +38,32 @@
|
||||
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
|
||||
nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<div nz-col nzMd="6" nzSm="24" class="grid-border">
|
||||
<nz-tree nzShowLine="false" [nzCheckable]="treeNodes.checkable" nzBlockNode [nzData]="treeNodes.nodes"
|
||||
(nzClick)="activeNode($event)" (nzDblClick)="openFolder($event)" [nzTreeTemplate]="nzTreeTemplate"></nz-tree>
|
||||
<nz-tree
|
||||
nzShowLine="false"
|
||||
[nzCheckable]="treeNodes.checkable"
|
||||
nzBlockNode
|
||||
[nzData]="treeNodes.nodes"
|
||||
(nzClick)="activeNode($event)"
|
||||
(nzDblClick)="openFolder($event)"
|
||||
[nzTreeTemplate]="nzTreeTemplate"
|
||||
></nz-tree>
|
||||
<ng-template #nzTreeTemplate let-node let-origin="origin">
|
||||
<span class="custom-node">
|
||||
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)">
|
||||
@ -62,15 +84,25 @@
|
||||
</nz-dropdown-menu>
|
||||
</div>
|
||||
<div nz-col nzMd="18" nzSm="24" class="grid-border">
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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"
|
||||
nzSize="small"
|
||||
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">{{ 'mxk.resources.appName' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.resources.name' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.resources.resourceType' | i18n }}</th>
|
||||
@ -81,24 +113,33 @@
|
||||
</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">
|
||||
{{ data.appName }}
|
||||
</td>
|
||||
<td nzAlign="left"> {{ data.resourceName }}</td>
|
||||
<td nzAlign="left"> {{ data.resourceType }}</td>
|
||||
<td nzAlign="center"> {{ 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"> <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)">{{ 'mxk.text.edit' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)" nzDanger>{{
|
||||
'mxk.text.delete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -269,6 +269,10 @@ export class ResourcesComponent implements OnInit {
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
|
||||
openFolder(data: NzTreeNode | NzFormatEmitEvent): void {
|
||||
// do something if u want
|
||||
if (data instanceof NzTreeNode) {
|
||||
|
||||
@ -18,16 +18,26 @@
|
||||
<div nz-col [nzSpan]="leftQuery.expandForm ? 24 : 6" [class.text-right]="leftQuery.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="leftQuery.submitLoading">{{
|
||||
'mxk.text.query' | i18n
|
||||
}}</button>
|
||||
}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</nz-card>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
||||
[nzData]="leftQuery.results.rows" [nzFrontPagination]="false" [nzTotal]="leftQuery.results.records"
|
||||
[nzPageSizeOptions]="leftQuery.params.pageSizeOptions" [nzPageSize]="leftQuery.params.pageSize"
|
||||
[nzPageIndex]="leftQuery.params.pageNumber" [nzLoading]="this.leftQuery.tableLoading"
|
||||
(nzQueryParams)="onLeftQueryParamsChange($event)">
|
||||
<nz-table
|
||||
#dynamicTable
|
||||
nzTableLayout="auto"
|
||||
nzSize="small"
|
||||
nzBordered
|
||||
nzShowSizeChanger
|
||||
[nzData]="leftQuery.results.rows"
|
||||
[nzFrontPagination]="false"
|
||||
[nzTotal]="leftQuery.results.records"
|
||||
[nzPageSizeOptions]="leftQuery.params.pageSizeOptions"
|
||||
[nzPageSize]="leftQuery.params.pageSize"
|
||||
[nzPageIndex]="leftQuery.params.pageNumber"
|
||||
[nzLoading]="this.leftQuery.tableLoading"
|
||||
(nzQueryParams)="onLeftQueryParamsChange($event)"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<!--<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||
@ -39,8 +49,11 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let data of leftQuery.results.rows">
|
||||
<td [nzChecked]="leftQuery.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
||||
(nzCheckedChange)="onLeftTableItemChecked(data.id, data.roleName, $event)"></td>
|
||||
<td
|
||||
[nzChecked]="leftQuery.tableCheckedId.has(data.id)"
|
||||
[nzDisabled]="data.disabled"
|
||||
(nzCheckedChange)="onLeftTableItemChecked(data.id, data.roleName, $event)"
|
||||
></td>
|
||||
<td nzAlign="left" style="width: 300px">{{ data.id }}</td>
|
||||
<td nzAlign="left" nzBreakWord="false">{{ data.roleName }}</td>
|
||||
</tr>
|
||||
@ -54,25 +67,29 @@
|
||||
<div nz-col nzMd="8" nzSm="24">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
||||
<input nz-input [(ngModel)]="query.params.selectRoleName" [ngModelOptions]="{ standalone: true }"
|
||||
disabled />
|
||||
<input nz-input [(ngModel)]="query.params.selectRoleName" [ngModelOptions]="{ standalone: true }" disabled />
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col nzMd="8" nzSm="24">
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ 'mxk.roles.member' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.memberName" [ngModelOptions]="{ standalone: true }"
|
||||
name="memberName" placeholder="" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.memberName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="memberName"
|
||||
placeholder=""
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ 'mxk.text.query'
|
||||
| i18n }}</button>
|
||||
<button nz-button type="submit" [nzType]="'primary'">{{ 'mxk.text.query' | i18n }}</button>
|
||||
<button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -80,25 +97,47 @@
|
||||
<nz-card [nzBordered]="false">
|
||||
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n
|
||||
}}</button>
|
||||
<button nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'" nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div nz-col nzMd="24" nzSm="24">
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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)">
|
||||
<nz-table
|
||||
#dynamicTable
|
||||
nzTableLayout="auto"
|
||||
nzSize="small"
|
||||
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)"
|
||||
>
|
||||
<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">{{ 'mxk.roles.name' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.roles.type' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.roles.member' | i18n }}</th>
|
||||
@ -110,12 +149,14 @@
|
||||
</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="left"> {{ data.roleName }}</td>
|
||||
<td nzAlign="center" *ngIf="data.type == 'USER'"> {{ 'mxk.roles.type.user' | i18n }}</td>
|
||||
<td nzAlign="center" *ngIf="data.type == 'USER-DYNAMIC'"> {{ 'mxk.roles.type.user-dynamic' | i18n }}
|
||||
</td>
|
||||
<td nzAlign="center" *ngIf="data.type == 'USER-DYNAMIC'"> {{ 'mxk.roles.type.user-dynamic' | i18n }} </td>
|
||||
<td nzAlign="center" *ngIf="data.type == 'POST'"> {{ 'mxk.roles.type.post' | i18n }}</td>
|
||||
<td nzAlign="left"> {{ data.memberName }}</td>
|
||||
<td nzAlign="left"> {{ data.jobTitle }}</td>
|
||||
@ -126,11 +167,19 @@
|
||||
<td nzAlign="left"> {{ data.department }}</td>
|
||||
<td nzAlign="center" nzBreakWord="false">
|
||||
<div nz-col>
|
||||
<button *ngIf="data.type != 'USER-DYNAMIC'" nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
<button
|
||||
*ngIf="data.type != 'USER-DYNAMIC'"
|
||||
nz-button
|
||||
type="button"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger>{{ 'mxk.text.delete' | i18n }}</button>
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@ -280,6 +279,10 @@ export class RoleMembersComponent implements OnInit {
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
|
||||
leftQuery: {
|
||||
params: {
|
||||
id: String;
|
||||
|
||||
@ -7,19 +7,24 @@
|
||||
<nz-form-item>
|
||||
<nz-form-label nzFor="name">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
||||
<nz-form-control>
|
||||
<input nz-input [(ngModel)]="query.params.roleName" [ngModelOptions]="{ standalone: true }" name="roleName"
|
||||
placeholder="" id="roleName" />
|
||||
<input
|
||||
nz-input
|
||||
[(ngModel)]="query.params.roleName"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
name="roleName"
|
||||
placeholder=""
|
||||
id="roleName"
|
||||
/>
|
||||
</nz-form-control>
|
||||
</nz-form-item>
|
||||
</div>
|
||||
|
||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||
<button nz-button type="submit" [nzType]="'primary'" >{{ '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'">{{ '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
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -27,19 +32,41 @@
|
||||
<nz-card>
|
||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||
<button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
|
||||
nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
[disabled]="tableHasCheckedItem()"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onBatchDelete()"
|
||||
[nzType]="'primary'"
|
||||
nzDanger
|
||||
class="mx-sm"
|
||||
>{{ 'mxk.text.batchDelete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" 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"
|
||||
nzSize="small"
|
||||
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.roles.name' | i18n }}</th>
|
||||
<th nzAlign="center">{{ 'mxk.roles.category' | i18n }}</th>
|
||||
@ -49,8 +76,11 @@
|
||||
</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="left" style="display: none">
|
||||
<span>{{ data.id }}</span>
|
||||
</td>
|
||||
@ -62,17 +92,23 @@
|
||||
<td nzAlign="center" nzBreakWord="false" width="350px">
|
||||
<div nz-col>
|
||||
<button nz-button type=" button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' | i18n }}</button>
|
||||
<button nz-button type="button" (click)="onMembers($event, data.id, data.roleName)">{{ 'mxk.roles.member' |
|
||||
i18n }}</button>
|
||||
<button nz-button type="button" (click)="onMembers($event, data.id, data.roleName)">{{ 'mxk.roles.member' | i18n }}</button>
|
||||
<button nz-button type="button" (click)="onPermissions($event, data.id, data.roleName)">{{
|
||||
'mxk.roles.permissions' | i18n
|
||||
}}</button>
|
||||
<button nz-button type="button" nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
|
||||
}}</button>
|
||||
<button
|
||||
nz-button
|
||||
type="button"
|
||||
nz-popconfirm
|
||||
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||
nzPopconfirmPlacement="left"
|
||||
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)"
|
||||
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||
(nzOnConfirm)="onDelete(data.id)"
|
||||
*ngIf="data.roleCode != 'ROLE_ADMINISTRATORS' && data.roleCode != 'ROLE_ALL_USER' && data.roleCode != 'ROLE_MANAGERS'"
|
||||
nzDanger>{{ 'mxk.text.delete' | i18n }}</button>
|
||||
nzDanger
|
||||
>{{ 'mxk.text.delete' | i18n }}</button
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@ -255,4 +254,8 @@ export class RolesComponent implements OnInit {
|
||||
this.query.results.rows.filter(({ disabled }) => !disabled).forEach(({ id }) => this.updateTableCheckedSet(id, checked));
|
||||
this.refreshTableCheckedStatus();
|
||||
}
|
||||
|
||||
tableHasCheckedItem(): boolean {
|
||||
return this.query.tableCheckedId.size <= 0;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user