|
@@ -7,18 +7,23 @@
|
|
|
<nz-form-item>
|
|
|
<nz-form-label nzFor="orgName">{{ 'mxk.organizations.name' | i18n }}</nz-form-label>
|
|
|
<nz-form-control>
|
|
|
- <input nz-input [(ngModel)]="query.params.orgName" [ngModelOptions]="{ standalone: true }" name="orgName"
|
|
|
- placeholder="" id="orgName" />
|
|
|
+ <input
|
|
|
+ nz-input
|
|
|
+ [(ngModel)]="query.params.orgName"
|
|
|
+ [ngModelOptions]="{ standalone: true }"
|
|
|
+ name="orgName"
|
|
|
+ placeholder=""
|
|
|
+ id="orgName"
|
|
|
+ />
|
|
|
</nz-form-control>
|
|
|
</nz-form-item>
|
|
|
</div>
|
|
|
<div nz-col [nzSpan]="query.expandForm ? 24 : 8" [class.text-right]="query.expandForm">
|
|
|
- <button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' |
|
|
|
- i18n }}</button>
|
|
|
- <button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' |
|
|
|
- i18n }}</button>
|
|
|
+ <button nz-button type="submit" [nzType]="'primary'" [nzLoading]="query.submitLoading">{{ 'mxk.text.query' | i18n }}</button>
|
|
|
+ <button nz-button type="reset" (click)="onReset()" class="mx-sm" style="display: none">{{ 'mxk.text.reset' | i18n }}</button>
|
|
|
<button nz-button (click)="query.expandForm = !query.expandForm" class="mx-sm" style="display: none">
|
|
|
- {{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button>
|
|
|
+ {{ query.expandForm ? ('mxk.text.collapse' | i18n) : ('mxk.text.expand' | i18n) }}</button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
@@ -27,13 +32,31 @@
|
|
|
<div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
|
|
|
<div nz-col [nzSpan]="24" class="table-list-toolbar">
|
|
|
<button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
|
|
|
- <button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
|
|
|
- '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)="onBatchDelete()"
|
|
|
+ [nzType]="'primary'"
|
|
|
+ nzDanger
|
|
|
+ class="mx-sm"
|
|
|
+ >{{ 'mxk.text.delete' | i18n }}</button
|
|
|
+ >
|
|
|
</div>
|
|
|
<div nz-col nzMd="6" nzSm="24" class="grid-border">
|
|
|
- <nz-tree nzShowLine="false" [nzCheckable]="treeNodes.checkable" nzBlockNode [nzData]="treeNodes.nodes"
|
|
|
- (nzClick)="activeNode($event)" (nzDblClick)="openFolder($event)" [nzTreeTemplate]="nzTreeTemplate"></nz-tree>
|
|
|
+ <nz-tree
|
|
|
+ nzShowLine="false"
|
|
|
+ [nzCheckable]="treeNodes.checkable"
|
|
|
+ nzBlockNode
|
|
|
+ [nzData]="treeNodes.nodes"
|
|
|
+ (nzClick)="activeNode($event)"
|
|
|
+ (nzDblClick)="openFolder($event)"
|
|
|
+ [nzTreeTemplate]="nzTreeTemplate"
|
|
|
+ ></nz-tree>
|
|
|
<ng-template #nzTreeTemplate let-node let-origin="origin">
|
|
|
<span class="custom-node">
|
|
|
<span *ngIf="!node.isLeaf" (contextmenu)="contextMenu($event, menu)">
|
|
@@ -54,51 +77,71 @@
|
|
|
</nz-dropdown-menu>
|
|
|
</div>
|
|
|
<div nz-col nzMd="18" nzSm="24" class="grid-border">
|
|
|
- <nz-table #dynamicTable nzBordered nzShowSizeChanger nzSize="small" [nzData]="query.results.rows" [nzFrontPagination]="false"
|
|
|
- [nzTotal]="query.results.records" [nzPageSizeOptions]="query.params.pageSizeOptions"
|
|
|
- [nzPageSize]="query.params.pageSize" [nzPageIndex]="query.params.pageNumber"
|
|
|
- [nzLoading]="this.query.tableLoading" (nzQueryParams)="onQueryParamsChange($event)" nzWidth="100%">
|
|
|
+ <nz-table
|
|
|
+ #dynamicTable
|
|
|
+ nzBordered
|
|
|
+ nzShowSizeChanger
|
|
|
+ nzSize="small"
|
|
|
+ [nzData]="query.results.rows"
|
|
|
+ [nzFrontPagination]="false"
|
|
|
+ [nzTotal]="query.results.records"
|
|
|
+ [nzPageSizeOptions]="query.params.pageSizeOptions"
|
|
|
+ [nzPageSize]="query.params.pageSize"
|
|
|
+ [nzPageIndex]="query.params.pageNumber"
|
|
|
+ [nzLoading]="this.query.tableLoading"
|
|
|
+ (nzQueryParams)="onQueryParamsChange($event)"
|
|
|
+ nzWidth="100%"
|
|
|
+ >
|
|
|
<thead>
|
|
|
- <tr>
|
|
|
- <th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate"
|
|
|
- (nzCheckedChange)="onTableAllChecked($event)"></th>
|
|
|
- <th nzAlign="center" class="table_cell_action_2">{{ 'mxk.organizations.code' | i18n }}</th>
|
|
|
- <th nzAlign="center" class="table_cell_action_2">{{ 'mxk.organizations.name' | i18n }}</th>
|
|
|
- <th nzAlign="center" class="table_cell_action_1">{{ 'mxk.organizations.type' | i18n }}</th>
|
|
|
- <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_2">{{ 'mxk.text.action' | i18n }}</th>
|
|
|
- </tr>
|
|
|
+ <tr>
|
|
|
+ <th [nzChecked]="query.checked" [nzIndeterminate]="query.indeterminate" (nzCheckedChange)="onTableAllChecked($event)"></th>
|
|
|
+ <th nzAlign="center" class="table_cell_action_2">{{ 'mxk.organizations.code' | i18n }}</th>
|
|
|
+ <th nzAlign="center" class="table_cell_action_2">{{ 'mxk.organizations.name' | i18n }}</th>
|
|
|
+ <th nzAlign="center" class="table_cell_action_1">{{ 'mxk.organizations.type' | i18n }}</th>
|
|
|
+ <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_2">{{ 'mxk.text.action' | i18n }}</th>
|
|
|
+ </tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
- <tr *ngFor="let data of query.results.rows">
|
|
|
- <td [nzChecked]="query.tableCheckedId.has(data.id)" [nzDisabled]="data.disabled"
|
|
|
- (nzCheckedChange)="onTableItemChecked(data.id, $event)"></td>
|
|
|
- <td nzAlign="left">
|
|
|
- <span>{{ data.orgCode }}</span>
|
|
|
- </td>
|
|
|
- <td nzAlign="left"> {{ data.orgName }}</td>
|
|
|
- <td nzAlign="center" *ngIf="data.type == 'company'"> {{ 'mxk.organizations.type.company' | i18n }}</td>
|
|
|
- <td nzAlign="center" *ngIf="data.type == 'division'"> {{ 'mxk.organizations.type.division' | i18n }}</td>
|
|
|
- <td nzAlign="center" *ngIf="data.type == 'department'"> {{ 'mxk.organizations.type.department' | i18n }}
|
|
|
- </td>
|
|
|
- <td nzAlign="center" *ngIf="data.type == 'entity'"> {{ 'mxk.organizations.type.entity' | i18n }}</td>
|
|
|
- <td nzAlign="center" *ngIf="data.type == 'virtual'"> {{ 'mxk.organizations.type.virtual' | i18n }}</td>
|
|
|
- <td nzAlign="center"> {{ data.sortIndex }}</td>
|
|
|
- <td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
|
|
|
- style="color: green"></i></td>
|
|
|
- <td nzAlign="center" nzBreakWord="false">
|
|
|
- <div nz-col>
|
|
|
- <button nz-button type="button" (click)="onEdit($event, data.id)">
|
|
|
- {{ 'mxk.text.edit' | i18n }}
|
|
|
- </button>
|
|
|
- <button
|
|
|
- *ngIf="data.parentId != null && data.parentId != '-1' && data.parentId != '0' && data.id != data.instId"
|
|
|
- nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
|
|
|
- }}</button>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
+ <tr *ngFor="let data of query.results.rows">
|
|
|
+ <td
|
|
|
+ [nzChecked]="query.tableCheckedId.has(data.id)"
|
|
|
+ [nzDisabled]="data.disabled"
|
|
|
+ (nzCheckedChange)="onTableItemChecked(data.id, $event)"
|
|
|
+ ></td>
|
|
|
+ <td nzAlign="left">
|
|
|
+ <span>{{ data.orgCode }}</span>
|
|
|
+ </td>
|
|
|
+ <td nzAlign="left"> {{ data.orgName }}</td>
|
|
|
+ <td nzAlign="center" *ngIf="data.type == 'company'"> {{ 'mxk.organizations.type.company' | i18n }}</td>
|
|
|
+ <td nzAlign="center" *ngIf="data.type == 'division'"> {{ 'mxk.organizations.type.division' | i18n }}</td>
|
|
|
+ <td nzAlign="center" *ngIf="data.type == 'department'"> {{ 'mxk.organizations.type.department' | i18n }} </td>
|
|
|
+ <td nzAlign="center" *ngIf="data.type == 'entity'"> {{ 'mxk.organizations.type.entity' | i18n }}</td>
|
|
|
+ <td nzAlign="center" *ngIf="data.type == 'virtual'"> {{ 'mxk.organizations.type.virtual' | i18n }}</td>
|
|
|
+ <td nzAlign="center"> {{ data.sortIndex }}</td>
|
|
|
+ <td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"></i></td>
|
|
|
+ <td nzAlign="center" nzBreakWord="false">
|
|
|
+ <div nz-col>
|
|
|
+ <button nz-button type="button" (click)="onEdit($event, data.id)">
|
|
|
+ {{ 'mxk.text.edit' | i18n }}
|
|
|
+ </button>
|
|
|
+ <button
|
|
|
+ *ngIf="data.parentId != null && data.parentId != '-1' && data.parentId != '0' && data.id != data.instId"
|
|
|
+ nz-button
|
|
|
+ type="button"
|
|
|
+ nz-popconfirm
|
|
|
+ nzPopconfirmTitle="{{ 'mxk.text.delete.popconfirm.title' | i18n }}"
|
|
|
+ nzPopconfirmPlacement="left"
|
|
|
+ [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>
|
|
|
</nz-table>
|
|
|
</div>
|