fantasy-ngzorro 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -35,6 +35,7 @@
35
35
  | MC | 2023-2-13 | 表单、明细表单、间隔、小标题文档;组件字段增加必填说明 |
36
36
  | — | 2026-5-20 | 补充 hd-table、hd-detail-lines-page 等组件;完善公共子类型(SelectOption、FormItem 等)文档 |
37
37
  | — | 2026-6-23 | hd-table 状态列支持 `stateField` 自定义取值字段、`isState` 按列名取值;hd-form Input 支持 `prefix` / `prefixIcon`;hd-detail-lines-page 支持 `isCrossPageSelect` 跨页勾选开关 |
38
+ | — | 2026-7-6 | hd-form 支持 `FormListType.Checkbox`(单个复选框 / 复选框组)及 `CheckboxOption` 配置 |
38
39
 
39
40
  ## 前言
40
41
 
@@ -297,6 +298,8 @@ tableCols: HdTableColumn[] = [{
297
298
  name: 'operate',
298
299
  width: ColWidth.operateColWidth,
299
300
  btnList: [{ name: '删除', showConfirm: true, click: (line) => this.remove(line) }]
301
+ // showConfirm 也可传函数,按行属性决定是否二次确认
302
+ // btnList: [{ name: '删除', showConfirm: (line) => line.state !== 'draft', click: (line) => this.remove(line) }]
300
303
  }];
301
304
  ```
302
305
 
@@ -363,6 +366,24 @@ formInput: FormItem[] = [{
363
366
  label: '数量',
364
367
  name: 'qty',
365
368
  inputNumber: { min: 0, max: 9999, step: 1, precision: 2 }
369
+ }, {
370
+ type: FormListType.Checkbox,
371
+ label: '是否启用',
372
+ name: 'enabled',
373
+ value: false // 单个复选框,值为 boolean
374
+ }, {
375
+ type: FormListType.Checkbox,
376
+ label: '权限',
377
+ name: 'permissions',
378
+ value: ['read'],
379
+ checkboxOption: {
380
+ label: 'name',
381
+ value: 'code',
382
+ optionList: [
383
+ { code: 'read', name: '查看' },
384
+ { code: 'edit', name: '编辑' }
385
+ ]
386
+ }
366
387
  }];
367
388
 
368
389
  formChangeEvent(validateForm: FormGroup) {
@@ -377,7 +398,7 @@ formChangeEvent(validateForm: FormGroup) {
377
398
 
378
399
  #### FormItem 配置
379
400
 
380
- 表单项使用 [FormItem](#formitem表单项) 类型,下拉/数字等子配置见 [SelectOption](#selectoption下拉选项配置)、[InputNumber](#inputnumber数字输入配置)。
401
+ 表单项使用 [FormItem](#formitem表单项) 类型,下拉/数字等子配置见 [SelectOption](#selectoption下拉选项配置)、[InputNumber](#inputnumber数字输入配置)、[RadioOption](#radiooption单选配置)、[CheckboxOption](#checkboxoption复选框配置)
381
402
 
382
403
  ---
383
404
 
@@ -450,6 +471,7 @@ this.hdFormLines.getValid(); // 获取整表校验状态
450
471
 
451
472
  ```html
452
473
  <hd-detail-form [formCols]="formCols"></hd-detail-form>
474
+ <!-- 固定两列:<hd-detail-form [formCols]="formCols" [nzColumn]="2"></hd-detail-form> -->
453
475
  ```
454
476
 
455
477
  ```typescript
@@ -459,9 +481,10 @@ formCols: HdOption[] = [
459
481
  ];
