fantasy-ngzorro 2.1.16 → 2.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -37,9 +37,9 @@
37
37
  | — | 2026-6-23 | hd-table 状态列支持 `stateField` 自定义取值字段、`isState` 按列名取值;hd-form Input 支持 `prefix` / `prefixIcon`;hd-detail-lines-page 支持 `isCrossPageSelect` 跨页勾选开关 |
38
38
  | — | 2026-7-6 | hd-form 支持 `FormListType.Checkbox`(单个复选框 / 复选框组)及 `CheckboxOption` 配置 |
39
39
  | — | 2026-8-6 | hd-form-lines:`allowEmpty` + 仅删除按钮时初始化不补空行、可删至 0 行;分页页码删空校正;ViewDom 字号 14px |
40
- | — | 2026-8-21 | 分页选项统一增加 500 / 1000;`hd-table` / `hd-detail-lines` / `hd-detail-lines-page` 默认 `tablePageSize` 改为 100 |
40
+ | — | 2026-8-26 | `hd-table` 默认开启虚拟滚动(`virtualScroll` / `virtualItemSize`);文档补齐 |
41
41
  | — | 2026-8-25 | hd-status:`statusToColor` 按 sunan-server 业务状态枚举全量去重补充(排除银行 / AGV / HTTP StatusCode) |
42
- | — | 2026-8-26 | 文档补齐:`hd-form-lines` 勾选/复制/插槽/暴露方法/`allowEmpty`;分页默认值与选项;`FormLine` 字段 |
42
+ | — | 2026-8-21 | 分页选项统一增加 500 / 1000;`hd-table` / `hd-detail-lines` / `hd-detail-lines-page` 默认 `tablePageSize` 改为 100 |
43
43
 
44
44
  ## 前言
45
45
 
