fantasy-ngzorro 2.1.61 → 2.1.62
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 +5 -2
- package/bundles/fantasy-ngzorro.umd.js +253 -12
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +2 -2
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-detail-form/hd-detail-form.component.js +192 -9
- package/esm2015/hd-detail-lines-page/hd-detail-lines-page.component.js +11 -5
- package/esm5/hd-detail-form/hd-detail-form.component.js +244 -9
- package/esm5/hd-detail-lines-page/hd-detail-lines-page.component.js +11 -5
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +201 -12
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +253 -12
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-detail-form/hd-detail-form.component.d.ts +24 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
| — | 2026-5-20 | 补充 hd-table、hd-detail-lines-page 等组件;完善公共子类型(SelectOption、FormItem 等)文档 |
|
|
38
38
|
| — | 2026-9-18 | `hd-form-lines` 选中回显(nzHide)认 `showLabelAndValue`,与下拉 `[value]label` 一致(对齐 `hd-form`) |
|
|
39
39
|
| — | 2026-9-18 | `hd-detail-lines-page` 对齐 `hd-table` 支持虚拟滚动(`virtualScroll` / `virtualItemSize`);千行勾选时减少 DOM 卡顿 |
|
|
40
|
+
| — | 2026-9-20 | hd-detail-form 附件图片:最多展示 4 张,超出末张蒙版 `+n`;弹窗预览支持左右翻页 |
|
|
41
|
+
| — | 2026-9-20 | hd-detail-form 附件图片点击弹窗预览大图(不再 `window.open`) |
|
|
40
42
|
| — | 2026-9-20 | hd-detail-form 支持附件图片字段(`HdDetailFormFieldType.Accessory`,Figma 48×48 缩略图横排,不复用 hd-accessory-list) |
|
|
41
43
|
| — | 2026-9-17 | hd-table / hd-detail-lines / hd-detail-lines-page 支持 `selectDisabledField` / `rowInvalidField`:按行字段控制勾选禁用、失效行样式 |
|
|
42
44
|
| — | 2026-9-14 | 新增 `hd-accessory-list` 附件列表组件(分组 name + accessoryList,点击下载/查看) |
|
|
@@ -611,9 +613,10 @@ formCols: HdOption[] = [
|
|
|
611
613
|
|
|
612
614
|
附件字段 `type: HdDetailFormFieldType.Accessory`(或 `'accessory'`):
|
|
613
615
|
|
|
614
|
-
- 对齐 Figma `items/description-cell`「图片」:标签 + **48×48** 缩略图横排(间距 6px,边框 `#E5E6EB`,圆角 4px
|
|
616
|
+
- 对齐 Figma `items/description-cell`「图片」:标签 + **48×48** 缩略图横排(间距 6px,边框 `#E5E6EB`,圆角 4px);标签与首图顶对齐
|
|
615
617
|
- `value` 支持:图片地址 `string` / `string[]`,或 `{ name?, path?/url? }[]`
|
|
616
|
-
-
|
|
618
|
+
- 最多直接展示 **4** 张;超出时第 4 张蒙版显示 `+n`(n 为剩余张数)
|
|
619
|
+
- 点击缩略图弹窗预览大图(支持左右翻页),并触发 `imageClick`
|
|
617
620
|
- 无图时展示 `<空>`
|
|
618
621
|
- **不使用** `hd-accessory-list`(文件列表样式请用独立附件列表组件)
|
|
619
622
|
|
|
@@ -475,6 +475,11 @@
|
|
|
475
475
|
* @fileoverview added by tsickle
|
|
476
476
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
477
477
|
*/
|
|
478
|
+
/**
|
|
479
|
+
* 附件缩略图最多直接展示张数,超出末张蒙版 +n
|
|
480
|
+
* @type {?}
|
|
481
|
+
*/
|
|
482
|
+
var MAX_VISIBLE_IMAGES = 4;
|
|
478
483
|
var HdDetailFormComponent = /** @class */ (function () {
|
|
479
484
|
function HdDetailFormComponent() {
|
|
480
485
|
this.formCols = new Array();
|
|
@@ -487,7 +492,43 @@
|
|
|
487
492
|
*/
|
|
488
493
|
this.imageClick = new core.EventEmitter();
|
|
489
494
|
this.HdDetailFormFieldType = HdDetailFormFieldType;
|
|
495
|
+
/**
|
|
496
|
+
* 大图预览
|
|
497
|
+
*/
|
|
498
|
+
this.previewVisible = false;
|
|
499
|
+
this.previewImagePath = "";
|
|
500
|
+
this.previewTitle = "图片预览";
|
|
501
|
+
/**
|
|
502
|
+
* 当前预览所属字段的图片列表(用于翻页)
|
|
503
|
+
*/
|
|
504
|
+
this.previewImages = [];
|
|
505
|
+
this.previewIndex = 0;
|
|
506
|
+
/**
|
|
507
|
+
* 附件字段图片缓存(避免模板里反复 getImageList 导致 *ngFor 重建、点击丢失)
|
|
508
|
+
*/
|
|
509
|
+
this.imageListCache = new Map();
|
|
510
|
+
this.displayListCache = new Map();
|
|
490
511
|
}
|
|
512
|
+
Object.defineProperty(HdDetailFormComponent.prototype, "canPreviewPrev", {
|
|
513
|
+
get: /**
|
|
514
|
+
* @return {?}
|
|
515
|
+
*/
|
|
516
|
+
function () {
|
|
517
|
+
return this.previewIndex > 0;
|
|
518
|
+
},
|
|
519
|
+
enumerable: true,
|
|
520
|
+
configurable: true
|
|
521
|
+
});
|
|
522
|
+
Object.defineProperty(HdDetailFormComponent.prototype, "canPreviewNext", {
|
|
523
|
+
get: /**
|
|
524
|
+
* @return {?}
|
|
525
|
+
*/
|
|
526
|
+
function () {
|
|
527
|
+
return this.previewIndex < this.previewImages.length - 1;
|
|
528
|
+
},
|
|
529
|
+
enumerable: true,
|
|
530
|
+
configurable: true
|
|
531
|
+
});
|
|
491
532
|
/**
|
|
492
533
|
* @return {?}
|
|
493
534
|
*/
|
|
@@ -502,6 +543,7 @@
|
|
|
502
543
|
*/
|
|
503
544
|
function (item) { return !item.hide; }));
|
|
504
545
|
}
|
|
546
|
+
this.refreshImageCache();
|
|
505
547
|
};
|
|
506
548
|
/**
|
|
507
549
|
* @param {?} changes
|
|
@@ -522,6 +564,7 @@
|
|
|
522
564
|
*/
|
|
523
565
|
function (item) { return !item.hide; }));
|
|
524
566
|
}
|
|
567
|
+
this.refreshImageCache();
|
|
525
568
|
}
|
|
526
569
|
};
|
|
527
570
|
/**
|
|
@@ -534,8 +577,29 @@
|
|
|
534
577
|
*/
|
|
535
578
|
function (col) {
|
|
536
579
|
return !!(col &&
|
|
537
|
-
(col.type === HdDetailFormFieldType.Accessory ||
|
|
538
|
-
|
|
580
|
+
(col.type === HdDetailFormFieldType.Accessory || col.type === "accessory"));
|
|
581
|
+
};
|
|
582
|
+
/**
|
|
583
|
+
* @private
|
|
584
|
+
* @return {?}
|
|
585
|
+
*/
|
|
586
|
+
HdDetailFormComponent.prototype.refreshImageCache = /**
|
|
587
|
+
* @private
|
|
588
|
+
* @return {?}
|
|
589
|
+
*/
|
|
590
|
+
function () {
|
|
591
|
+
var _this = this;
|
|
592
|
+
this.imageListCache.clear();
|
|
593
|
+
this.displayListCache.clear();
|
|
594
|
+
(this.formCols || []).forEach((/**
|
|
595
|
+
* @param {?} col
|
|
596
|
+
* @return {?}
|
|
597
|
+
*/
|
|
598
|
+
function (col) {
|
|
599
|
+
if (_this.isAccessory(col)) {
|
|
600
|
+
_this.imageListCache.set(col, _this.parseImageList(col));
|
|
601
|
+
}
|
|
602
|
+
}));
|
|
539
603
|
};
|
|
540
604
|
/**
|
|
541
605
|
* 解析附件图片列表。value 支持:
|
|
@@ -546,13 +610,15 @@
|
|
|
546
610
|
* 解析附件图片列表。value 支持:
|
|
547
611
|
* - string / string[](图片地址)
|
|
548
612
|
* - { name?, path? / url? }[]
|
|
613
|
+
* @private
|
|
549
614
|
* @param {?} col
|
|
550
615
|
* @return {?}
|
|
551
616
|
*/
|
|
552
|
-
HdDetailFormComponent.prototype.
|
|
617
|
+
HdDetailFormComponent.prototype.parseImageList = /**
|
|
553
618
|
* 解析附件图片列表。value 支持:
|
|
554
619
|
* - string / string[](图片地址)
|
|
555
620
|
* - { name?, path? / url? }[]
|
|
621
|
+
* @private
|
|
556
622
|
* @param {?} col
|
|
557
623
|
* @return {?}
|
|
558
624
|
*/
|
|
@@ -590,6 +656,20 @@
|
|
|
590
656
|
}));
|
|
591
657
|
return result;
|
|
592
658
|
};
|
|
659
|
+
/**
|
|
660
|
+
* @param {?} col
|
|
661
|
+
* @return {?}
|
|
662
|
+
*/
|
|
663
|
+
HdDetailFormComponent.prototype.getImageList = /**
|
|
664
|
+
* @param {?} col
|
|
665
|
+
* @return {?}
|
|
666
|
+
*/
|
|
667
|
+
function (col) {
|
|
668
|
+
if (!this.imageListCache.has(col)) {
|
|
669
|
+
this.imageListCache.set(col, this.parseImageList(col));
|
|
670
|
+
}
|
|
671
|
+
return this.imageListCache.get(col) || [];
|
|
672
|
+
};
|
|
593
673
|
/**
|
|
594
674
|
* @param {?} col
|
|
595
675
|
* @return {?}
|
|
@@ -601,6 +681,42 @@
|
|
|
601
681
|
function (col) {
|
|
602
682
|
return this.getImageList(col).length > 0;
|
|
603
683
|
};
|
|
684
|
+
/** 实际渲染的缩略图(最多 4 张) */
|
|
685
|
+
/**
|
|
686
|
+
* 实际渲染的缩略图(最多 4 张)
|
|
687
|
+
* @param {?} col
|
|
688
|
+
* @return {?}
|
|
689
|
+
*/
|
|
690
|
+
HdDetailFormComponent.prototype.getDisplayImages = /**
|
|
691
|
+
* 实际渲染的缩略图(最多 4 张)
|
|
692
|
+
* @param {?} col
|
|
693
|
+
* @return {?}
|
|
694
|
+
*/
|
|
695
|
+
function (col) {
|
|
696
|
+
if (this.displayListCache.has(col)) {
|
|
697
|
+
return this.displayListCache.get(col);
|
|
698
|
+
}
|
|
699
|
+
/** @type {?} */
|
|
700
|
+
var display = this.getImageList(col).slice(0, MAX_VISIBLE_IMAGES);
|
|
701
|
+
this.displayListCache.set(col, display);
|
|
702
|
+
return display;
|
|
703
|
+
};
|
|
704
|
+
/** 未展示张数(末张蒙版 +n) */
|
|
705
|
+
/**
|
|
706
|
+
* 未展示张数(末张蒙版 +n)
|
|
707
|
+
* @param {?} col
|
|
708
|
+
* @return {?}
|
|
709
|
+
*/
|
|
710
|
+
HdDetailFormComponent.prototype.getMoreCount = /**
|
|
711
|
+
* 未展示张数(末张蒙版 +n)
|
|
712
|
+
* @param {?} col
|
|
713
|
+
* @return {?}
|
|
714
|
+
*/
|
|
715
|
+
function (col) {
|
|
716
|
+
/** @type {?} */
|
|
717
|
+
var total = this.getImageList(col).length;
|
|
718
|
+
return total > MAX_VISIBLE_IMAGES ? total - MAX_VISIBLE_IMAGES : 0;
|
|
719
|
+
};
|
|
604
720
|
/**
|
|
605
721
|
* @param {?} image
|
|
606
722
|
* @return {?}
|
|
@@ -613,18 +729,34 @@
|
|
|
613
729
|
return (image && (image.path || image.url)) || "";
|
|
614
730
|
};
|
|
615
731
|
/**
|
|
732
|
+
* @param {?} index
|
|
733
|
+
* @param {?} image
|
|
734
|
+
* @return {?}
|
|
735
|
+
*/
|
|
736
|
+
HdDetailFormComponent.prototype.trackByImage = /**
|
|
737
|
+
* @param {?} index
|
|
738
|
+
* @param {?} image
|
|
739
|
+
* @return {?}
|
|
740
|
+
*/
|
|
741
|
+
function (index, image) {
|
|
742
|
+
return (image && (image.path || image.url)) || String(index);
|
|
743
|
+
};
|
|
744
|
+
/**
|
|
745
|
+
* @param {?} col
|
|
616
746
|
* @param {?} image
|
|
617
747
|
* @param {?} index
|
|
618
748
|
* @param {?=} event
|
|
619
749
|
* @return {?}
|
|
620
750
|
*/
|
|
621
751
|
HdDetailFormComponent.prototype.onImageClick = /**
|
|
752
|
+
* @param {?} col
|
|
622
753
|
* @param {?} image
|
|
623
754
|
* @param {?} index
|
|
624
755
|
* @param {?=} event
|
|
625
756
|
* @return {?}
|
|
626
757
|
*/
|
|
627
|
-
function (image, index, event) {
|
|
758
|
+
function (col, image, index, event) {
|
|
759
|
+
var _this = this;
|
|
628
760
|
if (event) {
|
|
629
761
|
event.preventDefault();
|
|
630
762
|
event.stopPropagation();
|
|
@@ -632,9 +764,85 @@
|
|
|
632
764
|
/** @type {?} */
|
|
633
765
|
var path = this.getImagePath(image);
|
|
634
766
|
this.imageClick.emit({ image: image, path: path, index: index });
|
|
635
|
-
if (path) {
|
|
636
|
-
|
|
767
|
+
if (!path) {
|
|
768
|
+
return;
|
|
637
769
|
}
|
|
770
|
+
this.previewImages = this.getImageList(col).slice();
|
|
771
|
+
this.previewIndex = index >= 0 ? index : 0;
|
|
772
|
+
this.applyPreviewImage();
|
|
773
|
+
setTimeout((/**
|
|
774
|
+
* @return {?}
|
|
775
|
+
*/
|
|
776
|
+
function () {
|
|
777
|
+
_this.previewVisible = true;
|
|
778
|
+
}));
|
|
779
|
+
};
|
|
780
|
+
/**
|
|
781
|
+
* @param {?=} event
|
|
782
|
+
* @return {?}
|
|
783
|
+
*/
|
|
784
|
+
HdDetailFormComponent.prototype.previewPrev = /**
|
|
785
|
+
* @param {?=} event
|
|
786
|
+
* @return {?}
|
|
787
|
+
*/
|
|
788
|
+
function (event) {
|
|
789
|
+
if (event) {
|
|
790
|
+
event.preventDefault();
|
|
791
|
+
event.stopPropagation();
|
|
792
|
+
}
|
|
793
|
+
if (!this.canPreviewPrev) {
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
796
|
+
this.previewIndex -= 1;
|
|
797
|
+
this.applyPreviewImage();
|
|
798
|
+
};
|
|
799
|
+
/**
|
|
800
|
+
* @param {?=} event
|
|
801
|
+
* @return {?}
|
|
802
|
+
*/
|
|
803
|
+
HdDetailFormComponent.prototype.previewNext = /**
|
|
804
|
+
* @param {?=} event
|
|
805
|
+
* @return {?}
|
|
806
|
+
*/
|
|
807
|
+
function (event) {
|
|
808
|
+
if (event) {
|
|
809
|
+
event.preventDefault();
|
|
810
|
+
event.stopPropagation();
|
|
811
|
+
}
|
|
812
|
+
if (!this.canPreviewNext) {
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
this.previewIndex += 1;
|
|
816
|
+
this.applyPreviewImage();
|
|
817
|
+
};
|
|
818
|
+
/**
|
|
819
|
+
* @private
|
|
820
|
+
* @return {?}
|
|
821
|
+
*/
|
|
822
|
+
HdDetailFormComponent.prototype.applyPreviewImage = /**
|
|
823
|
+
* @private
|
|
824
|
+
* @return {?}
|
|
825
|
+
*/
|
|
826
|
+
function () {
|
|
827
|
+
/** @type {?} */
|
|
828
|
+
var image = this.previewImages[this.previewIndex];
|
|
829
|
+
/** @type {?} */
|
|
830
|
+
var path = this.getImagePath(image);
|
|
831
|
+
this.previewImagePath = path;
|
|
832
|
+
this.previewTitle =
|
|
833
|
+
(image && image.name) || "图片" + (this.previewIndex + 1);
|
|
834
|
+
};
|
|
835
|
+
/**
|
|
836
|
+
* @return {?}
|
|
837
|
+
*/
|
|
838
|
+
HdDetailFormComponent.prototype.closePreview = /**
|
|
839
|
+
* @return {?}
|
|
840
|
+
*/
|
|
841
|
+
function () {
|
|
842
|
+
this.previewVisible = false;
|
|
843
|
+
this.previewImages = [];
|
|
844
|
+
this.previewIndex = 0;
|
|
845
|
+
this.previewImagePath = "";
|
|
638
846
|
};
|
|
639
847
|
/** HdOption.width:默认 1,最大 4 */
|
|
640
848
|
/**
|
|
@@ -671,8 +879,8 @@
|
|
|
671
879
|
HdDetailFormComponent.decorators = [
|
|
672
880
|
{ type: core.Component, args: [{
|
|
673
881
|
selector: "hd-detail-form",
|
|
674
|
-
template: "<nz-content class=\"hd-detail-form-container\">\n <nz-descriptions [nzColumn]=\"nzColumn\">\n <ng-container *ngFor=\"let col of formCols\">\n <!-- \u9644\u4EF6\u56FE\u7247\uFF1A\
|
|
675
|
-
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}::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}.hd-detail-form-container{font-size:14px}.hd-detail-form-container ::ng-deep td.ant-descriptions-item{vertical-align:top;padding-top:6px!important;padding-bottom:6px!important;padding-left:0!important;font-size:14px}.hd-detail-form-container ::ng-deep .ant-descriptions-item>span{vertical-align:top}.hd-detail-form-container ::ng-deep .ant-descriptions-item-label{color:#4b504e;font-size:14px;line-height:22px;padding-top:1px;vertical-align:top}.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;vertical-align:top;line-height:22px}.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 .hd-detail-form-images{display:flex;flex-wrap:
|
|
882
|
+
template: "<nz-content class=\"hd-detail-form-container\">\n <nz-descriptions [nzColumn]=\"nzColumn\">\n <ng-container *ngFor=\"let col of formCols\">\n <!-- \u9644\u4EF6\u56FE\u7247\uFF1A\u6700\u591A\u5C55\u793A 4 \u5F20\uFF0C\u8D85\u51FA\u672B\u5F20\u8499\u7248 +n -->\n <nz-descriptions-item *ngIf=\"isAccessory(col)\" [nzTitle]=\"col.label\" [nzSpan]=\"getColSpan(col)\">\n <div class=\"hd-detail-form-images\" *ngIf=\"hasImages(col)\">\n <div class=\"hd-detail-form-image-item\"\n *ngFor=\"let image of getDisplayImages(col); let i = index; trackBy: trackByImage\"\n (click)=\"onImageClick(col, image, i, $event)\">\n <img class=\"hd-detail-form-image\"\n [src]=\"getImagePath(image)\"\n [alt]=\"image.name || ('\u56FE\u7247' + (i + 1))\"\n [attr.title]=\"image.name || ('\u56FE\u7247' + (i + 1))\" />\n <span class=\"hd-detail-form-image-mask\"\n *ngIf=\"getMoreCount(col) > 0 && i === getDisplayImages(col).length - 1\">\n +{{ getMoreCount(col) }}\n </span>\n </div>\n </div>\n <span *ngIf=\"!hasImages(col)\"><\u7A7A></span>\n </nz-descriptions-item>\n <!-- \u666E\u901A\u6587\u672C -->\n <nz-descriptions-item *ngIf=\"!isAccessory(col) && !col.click\" [nzTitle]=\"col.label\" [nzSpan]=\"getColSpan(col)\">\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\">{{(col.value === '0' || col.value === 0 || col.value\n )? col.value : '<\u7A7A>'}}</span>\n </nz-descriptions-item>\n <!-- \u53EF\u70B9\u51FB -->\n <nz-descriptions-item *ngIf=\"!isAccessory(col) && col.click\" [nzTitle]=\"col.label\" [nzSpan]=\"getColSpan(col)\">\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\" *ngIf=\"col.clickText\">\n {{(col.value === '0' || col.value === 0 || col.value\n )? col.value : '<\u7A7A>'}}\n <a (click)=\"triggerEvent(col.click || null)\"> {{ col.clickText }}</a>\n <a *ngIf=\"col.clickText1\" (click)=\"triggerEvent(col.click1 || null)\"> {{ col.clickText1\n }}</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 : '<\u7A7A>'}}</a>\n <a *ngIf=\"col.clickText1\" (click)=\"triggerEvent(col.click1 || null)\"> {{ col.clickText1\n }}</a>\n </span>\n </nz-descriptions-item>\n </ng-container>\n </nz-descriptions>\n</nz-content>\n\n<nz-modal [(nzVisible)]=\"previewVisible\" [nzTitle]=\"previewTitle\" [nzFooter]=\"null\" [nzWidth]=\"960\"\n [nzContent]=\"previewModalContent\" (nzOnCancel)=\"closePreview()\">\n</nz-modal>\n<ng-template #previewModalContent>\n <div class=\"hd-detail-form-preview\">\n <button type=\"button\" class=\"hd-detail-form-preview-nav hd-detail-form-preview-nav--prev\"\n *ngIf=\"previewImages.length > 1\" [disabled]=\"!canPreviewPrev\" (click)=\"previewPrev($event)\"\n title=\"\u4E0A\u4E00\u5F20\">\n <i nz-icon nzType=\"left\" nzTheme=\"outline\"></i>\n </button>\n <div class=\"hd-detail-form-preview-body\">\n <img *ngIf=\"previewImagePath\" [src]=\"previewImagePath\" [alt]=\"previewTitle\" />\n <div class=\"hd-detail-form-preview-index\" *ngIf=\"previewImages.length > 1\">\n {{ previewIndex + 1 }} / {{ previewImages.length }}\n </div>\n </div>\n <button type=\"button\" class=\"hd-detail-form-preview-nav hd-detail-form-preview-nav--next\"\n *ngIf=\"previewImages.length > 1\" [disabled]=\"!canPreviewNext\" (click)=\"previewNext($event)\"\n title=\"\u4E0B\u4E00\u5F20\">\n <i nz-icon nzType=\"right\" nzTheme=\"outline\"></i>\n </button>\n </div>\n</ng-template>\n",
|
|
883
|
+
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}::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}.hd-detail-form-container{font-size:14px}.hd-detail-form-container ::ng-deep td.ant-descriptions-item{vertical-align:top;padding-top:6px!important;padding-bottom:6px!important;padding-left:0!important;font-size:14px}.hd-detail-form-container ::ng-deep .ant-descriptions-item>span{vertical-align:top}.hd-detail-form-container ::ng-deep .ant-descriptions-item-label{color:#4b504e;font-size:14px;line-height:22px;padding-top:1px;vertical-align:top}.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;vertical-align:top;line-height:22px}.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 .hd-detail-form-images{display:flex;flex-wrap:nowrap;align-items:flex-start;gap:6px}.hd-detail-form-container .hd-detail-form-image-item{position:relative;flex-shrink:0;box-sizing:border-box;width:48px;height:48px;overflow:hidden;border:1px solid #e5e6eb;border-radius:4px;cursor:pointer}.hd-detail-form-container .hd-detail-form-image-item:hover{border-color:#20b95d}.hd-detail-form-container .hd-detail-form-image{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.hd-detail-form-container .hd-detail-form-image-mask{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.45);color:#fff;font-size:14px;line-height:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.hd-detail-form-preview{position:relative;display:flex;align-items:center;justify-content:center;min-height:200px;max-height:70vh}.hd-detail-form-preview .hd-detail-form-preview-body{flex:1;min-width:0;text-align:center;max-height:70vh;overflow:auto}.hd-detail-form-preview img{display:inline-block;max-width:100%;max-height:calc(70vh - 32px);-o-object-fit:contain;object-fit:contain}.hd-detail-form-preview .hd-detail-form-preview-index{margin-top:8px;color:#4b504e;font-size:14px;line-height:22px}.hd-detail-form-preview .hd-detail-form-preview-nav{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;margin:0 8px;padding:0;border:1px solid #e5e6eb;border-radius:50%;background:#fff;color:rgba(0,0,0,.85);cursor:pointer;outline:0}.hd-detail-form-preview .hd-detail-form-preview-nav i{font-size:16px}.hd-detail-form-preview .hd-detail-form-preview-nav:hover:not(:disabled){border-color:#20b95d;color:#20b95d}.hd-detail-form-preview .hd-detail-form-preview-nav:disabled{color:#c9cdd4;cursor:not-allowed;background:#f7f8fa}"]
|
|
676
884
|
}] }
|
|
677
885
|
];
|
|
678
886
|
/** @nocollapse */
|
|
@@ -699,6 +907,33 @@
|
|
|
699
907
|
HdDetailFormComponent.prototype.imageClick;
|
|
700
908
|
/** @type {?} */
|
|
701
909
|
HdDetailFormComponent.prototype.HdDetailFormFieldType;
|
|
910
|
+
/**
|
|
911
|
+
* 大图预览
|
|
912
|
+
* @type {?}
|
|
913
|
+
*/
|
|
914
|
+
HdDetailFormComponent.prototype.previewVisible;
|
|
915
|
+
/** @type {?} */
|
|
916
|
+
HdDetailFormComponent.prototype.previewImagePath;
|
|
917
|
+
/** @type {?} */
|
|
918
|
+
HdDetailFormComponent.prototype.previewTitle;
|
|
919
|
+
/**
|
|
920
|
+
* 当前预览所属字段的图片列表(用于翻页)
|
|
921
|
+
* @type {?}
|
|
922
|
+
*/
|
|
923
|
+
HdDetailFormComponent.prototype.previewImages;
|
|
924
|
+
/** @type {?} */
|
|
925
|
+
HdDetailFormComponent.prototype.previewIndex;
|
|
926
|
+
/**
|
|
927
|
+
* 附件字段图片缓存(避免模板里反复 getImageList 导致 *ngFor 重建、点击丢失)
|
|
928
|
+
* @type {?}
|
|
929
|
+
* @private
|
|
930
|
+
*/
|
|
931
|
+
HdDetailFormComponent.prototype.imageListCache;
|
|
932
|
+
/**
|
|
933
|
+
* @type {?}
|
|
934
|
+
* @private
|
|
935
|
+
*/
|
|
936
|
+
HdDetailFormComponent.prototype.displayListCache;
|
|
702
937
|
}
|
|
703
938
|
|
|
704
939
|
/**
|
|
@@ -2150,19 +2385,25 @@
|
|
|
2150
2385
|
this.virtualScrollActive !== useVirtual;
|
|
2151
2386
|
this.virtualScrollActive = useVirtual;
|
|
2152
2387
|
if (forceRemount || modeChanged) {
|
|
2153
|
-
|
|
2154
|
-
this.cdr.markForCheck();
|
|
2388
|
+
// 延后销毁/重建,避免当前 CD 周期内 ngIf 变更触发 ExpressionChanged
|
|
2155
2389
|
setTimeout((/**
|
|
2156
2390
|
* @return {?}
|
|
2157
2391
|
*/
|
|
2158
2392
|
function () {
|
|
2159
|
-
_this.showTable =
|
|
2393
|
+
_this.showTable = false;
|
|
2160
2394
|
_this.cdr.markForCheck();
|
|
2161
2395
|
setTimeout((/**
|
|
2162
2396
|
* @return {?}
|
|
2163
2397
|
*/
|
|
2164
2398
|
function () {
|
|
2165
|
-
_this.
|
|
2399
|
+
_this.showTable = true;
|
|
2400
|
+
_this.cdr.markForCheck();
|
|
2401
|
+
setTimeout((/**
|
|
2402
|
+
* @return {?}
|
|
2403
|
+
*/
|
|
2404
|
+
function () {
|
|
2405
|
+
_this.afterTableRender(useVirtual);
|
|
2406
|
+
}));
|
|
2166
2407
|
}));
|
|
2167
2408
|
}));
|
|
2168
2409
|
return;
|