fantasy-ngzorro 2.2.8 → 2.2.9
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 +50 -1
- package/bundles/fantasy-ngzorro.umd.js +294 -9
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +2 -2
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/fantasy-ngzorro.js +2 -2
- package/esm2015/hd-table/hd-table.component.js +186 -5
- package/esm2015/hd-table/hd-table.module.js +5 -1
- package/esm2015/hd-table/hd-table.service.js +56 -4
- package/esm2015/index.js +2 -2
- package/esm2015/public-api.js +2 -2
- package/esm5/fantasy-ngzorro.js +2 -2
- package/esm5/hd-table/hd-table.component.js +231 -7
- package/esm5/hd-table/hd-table.module.js +5 -1
- package/esm5/hd-table/hd-table.service.js +66 -4
- package/esm5/index.js +2 -2
- package/esm5/public-api.js +2 -2
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +243 -8
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +294 -10
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-table/hd-table.component.d.ts +14 -2
- package/hd-table/hd-table.service.d.ts +29 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
| — | 2026-9-22 | `hd-form-lines` 支持列设置(`showColSettings` 默认开):仅非 hide 的 ViewDom 可显隐,禁止调序;可选 `uuid` 缓存 |
|
|
42
42
|
| — | 2026-9-22 | `hd-tip` 支持右侧展开/收起(`showCollapse` / `[(expanded)]`),暴露 `expand` / `collapse` / `toggle` 供父组件控制其它区块 |
|
|
43
43
|
| — | 2026-9-22 | `hd-form-lines` 勾选提示改为 `tableTotal` 插槽(同 hd-table),组件内不再默认渲染已选中块 |
|
|
44
|
+
| — | 2026-10-1 | `hd-table` 支持轻量行内编辑:`editType`(input / inputNumber / select)+ `(cellChange)`;Select 双写 value/label,事件带 `previous*` 供接口失败回滚 |
|
|
44
45
|
| — | 2026-9-22 | `hd-table` / `hd-detail-form` 字段值后支持编辑笔图标(`editable` + `edit` 回调,图标对齐 Figma) |
|
|
45
46
|
| — | 2026-9-28 | `hd-detail-lines` / `hd-detail-lines-page`:CSS 纵滚场景下提高冻结列表头 z-index,修复横滚盖住冻结列名 |
|
|
46
47
|
| — | 2026-9-28 | `hd-detail-lines` / `hd-detail-lines-page`:仅有 `scroll.x` 时用 CSS `max-height` 做表内纵滚(不补 `nzScroll.y`),修复无列宽多行平铺无法纵滚,同时避免拆表头错位 |
|
|
@@ -420,6 +421,7 @@ tableCols: HdTableColumn[] = [{
|
|
|
420
421
|
| tablePageSizeChangeEvent | EventEmitter | — | pageSize 变化(含缓存恢复),常用于重新查询 |
|
|
421
422
|
| sortEvent | EventEmitter | — | 排序 |
|
|
422
423
|
| selectEvent | EventEmitter | — | 勾选变化 |
|
|
424
|
+
| cellChange | EventEmitter\<HdTableCellChange\> | — | 行内编辑变更(已写回行对象;含 `previous*` 供接口失败回滚) |
|
|
423
425
|
| showSelected | boolean | false | 勾选列 |
|
|
424
426
|
| selectField | string | billNumber | 勾选主键字段 |
|
|
425
427
|
| selectDisabledField | string | — | 行勾选禁用字段名;行数据该字段为 `true` 时禁用勾选(全选也会跳过) |
|
|
@@ -1172,10 +1174,57 @@ onOpenChangeEvent: (open: boolean, line: FormGroup) => void
|
|
|
1172
1174
|
| render / click | Function | — | 渲染 / 点击 |
|
|
1173
1175
|
| canClick | (line) => boolean | — | 按行控制是否可点 |
|
|
1174
1176
|
| rowNo | boolean \| string | — | 字段值后竖线 + 行号。`true` 为分页连续序号(从 1 起);字符串为行数据字段名。前面的字段仍可用 `click` 做成超链接,行号不可点 |
|
|
1175
|
-
| editable | boolean \| (line) => boolean | — | 值后显示编辑笔图标(Figma 14px
|
|
1177
|
+
| editable | boolean \| (line) => boolean | — | 值后显示编辑笔图标(Figma 14px);函数按行控制。与 `editType` 互斥 |
|
|
1176
1178
|
| edit | (line) => void | — | 点击编辑笔回调,供父组件处理(如弹窗改值) |
|
|
1179
|
+
| editType | `'input'` \| `'inputNumber'` \| `'select'` | — | 行内编辑:该列常显控件;`name` 须为 string |
|
|
1180
|
+
| editDisabled | boolean \| (line) => boolean | — | 禁用行内编辑 |
|
|
1181
|
+
| selectOption | SelectOption | — | `editType=select` 时用;选中后 `line[name]=option[value]`,若有 `label` 则再写 `line[label]=option[label]` |
|
|
1182
|
+
| inputNumber | InputNumber | — | `editType=inputNumber` 时的 min/max/step/precision |
|
|
1183
|
+
| placeholder | string | — | 输入框 / 下拉占位 |
|
|
1177
1184
|
| btnList | OperateBtn[] | — | `title` 为「操作」时整列按钮;其他列时显示在单元格文案后的操作按钮 |
|
|
1178
1185
|
|
|
1186
|
+
#### HdTableCellChange(行内编辑事件)
|
|
1187
|
+
|
|
1188
|
+
| 字段 | 说明 |
|
|
1189
|
+
| ---- | ---- |
|
|
1190
|
+
| line / col / name | 当前行、列配置、字段名 |
|
|
1191
|
+
| value / previousValue | 新值 / 变更前值(接口失败回滚用) |
|
|
1192
|
+
| label / previousLabel | Select 时新/旧文案字段值 |
|
|
1193
|
+
| option / previousOption | Select 时新/旧整条选项 |
|
|
1194
|
+
|
|
1195
|
+
接口失败回滚示例:
|
|
1196
|
+
|
|
1197
|
+
```typescript
|
|
1198
|
+
onTableCellChange(e: HdTableCellChange) {
|
|
1199
|
+
this.api.update(e.line).subscribe({
|
|
1200
|
+
error: () => {
|
|
1201
|
+
e.line[e.name] = e.previousValue;
|
|
1202
|
+
if (e.col.selectOption && e.col.selectOption.label) {
|
|
1203
|
+
e.line[e.col.selectOption.label] = e.previousLabel;
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
});
|
|
1207
|
+
}
|
|
1208
|
+
```
|
|
1209
|
+
|
|
1210
|
+
行内编辑列表示例:
|
|
1211
|
+
|
|
1212
|
+
```typescript
|
|
1213
|
+
{
|
|
1214
|
+
title: '等级',
|
|
1215
|
+
name: 'gradeCode',
|
|
1216
|
+
editType: 'select',
|
|
1217
|
+
selectOption: {
|
|
1218
|
+
value: 'code',
|
|
1219
|
+
label: 'gradeName',
|
|
1220
|
+
selectList: [
|
|
1221
|
+
{ code: 'A', gradeName: '一级' },
|
|
1222
|
+
{ code: 'B', gradeName: '二级' },
|
|
1223
|
+
],
|
|
1224
|
+
},
|
|
1225
|
+
}
|
|
1226
|
+
```
|
|
1227
|
+
|
|
1179
1228
|
#### OperateBtn(操作列按钮)
|
|
1180
1229
|
|
|
1181
1230
|
| 参数 | 类型 | 默认值 | 说明 |
|
|
@@ -10376,7 +10376,7 @@
|
|
|
10376
10376
|
function HdTableColumn() {
|
|
10377
10377
|
// 列名
|
|
10378
10378
|
this.name = null; // 字段名
|
|
10379
|
-
this.align =
|
|
10379
|
+
this.align = "left";
|
|
10380
10380
|
this.fixed = null;
|
|
10381
10381
|
// 右侧固定列偏移(其右侧已固定列宽之和)
|
|
10382
10382
|
this.btnList = []; // title 为「操作」时整列按钮;其他列时作为单元格文案后的操作按钮
|
|
@@ -10443,6 +10443,7 @@
|
|
|
10443
10443
|
/**
|
|
10444
10444
|
* 值后显示编辑笔图标(Figma edit/edit,14px)。
|
|
10445
10445
|
* true:整列可编辑;函数:按行控制。
|
|
10446
|
+
* 与 editType 互斥:配置了 editType 时走单元格内控件,不再显示编辑笔。
|
|
10446
10447
|
* @type {?}
|
|
10447
10448
|
*/
|
|
10448
10449
|
HdTableColumn.prototype.editable;
|
|
@@ -10451,6 +10452,63 @@
|
|
|
10451
10452
|
* @type {?}
|
|
10452
10453
|
*/
|
|
10453
10454
|
HdTableColumn.prototype.edit;
|
|
10455
|
+
/**
|
|
10456
|
+
* 行内编辑类型;配置后该列常显控件。
|
|
10457
|
+
* name 须为 string(函数型 name 不支持行内编辑)。
|
|
10458
|
+
* @type {?}
|
|
10459
|
+
*/
|
|
10460
|
+
HdTableColumn.prototype.editType;
|
|
10461
|
+
/**
|
|
10462
|
+
* 是否禁用行内编辑:true / 按行函数
|
|
10463
|
+
* @type {?}
|
|
10464
|
+
*/
|
|
10465
|
+
HdTableColumn.prototype.editDisabled;
|
|
10466
|
+
/**
|
|
10467
|
+
* Select 配置(复用 SelectOption 子集)
|
|
10468
|
+
* @type {?}
|
|
10469
|
+
*/
|
|
10470
|
+
HdTableColumn.prototype.selectOption;
|
|
10471
|
+
/**
|
|
10472
|
+
* InputNumber 配置
|
|
10473
|
+
* @type {?}
|
|
10474
|
+
*/
|
|
10475
|
+
HdTableColumn.prototype.inputNumber;
|
|
10476
|
+
/**
|
|
10477
|
+
* 输入框 / 下拉 placeholder
|
|
10478
|
+
* @type {?}
|
|
10479
|
+
*/
|
|
10480
|
+
HdTableColumn.prototype.placeholder;
|
|
10481
|
+
}
|
|
10482
|
+
/**
|
|
10483
|
+
* hd-table 行内编辑变更事件(乐观更新后抛出,previous* 供接口失败回滚)
|
|
10484
|
+
*/
|
|
10485
|
+
var /**
|
|
10486
|
+
* hd-table 行内编辑变更事件(乐观更新后抛出,previous* 供接口失败回滚)
|
|
10487
|
+
*/
|
|
10488
|
+
HdTableCellChange = /** @class */ (function () {
|
|
10489
|
+
function HdTableCellChange() {
|
|
10490
|
+
}
|
|
10491
|
+
return HdTableCellChange;
|
|
10492
|
+
}());
|
|
10493
|
+
if (false) {
|
|
10494
|
+
/** @type {?} */
|
|
10495
|
+
HdTableCellChange.prototype.line;
|
|
10496
|
+
/** @type {?} */
|
|
10497
|
+
HdTableCellChange.prototype.col;
|
|
10498
|
+
/** @type {?} */
|
|
10499
|
+
HdTableCellChange.prototype.name;
|
|
10500
|
+
/** @type {?} */
|
|
10501
|
+
HdTableCellChange.prototype.value;
|
|
10502
|
+
/** @type {?} */
|
|
10503
|
+
HdTableCellChange.prototype.previousValue;
|
|
10504
|
+
/** @type {?} */
|
|
10505
|
+
HdTableCellChange.prototype.label;
|
|
10506
|
+
/** @type {?} */
|
|
10507
|
+
HdTableCellChange.prototype.previousLabel;
|
|
10508
|
+
/** @type {?} */
|
|
10509
|
+
HdTableCellChange.prototype.option;
|
|
10510
|
+
/** @type {?} */
|
|
10511
|
+
HdTableCellChange.prototype.previousOption;
|
|
10454
10512
|
}
|
|
10455
10513
|
var OperateBtn = /** @class */ (function () {
|
|
10456
10514
|
function OperateBtn() {
|
|
@@ -10506,8 +10564,8 @@
|
|
|
10506
10564
|
// 设置列 树组件对象
|
|
10507
10565
|
TreeGrid = /** @class */ (function () {
|
|
10508
10566
|
function TreeGrid() {
|
|
10509
|
-
this.title =
|
|
10510
|
-
this.key =
|
|
10567
|
+
this.title = "";
|
|
10568
|
+
this.key = "";
|
|
10511
10569
|
this.disabled = false;
|
|
10512
10570
|
this.checked = false;
|
|
10513
10571
|
this.selectable = false;
|
|
@@ -10552,6 +10610,10 @@
|
|
|
10552
10610
|
this.sortEvent = new core.EventEmitter();
|
|
10553
10611
|
this.selectEvent = new core.EventEmitter();
|
|
10554
10612
|
this.tableSearchEvent = new core.EventEmitter();
|
|
10613
|
+
/**
|
|
10614
|
+
* 行内编辑变更(已写回行对象;previous* 供接口失败回滚)
|
|
10615
|
+
*/
|
|
10616
|
+
this.cellChange = new core.EventEmitter();
|
|
10555
10617
|
this.tableLoading = false;
|
|
10556
10618
|
/**
|
|
10557
10619
|
* 是否显示分页;false 时一次展示 tableData.content 全部行
|
|
@@ -12599,21 +12661,24 @@
|
|
|
12599
12661
|
}
|
|
12600
12662
|
return [raw[0].trim(), raw.slice(1).join("|").trim()];
|
|
12601
12663
|
};
|
|
12602
|
-
/**
|
|
12664
|
+
/** 是否显示编辑笔图标(有 editType 时走行内控件,不再显示笔) */
|
|
12603
12665
|
/**
|
|
12604
|
-
*
|
|
12666
|
+
* 是否显示编辑笔图标(有 editType 时走行内控件,不再显示笔)
|
|
12605
12667
|
* @param {?} col
|
|
12606
12668
|
* @param {?} data
|
|
12607
12669
|
* @return {?}
|
|
12608
12670
|
*/
|
|
12609
12671
|
HdTableComponent.prototype.isEditable = /**
|
|
12610
|
-
*
|
|
12672
|
+
* 是否显示编辑笔图标(有 editType 时走行内控件,不再显示笔)
|
|
12611
12673
|
* @param {?} col
|
|
12612
12674
|
* @param {?} data
|
|
12613
12675
|
* @return {?}
|
|
12614
12676
|
*/
|
|
12615
12677
|
function (col, data) {
|
|
12616
|
-
if (!col ||
|
|
12678
|
+
if (!col || this.hasInlineEdit(col)) {
|
|
12679
|
+
return false;
|
|
12680
|
+
}
|
|
12681
|
+
if (col.editable == null || col.editable === false) {
|
|
12617
12682
|
return false;
|
|
12618
12683
|
}
|
|
12619
12684
|
if (typeof col.editable === "function") {
|
|
@@ -12643,12 +12708,223 @@
|
|
|
12643
12708
|
}
|
|
12644
12709
|
this.triggerEvent(col.edit || null, data);
|
|
12645
12710
|
};
|
|
12711
|
+
/** 列是否配置了可用的行内编辑(name 必须是 string) */
|
|
12712
|
+
/**
|
|
12713
|
+
* 列是否配置了可用的行内编辑(name 必须是 string)
|
|
12714
|
+
* @param {?} col
|
|
12715
|
+
* @return {?}
|
|
12716
|
+
*/
|
|
12717
|
+
HdTableComponent.prototype.hasInlineEdit = /**
|
|
12718
|
+
* 列是否配置了可用的行内编辑(name 必须是 string)
|
|
12719
|
+
* @param {?} col
|
|
12720
|
+
* @return {?}
|
|
12721
|
+
*/
|
|
12722
|
+
function (col) {
|
|
12723
|
+
if (!col || !col.editType) {
|
|
12724
|
+
return false;
|
|
12725
|
+
}
|
|
12726
|
+
if (typeof col.name !== "string" || !col.name) {
|
|
12727
|
+
console.warn("[hd-table] editType 要求 name 为 string,列「" +
|
|
12728
|
+
(col.title || "") +
|
|
12729
|
+
"」已回退只读");
|
|
12730
|
+
return false;
|
|
12731
|
+
}
|
|
12732
|
+
return true;
|
|
12733
|
+
};
|
|
12734
|
+
/**
|
|
12735
|
+
* @param {?} col
|
|
12736
|
+
* @param {?} data
|
|
12737
|
+
* @return {?}
|
|
12738
|
+
*/
|
|
12739
|
+
HdTableComponent.prototype.isEditDisabled = /**
|
|
12740
|
+
* @param {?} col
|
|
12741
|
+
* @param {?} data
|
|
12742
|
+
* @return {?}
|
|
12743
|
+
*/
|
|
12744
|
+
function (col, data) {
|
|
12745
|
+
if (!col || col.editDisabled == null || col.editDisabled === false) {
|
|
12746
|
+
return false;
|
|
12747
|
+
}
|
|
12748
|
+
if (typeof col.editDisabled === "function") {
|
|
12749
|
+
return !!col.editDisabled(data);
|
|
12750
|
+
}
|
|
12751
|
+
return !!col.editDisabled;
|
|
12752
|
+
};
|
|
12753
|
+
/**
|
|
12754
|
+
* @param {?} col
|
|
12755
|
+
* @param {?} data
|
|
12756
|
+
* @return {?}
|
|
12757
|
+
*/
|
|
12758
|
+
HdTableComponent.prototype.getSelectList = /**
|
|
12759
|
+
* @param {?} col
|
|
12760
|
+
* @param {?} data
|
|
12761
|
+
* @return {?}
|
|
12762
|
+
*/
|
|
12763
|
+
function (col, data) {
|
|
12764
|
+
if (!col || !col.selectOption) {
|
|
12765
|
+
return [];
|
|
12766
|
+
}
|
|
12767
|
+
/** @type {?} */
|
|
12768
|
+
var opt = col.selectOption;
|
|
12769
|
+
if (opt.selectListName && data) {
|
|
12770
|
+
/** @type {?} */
|
|
12771
|
+
var list = data[opt.selectListName];
|
|
12772
|
+
return Array.isArray(list) ? list : [];
|
|
12773
|
+
}
|
|
12774
|
+
return Array.isArray(opt.selectList) ? opt.selectList : [];
|
|
12775
|
+
};
|
|
12776
|
+
/**
|
|
12777
|
+
* @param {?} col
|
|
12778
|
+
* @param {?} item
|
|
12779
|
+
* @return {?}
|
|
12780
|
+
*/
|
|
12781
|
+
HdTableComponent.prototype.getSelectOptionLabel = /**
|
|
12782
|
+
* @param {?} col
|
|
12783
|
+
* @param {?} item
|
|
12784
|
+
* @return {?}
|
|
12785
|
+
*/
|
|
12786
|
+
function (col, item) {
|
|
12787
|
+
if (!col || !col.selectOption || !item) {
|
|
12788
|
+
return "";
|
|
12789
|
+
}
|
|
12790
|
+
/** @type {?} */
|
|
12791
|
+
var opt = col.selectOption;
|
|
12792
|
+
/** @type {?} */
|
|
12793
|
+
var value = item[opt.value];
|
|
12794
|
+
/** @type {?} */
|
|
12795
|
+
var label = item[opt.label];
|
|
12796
|
+
if (opt.showLabelAndValue || opt.hdShowItemCode) {
|
|
12797
|
+
return "[" + (value == null ? "" : value) + "]" + (label == null ? "" : label);
|
|
12798
|
+
}
|
|
12799
|
+
return label == null ? "" : String(label);
|
|
12800
|
+
};
|
|
12801
|
+
/**
|
|
12802
|
+
* @param {?} col
|
|
12803
|
+
* @param {?} key
|
|
12804
|
+
* @param {?} fallback
|
|
12805
|
+
* @return {?}
|
|
12806
|
+
*/
|
|
12807
|
+
HdTableComponent.prototype.getInputNumberProp = /**
|
|
12808
|
+
* @param {?} col
|
|
12809
|
+
* @param {?} key
|
|
12810
|
+
* @param {?} fallback
|
|
12811
|
+
* @return {?}
|
|
12812
|
+
*/
|
|
12813
|
+
function (col, key, fallback) {
|
|
12814
|
+
if (!col || !col.inputNumber) {
|
|
12815
|
+
return fallback;
|
|
12816
|
+
}
|
|
12817
|
+
/** @type {?} */
|
|
12818
|
+
var val = col.inputNumber[key];
|
|
12819
|
+
return val != null ? Number(val) : fallback;
|
|
12820
|
+
};
|
|
12821
|
+
/** Input / InputNumber 变更:先记旧值再写回并通知父组件 */
|
|
12822
|
+
/**
|
|
12823
|
+
* Input / InputNumber 变更:先记旧值再写回并通知父组件
|
|
12824
|
+
* @param {?} col
|
|
12825
|
+
* @param {?} data
|
|
12826
|
+
* @param {?} value
|
|
12827
|
+
* @return {?}
|
|
12828
|
+
*/
|
|
12829
|
+
HdTableComponent.prototype.onCellChange = /**
|
|
12830
|
+
* Input / InputNumber 变更:先记旧值再写回并通知父组件
|
|
12831
|
+
* @param {?} col
|
|
12832
|
+
* @param {?} data
|
|
12833
|
+
* @param {?} value
|
|
12834
|
+
* @return {?}
|
|
12835
|
+
*/
|
|
12836
|
+
function (col, data, value) {
|
|
12837
|
+
if (!this.hasInlineEdit(col) || !data) {
|
|
12838
|
+
return;
|
|
12839
|
+
}
|
|
12840
|
+
/** @type {?} */
|
|
12841
|
+
var name = (/** @type {?} */ (col.name));
|
|
12842
|
+
/** @type {?} */
|
|
12843
|
+
var previousValue = data[name];
|
|
12844
|
+
data[name] = value;
|
|
12845
|
+
this.cellChange.emit({
|
|
12846
|
+
line: data,
|
|
12847
|
+
col: col,
|
|
12848
|
+
name: name,
|
|
12849
|
+
value: value,
|
|
12850
|
+
previousValue: previousValue,
|
|
12851
|
+
});
|
|
12852
|
+
this.cdr.markForCheck();
|
|
12853
|
+
};
|
|
12854
|
+
/** Select 变更:双写 value + label,并带 previous* / option */
|
|
12855
|
+
/**
|
|
12856
|
+
* Select 变更:双写 value + label,并带 previous* / option
|
|
12857
|
+
* @param {?} col
|
|
12858
|
+
* @param {?} data
|
|
12859
|
+
* @param {?} value
|
|
12860
|
+
* @return {?}
|
|
12861
|
+
*/
|
|
12862
|
+
HdTableComponent.prototype.onSelectChange = /**
|
|
12863
|
+
* Select 变更:双写 value + label,并带 previous* / option
|
|
12864
|
+
* @param {?} col
|
|
12865
|
+
* @param {?} data
|
|
12866
|
+
* @param {?} value
|
|
12867
|
+
* @return {?}
|
|
12868
|
+
*/
|
|
12869
|
+
function (col, data, value) {
|
|
12870
|
+
if (!this.hasInlineEdit(col) || !data) {
|
|
12871
|
+
return;
|
|
12872
|
+
}
|
|
12873
|
+
/** @type {?} */
|
|
12874
|
+
var name = (/** @type {?} */ (col.name));
|
|
12875
|
+
/** @type {?} */
|
|
12876
|
+
var opt = col.selectOption;
|
|
12877
|
+
/** @type {?} */
|
|
12878
|
+
var labelField = opt && opt.label ? opt.label : null;
|
|
12879
|
+
/** @type {?} */
|
|
12880
|
+
var previousValue = data[name];
|
|
12881
|
+
/** @type {?} */
|
|
12882
|
+
var previousLabel = labelField ? data[labelField] : undefined;
|
|
12883
|
+
/** @type {?} */
|
|
12884
|
+
var list = this.getSelectList(col, data);
|
|
12885
|
+
/** @type {?} */
|
|
12886
|
+
var previousOption = previousValue == null || !opt
|
|
12887
|
+
? null
|
|
12888
|
+
: list.find((/**
|
|
12889
|
+
* @param {?} item
|
|
12890
|
+
* @return {?}
|
|
12891
|
+
*/
|
|
12892
|
+
function (item) { return item && item[opt.value] === previousValue; })) ||
|
|
12893
|
+
null;
|
|
12894
|
+
/** @type {?} */
|
|
12895
|
+
var option = value == null || !opt
|
|
12896
|
+
? null
|
|
12897
|
+
: list.find((/**
|
|
12898
|
+
* @param {?} item
|
|
12899
|
+
* @return {?}
|
|
12900
|
+
*/
|
|
12901
|
+
function (item) { return item && item[opt.value] === value; })) || null;
|
|
12902
|
+
data[name] = value;
|
|
12903
|
+
/** @type {?} */
|
|
12904
|
+
var label = undefined;
|
|
12905
|
+
if (labelField) {
|
|
12906
|
+
label = option ? option[opt.label] : null;
|
|
12907
|
+
data[labelField] = label;
|
|
12908
|
+
}
|
|
12909
|
+
this.cellChange.emit({
|
|
12910
|
+
line: data,
|
|
12911
|
+
col: col,
|
|
12912
|
+
name: name,
|
|
12913
|
+
value: value,
|
|
12914
|
+
previousValue: previousValue,
|
|
12915
|
+
label: label,
|
|
12916
|
+
previousLabel: previousLabel,
|
|
12917
|
+
option: option,
|
|
12918
|
+
previousOption: previousOption,
|
|
12919
|
+
});
|
|
12920
|
+
this.cdr.markForCheck();
|
|
12921
|
+
};
|
|
12646
12922
|
HdTableComponent.decorators = [
|
|
12647
12923
|
{ type: core.Component, args: [{
|
|
12648
12924
|
selector: "hd-table",
|
|
12649
|
-
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 <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-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 [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\" [nzVirtualScroll]=\"useVirtualScroll\" [nzVirtualItemSize]=\"useVirtualScroll ? effectiveVirtualItemSize : 0\"\n [nzVirtualForTrackBy]=\"virtualTrackByRow\">\n <thead (nzSortChange)=\"sort($event)\" nzSingleSort>\n <tr>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"isAllDisplayDataChecked\"\n [nzIndeterminate]=\"isIndeterminate\" (nzCheckedChange)=\"checkAll($event)\"></th>\n <ng-container *ngFor=\"let col of tableCols\">\n <th *ngIf=\"col.isShow\" [nzWidth]=\"col.width + 'px'\" [nzAlign]=\"col.align\"\n [nzLeft]=\"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 <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 <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 <tfoot *ngIf=\"showTableTotal\">\n <tr class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let tableTotalOption of tableTotalOptionList\">\n <td>{{ tableTotalOption }}</td>\n </ng-container>\n </tr>\n </tfoot>\n <ng-template #tableTotalTemplate>\n \u5171 {{ getTableTotalCount() }} \u6761\u6570\u636E\n </ng-template>\n </nz-table>\n</ng-container>\n\n<ng-template #tableCells let-data let-index=\"index\">\n <td nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [nzChecked]=\"mapOfCheckedId[data[selectField]]\"\n [nzDisabled]=\"isSelectDisabled(data)\" (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container *ngFor=\"let col of tableCols; trackBy: trackByCol\">\n <td *ngIf=\"col.isShow\" [ngStyle]=\"{'max-width': col.width + 'px'}\" [nzAlign]=\"col.align\"\n [nzLeft]=\"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 <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 </td>\n </ng-container>\n</ng-template>\n",
|
|
12925
|
+
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 <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-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 [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\" [nzVirtualScroll]=\"useVirtualScroll\" [nzVirtualItemSize]=\"useVirtualScroll ? effectiveVirtualItemSize : 0\"\n [nzVirtualForTrackBy]=\"virtualTrackByRow\">\n <thead (nzSortChange)=\"sort($event)\" nzSingleSort>\n <tr>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"isAllDisplayDataChecked\"\n [nzIndeterminate]=\"isIndeterminate\" (nzCheckedChange)=\"checkAll($event)\"></th>\n <ng-container *ngFor=\"let col of tableCols\">\n <th *ngIf=\"col.isShow\" [nzWidth]=\"col.width + 'px'\" [nzAlign]=\"col.align\"\n [nzLeft]=\"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 <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 <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 <tfoot *ngIf=\"showTableTotal\">\n <tr class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let tableTotalOption of tableTotalOptionList\">\n <td>{{ tableTotalOption }}</td>\n </ng-container>\n </tr>\n </tfoot>\n <ng-template #tableTotalTemplate>\n \u5171 {{ getTableTotalCount() }} \u6761\u6570\u636E\n </ng-template>\n </nz-table>\n</ng-container>\n\n<ng-template #tableCells let-data let-index=\"index\">\n <td nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [nzChecked]=\"mapOfCheckedId[data[selectField]]\"\n [nzDisabled]=\"isSelectDisabled(data)\" (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container *ngFor=\"let col of tableCols; trackBy: trackByCol\">\n <td *ngIf=\"col.isShow\" [ngStyle]=\"{'max-width': col.width + 'px'}\" [nzAlign]=\"col.align\"\n [nzLeft]=\"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 [ngModel]=\"data[col.name]\"\n (ngModelChange)=\"onSelectChange(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 </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",
|
|
12650
12926
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
12651
|
-
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}::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 .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-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 .hd-table-total>td{border:0!important}.hd-table-container ::ng-deep cdk-virtual-scroll-viewport.ant-table-body .hd-table-virtual-row>td{box-sizing:border-box}.hd-table-container:not(.hd-table--scroll-y):not(.hd-table--scroll-x) ::ng-deep .ant-table-body{max-height:none!important;overflow-y:visible!important}::ng-deep .ant-dropdown-menu{border-radius:0}::ng-deep .ant-dropdown{margin-top:8px!important}.common-td-wrap{white-space:normal!important;word-break:break-all}.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}"]
|
|
12927
|
+
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}::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 .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-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 .hd-table-total>td{border:0!important}.hd-table-container ::ng-deep cdk-virtual-scroll-viewport.ant-table-body .hd-table-virtual-row>td{box-sizing:border-box}.hd-table-container:not(.hd-table--scroll-y):not(.hd-table--scroll-x) ::ng-deep .ant-table-body{max-height:none!important;overflow-y:visible!important}::ng-deep .ant-dropdown-menu{border-radius:0}::ng-deep .ant-dropdown{margin-top:8px!important}.common-td-wrap{white-space:normal!important;word-break:break-all}.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-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}"]
|
|
12652
12928
|
}] }
|
|
12653
12929
|
];
|
|
12654
12930
|
/** @nocollapse */
|
|
@@ -12672,6 +12948,7 @@
|
|
|
12672
12948
|
sortEvent: [{ type: core.Output }],
|
|
12673
12949
|
selectEvent: [{ type: core.Output }],
|
|
12674
12950
|
tableSearchEvent: [{ type: core.Output }],
|
|
12951
|
+
cellChange: [{ type: core.Output }],
|
|
12675
12952
|
tableLoading: [{ type: core.Input }],
|
|
12676
12953
|
pagination: [{ type: core.Input }],
|
|
12677
12954
|
frontPagination: [{ type: core.Input }],
|
|
@@ -12755,6 +13032,11 @@
|
|
|
12755
13032
|
HdTableComponent.prototype.selectEvent;
|
|
12756
13033
|
/** @type {?} */
|
|
12757
13034
|
HdTableComponent.prototype.tableSearchEvent;
|
|
13035
|
+
/**
|
|
13036
|
+
* 行内编辑变更(已写回行对象;previous* 供接口失败回滚)
|
|
13037
|
+
* @type {?}
|
|
13038
|
+
*/
|
|
13039
|
+
HdTableComponent.prototype.cellChange;
|
|
12758
13040
|
/** @type {?} */
|
|
12759
13041
|
HdTableComponent.prototype.tableLoading;
|
|
12760
13042
|
/**
|
|
@@ -12912,6 +13194,8 @@
|
|
|
12912
13194
|
{ type: core.NgModule, args: [{
|
|
12913
13195
|
imports: [
|
|
12914
13196
|
common.CommonModule,
|
|
13197
|
+
forms.FormsModule,
|
|
13198
|
+
ngZorroAntd.NgZorroAntdModule,
|
|
12915
13199
|
table.NzTableModule,
|
|
12916
13200
|
HdSpaceModule,
|
|
12917
13201
|
HdStatusModule,
|
|
@@ -13915,6 +14199,7 @@
|
|
|
13915
14199
|
exports.HdLogService = HdLogService;
|
|
13916
14200
|
exports.HdOption = HdOption;
|
|
13917
14201
|
exports.HdOverlayCleanupService = HdOverlayCleanupService;
|
|
14202
|
+
exports.HdTableCellChange = HdTableCellChange;
|
|
13918
14203
|
exports.HdTableColumn = HdTableColumn;
|
|
13919
14204
|
exports.HdTableTotalOption = HdTableTotalOption;
|
|
13920
14205
|
exports.InputNumber = InputNumber;
|