460
482
  ```
461
483
 
462
- | 参数 | 类型 | 说明 |
463
- | ---- | ---- | ---- |
464
- | formCols | HdOption[] | 展示字段,见 [HdOption](#hdoption键值展示项) |
484
+ | 参数 | 类型 | 默认值 | 说明 |
485
+ | ---- | ---- | ------ | ---- |
486
+ | formCols | HdOption[] | — | 展示字段,见 [HdOption](#hdoption键值展示项) |
487
+ | nzColumn | number \| object | `{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }` | 列数;传数字为固定列数,传对象为响应式列数 |
465
488
 
466
489
  ---
467
490
 
@@ -676,6 +699,28 @@ selectOption: {
676
699
  | ---- | ---- | ---- |
677
700
  | options | any[] | 级联数据源(ng-zorro cascader 格式) |
678
701
 
702
+ ### RadioOption(单选配置)
703
+
704
+ 用于 `FormItem.radioOption`(`FormListType.Radio`)。
705
+
706
+ | 参数 | 类型 | 默认值 | 说明 |
707
+ | ---- | ---- | ------ | ---- |
708
+ | label | string | — | optionList 中作为显示文案的字段名 |
709
+ | value | string | — | optionList 中作为绑定值的字段名 |
710
+ | optionList | any[] | — | 选项列表 |
711
+ | showLabelAndValue | boolean | false | 选项展示为 `[value]label` |
712
+
713
+ ### CheckboxOption(复选框配置)
714
+
715
+ 用于 `FormItem.checkboxOption`(`FormListType.Checkbox` 多选组)。未配置 `checkboxOption` 时渲染单个复选框,值为 `boolean`,默认 `false`;配置后为复选框组,值为选中项 `value` 组成的数组,默认 `[]`。
716
+
717
+ | 参数 | 类型 | 默认值 | 说明 |
718
+ | ---- | ---- | ------ | ---- |
719
+ | label | string | — | optionList 中作为显示文案的字段名 |
720
+ | value | string | — | optionList 中作为绑定值的字段名 |
721
+ | optionList | any[] | — | 选项列表 |
722
+ | showLabelAndValue | boolean | false | 选项展示为 `[value]label` |
723
+
679
724
  ### HdOption(键值展示项)
680
725
 
681
726
  用于 `hd-detail-form` 的 `formCols`。
@@ -736,6 +781,8 @@ selectOption: {
736
781
  | showTime | boolean | false | Date 含时间 |
737
782
  | format | string | — | 时间格式化 |
738
783
  | selectOption | SelectOption | — | 下拉配置 |
784
+ | radioOption | RadioOption | — | 单选配置 |
785
+ | checkboxOption | CheckboxOption | — | 复选框组配置;不传则为单个复选框 |
739
786
  | inputNumber | InputNumber | — | 数字框配置 |
740
787
  | cascaderOption | CascaderOption | — | 级联配置 |
741
788
  | defaultLabel | string \| string[] | — | Select 默认展示文案 |
@@ -748,7 +795,7 @@ selectOption: {
748
795
 
749
796
  #### FormListType 枚举
750
797
 
751
- `Input` \| `Select` \| `MultipleSelect` \| `Date` \| `DateRange` \| `TextArea` \| `InputNumber` \| `ViewDom` \| `Switch` \| `Time` \| `Cascader`
798
+ `Input` \| `Select` \| `MultipleSelect` \| `Date` \| `DateRange` \| `TextArea` \| `InputNumber` \| `ViewDom` \| `Switch` \| `Time` \| `Cascader` \| `Radio` \| `Checkbox`
752
799
 
753
800
  #### ValidatorKey
754
801
 
@@ -816,7 +863,7 @@ onSearchEvent: (keyword, line?: FormGroup) => void
816
863
  | 参数 | 类型 | 默认值 | 说明 |
817
864
  | ---- | ---- | ------ | ---- |
818
865
  | name | string | — | 按钮文案 |
819
- | showConfirm | boolean | false | popconfirm 确认 |
866
+ | showConfirm | boolean \| (line) => boolean | false | 是否 popconfirm 确认;传函数时按行数据判断 |
820
867
  | isRepeat | boolean | false | 与其他按钮互斥显示 |
821
868
  | click | (line) => void | — | 点击回调 |
822
869
  | permission | (line) => boolean | — | 是否显示 |
@@ -440,6 +440,10 @@
440
440
  var HdDetailFormComponent = /** @class */ (function () {
441
441
  function HdDetailFormComponent() {
442
442
  this.formCols = new Array();
443
+ /**
444
+ * 列数,支持数字或响应式配置,默认按屏幕宽度自适应
445
+ */
446
+ this.nzColumn = { xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 };
443
447
  }
444
448
  /**
445
449
  * @return {?}
@@ -493,20 +497,26 @@
493
497
  HdDetailFormComponent.decorators = [
494
498
  { type: core.Component, args: [{
495
499
  selector: 'hd-detail-form',
496
- template: "<nz-content class=\"hd-detail-form-container\">\n <nz-descriptions [nzColumn]=\"2\">\n <ng-container *ngFor=\"let col of formCols\">\n <nz-descriptions-item *ngIf=\"!col.click\" [nzTitle]=\"col.label\">\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\">{{(col.value === '0' || col.value === 0 || col.value\n )? col.value : '&lt;\u7A7A&gt;'}}</span>\n </nz-descriptions-item>\n <nz-descriptions-item *ngIf=\"col.click\" [nzTitle]=\"col.label\">\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\" *ngIf=\"col.clickText\">\n {{(col.value === '0' || col.value === 0 || col.value\n )? col.value : '&lt;\u7A7A&gt;'}}\n <a (click)=\"triggerEvent(col.click || null)\">&nbsp;&nbsp;&nbsp;&nbsp;{{ col.clickText }}</a>\n </span>\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\" *ngIf=\"!col.clickText\">\n <a (click)=\"triggerEvent(col.click || null)\">{{(col.value === '0' || col.value === 0 || col.value\n )? col.value : '&lt;\u7A7A&gt;'}}</a>\n </span>\n </nz-descriptions-item>\n </ng-container>\n </nz-descriptions>\n</nz-content>\n",
500
+ template: "<nz-content class=\"hd-detail-form-container\">\n <nz-descriptions [nzColumn]=\"nzColumn\">\n <ng-container *ngFor=\"let col of formCols\">\n <nz-descriptions-item *ngIf=\"!col.click\" [nzTitle]=\"col.label\">\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\">{{(col.value === '0' || col.value === 0 || col.value\n )? col.value : '&lt;\u7A7A&gt;'}}</span>\n </nz-descriptions-item>\n <nz-descriptions-item *ngIf=\"col.click\" [nzTitle]=\"col.label\">\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\" *ngIf=\"col.clickText\">\n {{(col.value === '0' || col.value === 0 || col.value\n )? col.value : '&lt;\u7A7A&gt;'}}\n <a (click)=\"triggerEvent(col.click || null)\">&nbsp;&nbsp;&nbsp;&nbsp;{{ col.clickText }}</a>\n </span>\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\" *ngIf=\"!col.clickText\">\n <a (click)=\"triggerEvent(col.click || null)\">{{(col.value === '0' || col.value === 0 || col.value\n )? col.value : '&lt;\u7A7A&gt;'}}</a>\n </span>\n </nz-descriptions-item>\n </ng-container>\n </nz-descriptions>\n</nz-content>\n",
497
501
  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}::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}.hd-detail-form-container{font-size:14px}.hd-detail-form-container ::ng-deep .ant-descriptions-item-content{word-break:break-all;color:rgba(0,0,0,.85);font-weight:400;font-size:14px}.hd-detail-form-container ::ng-deep .ant-descriptions-item-label{color:#868a9c;font-size:14px;width:180px}.hd-detail-form-container ::ng-deep .ant-descriptions-item-label::after{content:''!important}.hd-detail-form-container ::ng-deep .ant-descriptions-item{padding-top:6px!important;padding-bottom:6px!important;font-size:14px}.hd-detail-form-container ::ng-deep a{font-size:14px}.hd-detail-form-container ::ng-deep td{white-space:unset!important}.hd-detail-form-container .ng-star-inserted,.hd-detail-form-container ::ng-deep .ant-descriptions-item{padding-left:0!important}"]
498
502
  }] }
499
503
  ];
500
504
  /** @nocollapse */
501
505
  HdDetailFormComponent.ctorParameters = function () { return []; };
502
506
  HdDetailFormComponent.propDecorators = {
503
- formCols: [{ type: core.Input }]
507
+ formCols: [{ type: core.Input }],
508
+ nzColumn: [{ type: core.Input }]
504
509
  };
505
510
  return HdDetailFormComponent;
506
511
  }());
507
512
  if (false) {
508
513
  /** @type {?} */
509
514
  HdDetailFormComponent.prototype.formCols;
515
+ /**
516
+ * 列数,支持数字或响应式配置,默认按屏幕宽度自适应
517
+ * @type {?}
518
+ */
519
+ HdDetailFormComponent.prototype.nzColumn;
510
520
  }
511
521
 
512
522
  /**
@@ -6709,6 +6719,22 @@
6709
6719
  fn(event);
6710
6720
  }
6711
6721
  };
6722
+ /**
6723
+ * @param {?} btn
6724
+ * @param {?} data
6725
+ * @return {?}
6726
+ */
6727
+ HdTableComponent.prototype.needShowConfirm = /**
6728
+ * @param {?} btn
6729
+ * @param {?} data
6730
+ * @return {?}
6731
+ */
6732
+ function (btn, data) {
6733
+ if (typeof btn.showConfirm === "function") {
6734
+ return btn.showConfirm(data);
6735
+ }
6736
+ return !!btn.showConfirm;
6737
+ };
6712
6738
  /**
6713
6739
  * @return {?}
6714
6740
  */
@@ -6936,7 +6962,7 @@
6936
6962
  HdTableComponent.decorators = [
6937
6963
  { type: core.Component, args: [{
6938
6964
  selector: "hd-table",
6939
- 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)=\"showDetail = !showDetail\">{{showDetail ?\n '\u7F29\u7565\u663E\u793A': '\u5C55\u5F00\u663E\u793A'}}</hd-button>\n </ng-template>\n <ng-template #buttonGroupRight>\n <ng-container *ngTemplateOutlet=\"tableRightButton\"></ng-container>\n <hd-button type=\"primary\" nz-dropdown nzTrigger=\"click\" [nzDropdownMenu]=\"menu\" (clickAction)=\"confirmDropdown()\"\n [nzVisible]=\"isDropdownVisible\">\u8BBE\u7F6E\u5217</hd-button>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <div style=\"max-height: 400px;overflow-y: scroll;\">\n <div *ngIf=\"showListNodes && nowListNodes.length > 0\" nz-menu style=\"padding: 5px 10px;\">\n <nz-tree *ngIf=\"showListNodes\" [nzData]=\"nowListNodes\" nzCheckable nzDraggable nzBlockNode\n nzShowExpand=\"false\" (nzCheckBoxChange)=\"checkAction($event)\" [nzBeforeDrop]=\"beforeDrop\"\n [nzTreeTemplate]=\"nzTreeTemplate\">\n </nz-tree>\n <ng-template #nzTreeTemplate let-node>\n <span\n class=\"ng-tns-c31-110 draggable ng-star-inserted ant-tree-node-content-wrapper ant-tree-node-content-wrapper-close\"\n [title]=\"node.key\" draggable=\"true\" aria-grabbed=\"true\">\n <span class=\"ant-tree-title\">\n <div class=\"hd-table-tree-node\">\n <span>{{node.key}}</span>\n <div *ngIf=\"!node.origin.disabled\" class=\"hd-table-tree-node-img\">\n <i nz-icon nzType=\"caret-up\" nzTheme=\"outline\"></i>\n <i nz-icon nzType=\"caret-down\" nzTheme=\"outline\"></i>\n </div>\n </div>\n </span>\n </span>\n </ng-template>\n </div>\n <div *ngIf=\"showListNodes && hideListNodes.length > 0\" nz-menu style=\"padding: 5px 10px;\">\n <nz-tree *ngIf=\"showListNodes\" [nzData]=\"hideListNodes\" nzCheckable nzShowExpand=\"false\"\n (nzCheckBoxChange)=\"checkAction($event)\">\n </nz-tree>\n </div>\n </div>\n <div style=\"text-align: right;background: #fff;padding: 4px;\">\n <hd-button style=\"margin-right: 4px;\" type=\"default\" size=\"small\" (clickAction)=\"cancelDropdown()\">\u53D6\u6D88\n </hd-button>\n <hd-button type=\"primary\" size=\"small\" (clickAction)=\"submitGrids()\">\u5B8C\u6210</hd-button>\n </div>\n </nz-dropdown-menu>\n </ng-template>\n </hd-button-group>\n <hd-space type=\"row\" size=\"12\"></hd-space>\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n <hd-space *ngIf=\"tableTotal\" type=\"row\" size=\"12\"></hd-space>\n <nz-table *ngIf=\"showTable\" #hdTable class=\"hd-table-container\" [nzScroll]=\"scroll\" nzShowSizeChanger\n nzShowSizeChanger nzShowQuickJumper nzFrontPagination=\"false\" nzSize=\"middle\" [nzData]=\"tableData.content\"\n [nzTotal]=\"tableData.totalElements\" [(nzPageIndex)]=\"tablePageIndex\" [nzLoading]=\"tableLoading\"\n [nzPageSizeOptions]=\"[ 10, 50, 100, 200 ]\" [(nzPageSize)]=\"tablePageSize\" (nzPageSizeChange)=\"search(true)\"\n (nzPageIndexChange)=\"search(false)\" (nzCurrentPageDataChange)=\"showSelected ? currentPageDataChange($event) : null\"\n [nzShowTotal]=\"tableTotalTemplate\">\n <thead (nzSortChange)=\"sort($event)\" nzSingleSort>\n <tr>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"isAllDisplayDataChecked\"\n [nzIndeterminate]=\"isIndeterminate\" (nzCheckedChange)=\"checkAll($event)\"></th>\n <ng-container *ngFor=\"let col of tableCols\">\n <th *ngIf=\"col.isShow\" [nzWidth]=\"col.width + 'px'\" [nzAlign]=\"col.align\"\n [nzLeft]=\"col.fixed === 'left' ? col.fixedWidth + 'px' : null\"\n [nzRight]=\"col.fixed === 'right' ? 0 + 'px' : null\" nz-resizable nzBounds=\"window\" nzPreview\n (nzResizeEnd)=\"onResize($event, col)\" [nzShowSort]=\"col.canSort\" [nzSortKey]=\"col.name\">\n {{ col.title }}\n <nz-resize-handle nzDirection=\"right\">\n <div class=\"resize-trigger\"></div>\n </nz-resize-handle>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let data of hdTable.data;index as i\">\n <td nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"mapOfCheckedId[data[selectField]]\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container *ngFor=\"let col of tableCols\">\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=\"!btn.showConfirm;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)]\">{{ judgeColEmpty(col.render ? col.render(data) : data[getStateField(col)])}}\n </hd-status>\n </ng-container>\n <ng-template #otherTemplate>\n <ng-container *ngIf=\"col.click;else noClickTemplate\">\n <ng-container\n *ngIf=\"!isTextOverflow(col.render ? col.render(data) : data[col.name], col.width);else overflowTemplate\">\n <a [ngStyle]=\"{'color': judgeColEmpty(col.render ? col.render(data) :data[col.name]) === '<\u7A7A>' ? '#2A3634' : (col?.color ? col.color : null)}\"\n (click)=\"triggerEvent(col.click || null, data)\">{{ judgeColEmpty(col.render ? col.render(data) :\n data[col.name])}}</a>\n </ng-container>\n <ng-template #overflowTemplate>\n <a [ngStyle]=\"{'color': judgeColEmpty(col.render ? col.render(data) :data[col.name]) === '<\u7A7A>' ? '#2A3634' : (col?.color ? col.color : null)}\" nz-tooltip\n [nzTooltipTitle]=\"col.render ? col.render(data) : data[col.name]\"\n (click)=\"triggerEvent(col.click || null, data)\">{{ judgeColEmpty(col.render ? col.render(data) :\n data[col.name])}}</a>\n </ng-template>\n </ng-container>\n <ng-template #noClickTemplate>\n <ng-container\n *ngIf=\"!isTextOverflow(col.render ? col.render(data) : data[col.name], col.width);else overflowTemplate\">\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\">{{ judgeColEmpty(col.render ?\n col.render(data) :\n data[col.name])}}</span>\n </ng-container>\n <ng-template #overflowTemplate>\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\" nz-tooltip\n [nzTooltipTitle]=\"col.render ? col.render(data) : data[col.name]\">\n {{ judgeColEmpty(col.render ? col.render(data) : data[col.name])}}</span>\n </ng-template>\n </ng-template>\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n </tr>\n <!-- \u5408\u8BA1\u6240\u6709\u6570\u636E\u533A\u57DF \u9700\u8981\u540E\u7AEF\u63A5\u53E3\u914D\u5408 -->\n <tr *ngIf=\"showTableTotal\" class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let tableTotalOption of tableTotalOptionList\">\n <td>{{ tableTotalOption }}</td>\n </ng-container>\n </tr>\n </tbody>\n <ng-template #tableTotalTemplate>\n \u5171 {{tableData.totalElements}} \u6761\u6570\u636E\n </ng-template>\n </nz-table>\n</ng-container>\n",
6965
+ 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)=\"showDetail = !showDetail\">{{showDetail ?\n '\u7F29\u7565\u663E\u793A': '\u5C55\u5F00\u663E\u793A'}}</hd-button>\n </ng-template>\n <ng-template #buttonGroupRight>\n <ng-container *ngTemplateOutlet=\"tableRightButton\"></ng-container>\n <hd-button type=\"primary\" nz-dropdown nzTrigger=\"click\" [nzDropdownMenu]=\"menu\" (clickAction)=\"confirmDropdown()\"\n [nzVisible]=\"isDropdownVisible\">\u8BBE\u7F6E\u5217</hd-button>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <div style=\"max-height: 400px;overflow-y: scroll;\">\n <div *ngIf=\"showListNodes && nowListNodes.length > 0\" nz-menu style=\"padding: 5px 10px;\">\n <nz-tree *ngIf=\"showListNodes\" [nzData]=\"nowListNodes\" nzCheckable nzDraggable nzBlockNode\n nzShowExpand=\"false\" (nzCheckBoxChange)=\"checkAction($event)\" [nzBeforeDrop]=\"beforeDrop\"\n [nzTreeTemplate]=\"nzTreeTemplate\">\n </nz-tree>\n <ng-template #nzTreeTemplate let-node>\n <span\n class=\"ng-tns-c31-110 draggable ng-star-inserted ant-tree-node-content-wrapper ant-tree-node-content-wrapper-close\"\n [title]=\"node.key\" draggable=\"true\" aria-grabbed=\"true\">\n <span class=\"ant-tree-title\">\n <div class=\"hd-table-tree-node\">\n <span>{{node.key}}</span>\n <div *ngIf=\"!node.origin.disabled\" class=\"hd-table-tree-node-img\">\n <i nz-icon nzType=\"caret-up\" nzTheme=\"outline\"></i>\n <i nz-icon nzType=\"caret-down\" nzTheme=\"outline\"></i>\n </div>\n </div>\n </span>\n </span>\n </ng-template>\n </div>\n <div *ngIf=\"showListNodes && hideListNodes.length > 0\" nz-menu style=\"padding: 5px 10px;\">\n <nz-tree *ngIf=\"showListNodes\" [nzData]=\"hideListNodes\" nzCheckable nzShowExpand=\"false\"\n (nzCheckBoxChange)=\"checkAction($event)\">\n </nz-tree>\n </div>\n </div>\n <div style=\"text-align: right;background: #fff;padding: 4px;\">\n <hd-button style=\"margin-right: 4px;\" type=\"default\" size=\"small\" (clickAction)=\"cancelDropdown()\">\u53D6\u6D88\n </hd-button>\n <hd-button type=\"primary\" size=\"small\" (clickAction)=\"submitGrids()\">\u5B8C\u6210</hd-button>\n </div>\n </nz-dropdown-menu>\n </ng-template>\n </hd-button-group>\n <hd-space type=\"row\" size=\"12\"></hd-space>\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n <hd-space *ngIf=\"tableTotal\" type=\"row\" size=\"12\"></hd-space>\n <nz-table *ngIf=\"showTable\" #hdTable class=\"hd-table-container\" [nzScroll]=\"scroll\" nzShowSizeChanger\n nzShowSizeChanger nzShowQuickJumper nzFrontPagination=\"false\" nzSize=\"middle\" [nzData]=\"tableData.content\"\n [nzTotal]=\"tableData.totalElements\" [(nzPageIndex)]=\"tablePageIndex\" [nzLoading]=\"tableLoading\"\n [nzPageSizeOptions]=\"[ 10, 50, 100, 200 ]\" [(nzPageSize)]=\"tablePageSize\" (nzPageSizeChange)=\"search(true)\"\n (nzPageIndexChange)=\"search(false)\" (nzCurrentPageDataChange)=\"showSelected ? currentPageDataChange($event) : null\"\n [nzShowTotal]=\"tableTotalTemplate\">\n <thead (nzSortChange)=\"sort($event)\" nzSingleSort>\n <tr>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"isAllDisplayDataChecked\"\n [nzIndeterminate]=\"isIndeterminate\" (nzCheckedChange)=\"checkAll($event)\"></th>\n <ng-container *ngFor=\"let col of tableCols\">\n <th *ngIf=\"col.isShow\" [nzWidth]=\"col.width + 'px'\" [nzAlign]=\"col.align\"\n [nzLeft]=\"col.fixed === 'left' ? col.fixedWidth + 'px' : null\"\n [nzRight]=\"col.fixed === 'right' ? 0 + 'px' : null\" nz-resizable nzBounds=\"window\" nzPreview\n (nzResizeEnd)=\"onResize($event, col)\" [nzShowSort]=\"col.canSort\" [nzSortKey]=\"col.name\">\n {{ col.title }}\n <nz-resize-handle nzDirection=\"right\">\n <div class=\"resize-trigger\"></div>\n </nz-resize-handle>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let data of hdTable.data;index as i\">\n <td nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"mapOfCheckedId[data[selectField]]\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container *ngFor=\"let col of tableCols\">\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)]\">{{ judgeColEmpty(col.render ? col.render(data) : data[getStateField(col)])}}\n </hd-status>\n </ng-container>\n <ng-template #otherTemplate>\n <ng-container *ngIf=\"col.click;else noClickTemplate\">\n <ng-container\n *ngIf=\"!isTextOverflow(col.render ? col.render(data) : data[col.name], col.width);else overflowTemplate\">\n <a [ngStyle]=\"{'color': judgeColEmpty(col.render ? col.render(data) :data[col.name]) === '<\u7A7A>' ? '#2A3634' : (col?.color ? col.color : null)}\"\n (click)=\"triggerEvent(col.click || null, data)\">{{ judgeColEmpty(col.render ? col.render(data) :\n data[col.name])}}</a>\n </ng-container>\n <ng-template #overflowTemplate>\n <a [ngStyle]=\"{'color': judgeColEmpty(col.render ? col.render(data) :data[col.name]) === '<\u7A7A>' ? '#2A3634' : (col?.color ? col.color : null)}\" nz-tooltip\n [nzTooltipTitle]=\"col.render ? col.render(data) : data[col.name]\"\n (click)=\"triggerEvent(col.click || null, data)\">{{ judgeColEmpty(col.render ? col.render(data) :\n data[col.name])}}</a>\n </ng-template>\n </ng-container>\n <ng-template #noClickTemplate>\n <ng-container\n *ngIf=\"!isTextOverflow(col.render ? col.render(data) : data[col.name], col.width);else overflowTemplate\">\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\">{{ judgeColEmpty(col.render ?\n col.render(data) :\n data[col.name])}}</span>\n </ng-container>\n <ng-template #overflowTemplate>\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\" nz-tooltip\n [nzTooltipTitle]=\"col.render ? col.render(data) : data[col.name]\">\n {{ judgeColEmpty(col.render ? col.render(data) : data[col.name])}}</span>\n </ng-template>\n </ng-template>\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n </tr>\n <!-- \u5408\u8BA1\u6240\u6709\u6570\u636E\u533A\u57DF \u9700\u8981\u540E\u7AEF\u63A5\u53E3\u914D\u5408 -->\n <tr *ngIf=\"showTableTotal\" class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let tableTotalOption of tableTotalOptionList\">\n <td>{{ tableTotalOption }}</td>\n </ng-container>\n </tr>\n </tbody>\n <ng-template #tableTotalTemplate>\n \u5171 {{tableData.totalElements}} \u6761\u6570\u636E\n </ng-template>\n </nz-table>\n</ng-container>\n",
6940
6966
  styles: ["::ng-deep .common-btn-group>a{font-size:14px;font-weight:400;color:#20b95d!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset;padding:0 6px!important}::ng-deep .ant-form-item-label>label{color:#4b504e;font-size:14px}::ng-deep .ant-input-number-input{height:32px}::ng-deep .ant-input-number{height:32px}textarea.ant-input{height:auto;min-height:32px}::ng-deep .ant-select-selection--multiple{min-height:32px}::ng-deep .ant-select-selection__rendered>ul>li{height:26px!important;margin-top:3px!important;line-height:26px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:32px!important}::ng-deep .ant-input{height:32px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:32px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:14px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:14px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-time-picker{width:100%}.ant-input-number-disabled,.ant-input[disabled],.ant-select-disabled{color:#4b504e}.nz-resizable-preview{position:absolute;top:0;left:0;z-index:8;border:1px dashed #d1d1d1}.nz-resizable-handle{position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9}.nz-resizable-handle-top{width:100%;height:10px;top:-5px;left:0}.nz-resizable-handle-right{height:100%}.nz-resizable-handle-bottom{width:100%;height:10px;bottom:-5px;left:0}.nz-resizable-handle-left{width:10px;height:100%;top:0;left:-5px}.nz-resizable-handle-topRight{width:20px;height:20px;top:-5px;right:-5px;z-index:10}.nz-resizable-handle-bottomRight{width:20px;height:20px;right:-5px;bottom:-5px;z-index:10}.nz-resizable-handle-bottomLeft{width:20px;height:20px;bottom:-5px;left:-5px;z-index:10}.nz-resizable-handle-topLeft{width:20px;height:20px;top:-5px;left:-5px;z-index:10}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottom,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-top{cursor:row-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-left,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-right{cursor:col-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottomRight,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-topLeft{cursor:nwse-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottomLeft,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-topRight{cursor:nesw-resize}.hd-table-container ::ng-deep .ant-pagination-options-quick-jumper input{border-radius:2px;border:1px solid #d9d9d9}.hd-table-container ::ng-deep .ant-pagination-options .ant-select-selection{border-radius:2px}.hd-table-container ::ng-deep .ant-table-thead>tr>th{border-bottom:1px solid #ecf1ed;white-space:nowrap;text-overflow:ellipsis}.hd-table-container ::ng-deep .ant-table-tbody>tr>td{border-bottom:1px solid #ecf1ed;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.hd-table-container ::ng-deep .hd-table-total>td{border:0!important}::ng-deep .ant-dropdown-menu{border-radius:0}::ng-deep .ant-dropdown{margin-top:8px!important}.common-td-wrap{white-space:normal!important;word-break:break-all}.nz-resizable-preview{border-width:0 1px 0 0}.resize-trigger{width:10px;height:15px;position:relative;top:calc((100% - 15px)/ 2)}.resize-trigger::after{position:absolute;top:calc((100% - 15px)/ 2);left:0;background:#d5d5d5;content:'';width:1px;height:15px;z-index:1}.nz-resizable-handle-right{position:absolute;width:10px;top:0;right:-5px;z-index:inherit}.hd-table-tree-node{display:inline-flex;align-items:center;padding-right:10px}.hd-table-tree-node .hd-table-tree-node-img{display:flex;flex-direction:column;position:absolute;right:0;margin-top:-2.5px}.hd-table-tree-node .hd-table-tree-node-img i{opacity:.3}.hd-table-tree-node .hd-table-tree-node-img i:last-child{margin-top:-5px}img{width:20px;height:20px}.ant-table-th-left-sticky{z-index:2}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}"]
6941
6967
  }] }
6942
6968
  ];