@@ -342,6 +342,8 @@ tableCols: HdTableColumn[] = [{
342
342
  | showSelected | boolean | false | 勾选列 |
343
343
  | selectField | string | billNumber | 勾选主键字段 |
344
344
  | showOperateColWarpButton | boolean | false | 展开/缩略显示换行列 |
345
+ | virtualScroll | boolean | true | 虚拟滚动;行数少时自动缩小表格高度,行数多时不超过视口 |
346
+ | virtualItemSize | number | — | 虚拟滚动行高(px);**不传则首屏自动测量** |
345
347
  | showTableTotal | boolean | false | 底部合计行 |
346
348
  | tableTotalOption | HdTableTotalOption[] | — | 合计配置 |
347
349
  | isFirstEntrySearch | boolean | — | 首次进入是否自动查询 |
@@ -7005,6 +7005,7 @@
7005
7005
  this.tableCols = [];
7006
7006
  this.showSelected = false;
7007
7007
  this.showOperateColWarpButton = false;
7008
+ this.virtualScroll = true;
7008
7009
  this.selectField = "billNumber";
7009
7010
  // 合计区域
7010
7011
  this.showTableTotal = false;
@@ -7048,6 +7049,36 @@
7048
7049
  this.localtionTmp = "";
7049
7050
  this.isFirstEntrySearchLocal = true;
7050
7051
  this.isCrossPageSelectLocal = false;
7052
+ /**
7053
+ * 自动测量前的兜底行高,测量完成后会更新
7054
+ */
7055
+ this.measuredVirtualItemSize = 47;
7056
+ this.trackByRow = (/**
7057
+ * @param {?} index
7058
+ * @param {?} data
7059
+ * @return {?}
7060
+ */
7061
+ function (index, data) {
7062
+ /** @type {?} */
7063
+ var key = data && data[_this.selectField];
7064
+ return key != null ? String(key) : "row-" + index;
7065
+ });
7066
+ /**
7067
+ * 虚拟滚动按数组下标追踪,避免业务主键 trackBy 导致 CDK 行复用错位
7068
+ */
7069
+ this.virtualTrackByRow = (/**
7070
+ * @param {?} index
7071
+ * @return {?}
7072
+ */
7073
+ function (index) { return index; });
7074
+ this.trackByCol = (/**
7075
+ * @param {?} _index
7076
+ * @param {?} col
7077
+ * @return {?}
7078
+ */
7079
+ function (_index, col) {
7080
+ return col.title;
7081
+ });
7051
7082
  // 拖拽操作
7052
7083
  this.beforeDrop = (/**
7053
7084
  * @param {?} arg
@@ -7165,12 +7196,20 @@
7165
7196
  changes["tableData"]["previousValue"]["pageSize"] ||
7166
7197
  changes["tableData"]["currentValue"]["pageNumber"] !==
7167
7198
  changes["tableData"]["previousValue"]["pageNumber"]) {
7199
+ if (this.virtualScroll) {
7200
+ this.dealScroll();
7201
+ this.refreshVirtualScrollViewport();
7202
+ }
7168
7203
  return;
7169
7204
  }
7170
7205
  if (!this.isCrossPageSelectLocal) {
7171
7206
  this.resetStatus();
7172
7207
  }
7173
7208
  }
7209
+ if (changes["tableData"] && this.virtualScroll) {
7210
+ this.dealScroll();
7211
+ this.refreshVirtualScrollViewport();
7212
+ }
7174
7213
  if (changes["tableCols"] &&
7175
7214
  JSON.stringify(changes["tableCols"].currentValue) !==
7176
7215
  JSON.stringify(changes["tableCols"].previousValue) &&
@@ -7238,35 +7277,21 @@
7238
7277
  function () {
7239
7278
  this.showDetail = !this.showDetail;
7240
7279
  this.cdr.markForCheck();
7280
+ this.refreshVirtualScrollViewport(true);
7241
7281
  };
7242
- /**
7243
- * @param {?} index
7244
- * @param {?} data
7245
- * @return {?}
7246
- */
7247
- HdTableComponent.prototype.trackByRow = /**
7248
- * @param {?} index
7249
- * @param {?} data
7250
- * @return {?}
7251
- */
7252
- function (index, data) {
7253
- /** @type {?} */
7254
- var key = data && data[this.selectField];
7255
- return key != null ? key : index;
7256
- };
7257
- /**
7258
- * @param {?} _index
7259
- * @param {?} col
7260
- * @return {?}
7261
- */
7262
- HdTableComponent.prototype.trackByCol = /**
7263
- * @param {?} _index
7264
- * @param {?} col
7265
- * @return {?}
7266
- */
7267
- function (_index, col) {
7268
- return col.title;
7269
- };
7282
+ Object.defineProperty(HdTableComponent.prototype, "effectiveVirtualItemSize", {
7283
+ get: /**
7284
+ * @return {?}
7285
+ */
7286
+ function () {
7287
+ if (this.virtualItemSize != null && this.virtualItemSize > 0) {
7288
+ return this.virtualItemSize;
7289
+ }
7290
+ return this.measuredVirtualItemSize;
7291
+ },
7292
+ enumerable: true,
7293
+ configurable: true
7294
+ });
7270
7295
  /**
7271
7296
  * @return {?}
7272
7297
  */
@@ -7337,7 +7362,92 @@
7337
7362
  this.dealOperateBtn();
7338
7363
  this.showTable = true;
7339
7364
  this.cdr.markForCheck();
7365
+ this.refreshVirtualScrollViewport();
7366
+ }
7367
+ };
7368
+ /**
7369
+ * @param {?=} forceMeasure
7370
+ * @return {?}
7371
+ */
7372
+ HdTableComponent.prototype.refreshVirtualScrollViewport = /**
7373
+ * @param {?=} forceMeasure
7374
+ * @return {?}
7375
+ */
7376
+ function (forceMeasure) {
7377
+ var _this = this;
7378
+ if (forceMeasure === void 0) { forceMeasure = false; }
7379
+ if (!this.virtualScroll) {
7380
+ return;
7381
+ }
7382
+ setTimeout((/**
7383
+ * @return {?}
7384
+ */
7385
+ function () {
7386
+ /** @type {?} */
7387
+ var viewport = _this.nzTableComponent &&
7388
+ _this.nzTableComponent.cdkVirtualScrollViewport;
7389
+ if (!viewport) {
7390
+ return;
7391
+ }
7392
+ /** @type {?} */
7393
+ var measured = _this.measureVirtualItemSize(forceMeasure);
7394
+ if (measured) {
7395
+ _this.dealScroll();
7396
+ _this.cdr.markForCheck();
7397
+ viewport.checkViewportSize();
7398
+ setTimeout((/**
7399
+ * @return {?}
7400
+ */
7401
+ function () {
7402
+ _this.measureVirtualItemSize(forceMeasure);
7403
+ _this.dealScroll();
7404
+ viewport.checkViewportSize();
7405
+ }));
7406
+ }
7407
+ else {
7408
+ viewport.checkViewportSize();
7409
+ }
7410
+ }));
7411
+ };
7412
+ /** 未手动传 virtualItemSize 时,从已渲染行测量真实高度 */
7413
+ /**
7414
+ * 未手动传 virtualItemSize 时,从已渲染行测量真实高度
7415
+ * @param {?=} force
7416
+ * @return {?}
7417
+ */
7418
+ HdTableComponent.prototype.measureVirtualItemSize = /**
7419
+ * 未手动传 virtualItemSize 时,从已渲染行测量真实高度
7420
+ * @param {?=} force
7421
+ * @return {?}
7422
+ */
7423
+ function (force) {
7424
+ if (force === void 0) { force = false; }
7425
+ if (this.virtualItemSize != null &&
7426
+ this.virtualItemSize > 0 &&
7427
+ !force) {
7428
+ return false;
7340
7429
  }
7430
+ /** @type {?} */
7431
+ var viewport = this.nzTableComponent &&
7432
+ this.nzTableComponent.cdkVirtualScrollViewport;
7433
+ if (!viewport) {
7434
+ return false;
7435
+ }
7436
+ /** @type {?} */
7437
+ var root = (/** @type {?} */ (viewport.elementRef.nativeElement));
7438
+ /** @type {?} */
7439
+ var row = ((/** @type {?} */ (root.querySelector("tr.hd-table-virtual-row")))) ||
7440
+ ((/** @type {?} */ (root.querySelector("tbody tr"))));
7441
+ if (!row || row.offsetHeight <= 0) {
7442
+ return false;
7443
+ }
7444
+ /** @type {?} */
7445
+ var height = row.offsetHeight;
7446
+ if (height === this.measuredVirtualItemSize) {
7447
+ return false;
7448
+ }
7449
+ this.measuredVirtualItemSize = height;
7450
+ return true;
7341
7451
  };
7342
7452
  // 设置列点击取消
7343
7453
  // 设置列点击取消
@@ -7885,6 +7995,37 @@
7885
7995
  }
