atr-components 3.0.16 → 3.0.18
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/fesm2022/atr-components.mjs +185 -10
- package/fesm2022/atr-components.mjs.map +1 -1
- package/index.d.ts +35 -14
- package/package.json +1 -1
|
@@ -102,6 +102,8 @@ import { CommonModule, formatDate, registerLocaleData } from '@angular/common';
|
|
|
102
102
|
import { NzSpaceModule } from 'ng-zorro-antd/space';
|
|
103
103
|
import * as i1$3 from 'ng-zorro-antd/image';
|
|
104
104
|
import { NzImageModule } from 'ng-zorro-antd/image';
|
|
105
|
+
import * as i2$2 from '@tinymce/tinymce-angular';
|
|
106
|
+
import { EditorModule } from '@tinymce/tinymce-angular';
|
|
105
107
|
import * as i1 from '@angular/platform-browser';
|
|
106
108
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
107
109
|
import * as i4 from 'ng-zorro-antd/core/transition-patch';
|
|
@@ -2441,9 +2443,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
2441
2443
|
const COMMON_COMPONENT = [];
|
|
2442
2444
|
class AtrComponentsModule {
|
|
2443
2445
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AtrComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2444
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AtrComponentsModule, imports: [
|
|
2446
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AtrComponentsModule, imports: [EditorModule,
|
|
2447
|
+
CommonModule,
|
|
2445
2448
|
PipeModuleModule], exports: [PipeModuleModule] }); }
|
|
2446
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AtrComponentsModule, providers: [HttpService, MenuService, UploadOssService], imports: [
|
|
2449
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AtrComponentsModule, providers: [HttpService, MenuService, UploadOssService], imports: [EditorModule,
|
|
2450
|
+
CommonModule,
|
|
2447
2451
|
PipeModuleModule, PipeModuleModule] }); }
|
|
2448
2452
|
}
|
|
2449
2453
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AtrComponentsModule, decorators: [{
|
|
@@ -2451,6 +2455,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
2451
2455
|
args: [{
|
|
2452
2456
|
declarations: [...COMMON_COMPONENT],
|
|
2453
2457
|
imports: [
|
|
2458
|
+
EditorModule,
|
|
2454
2459
|
CommonModule,
|
|
2455
2460
|
PipeModuleModule,
|
|
2456
2461
|
],
|
|
@@ -4386,6 +4391,172 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
4386
4391
|
type: Input
|
|
4387
4392
|
}] } });
|
|
4388
4393
|
|
|
4394
|
+
class EditorComponent {
|
|
4395
|
+
constructor() {
|
|
4396
|
+
this.apiKey_editor = "r6xv8n00ar72ext02c46958btgzj53kd1223mr6kj8q9gvs6";
|
|
4397
|
+
this.initialized = false;
|
|
4398
|
+
// 合并默认配置
|
|
4399
|
+
this.editorConfig = {
|
|
4400
|
+
...{
|
|
4401
|
+
height: 500,
|
|
4402
|
+
branding: false,
|
|
4403
|
+
statusbar: true,
|
|
4404
|
+
menubar: 'edit insert format tools table help',
|
|
4405
|
+
language: 'zh_CN',
|
|
4406
|
+
language_url: 'assets/lib/tinymce/zh_CN.js',
|
|
4407
|
+
plugins: [
|
|
4408
|
+
'advlist autolink lists link image charmap print preview anchor imagetools',
|
|
4409
|
+
'searchreplace visualblocks code fullscreen',
|
|
4410
|
+
'insertdatetime media table paste code help wordcount'
|
|
4411
|
+
],
|
|
4412
|
+
toolbar: 'undo redo | formatselect | bold italic backcolor | \
|
|
4413
|
+
alignleft aligncenter alignright alignjustify | \
|
|
4414
|
+
bullist numlist outdent indent | image | removeformat | help',
|
|
4415
|
+
// ============ 新增图片相关配置开始 ============
|
|
4416
|
+
// 启用图片高级选项
|
|
4417
|
+
image_advtab: true,
|
|
4418
|
+
// 允许上传图片
|
|
4419
|
+
automatic_uploads: true,
|
|
4420
|
+
// 图片描述
|
|
4421
|
+
image_description: true,
|
|
4422
|
+
// 图片尺寸控制
|
|
4423
|
+
image_dimensions: true,
|
|
4424
|
+
// 图片标题
|
|
4425
|
+
image_title: true,
|
|
4426
|
+
// 图片预览
|
|
4427
|
+
image_prepend_url: '',
|
|
4428
|
+
// 图片上传处理函数
|
|
4429
|
+
images_upload_handler: (blobInfo, progress) => {
|
|
4430
|
+
return new Promise((resolve, reject) => {
|
|
4431
|
+
// 默认使用Base64嵌入(临时方案)
|
|
4432
|
+
const reader = new FileReader();
|
|
4433
|
+
reader.onload = () => {
|
|
4434
|
+
resolve(reader.result);
|
|
4435
|
+
};
|
|
4436
|
+
reader.onerror = () => {
|
|
4437
|
+
reject('图片读取失败');
|
|
4438
|
+
};
|
|
4439
|
+
reader.readAsDataURL(blobInfo.blob());
|
|
4440
|
+
});
|
|
4441
|
+
},
|
|
4442
|
+
// 文件选择器回调(用于选择本地图片)
|
|
4443
|
+
file_picker_callback: (callback, value, meta) => {
|
|
4444
|
+
if (meta.filetype === 'image') {
|
|
4445
|
+
const input = document.createElement('input');
|
|
4446
|
+
input.setAttribute('type', 'file');
|
|
4447
|
+
input.setAttribute('accept', 'image/*');
|
|
4448
|
+
input.onchange = (e) => {
|
|
4449
|
+
const file = e.target.files[0];
|
|
4450
|
+
const reader = new FileReader();
|
|
4451
|
+
reader.onload = () => {
|
|
4452
|
+
// 创建blob缓存
|
|
4453
|
+
const id = 'blobid' + (new Date()).getTime();
|
|
4454
|
+
const blobCache = tinymce.activeEditor.editorUpload.blobCache;
|
|
4455
|
+
const base64 = reader.result.split(',')[1];
|
|
4456
|
+
const blobInfo = blobCache.create(id, file, base64);
|
|
4457
|
+
blobCache.add(blobInfo);
|
|
4458
|
+
// 调用回调
|
|
4459
|
+
callback(blobInfo.blobUri(), { title: file.name });
|
|
4460
|
+
};
|
|
4461
|
+
reader.readAsDataURL(file);
|
|
4462
|
+
};
|
|
4463
|
+
input.click();
|
|
4464
|
+
}
|
|
4465
|
+
},
|
|
4466
|
+
// ============ 新增图片相关配置结束 ============
|
|
4467
|
+
setup: (editor) => {
|
|
4468
|
+
this.editor = editor;
|
|
4469
|
+
editor.on('init', () => {
|
|
4470
|
+
console.log('✅ 编辑器初始化成功!');
|
|
4471
|
+
this.initialized = true;
|
|
4472
|
+
// 设置初始值
|
|
4473
|
+
if (this.value) {
|
|
4474
|
+
editor.setContent(this.value);
|
|
4475
|
+
}
|
|
4476
|
+
setTimeout(() => {
|
|
4477
|
+
// 移除试用提示容器
|
|
4478
|
+
document.querySelector("div.tox-promotion")?.remove();
|
|
4479
|
+
console.log("已尝试移除试用提示");
|
|
4480
|
+
}, 100);
|
|
4481
|
+
});
|
|
4482
|
+
// 监听编辑器内容变化
|
|
4483
|
+
editor.on('change keyup', () => {
|
|
4484
|
+
const content = editor.getContent();
|
|
4485
|
+
this.onEditorChange(content);
|
|
4486
|
+
});
|
|
4487
|
+
}
|
|
4488
|
+
},
|
|
4489
|
+
...this.editorConfig
|
|
4490
|
+
};
|
|
4491
|
+
}
|
|
4492
|
+
ngAfterViewInit() {
|
|
4493
|
+
// 确保 TinyMCE 已加载
|
|
4494
|
+
if (typeof tinymce !== 'undefined' && !this.editor) {
|
|
4495
|
+
// 可以在这里手动初始化编辑器
|
|
4496
|
+
}
|
|
4497
|
+
}
|
|
4498
|
+
writeValue(value) {
|
|
4499
|
+
this.value = value || '';
|
|
4500
|
+
// 如果编辑器已经初始化,更新编辑器内容
|
|
4501
|
+
if (this.editor && this.initialized) {
|
|
4502
|
+
this.editor.setContent(this.value);
|
|
4503
|
+
}
|
|
4504
|
+
}
|
|
4505
|
+
registerOnChange(fn) {
|
|
4506
|
+
this.onChangeListener = fn;
|
|
4507
|
+
}
|
|
4508
|
+
registerOnTouched(fn) {
|
|
4509
|
+
this.onTouchedListener = fn;
|
|
4510
|
+
}
|
|
4511
|
+
setDisabledState(isDisabled) {
|
|
4512
|
+
if (this.editor) {
|
|
4513
|
+
this.editor.setMode(isDisabled ? 'readonly' : 'design');
|
|
4514
|
+
}
|
|
4515
|
+
}
|
|
4516
|
+
// 编辑器内容变化时的处理
|
|
4517
|
+
onEditorChange(content) {
|
|
4518
|
+
this.value = content;
|
|
4519
|
+
// 通知 Angular 表单值已改变
|
|
4520
|
+
if (this.onChangeListener) {
|
|
4521
|
+
this.onChangeListener(content);
|
|
4522
|
+
}
|
|
4523
|
+
if (this.onTouchedListener) {
|
|
4524
|
+
this.onTouchedListener();
|
|
4525
|
+
}
|
|
4526
|
+
}
|
|
4527
|
+
// 组件销毁时清理编辑器
|
|
4528
|
+
ngOnDestroy() {
|
|
4529
|
+
if (this.editor) {
|
|
4530
|
+
this.editor.remove();
|
|
4531
|
+
this.editor = null;
|
|
4532
|
+
}
|
|
4533
|
+
}
|
|
4534
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4535
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: EditorComponent, isStandalone: false, selector: "app-editor", inputs: { apiKey_editor: "apiKey_editor", value: "value", editorConfig: "editorConfig" }, providers: [
|
|
4536
|
+
{
|
|
4537
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4538
|
+
useExisting: forwardRef(() => EditorComponent),
|
|
4539
|
+
multi: true
|
|
4540
|
+
}
|
|
4541
|
+
], ngImport: i0, template: "<editor\r\n [init]=\"editorConfig\"\r\n [(ngModel)]=\"value\"\r\n [apiKey]=\"apiKey_editor\"\r\n name=\"editor\"\r\n (onChange)=\"onEditorChange($event)\"\r\n></editor>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$2.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "licenseKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "readonly", "disabled"] }] }); }
|
|
4542
|
+
}
|
|
4543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EditorComponent, decorators: [{
|
|
4544
|
+
type: Component,
|
|
4545
|
+
args: [{ selector: 'app-editor', standalone: false, providers: [
|
|
4546
|
+
{
|
|
4547
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4548
|
+
useExisting: forwardRef(() => EditorComponent),
|
|
4549
|
+
multi: true
|
|
4550
|
+
}
|
|
4551
|
+
], template: "<editor\r\n [init]=\"editorConfig\"\r\n [(ngModel)]=\"value\"\r\n [apiKey]=\"apiKey_editor\"\r\n name=\"editor\"\r\n (onChange)=\"onEditorChange($event)\"\r\n></editor>\r\n" }]
|
|
4552
|
+
}], ctorParameters: () => [], propDecorators: { apiKey_editor: [{
|
|
4553
|
+
type: Input
|
|
4554
|
+
}], value: [{
|
|
4555
|
+
type: Input
|
|
4556
|
+
}], editorConfig: [{
|
|
4557
|
+
type: Input
|
|
4558
|
+
}] } });
|
|
4559
|
+
|
|
4389
4560
|
class AtrFormComponent {
|
|
4390
4561
|
// tslint:disable-next-line:max-line-length
|
|
4391
4562
|
constructor(shareService, httpService, fb, dictService, injector, locale) {
|
|
@@ -4954,11 +5125,11 @@ class AtrFormComponent {
|
|
|
4954
5125
|
return false;
|
|
4955
5126
|
}
|
|
4956
5127
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AtrFormComponent, deps: [{ token: ShareService }, { token: HttpService }, { token: i3.UntypedFormBuilder }, { token: DictService }, { token: i0.Injector }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4957
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AtrFormComponent, isStandalone: false, selector: "atr-form", inputs: { formOpts: "formOpts", viewTitle: "viewTitle" }, outputs: { formAction: "formAction", uploadAction: "uploadAction" }, ngImport: i0, template: "<atr-view-form *ngIf=\"formOpts.type == 'view'\" [dicts]=\"dicts\" [atrForm]=\"atrForm\" [title]=\"viewTitle\"\r\n [formOpts]=\"formOpts\"></atr-view-form>\r\n\r\n<form nz-form [formGroup]=\"atrForm\" *ngIf=\"formOpts.type != 'view'\">\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 <ng-content *ngTemplateOutlet=\"item.firstTemp\"></ng-content>\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 <div style=\"display: flex;width: 100%\">\r\n <nz-tree-select *ngIf=\"item.type == 'treeSelect' && item.treeList\"\r\n [nzNodes]=\"item.treeList\"\r\n [nzDefaultExpandAll]=\"item.expandAll\"\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 (ngModelChange)=\"formChange($event,item)\"\r\n nzVirtualHeight=\"330px\"\r\n style=\"flex: 1\"\r\n >\r\n </nz-tree-select>\r\n <nz-color-picker *ngIf=\"item.type == 'color'\" [formControlName]=\"item.key\" (ngModelChange)=\"formChange($event,item)\"\r\n [nzDisabled]=\"item.readonly\"></nz-color-picker>\r\n <!-- <nz-tree-select *ngIf=\"item.type == 'treeSelect'\"\r\n [nzAllowClear]=\"!item.notNull\"\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 [nzMultiple]=\"item.selectUrl.isMultiple\"\r\n [nzDisabled]=\"item.readonly\" style=\"flex: 1\"\r\n >\r\n </nz-tree-select> -->\r\n <app-select-icons *ngIf=\"item.type == 'selectIcon'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n [readonly]=\"item.readonly \"\r\n style=\"flex: 1\"\r\n [formControlName]=\"item.key\">\r\n </app-select-icons>\r\n <input *ngIf=\"item.type == 'text'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [readonly]=\"item.readonly || formOpts.type == 'view'\"\r\n [formControlName]=\"item.key\"/>\r\n <nz-switch *ngIf=\"item.type == 'switch'\" [formControlName]=\"item.key\"\r\n [nzDisabled]=\"item.readonly || formOpts.type == 'view'\"\r\n (ngModelChange)=\"formChange($event,item)\" [nzCheckedChildren]=\"item.nzCheckedChildren\"\r\n [nzUnCheckedChildren]=\"item.nzUnCheckedChildren\"></nz-switch>\r\n\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 (ngModelChange)=\"formChange($event,item)\"\r\n [nzFormatter]=\"item.dateFormat || defNumFormat\"\r\n [nzStep]=\"item.nzStep || 1\" [nzPrecision]=\"item.nzPrecision || 0\"\r\n [nzMin]=\"item.minNumber\" [nzMax]=\"item.maxNumber\"\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-checkbox-wrapper *ngIf=\"item.type == 'checkbox'\" [formControlName]=\"item.key\">\r\n <div nz-row>\r\n <div *ngFor=\"let o of item.dictList\" nz-col>\r\n <label nz-checkbox [nzValue]=\"o.value\">{{o.label}}</label></div>\r\n </div>\r\n </nz-checkbox-wrapper>\r\n <nz-select\r\n [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'select'\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n nzServerSearch\r\n [nzMode]=\"item.nzMode || 'default'\"\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 [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'selectc'\"\r\n nzShowSearch\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzMode]=\"item.nzMode || 'default'\"\r\n [nzDisabled]=\"item.readonly|| formOpts.type == 'view'\"\r\n (ngModelChange)=\"selectChange($event,item)\"\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]=\"item.valueProperty\"\r\n [nzShowSearch]=\"true\" *ngIf=\"item.type == 'cascader'\"\r\n [nzChangeOnSelect]=\"item.allowSelectNode\"\r\n [nzOptions]=\"item.dictList\" [formControlName]=\"item.key\"></nz-cascader>\r\n <ng-container *ngIf=\"item.type == 'date'\">\r\n <nz-date-picker *ngIf=\"!item.dateMode\" [nzFormat]=\"item.dateFormat ? item.dateFormat : 'yyyy-MM-dd'\"\r\n [nzShowTime]=\"showTime(item)\" style=\"flex: 1\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n <nz-date-picker *ngIf=\"item.dateMode\"\r\n style=\"flex: 1\"\r\n [nzMode]=\"item.dateMode\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n </ng-container>\r\n\r\n <nz-range-picker *ngIf=\"item.type == 'dateRange'\" style=\"flex: 1\"\r\n [nzShowTime]=\"item.nzShowTime? item.nzShowTime : false\"\r\n [formControlName]=\"item.key\"\r\n [nzFormat]=\"item.nzShowTime && item.nzShowTime.nzFormat ? ('yyyy-MM-dd '+ item.nzShowTime.nzFormat) : 'yyyy-MM-dd'\"\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 (onBeforeUpload)=\"onBeforeUpload($event,item)\"\r\n (afterChange)=\"imageUploadChange($event)\"></atr-img-upload>\r\n <div *ngIf=\"item.type == 'editor'\">\u5BCC\u6587\u672C\u6682\u4E0D\u652F\u6301</div>\r\n\r\n <div *ngIf=\"item.type == 'word'\" [innerHTML]=\"item.value |defVal:item.defaultValue |safeHtml\">\r\n </div>\r\n <div *ngIf=\"item.type == 'buttons'\">\r\n <ng-container *ngFor=\"let btn of item.buttons\">\r\n <button nz-button type=\"button\" [nzType]=\"btn.btnType |defVal: 'default'\"\r\n class=\"ant-btn ant-btn-primary\"\r\n style=\"margin-right: 5px\" *ngIf=\"btn.isShow || isShow(false,btn.operator)\"\r\n (click)=\"doAction(btn,$event)\">\r\n <span>{{btn.name}}</span></button>\r\n </ng-container>\r\n </div>\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 <button nz-button nzType=\"default\" style=\"cursor: default;background-color: #fafafa;color: black\"\r\n *ngIf=\"item.ends\" disabled>\r\n {{item.ends}}\r\n </button>\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 </div>\r\n <div *ngIf=\"item.proposal\" style=\"color: red;width: 100%\">{{item.proposal}}</div>\r\n </nz-form-control>\r\n </nz-form-item>\r\n <ng-content *ngTemplateOutlet=\"item.temp\"></ng-content>\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"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6$3.NzColorPickerComponent, selector: "nz-color-picker", inputs: ["nzFormat", "nzValue", "nzSize", "nzDefaultValue", "nzTrigger", "nzTitle", "nzFlipFlop", "nzShowText", "nzOpen", "nzAllowClear", "nzDisabled", "nzDisabledAlpha"], outputs: ["nzOnChange", "nzOnFormatChange", "nzOnClear", "nzOnOpenChange"], exportAs: ["nzColorPicker"] }, { kind: "component", type: i3$1.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i5$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "component", type: i4$1.NzCascaderComponent, selector: "nz-cascader, [nz-cascader]", inputs: ["nzOpen", "nzOptions", "nzOptionRender", "nzShowInput", "nzShowArrow", "nzAllowClear", "nzAutoFocus", "nzChangeOnSelect", "nzDisabled", "nzColumnClassName", "nzExpandTrigger", "nzValueProperty", "nzLabelProperty", "nzLabelRender", "nzVariant", "nzNotFoundContent", "nzSize", "nzBackdrop", "nzShowSearch", "nzPlaceHolder", "nzMenuClassName", "nzMenuStyle", "nzMouseLeaveDelay", "nzMouseEnterDelay", "nzStatus", "nzMultiple", "nzMaxTagCount", "nzPlacement", "nzTriggerAction", "nzChangeOn", "nzLoadData", "nzDisplayWith", "nzPrefix", "nzSuffixIcon", "nzExpandIcon"], outputs: ["nzVisibleChange", "nzSelectionChange", "nzRemoved", "nzClear"], exportAs: ["nzCascader"] }, { kind: "component", type: i6$2.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "component", type: i6$2.NzCheckboxWrapperComponent, selector: "nz-checkbox-wrapper", outputs: ["nzOnChange"], exportAs: ["nzCheckboxWrapper"] }, { kind: "component", type: i5.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i5.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }, { kind: "directive", type: i6.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"] }, { kind: "directive", type: i6.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i14.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap", "nzRequiredMark"], exportAs: ["nzForm"] }, { kind: "component", type: i14.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i14.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i14.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: i9.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled", "readonly"], exportAs: ["nzInput"] }, { kind: "component", type: i16.NzInputNumberLegacyComponent, 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"] }, { kind: "component", type: i17.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i17.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "component", type: i10.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i10.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzPrefix", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }, { kind: "component", type: i9$1.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "component", type: i11.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", "nzVariant", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzPlacement", "nzExpandedKeys", "nzPrefix", "nzSuffixIcon", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckboxChange"], exportAs: ["nzTreeSelect"] }, { kind: "component", type: UploadComponent, selector: "atr-img-upload", inputs: ["opts", "isEdit", "allowChangSeq", "showUploadList"], outputs: ["afterChange", "optsChange", "onBeforeUpload"] }, { kind: "component", type: SelectIconsComponent, selector: "app-select-icons", inputs: ["readonly", "placeholder"] }, { kind: "component", type: ViewFormComponent, selector: "atr-view-form", inputs: ["formOpts", "atrForm", "dicts", "title", "items"] }, { kind: "pipe", type: DefaultValPipe, name: "defVal" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] }); }
|
|
5128
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AtrFormComponent, isStandalone: false, selector: "atr-form", inputs: { formOpts: "formOpts", viewTitle: "viewTitle" }, outputs: { formAction: "formAction", uploadAction: "uploadAction" }, ngImport: i0, template: "<atr-view-form *ngIf=\"formOpts.type == 'view'\" [dicts]=\"dicts\" [atrForm]=\"atrForm\" [title]=\"viewTitle\"\r\n [formOpts]=\"formOpts\"></atr-view-form>\r\n\r\n<form nz-form [formGroup]=\"atrForm\" *ngIf=\"formOpts.type != 'view'\">\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 <ng-content *ngTemplateOutlet=\"item.firstTemp\"></ng-content>\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 <div style=\"display: flex;width: 100%\">\r\n <nz-tree-select *ngIf=\"item.type == 'treeSelect' && item.treeList\"\r\n [nzNodes]=\"item.treeList\"\r\n [nzDefaultExpandAll]=\"item.expandAll\"\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 (ngModelChange)=\"formChange($event,item)\"\r\n nzVirtualHeight=\"330px\"\r\n style=\"flex: 1\"\r\n >\r\n </nz-tree-select>\r\n <nz-color-picker *ngIf=\"item.type == 'color'\" [formControlName]=\"item.key\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [nzDisabled]=\"item.readonly\"></nz-color-picker>\r\n <!-- <nz-tree-select *ngIf=\"item.type == 'treeSelect'\"\r\n [nzAllowClear]=\"!item.notNull\"\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 [nzMultiple]=\"item.selectUrl.isMultiple\"\r\n [nzDisabled]=\"item.readonly\" style=\"flex: 1\"\r\n >\r\n </nz-tree-select> -->\r\n <app-select-icons *ngIf=\"item.type == 'selectIcon'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n [readonly]=\"item.readonly \"\r\n style=\"flex: 1\"\r\n [formControlName]=\"item.key\">\r\n </app-select-icons>\r\n <input *ngIf=\"item.type == 'text'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [readonly]=\"item.readonly || formOpts.type == 'view'\"\r\n [formControlName]=\"item.key\"/>\r\n <nz-switch *ngIf=\"item.type == 'switch'\" [formControlName]=\"item.key\"\r\n [nzDisabled]=\"item.readonly || formOpts.type == 'view'\"\r\n (ngModelChange)=\"formChange($event,item)\" [nzCheckedChildren]=\"item.nzCheckedChildren\"\r\n [nzUnCheckedChildren]=\"item.nzUnCheckedChildren\"></nz-switch>\r\n\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 (ngModelChange)=\"formChange($event,item)\"\r\n [nzFormatter]=\"item.dateFormat || defNumFormat\"\r\n [nzStep]=\"item.nzStep || 1\" [nzPrecision]=\"item.nzPrecision || 0\"\r\n [nzMin]=\"item.minNumber\" [nzMax]=\"item.maxNumber\"\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-checkbox-wrapper *ngIf=\"item.type == 'checkbox'\" [formControlName]=\"item.key\">\r\n <div nz-row>\r\n <div *ngFor=\"let o of item.dictList\" nz-col>\r\n <label nz-checkbox [nzValue]=\"o.value\">{{o.label}}</label></div>\r\n </div>\r\n </nz-checkbox-wrapper>\r\n <nz-select\r\n [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'select'\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n nzServerSearch\r\n [nzMode]=\"item.nzMode || 'default'\"\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 [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'selectc'\"\r\n nzShowSearch\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzMode]=\"item.nzMode || 'default'\"\r\n [nzDisabled]=\"item.readonly|| formOpts.type == 'view'\"\r\n (ngModelChange)=\"selectChange($event,item)\"\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]=\"item.valueProperty\"\r\n [nzShowSearch]=\"true\" *ngIf=\"item.type == 'cascader'\"\r\n [nzChangeOnSelect]=\"item.allowSelectNode\"\r\n [nzOptions]=\"item.dictList\" [formControlName]=\"item.key\"></nz-cascader>\r\n <ng-container *ngIf=\"item.type == 'date'\">\r\n <nz-date-picker *ngIf=\"!item.dateMode\" [nzFormat]=\"item.dateFormat ? item.dateFormat : 'yyyy-MM-dd'\"\r\n [nzShowTime]=\"showTime(item)\" style=\"flex: 1\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n <nz-date-picker *ngIf=\"item.dateMode\"\r\n style=\"flex: 1\"\r\n [nzMode]=\"item.dateMode\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n </ng-container>\r\n\r\n <nz-range-picker *ngIf=\"item.type == 'dateRange'\" style=\"flex: 1\"\r\n [nzShowTime]=\"item.nzShowTime? item.nzShowTime : false\"\r\n [formControlName]=\"item.key\"\r\n [nzFormat]=\"item.nzShowTime && item.nzShowTime.nzFormat ? ('yyyy-MM-dd '+ item.nzShowTime.nzFormat) : 'yyyy-MM-dd'\"\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 (onBeforeUpload)=\"onBeforeUpload($event,item)\"\r\n (afterChange)=\"imageUploadChange($event)\"></atr-img-upload>\r\n <div *ngIf=\"item.type == 'editor'\">\r\n <app-editor style=\"flex: 1\" [formControlName]=\"item.key\"></app-editor>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"item.type == 'word'\" [innerHTML]=\"item.value |defVal:item.defaultValue |safeHtml\">\r\n </div>\r\n <div *ngIf=\"item.type == 'buttons'\">\r\n <ng-container *ngFor=\"let btn of item.buttons\">\r\n <button nz-button type=\"button\" [nzType]=\"btn.btnType |defVal: 'default'\"\r\n class=\"ant-btn ant-btn-primary\"\r\n style=\"margin-right: 5px\" *ngIf=\"btn.isShow || isShow(false,btn.operator)\"\r\n (click)=\"doAction(btn,$event)\">\r\n <span>{{btn.name}}</span></button>\r\n </ng-container>\r\n </div>\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 <button nz-button nzType=\"default\" style=\"cursor: default;background-color: #fafafa;color: black\"\r\n *ngIf=\"item.ends\" disabled>\r\n {{item.ends}}\r\n </button>\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 </div>\r\n <div *ngIf=\"item.proposal\" style=\"color: red;width: 100%\">{{item.proposal}}</div>\r\n </nz-form-control>\r\n </nz-form-item>\r\n <ng-content *ngTemplateOutlet=\"item.temp\"></ng-content>\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"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6$3.NzColorPickerComponent, selector: "nz-color-picker", inputs: ["nzFormat", "nzValue", "nzSize", "nzDefaultValue", "nzTrigger", "nzTitle", "nzFlipFlop", "nzShowText", "nzOpen", "nzAllowClear", "nzDisabled", "nzDisabledAlpha"], outputs: ["nzOnChange", "nzOnFormatChange", "nzOnClear", "nzOnOpenChange"], exportAs: ["nzColorPicker"] }, { kind: "component", type: i3$1.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i5$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "component", type: i4$1.NzCascaderComponent, selector: "nz-cascader, [nz-cascader]", inputs: ["nzOpen", "nzOptions", "nzOptionRender", "nzShowInput", "nzShowArrow", "nzAllowClear", "nzAutoFocus", "nzChangeOnSelect", "nzDisabled", "nzColumnClassName", "nzExpandTrigger", "nzValueProperty", "nzLabelProperty", "nzLabelRender", "nzVariant", "nzNotFoundContent", "nzSize", "nzBackdrop", "nzShowSearch", "nzPlaceHolder", "nzMenuClassName", "nzMenuStyle", "nzMouseLeaveDelay", "nzMouseEnterDelay", "nzStatus", "nzMultiple", "nzMaxTagCount", "nzPlacement", "nzTriggerAction", "nzChangeOn", "nzLoadData", "nzDisplayWith", "nzPrefix", "nzSuffixIcon", "nzExpandIcon"], outputs: ["nzVisibleChange", "nzSelectionChange", "nzRemoved", "nzClear"], exportAs: ["nzCascader"] }, { kind: "component", type: i6$2.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "component", type: i6$2.NzCheckboxWrapperComponent, selector: "nz-checkbox-wrapper", outputs: ["nzOnChange"], exportAs: ["nzCheckboxWrapper"] }, { kind: "component", type: i5.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i5.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }, { kind: "directive", type: i6.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"] }, { kind: "directive", type: i6.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i14.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap", "nzRequiredMark"], exportAs: ["nzForm"] }, { kind: "component", type: i14.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i14.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i14.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: i9.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled", "readonly"], exportAs: ["nzInput"] }, { kind: "component", type: i16.NzInputNumberLegacyComponent, 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"] }, { kind: "component", type: i17.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i17.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "component", type: i10.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i10.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzPrefix", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }, { kind: "component", type: i9$1.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "component", type: i11.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", "nzVariant", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzPlacement", "nzExpandedKeys", "nzPrefix", "nzSuffixIcon", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckboxChange"], exportAs: ["nzTreeSelect"] }, { kind: "component", type: UploadComponent, selector: "atr-img-upload", inputs: ["opts", "isEdit", "allowChangSeq", "showUploadList"], outputs: ["afterChange", "optsChange", "onBeforeUpload"] }, { kind: "component", type: SelectIconsComponent, selector: "app-select-icons", inputs: ["readonly", "placeholder"] }, { kind: "component", type: ViewFormComponent, selector: "atr-view-form", inputs: ["formOpts", "atrForm", "dicts", "title", "items"] }, { kind: "component", type: EditorComponent, selector: "app-editor", inputs: ["apiKey_editor", "value", "editorConfig"] }, { kind: "pipe", type: DefaultValPipe, name: "defVal" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] }); }
|
|
4958
5129
|
}
|
|
4959
5130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AtrFormComponent, decorators: [{
|
|
4960
5131
|
type: Component,
|
|
4961
|
-
args: [{ standalone: false, selector: 'atr-form', template: "<atr-view-form *ngIf=\"formOpts.type == 'view'\" [dicts]=\"dicts\" [atrForm]=\"atrForm\" [title]=\"viewTitle\"\r\n [formOpts]=\"formOpts\"></atr-view-form>\r\n\r\n<form nz-form [formGroup]=\"atrForm\" *ngIf=\"formOpts.type != 'view'\">\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 <ng-content *ngTemplateOutlet=\"item.firstTemp\"></ng-content>\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 <div style=\"display: flex;width: 100%\">\r\n <nz-tree-select *ngIf=\"item.type == 'treeSelect' && item.treeList\"\r\n [nzNodes]=\"item.treeList\"\r\n [nzDefaultExpandAll]=\"item.expandAll\"\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 (ngModelChange)=\"formChange($event,item)\"\r\n nzVirtualHeight=\"330px\"\r\n style=\"flex: 1\"\r\n >\r\n </nz-tree-select>\r\n <nz-color-picker *ngIf=\"item.type == 'color'\" [formControlName]=\"item.key\" (ngModelChange)=\"formChange($event,item)\"\r\n [nzDisabled]=\"item.readonly\"></nz-color-picker>\r\n <!-- <nz-tree-select *ngIf=\"item.type == 'treeSelect'\"\r\n [nzAllowClear]=\"!item.notNull\"\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 [nzMultiple]=\"item.selectUrl.isMultiple\"\r\n [nzDisabled]=\"item.readonly\" style=\"flex: 1\"\r\n >\r\n </nz-tree-select> -->\r\n <app-select-icons *ngIf=\"item.type == 'selectIcon'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n [readonly]=\"item.readonly \"\r\n style=\"flex: 1\"\r\n [formControlName]=\"item.key\">\r\n </app-select-icons>\r\n <input *ngIf=\"item.type == 'text'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [readonly]=\"item.readonly || formOpts.type == 'view'\"\r\n [formControlName]=\"item.key\"/>\r\n <nz-switch *ngIf=\"item.type == 'switch'\" [formControlName]=\"item.key\"\r\n [nzDisabled]=\"item.readonly || formOpts.type == 'view'\"\r\n (ngModelChange)=\"formChange($event,item)\" [nzCheckedChildren]=\"item.nzCheckedChildren\"\r\n [nzUnCheckedChildren]=\"item.nzUnCheckedChildren\"></nz-switch>\r\n\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 (ngModelChange)=\"formChange($event,item)\"\r\n [nzFormatter]=\"item.dateFormat || defNumFormat\"\r\n [nzStep]=\"item.nzStep || 1\" [nzPrecision]=\"item.nzPrecision || 0\"\r\n [nzMin]=\"item.minNumber\" [nzMax]=\"item.maxNumber\"\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-checkbox-wrapper *ngIf=\"item.type == 'checkbox'\" [formControlName]=\"item.key\">\r\n <div nz-row>\r\n <div *ngFor=\"let o of item.dictList\" nz-col>\r\n <label nz-checkbox [nzValue]=\"o.value\">{{o.label}}</label></div>\r\n </div>\r\n </nz-checkbox-wrapper>\r\n <nz-select\r\n [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'select'\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n nzServerSearch\r\n [nzMode]=\"item.nzMode || 'default'\"\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 [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'selectc'\"\r\n nzShowSearch\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzMode]=\"item.nzMode || 'default'\"\r\n [nzDisabled]=\"item.readonly|| formOpts.type == 'view'\"\r\n (ngModelChange)=\"selectChange($event,item)\"\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]=\"item.valueProperty\"\r\n [nzShowSearch]=\"true\" *ngIf=\"item.type == 'cascader'\"\r\n [nzChangeOnSelect]=\"item.allowSelectNode\"\r\n [nzOptions]=\"item.dictList\" [formControlName]=\"item.key\"></nz-cascader>\r\n <ng-container *ngIf=\"item.type == 'date'\">\r\n <nz-date-picker *ngIf=\"!item.dateMode\" [nzFormat]=\"item.dateFormat ? item.dateFormat : 'yyyy-MM-dd'\"\r\n [nzShowTime]=\"showTime(item)\" style=\"flex: 1\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n <nz-date-picker *ngIf=\"item.dateMode\"\r\n style=\"flex: 1\"\r\n [nzMode]=\"item.dateMode\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n </ng-container>\r\n\r\n <nz-range-picker *ngIf=\"item.type == 'dateRange'\" style=\"flex: 1\"\r\n [nzShowTime]=\"item.nzShowTime? item.nzShowTime : false\"\r\n [formControlName]=\"item.key\"\r\n [nzFormat]=\"item.nzShowTime && item.nzShowTime.nzFormat ? ('yyyy-MM-dd '+ item.nzShowTime.nzFormat) : 'yyyy-MM-dd'\"\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 (onBeforeUpload)=\"onBeforeUpload($event,item)\"\r\n (afterChange)=\"imageUploadChange($event)\"></atr-img-upload>\r\n <div *ngIf=\"item.type == 'editor'\">\u5BCC\u6587\u672C\u6682\u4E0D\u652F\u6301</div>\r\n\r\n <div *ngIf=\"item.type == 'word'\" [innerHTML]=\"item.value |defVal:item.defaultValue |safeHtml\">\r\n </div>\r\n <div *ngIf=\"item.type == 'buttons'\">\r\n <ng-container *ngFor=\"let btn of item.buttons\">\r\n <button nz-button type=\"button\" [nzType]=\"btn.btnType |defVal: 'default'\"\r\n class=\"ant-btn ant-btn-primary\"\r\n style=\"margin-right: 5px\" *ngIf=\"btn.isShow || isShow(false,btn.operator)\"\r\n (click)=\"doAction(btn,$event)\">\r\n <span>{{btn.name}}</span></button>\r\n </ng-container>\r\n </div>\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 <button nz-button nzType=\"default\" style=\"cursor: default;background-color: #fafafa;color: black\"\r\n *ngIf=\"item.ends\" disabled>\r\n {{item.ends}}\r\n </button>\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 </div>\r\n <div *ngIf=\"item.proposal\" style=\"color: red;width: 100%\">{{item.proposal}}</div>\r\n </nz-form-control>\r\n </nz-form-item>\r\n <ng-content *ngTemplateOutlet=\"item.temp\"></ng-content>\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"] }]
|
|
5132
|
+
args: [{ standalone: false, selector: 'atr-form', template: "<atr-view-form *ngIf=\"formOpts.type == 'view'\" [dicts]=\"dicts\" [atrForm]=\"atrForm\" [title]=\"viewTitle\"\r\n [formOpts]=\"formOpts\"></atr-view-form>\r\n\r\n<form nz-form [formGroup]=\"atrForm\" *ngIf=\"formOpts.type != 'view'\">\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 <ng-content *ngTemplateOutlet=\"item.firstTemp\"></ng-content>\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 <div style=\"display: flex;width: 100%\">\r\n <nz-tree-select *ngIf=\"item.type == 'treeSelect' && item.treeList\"\r\n [nzNodes]=\"item.treeList\"\r\n [nzDefaultExpandAll]=\"item.expandAll\"\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 (ngModelChange)=\"formChange($event,item)\"\r\n nzVirtualHeight=\"330px\"\r\n style=\"flex: 1\"\r\n >\r\n </nz-tree-select>\r\n <nz-color-picker *ngIf=\"item.type == 'color'\" [formControlName]=\"item.key\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [nzDisabled]=\"item.readonly\"></nz-color-picker>\r\n <!-- <nz-tree-select *ngIf=\"item.type == 'treeSelect'\"\r\n [nzAllowClear]=\"!item.notNull\"\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 [nzMultiple]=\"item.selectUrl.isMultiple\"\r\n [nzDisabled]=\"item.readonly\" style=\"flex: 1\"\r\n >\r\n </nz-tree-select> -->\r\n <app-select-icons *ngIf=\"item.type == 'selectIcon'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n [readonly]=\"item.readonly \"\r\n style=\"flex: 1\"\r\n [formControlName]=\"item.key\">\r\n </app-select-icons>\r\n <input *ngIf=\"item.type == 'text'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [readonly]=\"item.readonly || formOpts.type == 'view'\"\r\n [formControlName]=\"item.key\"/>\r\n <nz-switch *ngIf=\"item.type == 'switch'\" [formControlName]=\"item.key\"\r\n [nzDisabled]=\"item.readonly || formOpts.type == 'view'\"\r\n (ngModelChange)=\"formChange($event,item)\" [nzCheckedChildren]=\"item.nzCheckedChildren\"\r\n [nzUnCheckedChildren]=\"item.nzUnCheckedChildren\"></nz-switch>\r\n\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 (ngModelChange)=\"formChange($event,item)\"\r\n [nzFormatter]=\"item.dateFormat || defNumFormat\"\r\n [nzStep]=\"item.nzStep || 1\" [nzPrecision]=\"item.nzPrecision || 0\"\r\n [nzMin]=\"item.minNumber\" [nzMax]=\"item.maxNumber\"\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-checkbox-wrapper *ngIf=\"item.type == 'checkbox'\" [formControlName]=\"item.key\">\r\n <div nz-row>\r\n <div *ngFor=\"let o of item.dictList\" nz-col>\r\n <label nz-checkbox [nzValue]=\"o.value\">{{o.label}}</label></div>\r\n </div>\r\n </nz-checkbox-wrapper>\r\n <nz-select\r\n [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'select'\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n nzServerSearch\r\n [nzMode]=\"item.nzMode || 'default'\"\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 [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'selectc'\"\r\n nzShowSearch\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzMode]=\"item.nzMode || 'default'\"\r\n [nzDisabled]=\"item.readonly|| formOpts.type == 'view'\"\r\n (ngModelChange)=\"selectChange($event,item)\"\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]=\"item.valueProperty\"\r\n [nzShowSearch]=\"true\" *ngIf=\"item.type == 'cascader'\"\r\n [nzChangeOnSelect]=\"item.allowSelectNode\"\r\n [nzOptions]=\"item.dictList\" [formControlName]=\"item.key\"></nz-cascader>\r\n <ng-container *ngIf=\"item.type == 'date'\">\r\n <nz-date-picker *ngIf=\"!item.dateMode\" [nzFormat]=\"item.dateFormat ? item.dateFormat : 'yyyy-MM-dd'\"\r\n [nzShowTime]=\"showTime(item)\" style=\"flex: 1\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n <nz-date-picker *ngIf=\"item.dateMode\"\r\n style=\"flex: 1\"\r\n [nzMode]=\"item.dateMode\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n </ng-container>\r\n\r\n <nz-range-picker *ngIf=\"item.type == 'dateRange'\" style=\"flex: 1\"\r\n [nzShowTime]=\"item.nzShowTime? item.nzShowTime : false\"\r\n [formControlName]=\"item.key\"\r\n [nzFormat]=\"item.nzShowTime && item.nzShowTime.nzFormat ? ('yyyy-MM-dd '+ item.nzShowTime.nzFormat) : 'yyyy-MM-dd'\"\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 (onBeforeUpload)=\"onBeforeUpload($event,item)\"\r\n (afterChange)=\"imageUploadChange($event)\"></atr-img-upload>\r\n <div *ngIf=\"item.type == 'editor'\">\r\n <app-editor style=\"flex: 1\" [formControlName]=\"item.key\"></app-editor>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"item.type == 'word'\" [innerHTML]=\"item.value |defVal:item.defaultValue |safeHtml\">\r\n </div>\r\n <div *ngIf=\"item.type == 'buttons'\">\r\n <ng-container *ngFor=\"let btn of item.buttons\">\r\n <button nz-button type=\"button\" [nzType]=\"btn.btnType |defVal: 'default'\"\r\n class=\"ant-btn ant-btn-primary\"\r\n style=\"margin-right: 5px\" *ngIf=\"btn.isShow || isShow(false,btn.operator)\"\r\n (click)=\"doAction(btn,$event)\">\r\n <span>{{btn.name}}</span></button>\r\n </ng-container>\r\n </div>\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 <button nz-button nzType=\"default\" style=\"cursor: default;background-color: #fafafa;color: black\"\r\n *ngIf=\"item.ends\" disabled>\r\n {{item.ends}}\r\n </button>\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 </div>\r\n <div *ngIf=\"item.proposal\" style=\"color: red;width: 100%\">{{item.proposal}}</div>\r\n </nz-form-control>\r\n </nz-form-item>\r\n <ng-content *ngTemplateOutlet=\"item.temp\"></ng-content>\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"] }]
|
|
4962
5133
|
}], ctorParameters: () => [{ type: ShareService }, { type: HttpService }, { type: i3.UntypedFormBuilder }, { type: DictService }, { type: i0.Injector }, { type: undefined, decorators: [{
|
|
4963
5134
|
type: Inject,
|
|
4964
5135
|
args: [LOCALE_ID]
|
|
@@ -5233,7 +5404,8 @@ registerLocaleData(zh);
|
|
|
5233
5404
|
// #endregion
|
|
5234
5405
|
// #region your componets & directives
|
|
5235
5406
|
const COMPONENTS = [ImgCanvasComponent, TableFormItemComponent, TableTdComponent, AtrTableComponent, UploadComponent, AtrFormComponent, LocalUploadComponent,
|
|
5236
|
-
SelectTreeComponent, VideoComponent, SelectIconsComponent, EchartsComponent, ViewFormComponent
|
|
5407
|
+
SelectTreeComponent, VideoComponent, SelectIconsComponent, EchartsComponent, ViewFormComponent, EditorComponent
|
|
5408
|
+
];
|
|
5237
5409
|
const DIRECTIVES = [AtrRoleDirective, AtrErrorImgDirective, HqSpinDirective, DebounceClickDirective, InfiniteScrollDirective];
|
|
5238
5410
|
//SharedModule
|
|
5239
5411
|
// 应 包含定义:
|
|
@@ -5243,7 +5415,7 @@ const DIRECTIVES = [AtrRoleDirective, AtrErrorImgDirective, HqSpinDirective, Deb
|
|
|
5243
5415
|
class AtrSharedModule {
|
|
5244
5416
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AtrSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5245
5417
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AtrSharedModule, declarations: [ImgCanvasComponent, TableFormItemComponent, TableTdComponent, AtrTableComponent, UploadComponent, AtrFormComponent, LocalUploadComponent,
|
|
5246
|
-
SelectTreeComponent, VideoComponent, SelectIconsComponent, EchartsComponent, ViewFormComponent], imports: [PipeModuleModule,
|
|
5418
|
+
SelectTreeComponent, VideoComponent, SelectIconsComponent, EchartsComponent, ViewFormComponent, EditorComponent], imports: [PipeModuleModule,
|
|
5247
5419
|
CommonModule,
|
|
5248
5420
|
FormsModule,
|
|
5249
5421
|
ReactiveFormsModule,
|
|
@@ -5254,14 +5426,15 @@ class AtrSharedModule {
|
|
|
5254
5426
|
VgOverlayPlayModule,
|
|
5255
5427
|
VgBufferingModule,
|
|
5256
5428
|
DragDropModule,
|
|
5257
|
-
AtrComponentsModule, AtrRoleDirective, AtrErrorImgDirective, HqSpinDirective, DebounceClickDirective, InfiniteScrollDirective, NzModalModule
|
|
5429
|
+
AtrComponentsModule, AtrRoleDirective, AtrErrorImgDirective, HqSpinDirective, DebounceClickDirective, InfiniteScrollDirective, NzModalModule,
|
|
5430
|
+
EditorModule], exports: [DragDropModule,
|
|
5258
5431
|
CommonModule,
|
|
5259
5432
|
FormsModule,
|
|
5260
5433
|
ReactiveFormsModule,
|
|
5261
5434
|
RouterModule,
|
|
5262
5435
|
NzColorPickerModule, CusNgZorroAntdModule,
|
|
5263
5436
|
NzResizableModule, ImgCanvasComponent, TableFormItemComponent, TableTdComponent, AtrTableComponent, UploadComponent, AtrFormComponent, LocalUploadComponent,
|
|
5264
|
-
SelectTreeComponent, VideoComponent, SelectIconsComponent, EchartsComponent, ViewFormComponent, PipeModuleModule, AtrRoleDirective, AtrErrorImgDirective, HqSpinDirective, DebounceClickDirective, InfiniteScrollDirective] }); }
|
|
5437
|
+
SelectTreeComponent, VideoComponent, SelectIconsComponent, EchartsComponent, ViewFormComponent, EditorComponent, PipeModuleModule, AtrRoleDirective, AtrErrorImgDirective, HqSpinDirective, DebounceClickDirective, InfiniteScrollDirective] }); }
|
|
5265
5438
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AtrSharedModule, providers: SERVICE_PROVIDES, imports: [PipeModuleModule,
|
|
5266
5439
|
CommonModule,
|
|
5267
5440
|
FormsModule,
|
|
@@ -5273,7 +5446,8 @@ class AtrSharedModule {
|
|
|
5273
5446
|
VgBufferingModule,
|
|
5274
5447
|
DragDropModule,
|
|
5275
5448
|
AtrComponentsModule,
|
|
5276
|
-
NzModalModule,
|
|
5449
|
+
NzModalModule,
|
|
5450
|
+
EditorModule, DragDropModule,
|
|
5277
5451
|
CommonModule,
|
|
5278
5452
|
FormsModule,
|
|
5279
5453
|
ReactiveFormsModule,
|
|
@@ -5301,6 +5475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
5301
5475
|
AtrComponentsModule,
|
|
5302
5476
|
...DIRECTIVES,
|
|
5303
5477
|
NzModalModule,
|
|
5478
|
+
EditorModule,
|
|
5304
5479
|
],
|
|
5305
5480
|
declarations: [
|
|
5306
5481
|
...COMPONENTS
|
|
@@ -5389,5 +5564,5 @@ window.global = window;
|
|
|
5389
5564
|
* Generated bundle index. Do not edit.
|
|
5390
5565
|
*/
|
|
5391
5566
|
|
|
5392
|
-
export { AtrComponentsModule, AtrErrorImgDirective, AtrFormComponent, AtrReuseStrategy, AtrRoleDirective, AtrSharedModule, AtrTableComponent, AuthGuard, BaseInterceptor, BusiService, ChinaNumPipe, CountPipe, CusNgZorroAntdModule, DayPipe, DebounceClickDirective, DefaultValPipe, DictService, DictsPipe, EchartsComponent, HqSpinDirective, HttpService, ImgCanvasComponent, InfiniteScrollDirective, IsEmptyPipe, IsNotEmptyPipe, LocalStorageUtil, LocalUploadComponent, MenuService, OssImgPipe, OssPipe, OssStaticPipe, PipeModuleModule, RemoveHtmlPipe, SafeComputePipe, SafeHtmlPipe, SafeUrlPipe, SelectIconsComponent, SelectTreeComponent, SessionStorageUtil, ShareService, TableFormItemComponent, TableTdComponent, ToolsUtil, UploadComponent, UploadOssService, UserAction, VideoComponent, ViewFormComponent, atr_static_datas, commonDatas, flyIn, scrollScreen, telphoneValidator, transAnimation };
|
|
5567
|
+
export { AtrComponentsModule, AtrErrorImgDirective, AtrFormComponent, AtrReuseStrategy, AtrRoleDirective, AtrSharedModule, AtrTableComponent, AuthGuard, BaseInterceptor, BusiService, ChinaNumPipe, CountPipe, CusNgZorroAntdModule, DayPipe, DebounceClickDirective, DefaultValPipe, DictService, DictsPipe, EchartsComponent, EditorComponent, HqSpinDirective, HttpService, ImgCanvasComponent, InfiniteScrollDirective, IsEmptyPipe, IsNotEmptyPipe, LocalStorageUtil, LocalUploadComponent, MenuService, OssImgPipe, OssPipe, OssStaticPipe, PipeModuleModule, RemoveHtmlPipe, SafeComputePipe, SafeHtmlPipe, SafeUrlPipe, SelectIconsComponent, SelectTreeComponent, SessionStorageUtil, ShareService, TableFormItemComponent, TableTdComponent, ToolsUtil, UploadComponent, UploadOssService, UserAction, VideoComponent, ViewFormComponent, atr_static_datas, commonDatas, flyIn, scrollScreen, telphoneValidator, transAnimation };
|
|
5393
5568
|
//# sourceMappingURL=atr-components.mjs.map
|