fantasy-ngzorro 2.2.36 → 2.2.38

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.
@@ -1126,7 +1126,8 @@ function getTableScrollXViewportWidth(nzTable, hostClass = "hd-table-container")
1126
1126
  return getTableViewportWidth(nzTable, hostClass);
1127
1127
  }
1128
1128
  /**
1129
- * 无数据或列宽未超出容器时不启用横向 scroll(fluid:表宽 100%,勾选/序号列由 CSS 锁宽)
1129
+ * 无数据或列宽未超出容器时不启用横向 scroll(表宽 100%、table-layout: auto)。
1130
+ * auto 布局下单元格 max-width 不生效,固定宽列会被均摊撑开;需要锁宽的场景见 hd-table 的横向布局。
1130
1131
  * @param {?} nzTable
1131
1132
  * @param {?} hasData
1132
1133
  * @param {?=} colWidth
@@ -4230,19 +4231,25 @@ class HdFilterComponent {
4230
4231
  this.validateFilterForm.patchValue(patch);
4231
4232
  }
4232
4233
  /**
4233
- * 多选 / 日期范围空态用 [],避免 FormControl 为 null 时 nz-select multiple 不显示 placeholder。
4234
+ * 多选空态用 [],避免 FormControl 为 null 时 nz-select multiple 不显示 placeholder。
4235
+ * DateRange 必须保持 null(或把历史空数组归一为 null):业务侧大量用 !value 判断,
4236
+ * 若规范成 [] 会因 truthy 走进 moment(value[0]),被解析成「今天」。
4234
4237
  * @private
4235
4238
  * @param {?} filter
4236
4239
  * @param {?} value
4237
4240
  * @return {?}
4238
4241
  */