7886
7996
  return !!btn.showConfirm;
7887
7997
  };
7998
+ /** 虚拟滚动:当前页行数不足时缩小视口,避免大片空白 */
7999
+ /**
8000
+ * 虚拟滚动:当前页行数不足时缩小视口,避免大片空白
8001
+ * @private
8002
+ * @param {?} maxOffset
8003
+ * @return {?}
8004
+ */
8005
+ HdTableComponent.prototype.getVirtualScrollY = /**
8006
+ * 虚拟滚动:当前页行数不足时缩小视口,避免大片空白
8007
+ * @private
8008
+ * @param {?} maxOffset
8009
+ * @return {?}
8010
+ */
8011
+ function (maxOffset) {
8012
+ /** @type {?} */
8013
+ var maxCss = "calc(100vh - " + maxOffset + "px)";
8014
+ /** @type {?} */
8015
+ var rowCount = this.tableData && this.tableData.content
8016
+ ? this.tableData.content.length
8017
+ : 0;
8018
+ if (rowCount <= 0) {
8019
+ return maxCss;
8020
+ }
8021
+ /** @type {?} */
8022
+ var contentHeight = rowCount * this.effectiveVirtualItemSize;
8023
+ if (typeof window !== "undefined" &&
8024
+ contentHeight < window.innerHeight - maxOffset) {
8025
+ return contentHeight + "px";
8026
+ }
8027
+ return maxCss;
8028
+ };
7888
8029
  /**
7889
8030
  * @return {?}
7890
8031
  */
@@ -7910,18 +8051,18 @@
7910
8051
  colWidth += item.width;
7911
8052
  }
7912
8053
  }));
7913
- if (this.tableTotal) {
7914
- this.scroll = {
7915
- x: "1px",
7916
- y: "calc(100vh - 180px)",
7917
- };
7918
- }
7919
- else {
7920
- this.scroll = {
7921
- x: "1px",
7922
- y: "calc(100vh - 140px)",
7923
- };
7924
- }
8054
+ /** @type {?} */
8055
+ var maxOffset = this.tableTotal ? 180 : 140;
8056
+ /** @type {?} */
8057
+ var scrollY = this.virtualScroll
8058
+ ? this.getVirtualScrollY(maxOffset)
8059
+ : "calc(100vh - " + maxOffset + "px)";
8060
+ /** @type {?} */
8061
+ var scrollX = this.virtualScroll && colWidth > 0 ? colWidth + "px" : "1px";
8062
+ this.scroll = {
8063
+ x: scrollX,
8064
+ y: scrollY,
8065
+ };
7925
8066
  };
7926
8067
  // 表格勾选逻辑
7927
8068
  // 表格勾选逻辑
