@ebuilding/abc 2.0.0
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/LICENSE +0 -0
- package/README.md +0 -0
- package/button/index.d.ts +1 -0
- package/button/src/default/index.d.ts +15 -0
- package/button/src/index.module.d.ts +9 -0
- package/button/src/inner/index.d.ts +10 -0
- package/button/src/main/index.d.ts +16 -0
- package/button/src/public_api.d.ts +4 -0
- package/card/index.d.ts +1 -0
- package/card/src/card.service.d.ts +19 -0
- package/card/src/column-default/index.d.ts +22 -0
- package/card/src/column-img/index.d.ts +22 -0
- package/card/src/column-img1/index.d.ts +13 -0
- package/card/src/column-img2/index.d.ts +13 -0
- package/card/src/column-img3/index.d.ts +13 -0
- package/card/src/default/index.d.ts +45 -0
- package/card/src/design/index.d.ts +10 -0
- package/card/src/design-text/index.d.ts +10 -0
- package/card/src/index.module.d.ts +11 -0
- package/card/src/item-group/index.d.ts +16 -0
- package/card/src/item-text/index.d.ts +15 -0
- package/card/src/item.service.d.ts +20 -0
- package/card/src/public_api.d.ts +6 -0
- package/card-assess/index.d.ts +1 -0
- package/card-assess/src/default/index.d.ts +19 -0
- package/card-assess/src/index.module.d.ts +7 -0
- package/card-assess/src/public_api.d.ts +2 -0
- package/card-emp/index.d.ts +1 -0
- package/card-emp/src/default/index.d.ts +10 -0
- package/card-emp/src/emp-okr/index.d.ts +12 -0
- package/card-emp/src/index.module.d.ts +8 -0
- package/card-emp/src/public_api.d.ts +3 -0
- package/card-list/index.d.ts +1 -0
- package/card-list/src/default/index.d.ts +14 -0
- package/card-list/src/index.module.d.ts +7 -0
- package/card-list/src/public_api.d.ts +2 -0
- package/card-okr/index.d.ts +1 -0
- package/card-okr/src/default/index.d.ts +22 -0
- package/card-okr/src/index.module.d.ts +17 -0
- package/card-okr/src/kpi-stats1/index.d.ts +15 -0
- package/card-okr/src/kpi-stats2/index.d.ts +14 -0
- package/card-okr/src/kpi-stats3/index.d.ts +16 -0
- package/card-okr/src/objective/index.d.ts +14 -0
- package/card-okr/src/objective-dl/index.d.ts +16 -0
- package/card-okr/src/objective-dx/index.d.ts +16 -0
- package/card-okr/src/public_api.d.ts +11 -0
- package/card-okr/src/stats-default/index.d.ts +14 -0
- package/card-okr/src/stats-objective/index.d.ts +14 -0
- package/card-okr/src/stats-progress/index.d.ts +12 -0
- package/card-plan-kpi/index.d.ts +1 -0
- package/card-plan-kpi/src/default/index.d.ts +22 -0
- package/card-plan-kpi/src/index.module.d.ts +7 -0
- package/card-plan-kpi/src/public_api.d.ts +2 -0
- package/card-result/index.d.ts +1 -0
- package/card-result/src/default/index.d.ts +45 -0
- package/card-result/src/index.module.d.ts +8 -0
- package/card-result/src/public_api.d.ts +2 -0
- package/card-score/index.d.ts +1 -0
- package/card-score/src/default/index.d.ts +9 -0
- package/card-score/src/index.module.d.ts +8 -0
- package/card-score/src/public_api.d.ts +2 -0
- package/card-user/index.d.ts +1 -0
- package/card-user/src/default/index.d.ts +11 -0
- package/card-user/src/index.module.d.ts +7 -0
- package/card-user/src/public_api.d.ts +2 -0
- package/card2/index.d.ts +1 -0
- package/card2/src/default/index.d.ts +90 -0
- package/card2/src/index.module.d.ts +7 -0
- package/card2/src/public_api.d.ts +2 -0
- package/codemirror/index.d.ts +1 -0
- package/codemirror/src/default/index.d.ts +10 -0
- package/codemirror/src/index.module.d.ts +7 -0
- package/codemirror/src/public_api.d.ts +5 -0
- package/collect/index.d.ts +1 -0
- package/collect/src/default/index.d.ts +11 -0
- package/collect/src/index.module.d.ts +7 -0
- package/collect/src/public_api.d.ts +2 -0
- package/developing/index.d.ts +1 -0
- package/developing/src/default/index.d.ts +8 -0
- package/developing/src/index.module.d.ts +10 -0
- package/developing/src/public_api.d.ts +2 -0
- package/empty/index.d.ts +1 -0
- package/empty/src/default/index.d.ts +13 -0
- package/empty/src/index.module.d.ts +7 -0
- package/empty/src/public_api.d.ts +2 -0
- package/fesm2022/codemirror.mjs +806 -0
- package/fesm2022/codemirror.mjs.map +1 -0
- package/fesm2022/components.button.mjs +121 -0
- package/fesm2022/components.button.mjs.map +1 -0
- package/fesm2022/components.card-assess.mjs +68 -0
- package/fesm2022/components.card-assess.mjs.map +1 -0
- package/fesm2022/components.card-emp.mjs +65 -0
- package/fesm2022/components.card-emp.mjs.map +1 -0
- package/fesm2022/components.card-list.mjs +53 -0
- package/fesm2022/components.card-list.mjs.map +1 -0
- package/fesm2022/components.card-okr.mjs +370 -0
- package/fesm2022/components.card-okr.mjs.map +1 -0
- package/fesm2022/components.card-plan-kpi.mjs +68 -0
- package/fesm2022/components.card-plan-kpi.mjs.map +1 -0
- package/fesm2022/components.card-result.mjs +137 -0
- package/fesm2022/components.card-result.mjs.map +1 -0
- package/fesm2022/components.card-score.mjs +47 -0
- package/fesm2022/components.card-score.mjs.map +1 -0
- package/fesm2022/components.card-user.mjs +56 -0
- package/fesm2022/components.card-user.mjs.map +1 -0
- package/fesm2022/components.card.mjs +670 -0
- package/fesm2022/components.card.mjs.map +1 -0
- package/fesm2022/components.card2.mjs +463 -0
- package/fesm2022/components.card2.mjs.map +1 -0
- package/fesm2022/components.collect.mjs +57 -0
- package/fesm2022/components.collect.mjs.map +1 -0
- package/fesm2022/components.developing.mjs +38 -0
- package/fesm2022/components.developing.mjs.map +1 -0
- package/fesm2022/components.empty.mjs +54 -0
- package/fesm2022/components.empty.mjs.map +1 -0
- package/fesm2022/components.flow-button.mjs +89 -0
- package/fesm2022/components.flow-button.mjs.map +1 -0
- package/fesm2022/components.header-user.mjs +261 -0
- package/fesm2022/components.header-user.mjs.map +1 -0
- package/fesm2022/components.header.mjs +81 -0
- package/fesm2022/components.header.mjs.map +1 -0
- package/fesm2022/components.line.mjs +44 -0
- package/fesm2022/components.line.mjs.map +1 -0
- package/fesm2022/components.no-role.mjs +37 -0
- package/fesm2022/components.no-role.mjs.map +1 -0
- package/fesm2022/components.nz-table-tree.mjs +407 -0
- package/fesm2022/components.nz-table-tree.mjs.map +1 -0
- package/fesm2022/components.nz-table.mjs +463 -0
- package/fesm2022/components.nz-table.mjs.map +1 -0
- package/fesm2022/components.plan-item.mjs +249 -0
- package/fesm2022/components.plan-item.mjs.map +1 -0
- package/fesm2022/components.principal.mjs +59 -0
- package/fesm2022/components.principal.mjs.map +1 -0
- package/fesm2022/components.python.mjs +140 -0
- package/fesm2022/components.python.mjs.map +1 -0
- package/fesm2022/components.quick.mjs +158 -0
- package/fesm2022/components.quick.mjs.map +1 -0
- package/fesm2022/components.record.mjs +106 -0
- package/fesm2022/components.record.mjs.map +1 -0
- package/fesm2022/components.step-entry.mjs +50 -0
- package/fesm2022/components.step-entry.mjs.map +1 -0
- package/fesm2022/components.target-value.mjs +83 -0
- package/fesm2022/components.target-value.mjs.map +1 -0
- package/fesm2022/components.text.mjs +444 -0
- package/fesm2022/components.text.mjs.map +1 -0
- package/fesm2022/components.tree.mjs +203 -0
- package/fesm2022/components.tree.mjs.map +1 -0
- package/fesm2022/ebuilding-abc.mjs +121 -0
- package/fesm2022/ebuilding-abc.mjs.map +1 -0
- package/flow-button/index.d.ts +1 -0
- package/flow-button/src/default/index.d.ts +14 -0
- package/flow-button/src/index.module.d.ts +7 -0
- package/flow-button/src/public_api.d.ts +2 -0
- package/header/index.d.ts +1 -0
- package/header/src/default/index.d.ts +16 -0
- package/header/src/index.module.d.ts +10 -0
- package/header/src/public_api.d.ts +2 -0
- package/header-user/index.d.ts +1 -0
- package/header-user/src/default/index.d.ts +57 -0
- package/header-user/src/index.module.d.ts +7 -0
- package/header-user/src/public_api.d.ts +2 -0
- package/index.d.ts +1 -0
- package/line/index.d.ts +1 -0
- package/line/src/default/index.d.ts +9 -0
- package/line/src/index.module.d.ts +10 -0
- package/line/src/public_api.d.ts +2 -0
- package/no-role/index.d.ts +1 -0
- package/no-role/src/default/index.d.ts +9 -0
- package/no-role/src/index.module.d.ts +8 -0
- package/no-role/src/public_api.d.ts +2 -0
- package/nz-table/index.d.ts +1 -0
- package/nz-table/src/default/index.d.ts +90 -0
- package/nz-table/src/index.module.d.ts +7 -0
- package/nz-table/src/public_api.d.ts +2 -0
- package/nz-table-tree/index.d.ts +1 -0
- package/nz-table-tree/src/default/index.d.ts +98 -0
- package/nz-table-tree/src/index.module.d.ts +8 -0
- package/nz-table-tree/src/operation/index.d.ts +12 -0
- package/nz-table-tree/src/public_api.d.ts +2 -0
- package/package.json +144 -0
- package/plan-item/index.d.ts +1 -0
- package/plan-item/src/default/index.d.ts +45 -0
- package/plan-item/src/index.module.d.ts +7 -0
- package/plan-item/src/public_api.d.ts +2 -0
- package/principal/index.d.ts +1 -0
- package/principal/src/default/index.d.ts +15 -0
- package/principal/src/index.module.d.ts +7 -0
- package/principal/src/public_api.d.ts +2 -0
- package/python/index.d.ts +1 -0
- package/python/src/default/index.d.ts +8 -0
- package/python/src/index.module.d.ts +8 -0
- package/python/src/public_api.d.ts +2 -0
- package/quick/index.d.ts +1 -0
- package/quick/src/datetime/index.d.ts +12 -0
- package/quick/src/default/index.d.ts +14 -0
- package/quick/src/index.module.d.ts +10 -0
- package/quick/src/public_api.d.ts +2 -0
- package/record/index.d.ts +1 -0
- package/record/src/default/index.d.ts +12 -0
- package/record/src/index.module.d.ts +8 -0
- package/record/src/main/index.d.ts +12 -0
- package/record/src/public_api.d.ts +3 -0
- package/step-entry/index.d.ts +1 -0
- package/step-entry/src/default/index.d.ts +12 -0
- package/step-entry/src/index.module.d.ts +9 -0
- package/step-entry/src/public_api.d.ts +2 -0
- package/target-value/index.d.ts +1 -0
- package/target-value/src/default/index.d.ts +17 -0
- package/target-value/src/index.module.d.ts +8 -0
- package/target-value/src/public_api.d.ts +2 -0
- package/text/index.d.ts +1 -0
- package/text/src/default/index.d.ts +25 -0
- package/text/src/index.module.d.ts +9 -0
- package/text/src/public_api.d.ts +2 -0
- package/text/src/text.service.d.ts +57 -0
- package/tree/index.d.ts +1 -0
- package/tree/src/default/index.d.ts +39 -0
- package/tree/src/index.module.d.ts +9 -0
- package/tree/src/public_api.d.ts +2 -0
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Output, Input, Directive, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i3 from '@angular/forms';
|
|
6
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i3$2 from '@ebuilding/base/components/empty';
|
|
8
|
+
import { GramDeonEmptyModule } from '@ebuilding/base/components/empty';
|
|
9
|
+
import * as i4$1 from 'ng-zorro-antd/checkbox';
|
|
10
|
+
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
11
|
+
import * as i6$1 from 'ng-zorro-antd/dropdown';
|
|
12
|
+
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
|
|
13
|
+
import * as i7 from 'ng-zorro-antd/icon';
|
|
14
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
15
|
+
import * as i3$1 from '@delon/acl';
|
|
16
|
+
import { DelonACLModule } from '@delon/acl';
|
|
17
|
+
import * as i8 from '@ebuilding/abc/button';
|
|
18
|
+
import { GramDeonButtonModule } from '@ebuilding/abc/button';
|
|
19
|
+
import * as i4 from 'ng-zorro-antd/rate';
|
|
20
|
+
import { NzRateModule } from 'ng-zorro-antd/rate';
|
|
21
|
+
import * as i5 from 'ng-zorro-antd/avatar';
|
|
22
|
+
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
|
23
|
+
import * as i6 from '@ebuilding/abc/text';
|
|
24
|
+
import { GramDeonTextModule } from '@ebuilding/abc/text';
|
|
25
|
+
import _ from 'lodash';
|
|
26
|
+
import * as i5$1 from 'ng-zorro-antd/menu';
|
|
27
|
+
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
28
|
+
import * as i8$1 from 'ng-zorro-antd/core/transition-patch';
|
|
29
|
+
|
|
30
|
+
class ItemService {
|
|
31
|
+
_config = null;
|
|
32
|
+
set config(value) {
|
|
33
|
+
this._config = value;
|
|
34
|
+
this.getPageData();
|
|
35
|
+
}
|
|
36
|
+
get config() {
|
|
37
|
+
return this._config;
|
|
38
|
+
}
|
|
39
|
+
textClickEvent = new EventEmitter();
|
|
40
|
+
type = null;
|
|
41
|
+
fontSize = null;
|
|
42
|
+
fontColor = null;
|
|
43
|
+
fontWeight = null;
|
|
44
|
+
text = null;
|
|
45
|
+
itemInfo = null;
|
|
46
|
+
headerInfo = null;
|
|
47
|
+
constructor() {
|
|
48
|
+
}
|
|
49
|
+
getPageData() {
|
|
50
|
+
this.fontSize = null;
|
|
51
|
+
this.fontColor = null;
|
|
52
|
+
this.fontWeight = null;
|
|
53
|
+
this.itemInfo = _.get(this.config, "item");
|
|
54
|
+
this.type = _.get(this.config, "column.type");
|
|
55
|
+
this.headerInfo = _.get(this.config, "column.fieldInfo");
|
|
56
|
+
if (this.type && this.headerInfo && this.itemInfo) {
|
|
57
|
+
let styles = JSON.parse(this.headerInfo.styles);
|
|
58
|
+
if (styles) {
|
|
59
|
+
if (styles["color"]) {
|
|
60
|
+
this.fontColor = styles["color"];
|
|
61
|
+
}
|
|
62
|
+
if (styles["font-size"]) {
|
|
63
|
+
this.fontSize = styles["font-size"];
|
|
64
|
+
}
|
|
65
|
+
if (styles["font-weight"]) {
|
|
66
|
+
this.fontWeight = styles["font-weight"];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
this.getDataText();
|
|
71
|
+
}
|
|
72
|
+
getDataText() {
|
|
73
|
+
if (this.headerInfo && this.itemInfo) {
|
|
74
|
+
let value = this.itemInfo[this.headerInfo.key];
|
|
75
|
+
this.text = value;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ItemService, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
79
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: ItemService, isStandalone: true, inputs: { config: "config" }, outputs: { textClickEvent: "textClickEvent" }, ngImport: i0 });
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ItemService, decorators: [{
|
|
82
|
+
type: Directive
|
|
83
|
+
}], ctorParameters: () => [], propDecorators: { config: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}], textClickEvent: [{
|
|
86
|
+
type: Output
|
|
87
|
+
}] } });
|
|
88
|
+
|
|
89
|
+
class CardService {
|
|
90
|
+
loading = true;
|
|
91
|
+
pageConfig = null;
|
|
92
|
+
/**
|
|
93
|
+
* 卡片模版
|
|
94
|
+
*/
|
|
95
|
+
template = [];
|
|
96
|
+
/**
|
|
97
|
+
* 卡片字段设置
|
|
98
|
+
*/
|
|
99
|
+
header = [];
|
|
100
|
+
cardConfig = null;
|
|
101
|
+
imgFieldKey = null;
|
|
102
|
+
templateImg = null;
|
|
103
|
+
templateTextArr = [];
|
|
104
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CardService, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
105
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: CardService, isStandalone: true, ngImport: i0 });
|
|
106
|
+
}
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CardService, decorators: [{
|
|
108
|
+
type: Directive
|
|
109
|
+
}] });
|
|
110
|
+
|
|
111
|
+
class ItemTextComponent extends ItemService {
|
|
112
|
+
cardSrv;
|
|
113
|
+
value = 3;
|
|
114
|
+
constructor(cardSrv) {
|
|
115
|
+
super();
|
|
116
|
+
this.cardSrv = cardSrv;
|
|
117
|
+
}
|
|
118
|
+
ngOnInit() { }
|
|
119
|
+
ngAfterViewInit() { }
|
|
120
|
+
ngOnChanges(change) { }
|
|
121
|
+
textClick(item, event) {
|
|
122
|
+
event.stopPropagation();
|
|
123
|
+
if (this.headerInfo.fieldClick) {
|
|
124
|
+
let eventData = {
|
|
125
|
+
key: this.headerInfo.key,
|
|
126
|
+
dataId: item[this.cardSrv.pageConfig?.primary?.key],
|
|
127
|
+
dataItem: item,
|
|
128
|
+
};
|
|
129
|
+
this.textClickEvent.emit(eventData);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ItemTextComponent, deps: [{ token: CardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
133
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ItemTextComponent, isStandalone: true, selector: "item-text", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"headerInfo!! && text!=null && headerInfo.hide!=true\">\n <ng-container [ngSwitch]=\"headerInfo.layoutType\">\n <ng-container *ngSwitchCase=\"'photo'\">\n <div class=\"card-photo\">\n <nz-avatar nzSize=\"large\" nzIcon=\"user\" [nzSrc]=\"text\"></nz-avatar>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'rate'\">\n <div class=\"card-rate\">\n <ng-container *ngIf=\"headerInfo.izFieldDesc==true\">\n <label class=\"title\"> {{headerInfo.label}} </label>\n </ng-container>\n\n <div class=\"text-info\">\n <nz-rate [(ngModel)]=\"value\" nzDisabled></nz-rate>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'status'\">\n <div class=\"card-status\">\n <ng-container [ngSwitch]=\"headerInfo.stylesName\">\n <ng-container *ngSwitchCase=\"'hideFlag'\">\n <div [ngClass]=\"[headerInfo?.stylesName,headerInfo?.stylesName+'_'+text]\">\n <!-- <label [ngStyle]=\"{'color':fontColor,'font-size':fontSize,'font-weight':fontWeight}\"> -->\n {{headerInfo.label}}\n <!-- </label> -->\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div [ngClass]=\"headerInfo?.stylesName+'_'+text\">\n <ng-container *ngIf=\"headerInfo.izFieldDesc==true\">\n <label class=\"title\"> {{headerInfo.label}} </label>\n </ng-container>\n\n <div class=\"text-info\">\n <gram-text [data]=\"{item:itemInfo,header:headerInfo,config:cardSrv.pageConfig}\"\n (click)=\"textClick(itemInfo,$event)\"></gram-text>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <!-- <div class=\"card-text\" [ngStyle]=\"{'color':fontColor,'font-size':fontSize,'font-weight':fontWeight}\"> -->\n <div class=\"card-text\">\n <ng-container *ngIf=\"headerInfo.izFieldDesc==true\">\n <label class=\"title\"> {{headerInfo.label}} </label>\n </ng-container>\n <div class=\"text-info\">\n <gram-text [data]=\"{item:itemInfo,header:headerInfo,config:cardSrv.pageConfig}\"\n (click)=\"textClick(itemInfo,$event)\"></gram-text>\n </div>\n <label class=\"unit\" *ngIf=\"headerInfo.unit!!\">({{headerInfo.unit}})</label>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>", styles: [":host ::ng-deep gram-text a div{color:#1177fb!important}:host ::ng-deep .card-text{display:flex;align-items:center;padding:0 20px 0 0}:host ::ng-deep .card-text .title{min-width:30px}:host ::ng-deep .card-text .unit{padding:0 0 0 3px}:host ::ng-deep .card-text .title:after{padding:0 5px 0 2px;content:\":\"}:host ::ng-deep .card-photo{display:inline-block;padding:0 20px 0 0}:host ::ng-deep .card-rate{display:flex;flex-direction:row}:host ::ng-deep .card-rate .title:after{padding:0 5px 0 2px;content:\":\"}:host ::ng-deep .card-rate .ant-rate{font-size:16px;line-height:0}:host ::ng-deep .card-status{padding:0 20px 0 0}:host ::ng-deep .card-status .title{color:initial}:host ::ng-deep .card-status .title:after{padding:0 6px 0 2px;content:\":\"}:host ::ng-deep .card-status .hideFlag{display:none}:host ::ng-deep .card-status .hideFlag_1{display:inline-block}:host ::ng-deep .card-status .disFlag_0{padding:2px 15px;color:#fff;font-size:12px;background:#01c320;border-radius:12px}:host ::ng-deep .card-status .disFlag_0 div{color:#fff!important}:host ::ng-deep .card-status .disFlag_1{padding:2px 15px;color:#fff;font-size:12px;background:#ff4f40;border-radius:12px}:host ::ng-deep .card-status .disFlag_1 div{color:#fff!important}:host ::ng-deep .card-status .yesNo_0{display:flex;color:#bdbdbd}:host ::ng-deep .card-status .yesNo_1{display:flex;color:#4f85ff}:host ::ng-deep .card-status .status_DRAFT{padding:2px 15px;font-size:12px;background-color:#8c8c8c;border-radius:6px}:host ::ng-deep .card-status .status_DRAFT div{color:#fff!important}:host ::ng-deep .card-status .status_WAITING{padding:2px 15px;font-size:12px;background-color:#4f85ff;border-radius:6px}:host ::ng-deep .card-status .status_WAITING div{color:#fff!important}:host ::ng-deep .card-status .status_RUNNING{padding:2px 15px;font-size:12px;background-color:#4f85ff;border-radius:6px}:host ::ng-deep .card-status .status_RUNNING div{color:#fff!important}:host ::ng-deep .card-status .status_STOP{padding:2px 15px;font-size:12px;background-color:#ffd317;border-radius:6px}:host ::ng-deep .card-status .status_STOP div{color:#fff!important}:host ::ng-deep .card-status .status_FINISH{padding:2px 15px;font-size:12px;background-color:#2cb792;border-radius:6px}:host ::ng-deep .card-status .status_FINISH div{color:#fff!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzRateModule }, { kind: "component", type: i4.NzRateComponent, selector: "nz-rate", inputs: ["nzAllowClear", "nzAllowHalf", "nzDisabled", "nzAutoFocus", "nzCharacter", "nzCount", "nzTooltips"], outputs: ["nzOnBlur", "nzOnFocus", "nzOnHoverChange", "nzOnKeyDown"], exportAs: ["nzRate"] }, { kind: "ngmodule", type: NzAvatarModule }, { kind: "component", type: i5.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }, { kind: "ngmodule", type: GramDeonTextModule }, { kind: "component", type: i6.GramDeonTextComponent, selector: "gram-text", inputs: ["data"] }] });
|
|
134
|
+
}
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ItemTextComponent, decorators: [{
|
|
136
|
+
type: Component,
|
|
137
|
+
args: [{ selector: 'item-text', imports: [
|
|
138
|
+
CommonModule,
|
|
139
|
+
FormsModule,
|
|
140
|
+
ReactiveFormsModule,
|
|
141
|
+
NzRateModule,
|
|
142
|
+
NzAvatarModule,
|
|
143
|
+
GramDeonTextModule
|
|
144
|
+
], template: "<ng-container *ngIf=\"headerInfo!! && text!=null && headerInfo.hide!=true\">\n <ng-container [ngSwitch]=\"headerInfo.layoutType\">\n <ng-container *ngSwitchCase=\"'photo'\">\n <div class=\"card-photo\">\n <nz-avatar nzSize=\"large\" nzIcon=\"user\" [nzSrc]=\"text\"></nz-avatar>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'rate'\">\n <div class=\"card-rate\">\n <ng-container *ngIf=\"headerInfo.izFieldDesc==true\">\n <label class=\"title\"> {{headerInfo.label}} </label>\n </ng-container>\n\n <div class=\"text-info\">\n <nz-rate [(ngModel)]=\"value\" nzDisabled></nz-rate>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'status'\">\n <div class=\"card-status\">\n <ng-container [ngSwitch]=\"headerInfo.stylesName\">\n <ng-container *ngSwitchCase=\"'hideFlag'\">\n <div [ngClass]=\"[headerInfo?.stylesName,headerInfo?.stylesName+'_'+text]\">\n <!-- <label [ngStyle]=\"{'color':fontColor,'font-size':fontSize,'font-weight':fontWeight}\"> -->\n {{headerInfo.label}}\n <!-- </label> -->\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div [ngClass]=\"headerInfo?.stylesName+'_'+text\">\n <ng-container *ngIf=\"headerInfo.izFieldDesc==true\">\n <label class=\"title\"> {{headerInfo.label}} </label>\n </ng-container>\n\n <div class=\"text-info\">\n <gram-text [data]=\"{item:itemInfo,header:headerInfo,config:cardSrv.pageConfig}\"\n (click)=\"textClick(itemInfo,$event)\"></gram-text>\n </div>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <!-- <div class=\"card-text\" [ngStyle]=\"{'color':fontColor,'font-size':fontSize,'font-weight':fontWeight}\"> -->\n <div class=\"card-text\">\n <ng-container *ngIf=\"headerInfo.izFieldDesc==true\">\n <label class=\"title\"> {{headerInfo.label}} </label>\n </ng-container>\n <div class=\"text-info\">\n <gram-text [data]=\"{item:itemInfo,header:headerInfo,config:cardSrv.pageConfig}\"\n (click)=\"textClick(itemInfo,$event)\"></gram-text>\n </div>\n <label class=\"unit\" *ngIf=\"headerInfo.unit!!\">({{headerInfo.unit}})</label>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>", styles: [":host ::ng-deep gram-text a div{color:#1177fb!important}:host ::ng-deep .card-text{display:flex;align-items:center;padding:0 20px 0 0}:host ::ng-deep .card-text .title{min-width:30px}:host ::ng-deep .card-text .unit{padding:0 0 0 3px}:host ::ng-deep .card-text .title:after{padding:0 5px 0 2px;content:\":\"}:host ::ng-deep .card-photo{display:inline-block;padding:0 20px 0 0}:host ::ng-deep .card-rate{display:flex;flex-direction:row}:host ::ng-deep .card-rate .title:after{padding:0 5px 0 2px;content:\":\"}:host ::ng-deep .card-rate .ant-rate{font-size:16px;line-height:0}:host ::ng-deep .card-status{padding:0 20px 0 0}:host ::ng-deep .card-status .title{color:initial}:host ::ng-deep .card-status .title:after{padding:0 6px 0 2px;content:\":\"}:host ::ng-deep .card-status .hideFlag{display:none}:host ::ng-deep .card-status .hideFlag_1{display:inline-block}:host ::ng-deep .card-status .disFlag_0{padding:2px 15px;color:#fff;font-size:12px;background:#01c320;border-radius:12px}:host ::ng-deep .card-status .disFlag_0 div{color:#fff!important}:host ::ng-deep .card-status .disFlag_1{padding:2px 15px;color:#fff;font-size:12px;background:#ff4f40;border-radius:12px}:host ::ng-deep .card-status .disFlag_1 div{color:#fff!important}:host ::ng-deep .card-status .yesNo_0{display:flex;color:#bdbdbd}:host ::ng-deep .card-status .yesNo_1{display:flex;color:#4f85ff}:host ::ng-deep .card-status .status_DRAFT{padding:2px 15px;font-size:12px;background-color:#8c8c8c;border-radius:6px}:host ::ng-deep .card-status .status_DRAFT div{color:#fff!important}:host ::ng-deep .card-status .status_WAITING{padding:2px 15px;font-size:12px;background-color:#4f85ff;border-radius:6px}:host ::ng-deep .card-status .status_WAITING div{color:#fff!important}:host ::ng-deep .card-status .status_RUNNING{padding:2px 15px;font-size:12px;background-color:#4f85ff;border-radius:6px}:host ::ng-deep .card-status .status_RUNNING div{color:#fff!important}:host ::ng-deep .card-status .status_STOP{padding:2px 15px;font-size:12px;background-color:#ffd317;border-radius:6px}:host ::ng-deep .card-status .status_STOP div{color:#fff!important}:host ::ng-deep .card-status .status_FINISH{padding:2px 15px;font-size:12px;background-color:#2cb792;border-radius:6px}:host ::ng-deep .card-status .status_FINISH div{color:#fff!important}\n"] }]
|
|
145
|
+
}], ctorParameters: () => [{ type: CardService }] });
|
|
146
|
+
|
|
147
|
+
class ColumnImgComponent1 {
|
|
148
|
+
cardSrv;
|
|
149
|
+
data = null;
|
|
150
|
+
componentClick = new EventEmitter();
|
|
151
|
+
constructor(cardSrv) {
|
|
152
|
+
this.cardSrv = cardSrv;
|
|
153
|
+
}
|
|
154
|
+
ngOnInit() { }
|
|
155
|
+
textClick(event) {
|
|
156
|
+
this.componentClick.emit(event);
|
|
157
|
+
}
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ColumnImgComponent1, deps: [{ token: CardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
159
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ColumnImgComponent1, isStandalone: true, selector: "column-img1", inputs: { data: "data" }, outputs: { componentClick: "componentClick" }, ngImport: i0, template: "<div class=\"header-img\" *ngIf=\"data\">\n <img [src]=\"data[cardSrv.imgFieldKey]\" [style.width.px]=\"cardSrv.cardConfig.imgWidth\"\n [style.height.px]=\"cardSrv.cardConfig.imgHeight\">\n</div>\n<div class=\"body-text\">\n <ng-container *ngFor=\"let column of cardSrv.templateTextArr\">\n <item-text [config]=\"{'item':data,'column':column}\" (textClickEvent)=\"textClick($event)\"></item-text>\n </ng-container>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: ItemTextComponent, selector: "item-text" }] });
|
|
160
|
+
}
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ColumnImgComponent1, decorators: [{
|
|
162
|
+
type: Component,
|
|
163
|
+
args: [{ selector: 'column-img1', imports: [
|
|
164
|
+
CommonModule,
|
|
165
|
+
FormsModule,
|
|
166
|
+
ReactiveFormsModule,
|
|
167
|
+
ItemTextComponent
|
|
168
|
+
], template: "<div class=\"header-img\" *ngIf=\"data\">\n <img [src]=\"data[cardSrv.imgFieldKey]\" [style.width.px]=\"cardSrv.cardConfig.imgWidth\"\n [style.height.px]=\"cardSrv.cardConfig.imgHeight\">\n</div>\n<div class=\"body-text\">\n <ng-container *ngFor=\"let column of cardSrv.templateTextArr\">\n <item-text [config]=\"{'item':data,'column':column}\" (textClickEvent)=\"textClick($event)\"></item-text>\n </ng-container>\n</div>" }]
|
|
169
|
+
}], ctorParameters: () => [{ type: CardService }], propDecorators: { data: [{
|
|
170
|
+
type: Input
|
|
171
|
+
}], componentClick: [{
|
|
172
|
+
type: Output
|
|
173
|
+
}] } });
|
|
174
|
+
|
|
175
|
+
class ColumnImgComponent2 {
|
|
176
|
+
cardSrv;
|
|
177
|
+
data = null;
|
|
178
|
+
componentClick = new EventEmitter();
|
|
179
|
+
constructor(cardSrv) {
|
|
180
|
+
this.cardSrv = cardSrv;
|
|
181
|
+
}
|
|
182
|
+
ngOnInit() { }
|
|
183
|
+
textClick(event) {
|
|
184
|
+
this.componentClick.emit(event);
|
|
185
|
+
}
|
|
186
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ColumnImgComponent2, deps: [{ token: CardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
187
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ColumnImgComponent2, isStandalone: true, selector: "column-img2", inputs: { data: "data" }, outputs: { componentClick: "componentClick" }, ngImport: i0, template: "<div class=\"header-img\">\n <img [src]=\"data[cardSrv.imgFieldKey]\" [style.width.px]=\"cardSrv.cardConfig.imgWidth\"\n [style.height.px]=\"cardSrv.cardConfig.imgHeight\">\n</div>\n<div class=\"body-text\">\n <ng-container *ngFor=\"let column of cardSrv.templateTextArr\">\n <item-text [config]=\"{'item':data,'column':column}\" (textClickEvent)=\"textClick($event)\"></item-text>\n </ng-container>\n</div>", styles: [":host ::ng-deep{display:flex;flex-direction:row}:host ::ng-deep .body-text{flex:1;padding:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: ItemTextComponent, selector: "item-text" }] });
|
|
188
|
+
}
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ColumnImgComponent2, decorators: [{
|
|
190
|
+
type: Component,
|
|
191
|
+
args: [{ selector: 'column-img2', imports: [
|
|
192
|
+
CommonModule,
|
|
193
|
+
FormsModule,
|
|
194
|
+
ReactiveFormsModule,
|
|
195
|
+
ItemTextComponent
|
|
196
|
+
], template: "<div class=\"header-img\">\n <img [src]=\"data[cardSrv.imgFieldKey]\" [style.width.px]=\"cardSrv.cardConfig.imgWidth\"\n [style.height.px]=\"cardSrv.cardConfig.imgHeight\">\n</div>\n<div class=\"body-text\">\n <ng-container *ngFor=\"let column of cardSrv.templateTextArr\">\n <item-text [config]=\"{'item':data,'column':column}\" (textClickEvent)=\"textClick($event)\"></item-text>\n </ng-container>\n</div>", styles: [":host ::ng-deep{display:flex;flex-direction:row}:host ::ng-deep .body-text{flex:1;padding:10px}\n"] }]
|
|
197
|
+
}], ctorParameters: () => [{ type: CardService }], propDecorators: { data: [{
|
|
198
|
+
type: Input
|
|
199
|
+
}], componentClick: [{
|
|
200
|
+
type: Output
|
|
201
|
+
}] } });
|
|
202
|
+
|
|
203
|
+
class ColumnImgComponent3 {
|
|
204
|
+
cardSrv;
|
|
205
|
+
data = null;
|
|
206
|
+
componentClick = new EventEmitter();
|
|
207
|
+
constructor(cardSrv) {
|
|
208
|
+
this.cardSrv = cardSrv;
|
|
209
|
+
}
|
|
210
|
+
ngOnInit() { }
|
|
211
|
+
textClick(event) {
|
|
212
|
+
this.componentClick.emit(event);
|
|
213
|
+
}
|
|
214
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ColumnImgComponent3, deps: [{ token: CardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
215
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ColumnImgComponent3, isStandalone: true, selector: "column-img3", inputs: { data: "data" }, outputs: { componentClick: "componentClick" }, ngImport: i0, template: "<div class=\"body-text\">\n <ng-container *ngFor=\"let column of cardSrv.templateTextArr\">\n <item-text [config]=\"{'item':data,'column':column}\" (textClickEvent)=\"textClick($event)\"></item-text>\n </ng-container>\n</div>\n<div class=\"header-img\">\n <img [src]=\"data[cardSrv.imgFieldKey]\" [style.width.px]=\"cardSrv.cardConfig.imgWidth\"\n [style.height.px]=\"cardSrv.cardConfig.imgHeight\">\n</div>", styles: [":host ::ng-deep{display:flex;flex-direction:row}:host ::ng-deep .body-text{flex:1;padding:5px 10px 10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: ItemTextComponent, selector: "item-text" }] });
|
|
216
|
+
}
|
|
217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ColumnImgComponent3, decorators: [{
|
|
218
|
+
type: Component,
|
|
219
|
+
args: [{ selector: 'column-img3', imports: [
|
|
220
|
+
CommonModule,
|
|
221
|
+
FormsModule,
|
|
222
|
+
ReactiveFormsModule,
|
|
223
|
+
ItemTextComponent
|
|
224
|
+
], template: "<div class=\"body-text\">\n <ng-container *ngFor=\"let column of cardSrv.templateTextArr\">\n <item-text [config]=\"{'item':data,'column':column}\" (textClickEvent)=\"textClick($event)\"></item-text>\n </ng-container>\n</div>\n<div class=\"header-img\">\n <img [src]=\"data[cardSrv.imgFieldKey]\" [style.width.px]=\"cardSrv.cardConfig.imgWidth\"\n [style.height.px]=\"cardSrv.cardConfig.imgHeight\">\n</div>", styles: [":host ::ng-deep{display:flex;flex-direction:row}:host ::ng-deep .body-text{flex:1;padding:5px 10px 10px}\n"] }]
|
|
225
|
+
}], ctorParameters: () => [{ type: CardService }], propDecorators: { data: [{
|
|
226
|
+
type: Input
|
|
227
|
+
}], componentClick: [{
|
|
228
|
+
type: Output
|
|
229
|
+
}] } });
|
|
230
|
+
|
|
231
|
+
class ColumnImgComponent {
|
|
232
|
+
cardSrv;
|
|
233
|
+
listDataCheckedId = null;
|
|
234
|
+
data = null;
|
|
235
|
+
operationClick = new EventEmitter();
|
|
236
|
+
rowRuleClick = new EventEmitter();
|
|
237
|
+
componentClick = new EventEmitter();
|
|
238
|
+
selectChange = new EventEmitter();
|
|
239
|
+
constructor(cardSrv) {
|
|
240
|
+
this.cardSrv = cardSrv;
|
|
241
|
+
}
|
|
242
|
+
ngOnInit() { }
|
|
243
|
+
ngAfterViewInit() { }
|
|
244
|
+
ngOnChanges(change) { }
|
|
245
|
+
buttonEvent(button, item, event) {
|
|
246
|
+
event.stopPropagation();
|
|
247
|
+
let eventData = {
|
|
248
|
+
key: button.code,
|
|
249
|
+
dataId: item[this.cardSrv.pageConfig?.primary?.key],
|
|
250
|
+
dataItem: item,
|
|
251
|
+
};
|
|
252
|
+
this.operationClick.emit(eventData);
|
|
253
|
+
}
|
|
254
|
+
ruleClick(item, event) {
|
|
255
|
+
event.stopPropagation();
|
|
256
|
+
this.rowRuleClick.emit({
|
|
257
|
+
dataId: item[this.cardSrv.pageConfig?.primary?.key],
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
textClick(event) {
|
|
261
|
+
this.componentClick.emit(event);
|
|
262
|
+
}
|
|
263
|
+
checkChange() {
|
|
264
|
+
this.selectChange.emit();
|
|
265
|
+
}
|
|
266
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ColumnImgComponent, deps: [{ token: CardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
267
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ColumnImgComponent, isStandalone: true, selector: "column-img", inputs: { listDataCheckedId: "listDataCheckedId", data: "data" }, outputs: { operationClick: "operationClick", rowRuleClick: "rowRuleClick", componentClick: "componentClick", selectChange: "selectChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"cardSrv!! && cardSrv.template!! && cardSrv.header!!\">\n <div class=\"column-checkbox\"\n *ngIf=\"cardSrv?.pageConfig?.checkbox==true && cardSrv.pageConfig.primary!! && cardSrv.pageConfig.primary.key!!\">\n <label nz-checkbox [(nzChecked)]=\"listDataCheckedId[data[cardSrv.pageConfig.primary.key]]\"\n (nzCheckedChange)=\"checkChange()\"></label>\n </div>\n <div class=\"column-box\">\n <ng-container [ngSwitch]=\"cardSrv.cardConfig.imgType\">\n <ng-container *ngSwitchCase=\"'img1'\">\n <column-img1 [data]=\"data\" (componentClick)=\"textClick($event)\"></column-img1>\n </ng-container>\n <ng-container *ngSwitchCase=\"'img2'\">\n <column-img2 [data]=\"data\" [style.width.px]=\"cardSrv.cardConfig.width\"\n [style.height.px]=\"cardSrv.cardConfig.height\" (componentClick)=\"textClick($event)\"></column-img2>\n </ng-container>\n <ng-container *ngSwitchCase=\"'img3'\">\n <column-img3 [data]=\"data\" [style.width.px]=\"cardSrv.cardConfig.width\"\n [style.height.px]=\"cardSrv.cardConfig.height\" (componentClick)=\"textClick($event)\"></column-img3>\n </ng-container>\n <ng-container *ngSwitchDefault>\n\n </ng-container>\n </ng-container>\n <div class=\"column-operation\" *ngIf=\"data.operation\">\n\n <ng-container *ngIf=\"cardSrv.pageConfig!! && cardSrv.pageConfig?.operation?.type=='FOLD';else tmpOperation\">\n <a nz-dropdown [nzDropdownMenu]=\"menu\"> <i class=\"table-action\" nz-icon nzType=\"ellipsis\"></i>\n </a>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu>\n <ng-container *ngFor=\"let button of data.operation\">\n <ng-container *ngIf=\"cardSrv.pageConfig?.startRole==false;else tmpLiRoleCode\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n <!-- \u53E6\u5916\u4E00\u79CD -->\n <ng-template #tmpLiRoleCode>\n <ng-container *ngIf=\"button?.izRole!=true;else tmpRoleFold\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n <ng-template #tmpRoleFold>\n <ng-container *aclIf=\"button.roleCode\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n </ng-template>\n </ng-template>\n </ng-container>\n </ul>\n </nz-dropdown-menu>\n </ng-container>\n\n <ng-template #tmpOperation>\n <ng-container *ngFor=\"let button of data.operation\">\n <ng-container *ngIf=\"cardSrv.pageConfig?.startRole==false;else tmpRoleCode\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n <!-- \u53E6\u5916\u4E00\u79CD -->\n <ng-template #tmpRoleCode>\n <ng-container *ngIf=\"button?.izRole!=true;else tmpRoleExpand\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n <ng-template #tmpRoleExpand>\n <ng-container *aclIf=\"button.roleCode\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-template>\n\n\n </div>\n </div>\n</ng-container>", styles: [":host ::ng-deep{position:relative;display:flex;flex-direction:row;margin:15px 15px 0;padding:0;background:#fff;border-radius:8px;float:left}:host ::ng-deep gram-text{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}:host ::ng-deep .column-checkbox{padding:8px;position:absolute}:host ::ng-deep .column-box{display:flex;flex:1;flex-direction:column}:host ::ng-deep .column-operation{display:flex;flex-direction:row;justify-content:flex-end;padding:8px 12px;border-top:1px solid #eaeaea}:host ::ng-deep .column-operation a+a{margin-left:10px}:host ::ng-deep .body-text{padding:0 10px 10px}:host ::ng-deep .body-text item-text{padding:8px 0 0;display:flex;flex-direction:row}:host ::ng-deep .body-text .card-text{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: DelonACLModule }, { kind: "directive", type: i3$1.ACLIfDirective, selector: "[aclIf]", inputs: ["aclIf", "aclIfThen", "aclIfElse", "except"], exportAs: ["aclIf"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i4$1.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i5$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i5$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i6$1.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "directive", type: i6$1.NzDropDownADirective, selector: "a[nz-dropdown]" }, { kind: "component", type: i6$1.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i7.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: GramDeonButtonModule }, { kind: "component", type: i8.GramDeonButtonInnerComponent, selector: "button-inner", inputs: ["data"] }, { kind: "component", type: ColumnImgComponent1, selector: "column-img1", inputs: ["data"], outputs: ["componentClick"] }, { kind: "component", type: ColumnImgComponent2, selector: "column-img2", inputs: ["data"], outputs: ["componentClick"] }, { kind: "component", type: ColumnImgComponent3, selector: "column-img3", inputs: ["data"], outputs: ["componentClick"] }] });
|
|
268
|
+
}
|
|
269
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ColumnImgComponent, decorators: [{
|
|
270
|
+
type: Component,
|
|
271
|
+
args: [{ selector: 'column-img', imports: [
|
|
272
|
+
CommonModule,
|
|
273
|
+
FormsModule,
|
|
274
|
+
ReactiveFormsModule,
|
|
275
|
+
DelonACLModule,
|
|
276
|
+
NzCheckboxModule,
|
|
277
|
+
NzDropDownModule,
|
|
278
|
+
NzIconModule,
|
|
279
|
+
GramDeonButtonModule,
|
|
280
|
+
ColumnImgComponent1,
|
|
281
|
+
ColumnImgComponent2,
|
|
282
|
+
ColumnImgComponent3
|
|
283
|
+
], template: "<ng-container *ngIf=\"cardSrv!! && cardSrv.template!! && cardSrv.header!!\">\n <div class=\"column-checkbox\"\n *ngIf=\"cardSrv?.pageConfig?.checkbox==true && cardSrv.pageConfig.primary!! && cardSrv.pageConfig.primary.key!!\">\n <label nz-checkbox [(nzChecked)]=\"listDataCheckedId[data[cardSrv.pageConfig.primary.key]]\"\n (nzCheckedChange)=\"checkChange()\"></label>\n </div>\n <div class=\"column-box\">\n <ng-container [ngSwitch]=\"cardSrv.cardConfig.imgType\">\n <ng-container *ngSwitchCase=\"'img1'\">\n <column-img1 [data]=\"data\" (componentClick)=\"textClick($event)\"></column-img1>\n </ng-container>\n <ng-container *ngSwitchCase=\"'img2'\">\n <column-img2 [data]=\"data\" [style.width.px]=\"cardSrv.cardConfig.width\"\n [style.height.px]=\"cardSrv.cardConfig.height\" (componentClick)=\"textClick($event)\"></column-img2>\n </ng-container>\n <ng-container *ngSwitchCase=\"'img3'\">\n <column-img3 [data]=\"data\" [style.width.px]=\"cardSrv.cardConfig.width\"\n [style.height.px]=\"cardSrv.cardConfig.height\" (componentClick)=\"textClick($event)\"></column-img3>\n </ng-container>\n <ng-container *ngSwitchDefault>\n\n </ng-container>\n </ng-container>\n <div class=\"column-operation\" *ngIf=\"data.operation\">\n\n <ng-container *ngIf=\"cardSrv.pageConfig!! && cardSrv.pageConfig?.operation?.type=='FOLD';else tmpOperation\">\n <a nz-dropdown [nzDropdownMenu]=\"menu\"> <i class=\"table-action\" nz-icon nzType=\"ellipsis\"></i>\n </a>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu>\n <ng-container *ngFor=\"let button of data.operation\">\n <ng-container *ngIf=\"cardSrv.pageConfig?.startRole==false;else tmpLiRoleCode\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n <!-- \u53E6\u5916\u4E00\u79CD -->\n <ng-template #tmpLiRoleCode>\n <ng-container *ngIf=\"button?.izRole!=true;else tmpRoleFold\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n <ng-template #tmpRoleFold>\n <ng-container *aclIf=\"button.roleCode\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n </ng-template>\n </ng-template>\n </ng-container>\n </ul>\n </nz-dropdown-menu>\n </ng-container>\n\n <ng-template #tmpOperation>\n <ng-container *ngFor=\"let button of data.operation\">\n <ng-container *ngIf=\"cardSrv.pageConfig?.startRole==false;else tmpRoleCode\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n <!-- \u53E6\u5916\u4E00\u79CD -->\n <ng-template #tmpRoleCode>\n <ng-container *ngIf=\"button?.izRole!=true;else tmpRoleExpand\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n <ng-template #tmpRoleExpand>\n <ng-container *aclIf=\"button.roleCode\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-template>\n\n\n </div>\n </div>\n</ng-container>", styles: [":host ::ng-deep{position:relative;display:flex;flex-direction:row;margin:15px 15px 0;padding:0;background:#fff;border-radius:8px;float:left}:host ::ng-deep gram-text{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}:host ::ng-deep .column-checkbox{padding:8px;position:absolute}:host ::ng-deep .column-box{display:flex;flex:1;flex-direction:column}:host ::ng-deep .column-operation{display:flex;flex-direction:row;justify-content:flex-end;padding:8px 12px;border-top:1px solid #eaeaea}:host ::ng-deep .column-operation a+a{margin-left:10px}:host ::ng-deep .body-text{padding:0 10px 10px}:host ::ng-deep .body-text item-text{padding:8px 0 0;display:flex;flex-direction:row}:host ::ng-deep .body-text .card-text{padding:0}\n"] }]
|
|
284
|
+
}], ctorParameters: () => [{ type: CardService }], propDecorators: { listDataCheckedId: [{
|
|
285
|
+
type: Input
|
|
286
|
+
}], data: [{
|
|
287
|
+
type: Input
|
|
288
|
+
}], operationClick: [{
|
|
289
|
+
type: Output
|
|
290
|
+
}], rowRuleClick: [{
|
|
291
|
+
type: Output
|
|
292
|
+
}], componentClick: [{
|
|
293
|
+
type: Output
|
|
294
|
+
}], selectChange: [{
|
|
295
|
+
type: Output
|
|
296
|
+
}] } });
|
|
297
|
+
|
|
298
|
+
class ItemGroupComponent extends ItemService {
|
|
299
|
+
cardSrv;
|
|
300
|
+
label = null;
|
|
301
|
+
fieldList = [];
|
|
302
|
+
constructor(cardSrv) {
|
|
303
|
+
super();
|
|
304
|
+
this.cardSrv = cardSrv;
|
|
305
|
+
}
|
|
306
|
+
ngOnInit() { }
|
|
307
|
+
ngAfterViewInit() { }
|
|
308
|
+
ngOnChanges(change) { }
|
|
309
|
+
getDataText() {
|
|
310
|
+
this.fieldList = _.get(this.config, "column.fieldList");
|
|
311
|
+
if (this.fieldList && this.fieldList.length > 0) {
|
|
312
|
+
this.label = _.get(this.config, "column.fieldList[0].label");
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ItemGroupComponent, deps: [{ token: CardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
316
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ItemGroupComponent, isStandalone: true, selector: "item-group", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"fieldList!! && fieldList.length>0\">\n <label class=\"title\">\n {{label}}\n </label>\n <ng-container *ngFor=\"let item of fieldList;let index=index\">\n <gram-text [data]=\"{item:itemInfo,header:item}\"></gram-text>\n <ng-container *ngIf=\"fieldList.length>1 && index<fieldList.length-1\">\n <label class=\"space\">~</label>\n </ng-container>\n </ng-container>\n</ng-container>", styles: [":host ::ng-deep{display:flex;padding:0 20px 0 0}:host ::ng-deep .space{display:inline-block;padding:0 5px}:host ::ng-deep .title:after{padding:0 6px 0 2px;content:\":\"}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramDeonTextModule }, { kind: "component", type: i6.GramDeonTextComponent, selector: "gram-text", inputs: ["data"] }] });
|
|
317
|
+
}
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ItemGroupComponent, decorators: [{
|
|
319
|
+
type: Component,
|
|
320
|
+
args: [{ selector: 'item-group', imports: [
|
|
321
|
+
CommonModule,
|
|
322
|
+
FormsModule,
|
|
323
|
+
ReactiveFormsModule,
|
|
324
|
+
GramDeonTextModule
|
|
325
|
+
], template: "<ng-container *ngIf=\"fieldList!! && fieldList.length>0\">\n <label class=\"title\">\n {{label}}\n </label>\n <ng-container *ngFor=\"let item of fieldList;let index=index\">\n <gram-text [data]=\"{item:itemInfo,header:item}\"></gram-text>\n <ng-container *ngIf=\"fieldList.length>1 && index<fieldList.length-1\">\n <label class=\"space\">~</label>\n </ng-container>\n </ng-container>\n</ng-container>", styles: [":host ::ng-deep{display:flex;padding:0 20px 0 0}:host ::ng-deep .space{display:inline-block;padding:0 5px}:host ::ng-deep .title:after{padding:0 6px 0 2px;content:\":\"}\n"] }]
|
|
326
|
+
}], ctorParameters: () => [{ type: CardService }] });
|
|
327
|
+
|
|
328
|
+
class ColumnDefaultComponent {
|
|
329
|
+
cardSrv;
|
|
330
|
+
listDataCheckedId = null;
|
|
331
|
+
data = null;
|
|
332
|
+
operationClick = new EventEmitter();
|
|
333
|
+
rowRuleClick = new EventEmitter();
|
|
334
|
+
componentClick = new EventEmitter();
|
|
335
|
+
selectChange = new EventEmitter();
|
|
336
|
+
constructor(cardSrv) {
|
|
337
|
+
this.cardSrv = cardSrv;
|
|
338
|
+
}
|
|
339
|
+
ngOnInit() { }
|
|
340
|
+
ngAfterViewInit() { }
|
|
341
|
+
ngOnChanges(change) { }
|
|
342
|
+
buttonEvent(button, item, event) {
|
|
343
|
+
event.stopPropagation();
|
|
344
|
+
let eventData = {
|
|
345
|
+
key: button.code,
|
|
346
|
+
dataId: item[this.cardSrv.pageConfig?.primary?.key],
|
|
347
|
+
dataItem: item,
|
|
348
|
+
};
|
|
349
|
+
this.operationClick.emit(eventData);
|
|
350
|
+
}
|
|
351
|
+
ruleClick(item, event) {
|
|
352
|
+
event.stopPropagation();
|
|
353
|
+
this.rowRuleClick.emit({
|
|
354
|
+
dataId: item[this.cardSrv.pageConfig?.primary?.key],
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
textClick(event) {
|
|
358
|
+
this.componentClick.emit(event);
|
|
359
|
+
}
|
|
360
|
+
checkChange() {
|
|
361
|
+
this.selectChange.emit();
|
|
362
|
+
}
|
|
363
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ColumnDefaultComponent, deps: [{ token: CardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
364
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ColumnDefaultComponent, isStandalone: true, selector: "column-default", inputs: { listDataCheckedId: "listDataCheckedId", data: "data" }, outputs: { operationClick: "operationClick", rowRuleClick: "rowRuleClick", componentClick: "componentClick", selectChange: "selectChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"cardSrv!! && cardSrv.template!! && cardSrv.header!!\">\n <div class=\"column-checkbox\"\n *ngIf=\"cardSrv?.pageConfig?.checkbox==true && cardSrv.pageConfig.primary!! && cardSrv.pageConfig.primary.key!!\">\n <label nz-checkbox [(nzChecked)]=\"listDataCheckedId[data[cardSrv.pageConfig.primary.key]]\"\n (nzCheckedChange)=\"checkChange()\"></label>\n </div>\n <div class=\"column-box\">\n <ng-container *ngFor=\"let item of cardSrv.template\">\n <div class=\"column\" [ngClass]=\"item.type\">\n <ng-container *ngFor=\"let d of item.child\">\n <div [ngClass]=\"d.type\">\n <ng-container *ngFor=\"let column of d.child\">\n <div class=\"item-box\" [ngClass]=\"column.type\">\n <ng-container [ngSwitch]=\"column.type\">\n <ng-container *ngSwitchCase=\"'operation'\">\n <ng-container *ngIf=\"cardSrv.pageConfig.dataRule\">\n <a (click)=\"ruleClick(data,$event)\">\n <i nz-icon nzType=\"share-alt\" class=\"button-share\"></i>\u9002\u7528\u89C4\u5219\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"data.operation!!\">\n <ng-container\n *ngIf=\"cardSrv.pageConfig!! && cardSrv.pageConfig?.operation?.type=='FOLD';else tmpOperation\">\n <a nz-dropdown [nzDropdownMenu]=\"menu\"> <i class=\"table-action\" nz-icon nzType=\"ellipsis\"></i>\n </a>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu>\n <ng-container *ngFor=\"let button of data.operation\">\n <ng-container *ngIf=\"cardSrv.pageConfig?.startRole==false;else tmpLiRoleCode\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n <!-- \u53E6\u5916\u4E00\u79CD -->\n <ng-template #tmpLiRoleCode>\n <ng-container *ngIf=\"button?.izRole!=true;else tmpRoleFold\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n <ng-template #tmpRoleFold>\n <ng-container *aclIf=\"button.roleCode\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n </ng-template>\n </ng-template>\n </ng-container>\n </ul>\n </nz-dropdown-menu>\n </ng-container>\n\n <ng-template #tmpOperation>\n <ng-container *ngFor=\"let button of data.operation\">\n <ng-container *ngIf=\"cardSrv.pageConfig?.startRole==false;else tmpRoleCode\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n <!-- \u53E6\u5916\u4E00\u79CD -->\n <ng-template #tmpRoleCode>\n <ng-container *ngIf=\"button?.izRole!=true;else tmpRoleExpand\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n <ng-template #tmpRoleExpand>\n <ng-container *aclIf=\"button.roleCode\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-template>\n\n\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'list'\">\n <item-group [config]=\"{'item':data,'column':column}\"></item-group>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <item-text [config]=\"{'item':data,'column':column}\"\n (textClickEvent)=\"textClick($event)\"></item-text>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n</ng-container>", styles: [":host ::ng-deep{display:flex;flex-direction:row;margin:15px 15px 0;padding:15px 0 0;background:#fff;border-radius:8px}:host ::ng-deep gram-text{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}:host ::ng-deep .column-checkbox{padding:0 0 0 8px}:host ::ng-deep .column-box{display:flex;flex:1;flex-direction:column}:host ::ng-deep .column{display:flex;flex-direction:row;margin:0 0 15px;padding:0 15px}:host ::ng-deep .column-b .left{display:flex;flex-direction:row;align-items:center;justify-content:start;min-width:200px;text-align:left}:host ::ng-deep .column-b .right{display:inline-block;display:flex;flex:1;flex-direction:row;align-items:center}:host ::ng-deep .column-c .left{display:inline-block;display:flex;flex:1;flex-direction:row;align-items:center}:host ::ng-deep .column-c .right{display:flex;flex-direction:row;align-items:center;justify-content:end;min-width:20px;text-align:right}:host ::ng-deep .column .middle{display:flex;flex:1;flex-direction:row;align-items:center}:host ::ng-deep .item-box{display:inline-block}:host ::ng-deep .operation a+a{margin:0 0 0 15px}:host ::ng-deep .table-action{padding:3px 8px;color:#fff;font-size:15px;background:#1177fb!important;border-radius:12px;cursor:pointer}:host ::ng-deep .button-share{margin-right:3px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: DelonACLModule }, { kind: "directive", type: i3$1.ACLIfDirective, selector: "[aclIf]", inputs: ["aclIf", "aclIfThen", "aclIfElse", "except"], exportAs: ["aclIf"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i4$1.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i5$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i5$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i6$1.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "directive", type: i6$1.NzDropDownADirective, selector: "a[nz-dropdown]" }, { kind: "component", type: i6$1.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i7.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "directive", type: i8$1.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: GramDeonButtonModule }, { kind: "component", type: i8.GramDeonButtonInnerComponent, selector: "button-inner", inputs: ["data"] }, { kind: "component", type: ItemTextComponent, selector: "item-text" }, { kind: "component", type: ItemGroupComponent, selector: "item-group" }] });
|
|
365
|
+
}
|
|
366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ColumnDefaultComponent, decorators: [{
|
|
367
|
+
type: Component,
|
|
368
|
+
args: [{ selector: 'column-default', imports: [
|
|
369
|
+
CommonModule,
|
|
370
|
+
FormsModule,
|
|
371
|
+
ReactiveFormsModule,
|
|
372
|
+
DelonACLModule,
|
|
373
|
+
NzCheckboxModule,
|
|
374
|
+
NzDropDownModule,
|
|
375
|
+
NzIconModule,
|
|
376
|
+
NzButtonModule,
|
|
377
|
+
GramDeonButtonModule,
|
|
378
|
+
ItemTextComponent,
|
|
379
|
+
ItemGroupComponent
|
|
380
|
+
], template: "<ng-container *ngIf=\"cardSrv!! && cardSrv.template!! && cardSrv.header!!\">\n <div class=\"column-checkbox\"\n *ngIf=\"cardSrv?.pageConfig?.checkbox==true && cardSrv.pageConfig.primary!! && cardSrv.pageConfig.primary.key!!\">\n <label nz-checkbox [(nzChecked)]=\"listDataCheckedId[data[cardSrv.pageConfig.primary.key]]\"\n (nzCheckedChange)=\"checkChange()\"></label>\n </div>\n <div class=\"column-box\">\n <ng-container *ngFor=\"let item of cardSrv.template\">\n <div class=\"column\" [ngClass]=\"item.type\">\n <ng-container *ngFor=\"let d of item.child\">\n <div [ngClass]=\"d.type\">\n <ng-container *ngFor=\"let column of d.child\">\n <div class=\"item-box\" [ngClass]=\"column.type\">\n <ng-container [ngSwitch]=\"column.type\">\n <ng-container *ngSwitchCase=\"'operation'\">\n <ng-container *ngIf=\"cardSrv.pageConfig.dataRule\">\n <a (click)=\"ruleClick(data,$event)\">\n <i nz-icon nzType=\"share-alt\" class=\"button-share\"></i>\u9002\u7528\u89C4\u5219\n </a>\n </ng-container>\n\n <ng-container *ngIf=\"data.operation!!\">\n <ng-container\n *ngIf=\"cardSrv.pageConfig!! && cardSrv.pageConfig?.operation?.type=='FOLD';else tmpOperation\">\n <a nz-dropdown [nzDropdownMenu]=\"menu\"> <i class=\"table-action\" nz-icon nzType=\"ellipsis\"></i>\n </a>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu>\n <ng-container *ngFor=\"let button of data.operation\">\n <ng-container *ngIf=\"cardSrv.pageConfig?.startRole==false;else tmpLiRoleCode\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n <!-- \u53E6\u5916\u4E00\u79CD -->\n <ng-template #tmpLiRoleCode>\n <ng-container *ngIf=\"button?.izRole!=true;else tmpRoleFold\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n <ng-template #tmpRoleFold>\n <ng-container *aclIf=\"button.roleCode\">\n <li nz-menu-item (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </li>\n </ng-container>\n </ng-template>\n </ng-template>\n </ng-container>\n </ul>\n </nz-dropdown-menu>\n </ng-container>\n\n <ng-template #tmpOperation>\n <ng-container *ngFor=\"let button of data.operation\">\n <ng-container *ngIf=\"cardSrv.pageConfig?.startRole==false;else tmpRoleCode\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n <!-- \u53E6\u5916\u4E00\u79CD -->\n <ng-template #tmpRoleCode>\n <ng-container *ngIf=\"button?.izRole!=true;else tmpRoleExpand\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n <ng-template #tmpRoleExpand>\n <ng-container *aclIf=\"button.roleCode\">\n <a (click)=\"buttonEvent(button,data,$event)\">\n <button-inner [data]=\"button\"></button-inner>\n </a>\n </ng-container>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-template>\n\n\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'list'\">\n <item-group [config]=\"{'item':data,'column':column}\"></item-group>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <item-text [config]=\"{'item':data,'column':column}\"\n (textClickEvent)=\"textClick($event)\"></item-text>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n</ng-container>", styles: [":host ::ng-deep{display:flex;flex-direction:row;margin:15px 15px 0;padding:15px 0 0;background:#fff;border-radius:8px}:host ::ng-deep gram-text{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}:host ::ng-deep .column-checkbox{padding:0 0 0 8px}:host ::ng-deep .column-box{display:flex;flex:1;flex-direction:column}:host ::ng-deep .column{display:flex;flex-direction:row;margin:0 0 15px;padding:0 15px}:host ::ng-deep .column-b .left{display:flex;flex-direction:row;align-items:center;justify-content:start;min-width:200px;text-align:left}:host ::ng-deep .column-b .right{display:inline-block;display:flex;flex:1;flex-direction:row;align-items:center}:host ::ng-deep .column-c .left{display:inline-block;display:flex;flex:1;flex-direction:row;align-items:center}:host ::ng-deep .column-c .right{display:flex;flex-direction:row;align-items:center;justify-content:end;min-width:20px;text-align:right}:host ::ng-deep .column .middle{display:flex;flex:1;flex-direction:row;align-items:center}:host ::ng-deep .item-box{display:inline-block}:host ::ng-deep .operation a+a{margin:0 0 0 15px}:host ::ng-deep .table-action{padding:3px 8px;color:#fff;font-size:15px;background:#1177fb!important;border-radius:12px;cursor:pointer}:host ::ng-deep .button-share{margin-right:3px}\n"] }]
|
|
381
|
+
}], ctorParameters: () => [{ type: CardService }], propDecorators: { listDataCheckedId: [{
|
|
382
|
+
type: Input
|
|
383
|
+
}], data: [{
|
|
384
|
+
type: Input
|
|
385
|
+
}], operationClick: [{
|
|
386
|
+
type: Output
|
|
387
|
+
}], rowRuleClick: [{
|
|
388
|
+
type: Output
|
|
389
|
+
}], componentClick: [{
|
|
390
|
+
type: Output
|
|
391
|
+
}], selectChange: [{
|
|
392
|
+
type: Output
|
|
393
|
+
}] } });
|
|
394
|
+
|
|
395
|
+
class GramDeonCardComponent {
|
|
396
|
+
cardSrv;
|
|
397
|
+
_data = [];
|
|
398
|
+
_listSelectData = [];
|
|
399
|
+
id = '';
|
|
400
|
+
loading = null;
|
|
401
|
+
pageConfig = {};
|
|
402
|
+
cardConfig = null;
|
|
403
|
+
header = null;
|
|
404
|
+
/**
|
|
405
|
+
* 当前总数据
|
|
406
|
+
*/
|
|
407
|
+
total = 0;
|
|
408
|
+
/**
|
|
409
|
+
* 当前数据数组
|
|
410
|
+
*/
|
|
411
|
+
set nzData(value) {
|
|
412
|
+
if (value && Array.isArray(value)) {
|
|
413
|
+
this.cardSrv.cardConfig = this.cardConfig;
|
|
414
|
+
this.cardSrv.templateImg = this.cardConfig?.layoutTemplate[0].child[0].child[0];
|
|
415
|
+
this.cardSrv.templateTextArr = this.cardConfig?.layoutTemplate[0].child[1].child;
|
|
416
|
+
this.cardSrv.pageConfig = this.pageConfig;
|
|
417
|
+
this.cardSrv.template = this.cardConfig?.layoutTemplate;
|
|
418
|
+
this.cardSrv.header = this.header;
|
|
419
|
+
this.initHeaderData(this.cardSrv.template);
|
|
420
|
+
if (this.cardSrv.templateImg?.fieldInfo) {
|
|
421
|
+
this.cardSrv.imgFieldKey = this.cardSrv.templateImg.fieldInfo.key;
|
|
422
|
+
}
|
|
423
|
+
if (value && Array.isArray(value)) {
|
|
424
|
+
value.forEach((item) => {
|
|
425
|
+
if (item.operation && Array.isArray(item.operation)) {
|
|
426
|
+
let operation = _.cloneDeep(item.operation);
|
|
427
|
+
let operationArr = [];
|
|
428
|
+
operation.forEach((e) => {
|
|
429
|
+
if (e.izRole == false) {
|
|
430
|
+
operationArr.push(e);
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
if (_.get(this.pageConfig, 'buttons.operation')) {
|
|
434
|
+
let roleCode = _.get(this.pageConfig, 'buttons.operation.' + e.code + '.roleCode');
|
|
435
|
+
if (roleCode) {
|
|
436
|
+
e.roleCode = roleCode;
|
|
437
|
+
operationArr.push(e);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
item.operation = operationArr;
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
this._data = value;
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
this._data = [];
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
this._data = [];
|
|
453
|
+
this.cardSrv.pageConfig = null;
|
|
454
|
+
this.cardSrv.template = [];
|
|
455
|
+
this.cardSrv.header = [];
|
|
456
|
+
this.cardSrv.templateImg = null;
|
|
457
|
+
this.cardSrv.templateTextArr = [];
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
get nzData() {
|
|
461
|
+
return this._data;
|
|
462
|
+
}
|
|
463
|
+
set selectData(value) {
|
|
464
|
+
this.listDataCheckedId = {};
|
|
465
|
+
if (value && value !== undefined && value != null && value.length > 0) {
|
|
466
|
+
this._listSelectData = value;
|
|
467
|
+
this._listSelectData.forEach((item) => {
|
|
468
|
+
this.listDataCheckedId[item[this.pageConfig.primary.key]] = true;
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
this._listSelectData = [];
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
get selectData() {
|
|
476
|
+
return this._listSelectData;
|
|
477
|
+
}
|
|
478
|
+
operationClick = new EventEmitter();
|
|
479
|
+
rowRuleClick = new EventEmitter();
|
|
480
|
+
componentClick = new EventEmitter();
|
|
481
|
+
/**
|
|
482
|
+
* 当选中项变化时的回调函数
|
|
483
|
+
*/
|
|
484
|
+
selectChange = new EventEmitter();
|
|
485
|
+
listDataCheckedId = {};
|
|
486
|
+
constructor(cardSrv) {
|
|
487
|
+
this.cardSrv = cardSrv;
|
|
488
|
+
}
|
|
489
|
+
ngOnInit() { }
|
|
490
|
+
ngAfterViewInit() { }
|
|
491
|
+
ngOnChanges(change) { }
|
|
492
|
+
buttonEvent(e) {
|
|
493
|
+
this.operationClick.emit(e);
|
|
494
|
+
}
|
|
495
|
+
rowRuleEvent(e) {
|
|
496
|
+
this.rowRuleClick.emit(e);
|
|
497
|
+
}
|
|
498
|
+
componentEvent(e) {
|
|
499
|
+
this.componentClick.emit(e);
|
|
500
|
+
}
|
|
501
|
+
selectEvent(e) {
|
|
502
|
+
Object.keys(this.listDataCheckedId).forEach((id) => {
|
|
503
|
+
let ischeck = this.listDataCheckedId[id];
|
|
504
|
+
if (ischeck) {
|
|
505
|
+
if (this._listSelectData.some((item) => item[this.pageConfig.primary.key] === id)) {
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
this.nzData.forEach((item) => {
|
|
509
|
+
if (item[this.pageConfig.primary.key] === id) {
|
|
510
|
+
let obj = {};
|
|
511
|
+
obj[this.pageConfig.primary.key] = id;
|
|
512
|
+
obj[this.pageConfig.primary.name] = _.get(item, this.pageConfig.primary.name);
|
|
513
|
+
obj['rowData'] = _.cloneDeep(item);
|
|
514
|
+
this._listSelectData.push(obj);
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
this._listSelectData.forEach((item, index, object) => {
|
|
521
|
+
if (item[this.pageConfig.primary.key] === id) {
|
|
522
|
+
object.splice(index, 1);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
this.selectChange.emit(this.selectData);
|
|
528
|
+
}
|
|
529
|
+
initHeaderData(list) {
|
|
530
|
+
if (list != undefined && list != null && Array.isArray(list) && list.length > 0) {
|
|
531
|
+
list.forEach((item) => {
|
|
532
|
+
if (item.id != undefined && item.id != null) {
|
|
533
|
+
if (this.cardSrv.header && this.cardSrv.header.length > 0) {
|
|
534
|
+
let arr = this.cardSrv.header.filter((e) => {
|
|
535
|
+
return e.layoutId == item.id;
|
|
536
|
+
});
|
|
537
|
+
if (arr != null && arr.length > 0) {
|
|
538
|
+
if (arr.some((e) => {
|
|
539
|
+
return e.layoutType == 'list';
|
|
540
|
+
})) {
|
|
541
|
+
item.fieldList = arr;
|
|
542
|
+
item.type = 'list';
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
let findData = arr[0];
|
|
546
|
+
if (findData.layoutType != null) {
|
|
547
|
+
item.type = findData.layoutType;
|
|
548
|
+
}
|
|
549
|
+
item.fieldInfo = findData;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
if (item.child != undefined && item.child != null) {
|
|
555
|
+
this.initHeaderData(item.child);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramDeonCardComponent, deps: [{ token: CardService }], target: i0.ɵɵFactoryTarget.Component });
|
|
561
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GramDeonCardComponent, isStandalone: true, selector: "gram-card", inputs: { id: "id", loading: "loading", pageConfig: "pageConfig", cardConfig: "cardConfig", header: "header", total: "total", nzData: "nzData", selectData: "selectData" }, outputs: { operationClick: "operationClick", rowRuleClick: "rowRuleClick", componentClick: "componentClick", selectChange: "selectChange" }, providers: [CardService], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"nzData && nzData.length>0;else noResult\">\n <div class=\"card-list\" [ngClass]=\"{'imgText-list':cardConfig?.secondType=='IMG_TEXT'}\">\n <ng-container [ngSwitch]=\"cardConfig?.secondType\">\n <ng-container *ngSwitchCase=\"'IMG_TEXT'\">\n <ng-container *ngFor=\"let item of nzData\">\n <column-img [listDataCheckedId]=\"listDataCheckedId\" [data]=\"item\" (operationClick)=\"buttonEvent($event)\"\n (rowRuleClick)=\"rowRuleEvent($event)\" (componentClick)=\"componentEvent($event)\"\n (selectChange)=\"selectEvent($event)\" [style.width.px]=\"cardConfig.width\"\n [style.min-height.px]=\"cardConfig.height\" [ngClass]=\"cardConfig?.imgType+'_box'\"></column-img>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngFor=\"let item of nzData\">\n <column-default [listDataCheckedId]=\"listDataCheckedId\" [data]=\"item\" (operationClick)=\"buttonEvent($event)\"\n (rowRuleClick)=\"rowRuleEvent($event)\" (componentClick)=\"componentEvent($event)\"\n (selectChange)=\"selectEvent($event)\"></column-default>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n<ng-template #noResult>\n <div class=\"card-list\" [ngClass]=\"{'empty-list':loading!=true}\">\n <gram-empty *ngIf=\"loading!=true\"></gram-empty>\n </div>\n</ng-template>", styles: [":host ::ng-deep{display:flex;flex-direction:column;overflow:hidden}:host ::ng-deep .empty-list{display:flex;height:100%}:host ::ng-deep .pipe-box div{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}:host ::ng-deep .title{white-space:nowrap}:host ::ng-deep .text-info{flex:1}:host ::ng-deep .img3_box .column-checkbox{right:0!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramDeonEmptyModule }, { kind: "component", type: i3$2.BaseEmptyComponent, selector: "gram-empty", inputs: ["desc", "state"], outputs: ["emptyClick"] }, { kind: "component", type: ColumnImgComponent, selector: "column-img", inputs: ["listDataCheckedId", "data"], outputs: ["operationClick", "rowRuleClick", "componentClick", "selectChange"] }, { kind: "component", type: ColumnDefaultComponent, selector: "column-default", inputs: ["listDataCheckedId", "data"], outputs: ["operationClick", "rowRuleClick", "componentClick", "selectChange"] }] });
|
|
562
|
+
}
|
|
563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramDeonCardComponent, decorators: [{
|
|
564
|
+
type: Component,
|
|
565
|
+
args: [{ selector: 'gram-card', providers: [CardService], imports: [
|
|
566
|
+
CommonModule,
|
|
567
|
+
FormsModule,
|
|
568
|
+
ReactiveFormsModule,
|
|
569
|
+
GramDeonEmptyModule,
|
|
570
|
+
ColumnImgComponent,
|
|
571
|
+
ColumnDefaultComponent
|
|
572
|
+
], template: "<ng-container *ngIf=\"nzData && nzData.length>0;else noResult\">\n <div class=\"card-list\" [ngClass]=\"{'imgText-list':cardConfig?.secondType=='IMG_TEXT'}\">\n <ng-container [ngSwitch]=\"cardConfig?.secondType\">\n <ng-container *ngSwitchCase=\"'IMG_TEXT'\">\n <ng-container *ngFor=\"let item of nzData\">\n <column-img [listDataCheckedId]=\"listDataCheckedId\" [data]=\"item\" (operationClick)=\"buttonEvent($event)\"\n (rowRuleClick)=\"rowRuleEvent($event)\" (componentClick)=\"componentEvent($event)\"\n (selectChange)=\"selectEvent($event)\" [style.width.px]=\"cardConfig.width\"\n [style.min-height.px]=\"cardConfig.height\" [ngClass]=\"cardConfig?.imgType+'_box'\"></column-img>\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngFor=\"let item of nzData\">\n <column-default [listDataCheckedId]=\"listDataCheckedId\" [data]=\"item\" (operationClick)=\"buttonEvent($event)\"\n (rowRuleClick)=\"rowRuleEvent($event)\" (componentClick)=\"componentEvent($event)\"\n (selectChange)=\"selectEvent($event)\"></column-default>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n<ng-template #noResult>\n <div class=\"card-list\" [ngClass]=\"{'empty-list':loading!=true}\">\n <gram-empty *ngIf=\"loading!=true\"></gram-empty>\n </div>\n</ng-template>", styles: [":host ::ng-deep{display:flex;flex-direction:column;overflow:hidden}:host ::ng-deep .empty-list{display:flex;height:100%}:host ::ng-deep .pipe-box div{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1;-webkit-box-orient:vertical}:host ::ng-deep .title{white-space:nowrap}:host ::ng-deep .text-info{flex:1}:host ::ng-deep .img3_box .column-checkbox{right:0!important}\n"] }]
|
|
573
|
+
}], ctorParameters: () => [{ type: CardService }], propDecorators: { id: [{
|
|
574
|
+
type: Input
|
|
575
|
+
}], loading: [{
|
|
576
|
+
type: Input
|
|
577
|
+
}], pageConfig: [{
|
|
578
|
+
type: Input
|
|
579
|
+
}], cardConfig: [{
|
|
580
|
+
type: Input
|
|
581
|
+
}], header: [{
|
|
582
|
+
type: Input
|
|
583
|
+
}], total: [{
|
|
584
|
+
type: Input
|
|
585
|
+
}], nzData: [{
|
|
586
|
+
type: Input
|
|
587
|
+
}], selectData: [{
|
|
588
|
+
type: Input
|
|
589
|
+
}], operationClick: [{
|
|
590
|
+
type: Output
|
|
591
|
+
}], rowRuleClick: [{
|
|
592
|
+
type: Output
|
|
593
|
+
}], componentClick: [{
|
|
594
|
+
type: Output
|
|
595
|
+
}], selectChange: [{
|
|
596
|
+
type: Output
|
|
597
|
+
}] } });
|
|
598
|
+
|
|
599
|
+
class CardDesignTextComponent {
|
|
600
|
+
data = null;
|
|
601
|
+
ngOnInit() { }
|
|
602
|
+
ngAfterViewInit() { }
|
|
603
|
+
ngOnChanges(change) { }
|
|
604
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CardDesignTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
605
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: CardDesignTextComponent, isStandalone: true, selector: "design-text", inputs: { data: "data" }, usesOnChanges: true, ngImport: i0, template: "<div>\n <i nz-icon nzType=\"plus-circle\"></i>\n</div>", styles: [":host ::ng-deep{display:inline-block;padding:10px 18px;background:#edeff3;border-radius:4px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i7.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }] });
|
|
606
|
+
}
|
|
607
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CardDesignTextComponent, decorators: [{
|
|
608
|
+
type: Component,
|
|
609
|
+
args: [{ selector: 'design-text', imports: [
|
|
610
|
+
CommonModule,
|
|
611
|
+
NzIconModule
|
|
612
|
+
], template: "<div>\n <i nz-icon nzType=\"plus-circle\"></i>\n</div>", styles: [":host ::ng-deep{display:inline-block;padding:10px 18px;background:#edeff3;border-radius:4px}\n"] }]
|
|
613
|
+
}], propDecorators: { data: [{
|
|
614
|
+
type: Input
|
|
615
|
+
}] } });
|
|
616
|
+
|
|
617
|
+
class GramDeonCardDesignComponent {
|
|
618
|
+
data = [];
|
|
619
|
+
ngOnInit() { }
|
|
620
|
+
ngAfterViewInit() { }
|
|
621
|
+
ngOnChanges(change) { }
|
|
622
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramDeonCardDesignComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
623
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GramDeonCardDesignComponent, isStandalone: true, selector: "card-design", inputs: { data: "data" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"data!! && data.length>0\">\n <div class=\"column-box\">\n <ng-container *ngFor=\"let item of data\">\n <ng-container [ngSwitch]=\"item.type\">\n <ng-container *ngSwitchCase=\"'column-a'\">\n <div class=\"column-a\">\n <ul>\n <li *ngFor=\"let column of item.child\">\n <design-text [data]=\"column\"></design-text>\n </li>\n </ul>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'column-b'\">\n <div class=\"column-b\">\n <ng-container *ngFor=\"let d of item.child\">\n <div [ngClass]=\"d.type\">\n <ul>\n <li *ngFor=\"let column of d.child\">\n <design-text [data]=\"column\"></design-text>\n </li>\n </ul>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'column-c'\">\n <div class=\"column-c\">\n <ng-container *ngFor=\"let d of item.child\">\n <div [ngClass]=\"d.type\">\n <ul>\n <li *ngFor=\"let column of d.child\">\n <design-text [data]=\"column\"></design-text>\n </li>\n </ul>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n</ng-container>", styles: [":host ::ng-deep{display:flex;flex-direction:column;padding:20px;background:#f5f6f8}:host ::ng-deep .column-box{display:flex;flex-direction:column;padding:15px;background:#fff;border-radius:8px}:host ::ng-deep .column-a,:host ::ng-deep .column-b,:host ::ng-deep .column-c{display:flex;flex-direction:row;width:100%;min-height:20px}:host ::ng-deep .column-b .left{width:250px}:host ::ng-deep .column-b .right{flex:1}:host ::ng-deep .column-c .left{flex:10}:host ::ng-deep .column-c .right{flex:2}:host ::ng-deep ul{display:flex;flex:1;flex-direction:row;align-items:center;justify-items:center;height:100%;margin:0;padding:0;list-style:none}:host ::ng-deep ul li{display:inline-block;flex:1;text-align:left}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: CardDesignTextComponent, selector: "design-text", inputs: ["data"] }] });
|
|
624
|
+
}
|
|
625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramDeonCardDesignComponent, decorators: [{
|
|
626
|
+
type: Component,
|
|
627
|
+
args: [{ selector: 'card-design', imports: [
|
|
628
|
+
CommonModule,
|
|
629
|
+
FormsModule,
|
|
630
|
+
ReactiveFormsModule,
|
|
631
|
+
CardDesignTextComponent
|
|
632
|
+
], template: "<ng-container *ngIf=\"data!! && data.length>0\">\n <div class=\"column-box\">\n <ng-container *ngFor=\"let item of data\">\n <ng-container [ngSwitch]=\"item.type\">\n <ng-container *ngSwitchCase=\"'column-a'\">\n <div class=\"column-a\">\n <ul>\n <li *ngFor=\"let column of item.child\">\n <design-text [data]=\"column\"></design-text>\n </li>\n </ul>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'column-b'\">\n <div class=\"column-b\">\n <ng-container *ngFor=\"let d of item.child\">\n <div [ngClass]=\"d.type\">\n <ul>\n <li *ngFor=\"let column of d.child\">\n <design-text [data]=\"column\"></design-text>\n </li>\n </ul>\n </div>\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'column-c'\">\n <div class=\"column-c\">\n <ng-container *ngFor=\"let d of item.child\">\n <div [ngClass]=\"d.type\">\n <ul>\n <li *ngFor=\"let column of d.child\">\n <design-text [data]=\"column\"></design-text>\n </li>\n </ul>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n</ng-container>", styles: [":host ::ng-deep{display:flex;flex-direction:column;padding:20px;background:#f5f6f8}:host ::ng-deep .column-box{display:flex;flex-direction:column;padding:15px;background:#fff;border-radius:8px}:host ::ng-deep .column-a,:host ::ng-deep .column-b,:host ::ng-deep .column-c{display:flex;flex-direction:row;width:100%;min-height:20px}:host ::ng-deep .column-b .left{width:250px}:host ::ng-deep .column-b .right{flex:1}:host ::ng-deep .column-c .left{flex:10}:host ::ng-deep .column-c .right{flex:2}:host ::ng-deep ul{display:flex;flex:1;flex-direction:row;align-items:center;justify-items:center;height:100%;margin:0;padding:0;list-style:none}:host ::ng-deep ul li{display:inline-block;flex:1;text-align:left}\n"] }]
|
|
633
|
+
}], propDecorators: { data: [{
|
|
634
|
+
type: Input
|
|
635
|
+
}] } });
|
|
636
|
+
|
|
637
|
+
const components = [
|
|
638
|
+
GramDeonCardComponent,
|
|
639
|
+
GramDeonCardDesignComponent,
|
|
640
|
+
ItemTextComponent,
|
|
641
|
+
ItemGroupComponent,
|
|
642
|
+
CardDesignTextComponent
|
|
643
|
+
];
|
|
644
|
+
class GramDeonCardModule {
|
|
645
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramDeonCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
646
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: GramDeonCardModule, imports: [GramDeonCardComponent,
|
|
647
|
+
GramDeonCardDesignComponent,
|
|
648
|
+
ItemTextComponent,
|
|
649
|
+
ItemGroupComponent,
|
|
650
|
+
CardDesignTextComponent], exports: [GramDeonCardComponent,
|
|
651
|
+
GramDeonCardDesignComponent,
|
|
652
|
+
ItemTextComponent,
|
|
653
|
+
ItemGroupComponent,
|
|
654
|
+
CardDesignTextComponent] });
|
|
655
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramDeonCardModule, imports: [components] });
|
|
656
|
+
}
|
|
657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramDeonCardModule, decorators: [{
|
|
658
|
+
type: NgModule,
|
|
659
|
+
args: [{
|
|
660
|
+
imports: [...components],
|
|
661
|
+
exports: [...components], // 导出所有组件
|
|
662
|
+
}]
|
|
663
|
+
}] });
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Generated bundle index. Do not edit.
|
|
667
|
+
*/
|
|
668
|
+
|
|
669
|
+
export { CardDesignTextComponent, GramDeonCardComponent, GramDeonCardDesignComponent, GramDeonCardModule, ItemGroupComponent, ItemTextComponent };
|
|
670
|
+
//# sourceMappingURL=components.card.mjs.map
|