4239
4242
  normalizeFilterControlValue(filter, value) {
4240
- if (filter &&
4241
- (filter.type === FilterListType.MultipleSelect ||
4242
- filter.type === FilterListType.DateRange) &&
4243
- value == null) {
4243
+ if (!filter) {
4244
+ return value;
4245
+ }
4246
+ if (filter.type === FilterListType.MultipleSelect && value == null) {
4244
4247
  return [];
4245
4248
  }
4249
+ if (filter.type === FilterListType.DateRange &&
4250
+ (value == null || (Array.isArray(value) && value.length === 0))) {
4251
+ return null;
4252
+ }
4246
4253
  return value;
4247
4254
  }
4248
4255
  /**
@@ -4257,6 +4264,9 @@ class HdFilterComponent {
4257
4264
  }
4258
4265
  if (filter.type === FilterListType.DateRange) {
4259
4266
  if (Array.isArray(value)) {
4267
+ if (value.length === 0) {
4268
+ return null;
4269
+ }
4260
4270
  return value.map((/**
4261
4271
  * @param {?} v
4262
4272
  * @return {?}
@@ -9115,6 +9125,67 @@ if (false) {
9115
9125
  * @fileoverview added by tsickle
9116
9126
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
9117
9127
  */
9128
+ /**
9129
+ * 勾选列宽(px),与模板 nzWidth、less 兜底保持一致
9130
+ * @type {?}
9131
+ */
9132
+ const SELECT_COL_WIDTH = 40;
9133
+ /**
9134
+ * 横向布局计算结果
9135
+ * @record
9136
+ */
9137
+ function HdTableHorizontalLayout() { }
9138
+ if (false) {
9139
+ /**
9140
+ * 传给 nzScroll.x;只有列宽总和 <= 0 时为 null
9141
+ * @type {?}
9142
+ */
9143
+ HdTableHorizontalLayout.prototype.scrollX;
9144
+ /**
9145
+ * 补到最后一列业务列上的宽度,列多时为 0
9146
+ * @type {?}
9147
+ */
9148
+ HdTableHorizontalLayout.prototype.fluidExtra;
9149
+ /**
9150
+ * 实际渲染总宽 = 声明总宽 + fluidExtra
9151
+ * @type {?}
9152
+ */
9153
+ HdTableHorizontalLayout.prototype.displayTotal;
9154
+ /**
9155
+ * 列少、靠补宽吃满容器,不需要真正横滚
9156
+ * @type {?}
9157
+ */
9158
+ HdTableHorizontalLayout.prototype.isFluid;
9159
+ }
9160
+ /**
9161
+ * 列多(或量不到容器宽):scroll.x = 声明总宽,正常横滚
9162
+ * @param {?} declaredWidth
9163
+ * @return {?}
9164
+ */
9165
+ function fixedLayout(declaredWidth) {
9166
+ return {
9167
+ scrollX: `${Math.ceil(declaredWidth)}px`,
9168
+ fluidExtra: 0,
9169
+ displayTotal: declaredWidth,
9170
+ isFluid: false,
9171
+ };
9172
+ }
9173
+ /**
9174
+ * 列少:scroll.x = 容器宽,差额补到最后一列业务列
9175
+ * @param {?} containerWidth
9176
+ * @param {?} declaredWidth
9177
+ * @return {?}
9178
+ */
9179
+ function fluidLayout(containerWidth, declaredWidth) {
9180
+ /** @type {?} */
9181
+ const fluidExtra = Math.max(0, containerWidth - declaredWidth);
9182
+ return {
9183
+ scrollX: `${containerWidth}px`,
9184
+ fluidExtra,
9185
+ displayTotal: declaredWidth + fluidExtra,
9186
+ isFluid: true,
9187
+ };
9188
+ }
9118
9189
  class HdTableComponent {
9119
9190
  /**
9120
9191
  * @param {?} hostEl
@@ -9204,21 +9275,19 @@ class HdTableComponent {
9204
9275
  */
9205
9276
  this.virtualScrollActive = null;
9206
9277
  /**
9207
- * 列宽合计(含勾选/序号 + fluid 补宽),footer 表宽与横向 scroll 共用
9278
+ * 实际渲染列宽合计(含勾选/序号 + 补宽),合计 footer 表宽用
9208
9279
  */
9209
9280
  this.tableColWidthTotal = 0;
9210
9281
  /**
9211
- * fluid:声明列总宽 < 容器时,把差额补到最后一列业务列(不改缓存宽),
9212
- * 并设 scroll.x = 容器宽,避免表宽 100% 均摊撑开勾选列;拖拽改宽仍写 col.width。
9282
+ * 补到 fluidExtraTargetCol 上的宽度;只影响展示,不写回 col.width(列宽缓存、拖拽仍用声明宽)
9213
9283
  */
9214
9284
  this.fluidExtraWidth = 0;
9215
9285
  /**
9216
- * 列总宽未超出容器(fluid 补宽吃满):不需要真正横滚,
9217
- * 用于关掉 ng-zorro fixed-header 带来的常驻 X 轴滚动条。
9286
+ * 列少、靠补宽吃满容器:模板据此加 hd-table--fluid-x,隐藏 fixed-header 常驻的横滚槽
9218
9287
  */
9219
9288
  this.fluidHorizontal = false;
9220
9289
  /**
9221
- * fluid 补宽目标列缓存,避免模板每格 CD 时反复扫 tableCols
9290
+ * 接收补宽的列,缓存起来避免模板每个单元格都扫一遍 tableCols
9222
9291
  */
9223
9292
  this.fluidExtraTargetCol = null;
9224
9293
  /**
@@ -9425,10 +9494,8 @@ class HdTableComponent {
9425
9494
  changes["tableData"]["currentValue"]["pageNumber"] !==
9426
9495
  changes["tableData"]["previousValue"]["pageNumber"]) {
9427
9496
  this.pendingResetScrollTop = true;
9428
- // pageSize/pageNumber 变化也要重算 scroll / fluid。
9429
- // 业务常把 Page.pageSize 写成 content.length(如收款编辑 toPage),
9430
- // virtualScroll=false 时若这里跳过,空表初始化后的 fluid 不会补上,勾选列被撑开。
9431
- // applyTableScrollMode(false) 在模式未变时只 dealScroll,不会强制重建清排序态。
9497
+ // 业务可能把 Page.pageSize 写成 content.length,换数据时就会走到这里,
9498
+ // 必须重算横向布局。滚动模式不变时不会重建,排序态不会被清掉。
9432
9499
  this.applyTableScrollMode(false);
9433
9500
  // 翻页/改 pageSize:主动多次复位,覆盖 CDK 异步渲染时序
9434
9501
  this.scheduleResetTableBodyScrollTop();
@@ -9440,9 +9507,7 @@ class HdTableComponent {
9440
9507
  }
9441
9508
  if (changes["tableData"]) {
9442
9509
  this.pendingResetScrollTop = true;
9443
- // 不论是否虚拟滚动都要重算 scroll / fluid。
9444
- // 收款/付款编辑等页 [virtualScroll]=false + 异步灌数据:原先跳过会导致
9445
- // 空表初始化后不再补宽,勾选列被均摊撑开。
9510
+ // 不论是否虚拟滚动,数据变化后都要重算横向布局
9446
9511
  this.applyTableScrollMode(false);
9447
9512
  // 数据更新后复位纵向滚动(含虚拟滚动场景)
9448
9513
  this.scheduleResetTableBodyScrollTop();
@@ -9622,11 +9687,11 @@ class HdTableComponent {
9622
9687
  return col.fixed === "left" ? `${col.fixedWidth || 0}px` : null;
9623
9688
  }
9624
9689
  /**
9625
- * 开启合计时序号列的 left(勾选列占 40px)
9690
+ * 开启合计时序号列的 left(跟在勾选列后面)
9626
9691
  * @return {?}
9627
9692
  */
9628
9693
  get lineNumberLeft() {
9629
- return this.showSelected ? "40px" : "0px";
9694
+ return (this.showSelected ? SELECT_COL_WIDTH : 0) + "px";
9630
9695
  }
9631
9696
  /**
9632
9697
  * @return {?}
@@ -9643,49 +9708,98 @@ class HdTableComponent {
9643
9708
  return !(this.scroll && this.scroll.x);
9644
9709
  }
9645
9710
  /**
9646
- * 展示用列宽:fluid 时最后一列业务列 = 声明宽 + fluidExtraWidth
9711
+ * @private
9712
+ * @param {?} col
9713
+ * @return {?}
9714
+ */
9715
+ isColVisible(col) {
9716
+ return !!col && col.isShow !== false;
9717
+ }
9718
+ /**
9719
+ * 业务列声明宽:未配置时按 fixColWidth
9720
+ * @private
9721
+ * @param {?} col
9722
+ * @return {?}
9723
+ */
9724
+ getColDeclaredWidth(col) {
9725
+ return col && col.width > 0 ? col.width : ColWidth.fixColWidth;
9726
+ }
9727
+ /**
9728
+ * 声明列宽合计:勾选列 + 序号列 + 可见业务列,不含补宽
9729
+ * @private
9730
+ * @return {?}
9731
+ */
9732
+ getDeclaredColWidthTotal() {
9733
+ /** @type {?} */
9734
+ let total = 0;
9735
+ if (this.showSelected) {
9736
+ total += SELECT_COL_WIDTH;
9737
+ }
9738
+ if (this.showTableTotal) {
9739
+ total += this.lineNumberColWidth;
9740
+ }
9741
+ (this.tableCols || []).forEach((/**
9742
+ * @param {?} col
9743
+ * @return {?}
9744
+ */
9745
+ (col) => {
9746
+ if (this.isColVisible(col)) {
9747
+ total += this.getColDeclaredWidth(col);
9748
+ }
9749
+ }));
9750
+ return total;
9751
+ }
9752
+ /**
9753
+ * 模板里 th / td / 合计 col 用的列宽:补宽目标列 = 声明宽 + fluidExtraWidth
9647
9754
  * @param {?} col
9648
9755
  * @return {?}
9649
9756
  */
9650
9757
  getColDisplayWidth(col) {
9651
9758
  /** @type {?} */
9652
- const base = col && col.width != null && col.width > 0
9653
- ? col.width
9654
- : ColWidth.fixColWidth;
9655
- if (this.fluidExtraWidth <= 0 ||
9656
- !col ||
9657
- !this.fluidExtraTargetCol ||
9658
- col !== this.fluidExtraTargetCol) {
9659
- return base;
9759
+ const declared = this.getColDeclaredWidth(col);
9760
+ if (this.fluidExtraWidth > 0 && col && col === this.fluidExtraTargetCol) {
9761
+ return declared + this.fluidExtraWidth;
9660
9762
  }
9661
- return base + this.fluidExtraWidth;
9763
+ return declared;
9662
9764
  }
9663
9765
  /**
9664
- * 按当前 layout 刷新 fluid 补宽目标列(仅 dealScroll / sync 时调用)
9766
+ * 选出接收补宽的列:优先最后一列「非右侧固定」的可见列,
9767
+ * 避免把操作列等右固定列拉宽;全是右固定列时退回最后一列可见列。
9665
9768
  * @private
9666
9769
  * @return {?}
9667
9770
  */
9668
- refreshFluidExtraTargetCol() {
9669
- this.fluidExtraTargetCol = null;
9670
- if (this.fluidExtraWidth <= 0 || !this.tableCols || !this.tableCols.length) {
9671
- return;
9672
- }
9673
- for (let i = this.tableCols.length - 1; i >= 0; i--) {
9771
+ findFluidExtraTargetCol() {
9772
+ /** @type {?} */
9773
+ const cols = this.tableCols || [];
9774
+ /** @type {?} */
9775
+ let lastVisible = null;
9776
+ for (let i = cols.length - 1; i >= 0; i--) {
9674
9777
  /** @type {?} */
9675
- const c = this.tableCols[i];
9676
- if (c && c.isShow && c.fixed !== "right") {
9677
- this.fluidExtraTargetCol = c;
9678
- return;
9778
+ const col = cols[i];
9779
+ if (!this.isColVisible(col)) {
9780
+ continue;
9679
9781
  }
9680
- }
9681
- for (let i = this.tableCols.length - 1; i >= 0; i--) {
9682
- /** @type {?} */
9683
- const c = this.tableCols[i];
9684
- if (c && c.isShow) {
9685
- this.fluidExtraTargetCol = c;
9686
- return;
9782
+ if (col.fixed !== "right") {
9783
+ return col;
9784
+ }
9785
+ if (!lastVisible) {
9786
+ lastVisible = col;
9687
9787
  }
9688
9788
  }
9789
+ return lastVisible;
9790
+ }
9791
+ /**
9792
+ * 把横向布局结果写回组件状态(dealScroll / syncHorizontalScroll 共用)
9793
+ * @private
9794
+ * @param {?} layout
9795
+ * @return {?}
9796
+ */
9797
+ applyHorizontalLayout(layout) {
9798
+ this.fluidExtraWidth = layout.fluidExtra;
9799
+ this.fluidHorizontal = layout.isFluid;
9800
+ this.fluidExtraTargetCol =
9801
+ layout.fluidExtra > 0 ? this.findFluidExtraTargetCol() : null;
9802
+ this.tableColWidthTotal = layout.displayTotal;
9689
9803
  }
9690
9804
  /**
9691
9805
  * fluid → 100%;固定 → scroll.x(与表体同一套横向宽度)
@@ -9800,23 +9914,7 @@ class HdTableComponent {
9800
9914
  // ng-zorro 只在 AfterViewInit 绑一次 header/body 的 scroll 同步;
9801
9915
  // 若先以 y=null 创建再改成有 y,表头监听会丢,表现为列头不跟着横滚。
9802
9916
  this.presetScrollBeforeRemount(useVirtual);
9803
- this.showTable = false;
9804
- this.cdr.markForCheck();
9805
- setTimeout((/**
9806
- * @return {?}
9807
- */
9808
- () => {
9809
- this.showTable = true;
9810
- this.cdr.markForCheck();
9811
- setTimeout((/**
9812
- * @return {?}
9813
- */
9814
- () => {
9815
- this.dealScroll();
9816
- this.cdr.markForCheck();
9817
- this.afterTableRender(useVirtual);
9818
- }));
9819
- }));
9917
+ this.remountTable(useVirtual);
9820
9918
  return;
9821
9919
  }
9822
9920
  /** @type {?} */
@@ -9828,32 +9926,40 @@ class HdTableComponent {
9828
9926
  const nextHasX = !!(this.scroll && this.scroll.x);
9829
9927
  /** @type {?} */
9830
9928
  const nextHasY = !!(this.scroll && this.scroll.y);
9831
- // 运行中 x/y 从有变无/从无变有时,也必须重建:
9832
- // - y:ng-zorro 只在 AfterViewInit 绑一次 header/body 同步
9833
- // - x:空表 scroll.x=null(table-layout:auto)→ 有数据后设 scroll.x(fixed),
9834
- // 不重建时勾选列仍按 auto 均摊撑开(收款编辑等异步灌数页)
9929
+ // scroll.x / scroll.y 从无到有(或反过来)时必须重建,原地改值不生效:
9930
+ // - y:ng-zorro 8 只在 AfterViewInit 绑一次表头/表体滚动同步,且决定表头是否拆成独立 table
9931
+ // - x:决定是否带 ant-table-fixed(table-layout: fixed),勾选列锁宽依赖它
9835
9932
  if (prevHasY !== nextHasY || prevHasX !== nextHasX) {
9836
- this.showTable = false;
9933
+ this.remountTable(useVirtual);
9934
+ return;
9935
+ }
9936
+ this.cdr.markForCheck();
9937
+ this.afterTableRender(useVirtual);
9938
+ }
9939
+ /**
9940
+ * 销毁并重建 nz-table:等 DOM 出来后再按真实容器宽重算一次横向布局
9941
+ * @private
9942
+ * @param {?} useVirtual
9943
+ * @return {?}
9944
+ */
9945
+ remountTable(useVirtual) {
9946
+ this.showTable = false;
9947
+ this.cdr.markForCheck();
9948
+ setTimeout((/**
9949
+ * @return {?}
9950
+ */
9951
+ () => {
9952
+ this.showTable = true;
9837
9953
  this.cdr.markForCheck();
9838
9954
  setTimeout((/**
9839
9955
  * @return {?}
9840
9956
  */
9841
9957
  () => {
9842
- this.showTable = true;
9958
+ this.dealScroll();
9843
9959
  this.cdr.markForCheck();
9844
- setTimeout((/**
9845
- * @return {?}
9846
- */
9847
- () => {
9848
- this.dealScroll();
9849
- this.cdr.markForCheck();
9850
- this.afterTableRender(useVirtual);
9851
- }));
9960
+ this.afterTableRender(useVirtual);
9852
9961
  }));
9853
- return;
9854
- }
9855
- this.cdr.markForCheck();
9856
- this.afterTableRender(useVirtual);
9962
+ }));
9857
9963
  }
9858
9964
  /**
9859
9965
  * 重建前预设 scroll,保证 AfterViewInit 时 header/body 结构已正确
@@ -10571,27 +10677,27 @@ class HdTableComponent {
10571
10677
  getVirtualScrollY(maxOffset) {
10572
10678
  return `calc(100vh - ${maxOffset}px)`;
10573
10679
  }
10574
- /**
10575
- * @private
10576
- * @return {?}
10577
- */
10578
- hasTableData() {
10579
- return !!(this.tableData &&
10580
- this.tableData.content &&
10581
- this.tableData.content.length);
10582
- }
10583
- /**
10584
- * 按声明列总宽 + 容器宽,计算 scroll.x 与 fluid 补宽。
10585
- * 列少:scroll.x = 内容区宽(clientWidth),差额加到最后业务列(勾选保持 40);
10586
- * 列多:scroll.x = 声明总宽。
10587
- * 比较是否超宽用 offsetWidth(含 Y 槽),避免「仅因纵滚条」误开横滚;
10588
- * 补宽目标用 clientWidth,且 scroll.x 用 floor,避免表宽多 1px 逼出 X 轴滚动条。
10680
+ /*
10681
+ * 横向布局(勾选列锁 40px 的关键)
10682
+ *
10683
+ * 勾选列只有在 table-layout: fixed 下才锁得住:ng-zorro 8 仅在 nzScroll.x 有值时
10684
+ * 给 table 加 ant-table-fixed;auto 布局下 table 宽 100%、每列都有 nzWidth,
10685
+ * 剩余空间会按比例摊到所有列(含勾选列),单元格上的 max-width 也不生效。
10686
+ * 所以只要有列(无论有没有数据)就一定设置 scroll.x:
10687
+ * - 列少:scroll.x = 容器宽,差额补到最后一列业务列(fluid,不出真横滚)
10688
+ * - 列多:scroll.x = 声明总宽,正常横滚
10689
+ * less 里勾选列的 40px 只是 fixed 布局下的兜底。
10690
+ */
10691
+ /**
10692
+ * 按声明列宽合计 + 容器宽算出横向布局。
10693
+ * 判断「是否超宽」用 offsetWidth(含竖滚条槽),避免只因竖滚条就误开横滚;
10694
+ * 补宽目标用 clientWidth 并向下取整,避免表宽多 1px 逼出横滚条。
10589
10695
  * @private
10590
10696
  * @param {?} declaredColWidth
10591
10697
  * @return {?}
10592
10698
  */
10593
10699
  resolveHorizontalLayout(declaredColWidth) {
10594
- if (!this.hasTableData() || declaredColWidth <= 0) {
10700
+ if (declaredColWidth <= 0) {
10595
10701
  return {
10596
10702
  scrollX: null,
10597
10703
  fluidExtra: 0,
@@ -10600,108 +10706,56 @@ class HdTableComponent {
10600
10706
  };
10601
10707
  }
10602
10708
  /** @type {?} */
10603
- let viewportCompare = this.nzTableComponent
10709
+ let compareWidth = this.nzTableComponent
10604
10710
  ? getTableScrollXViewportWidth(this.nzTableComponent)
10605
10711
  : 0;
10606
- // 表体尚未量到宽时(异步灌数 / spin / 刚 remount),用宿主宽兜底
10607
- if (viewportCompare <= 0 && this.hostEl && this.hostEl.nativeElement) {
10608
- /** @type {?} */
10609
- const hostW = ((/** @type {?} */ (this.hostEl.nativeElement))).offsetWidth;
10610
- if (hostW > 0) {
10611
- viewportCompare = hostW;
10612
- }
10712
+ // 表体还没渲染出来(刚重建 / 在 spin 里)时用宿主宽兜底
10713
+ if (compareWidth <= 0 && this.hostEl && this.hostEl.nativeElement) {
10714
+ compareWidth = ((/** @type {?} */ (this.hostEl.nativeElement))).offsetWidth;
10613
10715
  }
10614
- if (viewportCompare > 0) {
10615
- if (declaredColWidth > viewportCompare + 1) {
10616
- return {
10617
- scrollX: `${Math.ceil(declaredColWidth)}px`,
10618
- fluidExtra: 0,
10619
- displayTotal: declaredColWidth,
10620
- isFluid: false,
10621
- };
10622
- }
10623
- /** @type {?} */
10624
- const fillWidth = this.nzTableComponent
10625
- ? getTableViewportWidth(this.nzTableComponent)
10626
- : 0;
10627
- /** @type {?} */
10628
- const target = Math.floor(fillWidth > 0 ? fillWidth : viewportCompare);
10629
- /** @type {?} */
10630
- const fluidExtra = Math.max(0, target - declaredColWidth);
10631
- return {
10632
- scrollX: `${target}px`,
10633
- fluidExtra,
10634
- displayTotal: declaredColWidth + fluidExtra,
10635
- isFluid: true,
10636
- };
10716
+ // 仍量不到(如宿主在 display:none 里):先按声明宽走 fixed,等 ResizeObserver 触发再转 fluid
10717
+ if (compareWidth <= 0) {
10718
+ return fixedLayout(declaredColWidth);
10637
10719
  }
10638
- // 视口仍测不到:至少用声明宽设 scroll.x,强制 fixed 布局锁勾选列,
10639
- // 避免落回 table-layout:auto 被均摊撑开;后续 sync/remount 再转 fluid。
10640
- return {
10641
- scrollX: `${Math.ceil(declaredColWidth)}px`,
10642
- fluidExtra: 0,
10643
- displayTotal: declaredColWidth,
10644
- isFluid: false,
10645
- };
10720
+ // 1px 容差,避免亚像素误判
10721
+ if (declaredColWidth > compareWidth + 1) {
10722
+ return fixedLayout(declaredColWidth);
10723
+ }
10724
+ /** @type {?} */
10725
+ const fillWidth = this.nzTableComponent
10726
+ ? getTableViewportWidth(this.nzTableComponent)
10727
+ : 0;
10728
+ /** @type {?} */
10729
+ const containerWidth = Math.floor(fillWidth > 0 ? fillWidth : compareWidth);
10730
+ return fluidLayout(containerWidth, declaredColWidth);
10646
10731
  }
10647
10732
  /**
10648
- * 表格渲染后按实际容器宽度校正横向 scroll / fluid 补宽
10733
+ * 表格渲染后按真实容器宽校正横向布局;只改 x,y 保持不变
10649
10734
  * @private
10650
10735
  * @return {?}
10651
10736
  */
10652
10737
  syncHorizontalScroll() {
10653
- /** @type {?} */
10654
- let declared = 0;
10655
- if (this.showSelected) {
10656
- declared += 40;
10657
- }
10658
- if (this.showTableTotal) {
10659
- declared += this.lineNumberColWidth;
10660
- }
10661
- if (this.tableCols) {
10662
- this.tableCols.forEach((/**
10663
- * @param {?} item
10664
- * @return {?}
10665
- */
10666
- (item) => {
10667
- if (item && item.isShow !== false) {
10668
- declared += item.width > 0 ? item.width : ColWidth.fixColWidth;
10669
- }
10670
- }));
10671
- }
10672
10738
  /** @type {?} */
10673
10739
  const prevHasX = !!(this.scroll && this.scroll.x);
10674
10740
  /** @type {?} */
10675
- const layout = this.resolveHorizontalLayout(declared);
10676
- /** @type {?} */
10677
- const currentY = this.scroll ? this.scroll.y : null;
10741
+ const layout = this.resolveHorizontalLayout(this.getDeclaredColWidthTotal());
10678
10742
  /** @type {?} */
10679
- const nextHasX = !!layout.scrollX;
10680
- /** @type {?} */
10681
- const sameX = this.scroll && this.scroll.x === layout.scrollX;
10682
- /** @type {?} */
10683
- const sameExtra = this.fluidExtraWidth === layout.fluidExtra;
10684
- /** @type {?} */
10685
- const sameFluid = this.fluidHorizontal === layout.isFluid;
10686
- if (sameX &&
10687
- sameExtra &&
10688
- sameFluid &&
10689
- this.scroll &&
10690
- this.scroll.y === currentY) {
10743
+ const unchanged = this.scroll &&
10744
+ this.scroll.x === layout.scrollX &&
10745
+ this.fluidExtraWidth === layout.fluidExtra &&
10746
+ this.fluidHorizontal === layout.isFluid;
10747
+ if (unchanged) {
10691
10748
  setTimeout((/**
10692
10749
  * @return {?}
10693
10750
  */
10694
10751
  () => this.syncTotalFooterWithBody()));
10695
10752
  return;
10696
10753
  }
10697
- this.fluidExtraWidth = layout.fluidExtra;
10698
- this.fluidHorizontal = layout.isFluid;
10699
- this.refreshFluidExtraTargetCol();
10700
- this.tableColWidthTotal = layout.displayTotal;
10701
- this.scroll = { x: layout.scrollX, y: currentY };
10754
+ this.applyHorizontalLayout(layout);
10755
+ this.scroll = { x: layout.scrollX, y: this.scroll ? this.scroll.y : null };
10702
10756
  this.cdr.markForCheck();
10703
- // sync 阶段若补上了 scroll.x,需重建才能切到 fixed 布局
10704
- if (prevHasX !== nextHasX) {
10757
+ // x 从无到有(或反过来)要重建才能切换 table-layout
10758
+ if (prevHasX !== !!layout.scrollX) {
10705
10759
  this.applyTableScrollMode(true);
10706
10760
  return;
10707
10761
  }
@@ -10720,7 +10774,8 @@ class HdTableComponent {
10720
10774
  return;
10721
10775
  }
10722
10776
  /** @type {?} */
10723
- const header = (/** @type {?} */ (((/** @type {?} */ (this.nzTableComponent))).tableHeaderNativeElement));
10777
+ const header = (/** @type {?} */ (((/** @type {?} */ (this.nzTableComponent)))
10778
+ .tableHeaderNativeElement));
10724
10779
  /** @type {?} */
10725
10780
  const body = this.getTableBodyScrollEl();
10726
10781
  if (this.scroll && this.scroll.x && header && body) {
@@ -10740,7 +10795,8 @@ class HdTableComponent {
10740
10795
  return null;
10741
10796
  }
10742
10797
  /** @type {?} */
10743
- const mix = (/** @type {?} */ (((/** @type {?} */ (this.nzTableComponent))).mixTableBodyNativeElement));
10798
+ const mix = (/** @type {?} */ (((/** @type {?} */ (this.nzTableComponent)))
10799
+ .mixTableBodyNativeElement));
10744
10800
  if (mix) {
10745
10801
  return mix;
10746
10802
  }
@@ -10943,13 +10999,14 @@ class HdTableComponent {
10943
10999
  * @return {?}
10944
11000
  */
10945
11001
  dealScroll() {
11002
+ // 左侧固定列:从左往右累计偏移(勾选列、序号列在最前面)
10946
11003
  /** @type {?} */
10947
- let colWidth = 0;
11004
+ let leftOffset = 0;
10948
11005
  if (this.showSelected) {
10949
- colWidth += 40;
11006
+ leftOffset += SELECT_COL_WIDTH;
10950
11007
  }
10951
11008
  if (this.showTableTotal) {
10952
- colWidth += this.lineNumberColWidth; // 序号列(固定宽,不随位数变化)
11009
+ leftOffset += this.lineNumberColWidth;
10953
11010
  }
10954
11011
  this.tableCols.forEach((/**
10955
11012
  * @param {?} item
@@ -10959,9 +11016,9 @@ class HdTableComponent {
10959
11016
  if (!item.width) {
10960
11017
  item.width = ColWidth.fixColWidth;
10961
11018
  }
10962
- if (item.isShow !== false) {
10963
- item.fixedWidth = colWidth;
10964
- colWidth += item.width;
11019
+ if (this.isColVisible(item)) {
11020
+ item.fixedWidth = leftOffset;
11021
+ leftOffset += item.width;
10965
11022
  }
10966
11023
  }));
10967
11024
  // 右侧固定列:从右往左累计偏移,避免多列都 right:0 互相遮挡
@@ -10970,7 +11027,7 @@ class HdTableComponent {
10970
11027
  for (let i = this.tableCols.length - 1; i >= 0; i--) {
10971
11028
  /** @type {?} */
10972
11029
  const item = this.tableCols[i];
10973
- if (item.isShow === false) {
11030
+ if (!this.isColVisible(item)) {
10974
11031
  continue;
10975
11032
  }
10976
11033
  if (item.fixed === "right") {
@@ -10982,11 +11039,8 @@ class HdTableComponent {
10982
11039
  }
10983
11040
  }
10984
11041
  /** @type {?} */
10985
- const layout = this.resolveHorizontalLayout(colWidth);
10986
- this.fluidExtraWidth = layout.fluidExtra;
10987
- this.fluidHorizontal = layout.isFluid;
10988
- this.refreshFluidExtraTargetCol();
10989
- this.tableColWidthTotal = layout.displayTotal;
11042
+ const layout = this.resolveHorizontalLayout(this.getDeclaredColWidthTotal());
11043
+ this.applyHorizontalLayout(layout);
10990
11044
  /** @type {?} */
10991
11045
  const maxOffset = this.getScrollYMaxOffset();
10992
11046
  /** @type {?} */
@@ -11161,7 +11215,9 @@ class HdTableComponent {
11161
11215
  * @return {?}
11162
11216
  */
11163
11217
  getTableTotalCellMeta(col, colIndex) {
11164
- if (!col || !this.tableTotalOptionList || !this.tableTotalOptionList.length) {
11218
+ if (!col ||
11219
+ !this.tableTotalOptionList ||
11220
+ !this.tableTotalOptionList.length) {
11165
11221
  return null;
11166
11222
  }
11167
11223
  /** @type {?} */
@@ -11472,7 +11528,8 @@ class HdTableComponent {
11472
11528
  * @return {?}
11473
11529
  */
11474
11530
  hasRowNo(col) {
11475
- return !!(col && (col.rowNo === true || (typeof col.rowNo === "string" && col.rowNo)));
11531
+ return !!(col &&
11532
+ (col.rowNo === true || (typeof col.rowNo === "string" && col.rowNo)));
11476
11533
  }
11477
11534
  /**
11478
11535
  * 行号文案。rowNo 为字段名时取行数据;为 true 时按当前页序号(跨页连续,从 1 开始)。
@@ -11507,7 +11564,10 @@ class HdTableComponent {
11507
11564
  * @return {?}
11508
11565
  */
11509
11566
  getTitleParts(col) {
11510
- if (!this.hasRowNo(col) || !col || !col.title || String(col.title).indexOf("|") < 0) {
11567
+ if (!this.hasRowNo(col) ||
11568
+ !col ||
11569
+ !col.title ||
11570
+ String(col.title).indexOf("|") < 0) {
11511
11571
  return null;
11512
11572
  }
11513
11573
  /** @type {?} */
@@ -11946,7 +12006,7 @@ class HdTableComponent {
11946
12006
  HdTableComponent.decorators = [
11947
12007
  { type: Component, args: [{
11948
12008
  selector: "hd-table",
11949
- 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 <ng-container *ngIf=\"showColSettings\">\n <span class=\"hd-table-col-settings\" nz-dropdown nzTrigger=\"click\" [nzDropdownMenu]=\"menu\"\n [nzVisible]=\"isDropdownVisible\" (click)=\"confirmDropdown()\" title=\"\u5217\u8BBE\u7F6E\">\n <svg class=\"hd-table-col-settings-icon\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M4.92031 1.80756C5.02551 1.42884 5.37033 1.16675 5.76339 1.16675H8.23667C8.62973 1.16675 8.97455 1.42884 9.07975 1.80756L9.37802 2.88133L10.4571 2.60273C10.8377 2.50448 11.2371 2.67206 11.4336 3.01245L12.6703 5.15438C12.8668 5.49478 12.8122 5.92445 12.5369 6.20491L11.7561 7.00008L12.5369 7.79525C12.8122 8.07572 12.8668 8.50539 12.6703 8.84579L11.4336 10.9877C11.2371 11.3281 10.8377 11.4957 10.4571 11.3974L9.37802 11.1188L9.07975 12.1926C8.97455 12.5713 8.62973 12.8334 8.23667 12.8334H5.76339C5.37033 12.8334 5.02551 12.5713 4.92031 12.1926L4.62206 11.1189L3.54315 11.3974C3.16258 11.4957 2.76318 11.3281 2.56666 10.9877L1.33001 8.84579C1.13349 8.50539 1.18806 8.07572 1.46343 7.79525L2.24419 7.00008L1.46344 6.20491C1.18806 5.92445 1.13349 5.49478 1.33002 5.15438L2.56666 3.01245C2.76319 2.67206 3.16258 2.50448 3.54316 2.60273L4.62206 2.88127L4.92031 1.80756ZM4.54541 10.843L4.54552 10.8433L4.54541 10.843ZM5.98508 2.33341L5.66952 3.46945C5.54185 3.92906 5.06958 4.20173 4.60771 4.08249L3.46618 3.78778L2.45122 5.54572L3.2773 6.38705C3.6115 6.72742 3.6115 7.27275 3.2773 7.61312L2.45122 8.45444L3.46617 10.2124L4.60771 9.91768C5.06958 9.79844 5.54185 10.0711 5.66952 10.5307L5.98508 11.6667H8.01498L8.33056 10.5307C8.45823 10.071 8.9305 9.79838 9.39237 9.91762L10.5341 10.2124L11.5491 8.45444L10.723 7.61312C10.3888 7.27275 10.3888 6.72742 10.723 6.38705L11.5491 5.54572L10.5341 3.78778L9.39237 4.08254C8.9305 4.20178 8.45823 3.92912 8.33056 3.46951L8.01498 2.33341H5.98508ZM7.00003 5.83342C6.3557 5.83342 5.83337 6.35575 5.83337 7.00008C5.83337 7.64441 6.3557 8.16675 7.00003 8.16675C7.64436 8.16675 8.1667 7.64441 8.1667 7.00008C8.1667 6.35575 7.64436 5.83342 7.00003 5.83342ZM4.6667 7.00008C4.6667 5.71142 5.71137 4.66675 7.00003 4.66675C8.2887 4.66675 9.33337 5.71142 9.33337 7.00008C9.33337 8.28875 8.2887 9.33342 7.00003 9.33342C5.71137 9.33342 4.6667 8.28875 4.6667 7.00008Z\"\n fill=\"currentColor\" />\n </svg>\n </span>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <div class=\"hd-table-col-settings-dropdown\">\n <div class=\"hd-table-col-settings-list\">\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 class=\"hd-table-col-settings-footer\">\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 </div>\n </nz-dropdown-menu>\n </ng-container>\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\"\n [class.hd-table--scroll-y]=\"!!(scroll && scroll.y)\" [class.hd-table--scroll-x]=\"!!(scroll && scroll.x)\"\n [class.hd-table--fluid-x]=\"fluidHorizontal\"\n [class.hd-table--has-select]=\"showSelected\"\n [class.hd-table--has-total]=\"showTableTotal\"\n [nzScroll]=\"scroll\"\n [nzShowPagination]=\"pagination\" [nzShowSizeChanger]=\"pagination\" [nzShowQuickJumper]=\"pagination\"\n [nzFrontPagination]=\"useFrontPagination\" nzSize=\"middle\" [nzData]=\"tableData.content\"\n [nzTotal]=\"getTableTotalCount()\" [(nzPageIndex)]=\"tablePageIndex\" [nzLoading]=\"tableLoading\"\n [nzPageSizeOptions]=\"[ 10, 50, 100, 200, 500, 1000 ]\" [(nzPageSize)]=\"tablePageSize\"\n (nzPageSizeChange)=\"pagination ? search(true) : null\"\n (nzPageIndexChange)=\"pagination ? search(false) : null\"\n (nzCurrentPageDataChange)=\"showSelected ? currentPageDataChange($event) : null\"\n [nzShowTotal]=\"tableTotalTemplate\" [nzFooter]=\"showTableTotal ? tableTotalFooter : null\"\n [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 && selectType !== 'radio'\" nzShowCheckbox\n [(nzChecked)]=\"isAllDisplayDataChecked\" [nzIndeterminate]=\"isIndeterminate\"\n (nzCheckedChange)=\"checkAll($event)\"></th>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected && selectType === 'radio'\"></th>\n <th class=\"hd-table-line-no-col\" [nzWidth]=\"lineNumberColWidthPx\" [nzLeft]=\"lineNumberLeft\"\n *ngIf=\"showTableTotal\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let col of tableCols\">\n <th *ngIf=\"col.isShow\" [nzWidth]=\"getColDisplayWidth(col) + 'px'\" [nzAlign]=\"col.align\"\n [nzLeft]=\"getLeftSticky(col)\"\n [nzRight]=\"getRightSticky(col)\" nz-resizable nzBounds=\"window\" nzPreview\n (nzResizeEnd)=\"onResize($event, col)\" [nzShowSort]=\"col.canSort\" [nzSortKey]=\"col.name\"\n [nzSort]=\"getColSort(col)\">\n <span class=\"hd-table-col-title\">\n <span class=\"hd-table-col-require\" *ngIf=\"col.require && col.editType\">*</span>\n <ng-container *ngIf=\"getTitleParts(col) as titleParts; else plainTitle\">\n <span class=\"hd-table-title-with-bar\">{{ titleParts[0] }}<i class=\"hd-table-row-no-bar\"></i>{{ titleParts[1] }}</span>\n </ng-container>\n <ng-template #plainTitle>{{ col.title }}</ng-template>\n </span>\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\" [class.hd-table-row-invalid]=\"isInvalidRow(data)\">\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 [class.hd-table-row-invalid]=\"isInvalidRow(data)\">\n <ng-container *ngTemplateOutlet=\"tableCells; context: { $implicit: data, index: i }\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n <ng-template #tableTotalTemplate>\n \u5171 {{ getTableTotalCount() }} \u6761\u6570\u636E\n </ng-template>\n <ng-template #tableTotalFooter>\n <!--\n \u5217\u603B\u5BBD < \u5BB9\u5668\uFF1Ascroll.x=\u5BB9\u5668\u5BBD\uFF0C\u5DEE\u989D\u8865\u5230\u6700\u540E\u4E1A\u52A1\u5217\uFF08\u52FE\u9009\u4FDD\u6301 40\uFF09\uFF1B\u53EF\u62D6\u62FD\u3002\n \u5217\u603B\u5BBD > \u5BB9\u5668\uFF1Ascroll.x=\u58F0\u660E\u603B\u5BBD\uFF0C\u6A2A\u6EDA\u540C\u6B65\u3002\n -->\n <div class=\"hd-table-total-footer\"\n [class.hd-table-total-footer--fluid]=\"isTotalFooterFluid\"\n [class.hd-table-total-footer--y-gutter]=\"totalFooterNeedYGutter\">\n <table class=\"hd-table-total-footer-table\" [style.width]=\"totalFooterTableWidth\">\n <colgroup>\n <!-- \u52FE\u9009/\u5E8F\u53F7\u9501\u5BBD\uFF0C\u4E0D\u53C2\u4E0E\u5747\u644A -->\n <col *ngIf=\"showSelected\" style=\"width: 40px; min-width: 40px; max-width: 40px;\" />\n <col *ngIf=\"showTableTotal\"\n [style.width.px]=\"lineNumberColWidth\"\n [style.min-width.px]=\"lineNumberColWidth\"\n [style.max-width.px]=\"lineNumberColWidth\" />\n <ng-container *ngFor=\"let col of tableCols; trackBy: trackByCol\">\n <col *ngIf=\"col.isShow\" [style.width.px]=\"getColDisplayWidth(col)\" />\n </ng-container>\n </colgroup>\n <tr class=\"hd-table-total\">\n <td *ngIf=\"showSelected\" class=\"hd-table-total-footer-cell hd-table-total-footer-select\"\n [class.hd-table-total-footer-sticky-left]=\"!isTotalFooterFluid\"\n style=\"left: 0;\">&nbsp;</td>\n <td class=\"hd-table-total-footer-cell hd-table-total-footer-line-no\"\n [class.hd-table-total-footer-sticky-left]=\"!isTotalFooterFluid\"\n [style.left]=\"!isTotalFooterFluid ? lineNumberLeft : null\">\u5408\u8BA1</td>\n <ng-container *ngFor=\"let col of tableCols; let colIndex = index; trackBy: trackByCol\">\n <td *ngIf=\"col.isShow\" class=\"hd-table-total-footer-cell\"\n [class.hd-table-total-footer-sticky-left]=\"!isTotalFooterFluid && col.fixed === 'left'\"\n [class.hd-table-total-footer-sticky-right]=\"!isTotalFooterFluid && col.fixed === 'right'\"\n [class.hd-table-total-align-left]=\"getTableTotalCellAlign(col, colIndex) === 'left'\"\n [class.hd-table-total-align-center]=\"getTableTotalCellAlign(col, colIndex) === 'center'\"\n [class.hd-table-total-align-right]=\"getTableTotalCellAlign(col, colIndex) === 'right'\"\n [style.left]=\"!isTotalFooterFluid && col.fixed === 'left' ? (col.fixedWidth || 0) + 'px' : null\"\n [style.right]=\"!isTotalFooterFluid && col.fixed === 'right' ? (col.fixedRightWidth || 0) + 'px' : null\"\n [ngStyle]=\"{'text-align': getTableTotalCellAlign(col, colIndex)}\">\n {{ getTableTotalCellValue(col, colIndex) }}\n </td>\n </ng-container>\n </tr>\n </table>\n </div>\n </ng-template>\n </nz-table>\n</ng-container>\n\n<ng-template #tableCells let-data let-index=\"index\">\n <td nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected && selectType !== 'radio'\" nzShowCheckbox\n [nzChecked]=\"mapOfCheckedId[data[selectField]]\" [nzDisabled]=\"isSelectDisabled(data)\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <td nzWidth=\"40px\" nzLeft=\"0px\" class=\"hd-table-select-radio\" *ngIf=\"showSelected && selectType === 'radio'\">\n <label nz-radio [nzDisabled]=\"isSelectDisabled(data)\" [ngModel]=\"!!mapOfCheckedId[data[selectField]]\"\n (ngModelChange)=\"onRadioSelect($event, data)\"></label>\n </td>\n <td class=\"hd-table-line-no-col\" [nzWidth]=\"lineNumberColWidthPx\" [nzLeft]=\"lineNumberLeft\"\n *ngIf=\"showTableTotal\">{{ getLineNumber(index) }}</td>\n <ng-container *ngFor=\"let col of tableCols; trackBy: trackByCol\">\n <td *ngIf=\"col.isShow\" [style.max-width.px]=\"getColDisplayWidth(col)\" [nzAlign]=\"col.align\"\n [nzLeft]=\"getLeftSticky(col)\"\n [nzRight]=\"getRightSticky(col)\"\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]=\"isDangerBtn(btn, data) ? 'common-danger-btn': ''\"\n (click)=\"triggerEvent(btn.click || null, data)\">{{ getBtnName(btn, data) }}</a>\n </ng-container>\n <ng-template #showConfirmTemplate>\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"isDangerBtn(btn, data) ? 'common-danger-btn': ''\" nz-popconfirm\n [nzPopconfirmTitle]=\"'\u786E\u8BA4\u8981' + getBtnName(btn, data) + '\u5417?'\"\n (nzOnConfirm)=\"triggerEvent(btn.click || null, data)\">{{\n getBtnName(btn, data) }}</a>\n </ng-template>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #notOperateTemplate>\n <ng-container *ngIf=\"hasInlineEdit(col); else displayCellTpl\">\n <div class=\"hd-table-cell-edit\">\n <ng-container [ngSwitch]=\"col.editType\">\n <input *ngSwitchCase=\"'input'\" nz-input class=\"hd-table-cell-edit-control\"\n [placeholder]=\"col.placeholder || ''\"\n [disabled]=\"isEditDisabled(col, data)\"\n [ngModel]=\"data[col.name]\"\n (ngModelChange)=\"onCellChange(col, data, $event)\" />\n <nz-input-number *ngSwitchCase=\"'inputNumber'\" class=\"hd-table-cell-edit-control\"\n [nzPlaceHolder]=\"col.placeholder || ''\"\n [nzDisabled]=\"isEditDisabled(col, data)\"\n [nzMin]=\"getInputNumberProp(col, 'min', 0)\"\n [nzMax]=\"getInputNumberProp(col, 'max', 99999999)\"\n [nzStep]=\"getInputNumberProp(col, 'step', 1)\"\n [nzPrecision]=\"getInputNumberProp(col, 'precision', 4)\"\n [ngModel]=\"data[col.name]\"\n (ngModelChange)=\"onCellChange(col, data, $event)\">\n </nz-input-number>\n <nz-select *ngSwitchCase=\"'select'\" class=\"hd-table-cell-edit-control\"\n [nzPlaceHolder]=\"col.placeholder || '\u8BF7\u9009\u62E9'\"\n [nzDisabled]=\"isEditDisabled(col, data)\"\n [nzAllowClear]=\"col.selectOption && col.selectOption.hdAllowClear !== false\"\n [nzShowSearch]=\"!col.selectOption || col.selectOption.hdShowSearch !== false\"\n [nzServerSearch]=\"!!(col.selectOption && col.selectOption.hdServerSearch)\"\n [ngModel]=\"data[col.name]\"\n (ngModelChange)=\"onSelectChange(col, data, $event)\"\n (nzOpenChange)=\"onSelectOpenChange(col, data, $event)\"\n (nzOnSearch)=\"onSelectSearch(col, data, $event)\">\n <nz-option *ngFor=\"let selectItem of getSelectList(col, data)\"\n [nzValue]=\"selectItem[col.selectOption.value]\"\n [nzLabel]=\"getSelectOptionLabel(col, selectItem)\">\n </nz-option>\n </nz-select>\n <nz-date-picker *ngSwitchCase=\"'date'\" class=\"hd-table-cell-edit-control\"\n [nzPlaceHolder]=\"col.placeholder || '\u8BF7\u9009\u62E9\u65E5\u671F'\"\n [nzDisabled]=\"isEditDisabled(col, data)\"\n [nzDisabledDate]=\"getDisabledDate(col)\"\n [nzShowToday]=\"isDateShowToday(col)\"\n [nzShowTime]=\"isDateShowTime(col)\"\n [nzFormat]=\"getDateFormat(col, false)\"\n [ngModel]=\"data[col.name]\"\n (ngModelChange)=\"onCellChange(col, data, $event)\">\n </nz-date-picker>\n <nz-range-picker *ngSwitchCase=\"'dateRange'\" class=\"hd-table-cell-edit-control\"\n [nzPlaceHolder]=\"getRangePlaceholder(col)\"\n [nzDisabled]=\"isEditDisabled(col, data)\"\n [nzDisabledDate]=\"getDisabledDate(col)\"\n [nzFormat]=\"getDateFormat(col, true)\"\n [ngModel]=\"data[col.name]\"\n (ngModelChange)=\"onCellChange(col, data, $event)\">\n </nz-range-picker>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #displayCellTpl>\n <div [class.hd-table-cell-with-actions]=\"col.btnList && col.btnList.length\">\n <div class=\"hd-table-cell-value\"\n [class.hd-table-cell-value--rowno]=\"hasRowNo(col)\"\n [class.hd-table-cell-value--edit]=\"isEditable(col, data)\">\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\">\n <span *ngIf=\"cell.overflow && !(col.canWarp && showDetail)\" class=\"hd-table-cell-ellipsis\" nz-tooltip\n [nzTooltipTitle]=\"cell.title\">{{ cell.display }}</span>\n <span *ngIf=\"!cell.overflow || (col.canWarp && showDetail)\">{{ cell.display }}</span>\n </ng-container>\n </hd-status>\n </ng-container>\n <ng-template #otherTemplate>\n <ng-container *ngIf=\"col.click && (!col.canClick || col.canClick(data));else noClickTemplate\">\n <ng-container *ngIf=\"(data | hdTableCell:col) as cell\">\n <a *ngIf=\"cell.overflow && !(col.canWarp && showDetail)\" class=\"hd-table-cell-ellipsis\" nz-tooltip\n [nzTooltipTitle]=\"cell.title\"\n [ngStyle]=\"{'color': getLinkCellColor(col, data, cell.isEmpty)}\"\n (click)=\"triggerEvent(col.click || null, data)\">{{ cell.display }}</a>\n <a *ngIf=\"!cell.overflow || (col.canWarp && showDetail)\"\n [ngStyle]=\"{'color': getLinkCellColor(col, data, cell.isEmpty)}\"\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 *ngIf=\"cell.overflow && !(col.canWarp && showDetail)\" class=\"hd-table-cell-ellipsis\" nz-tooltip\n [nzTooltipTitle]=\"cell.title\"\n [ngStyle]=\"{'color': getPlainCellColor(col, data)}\">{{ cell.display }}</span>\n <span *ngIf=\"!cell.overflow || (col.canWarp && showDetail)\"\n [ngStyle]=\"{'color': getPlainCellColor(col, data)}\">{{ cell.display }}</span>\n </ng-container>\n </ng-template>\n </ng-template>\n <span class=\"hd-table-row-no\" *ngIf=\"hasRowNo(col) && getRowNoText(col, data, index)\">\n <i class=\"hd-table-row-no-bar\"></i>{{ getRowNoText(col, data, index) }}\n </span>\n <a *ngIf=\"isEditable(col, data)\" class=\"hd-table-edit-icon\" href=\"javascript:;\" title=\"\u7F16\u8F91\"\n (click)=\"onEditClick($event, col, data)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M8.10797 1.42626C8.44968 1.08456 9.0037 1.08456 9.34541 1.42626L10.9746 3.05542C11.3163 3.39713 11.3163 3.95115 10.9746 4.29286L5.01002 10.2574C4.87077 10.3967 4.68863 10.4849 4.49305 10.5078L2.72936 10.7142C2.18281 10.7782 1.71357 10.3278 1.7551 9.77914L1.89441 7.93871C1.9102 7.73007 2.00024 7.53399 2.14819 7.38604L8.10797 1.42626ZM7.67304 3.51111L8.88972 4.72779L9.94337 3.67414L8.72669 2.45746L7.67304 3.51111ZM8.06477 5.55274L6.84808 4.33606L3.04959 8.13456L2.94515 9.51434L4.25672 9.36079L8.06477 5.55274ZM12.25 12.8333L1.75 12.8333V11.6666L12.25 11.6666V12.8333Z\"\n fill=\"currentColor\" />\n </svg>\n </a>\n </div>\n <div class=\"common-btn-group hd-table-cell-actions\" *ngIf=\"col.btnList && col.btnList.length\">\n <ng-container *ngFor=\"let btn of col.btnList\">\n <ng-container *ngIf=\"!needShowConfirm(btn, data);else cellActionConfirmTpl\">\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"isDangerBtn(btn, data) ? 'common-danger-btn': ''\"\n (click)=\"triggerEvent(btn.click || null, data)\">{{ getBtnName(btn, data) }}</a>\n </ng-container>\n <ng-template #cellActionConfirmTpl>\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"isDangerBtn(btn, data) ? 'common-danger-btn': ''\" nz-popconfirm\n [nzPopconfirmTitle]=\"'\u786E\u8BA4\u8981' + getBtnName(btn, data) + '\u5417?'\"\n (nzOnConfirm)=\"triggerEvent(btn.click || null, data)\">{{\n getBtnName(btn, data) }}</a>\n </ng-template>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n</ng-template>\n",
12009
+ 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 <ng-container *ngIf=\"showColSettings\">\n <span class=\"hd-table-col-settings\" nz-dropdown nzTrigger=\"click\" [nzDropdownMenu]=\"menu\"\n [nzVisible]=\"isDropdownVisible\" (click)=\"confirmDropdown()\" title=\"\u5217\u8BBE\u7F6E\">\n <svg class=\"hd-table-col-settings-icon\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M4.92031 1.80756C5.02551 1.42884 5.37033 1.16675 5.76339 1.16675H8.23667C8.62973 1.16675 8.97455 1.42884 9.07975 1.80756L9.37802 2.88133L10.4571 2.60273C10.8377 2.50448 11.2371 2.67206 11.4336 3.01245L12.6703 5.15438C12.8668 5.49478 12.8122 5.92445 12.5369 6.20491L11.7561 7.00008L12.5369 7.79525C12.8122 8.07572 12.8668 8.50539 12.6703 8.84579L11.4336 10.9877C11.2371 11.3281 10.8377 11.4957 10.4571 11.3974L9.37802 11.1188L9.07975 12.1926C8.97455 12.5713 8.62973 12.8334 8.23667 12.8334H5.76339C5.37033 12.8334 5.02551 12.5713 4.92031 12.1926L4.62206 11.1189L3.54315 11.3974C3.16258 11.4957 2.76318 11.3281 2.56666 10.9877L1.33001 8.84579C1.13349 8.50539 1.18806 8.07572 1.46343 7.79525L2.24419 7.00008L1.46344 6.20491C1.18806 5.92445 1.13349 5.49478 1.33002 5.15438L2.56666 3.01245C2.76319 2.67206 3.16258 2.50448 3.54316 2.60273L4.62206 2.88127L4.92031 1.80756ZM4.54541 10.843L4.54552 10.8433L4.54541 10.843ZM5.98508 2.33341L5.66952 3.46945C5.54185 3.92906 5.06958 4.20173 4.60771 4.08249L3.46618 3.78778L2.45122 5.54572L3.2773 6.38705C3.6115 6.72742 3.6115 7.27275 3.2773 7.61312L2.45122 8.45444L3.46617 10.2124L4.60771 9.91768C5.06958 9.79844 5.54185 10.0711 5.66952 10.5307L5.98508 11.6667H8.01498L8.33056 10.5307C8.45823 10.071 8.9305 9.79838 9.39237 9.91762L10.5341 10.2124L11.5491 8.45444L10.723 7.61312C10.3888 7.27275 10.3888 6.72742 10.723 6.38705L11.5491 5.54572L10.5341 3.78778L9.39237 4.08254C8.9305 4.20178 8.45823 3.92912 8.33056 3.46951L8.01498 2.33341H5.98508ZM7.00003 5.83342C6.3557 5.83342 5.83337 6.35575 5.83337 7.00008C5.83337 7.64441 6.3557 8.16675 7.00003 8.16675C7.64436 8.16675 8.1667 7.64441 8.1667 7.00008C8.1667 6.35575 7.64436 5.83342 7.00003 5.83342ZM4.6667 7.00008C4.6667 5.71142 5.71137 4.66675 7.00003 4.66675C8.2887 4.66675 9.33337 5.71142 9.33337 7.00008C9.33337 8.28875 8.2887 9.33342 7.00003 9.33342C5.71137 9.33342 4.6667 8.28875 4.6667 7.00008Z\"\n fill=\"currentColor\" />\n </svg>\n </span>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <div class=\"hd-table-col-settings-dropdown\">\n <div class=\"hd-table-col-settings-list\">\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 class=\"hd-table-col-settings-footer\">\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 </div>\n </nz-dropdown-menu>\n </ng-container>\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\"\n [class.hd-table--scroll-y]=\"!!(scroll && scroll.y)\" [class.hd-table--scroll-x]=\"!!(scroll && scroll.x)\"\n [class.hd-table--fluid-x]=\"fluidHorizontal\" [class.hd-table--has-select]=\"showSelected\"\n [class.hd-table--has-total]=\"showTableTotal\" [nzScroll]=\"scroll\" [nzShowPagination]=\"pagination\"\n [nzShowSizeChanger]=\"pagination\" [nzShowQuickJumper]=\"pagination\" [nzFrontPagination]=\"useFrontPagination\"\n nzSize=\"middle\" [nzData]=\"tableData.content\" [nzTotal]=\"getTableTotalCount()\" [(nzPageIndex)]=\"tablePageIndex\"\n [nzLoading]=\"tableLoading\" [nzPageSizeOptions]=\"[ 10, 50, 100, 200, 500, 1000 ]\" [(nzPageSize)]=\"tablePageSize\"\n (nzPageSizeChange)=\"pagination ? search(true) : null\" (nzPageIndexChange)=\"pagination ? search(false) : null\"\n (nzCurrentPageDataChange)=\"showSelected ? currentPageDataChange($event) : null\" [nzShowTotal]=\"tableTotalTemplate\"\n [nzFooter]=\"showTableTotal ? tableTotalFooter : null\" [nzVirtualScroll]=\"useVirtualScroll\"\n [nzVirtualItemSize]=\"useVirtualScroll ? effectiveVirtualItemSize : 0\" [nzVirtualForTrackBy]=\"virtualTrackByRow\">\n <thead (nzSortChange)=\"sort($event)\" nzSingleSort>\n <tr>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected && selectType !== 'radio'\" nzShowCheckbox\n [(nzChecked)]=\"isAllDisplayDataChecked\" [nzIndeterminate]=\"isIndeterminate\"\n (nzCheckedChange)=\"checkAll($event)\"></th>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected && selectType === 'radio'\"></th>\n <th class=\"hd-table-line-no-col\" [nzWidth]=\"lineNumberColWidthPx\" [nzLeft]=\"lineNumberLeft\"\n *ngIf=\"showTableTotal\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let col of tableCols\">\n <th *ngIf=\"col.isShow\" [nzWidth]=\"getColDisplayWidth(col) + 'px'\" [nzAlign]=\"col.align\"\n [nzLeft]=\"getLeftSticky(col)\" [nzRight]=\"getRightSticky(col)\" nz-resizable nzBounds=\"window\" nzPreview\n (nzResizeEnd)=\"onResize($event, col)\" [nzShowSort]=\"col.canSort\" [nzSortKey]=\"col.name\"\n [nzSort]=\"getColSort(col)\">\n <span class=\"hd-table-col-title\">\n <span class=\"hd-table-col-require\" *ngIf=\"col.require && col.editType\">*</span>\n <ng-container *ngIf=\"getTitleParts(col) as titleParts; else plainTitle\">\n <span class=\"hd-table-title-with-bar\">{{ titleParts[0] }}<i class=\"hd-table-row-no-bar\"></i>{{\n titleParts[1] }}</span>\n </ng-container>\n <ng-template #plainTitle>{{ col.title }}</ng-template>\n </span>\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\" [class.hd-table-row-invalid]=\"isInvalidRow(data)\">\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 [class.hd-table-row-invalid]=\"isInvalidRow(data)\">\n <ng-container *ngTemplateOutlet=\"tableCells; context: { $implicit: data, index: i }\"></ng-container>\n </tr>\n </ng-container>\n </tbody>\n <ng-template #tableTotalTemplate>\n \u5171 {{ getTableTotalCount() }} \u6761\u6570\u636E\n </ng-template>\n <ng-template #tableTotalFooter>\n <!--\n \u5217\u603B\u5BBD < \u5BB9\u5668\uFF1Ascroll.x=\u5BB9\u5668\u5BBD\uFF0C\u5DEE\u989D\u8865\u5230\u6700\u540E\u4E1A\u52A1\u5217\uFF08\u52FE\u9009\u4FDD\u6301 40\uFF09\uFF1B\u53EF\u62D6\u62FD\u3002\n \u5217\u603B\u5BBD > \u5BB9\u5668\uFF1Ascroll.x=\u58F0\u660E\u603B\u5BBD\uFF0C\u6A2A\u6EDA\u540C\u6B65\u3002\n -->\n <div class=\"hd-table-total-footer\" [class.hd-table-total-footer--fluid]=\"isTotalFooterFluid\"\n [class.hd-table-total-footer--y-gutter]=\"totalFooterNeedYGutter\">\n <table class=\"hd-table-total-footer-table\" [style.width]=\"totalFooterTableWidth\">\n <colgroup>\n <!-- \u52FE\u9009/\u5E8F\u53F7\u9501\u5BBD\uFF0C\u4E0D\u53C2\u4E0E\u5747\u644A -->\n <col *ngIf=\"showSelected\" style=\"width: 40px; min-width: 40px; max-width: 40px;\" />\n <col *ngIf=\"showTableTotal\" [style.width.px]=\"lineNumberColWidth\" [style.min-width.px]=\"lineNumberColWidth\"\n [style.max-width.px]=\"lineNumberColWidth\" />\n <ng-container *ngFor=\"let col of tableCols; trackBy: trackByCol\">\n <col *ngIf=\"col.isShow\" [style.width.px]=\"getColDisplayWidth(col)\" />\n </ng-container>\n </colgroup>\n <tr class=\"hd-table-total\">\n <td *ngIf=\"showSelected\" class=\"hd-table-total-footer-cell hd-table-total-footer-select\"\n [class.hd-table-total-footer-sticky-left]=\"!isTotalFooterFluid\" style=\"left: 0;\">&nbsp;</td>\n <td class=\"hd-table-total-footer-cell hd-table-total-footer-line-no\"\n [class.hd-table-total-footer-sticky-left]=\"!isTotalFooterFluid\"\n [style.left]=\"!isTotalFooterFluid ? lineNumberLeft : null\">\u5408\u8BA1</td>\n <ng-container *ngFor=\"let col of tableCols; let colIndex = index; trackBy: trackByCol\">\n <td *ngIf=\"col.isShow\" class=\"hd-table-total-footer-cell\"\n [class.hd-table-total-footer-sticky-left]=\"!isTotalFooterFluid && col.fixed === 'left'\"\n [class.hd-table-total-footer-sticky-right]=\"!isTotalFooterFluid && col.fixed === 'right'\"\n [class.hd-table-total-align-left]=\"getTableTotalCellAlign(col, colIndex) === 'left'\"\n [class.hd-table-total-align-center]=\"getTableTotalCellAlign(col, colIndex) === 'center'\"\n [class.hd-table-total-align-right]=\"getTableTotalCellAlign(col, colIndex) === 'right'\"\n [style.left]=\"!isTotalFooterFluid && col.fixed === 'left' ? (col.fixedWidth || 0) + 'px' : null\"\n [style.right]=\"!isTotalFooterFluid && col.fixed === 'right' ? (col.fixedRightWidth || 0) + 'px' : null\"\n [ngStyle]=\"{'text-align': getTableTotalCellAlign(col, colIndex)}\">\n {{ getTableTotalCellValue(col, colIndex) }}\n </td>\n </ng-container>\n </tr>\n </table>\n </div>\n </ng-template>\n </nz-table>\n</ng-container>\n\n<ng-template #tableCells let-data let-index=\"index\">\n <td nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected && selectType !== 'radio'\" nzShowCheckbox\n [nzChecked]=\"mapOfCheckedId[data[selectField]]\" [nzDisabled]=\"isSelectDisabled(data)\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <td nzWidth=\"40px\" nzLeft=\"0px\" class=\"hd-table-select-radio\" *ngIf=\"showSelected && selectType === 'radio'\">\n <label nz-radio [nzDisabled]=\"isSelectDisabled(data)\" [ngModel]=\"!!mapOfCheckedId[data[selectField]]\"\n (ngModelChange)=\"onRadioSelect($event, data)\"></label>\n </td>\n <td class=\"hd-table-line-no-col\" [nzWidth]=\"lineNumberColWidthPx\" [nzLeft]=\"lineNumberLeft\" *ngIf=\"showTableTotal\">{{\n getLineNumber(index) }}</td>\n <ng-container *ngFor=\"let col of tableCols; trackBy: trackByCol\">\n <td *ngIf=\"col.isShow\" [style.max-width.px]=\"getColDisplayWidth(col)\" [nzAlign]=\"col.align\"\n [nzLeft]=\"getLeftSticky(col)\" [nzRight]=\"getRightSticky(col)\"\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]=\"isDangerBtn(btn, data) ? 'common-danger-btn': ''\"\n (click)=\"triggerEvent(btn.click || null, data)\">{{ getBtnName(btn, data) }}</a>\n </ng-container>\n <ng-template #showConfirmTemplate>\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"isDangerBtn(btn, data) ? 'common-danger-btn': ''\" nz-popconfirm\n [nzPopconfirmTitle]=\"'\u786E\u8BA4\u8981' + getBtnName(btn, data) + '\u5417?'\"\n (nzOnConfirm)=\"triggerEvent(btn.click || null, data)\">{{\n getBtnName(btn, data) }}</a>\n </ng-template>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #notOperateTemplate>\n <ng-container *ngIf=\"hasInlineEdit(col); else displayCellTpl\">\n <div class=\"hd-table-cell-edit\">\n <ng-container [ngSwitch]=\"col.editType\">\n <input *ngSwitchCase=\"'input'\" nz-input class=\"hd-table-cell-edit-control\"\n [placeholder]=\"col.placeholder || ''\" [disabled]=\"isEditDisabled(col, data)\" [ngModel]=\"data[col.name]\"\n (ngModelChange)=\"onCellChange(col, data, $event)\" />\n <nz-input-number *ngSwitchCase=\"'inputNumber'\" class=\"hd-table-cell-edit-control\"\n [nzPlaceHolder]=\"col.placeholder || ''\" [nzDisabled]=\"isEditDisabled(col, data)\"\n [nzMin]=\"getInputNumberProp(col, 'min', 0)\" [nzMax]=\"getInputNumberProp(col, 'max', 99999999)\"\n [nzStep]=\"getInputNumberProp(col, 'step', 1)\" [nzPrecision]=\"getInputNumberProp(col, 'precision', 4)\"\n [ngModel]=\"data[col.name]\" (ngModelChange)=\"onCellChange(col, data, $event)\">\n </nz-input-number>\n <nz-select *ngSwitchCase=\"'select'\" class=\"hd-table-cell-edit-control\"\n [nzPlaceHolder]=\"col.placeholder || '\u8BF7\u9009\u62E9'\" [nzDisabled]=\"isEditDisabled(col, data)\"\n [nzAllowClear]=\"col.selectOption && col.selectOption.hdAllowClear !== false\"\n [nzShowSearch]=\"!col.selectOption || col.selectOption.hdShowSearch !== false\"\n [nzServerSearch]=\"!!(col.selectOption && col.selectOption.hdServerSearch)\" [ngModel]=\"data[col.name]\"\n (ngModelChange)=\"onSelectChange(col, data, $event)\"\n (nzOpenChange)=\"onSelectOpenChange(col, data, $event)\" (nzOnSearch)=\"onSelectSearch(col, data, $event)\">\n <nz-option *ngFor=\"let selectItem of getSelectList(col, data)\"\n [nzValue]=\"selectItem[col.selectOption.value]\" [nzLabel]=\"getSelectOptionLabel(col, selectItem)\">\n </nz-option>\n </nz-select>\n <nz-date-picker *ngSwitchCase=\"'date'\" class=\"hd-table-cell-edit-control\"\n [nzPlaceHolder]=\"col.placeholder || '\u8BF7\u9009\u62E9\u65E5\u671F'\" [nzDisabled]=\"isEditDisabled(col, data)\"\n [nzDisabledDate]=\"getDisabledDate(col)\" [nzShowToday]=\"isDateShowToday(col)\"\n [nzShowTime]=\"isDateShowTime(col)\" [nzFormat]=\"getDateFormat(col, false)\" [ngModel]=\"data[col.name]\"\n (ngModelChange)=\"onCellChange(col, data, $event)\">\n </nz-date-picker>\n <nz-range-picker *ngSwitchCase=\"'dateRange'\" class=\"hd-table-cell-edit-control\"\n [nzPlaceHolder]=\"getRangePlaceholder(col)\" [nzDisabled]=\"isEditDisabled(col, data)\"\n [nzDisabledDate]=\"getDisabledDate(col)\" [nzFormat]=\"getDateFormat(col, true)\" [ngModel]=\"data[col.name]\"\n (ngModelChange)=\"onCellChange(col, data, $event)\">\n </nz-range-picker>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #displayCellTpl>\n <div [class.hd-table-cell-with-actions]=\"col.btnList && col.btnList.length\">\n <div class=\"hd-table-cell-value\" [class.hd-table-cell-value--rowno]=\"hasRowNo(col)\"\n [class.hd-table-cell-value--edit]=\"isEditable(col, data)\">\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\">\n <span *ngIf=\"cell.overflow && !(col.canWarp && showDetail)\" class=\"hd-table-cell-ellipsis\"\n nz-tooltip [nzTooltipTitle]=\"cell.title\">{{ cell.display }}</span>\n <span *ngIf=\"!cell.overflow || (col.canWarp && showDetail)\">{{ cell.display }}</span>\n </ng-container>\n </hd-status>\n </ng-container>\n <ng-template #otherTemplate>\n <ng-container *ngIf=\"col.click && (!col.canClick || col.canClick(data));else noClickTemplate\">\n <ng-container *ngIf=\"(data | hdTableCell:col) as cell\">\n <a *ngIf=\"cell.overflow && !(col.canWarp && showDetail)\" class=\"hd-table-cell-ellipsis\" nz-tooltip\n [nzTooltipTitle]=\"cell.title\" [ngStyle]=\"{'color': getLinkCellColor(col, data, cell.isEmpty)}\"\n (click)=\"triggerEvent(col.click || null, data)\">{{ cell.display }}</a>\n <a *ngIf=\"!cell.overflow || (col.canWarp && showDetail)\"\n [ngStyle]=\"{'color': getLinkCellColor(col, data, cell.isEmpty)}\"\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 *ngIf=\"cell.overflow && !(col.canWarp && showDetail)\" class=\"hd-table-cell-ellipsis\"\n nz-tooltip [nzTooltipTitle]=\"cell.title\" [ngStyle]=\"{'color': getPlainCellColor(col, data)}\">{{\n cell.display }}</span>\n <span *ngIf=\"!cell.overflow || (col.canWarp && showDetail)\"\n [ngStyle]=\"{'color': getPlainCellColor(col, data)}\">{{ cell.display }}</span>\n </ng-container>\n </ng-template>\n </ng-template>\n <span class=\"hd-table-row-no\" *ngIf=\"hasRowNo(col) && getRowNoText(col, data, index)\">\n <i class=\"hd-table-row-no-bar\"></i>{{ getRowNoText(col, data, index) }}\n </span>\n <a *ngIf=\"isEditable(col, data)\" class=\"hd-table-edit-icon\" href=\"javascript:;\" title=\"\u7F16\u8F91\"\n (click)=\"onEditClick($event, col, data)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M8.10797 1.42626C8.44968 1.08456 9.0037 1.08456 9.34541 1.42626L10.9746 3.05542C11.3163 3.39713 11.3163 3.95115 10.9746 4.29286L5.01002 10.2574C4.87077 10.3967 4.68863 10.4849 4.49305 10.5078L2.72936 10.7142C2.18281 10.7782 1.71357 10.3278 1.7551 9.77914L1.89441 7.93871C1.9102 7.73007 2.00024 7.53399 2.14819 7.38604L8.10797 1.42626ZM7.67304 3.51111L8.88972 4.72779L9.94337 3.67414L8.72669 2.45746L7.67304 3.51111ZM8.06477 5.55274L6.84808 4.33606L3.04959 8.13456L2.94515 9.51434L4.25672 9.36079L8.06477 5.55274ZM12.25 12.8333L1.75 12.8333V11.6666L12.25 11.6666V12.8333Z\"\n fill=\"currentColor\" />\n </svg>\n </a>\n </div>\n <div class=\"common-btn-group hd-table-cell-actions\" *ngIf=\"col.btnList && col.btnList.length\">\n <ng-container *ngFor=\"let btn of col.btnList\">\n <ng-container *ngIf=\"!needShowConfirm(btn, data);else cellActionConfirmTpl\">\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"isDangerBtn(btn, data) ? 'common-danger-btn': ''\"\n (click)=\"triggerEvent(btn.click || null, data)\">{{ getBtnName(btn, data) }}</a>\n </ng-container>\n <ng-template #cellActionConfirmTpl>\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"isDangerBtn(btn, data) ? 'common-danger-btn': ''\" nz-popconfirm\n [nzPopconfirmTitle]=\"'\u786E\u8BA4\u8981' + getBtnName(btn, data) + '\u5417?'\"\n (nzOnConfirm)=\"triggerEvent(btn.click || null, data)\">{{\n getBtnName(btn, data) }}</a>\n </ng-template>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n</ng-template>",
11950
12010
  changeDetection: ChangeDetectionStrategy.OnPush,
11951
12011
  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--multiple .ant-select-selection__rendered>ul>li.ant-select-search--inline:only-child{margin-left:4px}::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}::ng-deep .hd-table-container .ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-th-right-sticky{z-index:2;transform:translateZ(0)}::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-left-sticky,::ng-deep .hd-table-container .ant-table-thead>tr>th.ant-table-th-right-sticky{background:#f5f8f6!important}::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr>td.ant-table-td-right-sticky{background:#fff}::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr.ant-table-row-hover>td.ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-left-sticky,::ng-deep .hd-table-container .ant-table-tbody>tr:hover>td.ant-table-td-right-sticky{background:#ecf8f1!important}::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-left .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-middle .ant-table-th-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-td-right-sticky,::ng-deep .hd-table-container .ant-table-scroll-position-right .ant-table-th-right-sticky{box-shadow:none!important}::ng-deep .hd-table-container .ant-table-fixed-right{right:0!important}: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-pagination-options .ant-select,::ng-deep .ant-pagination-options .ant-select-selection--single{min-width:100px}::ng-deep .ant-pagination-options-size-changer.ant-select{min-width:100px}::ng-deep .ant-time-picker{width:100%}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child{width:-webkit-max-content!important;width:-moz-max-content!important;width:max-content!important;min-width:var(--hd-cascader-menu-min-width,auto);max-width:560px}::ng-deep .cdk-overlay-pane .hd-cascader-menus.ant-cascader-menus>.ant-cascader-menu:only-child .ant-cascader-menu-item{white-space:nowrap}.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-col-settings{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:32px;height:32px;padding:0;margin-left:12px;cursor:pointer;color:#2a3634;background:0 0;border:1px solid #e5e6eb;border-radius:4px;vertical-align:middle;flex-shrink:0}.hd-table-col-settings:hover{color:#20b95d;background:#f5f8f6;border-color:#20b95d}.hd-table-col-settings .hd-table-col-settings-icon{display:block;width:14px;height:14px;flex-shrink:0}.hd-table-cell-with-actions{display:inline-flex;flex-wrap:wrap;align-items:center;-moz-column-gap:12px;column-gap:12px;row-gap:6px;max-width:100%}.hd-table-cell-with-actions .hd-table-cell-value{min-width:0}.hd-table-cell-with-actions .hd-table-cell-actions{flex-shrink:0}.hd-table-col-settings-dropdown{background:#fff;border:1px solid #e5e6eb;border-radius:4px;box-shadow:0 6px 16px rgba(0,0,0,.08),0 3px 6px rgba(0,0,0,.06);overflow:hidden}.hd-table-col-settings-list{max-height:400px;overflow-y:auto}.hd-table-col-settings-footer{text-align:right;background:#fff;padding:4px;border-top:1px solid #f0f0f0}.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 .ant-table-tbody>tr>td.hd-table-line-no-col,.hd-table-container ::ng-deep .ant-table-thead>tr>th.hd-table-line-no-col{width:72px!important;min-width:72px!important;max-width:72px!important;box-sizing:border-box}.hd-table-container ::ng-deep .ant-table-tbody>tr>td.ant-table-selection-column,.hd-table-container ::ng-deep .ant-table-thead>tr>th.ant-table-selection-column{width:40px!important;min-width:40px!important;max-width:40px!important;box-sizing:border-box;padding-left:8px!important;padding-right:8px!important}.hd-table-container .hd-table-cell-value--edit,.hd-table-container .hd-table-cell-value--rowno{display:inline-flex;align-items:center;min-width:0}.hd-table-container .hd-table-cell-value--edit>a:not(.hd-table-edit-icon),.hd-table-container .hd-table-cell-value--edit>hd-status,.hd-table-container .hd-table-cell-value--edit>span:not(.hd-table-row-no),.hd-table-container .hd-table-cell-value--rowno>a:not(.hd-table-edit-icon),.hd-table-container .hd-table-cell-value--rowno>hd-status,.hd-table-container .hd-table-cell-value--rowno>span:not(.hd-table-row-no){min-width:0}.hd-table-container .hd-table-row-no{display:inline-flex;flex-shrink:0;align-items:center;margin-left:4px;color:#1d1f29;font-size:14px;line-height:22px}.hd-table-container .hd-table-row-no-bar{display:inline-block;flex:0 0 auto;align-self:center;width:1px;height:14px;margin-right:4px;background:#1d1f29;vertical-align:middle}.hd-table-container .hd-table-edit-icon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;margin-left:2px;width:14px;height:14px;color:#20b95d;line-height:1;cursor:pointer}.hd-table-container .hd-table-edit-icon:hover{color:#20bd62}.hd-table-container .hd-table-edit-icon svg{display:block;width:14px;height:14px}.hd-table-container .hd-table-col-title{display:inline-flex;align-items:center}.hd-table-container .hd-table-col-require{margin-right:4px;color:#f5222d;font-family:SimSun,sans-serif}.hd-table-container .hd-table-title-with-bar{display:inline-flex;align-items:center}.hd-table-container .hd-table-title-with-bar .hd-table-row-no-bar{width:1px;height:14px;margin:0 4px;align-self:center}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid.ant-table-row-hover>td.ant-table-td-right-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid:hover>td.ant-table-td-right-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td.ant-table-td-left-sticky,.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid>td.ant-table-td-right-sticky{background:#f7f8fa!important;color:#868a9c!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group>a{color:#20b95d!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group>a:hover{color:#20bd62!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-btn-group .common-danger-btn:hover{color:#f05b24!important}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .hd-table-cell-value>a{color:#20b95d}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .common-billNumber>a{color:#3b77e3}.hd-table-container ::ng-deep .ant-table-tbody>tr.hd-table-row-invalid .hd-status-text{color:#868a9c!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.hd-table--scroll-x ::ng-deep .ant-table-body>table,.hd-table-container.hd-table--scroll-x ::ng-deep .ant-table-header>table,.hd-table-container.hd-table--scroll-x ::ng-deep .cdk-virtual-scroll-content-wrapper>table{table-layout:fixed}.hd-table-container:not(.hd-table--scroll-y):not(.hd-table--scroll-x) ::ng-deep .ant-table-body{max-height:none!important;overflow-y:visible!important}.hd-table-container.hd-table--scroll-x:not(.hd-table--scroll-y) ::ng-deep .ant-table-body{overflow-y:hidden!important}.hd-table-container.hd-table--fluid-x ::ng-deep .ant-table-body{overflow-x:hidden!important}.hd-table-container.hd-table--fluid-x.hd-table--scroll-y ::ng-deep .ant-table-header{margin-bottom:0!important;padding-bottom:0!important;overflow-x:hidden!important}.hd-table-container.hd-table--has-total ::ng-deep .ant-table-footer{padding:0;overflow:hidden;background:#fafafa;border-top:1px solid #e8e8e8}.hd-table-total-footer{width:100%;box-sizing:border-box;overflow-x:auto;overflow-y:hidden;background:#fafafa;scrollbar-width:thin;scrollbar-color:transparent transparent}.hd-table-total-footer::-webkit-scrollbar{width:12px;height:0}.hd-table-total-footer::-webkit-scrollbar-track{background:0 0}.hd-table-total-footer::-webkit-scrollbar-thumb{background:padding-box;border:4px solid transparent}.hd-table-total-footer::-webkit-scrollbar-corner{background:0 0}.hd-table-total-footer.hd-table-total-footer--y-gutter{overflow-y:scroll}.hd-table-total-footer.hd-table-total-footer--fluid{overflow-x:hidden}.hd-table-total-footer-table{table-layout:fixed;border-collapse:separate;border-spacing:0}.hd-table-total-footer-cell{padding:12px 8px;font-weight:500;background:#fafafa;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-bottom:0}.hd-table-total-footer-cell.hd-table-total-align-left{text-align:left!important}.hd-table-total-footer-cell.hd-table-total-align-center{text-align:center!important}.hd-table-total-footer-cell.hd-table-total-align-right{text-align:right!important}.hd-table-select-radio{text-align:center}.hd-table-select-radio ::ng-deep .ant-radio-wrapper{margin-right:0}.hd-table-total-footer-select{width:40px;min-width:40px;max-width:40px;padding-left:8px;padding-right:8px;text-align:center}.hd-table-total-footer-line-no{width:72px;min-width:72px;max-width:72px}.hd-table-total-footer-sticky-left,.hd-table-total-footer-sticky-right{position:-webkit-sticky;position:sticky;z-index:2;background:#fafafa}::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}.hd-table-cell-ellipsis{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.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}::ng-deep .ant-table-th-right-sticky .nz-resizable-handle-right{right:0}.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}.hd-table-cell-edit{width:100%;min-width:0}.hd-table-cell-edit-control{width:100%!important}::ng-deep .hd-table-cell-edit .ant-calendar-picker,::ng-deep .hd-table-cell-edit .ant-input,::ng-deep .hd-table-cell-edit .ant-input-number,::ng-deep .hd-table-cell-edit .ant-select{width:100%}::ng-deep .hd-table-cell-edit .ant-input,::ng-deep .hd-table-cell-edit .ant-input-number,::ng-deep .hd-table-cell-edit .ant-select-selection{height:32px}::ng-deep .hd-table-cell-edit .ant-input-number-input{height:30px}::ng-deep .hd-table-cell-edit .ant-select-selection__rendered{line-height:30px}"]
11952
12012
  }] }
@@ -12182,24 +12242,22 @@ if (false) {
12182
12242
  */
12183
12243
  HdTableComponent.prototype.virtualScrollActive;
12184
12244
  /**
12185
- * 列宽合计(含勾选/序号 + fluid 补宽),footer 表宽与横向 scroll 共用
12245
+ * 实际渲染列宽合计(含勾选/序号 + 补宽),合计 footer 表宽用
12186
12246
  * @type {?}
12187
12247
  */
12188
12248
  HdTableComponent.prototype.tableColWidthTotal;
12189
12249
  /**
12190
- * fluid:声明列总宽 < 容器时,把差额补到最后一列业务列(不改缓存宽),
12191
- * 并设 scroll.x = 容器宽,避免表宽 100% 均摊撑开勾选列;拖拽改宽仍写 col.width。
12250
+ * 补到 fluidExtraTargetCol 上的宽度;只影响展示,不写回 col.width(列宽缓存、拖拽仍用声明宽)
12192
12251
  * @type {?}
12193
12252
  */
12194
12253
  HdTableComponent.prototype.fluidExtraWidth;
12195
12254
  /**
12196
- * 列总宽未超出容器(fluid 补宽吃满):不需要真正横滚,
12197
- * 用于关掉 ng-zorro fixed-header 带来的常驻 X 轴滚动条。
12255
+ * 列少、靠补宽吃满容器:模板据此加 hd-table--fluid-x,隐藏 fixed-header 常驻的横滚槽
12198
12256
  * @type {?}
12199
12257
  */
12200
12258
  HdTableComponent.prototype.fluidHorizontal;
12201
12259
  /**
12202
- * fluid 补宽目标列缓存,避免模板每格 CD 时反复扫 tableCols
12260
+ * 接收补宽的列,缓存起来避免模板每个单元格都扫一遍 tableCols
12203
12261
  * @type {?}
12204
12262
  * @private
12205
12263
  */