connectors.component.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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="16" nzSm="24">
  6. <nz-form-item>
  7. <nz-form-label nzFor="connName">{{ 'mxk.connectors.connName' | i18n }}</nz-form-label>
  8. <nz-form-control>
  9. <input
  10. nz-input
  11. [(ngModel)]="query.params.connName"
  12. [ngModelOptions]="{ standalone: true }"
  13. name="connName"
  14. placeholder=""
  15. id="connName"
  16. />
  17. </nz-form-control>
  18. </nz-form-item>
  19. </div>
  20. <div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
  21. <button nz-button type="submit" [nzType]="'primary'">{{ 'mxk.text.query' | i18n }}</button>
  22. <button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' | i18n }}</button>
  23. <button nz-button (click)="query.expandForm = !query.expandForm" class="mx-sm" style="display: none">
  24. {{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button
  25. >
  26. </div>
  27. </div>
  28. </form>
  29. </nz-card>
  30. <nz-card>
  31. <div nz-col [nzSpan]="24" class="table-list-toolbar">
  32. <button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
  33. <button
  34. nz-button
  35. type="button"
  36. [disabled]="tableHasCheckedItem()"
  37. nz-popconfirm
  38. nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
  39. nzPopconfirmPlacement="left"
  40. [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
  41. [nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
  42. (nzOnConfirm)="onBatchDelete()"
  43. [nzType]="'primary'"
  44. nzDanger
  45. class="mx-sm"
  46. >{{ 'mxk.text.batchDelete' | i18n }}</button
  47. >
  48. </div>
  49. <nz-table
  50. #dynamicTable
  51. nzTableLayout="auto"
  52. nzSize="small"
  53. nzBordered
  54. nzShowSizeChanger
  55. [nzData]="query.results.rows"
  56. [nzFrontPagination]="false"
  57. [nzTotal]="query.results.records"
  58. [nzPageSizeOptions]="query.params.pageSizeOptions"
  59. [nzPageSize]="query.params.pageSize"
  60. [nzPageIndex]="query.params.pageNumber"
  61. [nzLoading]="this.query.tableLoading"
  62. (nzQueryParams)="onQueryParamsChange($event)"
  63. nzWidth="100%"
  64. >
  65. <thead>
  66. <tr>
  67. <th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
  68. <th nzAlign="center" style="display: none">Id</th>
  69. <th nzAlign="center">{{ 'mxk.connectors.connName' | i18n }}</th>
  70. <th nzAlign="center">{{ 'mxk.connectors.justInTime' | i18n }}</th>
  71. <th nzAlign="center">{{ 'mxk.text.status' | i18n }}</th>
  72. <th nzAlign="center" class="table_cell_action_2">{{ 'mxk.text.action' | i18n }}</th>
  73. </tr>
  74. </thead>
  75. <tbody>
  76. <tr *ngFor="let data of query.results.rows">
  77. <td
  78. [nzChecked]="query.tableCheckedId.has(data.id)"
  79. [nzDisabled]="data.disabled"
  80. (nzCheckedChange)="onTableItemChecked(data.id, $event)"
  81. ></td>
  82. <td nzAlign="left" style="display: none">
  83. <span>{{ data.id }}</span>
  84. </td>
  85. <td nzAlign="left"> {{ data.connName }}</td>
  86. <td nzAlign="center" *ngIf="data.justInTime == 1">{{ 'mxk.text.yes' | i18n }}</td>
  87. <td nzAlign="center" *ngIf="data.justInTime == 0">{{ 'mxk.text.no' | i18n }}</td>
  88. <td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"></i></td>
  89. <td nzAlign="center" nzBreakWord="false">
  90. <div nz-col>
  91. <button nz-button type="button" (click)="onEdit($event, data.id)">{{ 'mxk.text.edit' | i18n }}</button>
  92. <button
  93. nz-button
  94. type="button"
  95. nz-popconfirm
  96. nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
  97. nzPopconfirmPlacement="left"
  98. [nzCancelText]="'mxk.text.delete.popconfirm.cancelText' | i18n"
  99. [nzOkText]="'mxk.text.delete.popconfirm.okText' | i18n"
  100. (nzOnConfirm)="onDelete(data.id)"
  101. nzDanger
  102. >{{ 'mxk.text.delete' | i18n }}</button
  103. >
  104. </div>
  105. </td>
  106. </tr>
  107. </tbody>
  108. </nz-table>
  109. </nz-card>