accounts.component.html 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <page-header> </page-header>
  2. <nz-card [nzBordered]="false">
  3. <form nz-form [nzLayout]="'inline'" (ngSubmit)="onSearch()" class="search__form">
  4. <div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
  5. <div nz-col nzMd="8" nzSm="24">
  6. <nz-form-item>
  7. <nz-form-label nzFor="appName">{{ 'mxk.accounts.appName' | i18n }}</nz-form-label>
  8. <nz-form-control>
  9. <nz-input-group nzSearch [nzAddOnAfter]="suffixButton">
  10. <input nz-input [(ngModel)]="query.params.appName" [ngModelOptions]="{ standalone: true }" name="appName"
  11. readonly placeholder="" id="appName" />
  12. </nz-input-group>
  13. <ng-template #suffixButton>
  14. <button nz-button nzType="primary" (click)="onSelect($event)" nzSearch>{{ 'mxk.text.select' | i18n
  15. }}</button>
  16. </ng-template>
  17. </nz-form-control>
  18. </nz-form-item>
  19. </div>
  20. <div nz-col nzMd="8" nzSm="24">
  21. <nz-form-item>
  22. <nz-form-label nzFor="name">{{ 'mxk.accounts.username' | i18n }}</nz-form-label>
  23. <nz-form-control>
  24. <input nz-input [(ngModel)]="query.params.username" [ngModelOptions]="{ standalone: true }" name="username"
  25. placeholder="" id="username" />
  26. </nz-form-control>
  27. </nz-form-item>
  28. </div>
  29. <div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
  30. <button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
  31. i18n }}</button>
  32. <button nz-button type="reset" (click)="onReset()" class="mx-sm">{{ 'mxk.text.reset' | i18n }}</button>
  33. <button nz-button (click)="query.expandForm = !query.expandForm" class="mx-sm" style="display: none">
  34. {{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button>
  35. </div>
  36. </div>
  37. </form>
  38. </nz-card>
  39. <nz-card>
  40. <div nz-col [nzSpan]="24" class="table-list-toolbar">
  41. <button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
  42. <button nz-button type="button" nz-popconfirm nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
  43. nzPopconfirmPlacement="left" [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
  44. [nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onBatchDelete()" [nzType]="'primary'"
  45. nzDanger class="mx-sm">{{ 'mxk.text.batchDelete' | i18n }}</button>
  46. </div>
  47. <nz-table #dynamicTable nzTableLayout="auto" nzSize="small" nzBordered nzShowSizeChanger [nzData]="query.results.rows"
  48. [nzFrontPagination]="false" [nzTotal]="query.results.records" [nzPageSizeOptions]="query.params.pageSizeOptions"
  49. [nzPageSize]="query.params.pageSize" [nzPageIndex]="query.params.pageNumber" [nzLoading]="this.query.tableLoading"
  50. (nzQueryParams)="onQueryParamsChange($event)">
  51. <thead>
  52. <tr>
  53. <th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
  54. (nzCheckedChange)="onTableAllChecked($event)"></th>
  55. <th nzAlign="center" style="display: none">Id</th>
  56. <th nzAlign="center">{{ 'mxk.accounts.username' | i18n }}</th>
  57. <th nzAlign="center">{{ 'mxk.accounts.displayName' | i18n }}</th>
  58. <th nzAlign="center">{{ 'mxk.accounts.appName' | i18n }}</th>
  59. <th nzAlign="center">{{ 'mxk.accounts.relatedUsername' | i18n }}</th>
  60. <th nzAlign="center" class="table_cell_action_1">{{ 'mxk.text.action' | i18n }}</th>
  61. </tr>
  62. </thead>
  63. <tbody>
  64. <tr *ngFor="let data of query.results.rows">
  65. <td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
  66. (nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
  67. <td nzAlign="left" style="display: none">
  68. <span>{{ data.id }}</span>
  69. </td>
  70. <td nzAlign="left" nzBreakWord="false">{{ data.username }}</td>
  71. <td nzAlign="left" nzBreakWord="false">{{ data.displayName }}</td>
  72. <td nzAlign="left" nzBreakWord="false">{{ data.appName }}</td>
  73. <td nzAlign="left" nzBreakWord="false">{{ data.relatedUsername }}</td>
  74. <td nzAlign="center" nzBreakWord="false">
  75. <div nz-col>
  76. <button nz-button type="button" nz-popconfirm
  77. nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}" nzPopconfirmPlacement="left"
  78. [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
  79. [nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n" (nzOnConfirm)="onDelete(data.id)" nzDanger>{{
  80. 'mxk.text.delete' | i18n }}</button>
  81. </div>
  82. </td>
  83. </tr>
  84. </tbody>
  85. </nz-table>
  86. </nz-card>