@@ -8084,9 +8225,9 @@
8084
8225
  HdTableComponent.decorators = [
8085
8226
  { type: core.Component, args: [{
8086
8227
  selector: "hd-table",
8087
- template: "<ng-container>\n <hd-button-group>\n <ng-template #buttonGroupLeft>\n <ng-container *ngTemplateOutlet=\"tableLeftButton\"></ng-container>\n <hd-button *ngIf=\"showOperateColWarpButton\" type=\"default\" (click)=\"toggleShowDetail()\">{{showDetail ?\n '\u7F29\u7565\u663E\u793A': '\u5C55\u5F00\u663E\u793A'}}</hd-button>\n </ng-template>\n <ng-template #buttonGroupRight>\n <ng-container *ngTemplateOutlet=\"tableRightButton\"></ng-container>\n <hd-button type=\"primary\" nz-dropdown nzTrigger=\"click\" [nzDropdownMenu]=\"menu\" (clickAction)=\"confirmDropdown()\"\n [nzVisible]=\"isDropdownVisible\">\u8BBE\u7F6E\u5217</hd-button>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <div style=\"max-height: 400px;overflow-y: scroll;\">\n <div *ngIf=\"showListNodes && nowListNodes.length > 0\" nz-menu style=\"padding: 5px 10px;\">\n <nz-tree *ngIf=\"showListNodes\" [nzData]=\"nowListNodes\" nzCheckable nzDraggable nzBlockNode\n nzShowExpand=\"false\" (nzCheckBoxChange)=\"checkAction($event)\" [nzBeforeDrop]=\"beforeDrop\"\n [nzTreeTemplate]=\"nzTreeTemplate\">\n </nz-tree>\n <ng-template #nzTreeTemplate let-node>\n <span\n class=\"ng-tns-c31-110 draggable ng-star-inserted ant-tree-node-content-wrapper ant-tree-node-content-wrapper-close\"\n [title]=\"node.key\" draggable=\"true\" aria-grabbed=\"true\">\n <span class=\"ant-tree-title\">\n <div class=\"hd-table-tree-node\">\n <span>{{node.key}}</span>\n <div *ngIf=\"!node.origin.disabled\" class=\"hd-table-tree-node-img\">\n <i nz-icon nzType=\"caret-up\" nzTheme=\"outline\"></i>\n <i nz-icon nzType=\"caret-down\" nzTheme=\"outline\"></i>\n </div>\n </div>\n </span>\n </span>\n </ng-template>\n </div>\n <div *ngIf=\"showListNodes && hideListNodes.length > 0\" nz-menu style=\"padding: 5px 10px;\">\n <nz-tree *ngIf=\"showListNodes\" [nzData]=\"hideListNodes\" nzCheckable nzShowExpand=\"false\"\n (nzCheckBoxChange)=\"checkAction($event)\">\n </nz-tree>\n </div>\n </div>\n <div style=\"text-align: right;background: #fff;padding: 4px;\">\n <hd-button style=\"margin-right: 4px;\" type=\"default\" size=\"small\" (clickAction)=\"cancelDropdown()\">\u53D6\u6D88\n </hd-button>\n <hd-button type=\"primary\" size=\"small\" (clickAction)=\"submitGrids()\">\u5B8C\u6210</hd-button>\n </div>\n </nz-dropdown-menu>\n </ng-template>\n </hd-button-group>\n <hd-space type=\"row\" size=\"12\"></hd-space>\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n <hd-space *ngIf=\"tableTotal\" type=\"row\" size=\"12\"></hd-space>\n <nz-table *ngIf=\"showTable\" #hdTable class=\"hd-table-container\" [nzScroll]=\"scroll\" nzShowSizeChanger\n nzShowSizeChanger nzShowQuickJumper nzFrontPagination=\"false\" nzSize=\"middle\" [nzData]=\"tableData.content\"\n [nzTotal]=\"tableData.totalElements\" [(nzPageIndex)]=\"tablePageIndex\" [nzLoading]=\"tableLoading\"\n [nzPageSizeOptions]=\"[ 10, 50, 100, 200, 500, 1000 ]\" [(nzPageSize)]=\"tablePageSize\" (nzPageSizeChange)=\"search(true)\"\n (nzPageIndexChange)=\"search(false)\" (nzCurrentPageDataChange)=\"showSelected ? currentPageDataChange($event) : null\"\n [nzShowTotal]=\"tableTotalTemplate\">\n <thead (nzSortChange)=\"sort($event)\" nzSingleSort>\n <tr>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"isAllDisplayDataChecked\"\n [nzIndeterminate]=\"isIndeterminate\" (nzCheckedChange)=\"checkAll($event)\"></th>\n <ng-container *ngFor=\"let col of tableCols\">\n <th *ngIf=\"col.isShow\" [nzWidth]=\"col.width + 'px'\" [nzAlign]=\"col.align\"\n [nzLeft]=\"col.fixed === 'left' ? col.fixedWidth + 'px' : null\"\n [nzRight]=\"col.fixed === 'right' ? 0 + 'px' : null\" nz-resizable nzBounds=\"window\" nzPreview\n (nzResizeEnd)=\"onResize($event, col)\" [nzShowSort]=\"col.canSort\" [nzSortKey]=\"col.name\">\n {{ col.title }}\n <nz-resize-handle nzDirection=\"right\">\n <div class=\"resize-trigger\"></div>\n </nz-resize-handle>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let data of hdTable.data; trackBy: trackByRow; index as i\">\n <td nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"mapOfCheckedId[data[selectField]]\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container *ngFor=\"let col of tableCols; trackBy: trackByCol\">\n <td *ngIf=\"col.isShow\" [ngStyle]=\"{'max-width': col.width + 'px'}\" [nzAlign]=\"col.align\"\n [nzLeft]=\"col.fixed === 'left' ? col.fixedWidth + 'px' : null\"\n [nzRight]=\"col.fixed === 'right' ? 0 + 'px' : null\"\n [ngClass]=\"(col.canWarp && showDetail) ? 'common-td-wrap' : ''\">\n <ng-container *ngIf=\"col.title === '\u64CD\u4F5C';else notOperateTemplate\">\n <div class=\"common-btn-group\">\n <ng-container *ngFor=\"let btn of col.btnList\">\n <ng-container *ngIf=\"!needShowConfirm(btn, data);else showConfirmTemplate\">\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"btn.name === '\u5220\u9664' ? 'common-danger-btn': ''\"\n (click)=\"triggerEvent(btn.click || null, data)\">{{ btn.name }}</a>\n </ng-container>\n <ng-template #showConfirmTemplate>\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"btn.name === '\u5220\u9664' ? 'common-danger-btn': ''\" nz-popconfirm\n [nzPopconfirmTitle]=\"'\u786E\u8BA4\u8981' + btn.name + '\u5417?'\"\n (nzOnConfirm)=\"triggerEvent(btn.click || null, data)\">{{\n btn.name }}</a>\n </ng-template>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #notOperateTemplate>\n <ng-container *ngIf=\"col.name === 'state' || col.isState;else otherTemplate\">\n <hd-status [status]=\"data[getStateField(col)]\">\n <ng-container *ngIf=\"(data | hdTableCell:col) as cell\">{{ cell.display }}</ng-container>\n </hd-status>\n </ng-container>\n <ng-template #otherTemplate>\n <ng-container *ngIf=\"col.click;else noClickTemplate\">\n <ng-container *ngIf=\"(data | hdTableCell:col) as cell\">\n <a [attr.title]=\"cell.title\"\n [ngStyle]=\"{'color': cell.isEmpty ? '#2A3634' : (col?.color ? col.color : null)}\"\n (click)=\"triggerEvent(col.click || null, data)\">{{ cell.display }}</a>\n </ng-container>\n </ng-container>\n <ng-template #noClickTemplate>\n <ng-container *ngIf=\"(data | hdTableCell:col) as cell\">\n <span [attr.title]=\"cell.title\" [ngStyle]=\"{'color': col?.color ? col.color : null}\">{{ cell.display }}</span>\n </ng-container>\n </ng-template>\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n </tr>\n <!-- \u5408\u8BA1\u6240\u6709\u6570\u636E\u533A\u57DF \u9700\u8981\u540E\u7AEF\u63A5\u53E3\u914D\u5408 -->\n <tr *ngIf=\"showTableTotal\" class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let tableTotalOption of tableTotalOptionList\">\n <td>{{ tableTotalOption }}</td>\n </ng-container>\n </tr>\n </tbody>\n <ng-template #tableTotalTemplate>\n \u5171 {{tableData.totalElements}} \u6761\u6570\u636E\n </ng-template>\n </nz-table>\n</ng-container>\n",
8228
+ template: "<ng-container>\n <hd-button-group>\n <ng-template #buttonGroupLeft>\n <ng-container *ngTemplateOutlet=\"tableLeftButton\"></ng-container>\n <hd-button *ngIf=\"showOperateColWarpButton\" type=\"default\" (click)=\"toggleShowDetail()\">{{showDetail ?\n '\u7F29\u7565\u663E\u793A': '\u5C55\u5F00\u663E\u793A'}}</hd-button>\n </ng-template>\n <ng-template #buttonGroupRight>\n <ng-container *ngTemplateOutlet=\"tableRightButton\"></ng-container>\n <hd-button type=\"primary\" nz-dropdown nzTrigger=\"click\" [nzDropdownMenu]=\"menu\" (clickAction)=\"confirmDropdown()\"\n [nzVisible]=\"isDropdownVisible\">\u8BBE\u7F6E\u5217</hd-button>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <div style=\"max-height: 400px;overflow-y: scroll;\">\n <div *ngIf=\"showListNodes && nowListNodes.length > 0\" nz-menu style=\"padding: 5px 10px;\">\n <nz-tree *ngIf=\"showListNodes\" [nzData]=\"nowListNodes\" nzCheckable nzDraggable nzBlockNode\n nzShowExpand=\"false\" (nzCheckBoxChange)=\"checkAction($event)\" [nzBeforeDrop]=\"beforeDrop\"\n [nzTreeTemplate]=\"nzTreeTemplate\">\n </nz-tree>\n <ng-template #nzTreeTemplate let-node>\n <span\n class=\"ng-tns-c31-110 draggable ng-star-inserted ant-tree-node-content-wrapper ant-tree-node-content-wrapper-close\"\n [title]=\"node.key\" draggable=\"true\" aria-grabbed=\"true\">\n <span class=\"ant-tree-title\">\n <div class=\"hd-table-tree-node\">\n <span>{{node.key}}</span>\n <div *ngIf=\"!node.origin.disabled\" class=\"hd-table-tree-node-img\">\n <i nz-icon nzType=\"caret-up\" nzTheme=\"outline\"></i>\n <i nz-icon nzType=\"caret-down\" nzTheme=\"outline\"></i>\n </div>\n </div>\n </span>\n </span>\n </ng-template>\n </div>\n <div *ngIf=\"showListNodes && hideListNodes.length > 0\" nz-menu style=\"padding: 5px 10px;\">\n <nz-tree *ngIf=\"showListNodes\" [nzData]=\"hideListNodes\" nzCheckable nzShowExpand=\"false\"\n (nzCheckBoxChange)=\"checkAction($event)\">\n </nz-tree>\n </div>\n </div>\n <div style=\"text-align: right;background: #fff;padding: 4px;\">\n <hd-button style=\"margin-right: 4px;\" type=\"default\" size=\"small\" (clickAction)=\"cancelDropdown()\">\u53D6\u6D88\n </hd-button>\n <hd-button type=\"primary\" size=\"small\" (clickAction)=\"submitGrids()\">\u5B8C\u6210</hd-button>\n </div>\n </nz-dropdown-menu>\n </ng-template>\n </hd-button-group>\n <hd-space type=\"row\" size=\"12\"></hd-space>\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n <hd-space *ngIf=\"tableTotal\" type=\"row\" size=\"12\"></hd-space>\n <nz-table *ngIf=\"showTable\" #hdTable class=\"hd-table-container\" [nzScroll]=\"scroll\" nzShowSizeChanger\n nzShowSizeChanger nzShowQuickJumper nzFrontPagination=\"false\" nzSize=\"middle\" [nzData]=\"tableData.content\"\n [nzTotal]=\"tableData.totalElements\" [(nzPageIndex)]=\"tablePageIndex\" [nzLoading]=\"tableLoading\"\n [nzPageSizeOptions]=\"[ 10, 50, 100, 200, 500, 1000 ]\" [(nzPageSize)]=\"tablePageSize\" (nzPageSizeChange)=\"search(true)\"\n (nzPageIndexChange)=\"search(false)\" (nzCurrentPageDataChange)=\"showSelected ? currentPageDataChange($event) : null\"\n [nzShowTotal]=\"tableTotalTemplate\" [nzVirtualScroll]=\"virtualScroll\" [nzVirtualItemSize]=\"virtualScroll ? effectiveVirtualItemSize : 0\"\n [nzVirtualForTrackBy]=\"virtualTrackByRow\">\n <thead (nzSortChange)=\"sort($event)\" nzSingleSort>\n <tr>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"isAllDisplayDataChecked\"\n [nzIndeterminate]=\"isIndeterminate\" (nzCheckedChange)=\"checkAll($event)\"></th>\n <ng-container *ngFor=\"let col of tableCols\">\n <th *ngIf=\"col.isShow\" [nzWidth]=\"col.width + 'px'\" [nzAlign]=\"col.align\"\n [nzLeft]=\"col.fixed === 'left' ? col.fixedWidth + 'px' : null\"\n [nzRight]=\"col.fixed === 'right' ? 0 + 'px' : null\" nz-resizable nzBounds=\"window\" nzPreview\n (nzResizeEnd)=\"onResize($event, col)\" [nzShowSort]=\"col.canSort\" [nzSortKey]=\"col.name\">\n {{ col.title }}\n <nz-resize-handle nzDirection=\"right\">\n <div class=\"resize-trigger\"></div>\n </nz-resize-handle>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <ng-template *ngIf=\"virtualScroll\" nz-virtual-scroll let-data let-index=\"index\">\n <tr class=\"hd-table-virtual-row\">\n <ng-container *ngTemplateOutlet=\"tableCells; context: { $implicit: data, index: index }\"></ng-container>\n </tr>\n </ng-template>\n <ng-container *ngIf=\"!virtualScroll\">\n <tr *ngFor=\"let data of hdTable.data; trackBy: trackByRow; index as i\">\n <ng-container *ngTemplateOutlet=\"tableCells; context: { $implicit: data, index: i }\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n <tfoot *ngIf=\"showTableTotal\">\n <tr class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let tableTotalOption of tableTotalOptionList\">\n <td>{{ tableTotalOption }}</td>\n </ng-container>\n </tr>\n </tfoot>\n <ng-template #tableTotalTemplate>\n \u5171 {{tableData.totalElements}} \u6761\u6570\u636E\n </ng-template>\n </nz-table>\n</ng-container>\n\n<ng-template #tableCells let-data let-index=\"index\">\n <td nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [nzChecked]=\"mapOfCheckedId[data[selectField]]\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container *ngFor=\"let col of tableCols; trackBy: trackByCol\">\n <td *ngIf=\"col.isShow\" [ngStyle]=\"{'max-width': col.width + 'px'}\" [nzAlign]=\"col.align\"\n [nzLeft]=\"col.fixed === 'left' ? col.fixedWidth + 'px' : null\"\n [nzRight]=\"col.fixed === 'right' ? 0 + 'px' : null\"\n [ngClass]=\"(col.canWarp && showDetail) ? 'common-td-wrap' : ''\">\n <ng-container *ngIf=\"col.title === '\u64CD\u4F5C';else notOperateTemplate\">\n <div class=\"common-btn-group\">\n <ng-container *ngFor=\"let btn of col.btnList\">\n <ng-container *ngIf=\"!needShowConfirm(btn, data);else showConfirmTemplate\">\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"btn.name === '\u5220\u9664' ? 'common-danger-btn': ''\"\n (click)=\"triggerEvent(btn.click || null, data)\">{{ btn.name }}</a>\n </ng-container>\n <ng-template #showConfirmTemplate>\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"btn.name === '\u5220\u9664' ? 'common-danger-btn': ''\" nz-popconfirm\n [nzPopconfirmTitle]=\"'\u786E\u8BA4\u8981' + btn.name + '\u5417?'\"\n (nzOnConfirm)=\"triggerEvent(btn.click || null, data)\">{{\n btn.name }}</a>\n </ng-template>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #notOperateTemplate>\n <ng-container *ngIf=\"col.name === 'state' || col.isState;else otherTemplate\">\n <hd-status [status]=\"data[getStateField(col)]\">\n <ng-container *ngIf=\"(data | hdTableCell:col) as cell\">{{ cell.display }}</ng-container>\n </hd-status>\n </ng-container>\n <ng-template #otherTemplate>\n <ng-container *ngIf=\"col.click;else noClickTemplate\">\n <ng-container *ngIf=\"(data | hdTableCell:col) as cell\">\n <a [attr.title]=\"cell.title\"\n [ngStyle]=\"{'color': cell.isEmpty ? '#2A3634' : (col?.color ? col.color : null)}\"\n (click)=\"triggerEvent(col.click || null, data)\">{{ cell.display }}</a>\n </ng-container>\n </ng-container>\n <ng-template #noClickTemplate>\n <ng-container *ngIf=\"(data | hdTableCell:col) as cell\">\n <span [attr.title]=\"cell.title\" [ngStyle]=\"{'color': col?.color ? col.color : null}\">{{ cell.display }}</span>\n </ng-container>\n </ng-template>\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n</ng-template>\n",
8088
8229
  changeDetection: core.ChangeDetectionStrategy.OnPush,
8089
- styles: ["::ng-deep .common-btn-group>a{font-size:14px;font-weight:400;color:#20b95d!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset;padding:0 6px!important}::ng-deep .ant-form-item-label>label{color:#4b504e;font-size:14px}::ng-deep .ant-input-number-input{height:32px}::ng-deep .ant-input-number{height:32px}textarea.ant-input{height:auto;min-height:32px}::ng-deep .ant-select-selection--multiple{min-height:32px}::ng-deep .ant-select-selection__rendered>ul>li{height:26px!important;margin-top:3px!important;line-height:26px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:32px!important}::ng-deep .ant-input{height:32px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:32px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:14px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:14px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-time-picker{width:100%}.ant-input-number-disabled,.ant-input[disabled],.ant-select-disabled{color:#4b504e}.nz-resizable-preview{position:absolute;top:0;left:0;z-index:8;border:1px dashed #d1d1d1}.nz-resizable-handle{position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9}.nz-resizable-handle-top{width:100%;height:10px;top:-5px;left:0}.nz-resizable-handle-right{height:100%}.nz-resizable-handle-bottom{width:100%;height:10px;bottom:-5px;left:0}.nz-resizable-handle-left{width:10px;height:100%;top:0;left:-5px}.nz-resizable-handle-topRight{width:20px;height:20px;top:-5px;right:-5px;z-index:10}.nz-resizable-handle-bottomRight{width:20px;height:20px;right:-5px;bottom:-5px;z-index:10}.nz-resizable-handle-bottomLeft{width:20px;height:20px;bottom:-5px;left:-5px;z-index:10}.nz-resizable-handle-topLeft{width:20px;height:20px;top:-5px;left:-5px;z-index:10}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottom,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-top{cursor:row-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-left,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-right{cursor:col-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottomRight,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-topLeft{cursor:nwse-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottomLeft,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-topRight{cursor:nesw-resize}.hd-table-container ::ng-deep .ant-pagination-options-quick-jumper input{border-radius:2px;border:1px solid #d9d9d9}.hd-table-container ::ng-deep .ant-pagination-options .ant-select-selection{border-radius:2px}.hd-table-container ::ng-deep .ant-table-thead>tr>th{border-bottom:1px solid #ecf1ed;white-space:nowrap;text-overflow:ellipsis}.hd-table-container ::ng-deep .ant-table-tbody>tr>td{border-bottom:1px solid #ecf1ed;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.hd-table-container ::ng-deep .hd-table-total>td{border:0!important}::ng-deep .ant-dropdown-menu{border-radius:0}::ng-deep .ant-dropdown{margin-top:8px!important}.common-td-wrap{white-space:normal!important;word-break:break-all}.nz-resizable-preview{border-width:0 1px 0 0}.resize-trigger{width:10px;height:15px;position:relative;top:calc((100% - 15px)/ 2)}.resize-trigger::after{position:absolute;top:calc((100% - 15px)/ 2);left:0;background:#d5d5d5;content:'';width:1px;height:15px;z-index:1}.nz-resizable-handle-right{position:absolute;width:10px;top:0;right:-5px;z-index:inherit}.hd-table-tree-node{display:inline-flex;align-items:center;padding-right:10px}.hd-table-tree-node .hd-table-tree-node-img{display:flex;flex-direction:column;position:absolute;right:0;margin-top:-2.5px}.hd-table-tree-node .hd-table-tree-node-img i{opacity:.3}.hd-table-tree-node .hd-table-tree-node-img i:last-child{margin-top:-5px}img{width:20px;height:20px}.ant-table-th-left-sticky{z-index:2}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}"]
8230
+ styles: ["::ng-deep .common-btn-group>a{font-size:14px;font-weight:400;color:#20b95d!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset;padding:0 6px!important}::ng-deep .ant-form-item-label>label{color:#4b504e;font-size:14px}::ng-deep .ant-input-number-input{height:32px}::ng-deep .ant-input-number{height:32px}textarea.ant-input{height:auto;min-height:32px}::ng-deep .ant-select-selection--multiple{min-height:32px}::ng-deep .ant-select-selection__rendered>ul>li{height:26px!important;margin-top:3px!important;line-height:26px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:32px!important}::ng-deep .ant-input{height:32px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:32px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:14px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:14px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-time-picker{width:100%}.ant-input-number-disabled,.ant-input[disabled],.ant-select-disabled{color:#4b504e}.nz-resizable-preview{position:absolute;top:0;left:0;z-index:8;border:1px dashed #d1d1d1}.nz-resizable-handle{position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9}.nz-resizable-handle-top{width:100%;height:10px;top:-5px;left:0}.nz-resizable-handle-right{height:100%}.nz-resizable-handle-bottom{width:100%;height:10px;bottom:-5px;left:0}.nz-resizable-handle-left{width:10px;height:100%;top:0;left:-5px}.nz-resizable-handle-topRight{width:20px;height:20px;top:-5px;right:-5px;z-index:10}.nz-resizable-handle-bottomRight{width:20px;height:20px;right:-5px;bottom:-5px;z-index:10}.nz-resizable-handle-bottomLeft{width:20px;height:20px;bottom:-5px;left:-5px;z-index:10}.nz-resizable-handle-topLeft{width:20px;height:20px;top:-5px;left:-5px;z-index:10}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottom,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-top{cursor:row-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-left,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-right{cursor:col-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottomRight,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-topLeft{cursor:nwse-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottomLeft,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-topRight{cursor:nesw-resize}.hd-table-container ::ng-deep .ant-pagination-options-quick-jumper input{border-radius:2px;border:1px solid #d9d9d9}.hd-table-container ::ng-deep .ant-pagination-options .ant-select-selection{border-radius:2px}.hd-table-container ::ng-deep .ant-table-thead>tr>th{border-bottom:1px solid #ecf1ed;white-space:nowrap;text-overflow:ellipsis}.hd-table-container ::ng-deep .ant-table-tbody>tr>td{border-bottom:1px solid #ecf1ed;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.hd-table-container ::ng-deep .hd-table-total>td{border:0!important}.hd-table-container ::ng-deep cdk-virtual-scroll-viewport.ant-table-body .hd-table-virtual-row>td{box-sizing:border-box}::ng-deep .ant-dropdown-menu{border-radius:0}::ng-deep .ant-dropdown{margin-top:8px!important}.common-td-wrap{white-space:normal!important;word-break:break-all}.nz-resizable-preview{border-width:0 1px 0 0}.resize-trigger{width:10px;height:15px;position:relative;top:calc((100% - 15px)/ 2)}.resize-trigger::after{position:absolute;top:calc((100% - 15px)/ 2);left:0;background:#d5d5d5;content:'';width:1px;height:15px;z-index:1}.nz-resizable-handle-right{position:absolute;width:10px;top:0;right:-5px;z-index:inherit}.hd-table-tree-node{display:inline-flex;align-items:center;padding-right:10px}.hd-table-tree-node .hd-table-tree-node-img{display:flex;flex-direction:column;position:absolute;right:0;margin-top:-2.5px}.hd-table-tree-node .hd-table-tree-node-img i{opacity:.3}.hd-table-tree-node .hd-table-tree-node-img i:last-child{margin-top:-5px}img{width:20px;height:20px}.ant-table-th-left-sticky{z-index:2}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}"]
8090
8231
  }] }
8091
8232
  ];
