mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
增加删除确认提醒
This commit is contained in:
parent
f706c2054b
commit
65d745a69b
@ -26,5 +26,5 @@ export const CONSTS = {
|
|||||||
REDIRECT_URI: 'redirect_uri',
|
REDIRECT_URI: 'redirect_uri',
|
||||||
REMEMBER: 'remember_me',
|
REMEMBER: 'remember_me',
|
||||||
TOKEN: '_token',
|
TOKEN: '_token',
|
||||||
VERSION: 'v4.1.0 GA'
|
VERSION: 'v4.1.1 GA'
|
||||||
};
|
};
|
||||||
|
|||||||
@ -8,23 +8,39 @@
|
|||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="groupName">{{ 'mxk.groups.name' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="groupName">{{ 'mxk.groups.name' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="groupQuery.params.groupName" [ngModelOptions]="{ standalone: true }"
|
<input
|
||||||
name="groupName" placeholder="" id="groupName" />
|
nz-input
|
||||||
|
[(ngModel)]="groupQuery.params.groupName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="groupName"
|
||||||
|
placeholder=""
|
||||||
|
id="groupName"
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="8" [class.text-right]="groupQuery.expandForm">
|
<div nz-col [nzSpan]="8" [class.text-right]="groupQuery.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="groupQuery.submitLoading">{{
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="groupQuery.submitLoading">{{
|
||||||
'mxk.text.query' | i18n
|
'mxk.text.query' | i18n
|
||||||
}}</button>
|
}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
<nz-table
|
||||||
[nzData]="groupQuery.results.rows" [nzFrontPagination]="false" [nzTotal]="groupQuery.results.records"
|
#dynamicTable
|
||||||
[nzPageSizeOptions]="groupQuery.params.pageSizeOptions" [nzPageSize]="groupQuery.params.pageSize"
|
nzTableLayout="auto"
|
||||||
[nzPageIndex]="groupQuery.params.pageNumber" [nzLoading]="this.groupQuery.tableLoading"
|
nzSize="small"
|
||||||
(nzQueryParams)="onGroupQueryParamsChange($event)">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
@ -35,8 +51,11 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of groupQuery.results.rows">
|
<tr *ngFor="let data of groupQuery.results.rows">
|
||||||
<td [nzChecked]="groupQuery.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onGroupTableItemChecked(data.id, data.groupName, $event)"></td>
|
[nzChecked]="groupQuery.tableCheckedId.has(data.id)"
|
||||||
|
[nzDisabled]="data.disabled"
|
||||||
|
(nzCheckedChange)="onGroupTableItemChecked(data.id, data.groupName, $event)"
|
||||||
|
></td>
|
||||||
<td nzAlign="left" style="display: none">
|
<td nzAlign="left" style="display: none">
|
||||||
<span>{{ data.id }}</span>
|
<span>{{ data.id }}</span>
|
||||||
</td>
|
</td>
|
||||||
@ -55,26 +74,37 @@
|
|||||||
<div nz-col nzMd="10" nzSm="24">
|
<div nz-col nzMd="10" nzSm="24">
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="roleName">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="roleName">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
||||||
<input nz-input [(ngModel)]="query.params.groupName" [ngModelOptions]="{ standalone: true }" readonly
|
<input
|
||||||
placeholder="" disabled />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.groupName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
readonly
|
||||||
|
placeholder=""
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col nzMd="10" nzSm="24">
|
<div nz-col nzMd="10" nzSm="24">
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="name">{{ 'mxk.apps.name' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="name">{{ 'mxk.apps.name' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="query.params.appName" [ngModelOptions]="{ standalone: true }"
|
<input
|
||||||
name="appName" placeholder="" id="appName" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.appName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="appName"
|
||||||
|
placeholder=""
|
||||||
|
id="appName"
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 4" [class.text-right]="query.expandForm">
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 4" [class.text-right]="query.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query'
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||||
| i18n }}</button>
|
<button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' | 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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -82,24 +112,46 @@
|
|||||||
<nz-card [nzBordered]="false">
|
<nz-card [nzBordered]="false">
|
||||||
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
<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">
|
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n
|
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
}}</button>
|
<button
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger
|
nz-button
|
||||||
class="mx-sm">{{
|
type="button"
|
||||||
'mxk.text.delete' | i18n
|
nz-popconfirm
|
||||||
}}</button>
|
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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div nz-col nzMd="24" nzSm="24">
|
<div nz-col nzMd="24" nzSm="24">
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
<nz-table
|
||||||
[nzData]="query.results.rows" [nzFrontPagination]="false" [nzTotal]="query.results.records"
|
#dynamicTable
|
||||||
[nzPageSizeOptions]="query.params.pageSizeOptions" [nzPageSize]="query.params.pageSize"
|
nzTableLayout="auto"
|
||||||
[nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
|
nzSize="small"
|
||||||
(nzQueryParams)="onQueryParamsChange($event)">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
<th
|
||||||
(nzCheckedChange)="onTableAllChecked($event)"></th>
|
[nzChecked]="query.checked"
|
||||||
|
[nzIndeterminate]="query.indeterminate"
|
||||||
|
(nzCheckedChange)="onTableAllChecked($event)"
|
||||||
|
></th>
|
||||||
<th nzAlign="center" style="display: none">Id</th>
|
<th nzAlign="center" style="display: none">Id</th>
|
||||||
<th nzAlign="center">{{ 'mxk.roles.name' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.roles.name' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.apps.icon' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.apps.icon' | i18n }}</th>
|
||||||
@ -110,8 +162,11 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of query.results.rows">
|
<tr *ngFor="let data of query.results.rows">
|
||||||
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></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.groupName }}</td>
|
||||||
<td nzAlign="center"><img height="30" border="0px" src="{{ data.iconBase64 }}" /></td>
|
<td nzAlign="center"><img height="30" border="0px" src="{{ data.iconBase64 }}" /></td>
|
||||||
<td nzAlign="left"> {{ data.appName }}</td>
|
<td nzAlign="left"> {{ data.appName }}</td>
|
||||||
@ -147,8 +202,18 @@
|
|||||||
</td>
|
</td>
|
||||||
<td nzAlign="center" nzBreakWord="false">
|
<td nzAlign="center" nzBreakWord="false">
|
||||||
<div nz-col>
|
<div nz-col>
|
||||||
<button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete'
|
<button
|
||||||
| i18n }}</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
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -159,4 +224,4 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -67,33 +67,33 @@ export class AccessComponent implements OnInit {
|
|||||||
indeterminate: boolean;
|
indeterminate: boolean;
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
} = {
|
} = {
|
||||||
params: {
|
params: {
|
||||||
displayName: '',
|
displayName: '',
|
||||||
username: '',
|
username: '',
|
||||||
groupId: '',
|
groupId: '',
|
||||||
groupName: '',
|
groupName: '',
|
||||||
appName: '',
|
appName: '',
|
||||||
appId: '',
|
appId: '',
|
||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: '',
|
endDate: '',
|
||||||
startDatePicker: addDays(new Date(), -30),
|
startDatePicker: addDays(new Date(), -30),
|
||||||
endDatePicker: new Date(),
|
endDatePicker: new Date(),
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSizeOptions: [10, 20, 50]
|
pageSizeOptions: [10, 20, 50]
|
||||||
},
|
},
|
||||||
results: {
|
results: {
|
||||||
records: 0,
|
records: 0,
|
||||||
rows: []
|
rows: []
|
||||||
},
|
},
|
||||||
expandForm: false,
|
expandForm: false,
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
tableInitialize: true,
|
tableInitialize: true,
|
||||||
tableCheckedId: new Set<String>(),
|
tableCheckedId: new Set<String>(),
|
||||||
indeterminate: false,
|
indeterminate: false,
|
||||||
checked: false
|
checked: false
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalService: NzModalService,
|
private modalService: NzModalService,
|
||||||
@ -106,7 +106,7 @@ export class AccessComponent implements OnInit {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private cdr: ChangeDetectorRef,
|
private cdr: ChangeDetectorRef,
|
||||||
private http: _HttpClient
|
private http: _HttpClient
|
||||||
) { }
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.route.snapshot.queryParams['groupId']) {
|
if (this.route.snapshot.queryParams['groupId']) {
|
||||||
@ -128,10 +128,9 @@ export class AccessComponent implements OnInit {
|
|||||||
this.fetch();
|
this.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
onReset(): void { }
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.accessService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.accessService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -185,8 +184,7 @@ export class AccessComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.accessService.delete(deleteId).subscribe(res => {
|
this.accessService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -263,23 +261,23 @@ export class AccessComponent implements OnInit {
|
|||||||
indeterminate: boolean;
|
indeterminate: boolean;
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
} = {
|
} = {
|
||||||
params: {
|
params: {
|
||||||
groupName: '',
|
groupName: '',
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSizeOptions: [10, 20, 50]
|
pageSizeOptions: [10, 20, 50]
|
||||||
},
|
},
|
||||||
results: {
|
results: {
|
||||||
records: 0,
|
records: 0,
|
||||||
rows: []
|
rows: []
|
||||||
},
|
},
|
||||||
expandForm: false,
|
expandForm: false,
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
tableCheckedId: new Set<String>(),
|
tableCheckedId: new Set<String>(),
|
||||||
indeterminate: false,
|
indeterminate: false,
|
||||||
checked: false
|
checked: false
|
||||||
};
|
};
|
||||||
|
|
||||||
onGroupSearch(): void {
|
onGroupSearch(): void {
|
||||||
this.fetchGroup();
|
this.fetchGroup();
|
||||||
|
|||||||
@ -8,12 +8,18 @@
|
|||||||
<nz-form-label nzFor="appName">{{ 'mxk.accounts.appName' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="appName">{{ 'mxk.accounts.appName' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<nz-input-group nzSearch [nzAddOnAfter]="suffixButton">
|
<nz-input-group nzSearch [nzAddOnAfter]="suffixButton">
|
||||||
<input nz-input [(ngModel)]="query.params.appName" [ngModelOptions]="{ standalone: true }" name="appName"
|
<input
|
||||||
readonly placeholder="" id="appName" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.appName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="appName"
|
||||||
|
readonly
|
||||||
|
placeholder=""
|
||||||
|
id="appName"
|
||||||
|
/>
|
||||||
</nz-input-group>
|
</nz-input-group>
|
||||||
<ng-template #suffixButton>
|
<ng-template #suffixButton>
|
||||||
<button nz-button nzType="primary" (click)="onSelect($event)" nzSearch>{{ 'mxk.text.select' | i18n
|
<button nz-button nzType="primary" (click)="onSelect($event)" nzSearch>{{ 'mxk.text.select' | i18n }}</button>
|
||||||
}}</button>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
@ -22,18 +28,24 @@
|
|||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="name">{{ 'mxk.accounts.username' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="name">{{ 'mxk.accounts.username' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="query.params.username" [ngModelOptions]="{ standalone: true }" name="username"
|
<input
|
||||||
placeholder="" id="username" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.username"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="username"
|
||||||
|
placeholder=""
|
||||||
|
id="username"
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||||
i18n }}</button>
|
|
||||||
<button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ 'mxk.text.reset' | 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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -41,45 +53,79 @@
|
|||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
<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" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
<button
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger [nzData]="query.results.rows"
|
<nz-table
|
||||||
[nzFrontPagination]="false" [nzTotal]="query.results.records" [nzPageSizeOptions]="query.params.pageSizeOptions"
|
#dynamicTable
|
||||||
[nzPageSize]="query.params.pageSize" [nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
|
nzTableLayout="auto"
|
||||||
(nzQueryParams)="onQueryParamsChange($event)">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||||
(nzCheckedChange)="onTableAllChecked($event)"></th>
|
<th nzAlign="center" style="display: none">Id</th>
|
||||||
<th nzAlign="center" style="display: none">Id</th>
|
<th nzAlign="center">{{ 'mxk.accounts.username' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.accounts.username' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.accounts.displayName' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.accounts.displayName' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.accounts.appName' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.accounts.appName' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.accounts.relatedUsername' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.accounts.relatedUsername' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.action' | i18n }}</th>
|
||||||
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.action' | i18n }}</th>
|
</tr>
|
||||||
</tr>
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of query.results.rows">
|
<tr *ngFor="let data of query.results.rows">
|
||||||
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
|
[nzChecked]="query.tableCheckedId.has(data.id)"
|
||||||
<td nzAlign="left" style="display: none">
|
[nzDisabled]="data.disabled"
|
||||||
<span>{{ data.id }}</span>
|
(nzCheckedChange)="onTableItemChecked(data.id, $event)"
|
||||||
</td>
|
></td>
|
||||||
<td nzAlign="left" nzBreakWord="false">{{ data.username }}</td>
|
<td nzAlign="left" style="display: none">
|
||||||
<td nzAlign="left" nzBreakWord="false">{{ data.displayName }}</td>
|
<span>{{ data.id }}</span>
|
||||||
<td nzAlign="left" nzBreakWord="false">{{ data.appName }}</td>
|
</td>
|
||||||
<td nzAlign="left" nzBreakWord="false">{{ data.relatedUsername }}</td>
|
<td nzAlign="left" nzBreakWord="false">{{ data.username }}</td>
|
||||||
|
<td nzAlign="left" nzBreakWord="false">{{ data.displayName }}</td>
|
||||||
|
<td nzAlign="left" nzBreakWord="false">{{ data.appName }}</td>
|
||||||
|
<td nzAlign="left" nzBreakWord="false">{{ data.relatedUsername }}</td>
|
||||||
|
|
||||||
<td nzAlign="center" nzBreakWord="false">
|
<td nzAlign="center" nzBreakWord="false">
|
||||||
<div nz-col>
|
<div nz-col>
|
||||||
<button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
|
<button
|
||||||
}}</button>
|
nz-button
|
||||||
</div>
|
type="button"
|
||||||
</td>
|
nz-popconfirm
|
||||||
</tr>
|
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
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</nz-table>
|
</nz-table>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -147,8 +147,7 @@ export class AccountsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.accountsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.accountsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -180,8 +179,7 @@ export class AccountsComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.accountsService.delete(deleteId).subscribe(res => {
|
this.accountsService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -56,9 +56,20 @@
|
|||||||
'mxk.text.add' | i18n
|
'mxk.text.add' | i18n
|
||||||
}}</button>
|
}}</button>
|
||||||
|
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
<button
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<nz-table
|
<nz-table
|
||||||
#dynamicTable
|
#dynamicTable
|
||||||
|
|||||||
@ -118,8 +118,7 @@ export class AppsComponent implements OnInit {
|
|||||||
|
|
||||||
onReset(): void {}
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.appsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.appsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -25,9 +25,20 @@
|
|||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
<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" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
<button
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<nz-table
|
<nz-table
|
||||||
#dynamicTable
|
#dynamicTable
|
||||||
@ -77,7 +88,18 @@
|
|||||||
<td nzAlign="left" nzBreakWord="false">
|
<td nzAlign="left" nzBreakWord="false">
|
||||||
<div nz-col>
|
<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" (click)="onEdit($event, data.id)" style="float: left">{{ '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"
|
||||||
|
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
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -108,8 +108,7 @@ export class AccountsStrategyComponent implements OnInit {
|
|||||||
|
|
||||||
onReset(): void {}
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.accountsStrategyService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.accountsStrategyService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -160,8 +159,7 @@ export class AccountsStrategyComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.accountsStrategyService.delete(deleteId).subscribe(res => {
|
this.accountsStrategyService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -25,9 +25,20 @@
|
|||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
<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" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
<button
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<nz-table
|
<nz-table
|
||||||
#dynamicTable
|
#dynamicTable
|
||||||
@ -75,7 +86,18 @@
|
|||||||
<td nzAlign="left" nzBreakWord="false">
|
<td nzAlign="left" nzBreakWord="false">
|
||||||
<div nz-col>
|
<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" (click)="onEdit($event, data.id)" style="float: left">{{ '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"
|
||||||
|
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
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -108,8 +108,7 @@ export class AdaptersComponent implements OnInit {
|
|||||||
|
|
||||||
onReset(): void {}
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.adaptersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.adaptersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -162,8 +161,7 @@ export class AdaptersComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.adaptersService.delete(deleteId).subscribe(res => {
|
this.adaptersService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -7,69 +7,105 @@
|
|||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="connName">{{ 'mxk.connectors.connName' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="connName">{{ 'mxk.connectors.connName' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="query.params.connName" [ngModelOptions]="{ standalone: true }"
|
<input
|
||||||
name="connName" placeholder="" id="connName" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.connName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="connName"
|
||||||
|
placeholder=""
|
||||||
|
id="connName"
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||||
'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="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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n
|
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
}}</button>
|
<button
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
nz-button
|
||||||
'mxk.text.delete' | i18n
|
type="button"
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
<nz-table
|
||||||
[nzData]="query.results.rows" [nzFrontPagination]="false" [nzTotal]="query.results.records"
|
#dynamicTable
|
||||||
[nzPageSizeOptions]="query.params.pageSizeOptions" [nzPageSize]="query.params.pageSize"
|
nzTableLayout="auto"
|
||||||
[nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
|
nzSize="small"
|
||||||
(nzQueryParams)="onQueryParamsChange($event)" nzWidth="100%">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||||
(nzCheckedChange)="onTableAllChecked($event)"></th>
|
<th nzAlign="center" style="display: none">Id</th>
|
||||||
<th nzAlign="center" style="display: none">Id</th>
|
<th nzAlign="center">{{ 'mxk.connectors.connName' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.connectors.connName' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.connectors.justInTime' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.connectors.justInTime' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_2">{{ 'mxk.text.action' | i18n }}</th>
|
||||||
<th nzAlign="center" class="table_cell_action_2">{{ 'mxk.text.action' | i18n }}</th>
|
</tr>
|
||||||
</tr>
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of query.results.rows">
|
<tr *ngFor="let data of query.results.rows">
|
||||||
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
|
[nzChecked]="query.tableCheckedId.has(data.id)"
|
||||||
<td nzAlign="left" style="display: none">
|
[nzDisabled]="data.disabled"
|
||||||
<span>{{ data.id }}</span>
|
(nzCheckedChange)="onTableItemChecked(data.id, $event)"
|
||||||
</td>
|
></td>
|
||||||
|
<td nzAlign="left" style="display: none">
|
||||||
|
<span>{{ data.id }}</span>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td nzAlign="left"> {{ data.connName }}</td>
|
<td nzAlign="left"> {{ data.connName }}</td>
|
||||||
<td nzAlign="center" *ngIf="data.justInTime == 1">{{ 'mxk.text.yes' | i18n }}</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" *ngIf="data.justInTime == 0">{{ 'mxk.text.no' | i18n }}</td>
|
||||||
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
|
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"></i></td>
|
||||||
style="color: green"></i></td>
|
<td nzAlign="center" nzBreakWord="false">
|
||||||
<td nzAlign="center" nzBreakWord="false">
|
<div nz-col>
|
||||||
<div nz-col>
|
<button nz-button type="button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onEdit($event, data.id)">{{
|
<button
|
||||||
'mxk.text.edit' | i18n }}</button>
|
nz-button
|
||||||
<button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{
|
type="button"
|
||||||
'mxk.text.delete' | i18n }}</button>
|
nz-popconfirm
|
||||||
</div>
|
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||||
</td>
|
nzPopconfirmPlacement="left"
|
||||||
</tr>
|
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||||
|
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||||
|
(nzOnConfirm)="onDelete(data.id)"
|
||||||
|
nzDanger
|
||||||
|
>{{ 'mxk.text.delete' | i18n }}</button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</nz-table>
|
</nz-table>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -1,19 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright [2024] [MaxKey of copyright http://www.maxkey.top]
|
* Copyright [2024] [MaxKey of copyright http://www.maxkey.top]
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
|
import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
@ -109,8 +108,7 @@ export class ConnectorsComponent implements OnInit {
|
|||||||
|
|
||||||
onReset(): void {}
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.connectorsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.connectorsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -160,8 +158,7 @@ export class ConnectorsComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.connectorsService.delete(deleteId).subscribe(res => {
|
this.connectorsService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -7,19 +7,24 @@
|
|||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="name">{{ 'mxk.socialsproviders.providerName' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="name">{{ 'mxk.socialsproviders.providerName' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="query.params.providerName" [ngModelOptions]="{ standalone: true }"
|
<input
|
||||||
name="providerName" placeholder="" id="providerName" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.providerName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="providerName"
|
||||||
|
placeholder=""
|
||||||
|
id="providerName"
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||||
i18n }}</button>
|
<button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' | 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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -27,57 +32,88 @@
|
|||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
<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" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
<button
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger [nzData]="query.results.rows"
|
<nz-table
|
||||||
[nzFrontPagination]="false" [nzTotal]="query.results.records" [nzPageSizeOptions]="query.params.pageSizeOptions"
|
#dynamicTable
|
||||||
[nzPageSize]="query.params.pageSize" [nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
|
nzTableLayout="auto"
|
||||||
(nzQueryParams)="onQueryParamsChange($event)" nzWidth="100%">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||||
(nzCheckedChange)="onTableAllChecked($event)"></th>
|
<th nzAlign="center" style="display: none">Id</th>
|
||||||
<th nzAlign="center" style="display: none">Id</th>
|
<th nzAlign="center">{{ 'mxk.socialsproviders.icon' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.socialsproviders.icon' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.socialsproviders.provider' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.socialsproviders.provider' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.socialsproviders.providerName' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.socialsproviders.providerName' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.sortIndex' | i18n }}</th>
|
||||||
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.sortIndex' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.socialsproviders.display' | i18n }}</th>
|
||||||
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.socialsproviders.display' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.socialsproviders.scanCode' | i18n }}</th>
|
||||||
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.socialsproviders.scanCode' | i18n }}</th>
|
|
||||||
|
|
||||||
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.status' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.status' | i18n }}</th>
|
||||||
<th nzAlign="center" class="table_cell_action_2">{{ 'mxk.text.action' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_2">{{ 'mxk.text.action' | i18n }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of query.results.rows">
|
<tr *ngFor="let data of query.results.rows">
|
||||||
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
|
[nzChecked]="query.tableCheckedId.has(data.id)"
|
||||||
<td nzAlign="left" style="display: none">
|
[nzDisabled]="data.disabled"
|
||||||
<span>{{ data.id }}</span>
|
(nzCheckedChange)="onTableItemChecked(data.id, $event)"
|
||||||
</td>
|
></td>
|
||||||
<td nzAlign="center" nzBreakWord="false"><img src="{{ data.icon }}" /></td>
|
<td nzAlign="left" style="display: none">
|
||||||
<td nzAlign="left"> {{ data.provider }}</td>
|
<span>{{ data.id }}</span>
|
||||||
<td nzAlign="left"> {{ data.providerName }}</td>
|
</td>
|
||||||
<td nzAlign="center"> {{ data.sortIndex }}</td>
|
<td nzAlign="center" nzBreakWord="false"><img src="{{ data.icon }}" /></td>
|
||||||
<td nzAlign="center"> <i *ngIf="data.display == 'true'" nz-icon nzType="check-circle" nzTheme="fill"
|
<td nzAlign="left"> {{ data.provider }}</td>
|
||||||
style="color: green"></i></td>
|
<td nzAlign="left"> {{ data.providerName }}</td>
|
||||||
<td nzAlign="center"> <i *ngIf="data.scanCode == 'true'" nz-icon nzType="check-circle" nzTheme="fill"
|
<td nzAlign="center"> {{ data.sortIndex }}</td>
|
||||||
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"
|
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"></i></td>
|
||||||
style="color: green"></i></td>
|
<td nzAlign="center" nzBreakWord="false">
|
||||||
<td nzAlign="center" nzBreakWord="false">
|
<div nz-col>
|
||||||
<div nz-col>
|
<button nz-button type="button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' |
|
<button
|
||||||
i18n }}</button>
|
nz-button
|
||||||
<button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
|
type="button"
|
||||||
}}</button>
|
nz-popconfirm
|
||||||
</div>
|
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||||
</td>
|
nzPopconfirmPlacement="left"
|
||||||
</tr>
|
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||||
|
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||||
|
(nzOnConfirm)="onDelete(data.id)"
|
||||||
|
nzDanger
|
||||||
|
>{{ 'mxk.text.delete' | i18n }}</button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</nz-table>
|
</nz-table>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -107,8 +107,7 @@ export class SocialsProviderComponent implements OnInit {
|
|||||||
|
|
||||||
onReset(): void {}
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.socialsProviderService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.socialsProviderService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -159,8 +158,7 @@ export class SocialsProviderComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.socialsProviderService.delete(deleteId).subscribe(res => {
|
this.socialsProviderService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -7,19 +7,17 @@
|
|||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="name">{{ 'mxk.synchronizers.name' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="name">{{ 'mxk.synchronizers.name' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="query.params.name" [ngModelOptions]="{ standalone: true }" name="name"
|
<input nz-input [(ngModel)]="query.params.name" [ngModelOptions]="{ standalone: true }" name="name" placeholder="" id="name" />
|
||||||
placeholder="" id="name" />
|
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||||
i18n }}</button>
|
<button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' | 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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -27,48 +25,80 @@
|
|||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
<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" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
<button
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger [nzData]="query.results.rows"
|
<nz-table
|
||||||
[nzFrontPagination]="false" [nzTotal]="query.results.records" [nzPageSizeOptions]="query.params.pageSizeOptions"
|
#dynamicTable
|
||||||
[nzPageSize]="query.params.pageSize" [nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
|
nzTableLayout="auto"
|
||||||
(nzQueryParams)="onQueryParamsChange($event)" nzWidth="100%">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||||
(nzCheckedChange)="onTableAllChecked($event)"></th>
|
<th nzAlign="center" style="display: none">Id</th>
|
||||||
<th nzAlign="center" style="display: none">Id</th>
|
<th nzAlign="center">{{ 'mxk.synchronizers.name' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.synchronizers.name' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.synchronizers.scheduler' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.synchronizers.scheduler' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_3">{{ 'mxk.text.action' | i18n }}</th>
|
||||||
<th nzAlign="center" class="table_cell_action_3">{{ 'mxk.text.action' | i18n }}</th>
|
</tr>
|
||||||
</tr>
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of query.results.rows">
|
<tr *ngFor="let data of query.results.rows">
|
||||||
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
|
[nzChecked]="query.tableCheckedId.has(data.id)"
|
||||||
<td nzAlign="left" style="display: none">
|
[nzDisabled]="data.disabled"
|
||||||
<span>{{ data.id }}</span>
|
(nzCheckedChange)="onTableItemChecked(data.id, $event)"
|
||||||
</td>
|
></td>
|
||||||
|
<td nzAlign="left" style="display: none">
|
||||||
|
<span>{{ data.id }}</span>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td nzAlign="left"> {{ data.name }}</td>
|
<td nzAlign="left"> {{ data.name }}</td>
|
||||||
<td nzAlign="left"> {{ data.scheduler }}</td>
|
<td nzAlign="left"> {{ data.scheduler }}</td>
|
||||||
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
|
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"></i></td>
|
||||||
style="color: green"></i></td>
|
<td nzAlign="center" nzBreakWord="false">
|
||||||
<td nzAlign="center" nzBreakWord="false">
|
<div nz-col>
|
||||||
<div nz-col>
|
<button nz-button type="button" (click)="onSynchr($event, data.id)">{{ 'mxk.text.synchr' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onSynchr($event, data.id)">{{ 'mxk.text.synchr'
|
<button nz-button type="button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' | i18n }}</button>
|
||||||
| i18n }}</button>
|
<button
|
||||||
<button nz-button type="button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' |
|
nz-button
|
||||||
i18n }}</button>
|
type="button"
|
||||||
<button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
|
nz-popconfirm
|
||||||
}}</button>
|
nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
||||||
</div>
|
nzPopconfirmPlacement="left"
|
||||||
</td>
|
[nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
|
||||||
</tr>
|
[nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
|
||||||
|
(nzOnConfirm)="onDelete(data.id)"
|
||||||
|
nzDanger
|
||||||
|
>{{ 'mxk.text.delete' | i18n }}</button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</nz-table>
|
</nz-table>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -107,8 +107,7 @@ export class SynchronizersComponent implements OnInit {
|
|||||||
|
|
||||||
onReset(): void {}
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.synchronizersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.synchronizersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -169,8 +168,7 @@ export class SynchronizersComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.synchronizersService.delete(deleteId).subscribe(res => {
|
this.synchronizersService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -8,23 +8,39 @@
|
|||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="groupName">{{ 'mxk.groups.name' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="groupName">{{ 'mxk.groups.name' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="groupQuery.params.groupName" [ngModelOptions]="{ standalone: true }"
|
<input
|
||||||
name="groupName" placeholder="" id="groupName" />
|
nz-input
|
||||||
|
[(ngModel)]="groupQuery.params.groupName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="groupName"
|
||||||
|
placeholder=""
|
||||||
|
id="groupName"
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="8" [class.text-right]="groupQuery.expandForm">
|
<div nz-col [nzSpan]="8" [class.text-right]="groupQuery.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="groupQuery.submitLoading">{{
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="groupQuery.submitLoading">{{
|
||||||
'mxk.text.query' | i18n
|
'mxk.text.query' | i18n
|
||||||
}}</button>
|
}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
<nz-table
|
||||||
[nzData]="groupQuery.results.rows" [nzFrontPagination]="false" [nzTotal]="groupQuery.results.records"
|
#dynamicTable
|
||||||
[nzPageSizeOptions]="groupQuery.params.pageSizeOptions" [nzPageSize]="groupQuery.params.pageSize"
|
nzTableLayout="auto"
|
||||||
[nzPageIndex]="groupQuery.params.pageNumber" [nzLoading]="this.groupQuery.tableLoading"
|
nzSize="small"
|
||||||
(nzQueryParams)="onGroupQueryParamsChange($event)">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
@ -35,8 +51,11 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of groupQuery.results.rows">
|
<tr *ngFor="let data of groupQuery.results.rows">
|
||||||
<td [nzChecked]="groupQuery.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onGroupTableItemChecked(data.id, data.groupName, $event)"></td>
|
[nzChecked]="groupQuery.tableCheckedId.has(data.id)"
|
||||||
|
[nzDisabled]="data.disabled"
|
||||||
|
(nzCheckedChange)="onGroupTableItemChecked(data.id, data.groupName, $event)"
|
||||||
|
></td>
|
||||||
<td nzAlign="left" style="display: none">
|
<td nzAlign="left" style="display: none">
|
||||||
<span>{{ data.id }}</span>
|
<span>{{ data.id }}</span>
|
||||||
</td>
|
</td>
|
||||||
@ -55,25 +74,37 @@
|
|||||||
<div nz-col nzMd="8" nzSm="24">
|
<div nz-col nzMd="8" nzSm="24">
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="groupName">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="groupName">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
||||||
<input nz-input [(ngModel)]="query.params.groupName" [ngModelOptions]="{ standalone: true }" readonly
|
<input
|
||||||
disabled placeholder="" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.groupName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
readonly
|
||||||
|
disabled
|
||||||
|
placeholder=""
|
||||||
|
/>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col nzMd="8" nzSm="24">
|
<div nz-col nzMd="8" nzSm="24">
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="name">{{ 'mxk.users.username' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="name">{{ 'mxk.users.username' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="query.params.username" [ngModelOptions]="{ standalone: true }"
|
<input
|
||||||
name="username" placeholder="" id="username" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.username"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="username"
|
||||||
|
placeholder=""
|
||||||
|
id="username"
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query'
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||||
| i18n }}</button>
|
|
||||||
<button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ 'mxk.text.reset' | 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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -81,24 +112,46 @@
|
|||||||
<nz-card [nzBordered]="false">
|
<nz-card [nzBordered]="false">
|
||||||
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
<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">
|
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n
|
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
}}</button>
|
<button
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger
|
nz-button
|
||||||
class="mx-sm">{{
|
type="button"
|
||||||
'mxk.text.delete' | i18n
|
nz-popconfirm
|
||||||
}}</button>
|
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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div nz-col nzMd="24" nzSm="24">
|
<div nz-col nzMd="24" nzSm="24">
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
<nz-table
|
||||||
[nzData]="query.results.rows" [nzFrontPagination]="false" [nzTotal]="query.results.records"
|
#dynamicTable
|
||||||
[nzPageSizeOptions]="query.params.pageSizeOptions" [nzPageSize]="query.params.pageSize"
|
nzTableLayout="auto"
|
||||||
[nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
|
nzSize="small"
|
||||||
(nzQueryParams)="onQueryParamsChange($event)">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
<th
|
||||||
(nzCheckedChange)="onTableAllChecked($event)"></th>
|
[nzChecked]="query.checked"
|
||||||
|
[nzIndeterminate]="query.indeterminate"
|
||||||
|
(nzCheckedChange)="onTableAllChecked($event)"
|
||||||
|
></th>
|
||||||
<th nzAlign="center">{{ 'mxk.roles.name' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.roles.name' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.users.username' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.users.username' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.users.displayName' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.users.displayName' | i18n }}</th>
|
||||||
@ -110,21 +163,32 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of query.results.rows">
|
<tr *ngFor="let data of query.results.rows">
|
||||||
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></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.groupName }}</td>
|
||||||
<td nzAlign="left"> {{ data.username }}</td>
|
<td nzAlign="left"> {{ data.username }}</td>
|
||||||
<td nzAlign="left"> {{ data.displayName }}</td>
|
<td nzAlign="left"> {{ data.displayName }}</td>
|
||||||
<td nzAlign="left"> {{ data.department }}</td>
|
<td nzAlign="left"> {{ data.department }}</td>
|
||||||
<td nzAlign="left"> {{ data.jobTitle }}</td>
|
<td nzAlign="left"> {{ data.jobTitle }}</td>
|
||||||
<td nzAlign="center"> {{ data.gender == 1 ? ('mxk.users.gender.female' | i18n) :
|
<td nzAlign="center"> {{ data.gender == 1 ? ('mxk.users.gender.female' | i18n) : ('mxk.users.gender.male' | i18n) }}</td>
|
||||||
('mxk.users.gender.male' | i18n) }}</td>
|
|
||||||
<td nzAlign="center" nzBreakWord="false">
|
<td nzAlign="center" nzBreakWord="false">
|
||||||
<div nz-col>
|
<div nz-col>
|
||||||
<button *ngIf="data.category == 'static'" nz-button type="button"
|
<button
|
||||||
(click)="onDelete($event, data.id)" nzDanger>{{
|
*ngIf="data.category == 'static'"
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -135,4 +199,4 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -68,33 +68,33 @@ export class GroupMembersComponent implements OnInit {
|
|||||||
indeterminate: boolean;
|
indeterminate: boolean;
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
} = {
|
} = {
|
||||||
params: {
|
params: {
|
||||||
groupName: '',
|
groupName: '',
|
||||||
displayName: '',
|
displayName: '',
|
||||||
username: '',
|
username: '',
|
||||||
groupId: '',
|
groupId: '',
|
||||||
appName: '',
|
appName: '',
|
||||||
appId: '',
|
appId: '',
|
||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: '',
|
endDate: '',
|
||||||
startDatePicker: addDays(new Date(), -30),
|
startDatePicker: addDays(new Date(), -30),
|
||||||
endDatePicker: new Date(),
|
endDatePicker: new Date(),
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSizeOptions: [10, 20, 50]
|
pageSizeOptions: [10, 20, 50]
|
||||||
},
|
},
|
||||||
results: {
|
results: {
|
||||||
records: 0,
|
records: 0,
|
||||||
rows: []
|
rows: []
|
||||||
},
|
},
|
||||||
expandForm: false,
|
expandForm: false,
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
tableInitialize: true,
|
tableInitialize: true,
|
||||||
tableCheckedId: new Set<String>(),
|
tableCheckedId: new Set<String>(),
|
||||||
indeterminate: false,
|
indeterminate: false,
|
||||||
checked: false
|
checked: false
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalService: NzModalService,
|
private modalService: NzModalService,
|
||||||
@ -106,7 +106,7 @@ export class GroupMembersComponent implements OnInit {
|
|||||||
@Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
|
@Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private cdr: ChangeDetectorRef
|
private cdr: ChangeDetectorRef
|
||||||
) { }
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.route.snapshot.queryParams['username']) {
|
if (this.route.snapshot.queryParams['username']) {
|
||||||
@ -138,8 +138,7 @@ export class GroupMembersComponent implements OnInit {
|
|||||||
this.fetch();
|
this.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.groupMembersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.groupMembersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -210,8 +209,7 @@ export class GroupMembersComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.groupMembersService.delete(deleteId).subscribe(res => {
|
this.groupMembersService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -288,23 +286,23 @@ export class GroupMembersComponent implements OnInit {
|
|||||||
indeterminate: boolean;
|
indeterminate: boolean;
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
} = {
|
} = {
|
||||||
params: {
|
params: {
|
||||||
groupName: '',
|
groupName: '',
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSizeOptions: [10, 20, 50]
|
pageSizeOptions: [10, 20, 50]
|
||||||
},
|
},
|
||||||
results: {
|
results: {
|
||||||
records: 0,
|
records: 0,
|
||||||
rows: []
|
rows: []
|
||||||
},
|
},
|
||||||
expandForm: false,
|
expandForm: false,
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
tableCheckedId: new Set<String>(),
|
tableCheckedId: new Set<String>(),
|
||||||
indeterminate: false,
|
indeterminate: false,
|
||||||
checked: false
|
checked: false
|
||||||
};
|
};
|
||||||
|
|
||||||
onGroupSearch(): void {
|
onGroupSearch(): void {
|
||||||
this.fetchGroup();
|
this.fetchGroup();
|
||||||
|
|||||||
@ -32,9 +32,20 @@
|
|||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
<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" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
<button
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<nz-table
|
<nz-table
|
||||||
#dynamicTable
|
#dynamicTable
|
||||||
@ -92,7 +103,12 @@
|
|||||||
<li
|
<li
|
||||||
nz-menu-item
|
nz-menu-item
|
||||||
*ngIf="data.roleCode != 'ROLE_ADMINISTRATORS' && data.roleCode != 'ROLE_ALL_USER' && data.roleCode != 'ROLE_MANAGERS'"
|
*ngIf="data.roleCode != 'ROLE_ADMINISTRATORS' && data.roleCode != 'ROLE_ALL_USER' && data.roleCode != 'ROLE_MANAGERS'"
|
||||||
(click)="onDelete($event, data.id)"
|
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
|
nzDanger
|
||||||
>{{ 'mxk.text.delete' | i18n }}</li
|
>{{ 'mxk.text.delete' | i18n }}</li
|
||||||
>
|
>
|
||||||
|
|||||||
@ -59,29 +59,29 @@ export class GroupsComponent implements OnInit {
|
|||||||
indeterminate: boolean;
|
indeterminate: boolean;
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
} = {
|
} = {
|
||||||
params: {
|
params: {
|
||||||
groupName: '',
|
groupName: '',
|
||||||
displayName: '',
|
displayName: '',
|
||||||
employeeNumber: '',
|
employeeNumber: '',
|
||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: '',
|
endDate: '',
|
||||||
startDatePicker: addDays(new Date(), -30),
|
startDatePicker: addDays(new Date(), -30),
|
||||||
endDatePicker: new Date(),
|
endDatePicker: new Date(),
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSizeOptions: [10, 20, 50]
|
pageSizeOptions: [10, 20, 50]
|
||||||
},
|
},
|
||||||
results: {
|
results: {
|
||||||
records: 0,
|
records: 0,
|
||||||
rows: []
|
rows: []
|
||||||
},
|
},
|
||||||
expandForm: false,
|
expandForm: false,
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
tableCheckedId: new Set<String>(),
|
tableCheckedId: new Set<String>(),
|
||||||
indeterminate: false,
|
indeterminate: false,
|
||||||
checked: false
|
checked: false
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalService: NzModalService,
|
private modalService: NzModalService,
|
||||||
@ -92,7 +92,7 @@ export class GroupsComponent implements OnInit {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
@Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
|
@Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
|
||||||
private cdr: ChangeDetectorRef
|
private cdr: ChangeDetectorRef
|
||||||
) { }
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.fetch();
|
this.fetch();
|
||||||
@ -108,10 +108,9 @@ export class GroupsComponent implements OnInit {
|
|||||||
this.fetch();
|
this.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
onReset(): void { }
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.groupsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.groupsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -162,8 +161,7 @@ export class GroupsComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.groupsService.delete(deleteId).subscribe(res => {
|
this.groupsService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -7,18 +7,23 @@
|
|||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="orgName">{{ 'mxk.organizations.name' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="orgName">{{ 'mxk.organizations.name' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="query.params.orgName" [ngModelOptions]="{ standalone: true }" name="orgName"
|
<input
|
||||||
placeholder="" id="orgName" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.orgName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="orgName"
|
||||||
|
placeholder=""
|
||||||
|
id="orgName"
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||||
i18n }}</button>
|
<button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' | 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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -27,13 +32,31 @@
|
|||||||
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
<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">
|
<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" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
<button
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col nzMd="6" nzSm="24" class="grid-border">
|
<div nz-col nzMd="6" nzSm="24" class="grid-border">
|
||||||
<nz-tree nzShowLine="false" [nzCheckable]="treeNodes.checkable" nzBlockNode [nzData]="treeNodes.nodes"
|
<nz-tree
|
||||||
(nzClick)="activeNode($event)" (nzDblClick)="openFolder($event)" [nzTreeTemplate]="nzTreeTemplate"></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">
|
<ng-template #nzTreeTemplate let-node let-origin="origin">
|
||||||
<span class="custom-node">
|
<span class="custom-node">
|
||||||
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)">
|
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)">
|
||||||
@ -54,51 +77,71 @@
|
|||||||
</nz-dropdown-menu>
|
</nz-dropdown-menu>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col nzMd="18" nzSm="24" class="grid-border">
|
<div nz-col nzMd="18" nzSm="24" class="grid-border">
|
||||||
<nz-table #dynamicTable nzBordered nzShowSizeChanger nzSize="small" [nzData]="query.results.rows" [nzFrontPagination]="false"
|
<nz-table
|
||||||
[nzTotal]="query.results.records" [nzPageSizeOptions]="query.params.pageSizeOptions"
|
#dynamicTable
|
||||||
[nzPageSize]="query.params.pageSize" [nzPageIndex]="query.params.pageNumber"
|
nzBordered
|
||||||
[nzLoading]="this.query.tableLoading" (nzQueryParams)="onQueryParamsChange($event)" nzWidth="100%">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||||
(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.code' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_2">{{ 'mxk.organizations.name' | 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>
|
||||||
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.organizations.type' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.sortIndex' | i18n }}</th>
|
||||||
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.sortIndex' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.status' | i18n }}</th>
|
||||||
<th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.status' | i18n }}</th>
|
<th nzAlign="center" class="table_cell_action_2">{{ 'mxk.text.action' | i18n }}</th>
|
||||||
<th nzAlign="center" class="table_cell_action_2">{{ 'mxk.text.action' | i18n }}</th>
|
</tr>
|
||||||
</tr>
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of query.results.rows">
|
<tr *ngFor="let data of query.results.rows">
|
||||||
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
|
[nzChecked]="query.tableCheckedId.has(data.id)"
|
||||||
<td nzAlign="left">
|
[nzDisabled]="data.disabled"
|
||||||
<span>{{ data.orgCode }}</span>
|
(nzCheckedChange)="onTableItemChecked(data.id, $event)"
|
||||||
</td>
|
></td>
|
||||||
<td nzAlign="left"> {{ data.orgName }}</td>
|
<td nzAlign="left">
|
||||||
<td nzAlign="center" *ngIf="data.type == 'company'"> {{ 'mxk.organizations.type.company' | i18n }}</td>
|
<span>{{ data.orgCode }}</span>
|
||||||
<td nzAlign="center" *ngIf="data.type == 'division'"> {{ 'mxk.organizations.type.division' | i18n }}</td>
|
</td>
|
||||||
<td nzAlign="center" *ngIf="data.type == 'department'"> {{ 'mxk.organizations.type.department' | i18n }}
|
<td nzAlign="left"> {{ data.orgName }}</td>
|
||||||
</td>
|
<td nzAlign="center" *ngIf="data.type == 'company'"> {{ 'mxk.organizations.type.company' | i18n }}</td>
|
||||||
<td nzAlign="center" *ngIf="data.type == 'entity'"> {{ 'mxk.organizations.type.entity' | i18n }}</td>
|
<td nzAlign="center" *ngIf="data.type == 'division'"> {{ 'mxk.organizations.type.division' | i18n }}</td>
|
||||||
<td nzAlign="center" *ngIf="data.type == 'virtual'"> {{ 'mxk.organizations.type.virtual' | i18n }}</td>
|
<td nzAlign="center" *ngIf="data.type == 'department'"> {{ 'mxk.organizations.type.department' | i18n }} </td>
|
||||||
<td nzAlign="center"> {{ data.sortIndex }}</td>
|
<td nzAlign="center" *ngIf="data.type == 'entity'"> {{ 'mxk.organizations.type.entity' | i18n }}</td>
|
||||||
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
|
<td nzAlign="center" *ngIf="data.type == 'virtual'"> {{ 'mxk.organizations.type.virtual' | i18n }}</td>
|
||||||
style="color: green"></i></td>
|
<td nzAlign="center"> {{ data.sortIndex }}</td>
|
||||||
<td nzAlign="center" nzBreakWord="false">
|
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"></i></td>
|
||||||
<div nz-col>
|
<td nzAlign="center" nzBreakWord="false">
|
||||||
<button nz-button type="button" (click)="onEdit($event, data.id)">
|
<div nz-col>
|
||||||
{{ 'mxk.text.edit' | i18n }}
|
<button nz-button type="button" (click)="onEdit($event, data.id)">
|
||||||
</button>
|
{{ 'mxk.text.edit' | i18n }}
|
||||||
<button
|
</button>
|
||||||
*ngIf="data.parentId != null && data.parentId != '-1' && data.parentId != '0' && data.id != data.instId"
|
<button
|
||||||
nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
|
*ngIf="data.parentId != null && data.parentId != '-1' && data.parentId != '0' && data.id != data.instId"
|
||||||
}}</button>
|
nz-button
|
||||||
</div>
|
type="button"
|
||||||
</td>
|
nz-popconfirm
|
||||||
</tr>
|
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
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</nz-table>
|
</nz-table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -141,8 +141,7 @@ export class OrganizationsComponent implements OnInit {
|
|||||||
|
|
||||||
onReset(): void {}
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.orgsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.orgsService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -198,8 +197,7 @@ export class OrganizationsComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.orgsService.delete(deleteId).subscribe(res => {
|
this.orgsService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -37,7 +37,19 @@
|
|||||||
<button nz-button type="button" [nzType]="'primary'" (click)="changePassword($event)">
|
<button nz-button type="button" [nzType]="'primary'" (click)="changePassword($event)">
|
||||||
{{ 'mxk.text.changepassword' | i18n }}
|
{{ 'mxk.text.changepassword' | i18n }}
|
||||||
</button>
|
</button>
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">
|
<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.delete' | i18n }}
|
{{ 'mxk.text.delete' | i18n }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -169,7 +181,17 @@
|
|||||||
<li nz-menu-item *ngIf="data.status == 5" (click)="onUpdateStatus($event, data.id, 1)">{{
|
<li nz-menu-item *ngIf="data.status == 5" (click)="onUpdateStatus($event, data.id, 1)">{{
|
||||||
'mxk.text.unlock' | i18n
|
'mxk.text.unlock' | i18n
|
||||||
}}</li>
|
}}</li>
|
||||||
<li nz-menu-item (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n }}</li>
|
<li
|
||||||
|
nz-menu-item
|
||||||
|
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>
|
</ul>
|
||||||
</nz-dropdown-menu>
|
</nz-dropdown-menu>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -118,8 +118,7 @@ export class UsersComponent implements OnInit {
|
|||||||
|
|
||||||
onReset(): void {}
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.usersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.usersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -239,8 +238,7 @@ export class UsersComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.usersService.delete(deleteId).subscribe(res => {
|
this.usersService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.operate.success'));
|
||||||
|
|||||||
@ -6,26 +6,30 @@
|
|||||||
<div nz-col nzMd="10" nzSm="24">
|
<div nz-col nzMd="10" nzSm="24">
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="name">{{ 'mxk.resources.appName' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="name">{{ 'mxk.resources.appName' | i18n }}</nz-form-label>
|
||||||
<input nz-input [(ngModel)]="query.params.appName" [ngModelOptions]="{ standalone: true }" disabled
|
<input nz-input [(ngModel)]="query.params.appName" [ngModelOptions]="{ standalone: true }" disabled placeholder="" />
|
||||||
placeholder="" />
|
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col nzMd="10" nzSm="24">
|
<div nz-col nzMd="10" nzSm="24">
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="resourceName">{{ 'mxk.resources.name' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="resourceName">{{ 'mxk.resources.name' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="query.params.resourceName" [ngModelOptions]="{ standalone: true }"
|
<input
|
||||||
name="resourceName" placeholder="" id="resourceName" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.resourceName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="resourceName"
|
||||||
|
placeholder=""
|
||||||
|
id="resourceName"
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 4" [class.text-right]="query.expandForm">
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 4" [class.text-right]="query.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||||
i18n }}</button>
|
<button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' | 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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -34,13 +38,31 @@
|
|||||||
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
<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">
|
<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" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
<button
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col nzMd="6" nzSm="24" class="grid-border">
|
<div nz-col nzMd="6" nzSm="24" class="grid-border">
|
||||||
<nz-tree nzShowLine="false" [nzCheckable]="treeNodes.checkable" nzBlockNode [nzData]="treeNodes.nodes"
|
<nz-tree
|
||||||
(nzClick)="activeNode($event)" (nzDblClick)="openFolder($event)" [nzTreeTemplate]="nzTreeTemplate"></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">
|
<ng-template #nzTreeTemplate let-node let-origin="origin">
|
||||||
<span class="custom-node">
|
<span class="custom-node">
|
||||||
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)">
|
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)">
|
||||||
@ -61,15 +83,25 @@
|
|||||||
</nz-dropdown-menu>
|
</nz-dropdown-menu>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col nzMd="18" nzSm="24" class="grid-border">
|
<div nz-col nzMd="18" nzSm="24" class="grid-border">
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
<nz-table
|
||||||
[nzData]="query.results.rows" [nzFrontPagination]="false" [nzTotal]="query.results.records"
|
#dynamicTable
|
||||||
[nzPageSizeOptions]="query.params.pageSizeOptions" [nzPageSize]="query.params.pageSize"
|
nzTableLayout="auto"
|
||||||
[nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
|
nzSize="small"
|
||||||
(nzQueryParams)="onQueryParamsChange($event)" nzWidth="100%">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||||
(nzCheckedChange)="onTableAllChecked($event)"></th>
|
|
||||||
<th nzAlign="center">{{ 'mxk.resources.appName' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.resources.appName' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.resources.name' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.resources.name' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.resources.resourceType' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.resources.resourceType' | i18n }}</th>
|
||||||
@ -80,21 +112,33 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of query.results.rows">
|
<tr *ngFor="let data of query.results.rows">
|
||||||
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
|
[nzChecked]="query.tableCheckedId.has(data.id)"
|
||||||
|
[nzDisabled]="data.disabled"
|
||||||
|
(nzCheckedChange)="onTableItemChecked(data.id, $event)"
|
||||||
|
></td>
|
||||||
<td nzAlign="center">
|
<td nzAlign="center">
|
||||||
{{ data.appName }}
|
{{ data.appName }}
|
||||||
</td>
|
</td>
|
||||||
<td nzAlign="left"> {{ data.resourceName }}</td>
|
<td nzAlign="left"> {{ data.resourceName }}</td>
|
||||||
<td nzAlign="left"> {{ data.resourceType }}</td>
|
<td nzAlign="left"> {{ data.resourceType }}</td>
|
||||||
<td nzAlign="center"> {{ data.sortIndex }}</td>
|
<td nzAlign="center"> {{ data.sortIndex }}</td>
|
||||||
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
|
<td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"></i></td>
|
||||||
style="color: green"></i></td>
|
|
||||||
<td nzAlign="center" nzBreakWord="false">
|
<td nzAlign="center" nzBreakWord="false">
|
||||||
<div nz-col>
|
<div nz-col>
|
||||||
<button nz-button type="button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' | i18n }}</button>
|
<button nz-button type="button" (click)="onEdit($event, data.id)">{{ '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"
|
||||||
|
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
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -102,4 +146,4 @@
|
|||||||
</nz-table>
|
</nz-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -128,8 +128,7 @@ export class ResourcesComponent implements OnInit {
|
|||||||
|
|
||||||
onReset(): void {}
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.resourcesService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.resourcesService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -205,8 +204,7 @@ export class ResourcesComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.resourcesService.delete(deleteId).subscribe(res => {
|
this.resourcesService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -18,16 +18,26 @@
|
|||||||
<div nz-col [nzSpan]="leftQuery.expandForm ? 24 : 6" [class.text-right]="leftQuery.expandForm">
|
<div nz-col [nzSpan]="leftQuery.expandForm ? 24 : 6" [class.text-right]="leftQuery.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="leftQuery.submitLoading">{{
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="leftQuery.submitLoading">{{
|
||||||
'mxk.text.query' | i18n
|
'mxk.text.query' | i18n
|
||||||
}}</button>
|
}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
<nz-table
|
||||||
[nzData]="leftQuery.results.rows" [nzFrontPagination]="false" [nzTotal]="leftQuery.results.records"
|
#dynamicTable
|
||||||
[nzPageSizeOptions]="leftQuery.params.pageSizeOptions" [nzPageSize]="leftQuery.params.pageSize"
|
nzTableLayout="auto"
|
||||||
[nzPageIndex]="leftQuery.params.pageNumber" [nzLoading]="this.leftQuery.tableLoading"
|
nzSize="small"
|
||||||
(nzQueryParams)="onLeftQueryParamsChange($event)">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<!--<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
<!--<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||||
@ -39,8 +49,11 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of leftQuery.results.rows">
|
<tr *ngFor="let data of leftQuery.results.rows">
|
||||||
<td [nzChecked]="leftQuery.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onLeftTableItemChecked(data.id, data.roleName, $event)"></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" style="width: 300px">{{ data.id }}</td>
|
||||||
<td nzAlign="left" nzBreakWord="false">{{ data.roleName }}</td>
|
<td nzAlign="left" nzBreakWord="false">{{ data.roleName }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -54,25 +67,29 @@
|
|||||||
<div nz-col nzMd="8" nzSm="24">
|
<div nz-col nzMd="8" nzSm="24">
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="name">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="name">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
||||||
<input nz-input [(ngModel)]="query.params.selectRoleName" [ngModelOptions]="{ standalone: true }"
|
<input nz-input [(ngModel)]="query.params.selectRoleName" [ngModelOptions]="{ standalone: true }" disabled />
|
||||||
disabled />
|
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col nzMd="8" nzSm="24">
|
<div nz-col nzMd="8" nzSm="24">
|
||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="name">{{ 'mxk.roles.member' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="name">{{ 'mxk.roles.member' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="query.params.memberName" [ngModelOptions]="{ standalone: true }"
|
<input
|
||||||
name="memberName" placeholder="" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.memberName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="memberName"
|
||||||
|
placeholder=""
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query'
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||||
| i18n }}</button>
|
|
||||||
<button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ 'mxk.text.reset' | 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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -80,24 +97,46 @@
|
|||||||
<nz-card [nzBordered]="false">
|
<nz-card [nzBordered]="false">
|
||||||
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
<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">
|
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
||||||
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n
|
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
}}</button>
|
<button
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger
|
nz-button
|
||||||
class="mx-sm">{{
|
type="button"
|
||||||
'mxk.text.delete' | i18n
|
nz-popconfirm
|
||||||
}}</button>
|
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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div nz-col nzMd="24" nzSm="24">
|
<div nz-col nzMd="24" nzSm="24">
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger
|
<nz-table
|
||||||
[nzData]="query.results.rows" [nzFrontPagination]="false" [nzTotal]="query.results.records"
|
#dynamicTable
|
||||||
[nzPageSizeOptions]="query.params.pageSizeOptions" [nzPageSize]="query.params.pageSize"
|
nzTableLayout="auto"
|
||||||
[nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
|
nzSize="small"
|
||||||
(nzQueryParams)="onQueryParamsChange($event)">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
<th
|
||||||
(nzCheckedChange)="onTableAllChecked($event)"></th>
|
[nzChecked]="query.checked"
|
||||||
|
[nzIndeterminate]="query.indeterminate"
|
||||||
|
(nzCheckedChange)="onTableAllChecked($event)"
|
||||||
|
></th>
|
||||||
<th nzAlign="center">{{ 'mxk.roles.name' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.roles.name' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.roles.type' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.roles.type' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.roles.member' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.roles.member' | i18n }}</th>
|
||||||
@ -109,12 +148,14 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of query.results.rows">
|
<tr *ngFor="let data of query.results.rows">
|
||||||
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
|
[nzChecked]="query.tableCheckedId.has(data.id)"
|
||||||
|
[nzDisabled]="data.disabled"
|
||||||
|
(nzCheckedChange)="onTableItemChecked(data.id, $event)"
|
||||||
|
></td>
|
||||||
<td nzAlign="left"> {{ data.roleName }}</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'"> {{ 'mxk.roles.type.user' | i18n }}</td>
|
||||||
<td nzAlign="center" *ngIf="data.type == 'USER-DYNAMIC'"> {{ 'mxk.roles.type.user-dynamic' | i18n }}
|
<td nzAlign="center" *ngIf="data.type == 'USER-DYNAMIC'"> {{ 'mxk.roles.type.user-dynamic' | i18n }} </td>
|
||||||
</td>
|
|
||||||
<td nzAlign="center" *ngIf="data.type == 'POST'"> {{ 'mxk.roles.type.post' | 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.memberName }}</td>
|
||||||
<td nzAlign="left"> {{ data.jobTitle }}</td>
|
<td nzAlign="left"> {{ data.jobTitle }}</td>
|
||||||
@ -125,10 +166,19 @@
|
|||||||
<td nzAlign="left"> {{ data.department }}</td>
|
<td nzAlign="left"> {{ data.department }}</td>
|
||||||
<td nzAlign="center" nzBreakWord="false">
|
<td nzAlign="center" nzBreakWord="false">
|
||||||
<div nz-col>
|
<div nz-col>
|
||||||
<button *ngIf="data.type != 'USER-DYNAMIC'" nz-button type="button"
|
<button
|
||||||
(click)="onDelete($event, data.id)" nzDanger>{{
|
*ngIf="data.type != 'USER-DYNAMIC'"
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -139,4 +189,4 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -53,34 +53,34 @@ export class RoleMembersComponent implements OnInit {
|
|||||||
indeterminate: boolean;
|
indeterminate: boolean;
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
} = {
|
} = {
|
||||||
params: {
|
params: {
|
||||||
roleName: '',
|
roleName: '',
|
||||||
displayName: '',
|
displayName: '',
|
||||||
memberName: '',
|
memberName: '',
|
||||||
roleId: '',
|
roleId: '',
|
||||||
appName: '',
|
appName: '',
|
||||||
appId: '',
|
appId: '',
|
||||||
selectRoleName: '',
|
selectRoleName: '',
|
||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: '',
|
endDate: '',
|
||||||
startDatePicker: addDays(new Date(), -30),
|
startDatePicker: addDays(new Date(), -30),
|
||||||
endDatePicker: new Date(),
|
endDatePicker: new Date(),
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSizeOptions: [10, 20, 50]
|
pageSizeOptions: [10, 20, 50]
|
||||||
},
|
},
|
||||||
results: {
|
results: {
|
||||||
records: 0,
|
records: 0,
|
||||||
rows: []
|
rows: []
|
||||||
},
|
},
|
||||||
expandForm: false,
|
expandForm: false,
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
tableInitialize: true,
|
tableInitialize: true,
|
||||||
tableCheckedId: new Set<String>(),
|
tableCheckedId: new Set<String>(),
|
||||||
indeterminate: false,
|
indeterminate: false,
|
||||||
checked: false
|
checked: false
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalService: NzModalService,
|
private modalService: NzModalService,
|
||||||
@ -92,7 +92,7 @@ export class RoleMembersComponent implements OnInit {
|
|||||||
@Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
|
@Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private cdr: ChangeDetectorRef
|
private cdr: ChangeDetectorRef
|
||||||
) { }
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.route.snapshot.queryParams['username']) {
|
if (this.route.snapshot.queryParams['username']) {
|
||||||
@ -134,8 +134,7 @@ export class RoleMembersComponent implements OnInit {
|
|||||||
this.fetch();
|
this.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.roleMembersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.roleMembersService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -206,8 +205,7 @@ export class RoleMembersComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.roleMembersService.delete(deleteId).subscribe(res => {
|
this.roleMembersService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -289,29 +287,29 @@ export class RoleMembersComponent implements OnInit {
|
|||||||
indeterminate: boolean;
|
indeterminate: boolean;
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
} = {
|
} = {
|
||||||
params: {
|
params: {
|
||||||
id: '',
|
id: '',
|
||||||
roleName: '',
|
roleName: '',
|
||||||
appId: '',
|
appId: '',
|
||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: '',
|
endDate: '',
|
||||||
startDatePicker: addDays(new Date(), -30),
|
startDatePicker: addDays(new Date(), -30),
|
||||||
endDatePicker: new Date(),
|
endDatePicker: new Date(),
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSizeOptions: [10, 20, 50]
|
pageSizeOptions: [10, 20, 50]
|
||||||
},
|
},
|
||||||
results: {
|
results: {
|
||||||
records: 0,
|
records: 0,
|
||||||
rows: []
|
rows: []
|
||||||
},
|
},
|
||||||
expandForm: false,
|
expandForm: false,
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
tableCheckedId: new Set<String>(),
|
tableCheckedId: new Set<String>(),
|
||||||
indeterminate: false,
|
indeterminate: false,
|
||||||
checked: false
|
checked: false
|
||||||
};
|
};
|
||||||
|
|
||||||
//LEFT TABLE
|
//LEFT TABLE
|
||||||
onLeftSearch(): void {
|
onLeftSearch(): void {
|
||||||
|
|||||||
@ -7,19 +7,24 @@
|
|||||||
<nz-form-item>
|
<nz-form-item>
|
||||||
<nz-form-label nzFor="name">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
<nz-form-label nzFor="name">{{ 'mxk.roles.name' | i18n }}</nz-form-label>
|
||||||
<nz-form-control>
|
<nz-form-control>
|
||||||
<input nz-input [(ngModel)]="query.params.roleName" [ngModelOptions]="{ standalone: true }" name="roleName"
|
<input
|
||||||
placeholder="" id="roleName" />
|
nz-input
|
||||||
|
[(ngModel)]="query.params.roleName"
|
||||||
|
[ngModelOptions]="{ standalone: true }"
|
||||||
|
name="roleName"
|
||||||
|
placeholder=""
|
||||||
|
id="roleName"
|
||||||
|
/>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
||||||
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
|
<button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
||||||
i18n }}</button>
|
<button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' | 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">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -27,18 +32,40 @@
|
|||||||
<nz-card>
|
<nz-card>
|
||||||
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
<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" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
||||||
<button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
<button
|
||||||
'mxk.text.delete' | i18n
|
nz-button
|
||||||
}}</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.delete' | i18n }}</button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger [nzData]="query.results.rows"
|
<nz-table
|
||||||
[nzFrontPagination]="false" [nzTotal]="query.results.records" [nzPageSizeOptions]="query.params.pageSizeOptions"
|
#dynamicTable
|
||||||
[nzPageSize]="query.params.pageSize" [nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
|
nzTableLayout="auto"
|
||||||
(nzQueryParams)="onQueryParamsChange($event)" nzWidth="100%">
|
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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
<th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
||||||
(nzCheckedChange)="onTableAllChecked($event)"></th>
|
|
||||||
<th nzAlign="center" style="display: none">Id</th>
|
<th nzAlign="center" style="display: none">Id</th>
|
||||||
<th nzAlign="center">{{ 'mxk.roles.name' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.roles.name' | i18n }}</th>
|
||||||
<th nzAlign="center">{{ 'mxk.roles.category' | i18n }}</th>
|
<th nzAlign="center">{{ 'mxk.roles.category' | i18n }}</th>
|
||||||
@ -48,8 +75,11 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let data of query.results.rows">
|
<tr *ngFor="let data of query.results.rows">
|
||||||
<td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
<td
|
||||||
(nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
|
[nzChecked]="query.tableCheckedId.has(data.id)"
|
||||||
|
[nzDisabled]="data.disabled"
|
||||||
|
(nzCheckedChange)="onTableItemChecked(data.id, $event)"
|
||||||
|
></td>
|
||||||
<td nzAlign="left" style="display: none">
|
<td nzAlign="left" style="display: none">
|
||||||
<span>{{ data.id }}</span>
|
<span>{{ data.id }}</span>
|
||||||
</td>
|
</td>
|
||||||
@ -61,17 +91,26 @@
|
|||||||
<td nzAlign="center" nzBreakWord="false" width="350px">
|
<td nzAlign="center" nzBreakWord="false" width="350px">
|
||||||
<div nz-col>
|
<div nz-col>
|
||||||
<button nz-button type=" button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' | i18n }}</button>
|
<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' |
|
<button nz-button type="button" (click)="onMembers($event, data.id, data.roleName)">{{ 'mxk.roles.member' | i18n }}</button>
|
||||||
i18n }}</button>
|
|
||||||
<button nz-button type="button" (click)="onPermissions($event, data.id, data.roleName)">{{
|
<button nz-button type="button" (click)="onPermissions($event, data.id, data.roleName)">{{
|
||||||
'mxk.roles.permissions' | i18n
|
'mxk.roles.permissions' | i18n
|
||||||
}}</button>
|
}}</button>
|
||||||
<button nz-button type="button" (click)="onDelete($event, data.id)"
|
<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)"
|
||||||
*ngIf="data.roleCode != 'ROLE_ADMINISTRATORS' && data.roleCode != 'ROLE_ALL_USER' && data.roleCode != 'ROLE_MANAGERS'"
|
*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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</nz-table>
|
</nz-table>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|||||||
@ -46,31 +46,31 @@ export class RolesComponent implements OnInit {
|
|||||||
indeterminate: boolean;
|
indeterminate: boolean;
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
} = {
|
} = {
|
||||||
params: {
|
params: {
|
||||||
appId: '',
|
appId: '',
|
||||||
appName: '',
|
appName: '',
|
||||||
roleName: '',
|
roleName: '',
|
||||||
displayName: '',
|
displayName: '',
|
||||||
employeeNumber: '',
|
employeeNumber: '',
|
||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: '',
|
endDate: '',
|
||||||
startDatePicker: addDays(new Date(), -30),
|
startDatePicker: addDays(new Date(), -30),
|
||||||
endDatePicker: new Date(),
|
endDatePicker: new Date(),
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSizeOptions: [10, 20, 50]
|
pageSizeOptions: [10, 20, 50]
|
||||||
},
|
},
|
||||||
results: {
|
results: {
|
||||||
records: 0,
|
records: 0,
|
||||||
rows: []
|
rows: []
|
||||||
},
|
},
|
||||||
expandForm: false,
|
expandForm: false,
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
tableCheckedId: new Set<String>(),
|
tableCheckedId: new Set<String>(),
|
||||||
indeterminate: false,
|
indeterminate: false,
|
||||||
checked: false
|
checked: false
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalService: NzModalService,
|
private modalService: NzModalService,
|
||||||
@ -82,7 +82,7 @@ export class RolesComponent implements OnInit {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private cdr: ChangeDetectorRef
|
private cdr: ChangeDetectorRef
|
||||||
) { }
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
if (this.route.snapshot.queryParams['appId']) {
|
if (this.route.snapshot.queryParams['appId']) {
|
||||||
@ -102,10 +102,9 @@ export class RolesComponent implements OnInit {
|
|||||||
this.fetch();
|
this.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
onReset(): void { }
|
onReset(): void {}
|
||||||
|
|
||||||
onBatchDelete(e: MouseEvent): void {
|
onBatchDelete(): void {
|
||||||
e.preventDefault();
|
|
||||||
this.rolesService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
this.rolesService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
@ -183,8 +182,7 @@ export class RolesComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onDelete(e: MouseEvent, deleteId: String): void {
|
onDelete(deleteId: String): void {
|
||||||
e.preventDefault();
|
|
||||||
this.rolesService.delete(deleteId).subscribe(res => {
|
this.rolesService.delete(deleteId).subscribe(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
|
||||||
|
|||||||
@ -19,5 +19,5 @@ export const CONSTS = {
|
|||||||
INST: 'inst',
|
INST: 'inst',
|
||||||
REDIRECT_URI: 'redirect_uri',
|
REDIRECT_URI: 'redirect_uri',
|
||||||
REMEMBER: 'remember',
|
REMEMBER: 'remember',
|
||||||
VERSION: 'v4.1.0 GA'
|
VERSION: 'v4.1.1 GA'
|
||||||
};
|
};
|
||||||
|
|||||||
@ -722,7 +722,7 @@
|
|||||||
"success":"Operate Success!",
|
"success":"Operate Success!",
|
||||||
"error":"Operate Error!"
|
"error":"Operate Error!"
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
"text": {
|
"text": {
|
||||||
"action": "Action",
|
"action": "Action",
|
||||||
@ -737,6 +737,11 @@
|
|||||||
"add": "Add",
|
"add": "Add",
|
||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
|
"delete.popconfirm":{
|
||||||
|
"title":"Are you sure you want to delete it?",
|
||||||
|
"cancelText":"Cancel",
|
||||||
|
"okText":"Confirm"
|
||||||
|
},
|
||||||
"test": "Test",
|
"test": "Test",
|
||||||
"select": "Select",
|
"select": "Select",
|
||||||
"confirm": "Confirm",
|
"confirm": "Confirm",
|
||||||
@ -938,4 +943,4 @@
|
|||||||
"validation.date.required": "Please select the start and end date",
|
"validation.date.required": "Please select the start and end date",
|
||||||
"validation.goal.required": "Please enter a description of the goal",
|
"validation.goal.required": "Please enter a description of the goal",
|
||||||
"validation.standard.required": "Please enter a metric"
|
"validation.standard.required": "Please enter a metric"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -734,6 +734,11 @@
|
|||||||
"add": "新增",
|
"add": "新增",
|
||||||
"edit": "编辑",
|
"edit": "编辑",
|
||||||
"delete": "删除",
|
"delete": "删除",
|
||||||
|
"delete.popconfirm":{
|
||||||
|
"title":"请确定要删除吗?",
|
||||||
|
"cancelText":"取消",
|
||||||
|
"okText":"确定"
|
||||||
|
},
|
||||||
"test": "测试",
|
"test": "测试",
|
||||||
"select": "选择",
|
"select": "选择",
|
||||||
"confirm": "确定",
|
"confirm": "确定",
|
||||||
@ -930,4 +935,4 @@
|
|||||||
"validation.date.required": "请选择起止日期",
|
"validation.date.required": "请选择起止日期",
|
||||||
"validation.goal.required": "请输入目标描述",
|
"validation.goal.required": "请输入目标描述",
|
||||||
"validation.standard.required": "请输入衡量标准"
|
"validation.standard.required": "请输入衡量标准"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -735,6 +735,11 @@
|
|||||||
"add": "新增",
|
"add": "新增",
|
||||||
"edit": "編輯",
|
"edit": "編輯",
|
||||||
"delete": "刪除",
|
"delete": "刪除",
|
||||||
|
"delete.popconfirm":{
|
||||||
|
"title":"请确定要删除吗?",
|
||||||
|
"cancelText":"取消",
|
||||||
|
"okText":"确定"
|
||||||
|
},
|
||||||
"test": "測試",
|
"test": "測試",
|
||||||
"select": "選擇",
|
"select": "選擇",
|
||||||
"confirm": "確定",
|
"confirm": "確定",
|
||||||
@ -931,4 +936,4 @@
|
|||||||
"validation.date.required": "請選擇起止日期",
|
"validation.date.required": "請選擇起止日期",
|
||||||
"validation.goal.required": "請輸入目標描述",
|
"validation.goal.required": "請輸入目標描述",
|
||||||
"validation.standard.required": "請輸入衡量標準"
|
"validation.standard.required": "請輸入衡量標準"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user