atr-components 0.0.21 → 0.1.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/atr-components.d.ts +1 -1
- package/{public-api.d.ts → atr-public-api.d.ts} +13 -0
- package/esm2020/atr-components.mjs +2 -2
- package/esm2020/atr-public-api.mjs +45 -0
- package/esm2020/core/directive/role.directive.mjs +1 -4
- package/esm2020/lib/shared/atr-shared.module.mjs +184 -0
- package/esm2020/lib/shared/form/form.component.mjs +374 -0
- package/esm2020/lib/shared/local-upload/local-upload.component.mjs +40 -0
- package/esm2020/lib/shared/quill-editor/quill-editor.component.mjs +166 -0
- package/esm2020/lib/shared/select-tree/select-tree.component.mjs +55 -0
- package/esm2020/lib/shared/service/busi.service.mjs +69 -0
- package/esm2020/lib/shared/share.service.mjs +107 -0
- package/esm2020/lib/shared/table/table-form-item/table-form-item.component.mjs +96 -0
- package/esm2020/lib/shared/table/table-td/table-td.component.mjs +137 -0
- package/esm2020/lib/shared/table/table.component.mjs +672 -0
- package/esm2020/lib/shared/upload/upload.component.mjs +221 -0
- package/esm2020/lib/shared/validators/atr-validtors.mjs +9 -0
- package/esm2020/lib/shared/video/video.component.mjs +15 -0
- package/esm2020/public-api.mjs +13 -1
- package/fesm2015/atr-components.mjs +2031 -11
- package/fesm2015/atr-components.mjs.map +1 -1
- package/fesm2020/atr-components.mjs +2019 -11
- package/fesm2020/atr-components.mjs.map +1 -1
- package/lib/shared/atr-shared.module.d.ts +25 -0
- package/lib/shared/form/form.component.d.ts +34 -0
- package/lib/shared/local-upload/local-upload.component.d.ts +19 -0
- package/lib/shared/quill-editor/quill-editor.component.d.ts +37 -0
- package/lib/shared/select-tree/select-tree.component.d.ts +23 -0
- package/lib/shared/service/busi.service.d.ts +20 -0
- package/lib/shared/share.service.d.ts +14 -0
- package/lib/shared/table/table-form-item/table-form-item.component.d.ts +25 -0
- package/lib/shared/table/table-td/table-td.component.d.ts +21 -0
- package/lib/shared/table/table.component.d.ts +88 -0
- package/lib/shared/upload/upload.component.d.ts +46 -0
- package/lib/shared/validators/atr-validtors.d.ts +2 -0
- package/lib/shared/video/video.component.d.ts +7 -0
- package/package.json +1 -1
- package/esm2020/core/utils/AtrTools.util.mjs +0 -270
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { animation, style, animate, trigger, state, transition, keyframes } from '@angular/animations';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, EventEmitter, NgModule, Directive, Input, HostListener, Pipe, Component } from '@angular/core';
|
|
3
|
+
import { Injectable, EventEmitter, NgModule, Directive, Input, HostListener, Pipe, Component, forwardRef, Output, LOCALE_ID, Inject, ViewChild } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/common/http';
|
|
5
5
|
import { HttpHeaders, HttpRequest, HttpEventType, HttpErrorResponse, HttpResponse, HttpResponseBase } from '@angular/common/http';
|
|
6
|
-
import { Observable, throwError, of } from 'rxjs';
|
|
7
|
-
import { mergeMap, catchError } from 'rxjs/operators';
|
|
6
|
+
import { Observable, throwError, of, Subject } from 'rxjs';
|
|
7
|
+
import { mergeMap, catchError, debounceTime } from 'rxjs/operators';
|
|
8
8
|
import * as i1$1 from '@angular/router';
|
|
9
|
-
import { Router } from '@angular/router';
|
|
9
|
+
import { Router, RouterModule } from '@angular/router';
|
|
10
10
|
import { NzNotificationService, NzNotificationModule } from 'ng-zorro-antd/notification';
|
|
11
|
+
import * as i2$4 from 'ng-zorro-antd/message';
|
|
11
12
|
import { NzMessageService, NzMessageModule } from 'ng-zorro-antd/message';
|
|
12
|
-
import
|
|
13
|
+
import * as i1$2 from '@angular/forms';
|
|
14
|
+
import { Validators, FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormControl } from '@angular/forms';
|
|
13
15
|
import { NzAffixModule } from 'ng-zorro-antd/affix';
|
|
14
16
|
import { NzAlertModule } from 'ng-zorro-antd/alert';
|
|
15
17
|
import { NzAnchorModule } from 'ng-zorro-antd/anchor';
|
|
@@ -18,42 +20,58 @@ import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
|
|
18
20
|
import { NzBackTopModule } from 'ng-zorro-antd/back-top';
|
|
19
21
|
import { NzBadgeModule } from 'ng-zorro-antd/badge';
|
|
20
22
|
import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
|
|
23
|
+
import * as i2$2 from 'ng-zorro-antd/button';
|
|
21
24
|
import { NzButtonModule } from 'ng-zorro-antd/button';
|
|
22
25
|
import { NzCalendarModule } from 'ng-zorro-antd/calendar';
|
|
23
26
|
import { NzCardModule } from 'ng-zorro-antd/card';
|
|
24
27
|
import { NzCarouselModule } from 'ng-zorro-antd/carousel';
|
|
28
|
+
import * as i4$1 from 'ng-zorro-antd/cascader';
|
|
25
29
|
import { NzCascaderModule } from 'ng-zorro-antd/cascader';
|
|
30
|
+
import * as i9$1 from 'ng-zorro-antd/checkbox';
|
|
26
31
|
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
27
32
|
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
28
33
|
import { NzCommentModule } from 'ng-zorro-antd/comment';
|
|
29
34
|
import { NzNoAnimationModule } from 'ng-zorro-antd/core/no-animation';
|
|
30
35
|
import { NzTransButtonModule } from 'ng-zorro-antd/core/trans-button';
|
|
36
|
+
import * as i4$2 from 'ng-zorro-antd/core/wave';
|
|
31
37
|
import { NzWaveModule } from 'ng-zorro-antd/core/wave';
|
|
38
|
+
import * as i6 from 'ng-zorro-antd/date-picker';
|
|
32
39
|
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
33
40
|
import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions';
|
|
34
41
|
import { NzDividerModule } from 'ng-zorro-antd/divider';
|
|
42
|
+
import * as i1$5 from 'ng-zorro-antd/drawer';
|
|
35
43
|
import { NzDrawerModule } from 'ng-zorro-antd/drawer';
|
|
36
|
-
import
|
|
44
|
+
import * as i8$1 from 'ng-zorro-antd/dropdown';
|
|
45
|
+
import { NzDropDownModule, NzContextMenuService } from 'ng-zorro-antd/dropdown';
|
|
37
46
|
import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
47
|
+
import * as i4 from 'ng-zorro-antd/form';
|
|
38
48
|
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
49
|
+
import * as i12 from 'ng-zorro-antd/grid';
|
|
39
50
|
import { NzGridModule } from 'ng-zorro-antd/grid';
|
|
40
51
|
import { NzI18nModule } from 'ng-zorro-antd/i18n';
|
|
52
|
+
import * as i8 from 'ng-zorro-antd/icon';
|
|
41
53
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
54
|
+
import * as i2 from 'ng-zorro-antd/input';
|
|
42
55
|
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
56
|
+
import * as i6$2 from 'ng-zorro-antd/input-number';
|
|
43
57
|
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
44
58
|
import { NzLayoutModule } from 'ng-zorro-antd/layout';
|
|
45
59
|
import { NzListModule } from 'ng-zorro-antd/list';
|
|
46
60
|
import { NzMentionModule } from 'ng-zorro-antd/mention';
|
|
47
61
|
import { NzMenuModule } from 'ng-zorro-antd/menu';
|
|
62
|
+
import * as i2$3 from 'ng-zorro-antd/modal';
|
|
48
63
|
import { NzModalModule } from 'ng-zorro-antd/modal';
|
|
49
64
|
import { NzPageHeaderModule } from 'ng-zorro-antd/page-header';
|
|
50
65
|
import { NzPaginationModule } from 'ng-zorro-antd/pagination';
|
|
51
66
|
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
|
|
67
|
+
import * as i3$1 from 'ng-zorro-antd/popover';
|
|
52
68
|
import { NzPopoverModule } from 'ng-zorro-antd/popover';
|
|
53
69
|
import { NzProgressModule } from 'ng-zorro-antd/progress';
|
|
70
|
+
import * as i7 from 'ng-zorro-antd/radio';
|
|
54
71
|
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
55
72
|
import { NzRateModule } from 'ng-zorro-antd/rate';
|
|
56
73
|
import { NzResultModule } from 'ng-zorro-antd/result';
|
|
74
|
+
import * as i3 from 'ng-zorro-antd/select';
|
|
57
75
|
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
58
76
|
import { NzSkeletonModule } from 'ng-zorro-antd/skeleton';
|
|
59
77
|
import { NzSliderModule } from 'ng-zorro-antd/slider';
|
|
@@ -61,6 +79,7 @@ import { NzSpinModule } from 'ng-zorro-antd/spin';
|
|
|
61
79
|
import { NzStatisticModule } from 'ng-zorro-antd/statistic';
|
|
62
80
|
import { NzStepsModule } from 'ng-zorro-antd/steps';
|
|
63
81
|
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
82
|
+
import * as i5$1 from 'ng-zorro-antd/table';
|
|
64
83
|
import { NzTableModule } from 'ng-zorro-antd/table';
|
|
65
84
|
import { NzTabsModule } from 'ng-zorro-antd/tabs';
|
|
66
85
|
import { NzTagModule } from 'ng-zorro-antd/tag';
|
|
@@ -69,14 +88,29 @@ import { NzTimelineModule } from 'ng-zorro-antd/timeline';
|
|
|
69
88
|
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
|
|
70
89
|
import { NzTransferModule } from 'ng-zorro-antd/transfer';
|
|
71
90
|
import { NzTreeModule } from 'ng-zorro-antd/tree';
|
|
91
|
+
import * as i5 from 'ng-zorro-antd/tree-select';
|
|
72
92
|
import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';
|
|
73
93
|
import { NzTypographyModule } from 'ng-zorro-antd/typography';
|
|
94
|
+
import * as i1$3 from 'ng-zorro-antd/upload';
|
|
74
95
|
import { NzUploadModule } from 'ng-zorro-antd/upload';
|
|
96
|
+
import * as i6$1 from 'ng-zorro-antd/resizable';
|
|
75
97
|
import { NzResizableModule } from 'ng-zorro-antd/resizable';
|
|
76
|
-
import
|
|
98
|
+
import * as i2$1 from '@angular/common';
|
|
99
|
+
import { CommonModule, formatDate, registerLocaleData } from '@angular/common';
|
|
77
100
|
import { NzSpaceModule } from 'ng-zorro-antd/space';
|
|
101
|
+
import * as i4$3 from 'ng-zorro-antd/image';
|
|
78
102
|
import { NzImageModule } from 'ng-zorro-antd/image';
|
|
79
103
|
import { __awaiter } from 'tslib';
|
|
104
|
+
import * as i17 from '@angular/cdk/drag-drop';
|
|
105
|
+
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
106
|
+
import * as i9 from 'ng-zorro-antd/core/transition-patch';
|
|
107
|
+
import * as i1$4 from 'ngx-videogular';
|
|
108
|
+
import { VgCoreModule, VgControlsModule, VgOverlayPlayModule, VgBufferingModule } from 'ngx-videogular';
|
|
109
|
+
import zh from '@angular/common/locales/zh';
|
|
110
|
+
import * as i3$2 from 'ngx-quill';
|
|
111
|
+
import { QuillModule } from 'ngx-quill';
|
|
112
|
+
import Quill from 'quill';
|
|
113
|
+
import ImageResize from 'quill-image-resize-module';
|
|
80
114
|
|
|
81
115
|
const transAnimation = animation([
|
|
82
116
|
style({
|
|
@@ -1298,7 +1332,6 @@ class AtrRoleDirective {
|
|
|
1298
1332
|
this.hasView = false;
|
|
1299
1333
|
}
|
|
1300
1334
|
set atrRole(condition) {
|
|
1301
|
-
console.log('atrRole role', condition);
|
|
1302
1335
|
if (ToolsUtil.isNull(condition)) {
|
|
1303
1336
|
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
1304
1337
|
this.hasView = true;
|
|
@@ -1310,9 +1343,7 @@ class AtrRoleDirective {
|
|
|
1310
1343
|
return;
|
|
1311
1344
|
}
|
|
1312
1345
|
let curPath = this.getRouterUrl();
|
|
1313
|
-
console.log('atrRole curPath', curPath);
|
|
1314
1346
|
this.menuService.getCurMenu(curPath).subscribe(result => {
|
|
1315
|
-
console.log('atrRole getCurMenu', result);
|
|
1316
1347
|
let curMenu = result;
|
|
1317
1348
|
let isExited = false;
|
|
1318
1349
|
if (curMenu && curMenu != null && curMenu.operation) {
|
|
@@ -1833,6 +1864,1995 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1833
1864
|
type: Injectable
|
|
1834
1865
|
}], ctorParameters: function () { return [{ type: HttpService }, { type: i1.HttpClient }]; } });
|
|
1835
1866
|
|
|
1867
|
+
class TableFormItemComponent {
|
|
1868
|
+
constructor() {
|
|
1869
|
+
this.dictList = [];
|
|
1870
|
+
this.headerAction = new EventEmitter();
|
|
1871
|
+
this.isNull = ToolsUtil.isNull;
|
|
1872
|
+
}
|
|
1873
|
+
ngOnInit() {
|
|
1874
|
+
}
|
|
1875
|
+
writeValue(value) {
|
|
1876
|
+
this.value = value;
|
|
1877
|
+
}
|
|
1878
|
+
registerOnChange(fn) {
|
|
1879
|
+
console.log('registerOnChange');
|
|
1880
|
+
this.onChangeListener = fn;
|
|
1881
|
+
}
|
|
1882
|
+
registerOnTouched(fn) {
|
|
1883
|
+
console.log('registerOnTouched');
|
|
1884
|
+
this.onTouchedListener = fn;
|
|
1885
|
+
}
|
|
1886
|
+
setDisabledState(isDisabled) {
|
|
1887
|
+
}
|
|
1888
|
+
onChange(e) {
|
|
1889
|
+
console.log('form change', this.value);
|
|
1890
|
+
console.log('form change e', e);
|
|
1891
|
+
if (this.onChangeListener) {
|
|
1892
|
+
this.onChangeListener(e); // 告诉form,你的表单值改变成了payload
|
|
1893
|
+
}
|
|
1894
|
+
if (this.onTouchedListener) {
|
|
1895
|
+
this.onTouchedListener(); // 告诉form,你的表单有交互发生
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
selectChange(value, item) {
|
|
1899
|
+
//console.log(value);
|
|
1900
|
+
let action = {
|
|
1901
|
+
name: item.label,
|
|
1902
|
+
code: item.key,
|
|
1903
|
+
data: item,
|
|
1904
|
+
value: value,
|
|
1905
|
+
};
|
|
1906
|
+
this.headerAction.emit(action);
|
|
1907
|
+
}
|
|
1908
|
+
clickIcon(value, item, $event) {
|
|
1909
|
+
var _a, _b;
|
|
1910
|
+
$event.stopPropagation();
|
|
1911
|
+
//console.log(value,item);
|
|
1912
|
+
let action = {
|
|
1913
|
+
name: item.name,
|
|
1914
|
+
code: ((_a = item.icon) === null || _a === void 0 ? void 0 : _a.code) ? (_b = item.icon) === null || _b === void 0 ? void 0 : _b.code : "",
|
|
1915
|
+
data: item,
|
|
1916
|
+
value: value,
|
|
1917
|
+
};
|
|
1918
|
+
this.headerAction.emit(action);
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
TableFormItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableFormItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1922
|
+
TableFormItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TableFormItemComponent, selector: "app-table-form-item", inputs: { header: "header", value: "value", dictList: "dictList" }, outputs: { headerAction: "headerAction" }, providers: [
|
|
1923
|
+
{
|
|
1924
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1925
|
+
useExisting: forwardRef(() => TableFormItemComponent),
|
|
1926
|
+
multi: true
|
|
1927
|
+
}
|
|
1928
|
+
], ngImport: i0, template: "<nz-form-item style=\"position: relative\" title=\"{{header.name}}\" nzFlex>\n <nz-form-control [nzSpan]=\"header.cspan || 24\" [ngSwitch]=\"header.type\">\n <nz-input-group [nzSuffix]=\"inputClearTpl\" *ngSwitchCase=\"'text'\">\n <input\n nz-input\n placeholder=\"{{header.name}}\"\n [attr.id]=\"header.key\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n />\n\n </nz-input-group>\n\n <nz-select *ngSwitchCase=\"'select'\"\n [nzAllowClear]=\"!header.disableClear\"\n nzPlaceHolder=\"{{header.name}}\"\n nzAllowClear=\"true\"\n nzServerSearch\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n >\n <nz-option *ngFor=\"let o of dictList\" [nzLabel]=\"o.typeName\"\n [nzValue]=\"o.id\"></nz-option>\n </nz-select>\n <nz-select *ngSwitchCase=\"'selectCus'\"\n [nzAllowClear]=\"!header.disableClear\"\n nzPlaceHolder=\"{{header.name}}\"\n nzAllowClear=\"true\"\n [nzShowSearch]=\"true\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n >\n <nz-option *ngFor=\"let o of header.dictList\" nzCustomContent [nzLabel]=\"o.label\"\n [nzValue]=\"o.value\">\n <i class=\"select-icon\" *ngIf=\"header.icon?.isShow\" nz-icon [nzType]=\"header.icon.icon\"\n nzTheme=\"outline\" style=\"margin-right: 1rem;\"\n (click)=\"clickIcon(o.value,header,$event)\"></i>\n {{o.label}}\n </nz-option>\n\n </nz-select>\n <nz-cascader\n *ngSwitchCase=\"'cascader'\"\n (ngModelChange)=\"onChange($event)\"\n style=\"flex: 1\" [nzAllowClear]=\"!header.disableClear\"\n nzPlaceHolder=\"{{header.name}}\"\n [nzShowSearch]=\"true\"\n [nzOptions]=\"header.dictList\"\n [(ngModel)]=\"value\"\n ></nz-cascader>\n <nz-tree-select\n *ngSwitchCase=\"'treeSelect'\"\n (ngModelChange)=\"onChange($event)\"\n [nzAllowClear]=\"!header.disableClear\"\n [nzNodes]=\"header.treeList\"\n nzShowSearch=\"true\"\n nzHideUnMatched=\"true\"\n nzPlaceHolder=\"{{header.name}}\"\n [nzShowSearch]=\"true\"\n [(ngModel)]=\"value\"\n [nzMultiple]=\"header.selectUrl.isMultiple\"\n [nzMaxTagCount]=\"header.maxTagCount || 3\"\n >\n </nz-tree-select>\n <nz-range-picker\n *ngSwitchCase=\"'dateRange'\"\n (ngModelChange)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n style=\"width: 100%;\"\n nzAllowClear=\"true\"\n [nzPlaceHolder]=\"[header.name+'\u5F00\u59CB\u65F6\u95F4','\u7ED3\u675F\u65F6\u95F4']\"\n [nzDefaultPickerValue]=\"header.defaultVal\"></nz-range-picker>\n <ng-container *ngSwitchCase=\"'sdate'\">\n <nz-date-picker style=\"width: 100%\" [nzFormat]=\"'yyyy-MM-dd'\"\n (ngModelChange)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n *ngIf=\"!header.dateMode\"\n nzAllowClear=\"true\"></nz-date-picker>\n <nz-date-picker style=\"width: 100%\"\n (ngModelChange)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n *ngIf=\"header.dateMode\"\n [nzMode]=\"header.dateMode\"\n nzAllowClear=\"true\"></nz-date-picker>\n </ng-container>\n <nz-month-picker\n *ngSwitchCase=\"'smonth'\"\n (ngModelChange)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n [nzFormat]=\"'yyyy-MM'\"\n [nzPlaceHolder]=\"[header.name]\"\n nzAllowClear=\"true\"></nz-month-picker>\n <span class=\"label-title\">{{header.name}}</span>\n </nz-form-control>\n</nz-form-item>\n\n<ng-template #inputClearTpl>\n <i nz-icon class=\"ant-input-clear-icon\" nzTheme=\"fill\" nzType=\"close-circle\"\n *ngIf=\"!header.disableClear && value|isNotEmpty\" (click)=\"value = null;onChange()\"></i>\n</ng-template>\n", styles: [":host{margin-bottom:5px}:host .label-title{z-index:80}\n", ":host{width:100%;height:100%;display:flex;flex-direction:column}::ng-deep .ant-modal{top:50px;padding:0}.ant-advanced-search-form{padding:10px 6px 6px;background:#fbfbfb;border:1px solid #d9d9d9;border-radius:6px;margin-bottom:5px}.select-icon:hover{color:#1890ff}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:5px}::ng-deep .ant-table-column-title{font-size:.65rem}::ng-deep .ant-table-tbody>tr.ant-table-row:hover>td{background:#d0eeea}::ng-deep .ant-modal-header,::ng-deep .ant-modal-content{border-radius:4px}::ng-deep .ant-table-tbody>tr.selected:hover>td{background-color:#cfe1d0!important}::ng-deep .ant-table{height:100%}::ng-deep nz-pagination{position:absolute;bottom:0;right:0}.search-result-list{padding:1px;border:1px dashed #e9e9e9;border-radius:6px;background-color:#fff;flex:1;text-align:center;position:relative}[nz-form-label]{overflow:visible}button{margin:2px 4px}.collapse{margin-left:6px;font-size:12px}.action-area{text-align:left}.search-area{text-align:right}::ng-deep .main-table{position:absolute;top:0;left:0;right:0;bottom:0}::ng-deep .main-table .ant-spin-nested-loading{height:100%}::ng-deep .main-table .ant-spin-container{height:100%}::ng-deep .ant-table-tbody>tr.selected>td{background-color:#cfe1d0}::ng-deep .ant-table-tbody>tr>td>img{display:block;width:40%;margin:0 auto}::ng-deep .ant-table-body{-ms-overflow-style:none;overflow:-moz-scrollbars-none}::ng-deep .ant-table-body::-webkit-scrollbar,::ng-deep .ant-table-header::-webkit-scrollbar{width:6px!important;height:6px!important}::ng-deep .ant-table-body::-webkit-scrollbar-track,::ng-deep .ant-table-header::-webkit-scrollbar-track{width:6px!important;cursor:pointer}::ng-deep .ant-table-body::-webkit-scrollbar-thumb,::ng-deep .ant-table-header::-webkit-scrollbar-thumb{background:#1890ff;border-radius:3px;cursor:pointer}::ng-deep .ant-table-bordered .ant-table-thead>tr>th{border-right:1px solid #ddd}::ng-deep .ant-table-header{-ms-overflow-style:none;overflow:-moz-scrollbars-none;margin-bottom:-5px!important}::ng-deep .ant-table-placeholder{border-bottom:none!important;border-top:none!important}.tabel-colunmn{display:block;width:160px;height:300px;background:#fff;border:1px solid #ddd;padding:10px;border-radius:5px;overflow-x:hidden;overflow-y:auto;position:relative}.tabel-colunmn-header{position:fixed;top:0;left:0;right:0;height:30px;z-index:999;line-height:30px;border-bottom:1px solid #ddd;text-align:left;font-size:13px;padding-left:10px}.t-tr{background:#fff}.t-tr:nth-child(odd){background:#f8f9fa}::ng-deep .ant-table-thead>tr>th{background:#e7ebef!important;border-radius:0;word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-tbody>tr>td{word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-header{background:#e7ebef!important}td{font-size:.65rem}.resize-trigger{height:100%}.nz-resizable-preview{border-width:0;border-right-width:1px}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}::ng-deep .ant-table-tbody>tr>td{padding:5px}::ng-deep .ant-table{line-height:15px}::ng-deep .ant-table-middle .ant-table-footer,.ant-table-middle .ant-table-tbody>tr>td,.ant-table-middle .ant-table-thead>tr>th,.ant-table-middle .ant-table-title{padding:5px}::ng-deep .ant-table-tbody>tr>td>img{width:35px}::ng-deep .ant-modal-body{padding:10px}::ng-deep .ant-table.ant-table-bordered tbody>tr>td{font-size:13px}::ng-deep th{z-index:80!important}.left-zindex-header{z-index:90!important}.left-zindex{z-index:80!important}:host ::ng-deep input,:host ::ng-deep .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,:host ::ng-deep .ant-picker{border-radius:5px}.border-text{width:100%;height:36px;line-height:36px;display:flex}.border-text .border-text-line{display:inline-block;border-top:1px solid #cccccc;margin-top:18px}.border-text .border-text-line-left{width:10px;border-left:1px solid #cccccc}.border-text .border-text-line-right{flex:1;border-right:1px solid #cccccc}.border-text .border-text-span{margin-left:5px;margin-right:5px}.label-title{position:absolute;display:block;top:-7px;left:10px;background-color:#fff;color:#000;font-weight:600;font-size:12px;line-height:12px}:host ::ng-deep .tabel-colunmn-header{position:absolute!important;top:0!important}::ng-deep .ant-table-cell-fix-left,.ant-table-cell-fix-right{position:sticky!important}\n"], components: [{ type: i4.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { type: i4.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { type: i2.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { type: i3.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { type: i3.NzOptionComponent, selector: "nz-option", inputs: ["nzLabel", "nzValue", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { type: i4$1.NzCascaderComponent, selector: "nz-cascader, [nz-cascader]", inputs: ["nzOptionRender", "nzShowInput", "nzShowArrow", "nzAllowClear", "nzAutoFocus", "nzChangeOnSelect", "nzDisabled", "nzColumnClassName", "nzExpandTrigger", "nzValueProperty", "nzLabelRender", "nzLabelProperty", "nzNotFoundContent", "nzSize", "nzBackdrop", "nzShowSearch", "nzPlaceHolder", "nzMenuClassName", "nzMenuStyle", "nzMouseEnterDelay", "nzMouseLeaveDelay", "nzStatus", "nzTriggerAction", "nzChangeOn", "nzLoadData", "nzSuffixIcon", "nzExpandIcon", "nzOptions"], outputs: ["nzVisibleChange", "nzSelectionChange", "nzSelect", "nzClear"], exportAs: ["nzCascader"] }, { type: i5.NzTreeSelectComponent, selector: "nz-tree-select", inputs: ["nzId", "nzAllowClear", "nzShowExpand", "nzShowLine", "nzDropdownMatchSelectWidth", "nzCheckable", "nzHideUnMatched", "nzShowIcon", "nzShowSearch", "nzDisabled", "nzAsyncData", "nzMultiple", "nzDefaultExpandAll", "nzCheckStrictly", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzExpandedIcon", "nzNotFoundContent", "nzNodes", "nzOpen", "nzSize", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzExpandedKeys", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckBoxChange"], exportAs: ["nzTreeSelect"] }, { type: i6.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }], directives: [{ type: i12.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { type: i12.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i9.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { type: i2.NzInputGroupWhitSuffixOrPrefixDirective, selector: "nz-input-group[nzSuffix], nz-input-group[nzPrefix]" }, { type: i2.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { type: i6.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }, { type: i6.NzMonthPickerComponent, selector: "nz-month-picker", exportAs: ["nzMonthPicker"] }], pipes: { "isNotEmpty": IsNotEmptyPipe } });
|
|
1929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableFormItemComponent, decorators: [{
|
|
1930
|
+
type: Component,
|
|
1931
|
+
args: [{ selector: 'app-table-form-item', providers: [
|
|
1932
|
+
{
|
|
1933
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1934
|
+
useExisting: forwardRef(() => TableFormItemComponent),
|
|
1935
|
+
multi: true
|
|
1936
|
+
}
|
|
1937
|
+
], template: "<nz-form-item style=\"position: relative\" title=\"{{header.name}}\" nzFlex>\n <nz-form-control [nzSpan]=\"header.cspan || 24\" [ngSwitch]=\"header.type\">\n <nz-input-group [nzSuffix]=\"inputClearTpl\" *ngSwitchCase=\"'text'\">\n <input\n nz-input\n placeholder=\"{{header.name}}\"\n [attr.id]=\"header.key\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n />\n\n </nz-input-group>\n\n <nz-select *ngSwitchCase=\"'select'\"\n [nzAllowClear]=\"!header.disableClear\"\n nzPlaceHolder=\"{{header.name}}\"\n nzAllowClear=\"true\"\n nzServerSearch\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n >\n <nz-option *ngFor=\"let o of dictList\" [nzLabel]=\"o.typeName\"\n [nzValue]=\"o.id\"></nz-option>\n </nz-select>\n <nz-select *ngSwitchCase=\"'selectCus'\"\n [nzAllowClear]=\"!header.disableClear\"\n nzPlaceHolder=\"{{header.name}}\"\n nzAllowClear=\"true\"\n [nzShowSearch]=\"true\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n >\n <nz-option *ngFor=\"let o of header.dictList\" nzCustomContent [nzLabel]=\"o.label\"\n [nzValue]=\"o.value\">\n <i class=\"select-icon\" *ngIf=\"header.icon?.isShow\" nz-icon [nzType]=\"header.icon.icon\"\n nzTheme=\"outline\" style=\"margin-right: 1rem;\"\n (click)=\"clickIcon(o.value,header,$event)\"></i>\n {{o.label}}\n </nz-option>\n\n </nz-select>\n <nz-cascader\n *ngSwitchCase=\"'cascader'\"\n (ngModelChange)=\"onChange($event)\"\n style=\"flex: 1\" [nzAllowClear]=\"!header.disableClear\"\n nzPlaceHolder=\"{{header.name}}\"\n [nzShowSearch]=\"true\"\n [nzOptions]=\"header.dictList\"\n [(ngModel)]=\"value\"\n ></nz-cascader>\n <nz-tree-select\n *ngSwitchCase=\"'treeSelect'\"\n (ngModelChange)=\"onChange($event)\"\n [nzAllowClear]=\"!header.disableClear\"\n [nzNodes]=\"header.treeList\"\n nzShowSearch=\"true\"\n nzHideUnMatched=\"true\"\n nzPlaceHolder=\"{{header.name}}\"\n [nzShowSearch]=\"true\"\n [(ngModel)]=\"value\"\n [nzMultiple]=\"header.selectUrl.isMultiple\"\n [nzMaxTagCount]=\"header.maxTagCount || 3\"\n >\n </nz-tree-select>\n <nz-range-picker\n *ngSwitchCase=\"'dateRange'\"\n (ngModelChange)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n style=\"width: 100%;\"\n nzAllowClear=\"true\"\n [nzPlaceHolder]=\"[header.name+'\u5F00\u59CB\u65F6\u95F4','\u7ED3\u675F\u65F6\u95F4']\"\n [nzDefaultPickerValue]=\"header.defaultVal\"></nz-range-picker>\n <ng-container *ngSwitchCase=\"'sdate'\">\n <nz-date-picker style=\"width: 100%\" [nzFormat]=\"'yyyy-MM-dd'\"\n (ngModelChange)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n *ngIf=\"!header.dateMode\"\n nzAllowClear=\"true\"></nz-date-picker>\n <nz-date-picker style=\"width: 100%\"\n (ngModelChange)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n *ngIf=\"header.dateMode\"\n [nzMode]=\"header.dateMode\"\n nzAllowClear=\"true\"></nz-date-picker>\n </ng-container>\n <nz-month-picker\n *ngSwitchCase=\"'smonth'\"\n (ngModelChange)=\"onChange($event)\"\n [(ngModel)]=\"value\"\n [nzFormat]=\"'yyyy-MM'\"\n [nzPlaceHolder]=\"[header.name]\"\n nzAllowClear=\"true\"></nz-month-picker>\n <span class=\"label-title\">{{header.name}}</span>\n </nz-form-control>\n</nz-form-item>\n\n<ng-template #inputClearTpl>\n <i nz-icon class=\"ant-input-clear-icon\" nzTheme=\"fill\" nzType=\"close-circle\"\n *ngIf=\"!header.disableClear && value|isNotEmpty\" (click)=\"value = null;onChange()\"></i>\n</ng-template>\n", styles: [":host{margin-bottom:5px}:host .label-title{z-index:80}\n", ":host{width:100%;height:100%;display:flex;flex-direction:column}::ng-deep .ant-modal{top:50px;padding:0}.ant-advanced-search-form{padding:10px 6px 6px;background:#fbfbfb;border:1px solid #d9d9d9;border-radius:6px;margin-bottom:5px}.select-icon:hover{color:#1890ff}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:5px}::ng-deep .ant-table-column-title{font-size:.65rem}::ng-deep .ant-table-tbody>tr.ant-table-row:hover>td{background:#d0eeea}::ng-deep .ant-modal-header,::ng-deep .ant-modal-content{border-radius:4px}::ng-deep .ant-table-tbody>tr.selected:hover>td{background-color:#cfe1d0!important}::ng-deep .ant-table{height:100%}::ng-deep nz-pagination{position:absolute;bottom:0;right:0}.search-result-list{padding:1px;border:1px dashed #e9e9e9;border-radius:6px;background-color:#fff;flex:1;text-align:center;position:relative}[nz-form-label]{overflow:visible}button{margin:2px 4px}.collapse{margin-left:6px;font-size:12px}.action-area{text-align:left}.search-area{text-align:right}::ng-deep .main-table{position:absolute;top:0;left:0;right:0;bottom:0}::ng-deep .main-table .ant-spin-nested-loading{height:100%}::ng-deep .main-table .ant-spin-container{height:100%}::ng-deep .ant-table-tbody>tr.selected>td{background-color:#cfe1d0}::ng-deep .ant-table-tbody>tr>td>img{display:block;width:40%;margin:0 auto}::ng-deep .ant-table-body{-ms-overflow-style:none;overflow:-moz-scrollbars-none}::ng-deep .ant-table-body::-webkit-scrollbar,::ng-deep .ant-table-header::-webkit-scrollbar{width:6px!important;height:6px!important}::ng-deep .ant-table-body::-webkit-scrollbar-track,::ng-deep .ant-table-header::-webkit-scrollbar-track{width:6px!important;cursor:pointer}::ng-deep .ant-table-body::-webkit-scrollbar-thumb,::ng-deep .ant-table-header::-webkit-scrollbar-thumb{background:#1890ff;border-radius:3px;cursor:pointer}::ng-deep .ant-table-bordered .ant-table-thead>tr>th{border-right:1px solid #ddd}::ng-deep .ant-table-header{-ms-overflow-style:none;overflow:-moz-scrollbars-none;margin-bottom:-5px!important}::ng-deep .ant-table-placeholder{border-bottom:none!important;border-top:none!important}.tabel-colunmn{display:block;width:160px;height:300px;background:#fff;border:1px solid #ddd;padding:10px;border-radius:5px;overflow-x:hidden;overflow-y:auto;position:relative}.tabel-colunmn-header{position:fixed;top:0;left:0;right:0;height:30px;z-index:999;line-height:30px;border-bottom:1px solid #ddd;text-align:left;font-size:13px;padding-left:10px}.t-tr{background:#fff}.t-tr:nth-child(odd){background:#f8f9fa}::ng-deep .ant-table-thead>tr>th{background:#e7ebef!important;border-radius:0;word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-tbody>tr>td{word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-header{background:#e7ebef!important}td{font-size:.65rem}.resize-trigger{height:100%}.nz-resizable-preview{border-width:0;border-right-width:1px}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}::ng-deep .ant-table-tbody>tr>td{padding:5px}::ng-deep .ant-table{line-height:15px}::ng-deep .ant-table-middle .ant-table-footer,.ant-table-middle .ant-table-tbody>tr>td,.ant-table-middle .ant-table-thead>tr>th,.ant-table-middle .ant-table-title{padding:5px}::ng-deep .ant-table-tbody>tr>td>img{width:35px}::ng-deep .ant-modal-body{padding:10px}::ng-deep .ant-table.ant-table-bordered tbody>tr>td{font-size:13px}::ng-deep th{z-index:80!important}.left-zindex-header{z-index:90!important}.left-zindex{z-index:80!important}:host ::ng-deep input,:host ::ng-deep .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,:host ::ng-deep .ant-picker{border-radius:5px}.border-text{width:100%;height:36px;line-height:36px;display:flex}.border-text .border-text-line{display:inline-block;border-top:1px solid #cccccc;margin-top:18px}.border-text .border-text-line-left{width:10px;border-left:1px solid #cccccc}.border-text .border-text-line-right{flex:1;border-right:1px solid #cccccc}.border-text .border-text-span{margin-left:5px;margin-right:5px}.label-title{position:absolute;display:block;top:-7px;left:10px;background-color:#fff;color:#000;font-weight:600;font-size:12px;line-height:12px}:host ::ng-deep .tabel-colunmn-header{position:absolute!important;top:0!important}::ng-deep .ant-table-cell-fix-left,.ant-table-cell-fix-right{position:sticky!important}\n"] }]
|
|
1938
|
+
}], ctorParameters: function () { return []; }, propDecorators: { header: [{
|
|
1939
|
+
type: Input
|
|
1940
|
+
}], value: [{
|
|
1941
|
+
type: Input
|
|
1942
|
+
}], dictList: [{
|
|
1943
|
+
type: Input
|
|
1944
|
+
}], headerAction: [{
|
|
1945
|
+
type: Output
|
|
1946
|
+
}] } });
|
|
1947
|
+
|
|
1948
|
+
class LocalUploadComponent {
|
|
1949
|
+
constructor() {
|
|
1950
|
+
this.showList = false;
|
|
1951
|
+
this.header = (file) => {
|
|
1952
|
+
let obj = {
|
|
1953
|
+
"x-header-atr": "manage",
|
|
1954
|
+
"token": LocalStorageUtil.getUserToken(),
|
|
1955
|
+
"userId": LocalStorageUtil.getUserId(),
|
|
1956
|
+
"orgCode": ToolsUtil.getOrgCode()
|
|
1957
|
+
};
|
|
1958
|
+
return obj;
|
|
1959
|
+
};
|
|
1960
|
+
}
|
|
1961
|
+
ngOnInit() {
|
|
1962
|
+
// this.header = this.getDefaultHeader(new HttpHeaders());
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
LocalUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1966
|
+
LocalUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: LocalUploadComponent, selector: "atr-local-upload", inputs: { url: "url", name: "name", code: "code" }, ngImport: i0, template: "<nz-upload [nzAction]=\"url\" nzAccept=\"application/vnd.ms-excel\" [nzHeaders]=\"header\" [nzShowUploadList]=\"showList\" *atrRole=\"code\" [nzLimit]='1'>\r\n <button nz-button nzSize=\"small\"><i nz-icon nzType=\"upload\"></i><span> {{name}}</span></button>\r\n</nz-upload>", styles: [""], components: [{ type: i1$3.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }], directives: [{ type: AtrRoleDirective, selector: "[atrRole]", inputs: ["atrRole"] }, { type: i4$2.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { type: i9.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }] });
|
|
1967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalUploadComponent, decorators: [{
|
|
1968
|
+
type: Component,
|
|
1969
|
+
args: [{ selector: 'atr-local-upload', template: "<nz-upload [nzAction]=\"url\" nzAccept=\"application/vnd.ms-excel\" [nzHeaders]=\"header\" [nzShowUploadList]=\"showList\" *atrRole=\"code\" [nzLimit]='1'>\r\n <button nz-button nzSize=\"small\"><i nz-icon nzType=\"upload\"></i><span> {{name}}</span></button>\r\n</nz-upload>", styles: [""] }]
|
|
1970
|
+
}], ctorParameters: function () { return []; }, propDecorators: { url: [{
|
|
1971
|
+
type: Input
|
|
1972
|
+
}], name: [{
|
|
1973
|
+
type: Input
|
|
1974
|
+
}], code: [{
|
|
1975
|
+
type: Input
|
|
1976
|
+
}] } });
|
|
1977
|
+
|
|
1978
|
+
class TableTdComponent {
|
|
1979
|
+
constructor() {
|
|
1980
|
+
this.doActionByRowAction = new EventEmitter();
|
|
1981
|
+
this.popoverTrigger = 'hover';
|
|
1982
|
+
this.imagePrefix = atr_static_datas.OSS_URL;
|
|
1983
|
+
}
|
|
1984
|
+
change(value) {
|
|
1985
|
+
console.log(value);
|
|
1986
|
+
}
|
|
1987
|
+
ngOnInit() {
|
|
1988
|
+
}
|
|
1989
|
+
doActionByRow(data, code, event, index) {
|
|
1990
|
+
this.doActionByRowAction.emit({ data: data, code: code, event: event, index: index });
|
|
1991
|
+
}
|
|
1992
|
+
enter(e) {
|
|
1993
|
+
this.popoverTrigger = e.toElement.clientWidth < e.toElement.scrollWidth ? 'hover' : null;
|
|
1994
|
+
}
|
|
1995
|
+
isShowBtn(data, operator, action) {
|
|
1996
|
+
let isShow = false;
|
|
1997
|
+
if (!operator || operator == null || operator == "") {
|
|
1998
|
+
isShow = true;
|
|
1999
|
+
}
|
|
2000
|
+
else if (operator.indexOf('&&') > 0) {
|
|
2001
|
+
// a|eq|b &&c|eq|d
|
|
2002
|
+
const ops = operator.split('&&');
|
|
2003
|
+
if (ops.length > 1) {
|
|
2004
|
+
// tslint:disable-next-line:prefer-for-of
|
|
2005
|
+
for (let i = 0; i < ops.length; i++) {
|
|
2006
|
+
isShow = true;
|
|
2007
|
+
if (!this.checkIsShowBase(ops[i].split('|'), data)) {
|
|
2008
|
+
isShow = false;
|
|
2009
|
+
break;
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
else if (operator.indexOf('||') > 0) {
|
|
2015
|
+
// a|eq|b||c|eq|d
|
|
2016
|
+
const ops = operator.split('||');
|
|
2017
|
+
if (ops.length > 1) {
|
|
2018
|
+
for (let i = 0; i < ops.length; i++) {
|
|
2019
|
+
isShow = false;
|
|
2020
|
+
if (this.checkIsShowBase(ops[i].split('|'), data)) {
|
|
2021
|
+
isShow = true;
|
|
2022
|
+
break;
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
else {
|
|
2028
|
+
let op = operator.split("|");
|
|
2029
|
+
isShow = this.checkIsShowBase(op, data);
|
|
2030
|
+
}
|
|
2031
|
+
return isShow;
|
|
2032
|
+
}
|
|
2033
|
+
checkIsShowBase(op, data) {
|
|
2034
|
+
let isShow = false;
|
|
2035
|
+
if (op.length > 1) {
|
|
2036
|
+
let value = data[op[0]];
|
|
2037
|
+
if (!value) {
|
|
2038
|
+
isShow = false;
|
|
2039
|
+
}
|
|
2040
|
+
else {
|
|
2041
|
+
isShow = this.compare(value, op[1], op[2]);
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
else
|
|
2045
|
+
isShow = false;
|
|
2046
|
+
return isShow;
|
|
2047
|
+
}
|
|
2048
|
+
compare(value, operator, target) {
|
|
2049
|
+
let isRight = false;
|
|
2050
|
+
switch (operator) {
|
|
2051
|
+
case 'eq':
|
|
2052
|
+
if (value == target) {
|
|
2053
|
+
isRight = true;
|
|
2054
|
+
}
|
|
2055
|
+
break;
|
|
2056
|
+
case 'gh':
|
|
2057
|
+
if (value >= target) {
|
|
2058
|
+
isRight = true;
|
|
2059
|
+
}
|
|
2060
|
+
break;
|
|
2061
|
+
case 'ne':
|
|
2062
|
+
if (value != target) {
|
|
2063
|
+
isRight = true;
|
|
2064
|
+
}
|
|
2065
|
+
break;
|
|
2066
|
+
case 'notEmpty':
|
|
2067
|
+
isRight = false;
|
|
2068
|
+
if (value) {
|
|
2069
|
+
isRight = true;
|
|
2070
|
+
}
|
|
2071
|
+
break;
|
|
2072
|
+
case 'empty':
|
|
2073
|
+
isRight = false;
|
|
2074
|
+
if (!value) {
|
|
2075
|
+
isRight = true;
|
|
2076
|
+
}
|
|
2077
|
+
break;
|
|
2078
|
+
default:
|
|
2079
|
+
isRight = false;
|
|
2080
|
+
break;
|
|
2081
|
+
}
|
|
2082
|
+
return isRight;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
TableTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableTdComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2086
|
+
TableTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TableTdComponent, selector: "app-table-td", inputs: { data: "data", item: "item", i: "i" }, outputs: { doActionByRowAction: "doActionByRowAction" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"item.type\">\r\n <ng-container *ngSwitchCase=\"'textcolor'\">\r\n <div [innerHTML]=\"data[item.key] | defVal:item.defaultVal\" [ngStyle]=\"{'color':item.color}\"\r\n *ngIf=\"item.colorShow == data[item.key]\"></div>\r\n <div [innerHTML]=\"data[item.key] | defVal:item.defaultVal\" *ngIf=\"item.colorShow != data[item.key]\"></div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <span nz-popover (mouseenter)=\"enter($event)\"\r\n [nzPopoverTrigger]=\"popoverTrigger\" [nzPopoverContent]=\"data[item.key] | date:'yyyy-MM-dd' | defVal:item.defaultVal\"\r\n class=\"view-text\">{{ data[item.key] | date:'yyyy-MM-dd' | defVal:item.defaultVal}}</span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dateTime'\">\r\n <span nz-popover (mouseenter)=\"enter($event)\"\r\n [nzPopoverTrigger]=\"popoverTrigger\" [nzPopoverContent]=\"data[item.key] | date:'yyyy-MM-dd HH:mm:ss' | defVal:item.defaultVal\"\r\n class=\"view-text\"> {{ data[item.key] | date:'yyyy-MM-dd HH:mm:ss' | defVal:item.defaultVal}}</span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'sDateTime'\">\r\n <span nz-popover (mouseenter)=\"enter($event)\"\r\n [nzPopoverTrigger]=\"popoverTrigger\" [nzPopoverContent]=\"data[item.key] | date:'MM-dd HH:mm' | defVal:item.defaultVal\"\r\n class=\"view-text\"> {{ data[item.key] | date:'MM-dd HH:mm' | defVal:item.defaultVal}}</span>\r\n </ng-container>\r\n <div *ngSwitchCase=\"'fixedText'\" [innerHTML]=\"item.key\"></div>\r\n\r\n <img *ngSwitchCase=\"'image'\" width=\"35px\" nzSrc=\"{{imagePrefix + (data[item.key] | defVal:item.defaultVal) }}\"\r\n nz-image atrErrorImg/>\r\n <div nz-row *ngSwitchCase=\"'action'\">\r\n <div class=\"action-area\" nz-col [nzSpan]=\"24\">\r\n <ng-container *ngFor=\"let action of item.actions\">\r\n <ng-container *ngIf=\"isShowBtn(data,action.operator,action)\">\r\n <ng-container *ngIf=\"!action.withoutRole\">\r\n <button nz-button\r\n [nzType]=\"action.buttonType&&action.buttonType != 'danger'? action.buttonType : 'primary'\"\r\n [nzDanger]=\"action.buttonType == 'danger'\"\r\n nzSize=\"small\" *atrRole=\"action.code\"\r\n (click)=\"doActionByRow(data,action.code,$event,i)\">\r\n <i nz-icon *ngIf=\"action.icon\" [nzType]=\"action.icon\"></i>\r\n {{action.name}}</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"action.withoutRole\">\r\n <button nz-button\r\n [nzType]=\"action.buttonType&&action.buttonType != 'danger'? action.buttonType : 'primary'\"\r\n [nzDanger]=\"action.buttonType == 'danger'\"\r\n nzSize=\"small\" (click)=\"doActionByRow(data,action.code,$event,i)\">\r\n <i nz-icon *ngIf=\"action.icon\" [nzType]=\"action.icon\"></i>\r\n {{action.name}}</button>\r\n </ng-container>\r\n <!-- <button nz-button [nzType]=\"'primary'\" nzSize=\"small\" *atrRole=\"action.code\" (click)=\"doActionByRow(data,action.code,$event)\">{{action.name\r\n }}</button> -->\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"'dict'\" [innerHTML]=\"data[item.key] | dicts:item.dictCode | defVal:item.defaultVal\"></div>\r\n <div nz-popover (mouseenter)=\"enter($event)\"\r\n [nzPopoverTrigger]=\"popoverTrigger\" [nzPopoverContent]='data[item.key] | defVal:item.defaultVal'\r\n class=\"view-text\" *ngSwitchDefault [innerHTML]=\"data[item.key] | defVal:item.defaultVal\"></div>\r\n</ng-container>\r\n\r\n", styles: [":host{cursor:default}:host .view-text{display:inline-block;white-space:nowrap;width:100%;overflow:hidden;text-overflow:ellipsis}\n", ":host{width:100%;height:100%;display:flex;flex-direction:column}::ng-deep .ant-modal{top:50px;padding:0}.ant-advanced-search-form{padding:10px 6px 6px;background:#fbfbfb;border:1px solid #d9d9d9;border-radius:6px;margin-bottom:5px}.select-icon:hover{color:#1890ff}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:5px}::ng-deep .ant-table-column-title{font-size:.65rem}::ng-deep .ant-table-tbody>tr.ant-table-row:hover>td{background:#d0eeea}::ng-deep .ant-modal-header,::ng-deep .ant-modal-content{border-radius:4px}::ng-deep .ant-table-tbody>tr.selected:hover>td{background-color:#cfe1d0!important}::ng-deep .ant-table{height:100%}::ng-deep nz-pagination{position:absolute;bottom:0;right:0}.search-result-list{padding:1px;border:1px dashed #e9e9e9;border-radius:6px;background-color:#fff;flex:1;text-align:center;position:relative}[nz-form-label]{overflow:visible}button{margin:2px 4px}.collapse{margin-left:6px;font-size:12px}.action-area{text-align:left}.search-area{text-align:right}::ng-deep .main-table{position:absolute;top:0;left:0;right:0;bottom:0}::ng-deep .main-table .ant-spin-nested-loading{height:100%}::ng-deep .main-table .ant-spin-container{height:100%}::ng-deep .ant-table-tbody>tr.selected>td{background-color:#cfe1d0}::ng-deep .ant-table-tbody>tr>td>img{display:block;width:40%;margin:0 auto}::ng-deep .ant-table-body{-ms-overflow-style:none;overflow:-moz-scrollbars-none}::ng-deep .ant-table-body::-webkit-scrollbar,::ng-deep .ant-table-header::-webkit-scrollbar{width:6px!important;height:6px!important}::ng-deep .ant-table-body::-webkit-scrollbar-track,::ng-deep .ant-table-header::-webkit-scrollbar-track{width:6px!important;cursor:pointer}::ng-deep .ant-table-body::-webkit-scrollbar-thumb,::ng-deep .ant-table-header::-webkit-scrollbar-thumb{background:#1890ff;border-radius:3px;cursor:pointer}::ng-deep .ant-table-bordered .ant-table-thead>tr>th{border-right:1px solid #ddd}::ng-deep .ant-table-header{-ms-overflow-style:none;overflow:-moz-scrollbars-none;margin-bottom:-5px!important}::ng-deep .ant-table-placeholder{border-bottom:none!important;border-top:none!important}.tabel-colunmn{display:block;width:160px;height:300px;background:#fff;border:1px solid #ddd;padding:10px;border-radius:5px;overflow-x:hidden;overflow-y:auto;position:relative}.tabel-colunmn-header{position:fixed;top:0;left:0;right:0;height:30px;z-index:999;line-height:30px;border-bottom:1px solid #ddd;text-align:left;font-size:13px;padding-left:10px}.t-tr{background:#fff}.t-tr:nth-child(odd){background:#f8f9fa}::ng-deep .ant-table-thead>tr>th{background:#e7ebef!important;border-radius:0;word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-tbody>tr>td{word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-header{background:#e7ebef!important}td{font-size:.65rem}.resize-trigger{height:100%}.nz-resizable-preview{border-width:0;border-right-width:1px}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}::ng-deep .ant-table-tbody>tr>td{padding:5px}::ng-deep .ant-table{line-height:15px}::ng-deep .ant-table-middle .ant-table-footer,.ant-table-middle .ant-table-tbody>tr>td,.ant-table-middle .ant-table-thead>tr>th,.ant-table-middle .ant-table-title{padding:5px}::ng-deep .ant-table-tbody>tr>td>img{width:35px}::ng-deep .ant-modal-body{padding:10px}::ng-deep .ant-table.ant-table-bordered tbody>tr>td{font-size:13px}::ng-deep th{z-index:80!important}.left-zindex-header{z-index:90!important}.left-zindex{z-index:80!important}:host ::ng-deep input,:host ::ng-deep .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,:host ::ng-deep .ant-picker{border-radius:5px}.border-text{width:100%;height:36px;line-height:36px;display:flex}.border-text .border-text-line{display:inline-block;border-top:1px solid #cccccc;margin-top:18px}.border-text .border-text-line-left{width:10px;border-left:1px solid #cccccc}.border-text .border-text-line-right{flex:1;border-right:1px solid #cccccc}.border-text .border-text-span{margin-left:5px;margin-right:5px}.label-title{position:absolute;display:block;top:-7px;left:10px;background-color:#fff;color:#000;font-weight:600;font-size:12px;line-height:12px}:host ::ng-deep .tabel-colunmn-header{position:absolute!important;top:0!important}::ng-deep .ant-table-cell-fix-left,.ant-table-cell-fix-right{position:sticky!important}\n"], components: [{ type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }], directives: [{ type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3$1.NzPopoverDirective, selector: "[nz-popover]", inputs: ["nzPopoverArrowPointAtCenter", "nzPopoverTitle", "nzPopoverContent", "nz-popover", "nzPopoverTrigger", "nzPopoverPlacement", "nzPopoverOrigin", "nzPopoverVisible", "nzPopoverMouseEnterDelay", "nzPopoverMouseLeaveDelay", "nzPopoverOverlayClassName", "nzPopoverOverlayStyle", "nzPopoverBackdrop"], outputs: ["nzPopoverVisibleChange"], exportAs: ["nzPopover"] }, { type: i4$3.NzImageDirective, selector: "img[nz-image]", inputs: ["nzSrc", "nzSrcset", "nzDisablePreview", "nzFallback", "nzPlaceholder"], exportAs: ["nzImage"] }, { type: AtrErrorImgDirective, selector: "[atrErrorImg]", inputs: ["atrErrorImg"] }, { type: i12.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { type: i12.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: AtrRoleDirective, selector: "[atrRole]", inputs: ["atrRole"] }, { type: i4$2.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { type: i9.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { type: i2$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "defVal": DefaultValPipe, "date": i2$1.DatePipe, "dicts": DictsPipe } });
|
|
2087
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableTdComponent, decorators: [{
|
|
2088
|
+
type: Component,
|
|
2089
|
+
args: [{ selector: 'app-table-td', template: "<ng-container [ngSwitch]=\"item.type\">\r\n <ng-container *ngSwitchCase=\"'textcolor'\">\r\n <div [innerHTML]=\"data[item.key] | defVal:item.defaultVal\" [ngStyle]=\"{'color':item.color}\"\r\n *ngIf=\"item.colorShow == data[item.key]\"></div>\r\n <div [innerHTML]=\"data[item.key] | defVal:item.defaultVal\" *ngIf=\"item.colorShow != data[item.key]\"></div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <span nz-popover (mouseenter)=\"enter($event)\"\r\n [nzPopoverTrigger]=\"popoverTrigger\" [nzPopoverContent]=\"data[item.key] | date:'yyyy-MM-dd' | defVal:item.defaultVal\"\r\n class=\"view-text\">{{ data[item.key] | date:'yyyy-MM-dd' | defVal:item.defaultVal}}</span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'dateTime'\">\r\n <span nz-popover (mouseenter)=\"enter($event)\"\r\n [nzPopoverTrigger]=\"popoverTrigger\" [nzPopoverContent]=\"data[item.key] | date:'yyyy-MM-dd HH:mm:ss' | defVal:item.defaultVal\"\r\n class=\"view-text\"> {{ data[item.key] | date:'yyyy-MM-dd HH:mm:ss' | defVal:item.defaultVal}}</span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'sDateTime'\">\r\n <span nz-popover (mouseenter)=\"enter($event)\"\r\n [nzPopoverTrigger]=\"popoverTrigger\" [nzPopoverContent]=\"data[item.key] | date:'MM-dd HH:mm' | defVal:item.defaultVal\"\r\n class=\"view-text\"> {{ data[item.key] | date:'MM-dd HH:mm' | defVal:item.defaultVal}}</span>\r\n </ng-container>\r\n <div *ngSwitchCase=\"'fixedText'\" [innerHTML]=\"item.key\"></div>\r\n\r\n <img *ngSwitchCase=\"'image'\" width=\"35px\" nzSrc=\"{{imagePrefix + (data[item.key] | defVal:item.defaultVal) }}\"\r\n nz-image atrErrorImg/>\r\n <div nz-row *ngSwitchCase=\"'action'\">\r\n <div class=\"action-area\" nz-col [nzSpan]=\"24\">\r\n <ng-container *ngFor=\"let action of item.actions\">\r\n <ng-container *ngIf=\"isShowBtn(data,action.operator,action)\">\r\n <ng-container *ngIf=\"!action.withoutRole\">\r\n <button nz-button\r\n [nzType]=\"action.buttonType&&action.buttonType != 'danger'? action.buttonType : 'primary'\"\r\n [nzDanger]=\"action.buttonType == 'danger'\"\r\n nzSize=\"small\" *atrRole=\"action.code\"\r\n (click)=\"doActionByRow(data,action.code,$event,i)\">\r\n <i nz-icon *ngIf=\"action.icon\" [nzType]=\"action.icon\"></i>\r\n {{action.name}}</button>\r\n </ng-container>\r\n <ng-container *ngIf=\"action.withoutRole\">\r\n <button nz-button\r\n [nzType]=\"action.buttonType&&action.buttonType != 'danger'? action.buttonType : 'primary'\"\r\n [nzDanger]=\"action.buttonType == 'danger'\"\r\n nzSize=\"small\" (click)=\"doActionByRow(data,action.code,$event,i)\">\r\n <i nz-icon *ngIf=\"action.icon\" [nzType]=\"action.icon\"></i>\r\n {{action.name}}</button>\r\n </ng-container>\r\n <!-- <button nz-button [nzType]=\"'primary'\" nzSize=\"small\" *atrRole=\"action.code\" (click)=\"doActionByRow(data,action.code,$event)\">{{action.name\r\n }}</button> -->\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"'dict'\" [innerHTML]=\"data[item.key] | dicts:item.dictCode | defVal:item.defaultVal\"></div>\r\n <div nz-popover (mouseenter)=\"enter($event)\"\r\n [nzPopoverTrigger]=\"popoverTrigger\" [nzPopoverContent]='data[item.key] | defVal:item.defaultVal'\r\n class=\"view-text\" *ngSwitchDefault [innerHTML]=\"data[item.key] | defVal:item.defaultVal\"></div>\r\n</ng-container>\r\n\r\n", styles: [":host{cursor:default}:host .view-text{display:inline-block;white-space:nowrap;width:100%;overflow:hidden;text-overflow:ellipsis}\n", ":host{width:100%;height:100%;display:flex;flex-direction:column}::ng-deep .ant-modal{top:50px;padding:0}.ant-advanced-search-form{padding:10px 6px 6px;background:#fbfbfb;border:1px solid #d9d9d9;border-radius:6px;margin-bottom:5px}.select-icon:hover{color:#1890ff}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:5px}::ng-deep .ant-table-column-title{font-size:.65rem}::ng-deep .ant-table-tbody>tr.ant-table-row:hover>td{background:#d0eeea}::ng-deep .ant-modal-header,::ng-deep .ant-modal-content{border-radius:4px}::ng-deep .ant-table-tbody>tr.selected:hover>td{background-color:#cfe1d0!important}::ng-deep .ant-table{height:100%}::ng-deep nz-pagination{position:absolute;bottom:0;right:0}.search-result-list{padding:1px;border:1px dashed #e9e9e9;border-radius:6px;background-color:#fff;flex:1;text-align:center;position:relative}[nz-form-label]{overflow:visible}button{margin:2px 4px}.collapse{margin-left:6px;font-size:12px}.action-area{text-align:left}.search-area{text-align:right}::ng-deep .main-table{position:absolute;top:0;left:0;right:0;bottom:0}::ng-deep .main-table .ant-spin-nested-loading{height:100%}::ng-deep .main-table .ant-spin-container{height:100%}::ng-deep .ant-table-tbody>tr.selected>td{background-color:#cfe1d0}::ng-deep .ant-table-tbody>tr>td>img{display:block;width:40%;margin:0 auto}::ng-deep .ant-table-body{-ms-overflow-style:none;overflow:-moz-scrollbars-none}::ng-deep .ant-table-body::-webkit-scrollbar,::ng-deep .ant-table-header::-webkit-scrollbar{width:6px!important;height:6px!important}::ng-deep .ant-table-body::-webkit-scrollbar-track,::ng-deep .ant-table-header::-webkit-scrollbar-track{width:6px!important;cursor:pointer}::ng-deep .ant-table-body::-webkit-scrollbar-thumb,::ng-deep .ant-table-header::-webkit-scrollbar-thumb{background:#1890ff;border-radius:3px;cursor:pointer}::ng-deep .ant-table-bordered .ant-table-thead>tr>th{border-right:1px solid #ddd}::ng-deep .ant-table-header{-ms-overflow-style:none;overflow:-moz-scrollbars-none;margin-bottom:-5px!important}::ng-deep .ant-table-placeholder{border-bottom:none!important;border-top:none!important}.tabel-colunmn{display:block;width:160px;height:300px;background:#fff;border:1px solid #ddd;padding:10px;border-radius:5px;overflow-x:hidden;overflow-y:auto;position:relative}.tabel-colunmn-header{position:fixed;top:0;left:0;right:0;height:30px;z-index:999;line-height:30px;border-bottom:1px solid #ddd;text-align:left;font-size:13px;padding-left:10px}.t-tr{background:#fff}.t-tr:nth-child(odd){background:#f8f9fa}::ng-deep .ant-table-thead>tr>th{background:#e7ebef!important;border-radius:0;word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-tbody>tr>td{word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-header{background:#e7ebef!important}td{font-size:.65rem}.resize-trigger{height:100%}.nz-resizable-preview{border-width:0;border-right-width:1px}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}::ng-deep .ant-table-tbody>tr>td{padding:5px}::ng-deep .ant-table{line-height:15px}::ng-deep .ant-table-middle .ant-table-footer,.ant-table-middle .ant-table-tbody>tr>td,.ant-table-middle .ant-table-thead>tr>th,.ant-table-middle .ant-table-title{padding:5px}::ng-deep .ant-table-tbody>tr>td>img{width:35px}::ng-deep .ant-modal-body{padding:10px}::ng-deep .ant-table.ant-table-bordered tbody>tr>td{font-size:13px}::ng-deep th{z-index:80!important}.left-zindex-header{z-index:90!important}.left-zindex{z-index:80!important}:host ::ng-deep input,:host ::ng-deep .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,:host ::ng-deep .ant-picker{border-radius:5px}.border-text{width:100%;height:36px;line-height:36px;display:flex}.border-text .border-text-line{display:inline-block;border-top:1px solid #cccccc;margin-top:18px}.border-text .border-text-line-left{width:10px;border-left:1px solid #cccccc}.border-text .border-text-line-right{flex:1;border-right:1px solid #cccccc}.border-text .border-text-span{margin-left:5px;margin-right:5px}.label-title{position:absolute;display:block;top:-7px;left:10px;background-color:#fff;color:#000;font-weight:600;font-size:12px;line-height:12px}:host ::ng-deep .tabel-colunmn-header{position:absolute!important;top:0!important}::ng-deep .ant-table-cell-fix-left,.ant-table-cell-fix-right{position:sticky!important}\n"] }]
|
|
2090
|
+
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
|
|
2091
|
+
type: Input
|
|
2092
|
+
}], item: [{
|
|
2093
|
+
type: Input
|
|
2094
|
+
}], i: [{
|
|
2095
|
+
type: Input
|
|
2096
|
+
}], doActionByRowAction: [{
|
|
2097
|
+
type: Output
|
|
2098
|
+
}] } });
|
|
2099
|
+
|
|
2100
|
+
class AtrTableComponent {
|
|
2101
|
+
constructor(fb, injector, locale, cd) {
|
|
2102
|
+
this.fb = fb;
|
|
2103
|
+
this.injector = injector;
|
|
2104
|
+
this.locale = locale;
|
|
2105
|
+
this.cd = cd;
|
|
2106
|
+
this.isCollapse = true;
|
|
2107
|
+
this.dicts = {};
|
|
2108
|
+
this.pageIndex = 1;
|
|
2109
|
+
this.pageSize = 10;
|
|
2110
|
+
this.total = 1;
|
|
2111
|
+
this.loading = true;
|
|
2112
|
+
this.allowDrag = false; //允许拖拽换位
|
|
2113
|
+
this.tableDatas = [];
|
|
2114
|
+
this.scrollSize = { x: "", y: "" };
|
|
2115
|
+
//表格checkbox 配置
|
|
2116
|
+
this.isAllDisplayDataChecked = false;
|
|
2117
|
+
this.isIndeterminate = false;
|
|
2118
|
+
this.numberOfChecked = 0;
|
|
2119
|
+
this.mapOfCheckedId = {};
|
|
2120
|
+
this.curChecked = -1;
|
|
2121
|
+
this.imagePrefix = atr_static_datas.OSS_URL;
|
|
2122
|
+
this.defaultParams = {};
|
|
2123
|
+
this.isAllLoad = false;
|
|
2124
|
+
this.sortMap = {};
|
|
2125
|
+
this.rowSpanMap = {}; //key:{德科牧场:{num:1}}
|
|
2126
|
+
this.showPagination = true;
|
|
2127
|
+
this.title = "";
|
|
2128
|
+
this.tableAction = new EventEmitter();
|
|
2129
|
+
this.queryBack = new EventEmitter();
|
|
2130
|
+
this.headerAction = new EventEmitter();
|
|
2131
|
+
}
|
|
2132
|
+
isShowColor(data) {
|
|
2133
|
+
if (this.queryOpts.color && this.queryOpts.color.operator && this.isShowBtn(data, this.queryOpts.color.operator)) {
|
|
2134
|
+
return this.queryOpts.color.color;
|
|
2135
|
+
}
|
|
2136
|
+
return '';
|
|
2137
|
+
}
|
|
2138
|
+
dbclickData(data, rowNo) {
|
|
2139
|
+
let action = {
|
|
2140
|
+
name: 'dbclickData',
|
|
2141
|
+
code: 'dbclickData',
|
|
2142
|
+
type: "row"
|
|
2143
|
+
};
|
|
2144
|
+
action.data = data;
|
|
2145
|
+
this.tableAction.emit(action);
|
|
2146
|
+
}
|
|
2147
|
+
doActionByRow2(e) {
|
|
2148
|
+
let { data, code, event: MouseEvent, index } = e;
|
|
2149
|
+
if (event) {
|
|
2150
|
+
event.preventDefault();
|
|
2151
|
+
if (event.stopPropagation) {
|
|
2152
|
+
event.stopPropagation();
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
let action = {
|
|
2156
|
+
name: code,
|
|
2157
|
+
code: code,
|
|
2158
|
+
type: "row"
|
|
2159
|
+
};
|
|
2160
|
+
action.data = data;
|
|
2161
|
+
action.numberOfChecked = index;
|
|
2162
|
+
this.tableAction.emit(action);
|
|
2163
|
+
}
|
|
2164
|
+
get httpService() {
|
|
2165
|
+
return this.injector.get(HttpService);
|
|
2166
|
+
}
|
|
2167
|
+
get nzContextMenuService() {
|
|
2168
|
+
return this.injector.get(NzContextMenuService);
|
|
2169
|
+
}
|
|
2170
|
+
setTableLoadding(loadding) {
|
|
2171
|
+
this.loading = loadding;
|
|
2172
|
+
}
|
|
2173
|
+
onResize(width, col) {
|
|
2174
|
+
this.queryOpts.tables = this.queryOpts.tables.map((e) => (e.name === col ? Object.assign(Object.assign({}, e), { width: `${width}px` }) : e));
|
|
2175
|
+
let x = 0;
|
|
2176
|
+
for (let item of this.queryOpts.tables) {
|
|
2177
|
+
if (item.isShow && item.width) {
|
|
2178
|
+
x += ToolsUtil.pixelToNum(item.width);
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
if (x > 22) {
|
|
2182
|
+
x = x - 22;
|
|
2183
|
+
this.scrollSize.x = x + "px";
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
isEnable(operator) {
|
|
2187
|
+
let isEnable = true;
|
|
2188
|
+
if (!operator || operator == undefined || operator == "")
|
|
2189
|
+
isEnable = false;
|
|
2190
|
+
else {
|
|
2191
|
+
let op = operator.split("|");
|
|
2192
|
+
if (op.length > 2) {
|
|
2193
|
+
let key = op[0];
|
|
2194
|
+
if (!key) {
|
|
2195
|
+
isEnable = false;
|
|
2196
|
+
}
|
|
2197
|
+
else {
|
|
2198
|
+
isEnable = !this.compare(this.numberOfChecked, op[1], op[2]);
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
else
|
|
2202
|
+
isEnable = false;
|
|
2203
|
+
}
|
|
2204
|
+
return isEnable;
|
|
2205
|
+
}
|
|
2206
|
+
isShowBtn(data, operator, action) {
|
|
2207
|
+
let isShow = false;
|
|
2208
|
+
if (!operator || operator == null || operator == "") {
|
|
2209
|
+
isShow = true;
|
|
2210
|
+
}
|
|
2211
|
+
else if (operator.indexOf('&&') > 0) {
|
|
2212
|
+
// a|eq|b &&c|eq|d
|
|
2213
|
+
const ops = operator.split('&&');
|
|
2214
|
+
if (ops.length > 1) {
|
|
2215
|
+
// tslint:disable-next-line:prefer-for-of
|
|
2216
|
+
for (let i = 0; i < ops.length; i++) {
|
|
2217
|
+
isShow = true;
|
|
2218
|
+
if (!this.checkIsShowBase(ops[i].split('|'), data)) {
|
|
2219
|
+
isShow = false;
|
|
2220
|
+
break;
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
else if (operator.indexOf('||') > 0) {
|
|
2226
|
+
// a|eq|b||c|eq|d
|
|
2227
|
+
const ops = operator.split('&&');
|
|
2228
|
+
if (ops.length > 1) {
|
|
2229
|
+
for (let i = 0; i < ops.length; i++) {
|
|
2230
|
+
isShow = false;
|
|
2231
|
+
if (this.checkIsShowBase(ops[i].split('|'), data)) {
|
|
2232
|
+
isShow = true;
|
|
2233
|
+
break;
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
else {
|
|
2239
|
+
let op = operator.split("|");
|
|
2240
|
+
isShow = this.checkIsShowBase(op, data);
|
|
2241
|
+
}
|
|
2242
|
+
return isShow;
|
|
2243
|
+
}
|
|
2244
|
+
checkIsShowBase(op, data) {
|
|
2245
|
+
let isShow = false;
|
|
2246
|
+
if (op.length > 1) {
|
|
2247
|
+
let value = data[op[0]];
|
|
2248
|
+
if (!value) {
|
|
2249
|
+
isShow = false;
|
|
2250
|
+
}
|
|
2251
|
+
else {
|
|
2252
|
+
isShow = this.compare(value, op[1], op[2]);
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
else
|
|
2256
|
+
isShow = false;
|
|
2257
|
+
return isShow;
|
|
2258
|
+
}
|
|
2259
|
+
compare(value, operator, target) {
|
|
2260
|
+
let isRight = false;
|
|
2261
|
+
switch (operator) {
|
|
2262
|
+
case 'eq':
|
|
2263
|
+
if (value == target) {
|
|
2264
|
+
isRight = true;
|
|
2265
|
+
}
|
|
2266
|
+
break;
|
|
2267
|
+
case 'gh':
|
|
2268
|
+
if (value >= target) {
|
|
2269
|
+
isRight = true;
|
|
2270
|
+
}
|
|
2271
|
+
break;
|
|
2272
|
+
case 'notEmpty':
|
|
2273
|
+
isRight = false;
|
|
2274
|
+
if (value) {
|
|
2275
|
+
isRight = true;
|
|
2276
|
+
}
|
|
2277
|
+
break;
|
|
2278
|
+
case 'empty':
|
|
2279
|
+
isRight = false;
|
|
2280
|
+
if (!value) {
|
|
2281
|
+
isRight = true;
|
|
2282
|
+
}
|
|
2283
|
+
break;
|
|
2284
|
+
default:
|
|
2285
|
+
isRight = false;
|
|
2286
|
+
break;
|
|
2287
|
+
}
|
|
2288
|
+
return isRight;
|
|
2289
|
+
}
|
|
2290
|
+
pushTableDatas(tableDatas) {
|
|
2291
|
+
this.tableDatas = this.tableDatas.concat(tableDatas);
|
|
2292
|
+
}
|
|
2293
|
+
removeDatas(key, value) {
|
|
2294
|
+
this.tableDatas.forEach((item, index) => {
|
|
2295
|
+
if (item[key] === value) {
|
|
2296
|
+
this.tableDatas.splice(index, 1);
|
|
2297
|
+
}
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
2300
|
+
doAction(code) {
|
|
2301
|
+
let action = {
|
|
2302
|
+
name: code,
|
|
2303
|
+
code: code,
|
|
2304
|
+
type: "rows"
|
|
2305
|
+
};
|
|
2306
|
+
let selectDatas = [];
|
|
2307
|
+
if (this.tableDatas && this.tableDatas.length > 0) {
|
|
2308
|
+
this.tableDatas.forEach((item) => {
|
|
2309
|
+
if (this.mapOfCheckedId[item.id])
|
|
2310
|
+
selectDatas.push(item);
|
|
2311
|
+
});
|
|
2312
|
+
}
|
|
2313
|
+
action.datas = selectDatas;
|
|
2314
|
+
action.numberOfChecked = selectDatas.length;
|
|
2315
|
+
this.tableAction.emit(action);
|
|
2316
|
+
}
|
|
2317
|
+
doActionByRow(data, code, event) {
|
|
2318
|
+
event.preventDefault();
|
|
2319
|
+
if (event.stopPropagation) {
|
|
2320
|
+
event.stopPropagation();
|
|
2321
|
+
}
|
|
2322
|
+
let action = {
|
|
2323
|
+
name: code,
|
|
2324
|
+
code: code,
|
|
2325
|
+
type: "row"
|
|
2326
|
+
};
|
|
2327
|
+
action.data = data;
|
|
2328
|
+
action.numberOfChecked = 1;
|
|
2329
|
+
this.tableAction.emit(action);
|
|
2330
|
+
}
|
|
2331
|
+
getAllCheckInfo() {
|
|
2332
|
+
let ids = [];
|
|
2333
|
+
for (const key of Object.keys(this.mapOfCheckedId)) {
|
|
2334
|
+
if (this.mapOfCheckedId.hasOwnProperty(key) && this.mapOfCheckedId[key]) {
|
|
2335
|
+
ids.push(key);
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
return ids;
|
|
2339
|
+
}
|
|
2340
|
+
getAllCheckDatas() {
|
|
2341
|
+
let selectDatas = [];
|
|
2342
|
+
this.tableDatas.forEach((item) => {
|
|
2343
|
+
if (this.mapOfCheckedId[item.id])
|
|
2344
|
+
selectDatas.push(item);
|
|
2345
|
+
});
|
|
2346
|
+
return selectDatas;
|
|
2347
|
+
}
|
|
2348
|
+
checkAll(value) {
|
|
2349
|
+
this.tableDatas.forEach((item) => (this.mapOfCheckedId[item.id] = value));
|
|
2350
|
+
this.refreshStatus();
|
|
2351
|
+
}
|
|
2352
|
+
refreshStatus() {
|
|
2353
|
+
this.isAllDisplayDataChecked = this.tableDatas
|
|
2354
|
+
.every((item) => this.mapOfCheckedId[item.id]);
|
|
2355
|
+
this.isIndeterminate =
|
|
2356
|
+
this.tableDatas.some((item) => this.mapOfCheckedId[item.id]) &&
|
|
2357
|
+
!this.isAllDisplayDataChecked;
|
|
2358
|
+
this.numberOfChecked = this.tableDatas.filter((item) => this.mapOfCheckedId[item.id]).length;
|
|
2359
|
+
}
|
|
2360
|
+
selectRow(data, rowNo) {
|
|
2361
|
+
var _a, _b;
|
|
2362
|
+
// this.tableDatas.forEach(item => (this.mapOfCheckedId[data.id] = value));
|
|
2363
|
+
this.curChecked = rowNo;
|
|
2364
|
+
if (!((_a = this.queryOpts.checkBox) === null || _a === void 0 ? void 0 : _a.isForbid)) {
|
|
2365
|
+
if ((_b = this.queryOpts.checkBox) === null || _b === void 0 ? void 0 : _b.isShowCheckbox) {
|
|
2366
|
+
this.mapOfCheckedId[data.id] = !this.mapOfCheckedId[data.id];
|
|
2367
|
+
}
|
|
2368
|
+
else {
|
|
2369
|
+
this.mapOfCheckedId = {};
|
|
2370
|
+
this.mapOfCheckedId[data.id] = true;
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
let action = {
|
|
2374
|
+
name: 'select',
|
|
2375
|
+
code: 'select',
|
|
2376
|
+
type: "row"
|
|
2377
|
+
};
|
|
2378
|
+
action.data = data;
|
|
2379
|
+
action.numberOfChecked = 1;
|
|
2380
|
+
this.tableAction.emit(action);
|
|
2381
|
+
this.refreshStatus();
|
|
2382
|
+
}
|
|
2383
|
+
ngOnInit() {
|
|
2384
|
+
this.atrForm = this.fb.group({});
|
|
2385
|
+
let x = this.tableContent.nativeElement.offsetWidth - 22;
|
|
2386
|
+
let y = this.tableContent.nativeElement.offsetHeight - 200;
|
|
2387
|
+
this.scrollSize.x = (x > 0 ? x : 100) + "px";
|
|
2388
|
+
this.scrollSize.y = (y > 0 ? y : 100) + "px";
|
|
2389
|
+
// console.log(this.scrollSize)
|
|
2390
|
+
this.initHeader();
|
|
2391
|
+
if (this.queryOpts && this.queryOpts.tables) {
|
|
2392
|
+
for (let table of this.queryOpts.tables) {
|
|
2393
|
+
if (table.sortKey) {
|
|
2394
|
+
table.sortable = true;
|
|
2395
|
+
this.sortMap[table.sortKey] = null;
|
|
2396
|
+
}
|
|
2397
|
+
else
|
|
2398
|
+
table.sortable = false;
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
if (this.queryOpts && this.queryOpts.defaultParams) {
|
|
2402
|
+
this.defaultParams = this.queryOpts.defaultParams;
|
|
2403
|
+
}
|
|
2404
|
+
if (!this.queryOpts.isAutoQuery) {
|
|
2405
|
+
this.query();
|
|
2406
|
+
}
|
|
2407
|
+
else {
|
|
2408
|
+
this.loading = false;
|
|
2409
|
+
// this.cd.detectChanges();
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
initHeader() {
|
|
2413
|
+
if (this.queryOpts && this.queryOpts.headers && this.queryOpts.headers.length > 0) {
|
|
2414
|
+
this.queryOpts.headers.forEach((item, i) => {
|
|
2415
|
+
item.span = item.span || 8;
|
|
2416
|
+
if (item.isShow != false) {
|
|
2417
|
+
item.isShow = i < this.queryOpts.showNum;
|
|
2418
|
+
}
|
|
2419
|
+
this.atrForm.addControl(item.key, new FormControl());
|
|
2420
|
+
let type = item.type;
|
|
2421
|
+
switch (type) {
|
|
2422
|
+
case "select":
|
|
2423
|
+
this.getDictValue(item.dictCode);
|
|
2424
|
+
break;
|
|
2425
|
+
case "treeSelect":
|
|
2426
|
+
case "cascader":
|
|
2427
|
+
case "selectCus":
|
|
2428
|
+
if (item.selectUrl && item.selectUrl.url) {
|
|
2429
|
+
this.getDicList(item);
|
|
2430
|
+
}
|
|
2431
|
+
break;
|
|
2432
|
+
}
|
|
2433
|
+
});
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
getDicList(item) {
|
|
2437
|
+
if (!item.selectUrl || !item.selectUrl.url) {
|
|
2438
|
+
return;
|
|
2439
|
+
}
|
|
2440
|
+
let keys = item.selectUrl.convert.split(',');
|
|
2441
|
+
this.httpService.post(item.selectUrl.url, {}, ToolsUtil.getHttpOptions()).subscribe(res => {
|
|
2442
|
+
if (item.type == 'treeSelect') {
|
|
2443
|
+
item.treeList = res.data.filter((child) => {
|
|
2444
|
+
keys.forEach((v) => {
|
|
2445
|
+
let vs = v.split("|");
|
|
2446
|
+
child[vs[0]] = child[vs[1]];
|
|
2447
|
+
});
|
|
2448
|
+
// child.key = child.id;
|
|
2449
|
+
// child.title = child.realName;
|
|
2450
|
+
return true;
|
|
2451
|
+
});
|
|
2452
|
+
}
|
|
2453
|
+
else if (item.type == 'selectCus') {
|
|
2454
|
+
item.dictList = res.data.filter((child) => {
|
|
2455
|
+
keys.forEach((v) => {
|
|
2456
|
+
let vs = v.split("|");
|
|
2457
|
+
child[vs[0]] = child[vs[1]];
|
|
2458
|
+
});
|
|
2459
|
+
// child.value = child.id;
|
|
2460
|
+
// child.label = child.name;
|
|
2461
|
+
return true;
|
|
2462
|
+
});
|
|
2463
|
+
}
|
|
2464
|
+
});
|
|
2465
|
+
}
|
|
2466
|
+
ngAfterViewInit() {
|
|
2467
|
+
setTimeout(() => {
|
|
2468
|
+
this.scrollSize.y = this.tableContent.nativeElement.offsetHeight - 100 + "px";
|
|
2469
|
+
let width = 0;
|
|
2470
|
+
if (this.queryOpts && this.queryOpts.tables) {
|
|
2471
|
+
for (let table of this.queryOpts.tables) {
|
|
2472
|
+
if (table.isShow && table.width) {
|
|
2473
|
+
width += ToolsUtil.pixelToNum(table.width);
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
let w = this.tableContent.nativeElement.offsetWidth - 22;
|
|
2478
|
+
if (width > w)
|
|
2479
|
+
this.scrollSize.x = width + "px";
|
|
2480
|
+
else
|
|
2481
|
+
this.scrollSize.x = this.tableContent.nativeElement.offsetWidth - 22 + "px";
|
|
2482
|
+
console.log(this.scrollSize);
|
|
2483
|
+
this.isAllLoad = true;
|
|
2484
|
+
this.cd.detectChanges();
|
|
2485
|
+
}, 500);
|
|
2486
|
+
}
|
|
2487
|
+
sort(sortName, value) {
|
|
2488
|
+
for (const key in this.sortMap) {
|
|
2489
|
+
this.sortMap[key] = key === sortName ? value : null;
|
|
2490
|
+
}
|
|
2491
|
+
// this.search(this.listOfSearchName, this.listOfSearchAddress);
|
|
2492
|
+
console.log(this.sortMap);
|
|
2493
|
+
this.query(true);
|
|
2494
|
+
}
|
|
2495
|
+
get dictService() {
|
|
2496
|
+
return this.injector.get(DictService);
|
|
2497
|
+
}
|
|
2498
|
+
getDictValue(code) {
|
|
2499
|
+
console.log("pppp");
|
|
2500
|
+
this.dictService.getDictBycode(code).subscribe(result => {
|
|
2501
|
+
if (result && result != null)
|
|
2502
|
+
this.dicts[code] = result.dicts;
|
|
2503
|
+
console.log(this.dicts);
|
|
2504
|
+
}, error => {
|
|
2505
|
+
this.dicts[code] = [];
|
|
2506
|
+
});
|
|
2507
|
+
}
|
|
2508
|
+
toggleCollapse() {
|
|
2509
|
+
this.isCollapse = !this.isCollapse;
|
|
2510
|
+
this.queryOpts.headers.forEach((c, index) => {
|
|
2511
|
+
c.isShow = this.isCollapse ? index < this.queryOpts.showNum : true;
|
|
2512
|
+
});
|
|
2513
|
+
}
|
|
2514
|
+
resetForm() {
|
|
2515
|
+
this.atrForm.reset();
|
|
2516
|
+
}
|
|
2517
|
+
selectChange(value, item) {
|
|
2518
|
+
console.log(value);
|
|
2519
|
+
let action = {
|
|
2520
|
+
name: item.label,
|
|
2521
|
+
code: item.key,
|
|
2522
|
+
data: item,
|
|
2523
|
+
value: value,
|
|
2524
|
+
};
|
|
2525
|
+
this.headerAction.emit(action);
|
|
2526
|
+
}
|
|
2527
|
+
clickIcon(value, item, $event) {
|
|
2528
|
+
var _a, _b;
|
|
2529
|
+
$event.stopPropagation();
|
|
2530
|
+
console.log(value, item);
|
|
2531
|
+
let action = {
|
|
2532
|
+
name: item.name,
|
|
2533
|
+
code: ((_a = item.icon) === null || _a === void 0 ? void 0 : _a.code) ? (_b = item.icon) === null || _b === void 0 ? void 0 : _b.code : "",
|
|
2534
|
+
data: item,
|
|
2535
|
+
value: value,
|
|
2536
|
+
};
|
|
2537
|
+
this.headerAction.emit(action);
|
|
2538
|
+
}
|
|
2539
|
+
getQueryParams(reset) {
|
|
2540
|
+
if (reset) {
|
|
2541
|
+
this.pageIndex = 1;
|
|
2542
|
+
}
|
|
2543
|
+
console.log(this.pageIndex);
|
|
2544
|
+
let params = {
|
|
2545
|
+
page: this.pageIndex,
|
|
2546
|
+
limit: this.pageSize,
|
|
2547
|
+
sort: this.getSortInfo()
|
|
2548
|
+
};
|
|
2549
|
+
for (const key in this.atrForm.value) {
|
|
2550
|
+
if (this.atrForm.value[key] && this.atrForm.value[key] != null && this.atrForm.value[key] != "") {
|
|
2551
|
+
if (this.getHederType(key) == "dateRange") {
|
|
2552
|
+
let begin = key + "Begin";
|
|
2553
|
+
let end = key + "End";
|
|
2554
|
+
params[begin] = formatDate(this.atrForm.value[key][0], 'yyyy-MM-dd', this.locale) + " 00:00:00";
|
|
2555
|
+
params[end] = formatDate(this.atrForm.value[key][1], 'yyyy-MM-dd', this.locale) + " 00:00:00";
|
|
2556
|
+
}
|
|
2557
|
+
else if (this.getHederType(key) == "sdate") {
|
|
2558
|
+
params[key] = formatDate(this.atrForm.value[key], 'yyyy-MM-dd 00:00:00', this.locale);
|
|
2559
|
+
}
|
|
2560
|
+
else if (this.getHederType(key) == "treeSelect") {
|
|
2561
|
+
let value = this.atrForm.value[key];
|
|
2562
|
+
if (typeof value == 'string') {
|
|
2563
|
+
params[key] = this.atrForm.value[key];
|
|
2564
|
+
}
|
|
2565
|
+
else {
|
|
2566
|
+
params[key] = this.atrForm.value[key].join();
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
else if (this.getHederType(key) == "cascader") {
|
|
2570
|
+
params[key] = this.atrForm.value[key].join();
|
|
2571
|
+
}
|
|
2572
|
+
else {
|
|
2573
|
+
params[key] = this.atrForm.value[key];
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
params = Object.assign(params, this.defaultParams);
|
|
2578
|
+
console.log(params);
|
|
2579
|
+
return params;
|
|
2580
|
+
}
|
|
2581
|
+
getHederType(cusKey) {
|
|
2582
|
+
let type = null;
|
|
2583
|
+
for (let header of this.queryOpts.headers) {
|
|
2584
|
+
if (cusKey == header.key) {
|
|
2585
|
+
type = header.type;
|
|
2586
|
+
break;
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
return type;
|
|
2590
|
+
}
|
|
2591
|
+
setDefaultParams(params, reset = true) {
|
|
2592
|
+
this.defaultParams = params;
|
|
2593
|
+
this.query(reset);
|
|
2594
|
+
}
|
|
2595
|
+
getSortInfo() {
|
|
2596
|
+
let orderby = [];
|
|
2597
|
+
for (const key in this.sortMap) {
|
|
2598
|
+
if (this.sortMap[key] == 'ascend') {
|
|
2599
|
+
orderby.push(key + "|" + "asc");
|
|
2600
|
+
}
|
|
2601
|
+
else if (this.sortMap[key] == 'descend') {
|
|
2602
|
+
orderby.push(key + "|" + "desc");
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
let order = "";
|
|
2606
|
+
if (orderby.length < 1 && this.queryOpts.sort) {
|
|
2607
|
+
order = this.queryOpts.sort;
|
|
2608
|
+
}
|
|
2609
|
+
else
|
|
2610
|
+
order = orderby.join(",");
|
|
2611
|
+
return order;
|
|
2612
|
+
}
|
|
2613
|
+
query(reset = false) {
|
|
2614
|
+
let params = this.getQueryParams(reset);
|
|
2615
|
+
if (this.queryOpts.url) {
|
|
2616
|
+
this.loading = true;
|
|
2617
|
+
this.httpService.post(this.queryOpts.url, params, ToolsUtil.getHttpOptions()).subscribe(result => {
|
|
2618
|
+
var _a;
|
|
2619
|
+
this.loading = false;
|
|
2620
|
+
if (result.status == 200) {
|
|
2621
|
+
let action = {};
|
|
2622
|
+
action["result"] = result;
|
|
2623
|
+
action["params"] = params;
|
|
2624
|
+
this.queryBack.emit(action);
|
|
2625
|
+
this.total = (_a = result === null || result === void 0 ? void 0 : result.page) === null || _a === void 0 ? void 0 : _a.totalResult;
|
|
2626
|
+
this.tableDatas = result.data;
|
|
2627
|
+
this.getRowSpan();
|
|
2628
|
+
this.mapOfCheckedId = {};
|
|
2629
|
+
this.curChecked = -1;
|
|
2630
|
+
this.refreshStatus();
|
|
2631
|
+
}
|
|
2632
|
+
}, error => {
|
|
2633
|
+
this.loading = false;
|
|
2634
|
+
});
|
|
2635
|
+
}
|
|
2636
|
+
else {
|
|
2637
|
+
this.queryBack.emit({ name: '', code: 'query', data: params });
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
contextMenu($event, menu) {
|
|
2641
|
+
console.log($event);
|
|
2642
|
+
this.nzContextMenuService.create($event, menu);
|
|
2643
|
+
}
|
|
2644
|
+
log(value) {
|
|
2645
|
+
console.log(value);
|
|
2646
|
+
for (let table of this.queryOpts.tables) {
|
|
2647
|
+
let flag = false;
|
|
2648
|
+
for (let item of value) {
|
|
2649
|
+
if (item == table.key) {
|
|
2650
|
+
table.isShow = true;
|
|
2651
|
+
flag = true;
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
if (!flag)
|
|
2655
|
+
table.isShow = false;
|
|
2656
|
+
}
|
|
2657
|
+
console.log(this.queryOpts.tables);
|
|
2658
|
+
}
|
|
2659
|
+
checkShowTd(item, index) {
|
|
2660
|
+
if (!item.isShow) {
|
|
2661
|
+
return false;
|
|
2662
|
+
}
|
|
2663
|
+
if (item.isRowSpan) {
|
|
2664
|
+
// 合并行,返回值与上一行相同则隐藏这一行;
|
|
2665
|
+
if (index == 0) {
|
|
2666
|
+
return true;
|
|
2667
|
+
}
|
|
2668
|
+
const key = item.key ? item.key : "";
|
|
2669
|
+
const cur = this.tableDatas[index][key];
|
|
2670
|
+
const pre = this.tableDatas[index - 1][key];
|
|
2671
|
+
return !(cur == pre);
|
|
2672
|
+
}
|
|
2673
|
+
return item.isShow;
|
|
2674
|
+
}
|
|
2675
|
+
checkRowSpan(item, data) {
|
|
2676
|
+
if (item.isRowSpan) {
|
|
2677
|
+
return this.rowSpanMap[item.key ? item.key : ""][data[item.key ? item.key : ""]].num;
|
|
2678
|
+
}
|
|
2679
|
+
return 1;
|
|
2680
|
+
}
|
|
2681
|
+
getRowSpan() {
|
|
2682
|
+
let isRowSpan = false;
|
|
2683
|
+
this.queryOpts.tables.forEach((item) => {
|
|
2684
|
+
if (item.isRowSpan) {
|
|
2685
|
+
isRowSpan = true;
|
|
2686
|
+
this.rowSpanMap[item.key] = {};
|
|
2687
|
+
}
|
|
2688
|
+
});
|
|
2689
|
+
if (!isRowSpan) {
|
|
2690
|
+
return;
|
|
2691
|
+
}
|
|
2692
|
+
let keys = Object.keys(this.rowSpanMap);
|
|
2693
|
+
this.tableDatas.forEach((item) => {
|
|
2694
|
+
keys.forEach(key => {
|
|
2695
|
+
const value = item[key];
|
|
2696
|
+
if (!this.rowSpanMap[key][value]) {
|
|
2697
|
+
this.rowSpanMap[key][value] = {
|
|
2698
|
+
num: 1
|
|
2699
|
+
};
|
|
2700
|
+
}
|
|
2701
|
+
else {
|
|
2702
|
+
this.rowSpanMap[key][value].num += 1;
|
|
2703
|
+
}
|
|
2704
|
+
});
|
|
2705
|
+
});
|
|
2706
|
+
}
|
|
2707
|
+
drop(event) {
|
|
2708
|
+
moveItemInArray(this.tableDatas, event.previousIndex, event.currentIndex);
|
|
2709
|
+
let action = {
|
|
2710
|
+
name: 'drag',
|
|
2711
|
+
code: 'drag',
|
|
2712
|
+
type: "rows"
|
|
2713
|
+
};
|
|
2714
|
+
action.datas = this.tableDatas;
|
|
2715
|
+
action.numberOfChecked = 1;
|
|
2716
|
+
this.tableAction.emit(action);
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
AtrTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AtrTableComponent, deps: [{ token: i1$2.FormBuilder }, { token: i0.Injector }, { token: LOCALE_ID }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2720
|
+
AtrTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AtrTableComponent, selector: "atr-table", inputs: { loading: "loading", allowDrag: "allowDrag", queryOpts: "queryOpts", showPagination: "showPagination", title: "title" }, outputs: { tableAction: "tableAction", queryBack: "queryBack", headerAction: "headerAction" }, viewQueries: [{ propertyName: "tableContent", first: true, predicate: ["tableContent"], descendants: true, static: true }], ngImport: i0, template: "<form nz-form [formGroup]=\"atrForm\" class=\"ant-advanced-search-form\" *ngIf=\"queryOpts.headers.length >0 || queryOpts.actions.length >0\" >\r\n <div nz-row [nzGutter]=\"24\">\r\n <div nz-col [hidden]=\"!header.isShow\" *ngFor=\"let header of queryOpts.headers\"\r\n [nzSpan]=\"header.span\">\r\n <app-table-form-item\r\n [header]=\"header\"\r\n [ngModel]=\"header.defaultVal\"\r\n [dictList]=\"dicts[header.dictCode]\"\r\n [formControlName]=\"header.key\"\r\n (headerAction)=\"headerAction.emit($event)\"></app-table-form-item>\r\n </div>\r\n </div>\r\n <div nz-row nzType=\"flex\">\r\n <div class=\"action-area\" nz-col [nzSpan]=\"16\" >\r\n <ng-container *ngFor=\"let action of queryOpts.actions\" >\r\n <atr-local-upload *ngIf=\"action.gType == 'upload'\" [code]=\"action.code\" [url]=\"action.url\" [name]=\"action.name\" style=\" display: inline-block;\"></atr-local-upload>\r\n <ng-container *ngIf=\"!action.gType\">\r\n <button nz-button [nzType]=\"'primary'\" nzSize=\"small\" (click)=\"doAction(action.code)\" *atrRole=\"action.code\" [disabled] = \"isEnable(action.operator)\">{{action.name}}</button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div nz-col [nzSpan]=\"8\" class=\"search-area\" *ngIf=\"queryOpts.headers.length >0 && !queryOpts.isHideQuery\">\r\n <button nz-button nzSize=\"small\" [nzType]=\"'primary'\" (click)=\"query(true)\">\u67E5\u8BE2</button>\r\n <button nz-button nzSize=\"small\" (click)=\"resetForm()\">\u91CD\u7F6E</button>\r\n <a class=\"collapse\" (click)=\"toggleCollapse()\" *ngIf=\"queryOpts.headers.length > queryOpts.showNum \">\r\n \u66F4\u591A\r\n <i nz-icon [nzType]=\"isCollapse ? 'down' : 'up'\"></i>\r\n </a>\r\n </div>\r\n </div>\r\n <div *ngIf=\"title\" class=\"title\">{{title}}</div>\r\n </form>\r\n <div class=\"search-result-list\" #tableContent>\r\n <nz-table *ngIf=\"isAllLoad\" #basicTable class=\"main-table\"\r\n [nzScroll]= \"scrollSize\"\r\n nzSize=\"middle\"\r\n nzBordered\r\n [nzShowPagination]=\"showPagination\"\r\n nzShowSizeChanger\r\n [nzFrontPagination]=\"false\"\r\n [nzLoading]=\"loading\"\r\n [nzTotal]=\"total\"\r\n [(nzPageIndex)]=\"pageIndex\"\r\n [(nzPageSize)]=\"pageSize\"\r\n [nzData]=\"tableDatas\"\r\n (nzPageIndexChange)=\"query()\"\r\n (nzPageSizeChange)=\"query(true)\"\r\n [nzShowTotal]=\"totalTemplate\"\r\n >\r\n <thead>\r\n <tr (contextmenu)=\"contextMenu($event,menu)\" class=\"header-tr\">\r\n\r\n <th *ngIf=\"queryOpts.checkBox?.isShowCheckbox\"\r\n [nzLeft]=\"true\"\r\n class=\"left-zindex-header\"\r\n nzShowCheckbox\r\n style=\"z-index: 90!important;\"\r\n nzWidth=\"30px\"\r\n nzAlign=\"center\"\r\n [(nzChecked)]=\"isAllDisplayDataChecked\"\r\n [nzIndeterminate]=\"isIndeterminate\"\r\n (nzCheckedChange)=\"checkAll($event)\"\r\n ></th>\r\n <th [nzLeft]=\"true\" class=\"left-zindex-header\" *ngIf=\"queryOpts.isIndex\" nzWidth=\"30px\" nzAlign=\"center\">#</th>\r\n <th [nzLeft]=\"true\" class=\"left-zindex-header\" *ngIf=\"queryOpts.checkBox?.isRadio\" nzWidth=\"30px\" nzAlign=\"center\">#</th>\r\n <ng-container *ngFor=\"let item of queryOpts.tables; \">\r\n <th *ngIf=\"item.isShow \"\r\n [nzShowSort]=item.sortable\r\n nz-resizable\r\n nzPreview\r\n nzBounds=\"window\"\r\n [(nzSortOrder)]=\"sortMap[item.sortKey]\"\r\n (nzSortOrderChange)=\"sort(item.sortKey, $event)\"\r\n [nzWidth]=\"item.width\"\r\n [nzMaxWidth]=\"256\"\r\n [nzMinWidth]=\"60\"\r\n [nzRight]=\"item.isRight ? true : false\"\r\n [nzLeft]=\"item.isLeft ? true : false\"\r\n [ngClass]=\"{'left-zindex-header':item.isLeft ? true : false}\"\r\n (nzResizeEnd)=\"onResize($event, item.name)\">\r\n {{item.name}}<!-- {width}: { width: number }, col: string-->\r\n <nz-resize-handle nzDirection=\"right\">\r\n <div class=\"resize-trigger\"></div>\r\n </nz-resize-handle>\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </thead>\r\n\r\n\r\n <tbody *ngIf=\"!allowDrag\">\r\n <tr *ngFor=\"let data of basicTable.data;index as i\" class=\"t-tr\" (click)=\"selectRow(data,i)\"\r\n [ngStyle]=\"{'color':isShowColor(data)}\"\r\n [ngClass]=\"{'selected': i == curChecked}\" (dblclick)=\"dbclickData(data,i)\">\r\n <td [nzLeft]=\"true\"\r\n class=\"left-zindex\"\r\n *ngIf=\"queryOpts.checkBox?.isShowCheckbox\"\r\n nzShowCheckbox\r\n [(nzChecked)]=\"mapOfCheckedId[data.id]\"\r\n (nzCheckedChange)=\"refreshStatus()\"\r\n ></td>\r\n <td [nzLeft]=\"true\"\r\n class=\"left-zindex\"\r\n *ngIf=\"queryOpts.checkBox?.isRadio\" nzShowCheckbox (nzCheckedChange)=\"selectRow(data,i)\"\r\n [(nzChecked)]=\"mapOfCheckedId[data.id]\"></td>\r\n <td [nzLeft]=\"true\"\r\n *ngIf=\"queryOpts.isIndex\" nzAlign=\"center\" style=\"padding:12px 0;\" nzBreakWord>{{i + 1}}</td>\r\n\r\n <ng-container *ngFor=\"let item of queryOpts.tables;\">\r\n\r\n <td [nzLeft]=\"item.isLeft ? true : false\"\r\n [ngClass]=\"{'left-zindex':item.isLeft ? true : false}\"\r\n [nzRight]=\"item.isRight ? true : false\"\r\n nzBreakWord\r\n [rowSpan]=\"checkRowSpan(item,data)\"\r\n *ngIf=\"checkShowTd(item,i) \">\r\n <app-table-td [data]=\"data\"\r\n [item]=\"item\"\r\n [i]=\"i\"\r\n (doActionByRowAction)=\"doActionByRow2($event)\"\r\n ></app-table-td>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </tbody>\r\n <tbody *ngIf=\"allowDrag\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <tr cdkDrag *ngFor=\"let data of basicTable.data;index as i\" class=\"t-tr\" (click)=\"selectRow(data,i)\"\r\n [ngClass]=\"{'selected': i == curChecked}\">\r\n <td [nzLeft]=\"true\"\r\n class=\"left-zindex\"\r\n *ngIf=\"queryOpts.checkBox?.isShowCheckbox\"\r\n nzShowCheckbox\r\n [(nzChecked)]=\"mapOfCheckedId[data.id]\"\r\n (nzCheckedChange)=\"refreshStatus()\"\r\n ></td>\r\n <!--\r\n <td [nzLeft]=\"item.isLeft ? true : false\" [ngClass]=\"{'left-zindex':item.isLeft ? true : false}\" [nzRight]=\"item.isRight ? true : false\"\r\n *ngIf=\"queryOpts.isShowCheckbox\"\r\n nzShowCheckbox\r\n [(nzChecked)]=\"mapOfCheckedId[data.id]\"\r\n (nzCheckedChange)=\"refreshStatus()\"\r\n ></td>\r\n -->\r\n <td [nzLeft]=\"true\"\r\n class=\"left-zindex\"\r\n *ngIf=\"queryOpts.checkBox?.isRadio\" nzShowCheckbox (nzCheckedChange)=\"selectRow(data,i)\"\r\n [(nzChecked)]=\"mapOfCheckedId[data.id]\"></td>\r\n <td [nzLeft]=\"true\"\r\n class=\"left-zindex\"\r\n *ngIf=\"queryOpts.isIndex\" nzAlign=\"center\" style=\"padding:12px 0;\" nzBreakWord>{{i + 1}}</td>\r\n\r\n <ng-container *ngFor=\"let item of queryOpts.tables;\">\r\n\r\n <td [nzLeft]=\"item.isLeft ? true : false\"\r\n [ngClass]=\"{'left-zindex':item.isLeft ? true : false}\"\r\n [nzRight]=\"item.isRight ? true : false\"\r\n nzBreakWord\r\n [rowSpan]=\"checkRowSpan(item,data)\"\r\n *ngIf=\"checkShowTd(item,i) \">\r\n <app-table-td [data]=\"data\"\r\n [item]=\"item\"\r\n [i]=\"i\"\r\n (doActionByRowAction)=\"doActionByRow2($event)\"\r\n ></app-table-td>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </tbody>\r\n\r\n\r\n <ng-template #totalTemplate let-total>\u5171 {{ total }} \u6761\u8BB0\u5F55</ng-template>\r\n </nz-table>\r\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\r\n <div class=\"tabel-colunmn\">\r\n <nz-checkbox-wrapper style=\"width: 100%;margin-top: 30px;\" (nzOnChange)=\"log($event)\">\r\n <div nz-row>\r\n <div nz-col nzSpan=\"24\" *ngFor=\"let item of queryOpts.tables\" >\r\n <label nz-checkbox nzValue=\"{{item.key}}\" [ngModel]=\"item.isShow\">{{item.name}}</label>\r\n </div>\r\n </div>\r\n </nz-checkbox-wrapper>\r\n <div class=\"tabel-colunmn-header\">\u8BF7\u9009\u62E9\u5217\u8868\u663E\u793A\u5185\u5BB9</div>\r\n </div>\r\n </nz-dropdown-menu>\r\n </div>\r\n\r\n", styles: [":host{width:100%;height:100%;display:flex;flex-direction:column}::ng-deep .ant-modal{top:50px;padding:0}.ant-advanced-search-form{padding:10px 6px 6px;background:#fbfbfb;border:1px solid #d9d9d9;border-radius:6px;margin-bottom:5px}.select-icon:hover{color:#1890ff}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:5px}::ng-deep .ant-table-column-title{font-size:.65rem}::ng-deep .ant-table-tbody>tr.ant-table-row:hover>td{background:#d0eeea}::ng-deep .ant-modal-header,::ng-deep .ant-modal-content{border-radius:4px}::ng-deep .ant-table-tbody>tr.selected:hover>td{background-color:#cfe1d0!important}::ng-deep .ant-table{height:100%}::ng-deep nz-pagination{position:absolute;bottom:0;right:0}.search-result-list{padding:1px;border:1px dashed #e9e9e9;border-radius:6px;background-color:#fff;flex:1;text-align:center;position:relative}[nz-form-label]{overflow:visible}button{margin:2px 4px}.collapse{margin-left:6px;font-size:12px}.action-area{text-align:left}.search-area{text-align:right}::ng-deep .main-table{position:absolute;top:0;left:0;right:0;bottom:0}::ng-deep .main-table .ant-spin-nested-loading{height:100%}::ng-deep .main-table .ant-spin-container{height:100%}::ng-deep .ant-table-tbody>tr.selected>td{background-color:#cfe1d0}::ng-deep .ant-table-tbody>tr>td>img{display:block;width:40%;margin:0 auto}::ng-deep .ant-table-body{-ms-overflow-style:none;overflow:-moz-scrollbars-none}::ng-deep .ant-table-body::-webkit-scrollbar,::ng-deep .ant-table-header::-webkit-scrollbar{width:6px!important;height:6px!important}::ng-deep .ant-table-body::-webkit-scrollbar-track,::ng-deep .ant-table-header::-webkit-scrollbar-track{width:6px!important;cursor:pointer}::ng-deep .ant-table-body::-webkit-scrollbar-thumb,::ng-deep .ant-table-header::-webkit-scrollbar-thumb{background:#1890ff;border-radius:3px;cursor:pointer}::ng-deep .ant-table-bordered .ant-table-thead>tr>th{border-right:1px solid #ddd}::ng-deep .ant-table-header{-ms-overflow-style:none;overflow:-moz-scrollbars-none;margin-bottom:-5px!important}::ng-deep .ant-table-placeholder{border-bottom:none!important;border-top:none!important}.tabel-colunmn{display:block;width:160px;height:300px;background:#fff;border:1px solid #ddd;padding:10px;border-radius:5px;overflow-x:hidden;overflow-y:auto;position:relative}.tabel-colunmn-header{position:fixed;top:0;left:0;right:0;height:30px;z-index:999;line-height:30px;border-bottom:1px solid #ddd;text-align:left;font-size:13px;padding-left:10px}.t-tr{background:#fff}.t-tr:nth-child(odd){background:#f8f9fa}::ng-deep .ant-table-thead>tr>th{background:#e7ebef!important;border-radius:0;word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-tbody>tr>td{word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-header{background:#e7ebef!important}td{font-size:.65rem}.resize-trigger{height:100%}.nz-resizable-preview{border-width:0;border-right-width:1px}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}::ng-deep .ant-table-tbody>tr>td{padding:5px}::ng-deep .ant-table{line-height:15px}::ng-deep .ant-table-middle .ant-table-footer,.ant-table-middle .ant-table-tbody>tr>td,.ant-table-middle .ant-table-thead>tr>th,.ant-table-middle .ant-table-title{padding:5px}::ng-deep .ant-table-tbody>tr>td>img{width:35px}::ng-deep .ant-modal-body{padding:10px}::ng-deep .ant-table.ant-table-bordered tbody>tr>td{font-size:13px}::ng-deep th{z-index:80!important}.left-zindex-header{z-index:90!important}.left-zindex{z-index:80!important}:host ::ng-deep input,:host ::ng-deep .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,:host ::ng-deep .ant-picker{border-radius:5px}.border-text{width:100%;height:36px;line-height:36px;display:flex}.border-text .border-text-line{display:inline-block;border-top:1px solid #cccccc;margin-top:18px}.border-text .border-text-line-left{width:10px;border-left:1px solid #cccccc}.border-text .border-text-line-right{flex:1;border-right:1px solid #cccccc}.border-text .border-text-span{margin-left:5px;margin-right:5px}.label-title{position:absolute;display:block;top:-7px;left:10px;background-color:#fff;color:#000;font-weight:600;font-size:12px;line-height:12px}:host ::ng-deep .tabel-colunmn-header{position:absolute!important;top:0!important}::ng-deep .ant-table-cell-fix-left,.ant-table-cell-fix-right{position:sticky!important}\n"], components: [{ type: TableFormItemComponent, selector: "app-table-form-item", inputs: ["header", "value", "dictList"], outputs: ["headerAction"] }, { type: LocalUploadComponent, selector: "atr-local-upload", inputs: ["url", "name", "code"] }, { type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { type: i5$1.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzPaginationPosition", "nzScroll", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange"], exportAs: ["nzTable"] }, { type: i5$1.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { type: i5$1.NzThSelectionComponent, selector: "th[nzSelections],th[nzChecked],th[nzShowCheckbox],th[nzShowRowSelection]", inputs: ["nzSelections", "nzChecked", "nzDisabled", "nzIndeterminate", "nzShowCheckbox", "nzShowRowSelection"], outputs: ["nzCheckedChange"] }, { type: i5$1.NzThAddOnComponent, selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]", inputs: ["nzColumnKey", "nzFilterMultiple", "nzSortOrder", "nzSortPriority", "nzSortDirections", "nzFilters", "nzSortFn", "nzFilterFn", "nzShowSort", "nzShowFilter", "nzCustomFilter"], outputs: ["nzCheckedChange", "nzSortOrderChange", "nzFilterChange"] }, { type: i6$1.NzResizeHandleComponent, selector: "nz-resize-handle, [nz-resize-handle]", inputs: ["nzDirection"], outputs: ["nzMouseDown"], exportAs: ["nzResizeHandle"] }, { type: i5$1.NzTbodyComponent, selector: "tbody" }, { type: i5$1.NzTdAddOnComponent, selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: ["nzChecked", "nzDisabled", "nzIndeterminate", "nzIndentSize", "nzShowExpand", "nzShowCheckbox", "nzExpand"], outputs: ["nzCheckedChange", "nzExpandChange"] }, { type: TableTdComponent, selector: "app-table-td", inputs: ["data", "item", "i"], outputs: ["doActionByRowAction"] }, { type: i8$1.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { type: i9$1.NzCheckboxWrapperComponent, selector: "nz-checkbox-wrapper", outputs: ["nzOnChange"], exportAs: ["nzCheckboxWrapper"] }, { type: i9$1.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon"], exportAs: ["nzForm"] }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i12.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i12.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: AtrRoleDirective, selector: "[atrRole]", inputs: ["atrRole"] }, { type: i4$2.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { type: i9.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { type: i5$1.NzTrDirective, selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { type: i5$1.NzTableCellDirective, selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { type: i5$1.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { type: i5$1.NzCellAlignDirective, selector: "th[nzAlign],td[nzAlign]", inputs: ["nzAlign"] }, { type: i5$1.NzCellFixedDirective, selector: "td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]", inputs: ["nzRight", "nzLeft", "colspan", "colSpan"] }, { type: i6$1.NzResizableDirective, selector: "[nz-resizable]", inputs: ["nzBounds", "nzMaxHeight", "nzMaxWidth", "nzMinHeight", "nzMinWidth", "nzGridColumnCount", "nzMaxColumn", "nzMinColumn", "nzLockAspectRatio", "nzPreview", "nzDisabled"], outputs: ["nzResize", "nzResizeEnd", "nzResizeStart"], exportAs: ["nzResizable"] }, { type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5$1.NzCellBreakWordDirective, selector: "th[nzBreakWord],td[nzBreakWord]", inputs: ["nzBreakWord"] }, { type: i17.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i17.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
2721
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AtrTableComponent, decorators: [{
|
|
2722
|
+
type: Component,
|
|
2723
|
+
args: [{ selector: 'atr-table', template: "<form nz-form [formGroup]=\"atrForm\" class=\"ant-advanced-search-form\" *ngIf=\"queryOpts.headers.length >0 || queryOpts.actions.length >0\" >\r\n <div nz-row [nzGutter]=\"24\">\r\n <div nz-col [hidden]=\"!header.isShow\" *ngFor=\"let header of queryOpts.headers\"\r\n [nzSpan]=\"header.span\">\r\n <app-table-form-item\r\n [header]=\"header\"\r\n [ngModel]=\"header.defaultVal\"\r\n [dictList]=\"dicts[header.dictCode]\"\r\n [formControlName]=\"header.key\"\r\n (headerAction)=\"headerAction.emit($event)\"></app-table-form-item>\r\n </div>\r\n </div>\r\n <div nz-row nzType=\"flex\">\r\n <div class=\"action-area\" nz-col [nzSpan]=\"16\" >\r\n <ng-container *ngFor=\"let action of queryOpts.actions\" >\r\n <atr-local-upload *ngIf=\"action.gType == 'upload'\" [code]=\"action.code\" [url]=\"action.url\" [name]=\"action.name\" style=\" display: inline-block;\"></atr-local-upload>\r\n <ng-container *ngIf=\"!action.gType\">\r\n <button nz-button [nzType]=\"'primary'\" nzSize=\"small\" (click)=\"doAction(action.code)\" *atrRole=\"action.code\" [disabled] = \"isEnable(action.operator)\">{{action.name}}</button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div nz-col [nzSpan]=\"8\" class=\"search-area\" *ngIf=\"queryOpts.headers.length >0 && !queryOpts.isHideQuery\">\r\n <button nz-button nzSize=\"small\" [nzType]=\"'primary'\" (click)=\"query(true)\">\u67E5\u8BE2</button>\r\n <button nz-button nzSize=\"small\" (click)=\"resetForm()\">\u91CD\u7F6E</button>\r\n <a class=\"collapse\" (click)=\"toggleCollapse()\" *ngIf=\"queryOpts.headers.length > queryOpts.showNum \">\r\n \u66F4\u591A\r\n <i nz-icon [nzType]=\"isCollapse ? 'down' : 'up'\"></i>\r\n </a>\r\n </div>\r\n </div>\r\n <div *ngIf=\"title\" class=\"title\">{{title}}</div>\r\n </form>\r\n <div class=\"search-result-list\" #tableContent>\r\n <nz-table *ngIf=\"isAllLoad\" #basicTable class=\"main-table\"\r\n [nzScroll]= \"scrollSize\"\r\n nzSize=\"middle\"\r\n nzBordered\r\n [nzShowPagination]=\"showPagination\"\r\n nzShowSizeChanger\r\n [nzFrontPagination]=\"false\"\r\n [nzLoading]=\"loading\"\r\n [nzTotal]=\"total\"\r\n [(nzPageIndex)]=\"pageIndex\"\r\n [(nzPageSize)]=\"pageSize\"\r\n [nzData]=\"tableDatas\"\r\n (nzPageIndexChange)=\"query()\"\r\n (nzPageSizeChange)=\"query(true)\"\r\n [nzShowTotal]=\"totalTemplate\"\r\n >\r\n <thead>\r\n <tr (contextmenu)=\"contextMenu($event,menu)\" class=\"header-tr\">\r\n\r\n <th *ngIf=\"queryOpts.checkBox?.isShowCheckbox\"\r\n [nzLeft]=\"true\"\r\n class=\"left-zindex-header\"\r\n nzShowCheckbox\r\n style=\"z-index: 90!important;\"\r\n nzWidth=\"30px\"\r\n nzAlign=\"center\"\r\n [(nzChecked)]=\"isAllDisplayDataChecked\"\r\n [nzIndeterminate]=\"isIndeterminate\"\r\n (nzCheckedChange)=\"checkAll($event)\"\r\n ></th>\r\n <th [nzLeft]=\"true\" class=\"left-zindex-header\" *ngIf=\"queryOpts.isIndex\" nzWidth=\"30px\" nzAlign=\"center\">#</th>\r\n <th [nzLeft]=\"true\" class=\"left-zindex-header\" *ngIf=\"queryOpts.checkBox?.isRadio\" nzWidth=\"30px\" nzAlign=\"center\">#</th>\r\n <ng-container *ngFor=\"let item of queryOpts.tables; \">\r\n <th *ngIf=\"item.isShow \"\r\n [nzShowSort]=item.sortable\r\n nz-resizable\r\n nzPreview\r\n nzBounds=\"window\"\r\n [(nzSortOrder)]=\"sortMap[item.sortKey]\"\r\n (nzSortOrderChange)=\"sort(item.sortKey, $event)\"\r\n [nzWidth]=\"item.width\"\r\n [nzMaxWidth]=\"256\"\r\n [nzMinWidth]=\"60\"\r\n [nzRight]=\"item.isRight ? true : false\"\r\n [nzLeft]=\"item.isLeft ? true : false\"\r\n [ngClass]=\"{'left-zindex-header':item.isLeft ? true : false}\"\r\n (nzResizeEnd)=\"onResize($event, item.name)\">\r\n {{item.name}}<!-- {width}: { width: number }, col: string-->\r\n <nz-resize-handle nzDirection=\"right\">\r\n <div class=\"resize-trigger\"></div>\r\n </nz-resize-handle>\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </thead>\r\n\r\n\r\n <tbody *ngIf=\"!allowDrag\">\r\n <tr *ngFor=\"let data of basicTable.data;index as i\" class=\"t-tr\" (click)=\"selectRow(data,i)\"\r\n [ngStyle]=\"{'color':isShowColor(data)}\"\r\n [ngClass]=\"{'selected': i == curChecked}\" (dblclick)=\"dbclickData(data,i)\">\r\n <td [nzLeft]=\"true\"\r\n class=\"left-zindex\"\r\n *ngIf=\"queryOpts.checkBox?.isShowCheckbox\"\r\n nzShowCheckbox\r\n [(nzChecked)]=\"mapOfCheckedId[data.id]\"\r\n (nzCheckedChange)=\"refreshStatus()\"\r\n ></td>\r\n <td [nzLeft]=\"true\"\r\n class=\"left-zindex\"\r\n *ngIf=\"queryOpts.checkBox?.isRadio\" nzShowCheckbox (nzCheckedChange)=\"selectRow(data,i)\"\r\n [(nzChecked)]=\"mapOfCheckedId[data.id]\"></td>\r\n <td [nzLeft]=\"true\"\r\n *ngIf=\"queryOpts.isIndex\" nzAlign=\"center\" style=\"padding:12px 0;\" nzBreakWord>{{i + 1}}</td>\r\n\r\n <ng-container *ngFor=\"let item of queryOpts.tables;\">\r\n\r\n <td [nzLeft]=\"item.isLeft ? true : false\"\r\n [ngClass]=\"{'left-zindex':item.isLeft ? true : false}\"\r\n [nzRight]=\"item.isRight ? true : false\"\r\n nzBreakWord\r\n [rowSpan]=\"checkRowSpan(item,data)\"\r\n *ngIf=\"checkShowTd(item,i) \">\r\n <app-table-td [data]=\"data\"\r\n [item]=\"item\"\r\n [i]=\"i\"\r\n (doActionByRowAction)=\"doActionByRow2($event)\"\r\n ></app-table-td>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </tbody>\r\n <tbody *ngIf=\"allowDrag\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <tr cdkDrag *ngFor=\"let data of basicTable.data;index as i\" class=\"t-tr\" (click)=\"selectRow(data,i)\"\r\n [ngClass]=\"{'selected': i == curChecked}\">\r\n <td [nzLeft]=\"true\"\r\n class=\"left-zindex\"\r\n *ngIf=\"queryOpts.checkBox?.isShowCheckbox\"\r\n nzShowCheckbox\r\n [(nzChecked)]=\"mapOfCheckedId[data.id]\"\r\n (nzCheckedChange)=\"refreshStatus()\"\r\n ></td>\r\n <!--\r\n <td [nzLeft]=\"item.isLeft ? true : false\" [ngClass]=\"{'left-zindex':item.isLeft ? true : false}\" [nzRight]=\"item.isRight ? true : false\"\r\n *ngIf=\"queryOpts.isShowCheckbox\"\r\n nzShowCheckbox\r\n [(nzChecked)]=\"mapOfCheckedId[data.id]\"\r\n (nzCheckedChange)=\"refreshStatus()\"\r\n ></td>\r\n -->\r\n <td [nzLeft]=\"true\"\r\n class=\"left-zindex\"\r\n *ngIf=\"queryOpts.checkBox?.isRadio\" nzShowCheckbox (nzCheckedChange)=\"selectRow(data,i)\"\r\n [(nzChecked)]=\"mapOfCheckedId[data.id]\"></td>\r\n <td [nzLeft]=\"true\"\r\n class=\"left-zindex\"\r\n *ngIf=\"queryOpts.isIndex\" nzAlign=\"center\" style=\"padding:12px 0;\" nzBreakWord>{{i + 1}}</td>\r\n\r\n <ng-container *ngFor=\"let item of queryOpts.tables;\">\r\n\r\n <td [nzLeft]=\"item.isLeft ? true : false\"\r\n [ngClass]=\"{'left-zindex':item.isLeft ? true : false}\"\r\n [nzRight]=\"item.isRight ? true : false\"\r\n nzBreakWord\r\n [rowSpan]=\"checkRowSpan(item,data)\"\r\n *ngIf=\"checkShowTd(item,i) \">\r\n <app-table-td [data]=\"data\"\r\n [item]=\"item\"\r\n [i]=\"i\"\r\n (doActionByRowAction)=\"doActionByRow2($event)\"\r\n ></app-table-td>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </tbody>\r\n\r\n\r\n <ng-template #totalTemplate let-total>\u5171 {{ total }} \u6761\u8BB0\u5F55</ng-template>\r\n </nz-table>\r\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\r\n <div class=\"tabel-colunmn\">\r\n <nz-checkbox-wrapper style=\"width: 100%;margin-top: 30px;\" (nzOnChange)=\"log($event)\">\r\n <div nz-row>\r\n <div nz-col nzSpan=\"24\" *ngFor=\"let item of queryOpts.tables\" >\r\n <label nz-checkbox nzValue=\"{{item.key}}\" [ngModel]=\"item.isShow\">{{item.name}}</label>\r\n </div>\r\n </div>\r\n </nz-checkbox-wrapper>\r\n <div class=\"tabel-colunmn-header\">\u8BF7\u9009\u62E9\u5217\u8868\u663E\u793A\u5185\u5BB9</div>\r\n </div>\r\n </nz-dropdown-menu>\r\n </div>\r\n\r\n", styles: [":host{width:100%;height:100%;display:flex;flex-direction:column}::ng-deep .ant-modal{top:50px;padding:0}.ant-advanced-search-form{padding:10px 6px 6px;background:#fbfbfb;border:1px solid #d9d9d9;border-radius:6px;margin-bottom:5px}.select-icon:hover{color:#1890ff}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:5px}::ng-deep .ant-table-column-title{font-size:.65rem}::ng-deep .ant-table-tbody>tr.ant-table-row:hover>td{background:#d0eeea}::ng-deep .ant-modal-header,::ng-deep .ant-modal-content{border-radius:4px}::ng-deep .ant-table-tbody>tr.selected:hover>td{background-color:#cfe1d0!important}::ng-deep .ant-table{height:100%}::ng-deep nz-pagination{position:absolute;bottom:0;right:0}.search-result-list{padding:1px;border:1px dashed #e9e9e9;border-radius:6px;background-color:#fff;flex:1;text-align:center;position:relative}[nz-form-label]{overflow:visible}button{margin:2px 4px}.collapse{margin-left:6px;font-size:12px}.action-area{text-align:left}.search-area{text-align:right}::ng-deep .main-table{position:absolute;top:0;left:0;right:0;bottom:0}::ng-deep .main-table .ant-spin-nested-loading{height:100%}::ng-deep .main-table .ant-spin-container{height:100%}::ng-deep .ant-table-tbody>tr.selected>td{background-color:#cfe1d0}::ng-deep .ant-table-tbody>tr>td>img{display:block;width:40%;margin:0 auto}::ng-deep .ant-table-body{-ms-overflow-style:none;overflow:-moz-scrollbars-none}::ng-deep .ant-table-body::-webkit-scrollbar,::ng-deep .ant-table-header::-webkit-scrollbar{width:6px!important;height:6px!important}::ng-deep .ant-table-body::-webkit-scrollbar-track,::ng-deep .ant-table-header::-webkit-scrollbar-track{width:6px!important;cursor:pointer}::ng-deep .ant-table-body::-webkit-scrollbar-thumb,::ng-deep .ant-table-header::-webkit-scrollbar-thumb{background:#1890ff;border-radius:3px;cursor:pointer}::ng-deep .ant-table-bordered .ant-table-thead>tr>th{border-right:1px solid #ddd}::ng-deep .ant-table-header{-ms-overflow-style:none;overflow:-moz-scrollbars-none;margin-bottom:-5px!important}::ng-deep .ant-table-placeholder{border-bottom:none!important;border-top:none!important}.tabel-colunmn{display:block;width:160px;height:300px;background:#fff;border:1px solid #ddd;padding:10px;border-radius:5px;overflow-x:hidden;overflow-y:auto;position:relative}.tabel-colunmn-header{position:fixed;top:0;left:0;right:0;height:30px;z-index:999;line-height:30px;border-bottom:1px solid #ddd;text-align:left;font-size:13px;padding-left:10px}.t-tr{background:#fff}.t-tr:nth-child(odd){background:#f8f9fa}::ng-deep .ant-table-thead>tr>th{background:#e7ebef!important;border-radius:0;word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-tbody>tr>td{word-break:break-all;white-space:pre-wrap}::ng-deep .ant-table-header{background:#e7ebef!important}td{font-size:.65rem}.resize-trigger{height:100%}.nz-resizable-preview{border-width:0;border-right-width:1px}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}::ng-deep .ant-table-tbody>tr>td{padding:5px}::ng-deep .ant-table{line-height:15px}::ng-deep .ant-table-middle .ant-table-footer,.ant-table-middle .ant-table-tbody>tr>td,.ant-table-middle .ant-table-thead>tr>th,.ant-table-middle .ant-table-title{padding:5px}::ng-deep .ant-table-tbody>tr>td>img{width:35px}::ng-deep .ant-modal-body{padding:10px}::ng-deep .ant-table.ant-table-bordered tbody>tr>td{font-size:13px}::ng-deep th{z-index:80!important}.left-zindex-header{z-index:90!important}.left-zindex{z-index:80!important}:host ::ng-deep input,:host ::ng-deep .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,:host ::ng-deep .ant-picker{border-radius:5px}.border-text{width:100%;height:36px;line-height:36px;display:flex}.border-text .border-text-line{display:inline-block;border-top:1px solid #cccccc;margin-top:18px}.border-text .border-text-line-left{width:10px;border-left:1px solid #cccccc}.border-text .border-text-line-right{flex:1;border-right:1px solid #cccccc}.border-text .border-text-span{margin-left:5px;margin-right:5px}.label-title{position:absolute;display:block;top:-7px;left:10px;background-color:#fff;color:#000;font-weight:600;font-size:12px;line-height:12px}:host ::ng-deep .tabel-colunmn-header{position:absolute!important;top:0!important}::ng-deep .ant-table-cell-fix-left,.ant-table-cell-fix-right{position:sticky!important}\n"] }]
|
|
2724
|
+
}], ctorParameters: function () {
|
|
2725
|
+
return [{ type: i1$2.FormBuilder }, { type: i0.Injector }, { type: undefined, decorators: [{
|
|
2726
|
+
type: Inject,
|
|
2727
|
+
args: [LOCALE_ID]
|
|
2728
|
+
}] }, { type: i0.ChangeDetectorRef }];
|
|
2729
|
+
}, propDecorators: { loading: [{
|
|
2730
|
+
type: Input
|
|
2731
|
+
}], allowDrag: [{
|
|
2732
|
+
type: Input
|
|
2733
|
+
}], queryOpts: [{
|
|
2734
|
+
type: Input
|
|
2735
|
+
}], showPagination: [{
|
|
2736
|
+
type: Input
|
|
2737
|
+
}], title: [{
|
|
2738
|
+
type: Input
|
|
2739
|
+
}], tableAction: [{
|
|
2740
|
+
type: Output
|
|
2741
|
+
}], queryBack: [{
|
|
2742
|
+
type: Output
|
|
2743
|
+
}], headerAction: [{
|
|
2744
|
+
type: Output
|
|
2745
|
+
}], tableContent: [{
|
|
2746
|
+
type: ViewChild,
|
|
2747
|
+
args: ['tableContent', { static: true }]
|
|
2748
|
+
}] } });
|
|
2749
|
+
|
|
2750
|
+
class VideoComponent {
|
|
2751
|
+
constructor() { }
|
|
2752
|
+
}
|
|
2753
|
+
VideoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: VideoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2754
|
+
VideoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: VideoComponent, selector: "app-video", inputs: { url: "url" }, ngImport: i0, template: "<vg-player>\r\n <vg-controls vgFor=\"__VG__VIDEO__\" >\r\n <vg-play-pause></vg-play-pause>\r\n <vg-scrub-bar>\r\n <vg-scrub-bar-current-time></vg-scrub-bar-current-time>\r\n <vg-scrub-bar-buffering-time></vg-scrub-bar-buffering-time>\r\n </vg-scrub-bar>\r\n <vg-time-display vgProperty=\"left\" vgFormat=\"mm:ss\"></vg-time-display>\r\n\r\n <!-- <vg-volume></vg-volume> -->\r\n <vg-mute></vg-mute>\r\n\r\n <vg-fullscreen></vg-fullscreen>\r\n </vg-controls>\r\n\r\n <video\r\n id=\"__VG__VIDEO__\"\r\n #media\r\n [vgMedia]=\"$any(media)\"\r\n preload=\"auto\"\r\n >\r\n <source [src]=\"url\" type=\"video/mp4\">\r\n </video>\r\n</vg-player>\r\n", styles: [":host{width:100%}\n"], components: [{ type: i1$4.VgPlayer, selector: "vg-player", outputs: ["onPlayerReady", "onMediaReady"] }, { type: i1$4.VgControls, selector: "vg-controls", inputs: ["vgFor", "vgAutohide", "vgAutohideTime"] }, { type: i1$4.VgPlayPause, selector: "vg-play-pause", inputs: ["vgFor"] }, { type: i1$4.VgScrubBar, selector: "vg-scrub-bar", inputs: ["vgFor", "vgSlider"] }, { type: i1$4.VgScrubBarCurrentTime, selector: "vg-scrub-bar-current-time", inputs: ["vgFor", "vgSlider"] }, { type: i1$4.VgScrubBarBufferingTime, selector: "vg-scrub-bar-buffering-time", inputs: ["vgFor"] }, { type: i1$4.VgTimeDisplay, selector: "vg-time-display", inputs: ["vgFor", "vgProperty", "vgFormat"] }, { type: i1$4.VgMute, selector: "vg-mute", inputs: ["vgFor"] }, { type: i1$4.VgFullscreen, selector: "vg-fullscreen" }], directives: [{ type: i1$4.VgMedia, selector: "[vgMedia]", inputs: ["vgMedia", "vgMaster"] }] });
|
|
2755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: VideoComponent, decorators: [{
|
|
2756
|
+
type: Component,
|
|
2757
|
+
args: [{ selector: 'app-video', template: "<vg-player>\r\n <vg-controls vgFor=\"__VG__VIDEO__\" >\r\n <vg-play-pause></vg-play-pause>\r\n <vg-scrub-bar>\r\n <vg-scrub-bar-current-time></vg-scrub-bar-current-time>\r\n <vg-scrub-bar-buffering-time></vg-scrub-bar-buffering-time>\r\n </vg-scrub-bar>\r\n <vg-time-display vgProperty=\"left\" vgFormat=\"mm:ss\"></vg-time-display>\r\n\r\n <!-- <vg-volume></vg-volume> -->\r\n <vg-mute></vg-mute>\r\n\r\n <vg-fullscreen></vg-fullscreen>\r\n </vg-controls>\r\n\r\n <video\r\n id=\"__VG__VIDEO__\"\r\n #media\r\n [vgMedia]=\"$any(media)\"\r\n preload=\"auto\"\r\n >\r\n <source [src]=\"url\" type=\"video/mp4\">\r\n </video>\r\n</vg-player>\r\n", styles: [":host{width:100%}\n"] }]
|
|
2758
|
+
}], ctorParameters: function () { return []; }, propDecorators: { url: [{
|
|
2759
|
+
type: Input
|
|
2760
|
+
}] } });
|
|
2761
|
+
|
|
2762
|
+
class UploadComponent {
|
|
2763
|
+
constructor(injector, httpClient, modalService) {
|
|
2764
|
+
this.injector = injector;
|
|
2765
|
+
this.httpClient = httpClient;
|
|
2766
|
+
this.modalService = modalService;
|
|
2767
|
+
this.isEdit = true;
|
|
2768
|
+
this.allowChangSeq = false;
|
|
2769
|
+
this.uploadUrl = "";
|
|
2770
|
+
this.uploadData = {};
|
|
2771
|
+
this.showUploadList = {
|
|
2772
|
+
showPreviewIcon: true,
|
|
2773
|
+
showRemoveIcon: true,
|
|
2774
|
+
hidePreviewIconInNonImage: true
|
|
2775
|
+
};
|
|
2776
|
+
this.afterChange = new EventEmitter();
|
|
2777
|
+
this.optsChange = new EventEmitter();
|
|
2778
|
+
this.previewImage = '';
|
|
2779
|
+
this.previewVisible = false;
|
|
2780
|
+
this.changeVisible = false;
|
|
2781
|
+
this.handlePreview = (file) => {
|
|
2782
|
+
this.previewImage = file.url || file.thumbUrl;
|
|
2783
|
+
this.previewVisible = true;
|
|
2784
|
+
};
|
|
2785
|
+
this.remove = (file) => {
|
|
2786
|
+
if (!this.isEdit) {
|
|
2787
|
+
return false;
|
|
2788
|
+
}
|
|
2789
|
+
console.log(file);
|
|
2790
|
+
if (this.opts && this.opts.removeAction) {
|
|
2791
|
+
return false;
|
|
2792
|
+
}
|
|
2793
|
+
return true;
|
|
2794
|
+
};
|
|
2795
|
+
this.beforeUpload = (file, fileList) => {
|
|
2796
|
+
return new Observable(observe => {
|
|
2797
|
+
let fileName = ToolsUtil.getRandomFileName() + "." + ToolsUtil.getFileExt(file.name);
|
|
2798
|
+
this.httpService.post(atr_static_datas.OSS_POLICY, {
|
|
2799
|
+
dir: this.opts.uploadDir,
|
|
2800
|
+
fileName: fileName,
|
|
2801
|
+
'success_action_status': '200'
|
|
2802
|
+
}, ToolsUtil.getHttpOptions()).subscribe(result => {
|
|
2803
|
+
if (result.status == 200) {
|
|
2804
|
+
this.uploadData[file.uid] = result.data;
|
|
2805
|
+
observe.next(true);
|
|
2806
|
+
}
|
|
2807
|
+
else
|
|
2808
|
+
observe.next(false);
|
|
2809
|
+
observe.unsubscribe();
|
|
2810
|
+
}, error => {
|
|
2811
|
+
observe.next(false);
|
|
2812
|
+
observe.unsubscribe();
|
|
2813
|
+
});
|
|
2814
|
+
});
|
|
2815
|
+
};
|
|
2816
|
+
this.customReq = (item) => {
|
|
2817
|
+
const formData = new FormData();
|
|
2818
|
+
let uploadData = this.uploadData[item.file.uid];
|
|
2819
|
+
for (let key in uploadData) {
|
|
2820
|
+
if (key != 'host')
|
|
2821
|
+
formData.append(key, uploadData[key]);
|
|
2822
|
+
}
|
|
2823
|
+
formData.append('file', item.file);
|
|
2824
|
+
const req = new HttpRequest('POST', uploadData.host, formData, {
|
|
2825
|
+
reportProgress: true
|
|
2826
|
+
});
|
|
2827
|
+
return this.httpClient.request(req).subscribe((event) => {
|
|
2828
|
+
if (event.type === HttpEventType.UploadProgress) {
|
|
2829
|
+
if (event.total > 0) {
|
|
2830
|
+
event.percent = (event.loaded / event.total) * 100;
|
|
2831
|
+
}
|
|
2832
|
+
item.onProgress(event, item.file);
|
|
2833
|
+
}
|
|
2834
|
+
else if (event instanceof HttpResponse) {
|
|
2835
|
+
item.file["key"] = uploadData.key;
|
|
2836
|
+
item.onSuccess(event.body, item.file, event);
|
|
2837
|
+
}
|
|
2838
|
+
}, err => {
|
|
2839
|
+
item.onError(err, item.file);
|
|
2840
|
+
});
|
|
2841
|
+
};
|
|
2842
|
+
}
|
|
2843
|
+
ngOnInit() {
|
|
2844
|
+
}
|
|
2845
|
+
getFileTyeIcon(fileType, fileName) {
|
|
2846
|
+
let thumbUrl = this.getFileThumbUrl(fileType);
|
|
2847
|
+
if (thumbUrl === '') {
|
|
2848
|
+
thumbUrl = this.getThumbUrl(fileName);
|
|
2849
|
+
}
|
|
2850
|
+
return thumbUrl;
|
|
2851
|
+
}
|
|
2852
|
+
getThumbUrl(path) {
|
|
2853
|
+
if (!path) {
|
|
2854
|
+
return '';
|
|
2855
|
+
}
|
|
2856
|
+
// 后缀获取
|
|
2857
|
+
if (path.endsWith('.mp4')) {
|
|
2858
|
+
return '../../../assets/video.jpg';
|
|
2859
|
+
}
|
|
2860
|
+
else {
|
|
2861
|
+
return '';
|
|
2862
|
+
}
|
|
2863
|
+
}
|
|
2864
|
+
getFileThumbUrl(type) {
|
|
2865
|
+
let thumbUrl = '';
|
|
2866
|
+
if (type === 'video/mp4' || type === 'mp4') {
|
|
2867
|
+
thumbUrl = '../../../assets/video.jpg';
|
|
2868
|
+
}
|
|
2869
|
+
return thumbUrl;
|
|
2870
|
+
}
|
|
2871
|
+
onChange(params) {
|
|
2872
|
+
console.log(params);
|
|
2873
|
+
if (params.type == "success" || params.type == "removed") {
|
|
2874
|
+
this.opts.imageList = [];
|
|
2875
|
+
setTimeout(() => {
|
|
2876
|
+
this.opts.imageList = params.fileList.map((file) => {
|
|
2877
|
+
if (file.type == 'video/mp4' && file.uid === params.file.uid) {
|
|
2878
|
+
let thumbUrl = this.getFileTyeIcon(file.type, file.name);
|
|
2879
|
+
file.thumbUrl = thumbUrl ? thumbUrl : file.thumbUrl;
|
|
2880
|
+
file.url = file.originFileObj ? atr_static_datas.OSS_URL + file.originFileObj['key'] : file['path'];
|
|
2881
|
+
}
|
|
2882
|
+
return file;
|
|
2883
|
+
});
|
|
2884
|
+
}, 50);
|
|
2885
|
+
let fileUrls = [];
|
|
2886
|
+
for (let file of params.fileList) {
|
|
2887
|
+
if (file["key"] != undefined) {
|
|
2888
|
+
fileUrls.push(file["key"]);
|
|
2889
|
+
continue;
|
|
2890
|
+
}
|
|
2891
|
+
if (file.originFileObj) {
|
|
2892
|
+
let originFileObj = file.originFileObj;
|
|
2893
|
+
if (originFileObj["key"] != undefined) {
|
|
2894
|
+
fileUrls.push(originFileObj["key"]);
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
this.afterChange.emit({ key: this.opts.key, values: fileUrls.join(",") });
|
|
2899
|
+
this.optsChange.emit(this.opts);
|
|
2900
|
+
}
|
|
2901
|
+
}
|
|
2902
|
+
get httpService() {
|
|
2903
|
+
return this.injector.get(HttpService);
|
|
2904
|
+
}
|
|
2905
|
+
openBannerSeq(tplContent, tplFooter) {
|
|
2906
|
+
this.tplModal = this.modalService.create({
|
|
2907
|
+
nzTitle: "修改图片顺序",
|
|
2908
|
+
nzContent: tplContent,
|
|
2909
|
+
nzFooter: tplFooter,
|
|
2910
|
+
nzMaskClosable: false,
|
|
2911
|
+
nzClosable: false,
|
|
2912
|
+
nzOnOk: () => console.log('Click ok')
|
|
2913
|
+
});
|
|
2914
|
+
console.log(this.opts.imageList);
|
|
2915
|
+
this.changeVisible = true;
|
|
2916
|
+
}
|
|
2917
|
+
destroyTplModal() {
|
|
2918
|
+
this.tplModal.destroy();
|
|
2919
|
+
}
|
|
2920
|
+
arrowUp(index) {
|
|
2921
|
+
let img = this.opts.imageList[index];
|
|
2922
|
+
this.opts.imageList[index] = this.opts.imageList[index - 1];
|
|
2923
|
+
this.opts.imageList[index - 1] = img;
|
|
2924
|
+
}
|
|
2925
|
+
arrowDown(index) {
|
|
2926
|
+
let img = this.opts.imageList[index];
|
|
2927
|
+
this.opts.imageList[index] = this.opts.imageList[index + 1];
|
|
2928
|
+
this.opts.imageList[index + 1] = img;
|
|
2929
|
+
}
|
|
2930
|
+
saveSeq() {
|
|
2931
|
+
this.destroyTplModal();
|
|
2932
|
+
let imgs = this.opts.imageList;
|
|
2933
|
+
this.opts.imageList = [];
|
|
2934
|
+
setTimeout(() => {
|
|
2935
|
+
this.opts.imageList = imgs;
|
|
2936
|
+
console.log(this.opts.imageList);
|
|
2937
|
+
let fileUrls = [];
|
|
2938
|
+
for (let file of this.opts.imageList) {
|
|
2939
|
+
if (file["key"] != undefined) {
|
|
2940
|
+
fileUrls.push(file["key"]);
|
|
2941
|
+
continue;
|
|
2942
|
+
}
|
|
2943
|
+
if (file.originFileObj && file.originFileObj["key"] != undefined)
|
|
2944
|
+
fileUrls.push(file.originFileObj["key"]);
|
|
2945
|
+
}
|
|
2946
|
+
this.afterChange.emit({ key: this.opts.key, values: fileUrls.join(",") });
|
|
2947
|
+
}, 50);
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2950
|
+
UploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadComponent, deps: [{ token: i0.Injector }, { token: i1.HttpClient }, { token: i2$3.NzModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2951
|
+
UploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: UploadComponent, selector: "atr-img-upload", inputs: { opts: "opts", isEdit: "isEdit", allowChangSeq: "allowChangSeq" }, outputs: { afterChange: "afterChange", optsChange: "optsChange" }, ngImport: i0, template: "<div class=\"clearfix\">\r\n <nz-upload\r\n *ngIf=\"opts.uploadType == 'drag'\"\r\n nzType=\"drag\"\r\n nzAction=\"\"\r\n [nzBeforeUpload]=\"beforeUpload\"\r\n [nzRemove]=\"remove\"\r\n [nzCustomRequest]=\"customReq\"\r\n (nzChange)=\"onChange($event)\"\r\n [nzType]=\"opts.uploadType\"\r\n [nzAccept]=\"opts.nzFileType\"\r\n [nzLimit]=\"'1'\"\r\n >\r\n <p class=\"ant-upload-drag-icon\">\r\n <i nz-icon nzType=\"inbox\"></i>\r\n </p>\r\n <p class=\"ant-upload-text\">\u5355\u51FB\u6216\u62D6\u52A8\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20</p>\r\n </nz-upload>\r\n <nz-upload\r\n *ngIf=\"opts.uploadType != 'drag'\"\r\n nzAction=\"\"\r\n nzListType=\"picture-card\"\r\n [(nzFileList)]=\"opts.imageList\"\r\n [nzShowButton]=\"opts.imageList.length < opts.limit\"\r\n [nzShowUploadList]=\"showUploadList\"\r\n [nzPreview]=\"handlePreview\"\r\n [nzRemove]=\"remove\"\r\n [nzBeforeUpload]=\"beforeUpload\"\r\n [nzCustomRequest]=\"customReq\"\r\n (nzChange)=\"onChange($event)\"\r\n [nzType]=\"opts.uploadType\"\r\n [nzAccept]=\"opts.nzFileType\"\r\n [nzDisabled]=\"!isEdit\"\r\n [nzLimit]=\"'1'\"\r\n >\r\n <i nz-icon nzType=\"plus\"></i>\r\n <div class=\"ant-upload-text\">\u4E0A\u4F20\u56FE\u7247</div>\r\n </nz-upload>\r\n <a *ngIf=\"allowChangSeq && isEdit && opts.imageList.length > 1\" (click)=\"openBannerSeq(imgsContent, tplFooter)\"\r\n style=\"margin-left: 10px; \"\r\n ><i nz-icon nzType=\"plus\" nzTheme=\"outline\" style=\"color: #1890ff; font-size: 15px\"></i>\u8C03\u6574\u56FE\u7247\u987A\u5E8F</a>\r\n <nz-modal\r\n [nzVisible]=\"previewVisible\"\r\n [nzContent]=\"modalContent\"\r\n [nzFooter]=\"null\"\r\n (nzOnCancel)=\"previewVisible = false\"\r\n >\r\n <ng-template #modalContent>\r\n <img *ngIf=\"!previewImage.endsWith('.mp4')\" [src]=\"previewImage\" [ngStyle]=\"{ width: '100%' }\"/>\r\n <div style=\"width: 100%;margin-top: 15px\">\r\n <app-video *ngIf=\"previewImage.endsWith('.mp4')\" [url]=\"previewImage\"></app-video>\r\n </div>\r\n </ng-template>\r\n </nz-modal>\r\n <ng-template #imgsContent>\r\n\r\n <ng-container *ngFor=\"let imgs of opts.imageList;let i = index\">\r\n <div class=\"img-div\">\r\n <img [src]=\"imgs.url || imgs.thumbUrl\" [ngStyle]=\"{ width: '100px',display: 'inline-block', margin:'10px' }\"/>\r\n <div style=\"margin-right: 20px\">\r\n <a title=\"\u4E0A\u79FB\" *ngIf=\" i > 0\" style=\"display: block;\" (click)=\"arrowUp(i)\"><i nz-icon nzType=\"arrow-up\"\r\n nzTheme=\"outline\"\r\n style=\"color: #1890ff; font-size: 15px;\"></i>\r\n \u4E0A\u79FB</a>\r\n <a title=\"\u4E0B\u79FB\" *ngIf=\" i < opts.imageList.length - 1\" (click)=\"arrowDown(i)\"><i nz-icon nzType=\"arrow-down\"\r\n nzTheme=\"outline\"\r\n style=\"color: #1890ff; font-size: 15px\"></i>\r\n \u4E0B\u79FB</a>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <!-- </nz-modal>-->\r\n</div>\r\n\r\n<ng-template #tplFooter>\r\n <button nz-button nzType=\"default\" (click)=\"destroyTplModal()\">\r\n \u53D6\u6D88\r\n </button>\r\n <button nz-button nzType=\"primary\" (click)=\"saveSeq()\">\r\n \u4FDD\u5B58\u987A\u5E8F\r\n </button>\r\n</ng-template>\r\n\r\n\r\n", styles: ["i[nz-icon]{font-size:32px;color:#999}.ant-upload-text{margin-top:8px;color:#666}.img-div{padding:8px;border:1px solid #d9d9d9;border-radius:4px;margin-top:20px;display:flex;align-items:center;justify-content:space-between}\n"], components: [{ type: i1$3.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { type: i2$3.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzContent", "nzComponentParams", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }, { type: VideoComponent, selector: "app-video", inputs: ["url"] }, { type: i2$2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4$2.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }] });
|
|
2952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UploadComponent, decorators: [{
|
|
2953
|
+
type: Component,
|
|
2954
|
+
args: [{ selector: 'atr-img-upload', template: "<div class=\"clearfix\">\r\n <nz-upload\r\n *ngIf=\"opts.uploadType == 'drag'\"\r\n nzType=\"drag\"\r\n nzAction=\"\"\r\n [nzBeforeUpload]=\"beforeUpload\"\r\n [nzRemove]=\"remove\"\r\n [nzCustomRequest]=\"customReq\"\r\n (nzChange)=\"onChange($event)\"\r\n [nzType]=\"opts.uploadType\"\r\n [nzAccept]=\"opts.nzFileType\"\r\n [nzLimit]=\"'1'\"\r\n >\r\n <p class=\"ant-upload-drag-icon\">\r\n <i nz-icon nzType=\"inbox\"></i>\r\n </p>\r\n <p class=\"ant-upload-text\">\u5355\u51FB\u6216\u62D6\u52A8\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u4E0A\u4F20</p>\r\n </nz-upload>\r\n <nz-upload\r\n *ngIf=\"opts.uploadType != 'drag'\"\r\n nzAction=\"\"\r\n nzListType=\"picture-card\"\r\n [(nzFileList)]=\"opts.imageList\"\r\n [nzShowButton]=\"opts.imageList.length < opts.limit\"\r\n [nzShowUploadList]=\"showUploadList\"\r\n [nzPreview]=\"handlePreview\"\r\n [nzRemove]=\"remove\"\r\n [nzBeforeUpload]=\"beforeUpload\"\r\n [nzCustomRequest]=\"customReq\"\r\n (nzChange)=\"onChange($event)\"\r\n [nzType]=\"opts.uploadType\"\r\n [nzAccept]=\"opts.nzFileType\"\r\n [nzDisabled]=\"!isEdit\"\r\n [nzLimit]=\"'1'\"\r\n >\r\n <i nz-icon nzType=\"plus\"></i>\r\n <div class=\"ant-upload-text\">\u4E0A\u4F20\u56FE\u7247</div>\r\n </nz-upload>\r\n <a *ngIf=\"allowChangSeq && isEdit && opts.imageList.length > 1\" (click)=\"openBannerSeq(imgsContent, tplFooter)\"\r\n style=\"margin-left: 10px; \"\r\n ><i nz-icon nzType=\"plus\" nzTheme=\"outline\" style=\"color: #1890ff; font-size: 15px\"></i>\u8C03\u6574\u56FE\u7247\u987A\u5E8F</a>\r\n <nz-modal\r\n [nzVisible]=\"previewVisible\"\r\n [nzContent]=\"modalContent\"\r\n [nzFooter]=\"null\"\r\n (nzOnCancel)=\"previewVisible = false\"\r\n >\r\n <ng-template #modalContent>\r\n <img *ngIf=\"!previewImage.endsWith('.mp4')\" [src]=\"previewImage\" [ngStyle]=\"{ width: '100%' }\"/>\r\n <div style=\"width: 100%;margin-top: 15px\">\r\n <app-video *ngIf=\"previewImage.endsWith('.mp4')\" [url]=\"previewImage\"></app-video>\r\n </div>\r\n </ng-template>\r\n </nz-modal>\r\n <ng-template #imgsContent>\r\n\r\n <ng-container *ngFor=\"let imgs of opts.imageList;let i = index\">\r\n <div class=\"img-div\">\r\n <img [src]=\"imgs.url || imgs.thumbUrl\" [ngStyle]=\"{ width: '100px',display: 'inline-block', margin:'10px' }\"/>\r\n <div style=\"margin-right: 20px\">\r\n <a title=\"\u4E0A\u79FB\" *ngIf=\" i > 0\" style=\"display: block;\" (click)=\"arrowUp(i)\"><i nz-icon nzType=\"arrow-up\"\r\n nzTheme=\"outline\"\r\n style=\"color: #1890ff; font-size: 15px;\"></i>\r\n \u4E0A\u79FB</a>\r\n <a title=\"\u4E0B\u79FB\" *ngIf=\" i < opts.imageList.length - 1\" (click)=\"arrowDown(i)\"><i nz-icon nzType=\"arrow-down\"\r\n nzTheme=\"outline\"\r\n style=\"color: #1890ff; font-size: 15px\"></i>\r\n \u4E0B\u79FB</a>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <!-- </nz-modal>-->\r\n</div>\r\n\r\n<ng-template #tplFooter>\r\n <button nz-button nzType=\"default\" (click)=\"destroyTplModal()\">\r\n \u53D6\u6D88\r\n </button>\r\n <button nz-button nzType=\"primary\" (click)=\"saveSeq()\">\r\n \u4FDD\u5B58\u987A\u5E8F\r\n </button>\r\n</ng-template>\r\n\r\n\r\n", styles: ["i[nz-icon]{font-size:32px;color:#999}.ant-upload-text{margin-top:8px;color:#666}.img-div{padding:8px;border:1px solid #d9d9d9;border-radius:4px;margin-top:20px;display:flex;align-items:center;justify-content:space-between}\n"] }]
|
|
2955
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.HttpClient }, { type: i2$3.NzModalService }]; }, propDecorators: { opts: [{
|
|
2956
|
+
type: Input
|
|
2957
|
+
}], isEdit: [{
|
|
2958
|
+
type: Input
|
|
2959
|
+
}], allowChangSeq: [{
|
|
2960
|
+
type: Input
|
|
2961
|
+
}], afterChange: [{
|
|
2962
|
+
type: Output
|
|
2963
|
+
}], optsChange: [{
|
|
2964
|
+
type: Output
|
|
2965
|
+
}] } });
|
|
2966
|
+
|
|
2967
|
+
//响应式表单自定义模板验证器
|
|
2968
|
+
function telphoneValidator() {
|
|
2969
|
+
return (contrl) => {
|
|
2970
|
+
let nameExp = new RegExp('^1[3456789]\\d{9}$');
|
|
2971
|
+
const forbidden = nameExp.test(contrl.value);
|
|
2972
|
+
return !forbidden ? { 'telphone': { value: contrl.value } } : null;
|
|
2973
|
+
};
|
|
2974
|
+
}
|
|
2975
|
+
|
|
2976
|
+
class ShareService {
|
|
2977
|
+
constructor(drawerService, httpService) {
|
|
2978
|
+
this.drawerService = drawerService;
|
|
2979
|
+
this.httpService = httpService;
|
|
2980
|
+
}
|
|
2981
|
+
getDicList(item) {
|
|
2982
|
+
return new Observable(observe => {
|
|
2983
|
+
if (!item.selectUrl || !item.selectUrl.url) {
|
|
2984
|
+
return;
|
|
2985
|
+
}
|
|
2986
|
+
let selectUrl = item.selectUrl;
|
|
2987
|
+
let url = selectUrl.host == 'oss' ? atr_static_datas.OSS_URL + selectUrl.url : selectUrl.url;
|
|
2988
|
+
let options = selectUrl.host == 'oss' ? {} : ToolsUtil.getHttpOptions();
|
|
2989
|
+
if (selectUrl.type == 'get') {
|
|
2990
|
+
this.httpService.get(url, {}, options).subscribe(res => {
|
|
2991
|
+
observe.next({ status: 200, item: this.getDicListBase(res, item) });
|
|
2992
|
+
observe.unsubscribe();
|
|
2993
|
+
}, error => {
|
|
2994
|
+
observe.next(error);
|
|
2995
|
+
observe.unsubscribe();
|
|
2996
|
+
});
|
|
2997
|
+
}
|
|
2998
|
+
else {
|
|
2999
|
+
this.httpService.post(url, {}, options).subscribe(res => {
|
|
3000
|
+
observe.next({ status: 200, item: this.getDicListBase(res, item) });
|
|
3001
|
+
observe.unsubscribe();
|
|
3002
|
+
}, error => {
|
|
3003
|
+
observe.next(error);
|
|
3004
|
+
observe.unsubscribe();
|
|
3005
|
+
});
|
|
3006
|
+
}
|
|
3007
|
+
});
|
|
3008
|
+
}
|
|
3009
|
+
getDicListBase(res, item) {
|
|
3010
|
+
let keys = item.selectUrl.convert ? item.selectUrl.convert.split(',') : null;
|
|
3011
|
+
if (item.type == 'treeSelect') {
|
|
3012
|
+
item.treeList = res.data.filter((child) => {
|
|
3013
|
+
if (keys) {
|
|
3014
|
+
keys.forEach((v) => {
|
|
3015
|
+
let vs = v.split("|");
|
|
3016
|
+
child[vs[0]] = child[vs[1]];
|
|
3017
|
+
});
|
|
3018
|
+
}
|
|
3019
|
+
// child.key = child.id;
|
|
3020
|
+
// child.title = child.realName;
|
|
3021
|
+
return true;
|
|
3022
|
+
});
|
|
3023
|
+
}
|
|
3024
|
+
else if (item.type == 'selectCus' || item.type == 'selectc') {
|
|
3025
|
+
item.dictList = res.data.filter((child) => {
|
|
3026
|
+
if (keys) {
|
|
3027
|
+
keys.forEach((v) => {
|
|
3028
|
+
let vs = v.split("|");
|
|
3029
|
+
child[vs[0]] = child[vs[1]];
|
|
3030
|
+
});
|
|
3031
|
+
}
|
|
3032
|
+
// child.value = child.id;
|
|
3033
|
+
// child.label = child.name;
|
|
3034
|
+
return true;
|
|
3035
|
+
});
|
|
3036
|
+
}
|
|
3037
|
+
else if (item.type == 'cascader') {
|
|
3038
|
+
item.dictList = res.data;
|
|
3039
|
+
this.convertCascader(res.data, keys);
|
|
3040
|
+
}
|
|
3041
|
+
return item;
|
|
3042
|
+
}
|
|
3043
|
+
convertCascader(arrs, keys) {
|
|
3044
|
+
if (!arrs) {
|
|
3045
|
+
return;
|
|
3046
|
+
}
|
|
3047
|
+
arrs.forEach((child) => {
|
|
3048
|
+
if (keys) {
|
|
3049
|
+
keys.forEach((v) => {
|
|
3050
|
+
let vs = v.split("|");
|
|
3051
|
+
child[vs[0]] = child[vs[1]];
|
|
3052
|
+
});
|
|
3053
|
+
}
|
|
3054
|
+
child.nzValueProperty = {
|
|
3055
|
+
label: child.label,
|
|
3056
|
+
value: child.value,
|
|
3057
|
+
};
|
|
3058
|
+
if (child.children) {
|
|
3059
|
+
this.convertCascader(child.children, keys);
|
|
3060
|
+
}
|
|
3061
|
+
else {
|
|
3062
|
+
child.isLeaf = true;
|
|
3063
|
+
}
|
|
3064
|
+
});
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
ShareService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ShareService, deps: [{ token: i1$5.NzDrawerService }, { token: HttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3068
|
+
ShareService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ShareService, providedIn: 'root' });
|
|
3069
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ShareService, decorators: [{
|
|
3070
|
+
type: Injectable,
|
|
3071
|
+
args: [{
|
|
3072
|
+
providedIn: 'root'
|
|
3073
|
+
}]
|
|
3074
|
+
}], ctorParameters: function () { return [{ type: i1$5.NzDrawerService }, { type: HttpService }]; } });
|
|
3075
|
+
|
|
3076
|
+
class AtrFormComponent {
|
|
3077
|
+
// tslint:disable-next-line:max-line-length
|
|
3078
|
+
constructor(shareService, fb, dictService, injector, locale) {
|
|
3079
|
+
this.shareService = shareService;
|
|
3080
|
+
this.fb = fb;
|
|
3081
|
+
this.dictService = dictService;
|
|
3082
|
+
this.injector = injector;
|
|
3083
|
+
this.locale = locale;
|
|
3084
|
+
this.dicts = {};
|
|
3085
|
+
this.formAction = new EventEmitter();
|
|
3086
|
+
this.atrForm = this.fb.group({});
|
|
3087
|
+
}
|
|
3088
|
+
resetLayout(item) {
|
|
3089
|
+
if (!item.lspan) {
|
|
3090
|
+
item.lspan = 24;
|
|
3091
|
+
}
|
|
3092
|
+
if (!item.cspan) {
|
|
3093
|
+
item.cspan = 24;
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
doAction(item, event) {
|
|
3097
|
+
event.preventDefault();
|
|
3098
|
+
if (event.stopPropagation) {
|
|
3099
|
+
event.stopPropagation();
|
|
3100
|
+
}
|
|
3101
|
+
let action = {
|
|
3102
|
+
name: item.name,
|
|
3103
|
+
code: item.code,
|
|
3104
|
+
};
|
|
3105
|
+
this.formAction.emit(action);
|
|
3106
|
+
}
|
|
3107
|
+
setValue(key, value) {
|
|
3108
|
+
var _a;
|
|
3109
|
+
(_a = this.atrForm.get(key)) === null || _a === void 0 ? void 0 : _a.setValue(value);
|
|
3110
|
+
}
|
|
3111
|
+
getDicList(item) {
|
|
3112
|
+
this.shareService.getDicList(item).subscribe(res => {
|
|
3113
|
+
if (res.status == 200 && res.item) {
|
|
3114
|
+
item = res.item;
|
|
3115
|
+
this.resetForm();
|
|
3116
|
+
}
|
|
3117
|
+
});
|
|
3118
|
+
}
|
|
3119
|
+
ngOnInit() {
|
|
3120
|
+
if (this.formOpts && this.formOpts.items) {
|
|
3121
|
+
for (let item of this.formOpts.items) {
|
|
3122
|
+
// this.atrForm.addControl(item.key, new FormControl());
|
|
3123
|
+
this.resetLayout(item);
|
|
3124
|
+
let value = this.formOpts.type == 'add' ? item.defaultValue : item.value;
|
|
3125
|
+
console.log(value);
|
|
3126
|
+
if (item.type == "select") {
|
|
3127
|
+
this.getDictValue(item.dictCode);
|
|
3128
|
+
}
|
|
3129
|
+
if (item.type == 'selectc') {
|
|
3130
|
+
if (!item.dictList) {
|
|
3131
|
+
this.getDicList(item);
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
if (item.type == "textarea" && !item.rows)
|
|
3135
|
+
item.rows = 5;
|
|
3136
|
+
if (item.type == "image") {
|
|
3137
|
+
item.imageOpts.key = item.key;
|
|
3138
|
+
if (value) {
|
|
3139
|
+
let images = [];
|
|
3140
|
+
let list = value.split(",");
|
|
3141
|
+
for (let key of list) {
|
|
3142
|
+
images.push({
|
|
3143
|
+
key: key,
|
|
3144
|
+
uid: "-1",
|
|
3145
|
+
url: atr_static_datas.OSS_URL + key
|
|
3146
|
+
});
|
|
3147
|
+
}
|
|
3148
|
+
item.imageOpts.imageList = images;
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
if (item.type == 'editor') {
|
|
3152
|
+
if (!value)
|
|
3153
|
+
value = "";
|
|
3154
|
+
if (!item.height)
|
|
3155
|
+
item.height = 300;
|
|
3156
|
+
}
|
|
3157
|
+
if (!item.span)
|
|
3158
|
+
item.span = 8;
|
|
3159
|
+
if (typeof item.isRequired != 'string') {
|
|
3160
|
+
item.isRequired = false;
|
|
3161
|
+
}
|
|
3162
|
+
let tempValidators = [];
|
|
3163
|
+
if (item.validators) {
|
|
3164
|
+
for (let validator of item.validators) {
|
|
3165
|
+
if (validator.type == "required") {
|
|
3166
|
+
item.isRequired = true;
|
|
3167
|
+
tempValidators.push(Validators.required);
|
|
3168
|
+
}
|
|
3169
|
+
else if (validator.type == "email") {
|
|
3170
|
+
tempValidators.push(Validators.email);
|
|
3171
|
+
}
|
|
3172
|
+
else if (validator.type == "maxlength") {
|
|
3173
|
+
tempValidators.push(Validators.maxLength(validator.maxlength ? validator.maxlength : 1));
|
|
3174
|
+
}
|
|
3175
|
+
else if (validator.type == "minlength") {
|
|
3176
|
+
tempValidators.push(Validators.minLength(validator.minlength ? validator.minlength : 1));
|
|
3177
|
+
}
|
|
3178
|
+
else if (validator.type == "telphone") {
|
|
3179
|
+
tempValidators.push(telphoneValidator());
|
|
3180
|
+
}
|
|
3181
|
+
else if (validator.type == "pattern") {
|
|
3182
|
+
tempValidators.push(Validators.pattern(validator.patternValue));
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
let defaultValue = { value: value != undefined ? value : null, disabled: item.disable ? item.disable : false };
|
|
3187
|
+
if (tempValidators.length > 0) {
|
|
3188
|
+
this.atrForm.addControl(item.key, new FormControl(defaultValue, tempValidators));
|
|
3189
|
+
}
|
|
3190
|
+
else {
|
|
3191
|
+
this.atrForm.addControl(item.key, new FormControl(defaultValue));
|
|
3192
|
+
}
|
|
3193
|
+
console.log(" this.atrForm", this.atrForm);
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
compare(value, operator, target) {
|
|
3198
|
+
let isRight = false;
|
|
3199
|
+
switch (operator) {
|
|
3200
|
+
case 'eq':
|
|
3201
|
+
if (value == target) {
|
|
3202
|
+
isRight = true;
|
|
3203
|
+
}
|
|
3204
|
+
break;
|
|
3205
|
+
case 'gh':
|
|
3206
|
+
if (value >= target) {
|
|
3207
|
+
isRight = true;
|
|
3208
|
+
}
|
|
3209
|
+
break;
|
|
3210
|
+
case 'notEmpty':
|
|
3211
|
+
isRight = false;
|
|
3212
|
+
if (value) {
|
|
3213
|
+
isRight = true;
|
|
3214
|
+
}
|
|
3215
|
+
break;
|
|
3216
|
+
case 'empty':
|
|
3217
|
+
isRight = false;
|
|
3218
|
+
if (!value) {
|
|
3219
|
+
isRight = true;
|
|
3220
|
+
}
|
|
3221
|
+
break;
|
|
3222
|
+
default:
|
|
3223
|
+
isRight = false;
|
|
3224
|
+
break;
|
|
3225
|
+
}
|
|
3226
|
+
return isRight;
|
|
3227
|
+
}
|
|
3228
|
+
checkIsShowBase(op) {
|
|
3229
|
+
let isShow = false;
|
|
3230
|
+
if (op.length > 1) {
|
|
3231
|
+
let value = this.atrForm.get(op[0]).value;
|
|
3232
|
+
isShow = this.compare(value, op[1], op[2]);
|
|
3233
|
+
}
|
|
3234
|
+
else
|
|
3235
|
+
isShow = false;
|
|
3236
|
+
return isShow;
|
|
3237
|
+
}
|
|
3238
|
+
isRequired(item) {
|
|
3239
|
+
let result = false;
|
|
3240
|
+
let isRequired = item.isRequired;
|
|
3241
|
+
let type = typeof isRequired;
|
|
3242
|
+
if (type == "boolean") {
|
|
3243
|
+
return isRequired;
|
|
3244
|
+
}
|
|
3245
|
+
else if (type == "string") {
|
|
3246
|
+
result = this.isShow(false, isRequired);
|
|
3247
|
+
}
|
|
3248
|
+
console.log("isRequired", result);
|
|
3249
|
+
return result;
|
|
3250
|
+
}
|
|
3251
|
+
isShow(isHidden, operator) {
|
|
3252
|
+
if (isHidden) {
|
|
3253
|
+
return false;
|
|
3254
|
+
}
|
|
3255
|
+
let isShow = false;
|
|
3256
|
+
if (!operator || operator == null || operator == "") {
|
|
3257
|
+
return true;
|
|
3258
|
+
}
|
|
3259
|
+
else if (operator.indexOf('&&') > 0) {
|
|
3260
|
+
// a|eq|b &&c|eq|d
|
|
3261
|
+
const ops = operator.split('&&');
|
|
3262
|
+
if (ops.length > 1) {
|
|
3263
|
+
// tslint:disable-next-line:prefer-for-of
|
|
3264
|
+
for (let i = 0; i < ops.length; i++) {
|
|
3265
|
+
isShow = true;
|
|
3266
|
+
if (!this.checkIsShowBase(ops[i].split('|'))) {
|
|
3267
|
+
isShow = false;
|
|
3268
|
+
break;
|
|
3269
|
+
}
|
|
3270
|
+
}
|
|
3271
|
+
}
|
|
3272
|
+
}
|
|
3273
|
+
else if (operator.indexOf('||') > 0) {
|
|
3274
|
+
// a|eq|b||c|eq|d
|
|
3275
|
+
const ops = operator.split('&&');
|
|
3276
|
+
if (ops.length > 1) {
|
|
3277
|
+
for (let i = 0; i < ops.length; i++) {
|
|
3278
|
+
isShow = false;
|
|
3279
|
+
if (this.checkIsShowBase(ops[i].split('|'))) {
|
|
3280
|
+
isShow = true;
|
|
3281
|
+
break;
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
else {
|
|
3287
|
+
let op = operator.split("|");
|
|
3288
|
+
isShow = this.checkIsShowBase(op);
|
|
3289
|
+
}
|
|
3290
|
+
return isShow;
|
|
3291
|
+
}
|
|
3292
|
+
getDictValue(code) {
|
|
3293
|
+
// console.log("9999");
|
|
3294
|
+
this.dictService.getDictBycode(code).subscribe(result => {
|
|
3295
|
+
if (result && result != null)
|
|
3296
|
+
this.dicts[code] = result.dicts;
|
|
3297
|
+
}, error => {
|
|
3298
|
+
this.dicts[code] = [];
|
|
3299
|
+
});
|
|
3300
|
+
}
|
|
3301
|
+
imageUploadChange(e) {
|
|
3302
|
+
if (e.key) {
|
|
3303
|
+
this.atrForm.get(e.key).setValue(e.values);
|
|
3304
|
+
}
|
|
3305
|
+
}
|
|
3306
|
+
resetForm() {
|
|
3307
|
+
// this.atrForm.reset();
|
|
3308
|
+
// console.log("editor reset")
|
|
3309
|
+
if (this.formOpts && this.formOpts.items) {
|
|
3310
|
+
for (let item of this.formOpts.items) {
|
|
3311
|
+
let value = this.formOpts.type == 'add' ? item.defaultValue : item.value;
|
|
3312
|
+
if (item.type == "image") {
|
|
3313
|
+
item.imageOpts.key = item.key;
|
|
3314
|
+
let images = [];
|
|
3315
|
+
if (!value)
|
|
3316
|
+
value = "";
|
|
3317
|
+
let list = value.split(",");
|
|
3318
|
+
for (let key of list) {
|
|
3319
|
+
if (key != "") {
|
|
3320
|
+
images.push({
|
|
3321
|
+
key: key,
|
|
3322
|
+
uid: "-1",
|
|
3323
|
+
url: atr_static_datas.OSS_URL + key
|
|
3324
|
+
});
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
item.imageOpts.imageList = images;
|
|
3328
|
+
// console.log(images)
|
|
3329
|
+
}
|
|
3330
|
+
else if (item.type == "editor") {
|
|
3331
|
+
// console.log("editor")
|
|
3332
|
+
if (!value)
|
|
3333
|
+
value = "";
|
|
3334
|
+
}
|
|
3335
|
+
else if (item.type == "select" && value == "") {
|
|
3336
|
+
value = null;
|
|
3337
|
+
}
|
|
3338
|
+
this.atrForm.get(item.key).setValue(value != undefined ? value : null);
|
|
3339
|
+
}
|
|
3340
|
+
for (const i in this.atrForm.controls) {
|
|
3341
|
+
this.atrForm.controls[i].markAsUntouched();
|
|
3342
|
+
this.atrForm.controls[i].markAsPristine();
|
|
3343
|
+
this.atrForm.controls[i].updateValueAndValidity();
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3346
|
+
}
|
|
3347
|
+
getFormVaild() {
|
|
3348
|
+
let obj = {
|
|
3349
|
+
isValid: false,
|
|
3350
|
+
mode: this.formOpts.type,
|
|
3351
|
+
value: {}
|
|
3352
|
+
};
|
|
3353
|
+
for (const i in this.atrForm.controls) {
|
|
3354
|
+
this.atrForm.controls[i].markAsDirty();
|
|
3355
|
+
this.atrForm.controls[i].updateValueAndValidity();
|
|
3356
|
+
}
|
|
3357
|
+
obj.isValid = this.atrForm.valid;
|
|
3358
|
+
let value = this.atrForm.value;
|
|
3359
|
+
for (const key of Object.keys(value)) {
|
|
3360
|
+
console.log(key);
|
|
3361
|
+
if (value.hasOwnProperty(key) && value[key] != null && value[key] != undefined) {
|
|
3362
|
+
if (value[key] instanceof Date) {
|
|
3363
|
+
for (let item of this.formOpts.items) {
|
|
3364
|
+
if (item.key != key) {
|
|
3365
|
+
continue;
|
|
3366
|
+
}
|
|
3367
|
+
if (item.dateFormat) {
|
|
3368
|
+
obj.value[key] = formatDate(value[key], item.dateFormat, this.locale);
|
|
3369
|
+
}
|
|
3370
|
+
else if (item.type == 'date') {
|
|
3371
|
+
obj.value[key] = formatDate(value[key], 'yyyy-MM-dd 00:00:00', this.locale);
|
|
3372
|
+
}
|
|
3373
|
+
else if (item.type == 'dateTime') {
|
|
3374
|
+
obj.value[key] = formatDate(value[key], 'yyyy-MM-dd HH:mm:ss', this.locale);
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
else if (value[key] instanceof Array) {
|
|
3379
|
+
for (let item of this.formOpts.items) {
|
|
3380
|
+
if (item.key != key) {
|
|
3381
|
+
continue;
|
|
3382
|
+
}
|
|
3383
|
+
let dateFormat = item.dateFormat ? item.dateFormat : 'yyyy-MM-dd 00:00:00';
|
|
3384
|
+
if (item.type == 'dateRange') {
|
|
3385
|
+
let dateArr = [];
|
|
3386
|
+
for (let d of value[key]) {
|
|
3387
|
+
dateArr.push(formatDate(d, dateFormat, this.locale));
|
|
3388
|
+
}
|
|
3389
|
+
obj.value[key] = dateArr;
|
|
3390
|
+
}
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
else {
|
|
3394
|
+
obj.value[key] = value[key];
|
|
3395
|
+
}
|
|
3396
|
+
}
|
|
3397
|
+
}
|
|
3398
|
+
return obj;
|
|
3399
|
+
}
|
|
3400
|
+
showTime(item) {
|
|
3401
|
+
if (!item.dateFormat || item.dateFormat == "yyyy-MM-dd") {
|
|
3402
|
+
return false;
|
|
3403
|
+
}
|
|
3404
|
+
let format = item.dateFormat;
|
|
3405
|
+
if (format.indexOf("HH")) {
|
|
3406
|
+
return true;
|
|
3407
|
+
}
|
|
3408
|
+
if (format.indexOf("mm")) {
|
|
3409
|
+
return true;
|
|
3410
|
+
}
|
|
3411
|
+
if (format.indexOf("ss")) {
|
|
3412
|
+
return true;
|
|
3413
|
+
}
|
|
3414
|
+
return false;
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
AtrFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AtrFormComponent, deps: [{ token: ShareService }, { token: i1$2.FormBuilder }, { token: DictService }, { token: i0.Injector }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component });
|
|
3418
|
+
AtrFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AtrFormComponent, selector: "atr-form", inputs: { formOpts: "formOpts" }, outputs: { formAction: "formAction" }, ngImport: i0, template: "<form nz-form [formGroup]=\"atrForm\">\r\n <div nz-row nzGutter=\"8\" nzType=\"flex\" nzAlign=\"top\">\r\n <ng-container *ngFor=\"let item of formOpts.items\">\r\n <div nz-col nzSpan=\"24\" class=\"form-title\" *ngIf=\"item.type == 'title'\" >\r\n {{item.label}}\r\n </div>\r\n <div nz-col [nzSpan]=\"item.span\" *ngIf=\"isShow(item.isHidden,item.operator)\">\r\n\r\n <nz-form-item *ngIf=\"item.type != 'title'\">\r\n <nz-form-label [nzSm]=\"item.lspan\" [nzXs]=\"24\" [nzRequired]=\"isRequired(item)\">{{item.label}}</nz-form-label>\r\n <nz-form-control [nzSm]=\"item.cspan\" [nzXs]=\"24\">\r\n <nz-tree-select *ngIf=\"item.type == 'treeSelect'\"\r\n [nzNodes]=\"item.treeList\"\r\n nzShowSearch=\"true\"\r\n nzHideUnMatched=\"true\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n [nzShowSearch]=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzAllowClear]=\"!item.notNull\"\r\n [nzMultiple]=\"item.selectUrl.isMultiple\"\r\n [nzDisabled]=\"item.readonly\"\r\n style=\"flex: 1\"\r\n >\r\n </nz-tree-select>\r\n <input *ngIf=\"item.type == 'text'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n [readonly]=\"item.readonly || formOpts.type == 'view'\"\r\n [formControlName]=\"item.key\"/>\r\n <textarea *ngIf=\"item.type == 'textarea'\" nz-input [rows]=\"item.rows\" placeholder=\"{{item.placeholder}}\"\r\n [formControlName]=\"item.key\" [readonly]=\"item.readonly|| formOpts.type == 'view'\"></textarea>\r\n <nz-input-number *ngIf=\"item.type == 'number'\" nzPlaceHolder=\"{{item.placeholder}}\"\r\n [formControlName]=\"item.key\"></nz-input-number>\r\n <nz-radio-group *ngIf=\"item.type == 'radio'\" [formControlName]=\"item.key\">\r\n <label nz-radio *ngFor=\"let o of item.dictList\" [nzValue]=\"o.value\" >{{o.label}}</label>\r\n </nz-radio-group>\r\n <nz-select\r\n *ngIf=\"item.type == 'select'\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n nzServerSearch\r\n nzDisabled=\"{{item.readonly|| formOpts.type == 'view'}}\"\r\n >\r\n <nz-option *ngFor=\"let o of dicts[item.dictCode]\" [nzLabel]=\"o.typeName\" [nzValue]=\"o.id\"></nz-option>\r\n </nz-select>\r\n <nz-select\r\n *ngIf=\"item.type == 'selectc'\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n nzServerSearch\r\n nzDisabled=\"{{item.readonly|| formOpts.type == 'view'}}\"\r\n >\r\n <nz-option *ngFor=\"let o of item.dictList\" [nzLabel]=\"o.label\" [nzValue]=\"o.value\" > </nz-option>\r\n </nz-select>\r\n <nz-cascader [nzDisabled]=\"item.readonly\" style=\"flex: 1\" [nzAllowClear]=\"!item.notNull\"\r\n [nzValueProperty]=\"'nzValueProperty'\"\r\n [nzShowSearch]=\"true\" *ngIf=\"item.type == 'cascader'\"\r\n [nzOptions]=\"item.dictList\" [formControlName]=\"item.key\" ></nz-cascader>\r\n <nz-date-picker *ngIf=\"item.type == 'date'\" [nzFormat]=\"item.dateFormat ? item.dateFormat : 'yyyy-MM-dd'\"\r\n [nzShowTime]=\"showTime(item)\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n <nz-range-picker *ngIf=\"item.type == 'dateRange'\" [nzFormat]=\"'yyyy-MM-dd'\" [formControlName]=\"item.key\"\r\n [nzPlaceHolder]=\"['\u5F00\u59CB\u65F6\u95F4', '\u7ED3\u675F\u65F6\u95F4']\"></nz-range-picker>\r\n\r\n <input *ngIf=\"item.type == 'image'\" nz-input [formControlName]=\"item.key\" [hidden]=\"true\"/>\r\n <atr-img-upload *ngIf=\"item.type == 'image'\" [(opts)]=\"item.imageOpts\"\r\n (afterChange)=\"imageUploadChange($event)\"></atr-img-upload>\r\n\r\n <!-- <editor *ngIf=\"item.type == 'editor'\" [formControlName]=\"item.key\" [config]=\"{initialFrameHeight:item.height}\" ></editor>-->\r\n<!-- <app-quill-editor *ngIf=\"item.type == 'editor'\" [formControlName]=\"item.key\"-->\r\n<!-- [styles]=\"{height:item.height > 0 ? item.height + 'px' : '250px'}\"></app-quill-editor>-->\r\n\r\n <ng-container *ngFor=\"let valid of item.validators\">\r\n <ng-container *ngIf=\"atrForm.get(item.key).hasError(valid.type) && (atrForm.get(item.key).dirty )\">\r\n <div style=\"color:red; height: 15px;margin: 0;line-height: 15px;\">{{valid.errorLabel}}</div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <button *ngIf=\"item.button?.isShow\" type=\"button\" class=\"ant-btn ant-btn-primary\"\r\n (click)=\"doAction(item.button,$event)\">\r\n <span>{{item.button.name}}</span></button>\r\n </nz-form-control>\r\n <ng-container *ngTemplateOutlet=\"item.temp\"></ng-container>\r\n </nz-form-item>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n</form>\r\n", styles: [":host ::ng-deep .ant-form-item{margin:0 0 10px}:host ::ng-deep .ant-form-item-label{text-align:left}:host ::ng-deep nz-input-number{width:100%}:host .form-title{height:50px;line-height:50px;font-weight:500;font-size:20px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;margin-bottom:14px;margin-top:11px}\n"], components: [{ type: i4.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { type: i4.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon"], exportAs: ["nzFormLabel"] }, { type: i4.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { type: i5.NzTreeSelectComponent, selector: "nz-tree-select", inputs: ["nzId", "nzAllowClear", "nzShowExpand", "nzShowLine", "nzDropdownMatchSelectWidth", "nzCheckable", "nzHideUnMatched", "nzShowIcon", "nzShowSearch", "nzDisabled", "nzAsyncData", "nzMultiple", "nzDefaultExpandAll", "nzCheckStrictly", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzExpandedIcon", "nzNotFoundContent", "nzNodes", "nzOpen", "nzSize", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzExpandedKeys", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckBoxChange"], exportAs: ["nzTreeSelect"] }, { type: i6$2.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzSize", "nzMin", "nzMax", "nzParser", "nzPrecision", "nzPrecisionMode", "nzPlaceHolder", "nzStatus", "nzStep", "nzInputMode", "nzId", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBorderless", "nzFormatter"], outputs: ["nzBlur", "nzFocus"], exportAs: ["nzInputNumber"] }, { type: i7.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { type: i7.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus"], exportAs: ["nzRadio"] }, { type: i3.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { type: i3.NzOptionComponent, selector: "nz-option", inputs: ["nzLabel", "nzValue", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { type: i4$1.NzCascaderComponent, selector: "nz-cascader, [nz-cascader]", inputs: ["nzOptionRender", "nzShowInput", "nzShowArrow", "nzAllowClear", "nzAutoFocus", "nzChangeOnSelect", "nzDisabled", "nzColumnClassName", "nzExpandTrigger", "nzValueProperty", "nzLabelRender", "nzLabelProperty", "nzNotFoundContent", "nzSize", "nzBackdrop", "nzShowSearch", "nzPlaceHolder", "nzMenuClassName", "nzMenuStyle", "nzMouseEnterDelay", "nzMouseLeaveDelay", "nzStatus", "nzTriggerAction", "nzChangeOn", "nzLoadData", "nzSuffixIcon", "nzExpandIcon", "nzOptions"], outputs: ["nzVisibleChange", "nzSelectionChange", "nzSelect", "nzClear"], exportAs: ["nzCascader"] }, { type: i6.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { type: UploadComponent, selector: "atr-img-upload", inputs: ["opts", "isEdit", "allowChangSeq"], outputs: ["afterChange", "optsChange"] }], directives: [{ type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon"], exportAs: ["nzForm"] }, { type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i12.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i12.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i2.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }, { type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
3419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AtrFormComponent, decorators: [{
|
|
3420
|
+
type: Component,
|
|
3421
|
+
args: [{ selector: 'atr-form', template: "<form nz-form [formGroup]=\"atrForm\">\r\n <div nz-row nzGutter=\"8\" nzType=\"flex\" nzAlign=\"top\">\r\n <ng-container *ngFor=\"let item of formOpts.items\">\r\n <div nz-col nzSpan=\"24\" class=\"form-title\" *ngIf=\"item.type == 'title'\" >\r\n {{item.label}}\r\n </div>\r\n <div nz-col [nzSpan]=\"item.span\" *ngIf=\"isShow(item.isHidden,item.operator)\">\r\n\r\n <nz-form-item *ngIf=\"item.type != 'title'\">\r\n <nz-form-label [nzSm]=\"item.lspan\" [nzXs]=\"24\" [nzRequired]=\"isRequired(item)\">{{item.label}}</nz-form-label>\r\n <nz-form-control [nzSm]=\"item.cspan\" [nzXs]=\"24\">\r\n <nz-tree-select *ngIf=\"item.type == 'treeSelect'\"\r\n [nzNodes]=\"item.treeList\"\r\n nzShowSearch=\"true\"\r\n nzHideUnMatched=\"true\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n [nzShowSearch]=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzAllowClear]=\"!item.notNull\"\r\n [nzMultiple]=\"item.selectUrl.isMultiple\"\r\n [nzDisabled]=\"item.readonly\"\r\n style=\"flex: 1\"\r\n >\r\n </nz-tree-select>\r\n <input *ngIf=\"item.type == 'text'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n [readonly]=\"item.readonly || formOpts.type == 'view'\"\r\n [formControlName]=\"item.key\"/>\r\n <textarea *ngIf=\"item.type == 'textarea'\" nz-input [rows]=\"item.rows\" placeholder=\"{{item.placeholder}}\"\r\n [formControlName]=\"item.key\" [readonly]=\"item.readonly|| formOpts.type == 'view'\"></textarea>\r\n <nz-input-number *ngIf=\"item.type == 'number'\" nzPlaceHolder=\"{{item.placeholder}}\"\r\n [formControlName]=\"item.key\"></nz-input-number>\r\n <nz-radio-group *ngIf=\"item.type == 'radio'\" [formControlName]=\"item.key\">\r\n <label nz-radio *ngFor=\"let o of item.dictList\" [nzValue]=\"o.value\" >{{o.label}}</label>\r\n </nz-radio-group>\r\n <nz-select\r\n *ngIf=\"item.type == 'select'\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n nzServerSearch\r\n nzDisabled=\"{{item.readonly|| formOpts.type == 'view'}}\"\r\n >\r\n <nz-option *ngFor=\"let o of dicts[item.dictCode]\" [nzLabel]=\"o.typeName\" [nzValue]=\"o.id\"></nz-option>\r\n </nz-select>\r\n <nz-select\r\n *ngIf=\"item.type == 'selectc'\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n nzServerSearch\r\n nzDisabled=\"{{item.readonly|| formOpts.type == 'view'}}\"\r\n >\r\n <nz-option *ngFor=\"let o of item.dictList\" [nzLabel]=\"o.label\" [nzValue]=\"o.value\" > </nz-option>\r\n </nz-select>\r\n <nz-cascader [nzDisabled]=\"item.readonly\" style=\"flex: 1\" [nzAllowClear]=\"!item.notNull\"\r\n [nzValueProperty]=\"'nzValueProperty'\"\r\n [nzShowSearch]=\"true\" *ngIf=\"item.type == 'cascader'\"\r\n [nzOptions]=\"item.dictList\" [formControlName]=\"item.key\" ></nz-cascader>\r\n <nz-date-picker *ngIf=\"item.type == 'date'\" [nzFormat]=\"item.dateFormat ? item.dateFormat : 'yyyy-MM-dd'\"\r\n [nzShowTime]=\"showTime(item)\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n <nz-range-picker *ngIf=\"item.type == 'dateRange'\" [nzFormat]=\"'yyyy-MM-dd'\" [formControlName]=\"item.key\"\r\n [nzPlaceHolder]=\"['\u5F00\u59CB\u65F6\u95F4', '\u7ED3\u675F\u65F6\u95F4']\"></nz-range-picker>\r\n\r\n <input *ngIf=\"item.type == 'image'\" nz-input [formControlName]=\"item.key\" [hidden]=\"true\"/>\r\n <atr-img-upload *ngIf=\"item.type == 'image'\" [(opts)]=\"item.imageOpts\"\r\n (afterChange)=\"imageUploadChange($event)\"></atr-img-upload>\r\n\r\n <!-- <editor *ngIf=\"item.type == 'editor'\" [formControlName]=\"item.key\" [config]=\"{initialFrameHeight:item.height}\" ></editor>-->\r\n<!-- <app-quill-editor *ngIf=\"item.type == 'editor'\" [formControlName]=\"item.key\"-->\r\n<!-- [styles]=\"{height:item.height > 0 ? item.height + 'px' : '250px'}\"></app-quill-editor>-->\r\n\r\n <ng-container *ngFor=\"let valid of item.validators\">\r\n <ng-container *ngIf=\"atrForm.get(item.key).hasError(valid.type) && (atrForm.get(item.key).dirty )\">\r\n <div style=\"color:red; height: 15px;margin: 0;line-height: 15px;\">{{valid.errorLabel}}</div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <button *ngIf=\"item.button?.isShow\" type=\"button\" class=\"ant-btn ant-btn-primary\"\r\n (click)=\"doAction(item.button,$event)\">\r\n <span>{{item.button.name}}</span></button>\r\n </nz-form-control>\r\n <ng-container *ngTemplateOutlet=\"item.temp\"></ng-container>\r\n </nz-form-item>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n</form>\r\n", styles: [":host ::ng-deep .ant-form-item{margin:0 0 10px}:host ::ng-deep .ant-form-item-label{text-align:left}:host ::ng-deep nz-input-number{width:100%}:host .form-title{height:50px;line-height:50px;font-weight:500;font-size:20px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;margin-bottom:14px;margin-top:11px}\n"] }]
|
|
3422
|
+
}], ctorParameters: function () {
|
|
3423
|
+
return [{ type: ShareService }, { type: i1$2.FormBuilder }, { type: DictService }, { type: i0.Injector }, { type: undefined, decorators: [{
|
|
3424
|
+
type: Inject,
|
|
3425
|
+
args: [LOCALE_ID]
|
|
3426
|
+
}] }];
|
|
3427
|
+
}, propDecorators: { formOpts: [{
|
|
3428
|
+
type: Input
|
|
3429
|
+
}], formAction: [{
|
|
3430
|
+
type: Output
|
|
3431
|
+
}] } });
|
|
3432
|
+
|
|
3433
|
+
class SelectTreeComponent {
|
|
3434
|
+
constructor(dictService) {
|
|
3435
|
+
this.dictService = dictService;
|
|
3436
|
+
this.dicts = {};
|
|
3437
|
+
this.action = new EventEmitter();
|
|
3438
|
+
this.isDisable = false;
|
|
3439
|
+
}
|
|
3440
|
+
ngOnInit() {
|
|
3441
|
+
this.getDictValue(this.opt["dictCode"]);
|
|
3442
|
+
}
|
|
3443
|
+
getDictValue(code) {
|
|
3444
|
+
this.dictService.getDictBycode(code).subscribe(result => {
|
|
3445
|
+
if (result && result != null) {
|
|
3446
|
+
this.dicts[code] = result.dicts;
|
|
3447
|
+
this.dicts[code].forEach((dic) => {
|
|
3448
|
+
// 设置默认值
|
|
3449
|
+
if (dic.id == this.opt.value) {
|
|
3450
|
+
this.selectValue = dic;
|
|
3451
|
+
this.changeValue();
|
|
3452
|
+
}
|
|
3453
|
+
});
|
|
3454
|
+
}
|
|
3455
|
+
}, error => {
|
|
3456
|
+
this.dicts[code] = [];
|
|
3457
|
+
});
|
|
3458
|
+
}
|
|
3459
|
+
changeValue() {
|
|
3460
|
+
this.opt.value = this.selectValue.id;
|
|
3461
|
+
console.log(this.opt.value);
|
|
3462
|
+
this.action.emit({
|
|
3463
|
+
name: 'changeValue',
|
|
3464
|
+
code: 'ngModelChange',
|
|
3465
|
+
data: this.selectValue
|
|
3466
|
+
});
|
|
3467
|
+
}
|
|
3468
|
+
}
|
|
3469
|
+
SelectTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SelectTreeComponent, deps: [{ token: DictService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3470
|
+
SelectTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SelectTreeComponent, selector: "app-select-tree", inputs: { opt: "opt", isDisable: "isDisable" }, outputs: { action: "action" }, ngImport: i0, template: "<nz-select\r\n nzAllowClear=\"false\"\r\n [nzDropdownMatchSelectWidth]=\"false\"\r\n nzServerSearch\r\n [(ngModel)]=\"selectValue\"\r\n style=\"width: 100px\"\r\n (ngModelChange)=\"changeValue()\"\r\n [nzDisabled]=\"isDisable\"\r\n>\r\n <nz-option *ngFor=\"let o of dicts[opt.dictCode]\" [nzLabel]=\"o.typeName\" [nzValue]=\"o\" > </nz-option>\r\n</nz-select>\r\n", styles: [""], components: [{ type: i3.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { type: i3.NzOptionComponent, selector: "nz-option", inputs: ["nzLabel", "nzValue", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }], directives: [{ type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
3471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SelectTreeComponent, decorators: [{
|
|
3472
|
+
type: Component,
|
|
3473
|
+
args: [{ selector: 'app-select-tree', template: "<nz-select\r\n nzAllowClear=\"false\"\r\n [nzDropdownMatchSelectWidth]=\"false\"\r\n nzServerSearch\r\n [(ngModel)]=\"selectValue\"\r\n style=\"width: 100px\"\r\n (ngModelChange)=\"changeValue()\"\r\n [nzDisabled]=\"isDisable\"\r\n>\r\n <nz-option *ngFor=\"let o of dicts[opt.dictCode]\" [nzLabel]=\"o.typeName\" [nzValue]=\"o\" > </nz-option>\r\n</nz-select>\r\n", styles: [""] }]
|
|
3474
|
+
}], ctorParameters: function () { return [{ type: DictService }]; }, propDecorators: { opt: [{
|
|
3475
|
+
type: Input
|
|
3476
|
+
}], action: [{
|
|
3477
|
+
type: Output
|
|
3478
|
+
}], isDisable: [{
|
|
3479
|
+
type: Input
|
|
3480
|
+
}] } });
|
|
3481
|
+
|
|
3482
|
+
Quill.register('modules/imageResize', ImageResize);
|
|
3483
|
+
const icons = Quill.import('ui/icons');
|
|
3484
|
+
icons.undo = `<svg viewbox="0 0 18 18">
|
|
3485
|
+
<polygon class="ql-fill ql-stroke" points="6 10 4 12 2 10 6 10"></polygon>
|
|
3486
|
+
<path class="ql-stroke" d="M8.09,13.91A4.6,4.6,0,0,0,9,14,5,5,0,1,0,4,9"></path>
|
|
3487
|
+
</svg>`;
|
|
3488
|
+
icons.redo = `<svg viewbox="0 0 18 18">
|
|
3489
|
+
<polygon class="ql-fill ql-stroke" points="12 10 14 12 16 10 12 10"></polygon>
|
|
3490
|
+
<path class="ql-stroke" d="M9.91,13.91A4.6,4.6,0,0,1,9,14a5,5,0,1,1,5-5"></path>
|
|
3491
|
+
</svg>`;
|
|
3492
|
+
class QuillEditorComponent {
|
|
3493
|
+
constructor(uploadOssService, message) {
|
|
3494
|
+
this.uploadOssService = uploadOssService;
|
|
3495
|
+
this.message = message;
|
|
3496
|
+
this.placeholder = '请输入';
|
|
3497
|
+
this.styles = { height: '350px' };
|
|
3498
|
+
this.readOnly = false;
|
|
3499
|
+
this.needImgSeq = false;
|
|
3500
|
+
this.imgUrls = [];
|
|
3501
|
+
this.editor$ = new Subject();
|
|
3502
|
+
this.imgVis = false;
|
|
3503
|
+
}
|
|
3504
|
+
ngOnInit() {
|
|
3505
|
+
this.editor$.pipe(debounceTime(700)).subscribe((editorContent) => {
|
|
3506
|
+
if (typeof (this.onChangeListener) === 'function' && typeof (this.onTouchedListener)) {
|
|
3507
|
+
this.onChangeListener(editorContent); // 告诉form,你的表单值改变成了payload
|
|
3508
|
+
this.onTouchedListener(); // 告诉form,你的表单有交互发生
|
|
3509
|
+
}
|
|
3510
|
+
});
|
|
3511
|
+
}
|
|
3512
|
+
writeValue(value) {
|
|
3513
|
+
this.value = value;
|
|
3514
|
+
}
|
|
3515
|
+
registerOnChange(fn) {
|
|
3516
|
+
this.onChangeListener = fn;
|
|
3517
|
+
}
|
|
3518
|
+
registerOnTouched(fn) {
|
|
3519
|
+
this.onTouchedListener = fn;
|
|
3520
|
+
}
|
|
3521
|
+
setDisabledState(isDisabled) {
|
|
3522
|
+
}
|
|
3523
|
+
onChange(quill) {
|
|
3524
|
+
this.editor$.next(quill.html);
|
|
3525
|
+
}
|
|
3526
|
+
EditorCreated(quill) {
|
|
3527
|
+
const toolbar = quill.getModule('toolbar');
|
|
3528
|
+
toolbar.addHandler('image', this.imageHandler.bind(this));
|
|
3529
|
+
this.editor = quill;
|
|
3530
|
+
}
|
|
3531
|
+
imageHandler() {
|
|
3532
|
+
const Imageinput = document.createElement('input');
|
|
3533
|
+
Imageinput.setAttribute('type', 'file');
|
|
3534
|
+
Imageinput.setAttribute('multiple', 'multiple');
|
|
3535
|
+
Imageinput.setAttribute('accept', 'image/png, image/gif, image/jpeg, image/bmp');
|
|
3536
|
+
Imageinput.classList.add('ql-image');
|
|
3537
|
+
Imageinput.addEventListener('change', () => {
|
|
3538
|
+
if (this.needImgSeq) {
|
|
3539
|
+
this.imgVis = true;
|
|
3540
|
+
}
|
|
3541
|
+
console.log(Imageinput);
|
|
3542
|
+
let files = Imageinput.files;
|
|
3543
|
+
if (files === null || files.length == 0) {
|
|
3544
|
+
return;
|
|
3545
|
+
}
|
|
3546
|
+
this.imgUrls = [];
|
|
3547
|
+
for (let i = 0; i < files.length; i++) {
|
|
3548
|
+
const file = files[i];
|
|
3549
|
+
if (file === null) {
|
|
3550
|
+
continue;
|
|
3551
|
+
}
|
|
3552
|
+
const error = (res) => {
|
|
3553
|
+
this.message.warning('上传失败');
|
|
3554
|
+
};
|
|
3555
|
+
this.uploadOssService.uploadOss(file).subscribe((url) => {
|
|
3556
|
+
var _a;
|
|
3557
|
+
console.log(file);
|
|
3558
|
+
if (url) {
|
|
3559
|
+
this.imgUrls.push({ url: url, file: file, index: i });
|
|
3560
|
+
if (!this.needImgSeq) {
|
|
3561
|
+
this.editor.insertEmbed(this.editor.getSelection(true).index, 'image', url);
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3564
|
+
else {
|
|
3565
|
+
this.message.warning('上传失败');
|
|
3566
|
+
}
|
|
3567
|
+
if (this.needImgSeq && this.imgUrls.length == files.length) {
|
|
3568
|
+
this.imgVis = true;
|
|
3569
|
+
this.imgUrls.sort((a, b) => a.index - b.index);
|
|
3570
|
+
(_a = document.getElementById("te")) === null || _a === void 0 ? void 0 : _a.click();
|
|
3571
|
+
}
|
|
3572
|
+
}, error);
|
|
3573
|
+
}
|
|
3574
|
+
});
|
|
3575
|
+
Imageinput.click();
|
|
3576
|
+
}
|
|
3577
|
+
saveSeq() {
|
|
3578
|
+
console.log(123);
|
|
3579
|
+
for (let i = this.imgUrls.length - 1; i >= 0; i--) {
|
|
3580
|
+
this.editor.insertEmbed(this.editor.getSelection(true).index, 'image', this.imgUrls[i].url);
|
|
3581
|
+
}
|
|
3582
|
+
this.imgVis = false;
|
|
3583
|
+
}
|
|
3584
|
+
arrowUp(index) {
|
|
3585
|
+
let img = this.imgUrls[index];
|
|
3586
|
+
this.imgUrls[index] = this.imgUrls[index - 1];
|
|
3587
|
+
this.imgUrls[index - 1] = img;
|
|
3588
|
+
}
|
|
3589
|
+
arrowDown(index) {
|
|
3590
|
+
let img = this.imgUrls[index];
|
|
3591
|
+
this.imgUrls[index] = this.imgUrls[index + 1];
|
|
3592
|
+
this.imgUrls[index + 1] = img;
|
|
3593
|
+
}
|
|
3594
|
+
cancle() {
|
|
3595
|
+
this.imgVis = false;
|
|
3596
|
+
}
|
|
3597
|
+
te() {
|
|
3598
|
+
console.log('上传完毕');
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
QuillEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuillEditorComponent, deps: [{ token: UploadOssService }, { token: i2$4.NzMessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3602
|
+
QuillEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: QuillEditorComponent, selector: "app-quill-editor", inputs: { placeholder: "placeholder", styles: "styles", value: "value", readOnly: "readOnly", needImgSeq: "needImgSeq" }, providers: [
|
|
3603
|
+
UploadOssService,
|
|
3604
|
+
{
|
|
3605
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3606
|
+
useExisting: forwardRef(() => QuillEditorComponent),
|
|
3607
|
+
multi: true
|
|
3608
|
+
}
|
|
3609
|
+
], ngImport: i0, template: "<quill-editor\r\n [styles]=\"styles\"\r\n [placeholder]=\"placeholder\"\r\n (onEditorCreated)=\"EditorCreated($event)\"\r\n [(ngModel)]=\"value\"\r\n (onContentChanged)=\"onChange($event)\"\r\n [readOnly]=\"readOnly\"\r\n></quill-editor>\r\n<!--\u8FD9\u4E2Adiv,\u662F\u56E0\u4E3A\u4E0A\u4F20\u5B8C\u6BD5\u7126\u70B9\u8FD8\u5728\u5BCC\u6587\u672C\u91CC,\u5F39\u51FA\u65E0\u6CD5\u663E\u793A.....-->\r\n<div id=\"te\" (click)=\"te()\"></div>\r\n<nz-modal [(nzVisible)]=\"imgVis\" (nzOnOk)=\"saveSeq()\" (nzOnCancel)=\"cancle()\" nzMaskClosable=\"false\"\r\n [nzStyle]=\"{padding:0}\">\r\n <ng-container *nzModalContent>\r\n <div style=\"max-height:600px;overflow:auto;margin-top: 10px;\">\r\n <ng-container *ngTemplateOutlet=\"imgsContent\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</nz-modal>\r\n<ng-template #imgsContent>\r\n <ng-container *ngFor=\"let imgOpt of imgUrls;let i = index\">\r\n <div class=\"img-div\">\r\n <img [src]=\"imgOpt.url\" [ngStyle]=\"{ width: '100px',display: 'inline-block', margin:'5px' }\"/>\r\n <div style=\"margin-left: 20px; color: grey;\">{{imgOpt.file.name}}</div>\r\n <div style=\"margin-right: 20px; flex: 1;text-align: right;\">\r\n <a title=\"\u4E0A\u79FB\" *ngIf=\" i > 0\" style=\"display: block;\" (click)=\"arrowUp(i)\">\r\n <i nz-icon nzType=\"arrow-up\" nzTheme=\"outline\" style=\"color: #1890ff; font-size: 15px;\"></i>\r\n \u4E0A\u79FB</a>\r\n <a title=\"\u4E0B\u79FB\" *ngIf=\" i < imgUrls.length - 1\" (click)=\"arrowDown(i)\">\r\n <i nz-icon nzType=\"arrow-down\" nzTheme=\"outline\" style=\"color: #1890ff; font-size: 15px\"></i>\r\n \u4E0B\u79FB</a>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n", styles: [".img-div{border:1px solid #d9d9d9;border-radius:4px;margin-top:5px;display:flex;align-items:center;padding:0 5px}\n"], components: [{ type: i3$2.QuillEditorComponent, selector: "quill-editor" }, { type: i2$3.NzModalComponent, selector: "nz-modal", inputs: ["nzMask", "nzMaskClosable", "nzCloseOnNavigation", "nzVisible", "nzClosable", "nzOkLoading", "nzOkDisabled", "nzCancelDisabled", "nzCancelLoading", "nzKeyboard", "nzNoAnimation", "nzCentered", "nzContent", "nzComponentParams", "nzFooter", "nzZIndex", "nzWidth", "nzWrapClassName", "nzClassName", "nzStyle", "nzTitle", "nzCloseIcon", "nzMaskStyle", "nzBodyStyle", "nzOkText", "nzCancelText", "nzOkType", "nzOkDanger", "nzIconType", "nzModalType", "nzAutofocus", "nzOnOk", "nzOnCancel"], outputs: ["nzOnOk", "nzOnCancel", "nzAfterOpen", "nzAfterClose", "nzVisibleChange"], exportAs: ["nzModal"] }], directives: [{ type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$3.NzModalContentDirective, selector: "[nzModalContent]", exportAs: ["nzModalContent"] }, { type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }] });
|
|
3610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuillEditorComponent, decorators: [{
|
|
3611
|
+
type: Component,
|
|
3612
|
+
args: [{ selector: 'app-quill-editor', providers: [
|
|
3613
|
+
UploadOssService,
|
|
3614
|
+
{
|
|
3615
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3616
|
+
useExisting: forwardRef(() => QuillEditorComponent),
|
|
3617
|
+
multi: true
|
|
3618
|
+
}
|
|
3619
|
+
], template: "<quill-editor\r\n [styles]=\"styles\"\r\n [placeholder]=\"placeholder\"\r\n (onEditorCreated)=\"EditorCreated($event)\"\r\n [(ngModel)]=\"value\"\r\n (onContentChanged)=\"onChange($event)\"\r\n [readOnly]=\"readOnly\"\r\n></quill-editor>\r\n<!--\u8FD9\u4E2Adiv,\u662F\u56E0\u4E3A\u4E0A\u4F20\u5B8C\u6BD5\u7126\u70B9\u8FD8\u5728\u5BCC\u6587\u672C\u91CC,\u5F39\u51FA\u65E0\u6CD5\u663E\u793A.....-->\r\n<div id=\"te\" (click)=\"te()\"></div>\r\n<nz-modal [(nzVisible)]=\"imgVis\" (nzOnOk)=\"saveSeq()\" (nzOnCancel)=\"cancle()\" nzMaskClosable=\"false\"\r\n [nzStyle]=\"{padding:0}\">\r\n <ng-container *nzModalContent>\r\n <div style=\"max-height:600px;overflow:auto;margin-top: 10px;\">\r\n <ng-container *ngTemplateOutlet=\"imgsContent\"></ng-container>\r\n </div>\r\n </ng-container>\r\n</nz-modal>\r\n<ng-template #imgsContent>\r\n <ng-container *ngFor=\"let imgOpt of imgUrls;let i = index\">\r\n <div class=\"img-div\">\r\n <img [src]=\"imgOpt.url\" [ngStyle]=\"{ width: '100px',display: 'inline-block', margin:'5px' }\"/>\r\n <div style=\"margin-left: 20px; color: grey;\">{{imgOpt.file.name}}</div>\r\n <div style=\"margin-right: 20px; flex: 1;text-align: right;\">\r\n <a title=\"\u4E0A\u79FB\" *ngIf=\" i > 0\" style=\"display: block;\" (click)=\"arrowUp(i)\">\r\n <i nz-icon nzType=\"arrow-up\" nzTheme=\"outline\" style=\"color: #1890ff; font-size: 15px;\"></i>\r\n \u4E0A\u79FB</a>\r\n <a title=\"\u4E0B\u79FB\" *ngIf=\" i < imgUrls.length - 1\" (click)=\"arrowDown(i)\">\r\n <i nz-icon nzType=\"arrow-down\" nzTheme=\"outline\" style=\"color: #1890ff; font-size: 15px\"></i>\r\n \u4E0B\u79FB</a>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n", styles: [".img-div{border:1px solid #d9d9d9;border-radius:4px;margin-top:5px;display:flex;align-items:center;padding:0 5px}\n"] }]
|
|
3620
|
+
}], ctorParameters: function () { return [{ type: UploadOssService }, { type: i2$4.NzMessageService }]; }, propDecorators: { placeholder: [{
|
|
3621
|
+
type: Input
|
|
3622
|
+
}], styles: [{
|
|
3623
|
+
type: Input
|
|
3624
|
+
}], value: [{
|
|
3625
|
+
type: Input
|
|
3626
|
+
}], readOnly: [{
|
|
3627
|
+
type: Input
|
|
3628
|
+
}], needImgSeq: [{
|
|
3629
|
+
type: Input
|
|
3630
|
+
}] } });
|
|
3631
|
+
|
|
3632
|
+
const THIRDMODULES = [
|
|
3633
|
+
CusNgZorroAntdModule,
|
|
3634
|
+
NzResizableModule
|
|
3635
|
+
];
|
|
3636
|
+
const SERVICE_PROVIDES = [];
|
|
3637
|
+
registerLocaleData(zh);
|
|
3638
|
+
// #endregion
|
|
3639
|
+
// #region your componets & directives
|
|
3640
|
+
const COMPONENTS = [QuillEditorComponent, TableFormItemComponent, TableTdComponent, AtrTableComponent, UploadComponent, AtrFormComponent, LocalUploadComponent,
|
|
3641
|
+
SelectTreeComponent, VideoComponent];
|
|
3642
|
+
//SharedModule
|
|
3643
|
+
// 应 包含定义:
|
|
3644
|
+
// 应用通用自定义业务组件
|
|
3645
|
+
// 应 导出所有包含的模块。
|
|
3646
|
+
// 不应 有 providers 属性。
|
|
3647
|
+
class AtrSharedModule {
|
|
3648
|
+
}
|
|
3649
|
+
AtrSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AtrSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3650
|
+
AtrSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AtrSharedModule, declarations: [QuillEditorComponent, TableFormItemComponent, TableTdComponent, AtrTableComponent, UploadComponent, AtrFormComponent, LocalUploadComponent,
|
|
3651
|
+
SelectTreeComponent, VideoComponent], imports: [PipeModuleModule,
|
|
3652
|
+
CommonModule,
|
|
3653
|
+
FormsModule,
|
|
3654
|
+
ReactiveFormsModule,
|
|
3655
|
+
RouterModule, CusNgZorroAntdModule,
|
|
3656
|
+
NzResizableModule, VgCoreModule,
|
|
3657
|
+
VgControlsModule,
|
|
3658
|
+
VgOverlayPlayModule,
|
|
3659
|
+
VgBufferingModule,
|
|
3660
|
+
DragDropModule,
|
|
3661
|
+
AtrComponentsModule, i3$2.QuillModule], exports: [DragDropModule,
|
|
3662
|
+
CommonModule,
|
|
3663
|
+
FormsModule,
|
|
3664
|
+
ReactiveFormsModule,
|
|
3665
|
+
RouterModule, CusNgZorroAntdModule,
|
|
3666
|
+
NzResizableModule, QuillEditorComponent, TableFormItemComponent, TableTdComponent, AtrTableComponent, UploadComponent, AtrFormComponent, LocalUploadComponent,
|
|
3667
|
+
SelectTreeComponent, VideoComponent, PipeModuleModule] });
|
|
3668
|
+
AtrSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AtrSharedModule, providers: SERVICE_PROVIDES, imports: [[
|
|
3669
|
+
PipeModuleModule,
|
|
3670
|
+
CommonModule,
|
|
3671
|
+
FormsModule,
|
|
3672
|
+
ReactiveFormsModule,
|
|
3673
|
+
RouterModule,
|
|
3674
|
+
// third libs
|
|
3675
|
+
...THIRDMODULES,
|
|
3676
|
+
VgCoreModule,
|
|
3677
|
+
VgControlsModule,
|
|
3678
|
+
VgOverlayPlayModule,
|
|
3679
|
+
VgBufferingModule,
|
|
3680
|
+
DragDropModule,
|
|
3681
|
+
AtrComponentsModule,
|
|
3682
|
+
QuillModule.forRoot({
|
|
3683
|
+
modules: {
|
|
3684
|
+
syntax: false,
|
|
3685
|
+
imageResize: {},
|
|
3686
|
+
toolbar: {
|
|
3687
|
+
container: [
|
|
3688
|
+
['undo', 'redo'],
|
|
3689
|
+
['bold', 'italic', 'underline'],
|
|
3690
|
+
// ['code-block'], // blockquote
|
|
3691
|
+
// [{ header: 1 }, { header: 2 }], // custom button values
|
|
3692
|
+
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
3693
|
+
// [{ script: 'sub' }, { script: 'super' }], // superscript/subscript
|
|
3694
|
+
[{ indent: '-1' }, { indent: '+1' }],
|
|
3695
|
+
// [{ direction: 'rtl' }], // text direction
|
|
3696
|
+
// [{ size: ['small', false, 'large', 'huge'] }], // custom dropdown
|
|
3697
|
+
[{ header: [1, 2, 3, 4, 5, 6, false] }],
|
|
3698
|
+
[{ color: [] }, { background: [] }],
|
|
3699
|
+
// [{ font: [] }],
|
|
3700
|
+
[{ align: [] }],
|
|
3701
|
+
['clean'],
|
|
3702
|
+
['image'], // link and image, video
|
|
3703
|
+
],
|
|
3704
|
+
handlers: {
|
|
3705
|
+
redo() {
|
|
3706
|
+
this['quill'].history.redo();
|
|
3707
|
+
},
|
|
3708
|
+
undo() {
|
|
3709
|
+
this['quill'].history.undo();
|
|
3710
|
+
}
|
|
3711
|
+
}
|
|
3712
|
+
}
|
|
3713
|
+
}
|
|
3714
|
+
}),
|
|
3715
|
+
], DragDropModule,
|
|
3716
|
+
CommonModule,
|
|
3717
|
+
FormsModule,
|
|
3718
|
+
ReactiveFormsModule,
|
|
3719
|
+
RouterModule, CusNgZorroAntdModule,
|
|
3720
|
+
NzResizableModule, PipeModuleModule] });
|
|
3721
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AtrSharedModule, decorators: [{
|
|
3722
|
+
type: NgModule,
|
|
3723
|
+
args: [{
|
|
3724
|
+
imports: [
|
|
3725
|
+
PipeModuleModule,
|
|
3726
|
+
CommonModule,
|
|
3727
|
+
FormsModule,
|
|
3728
|
+
ReactiveFormsModule,
|
|
3729
|
+
RouterModule,
|
|
3730
|
+
// third libs
|
|
3731
|
+
...THIRDMODULES,
|
|
3732
|
+
VgCoreModule,
|
|
3733
|
+
VgControlsModule,
|
|
3734
|
+
VgOverlayPlayModule,
|
|
3735
|
+
VgBufferingModule,
|
|
3736
|
+
DragDropModule,
|
|
3737
|
+
AtrComponentsModule,
|
|
3738
|
+
QuillModule.forRoot({
|
|
3739
|
+
modules: {
|
|
3740
|
+
syntax: false,
|
|
3741
|
+
imageResize: {},
|
|
3742
|
+
toolbar: {
|
|
3743
|
+
container: [
|
|
3744
|
+
['undo', 'redo'],
|
|
3745
|
+
['bold', 'italic', 'underline'],
|
|
3746
|
+
// ['code-block'], // blockquote
|
|
3747
|
+
// [{ header: 1 }, { header: 2 }], // custom button values
|
|
3748
|
+
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
3749
|
+
// [{ script: 'sub' }, { script: 'super' }], // superscript/subscript
|
|
3750
|
+
[{ indent: '-1' }, { indent: '+1' }],
|
|
3751
|
+
// [{ direction: 'rtl' }], // text direction
|
|
3752
|
+
// [{ size: ['small', false, 'large', 'huge'] }], // custom dropdown
|
|
3753
|
+
[{ header: [1, 2, 3, 4, 5, 6, false] }],
|
|
3754
|
+
[{ color: [] }, { background: [] }],
|
|
3755
|
+
// [{ font: [] }],
|
|
3756
|
+
[{ align: [] }],
|
|
3757
|
+
['clean'],
|
|
3758
|
+
['image'], // link and image, video
|
|
3759
|
+
],
|
|
3760
|
+
handlers: {
|
|
3761
|
+
redo() {
|
|
3762
|
+
this['quill'].history.redo();
|
|
3763
|
+
},
|
|
3764
|
+
undo() {
|
|
3765
|
+
this['quill'].history.undo();
|
|
3766
|
+
}
|
|
3767
|
+
}
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
}),
|
|
3771
|
+
],
|
|
3772
|
+
declarations: [
|
|
3773
|
+
// your components
|
|
3774
|
+
...COMPONENTS,
|
|
3775
|
+
],
|
|
3776
|
+
exports: [
|
|
3777
|
+
DragDropModule,
|
|
3778
|
+
CommonModule,
|
|
3779
|
+
FormsModule,
|
|
3780
|
+
ReactiveFormsModule,
|
|
3781
|
+
RouterModule,
|
|
3782
|
+
// third libs
|
|
3783
|
+
...THIRDMODULES,
|
|
3784
|
+
// your components
|
|
3785
|
+
...COMPONENTS,
|
|
3786
|
+
PipeModuleModule
|
|
3787
|
+
],
|
|
3788
|
+
providers: SERVICE_PROVIDES
|
|
3789
|
+
}]
|
|
3790
|
+
}] });
|
|
3791
|
+
|
|
3792
|
+
class BusiService {
|
|
3793
|
+
constructor(drawerService, httpService, modalService, locale, msg) {
|
|
3794
|
+
this.drawerService = drawerService;
|
|
3795
|
+
this.httpService = httpService;
|
|
3796
|
+
this.modalService = modalService;
|
|
3797
|
+
this.locale = locale;
|
|
3798
|
+
this.msg = msg;
|
|
3799
|
+
this.options = ToolsUtil.getHttpOptions();
|
|
3800
|
+
this.allowOpen = true;
|
|
3801
|
+
this.searchDrawerResRef = null;
|
|
3802
|
+
}
|
|
3803
|
+
resetPass(reseturl, param, callBack, content = '是否重置密码', successTitle = '重置密码成功') {
|
|
3804
|
+
let confirmModal = this.modalService.confirm({
|
|
3805
|
+
nzTitle: '重置提醒',
|
|
3806
|
+
nzContent: content,
|
|
3807
|
+
nzOnOk: () => {
|
|
3808
|
+
this.httpService.post(reseturl, param, ToolsUtil.getHttpOptions()).subscribe(result => {
|
|
3809
|
+
confirmModal.destroy();
|
|
3810
|
+
//console.log(result);
|
|
3811
|
+
if (result.status == '201') {
|
|
3812
|
+
let mode = this.modalService.success({
|
|
3813
|
+
nzTitle: successTitle,
|
|
3814
|
+
nzContent: '新密码为:' + result.data.pass
|
|
3815
|
+
});
|
|
3816
|
+
mode.afterClose.subscribe(() => {
|
|
3817
|
+
if (callBack) {
|
|
3818
|
+
callBack();
|
|
3819
|
+
}
|
|
3820
|
+
});
|
|
3821
|
+
}
|
|
3822
|
+
});
|
|
3823
|
+
}
|
|
3824
|
+
});
|
|
3825
|
+
}
|
|
3826
|
+
getCascaderDefultV(dictList, value, index, result) {
|
|
3827
|
+
dictList.forEach((v) => {
|
|
3828
|
+
if (value[index] == v.value) {
|
|
3829
|
+
result.push({
|
|
3830
|
+
value: v.value,
|
|
3831
|
+
label: v.label
|
|
3832
|
+
});
|
|
3833
|
+
if (v.children) {
|
|
3834
|
+
this.getCascaderDefultV(v.children, value, index + 1, result);
|
|
3835
|
+
}
|
|
3836
|
+
return;
|
|
3837
|
+
}
|
|
3838
|
+
});
|
|
3839
|
+
return result;
|
|
3840
|
+
}
|
|
3841
|
+
}
|
|
3842
|
+
BusiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BusiService, deps: [{ token: i1$5.NzDrawerService }, { token: HttpService }, { token: i2$3.NzModalService }, { token: LOCALE_ID }, { token: i2$4.NzMessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3843
|
+
BusiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BusiService, providedIn: 'root' });
|
|
3844
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BusiService, decorators: [{
|
|
3845
|
+
type: Injectable,
|
|
3846
|
+
args: [{
|
|
3847
|
+
providedIn: 'root'
|
|
3848
|
+
}]
|
|
3849
|
+
}], ctorParameters: function () {
|
|
3850
|
+
return [{ type: i1$5.NzDrawerService }, { type: HttpService }, { type: i2$3.NzModalService }, { type: undefined, decorators: [{
|
|
3851
|
+
type: Inject,
|
|
3852
|
+
args: [LOCALE_ID]
|
|
3853
|
+
}] }, { type: i2$4.NzMessageService }];
|
|
3854
|
+
} });
|
|
3855
|
+
|
|
1836
3856
|
/*
|
|
1837
3857
|
* Public API Surface of components
|
|
1838
3858
|
*/
|
|
@@ -1841,5 +3861,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1841
3861
|
* Generated bundle index. Do not edit.
|
|
1842
3862
|
*/
|
|
1843
3863
|
|
|
1844
|
-
export { AtrComponentsModule, AtrErrorImgDirective, AtrReuseStrategy, AtrRoleDirective, AuthGuard, BaseInterceptor, CusNgZorroAntdModule, DayPipe, DefaultValPipe, DictService, DictsPipe, HelloComponent, HelloModule, HqSpinDirective, HttpService, IsEmptyPipe, IsNotEmptyPipe, LocalStorageUtil, MenuService, PipeModuleModule, SafeComputePipe, SessionStorageUtil, ToolsUtil, UploadOssService, UserAction, atr_static_datas, flyIn, scrollScreen, transAnimation };
|
|
3864
|
+
export { AtrComponentsModule, AtrErrorImgDirective, AtrFormComponent, AtrReuseStrategy, AtrRoleDirective, AtrSharedModule, AtrTableComponent, AuthGuard, BaseInterceptor, BusiService, CusNgZorroAntdModule, DayPipe, DefaultValPipe, DictService, DictsPipe, HelloComponent, HelloModule, HqSpinDirective, HttpService, IsEmptyPipe, IsNotEmptyPipe, LocalStorageUtil, LocalUploadComponent, MenuService, PipeModuleModule, QuillEditorComponent, SafeComputePipe, SelectTreeComponent, SessionStorageUtil, ShareService, TableFormItemComponent, TableTdComponent, ToolsUtil, UploadComponent, UploadOssService, UserAction, VideoComponent, atr_static_datas, flyIn, scrollScreen, telphoneValidator, transAnimation };
|
|
1845
3865
|
//# sourceMappingURL=atr-components.mjs.map
|