8092
8233
  /** @nocollapse */
@@ -8100,6 +8241,8 @@
8100
8241
  tableData: [{ type: core.Input }],
8101
8242
  showSelected: [{ type: core.Input }],
8102
8243
  showOperateColWarpButton: [{ type: core.Input }],
8244
+ virtualScroll: [{ type: core.Input }],
8245
+ virtualItemSize: [{ type: core.Input }],
8103
8246
  selectField: [{ type: core.Input }],
8104
8247
  showTableTotal: [{ type: core.Input }],
8105
8248
  tableTotalOption: [{ type: core.Input }],
@@ -8116,7 +8259,8 @@
8116
8259
  tablePageSizeChangeEvent: [{ type: core.Output }],
8117
8260
  tableTotal: [{ type: core.ContentChild, args: ["tableTotal", { static: false },] }],
8118
8261
  tableLeftButton: [{ type: core.ContentChild, args: ["tableLeftButton", { static: false },] }],
8119
- tableRightButton: [{ type: core.ContentChild, args: ["tableRightButton", { static: false },] }]
8262
+ tableRightButton: [{ type: core.ContentChild, args: ["tableRightButton", { static: false },] }],
8263
+ nzTableComponent: [{ type: core.ViewChild, args: ["hdTable", { static: false },] }]
8120
8264
  };
