fantasy-ngzorro 2.1.18 → 2.1.20
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 +1 -1
- package/bundles/fantasy-ngzorro.umd.js +228 -37
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +2 -2
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-table/hd-table.component.js +191 -36
- package/esm5/hd-table/hd-table.component.js +229 -38
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +190 -35
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +228 -37
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-table/hd-table.component.d.ts +15 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -342,7 +342,7 @@ tableCols: HdTableColumn[] = [{
|
|
|
342
342
|
| showSelected | boolean | false | 勾选列 |
|
|
343
343
|
| selectField | string | billNumber | 勾选主键字段 |
|
|
344
344
|
| showOperateColWarpButton | boolean | false | 展开/缩略显示换行列 |
|
|
345
|
-
| virtualScroll | boolean | true |
|
|
345
|
+
| virtualScroll | boolean | true | 行数多自动虚拟滚动;横向滚动条按**列总宽是否超出容器**决定 |
|
|
346
346
|
| virtualItemSize | number | — | 虚拟滚动行高(px);**不传则首屏自动测量** |
|
|
347
347
|
| showTableTotal | boolean | false | 底部合计行 |
|
|
348
348
|
| tableTotalOption | HdTableTotalOption[] | — | 合计配置 |
|
|
@@ -7053,6 +7053,14 @@
|
|
|
7053
7053
|
* 自动测量前的兜底行高,测量完成后会更新
|
|
7054
7054
|
*/
|
|
7055
7055
|
this.measuredVirtualItemSize = 47;
|
|
7056
|
+
/**
|
|
7057
|
+
* 记录当前是否处于虚拟滚动模式,用于切换 pageSize 时重建表格
|
|
7058
|
+
*/
|
|
7059
|
+
this.virtualScrollActive = null;
|
|
7060
|
+
/**
|
|
7061
|
+
* 可见列总宽,用于判断是否需要横向滚动
|
|
7062
|
+
*/
|
|
7063
|
+
this.tableColWidthTotal = 0;
|
|
7056
7064
|
this.trackByRow = (/**
|
|
7057
7065
|
* @param {?} index
|
|
7058
7066
|
* @param {?} data
|
|
@@ -7197,8 +7205,7 @@
|
|
|
7197
7205
|
changes["tableData"]["currentValue"]["pageNumber"] !==
|
|
7198
7206
|
changes["tableData"]["previousValue"]["pageNumber"]) {
|
|
7199
7207
|
if (this.virtualScroll) {
|
|
7200
|
-
this.
|
|
7201
|
-
this.refreshVirtualScrollViewport();
|
|
7208
|
+
this.applyTableScrollMode(true);
|
|
7202
7209
|
}
|
|
7203
7210
|
return;
|
|
7204
7211
|
}
|
|
@@ -7207,8 +7214,7 @@
|
|
|
7207
7214
|
}
|
|
7208
7215
|
}
|
|
7209
7216
|
if (changes["tableData"] && this.virtualScroll) {
|
|
7210
|
-
this.
|
|
7211
|
-
this.refreshVirtualScrollViewport();
|
|
7217
|
+
this.applyTableScrollMode(true);
|
|
7212
7218
|
}
|
|
7213
7219
|
if (changes["tableCols"] &&
|
|
7214
7220
|
JSON.stringify(changes["tableCols"].currentValue) !==
|
|
@@ -7292,6 +7298,35 @@
|
|
|
7292
7298
|
enumerable: true,
|
|
7293
7299
|
configurable: true
|
|
7294
7300
|
});
|
|
7301
|
+
Object.defineProperty(HdTableComponent.prototype, "useVirtualScroll", {
|
|
7302
|
+
/** 当前页数据能完整展示时不启用虚拟滚动,避免少量数据也出现滚动条 */
|
|
7303
|
+
get: /**
|
|
7304
|
+
* 当前页数据能完整展示时不启用虚拟滚动,避免少量数据也出现滚动条
|
|
7305
|
+
* @return {?}
|
|
7306
|
+
*/
|
|
7307
|
+
function () {
|
|
7308
|
+
if (!this.virtualScroll) {
|
|
7309
|
+
return false;
|
|
7310
|
+
}
|
|
7311
|
+
/** @type {?} */
|
|
7312
|
+
var rowCount = this.tableData && this.tableData.content
|
|
7313
|
+
? this.tableData.content.length
|
|
7314
|
+
: 0;
|
|
7315
|
+
if (rowCount <= 0) {
|
|
7316
|
+
return false;
|
|
7317
|
+
}
|
|
7318
|
+
/** @type {?} */
|
|
7319
|
+
var maxOffset = this.tableTotal ? 180 : 140;
|
|
7320
|
+
/** @type {?} */
|
|
7321
|
+
var estimatedHeight = rowCount * this.effectiveVirtualItemSize;
|
|
7322
|
+
if (typeof window !== "undefined") {
|
|
7323
|
+
return estimatedHeight > window.innerHeight - maxOffset;
|
|
7324
|
+
}
|
|
7325
|
+
return rowCount > 100;
|
|
7326
|
+
},
|
|
7327
|
+
enumerable: true,
|
|
7328
|
+
configurable: true
|
|
7329
|
+
});
|
|
7295
7330
|
/**
|
|
7296
7331
|
* @return {?}
|
|
7297
7332
|
*/
|
|
@@ -7358,11 +7393,73 @@
|
|
|
7358
7393
|
if (this.judgeRepeatCols()) {
|
|
7359
7394
|
this.dealCols();
|
|
7360
7395
|
this.setCols();
|
|
7361
|
-
this.dealScroll();
|
|
7362
7396
|
this.dealOperateBtn();
|
|
7363
|
-
this.
|
|
7397
|
+
this.virtualScrollActive = null;
|
|
7398
|
+
this.applyTableScrollMode(true);
|
|
7399
|
+
}
|
|
7400
|
+
};
|
|
7401
|
+
/** 虚拟/普通模式切换时重建表格,避免残留滚动容器 */
|
|
7402
|
+
/**
|
|
7403
|
+
* 虚拟/普通模式切换时重建表格,避免残留滚动容器
|
|
7404
|
+
* @param {?=} forceRemount
|
|
7405
|
+
* @return {?}
|
|
7406
|
+
*/
|
|
7407
|
+
HdTableComponent.prototype.applyTableScrollMode = /**
|
|
7408
|
+
* 虚拟/普通模式切换时重建表格,避免残留滚动容器
|
|
7409
|
+
* @param {?=} forceRemount
|
|
7410
|
+
* @return {?}
|
|
7411
|
+
*/
|
|
7412
|
+
function (forceRemount) {
|
|
7413
|
+
var _this = this;
|
|
7414
|
+
if (forceRemount === void 0) { forceRemount = false; }
|
|
7415
|
+
/** @type {?} */
|
|
7416
|
+
var useVirtual = this.useVirtualScroll;
|
|
7417
|
+
/** @type {?} */
|
|
7418
|
+
var modeChanged = this.virtualScrollActive !== null &&
|
|
7419
|
+
this.virtualScrollActive !== useVirtual;
|
|
7420
|
+
this.virtualScrollActive = useVirtual;
|
|
7421
|
+
if (forceRemount || modeChanged) {
|
|
7422
|
+
this.showTable = false;
|
|
7364
7423
|
this.cdr.markForCheck();
|
|
7365
|
-
|
|
7424
|
+
setTimeout((/**
|
|
7425
|
+
* @return {?}
|
|
7426
|
+
*/
|
|
7427
|
+
function () {
|
|
7428
|
+
_this.showTable = true;
|
|
7429
|
+
_this.cdr.markForCheck();
|
|
7430
|
+
setTimeout((/**
|
|
7431
|
+
* @return {?}
|
|
7432
|
+
*/
|
|
7433
|
+
function () {
|
|
7434
|
+
_this.dealScroll();
|
|
7435
|
+
_this.cdr.markForCheck();
|
|
7436
|
+
_this.afterTableRender(useVirtual);
|
|
7437
|
+
}));
|
|
7438
|
+
}));
|
|
7439
|
+
return;
|
|
7440
|
+
}
|
|
7441
|
+
this.dealScroll();
|
|
7442
|
+
this.cdr.markForCheck();
|
|
7443
|
+
this.afterTableRender(useVirtual);
|
|
7444
|
+
};
|
|
7445
|
+
/**
|
|
7446
|
+
* @private
|
|
7447
|
+
* @param {?} useVirtual
|
|
7448
|
+
* @return {?}
|
|
7449
|
+
*/
|
|
7450
|
+
HdTableComponent.prototype.afterTableRender = /**
|
|
7451
|
+
* @private
|
|
7452
|
+
* @param {?} useVirtual
|
|
7453
|
+
* @return {?}
|
|
7454
|
+
*/
|
|
7455
|
+
function (useVirtual) {
|
|
7456
|
+
if (useVirtual) {
|
|
7457
|
+
this.refreshVirtualScrollViewport(true);
|
|
7458
|
+
return;
|
|
7459
|
+
}
|
|
7460
|
+
if (this.virtualScroll) {
|
|
7461
|
+
this.measureVirtualItemSize(true);
|
|
7462
|
+
this.syncHorizontalScroll();
|
|
7366
7463
|
}
|
|
7367
7464
|
};
|
|
7368
7465
|
/**
|
|
@@ -7376,7 +7473,12 @@
|
|
|
7376
7473
|
function (forceMeasure) {
|
|
7377
7474
|
var _this = this;
|
|
7378
7475
|
if (forceMeasure === void 0) { forceMeasure = false; }
|
|
7379
|
-
if (!this.
|
|
7476
|
+
if (!this.useVirtualScroll) {
|
|
7477
|
+
if (forceMeasure) {
|
|
7478
|
+
this.measureVirtualItemSize(forceMeasure);
|
|
7479
|
+
this.dealScroll();
|
|
7480
|
+
this.cdr.markForCheck();
|
|
7481
|
+
}
|
|
7380
7482
|
return;
|
|
7381
7483
|
}
|
|
7382
7484
|
setTimeout((/**
|
|
@@ -7430,14 +7532,13 @@
|
|
|
7430
7532
|
/** @type {?} */
|
|
7431
7533
|
var viewport = this.nzTableComponent &&
|
|
7432
7534
|
this.nzTableComponent.cdkVirtualScrollViewport;
|
|
7433
|
-
if (!viewport) {
|
|
7434
|
-
return false;
|
|
7435
|
-
}
|
|
7436
7535
|
/** @type {?} */
|
|
7437
|
-
var
|
|
7536
|
+
var tableBody = this.nzTableComponent &&
|
|
7537
|
+
(/** @type {?} */ (this.nzTableComponent.tableBodyNativeElement));
|
|
7438
7538
|
/** @type {?} */
|
|
7439
|
-
var row = (
|
|
7440
|
-
((/** @type {?} */ (
|
|
7539
|
+
var row = (viewport &&
|
|
7540
|
+
((/** @type {?} */ (((/** @type {?} */ (viewport.elementRef.nativeElement))).querySelector("tr.hd-table-virtual-row"))))) ||
|
|
7541
|
+
(tableBody && ((/** @type {?} */ (tableBody.querySelector("tbody tr")))));
|
|
7441
7542
|
if (!row || row.offsetHeight <= 0) {
|
|
7442
7543
|
return false;
|
|
7443
7544
|
}
|
|
@@ -7995,36 +8096,103 @@
|
|
|
7995
8096
|
}
|
|
7996
8097
|
return !!btn.showConfirm;
|
|
7997
8098
|
};
|
|
7998
|
-
/**
|
|
8099
|
+
/** 虚拟滚动开启时使用视口最大高度 */
|
|
7999
8100
|
/**
|
|
8000
|
-
*
|
|
8101
|
+
* 虚拟滚动开启时使用视口最大高度
|
|
8001
8102
|
* @private
|
|
8002
8103
|
* @param {?} maxOffset
|
|
8003
8104
|
* @return {?}
|
|
8004
8105
|
*/
|
|
8005
8106
|
HdTableComponent.prototype.getVirtualScrollY = /**
|
|
8006
|
-
*
|
|
8107
|
+
* 虚拟滚动开启时使用视口最大高度
|
|
8007
8108
|
* @private
|
|
8008
8109
|
* @param {?} maxOffset
|
|
8009
8110
|
* @return {?}
|
|
8010
8111
|
*/
|
|
8011
8112
|
function (maxOffset) {
|
|
8113
|
+
return "calc(100vh - " + maxOffset + "px)";
|
|
8114
|
+
};
|
|
8115
|
+
/**
|
|
8116
|
+
* @private
|
|
8117
|
+
* @return {?}
|
|
8118
|
+
*/
|
|
8119
|
+
HdTableComponent.prototype.getTableViewportWidth = /**
|
|
8120
|
+
* @private
|
|
8121
|
+
* @return {?}
|
|
8122
|
+
*/
|
|
8123
|
+
function () {
|
|
8124
|
+
if (!this.nzTableComponent || !this.nzTableComponent.tableMainElement) {
|
|
8125
|
+
return 0;
|
|
8126
|
+
}
|
|
8012
8127
|
/** @type {?} */
|
|
8013
|
-
var
|
|
8128
|
+
var tableMain = (/** @type {?} */ (this.nzTableComponent.tableMainElement
|
|
8129
|
+
.nativeElement));
|
|
8014
8130
|
/** @type {?} */
|
|
8015
|
-
var
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8131
|
+
var wrapper = (/** @type {?} */ (tableMain.closest(".ant-table-wrapper")));
|
|
8132
|
+
if (wrapper && wrapper.clientWidth > 0) {
|
|
8133
|
+
return wrapper.clientWidth;
|
|
8134
|
+
}
|
|
8135
|
+
/** @type {?} */
|
|
8136
|
+
var host = (/** @type {?} */ (tableMain.closest(".hd-table-container")));
|
|
8137
|
+
if (host && host.clientWidth > 0) {
|
|
8138
|
+
return host.clientWidth;
|
|
8139
|
+
}
|
|
8140
|
+
return 0;
|
|
8141
|
+
};
|
|
8142
|
+
/** 列总宽超出外层容器才启用横向 scroll(不能用 table 自身宽度,会被 scroll.x 撑宽) */
|
|
8143
|
+
/**
|
|
8144
|
+
* 列总宽超出外层容器才启用横向 scroll(不能用 table 自身宽度,会被 scroll.x 撑宽)
|
|
8145
|
+
* @private
|
|
8146
|
+
* @param {?} colWidth
|
|
8147
|
+
* @param {?} useVirtual
|
|
8148
|
+
* @return {?}
|
|
8149
|
+
*/
|
|
8150
|
+
HdTableComponent.prototype.resolveScrollX = /**
|
|
8151
|
+
* 列总宽超出外层容器才启用横向 scroll(不能用 table 自身宽度,会被 scroll.x 撑宽)
|
|
8152
|
+
* @private
|
|
8153
|
+
* @param {?} colWidth
|
|
8154
|
+
* @param {?} useVirtual
|
|
8155
|
+
* @return {?}
|
|
8156
|
+
*/
|
|
8157
|
+
function (colWidth, useVirtual) {
|
|
8158
|
+
if (colWidth <= 0) {
|
|
8159
|
+
return useVirtual ? "1px" : null;
|
|
8160
|
+
}
|
|
8161
|
+
if (useVirtual) {
|
|
8162
|
+
return colWidth + "px";
|
|
8163
|
+
}
|
|
8164
|
+
/** @type {?} */
|
|
8165
|
+
var viewportWidth = this.getTableViewportWidth();
|
|
8166
|
+
if (viewportWidth > 0) {
|
|
8167
|
+
return colWidth > viewportWidth ? colWidth + "px" : null;
|
|
8168
|
+
}
|
|
8169
|
+
if (typeof window !== "undefined" && colWidth > window.innerWidth - 32) {
|
|
8170
|
+
return colWidth + "px";
|
|
8171
|
+
}
|
|
8172
|
+
return null;
|
|
8173
|
+
};
|
|
8174
|
+
/** 表格渲染后按实际容器宽度校正横向 scroll */
|
|
8175
|
+
/**
|
|
8176
|
+
* 表格渲染后按实际容器宽度校正横向 scroll
|
|
8177
|
+
* @private
|
|
8178
|
+
* @return {?}
|
|
8179
|
+
*/
|
|
8180
|
+
HdTableComponent.prototype.syncHorizontalScroll = /**
|
|
8181
|
+
* 表格渲染后按实际容器宽度校正横向 scroll
|
|
8182
|
+
* @private
|
|
8183
|
+
* @return {?}
|
|
8184
|
+
*/
|
|
8185
|
+
function () {
|
|
8186
|
+
if (!this.virtualScroll || this.useVirtualScroll) {
|
|
8187
|
+
return;
|
|
8020
8188
|
}
|
|
8021
8189
|
/** @type {?} */
|
|
8022
|
-
var
|
|
8023
|
-
if (
|
|
8024
|
-
|
|
8025
|
-
return contentHeight + "px";
|
|
8190
|
+
var scrollX = this.resolveScrollX(this.tableColWidthTotal, false);
|
|
8191
|
+
if (this.scroll && this.scroll.x === scrollX && this.scroll.y === null) {
|
|
8192
|
+
return;
|
|
8026
8193
|
}
|
|
8027
|
-
|
|
8194
|
+
this.scroll = { x: scrollX, y: null };
|
|
8195
|
+
this.cdr.markForCheck();
|
|
8028
8196
|
};
|
|
8029
8197
|
/**
|
|
8030
8198
|
* @return {?}
|
|
@@ -8051,17 +8219,28 @@
|
|
|
8051
8219
|
colWidth += item.width;
|
|
8052
8220
|
}
|
|
8053
8221
|
}));
|
|
8222
|
+
this.tableColWidthTotal = colWidth;
|
|
8054
8223
|
/** @type {?} */
|
|
8055
8224
|
var maxOffset = this.tableTotal ? 180 : 140;
|
|
8056
8225
|
/** @type {?} */
|
|
8057
|
-
var
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8226
|
+
var useVirtual = this.useVirtualScroll;
|
|
8227
|
+
if (this.virtualScroll && !useVirtual) {
|
|
8228
|
+
this.scroll = {
|
|
8229
|
+
x: this.resolveScrollX(colWidth, false),
|
|
8230
|
+
y: null,
|
|
8231
|
+
};
|
|
8232
|
+
return;
|
|
8233
|
+
}
|
|
8234
|
+
if (!this.virtualScroll) {
|
|
8235
|
+
this.scroll = {
|
|
8236
|
+
x: "1px",
|
|
8237
|
+
y: "calc(100vh - " + maxOffset + "px)",
|
|
8238
|
+
};
|
|
8239
|
+
return;
|
|
8240
|
+
}
|
|
8062
8241
|
this.scroll = {
|
|
8063
|
-
x:
|
|
8064
|
-
y:
|
|
8242
|
+
x: this.resolveScrollX(colWidth, true),
|
|
8243
|
+
y: this.getVirtualScrollY(maxOffset),
|
|
8065
8244
|
};
|
|
8066
8245
|
};
|
|
8067
8246
|
// 表格勾选逻辑
|
|
@@ -8225,9 +8404,9 @@
|
|
|
8225
8404
|
HdTableComponent.decorators = [
|
|
8226
8405
|
{ type: core.Component, args: [{
|
|
8227
8406
|
selector: "hd-table",
|
|
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\"
|
|
8407
|
+
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\" [class.hd-table--virtual]=\"useVirtualScroll\" [nzScroll]=\"scroll\"\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]=\"useVirtualScroll\" [nzVirtualItemSize]=\"useVirtualScroll ? 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=\"useVirtualScroll\" 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=\"!useVirtualScroll\">\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",
|
|
8229
8408
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
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}"]
|
|
8409
|
+
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}.hd-table-container:not(.hd-table--virtual) ::ng-deep .ant-table-body{max-height:none!important;overflow-y:visible!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}"]
|
|
8231
8410
|
}] }
|
|
8232
8411
|
];
|
|
8233
8412
|
/** @nocollapse */
|
|
@@ -8389,6 +8568,18 @@
|
|
|
8389
8568
|
* @type {?}
|
|
8390
8569
|
*/
|
|
8391
8570
|
HdTableComponent.prototype.measuredVirtualItemSize;
|
|
8571
|
+
/**
|
|
8572
|
+
* 记录当前是否处于虚拟滚动模式,用于切换 pageSize 时重建表格
|
|
8573
|
+
* @type {?}
|
|
8574
|
+
* @private
|
|
8575
|
+
*/
|
|
8576
|
+
HdTableComponent.prototype.virtualScrollActive;
|
|
8577
|
+
/**
|
|
8578
|
+
* 可见列总宽,用于判断是否需要横向滚动
|
|
8579
|
+
* @type {?}
|
|
8580
|
+
* @private
|
|
8581
|
+
*/
|
|
8582
|
+
HdTableComponent.prototype.tableColWidthTotal;
|
|
8392
8583
|
/** @type {?} */
|
|
8393
8584
|
HdTableComponent.prototype.nzTableComponent;
|
|
8394
8585
|
/** @type {?} */
|