8121
8265
  __decorate([
8122
8266
  core$1.InputBoolean(),
@@ -8126,6 +8270,10 @@
8126
8270
  core$1.InputBoolean(),
8127
8271
  __metadata("design:type", Boolean)
8128
8272
  ], HdTableComponent.prototype, "showOperateColWarpButton", void 0);
8273
+ __decorate([
8274
+ core$1.InputBoolean(),
8275
+ __metadata("design:type", Boolean)
8276
+ ], HdTableComponent.prototype, "virtualScroll", void 0);
8129
8277
  __decorate([
8130
8278
  core$1.InputBoolean(),
8131
8279
  __metadata("design:type", Boolean)
@@ -8144,6 +8292,13 @@
8144
8292
  /** @type {?} */
8145
8293
  HdTableComponent.prototype.showOperateColWarpButton;
8146
8294
  /** @type {?} */
8295
+ HdTableComponent.prototype.virtualScroll;
8296
+ /**
8297
+ * 手动指定行高;不传则在首屏渲染后自动测量
8298
+ * @type {?}
8299
+ */
8300
+ HdTableComponent.prototype.virtualItemSize;
8301
+ /** @type {?} */
8147
8302
  HdTableComponent.prototype.selectField;
8148
8303
  /** @type {?} */
8149
8304
  HdTableComponent.prototype.showTableTotal;
@@ -8229,6 +8384,22 @@
8229
8384
  HdTableComponent.prototype.isFirstEntrySearchLocal;
8230
8385
  /** @type {?} */
8231
8386
  HdTableComponent.prototype.isCrossPageSelectLocal;
8387
+ /**
8388
+ * 自动测量前的兜底行高,测量完成后会更新
8389
+ * @type {?}
8390
+ */
8391
+ HdTableComponent.prototype.measuredVirtualItemSize;
8392
+ /** @type {?} */
8393
+ HdTableComponent.prototype.nzTableComponent;
8394
+ /** @type {?} */
8395
+ HdTableComponent.prototype.trackByRow;
8396
+ /**
8397
+ * 虚拟滚动按数组下标追踪,避免业务主键 trackBy 导致 CDK 行复用错位
8398
+ * @type {?}
8399
+ */
8400
+ HdTableComponent.prototype.virtualTrackByRow;
8401
+ /** @type {?} */
8402
+ HdTableComponent.prototype.trackByCol;
8232
8403
  /** @type {?} */
8233
8404
  HdTableComponent.prototype.beforeDrop;
8234
8405
  /**