fantasy-ngzorro 1.2.19 → 1.3.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/bundles/fantasy-ngzorro.umd.js +758 -161
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +2 -2
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-form-lines/hd-form-lines.component.js +521 -18
- package/esm2015/hd-form-lines/hd-form-lines.service.js +12 -22
- package/esm2015/hd-table/hd-table.component.js +2 -4
- package/esm5/hd-form-lines/hd-form-lines.component.js +628 -18
- package/esm5/hd-form-lines/hd-form-lines.service.js +12 -22
- package/esm5/hd-table/hd-table.component.js +2 -4
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +638 -148
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +760 -163
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-form-lines/hd-form-lines.component.d.ts +50 -3
- package/hd-form-lines/hd-form-lines.service.d.ts +10 -10
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Component, ContentChild, NgModule, Injectable, ɵɵdefineInjectable, EventEmitter, Input, Output, NO_ERRORS_SCHEMA,
|
|
1
|
+
import { Component, ContentChild, NgModule, Injectable, ɵɵdefineInjectable, EventEmitter, Input, Output, NO_ERRORS_SCHEMA, ElementRef, ChangeDetectorRef, ViewChildren, ɵɵinject } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { FormsModule, FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
4
|
-
import { NgZorroAntdModule, InputBoolean, NzModalService } from 'ng-zorro-antd';
|
|
4
|
+
import { NgZorroAntdModule, InputBoolean, NzInputNumberComponent, NzSelectComponent, NzDatePickerComponent, NzRangePickerComponent, NzTimePickerComponent, NzModalService } from 'ng-zorro-antd';
|
|
5
5
|
import { __decorate, __metadata } from 'tslib';
|
|
6
6
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
7
7
|
import { round } from 'lodash';
|
|
@@ -1109,6 +1109,124 @@ HdSpaceModule.decorators = [
|
|
|
1109
1109
|
},] }
|
|
1110
1110
|
];
|
|
1111
1111
|
|
|
1112
|
+
/**
|
|
1113
|
+
* @fileoverview added by tsickle
|
|
1114
|
+
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1115
|
+
*/
|
|
1116
|
+
// 控件列表
|
|
1117
|
+
class FormLine {
|
|
1118
|
+
constructor() {
|
|
1119
|
+
// 输入框的提示文件
|
|
1120
|
+
this.require = false; // 是否必填
|
|
1121
|
+
// 是否必填
|
|
1122
|
+
this.hide = false; // 是否为隐藏字段,仅用于填充表单的字段,不显示在页面上
|
|
1123
|
+
// 列对齐方式
|
|
1124
|
+
this.value = null; // 值 不传默认为null
|
|
1125
|
+
// 需要保留小数的列的位数
|
|
1126
|
+
this.inputNumber = new InputNumber(); // number组件的min、max、step
|
|
1127
|
+
// 不可输入状态
|
|
1128
|
+
this.showTime = false; // 日期选择器是否包含时间
|
|
1129
|
+
this.canSearch = false; // 指明hide 情况下的控件是否可以被搜索,默认false
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
if (false) {
|
|
1133
|
+
/** @type {?} */
|
|
1134
|
+
FormLine.prototype.type;
|
|
1135
|
+
/** @type {?} */
|
|
1136
|
+
FormLine.prototype.label;
|
|
1137
|
+
/** @type {?} */
|
|
1138
|
+
FormLine.prototype.name;
|
|
1139
|
+
/** @type {?} */
|
|
1140
|
+
FormLine.prototype.placeholder;
|
|
1141
|
+
/** @type {?} */
|
|
1142
|
+
FormLine.prototype.require;
|
|
1143
|
+
/** @type {?} */
|
|
1144
|
+
FormLine.prototype.hide;
|
|
1145
|
+
/** @type {?} */
|
|
1146
|
+
FormLine.prototype.align;
|
|
1147
|
+
/** @type {?} */
|
|
1148
|
+
FormLine.prototype.value;
|
|
1149
|
+
/** @type {?} */
|
|
1150
|
+
FormLine.prototype.isSelect;
|
|
1151
|
+
/** @type {?} */
|
|
1152
|
+
FormLine.prototype.selectOption;
|
|
1153
|
+
/** @type {?} */
|
|
1154
|
+
FormLine.prototype.explainOptionRight;
|
|
1155
|
+
/** @type {?} */
|
|
1156
|
+
FormLine.prototype.explainOption;
|
|
1157
|
+
/** @type {?} */
|
|
1158
|
+
FormLine.prototype.colorOption;
|
|
1159
|
+
/** @type {?} */
|
|
1160
|
+
FormLine.prototype.maxLength;
|
|
1161
|
+
/** @type {?} */
|
|
1162
|
+
FormLine.prototype.preserveNumber;
|
|
1163
|
+
/** @type {?} */
|
|
1164
|
+
FormLine.prototype.inputNumber;
|
|
1165
|
+
/** @type {?} */
|
|
1166
|
+
FormLine.prototype.onChangeEvent;
|
|
1167
|
+
/** @type {?} */
|
|
1168
|
+
FormLine.prototype.onSearchEvent;
|
|
1169
|
+
/** @type {?} */
|
|
1170
|
+
FormLine.prototype.defaultLabel;
|
|
1171
|
+
/** @type {?} */
|
|
1172
|
+
FormLine.prototype.hdDisabledDate;
|
|
1173
|
+
/** @type {?} */
|
|
1174
|
+
FormLine.prototype.disabled;
|
|
1175
|
+
/** @type {?} */
|
|
1176
|
+
FormLine.prototype.showTime;
|
|
1177
|
+
/** @type {?} */
|
|
1178
|
+
FormLine.prototype.style;
|
|
1179
|
+
/** @type {?} */
|
|
1180
|
+
FormLine.prototype.canSearch;
|
|
1181
|
+
/** @type {?} */
|
|
1182
|
+
FormLine.prototype.onChangeEventDebounceTime;
|
|
1183
|
+
/** @type {?} */
|
|
1184
|
+
FormLine.prototype.onSearchEventEventDebounceTime;
|
|
1185
|
+
}
|
|
1186
|
+
class ColorOption {
|
|
1187
|
+
}
|
|
1188
|
+
if (false) {
|
|
1189
|
+
/** @type {?} */
|
|
1190
|
+
ColorOption.prototype.name;
|
|
1191
|
+
/** @type {?} */
|
|
1192
|
+
ColorOption.prototype.color;
|
|
1193
|
+
}
|
|
1194
|
+
class ExplainOption {
|
|
1195
|
+
}
|
|
1196
|
+
if (false) {
|
|
1197
|
+
/** @type {?} */
|
|
1198
|
+
ExplainOption.prototype.show;
|
|
1199
|
+
/** @type {?} */
|
|
1200
|
+
ExplainOption.prototype.name;
|
|
1201
|
+
/** @type {?} */
|
|
1202
|
+
ExplainOption.prototype.color;
|
|
1203
|
+
}
|
|
1204
|
+
/** @enum {string} */
|
|
1205
|
+
const FormLineType = {
|
|
1206
|
+
Input: 'Input',
|
|
1207
|
+
Select: 'Select',
|
|
1208
|
+
Date: 'Date',
|
|
1209
|
+
DateRange: 'DateRange',
|
|
1210
|
+
TextArea: 'TextArea',
|
|
1211
|
+
InputNumber: 'InputNumber',
|
|
1212
|
+
MultipleSelect: 'MultipleSelect',
|
|
1213
|
+
ViewDom: 'ViewDom',
|
|
1214
|
+
Switch: 'Switch',
|
|
1215
|
+
Time: 'Time' // 时间选择器
|
|
1216
|
+
,
|
|
1217
|
+
};
|
|
1218
|
+
class HdFormLinesService {
|
|
1219
|
+
constructor() { }
|
|
1220
|
+
}
|
|
1221
|
+
HdFormLinesService.decorators = [
|
|
1222
|
+
{ type: Injectable, args: [{
|
|
1223
|
+
providedIn: 'root'
|
|
1224
|
+
},] }
|
|
1225
|
+
];
|
|
1226
|
+
/** @nocollapse */
|
|
1227
|
+
HdFormLinesService.ctorParameters = () => [];
|
|
1228
|
+
/** @nocollapse */ HdFormLinesService.ngInjectableDef = ɵɵdefineInjectable({ factory: function HdFormLinesService_Factory() { return new HdFormLinesService(); }, token: HdFormLinesService, providedIn: "root" });
|
|
1229
|
+
|
|
1112
1230
|
/**
|
|
1113
1231
|
* @fileoverview added by tsickle
|
|
1114
1232
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
@@ -1116,9 +1234,11 @@ HdSpaceModule.decorators = [
|
|
|
1116
1234
|
class HdFormLinesComponent {
|
|
1117
1235
|
/**
|
|
1118
1236
|
* @param {?} fb
|
|
1237
|
+
* @param {?} cdr
|
|
1119
1238
|
*/
|
|
1120
|
-
constructor(fb) {
|
|
1239
|
+
constructor(fb, cdr) {
|
|
1121
1240
|
this.fb = fb;
|
|
1241
|
+
this.cdr = cdr;
|
|
1122
1242
|
this.tableLoading = false;
|
|
1123
1243
|
this.showSearch = false;
|
|
1124
1244
|
this.operateButtons = ['add', 'delete'];
|
|
@@ -1126,7 +1246,8 @@ class HdFormLinesComponent {
|
|
|
1126
1246
|
this.changeEvent = new EventEmitter();
|
|
1127
1247
|
this.showDeleteConfirm = false;
|
|
1128
1248
|
this.paginationPageIndex = 1;
|
|
1129
|
-
|
|
1249
|
+
// TODO:这里暂时变成2条去处理,做完之后需要改成10
|
|
1250
|
+
this.paginationPageSize = 3;
|
|
1130
1251
|
// 合计区域
|
|
1131
1252
|
this.showTotal = false;
|
|
1132
1253
|
this.totalOption = [];
|
|
@@ -1145,6 +1266,13 @@ class HdFormLinesComponent {
|
|
|
1145
1266
|
// 表单当前的状态
|
|
1146
1267
|
this.searchSubject = new Subject();
|
|
1147
1268
|
this.debounceTimeout = 0; // 默认防抖时间
|
|
1269
|
+
// 当前页的dom二维数组
|
|
1270
|
+
this.collectDomList = [];
|
|
1271
|
+
// 当前聚焦的dom元素坐标
|
|
1272
|
+
this.activeDomX = null;
|
|
1273
|
+
this.activeDomY = null;
|
|
1274
|
+
this.activeDom = null;
|
|
1275
|
+
this.activeSelectedComponentOpen = false;
|
|
1148
1276
|
this.textWidthCache = {};
|
|
1149
1277
|
this.searchSubscription = this.searchSubject.pipe(debounceTime(this.debounceTimeout)).subscribe((/**
|
|
1150
1278
|
* @param {?} __0
|
|
@@ -1160,6 +1288,424 @@ class HdFormLinesComponent {
|
|
|
1160
1288
|
this.storeFormLinesData = this.formLinesData;
|
|
1161
1289
|
this.init();
|
|
1162
1290
|
}
|
|
1291
|
+
/**
|
|
1292
|
+
* @return {?}
|
|
1293
|
+
*/
|
|
1294
|
+
ngAfterViewInit() {
|
|
1295
|
+
this.collectDomData();
|
|
1296
|
+
}
|
|
1297
|
+
/**
|
|
1298
|
+
* @return {?}
|
|
1299
|
+
*/
|
|
1300
|
+
get formLinesLength() {
|
|
1301
|
+
return this.linesFormArray.controls.length;
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* @return {?}
|
|
1305
|
+
*/
|
|
1306
|
+
collectDomData() {
|
|
1307
|
+
this.collectDomList = [];
|
|
1308
|
+
/** @type {?} */
|
|
1309
|
+
const pageDomList = this.formInputDomList.toArray();
|
|
1310
|
+
// Step 1: 获取当前页的数据量
|
|
1311
|
+
/** @type {?} */
|
|
1312
|
+
const startIndex = (this.paginationPageIndex - 1) * this.paginationPageSize;
|
|
1313
|
+
/** @type {?} */
|
|
1314
|
+
const endIndex = this.paginationPageIndex * this.paginationPageSize;
|
|
1315
|
+
/** @type {?} */
|
|
1316
|
+
const adjustedEndIndex = endIndex > this.formLinesLength ? this.formLinesLength : endIndex;
|
|
1317
|
+
/** @type {?} */
|
|
1318
|
+
const pageLinesLength = adjustedEndIndex - startIndex;
|
|
1319
|
+
/** @type {?} */
|
|
1320
|
+
const interval = pageDomList.length / pageLinesLength;
|
|
1321
|
+
// Step 2: 拆分formInputDomList
|
|
1322
|
+
for (let i = 0; i < pageLinesLength; i++) {
|
|
1323
|
+
this.collectDomList.push(pageDomList.splice(0, interval));
|
|
1324
|
+
}
|
|
1325
|
+
// 关闭所有NzInputNumberComponent的键盘上下箭头触发+-的功能
|
|
1326
|
+
for (let i = 0; i < this.collectDomList.length; i++) {
|
|
1327
|
+
for (let j = 0; j < this.collectDomList[i].length; j++) {
|
|
1328
|
+
/** @type {?} */
|
|
1329
|
+
const dom = this.collectDomList[i][j];
|
|
1330
|
+
if (dom instanceof NzInputNumberComponent) {
|
|
1331
|
+
dom.down = (/**
|
|
1332
|
+
* @return {?}
|
|
1333
|
+
*/
|
|
1334
|
+
() => { });
|
|
1335
|
+
dom.up = (/**
|
|
1336
|
+
* @return {?}
|
|
1337
|
+
*/
|
|
1338
|
+
() => { });
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
// 聚焦下一个dom
|
|
1344
|
+
/**
|
|
1345
|
+
* @param {?} x
|
|
1346
|
+
* @param {?} y
|
|
1347
|
+
* @return {?}
|
|
1348
|
+
*/
|
|
1349
|
+
jumpToNextInput(x, y) {
|
|
1350
|
+
if (x === null || y === null || !this.collectDomList || this.collectDomList.length === 0) {
|
|
1351
|
+
return;
|
|
1352
|
+
}
|
|
1353
|
+
// 如果是最后一个可输入元素,新增行
|
|
1354
|
+
if (x === this.collectDomList.length - 1 && y === this.collectDomList[0].length - 1) {
|
|
1355
|
+
this.addNewLineAndFocus();
|
|
1356
|
+
}
|
|
1357
|
+
else {
|
|
1358
|
+
if (y === this.collectDomList[0].length - 1) {
|
|
1359
|
+
// 如果是最后一列,则跳转到下一行第一个输入框
|
|
1360
|
+
this.focusDom(x + 1, 0, 'right');
|
|
1361
|
+
}
|
|
1362
|
+
else {
|
|
1363
|
+
// 如果不是最后一列,则跳转到当前行下一个输入框
|
|
1364
|
+
this.focusDom(x, y + 1, 'right');
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* 增加新行并且聚焦到第一个元素,
|
|
1370
|
+
* 这里要注意,如果存在翻页情况,需要处理
|
|
1371
|
+
* @return {?}
|
|
1372
|
+
*/
|
|
1373
|
+
addNewLineAndFocus() {
|
|
1374
|
+
// 当前行为当前页最后一行的时候,判断下一页是否有数据
|
|
1375
|
+
// 1、如果有:翻页+聚焦第一行第一个元素
|
|
1376
|
+
// 2、如果没有:新增行+翻页+聚焦第一行第一个元素
|
|
1377
|
+
if (this.activeDomX === this.paginationPageSize - 1) {
|
|
1378
|
+
// 判断下一页是否有数据
|
|
1379
|
+
if (this.paginationPageIndex < Math.ceil(this.formLinesLength / this.paginationPageSize)) {
|
|
1380
|
+
// 翻页+聚焦第一行第一个元素
|
|
1381
|
+
this.paginationPageIndex++;
|
|
1382
|
+
setTimeout((/**
|
|
1383
|
+
* @return {?}
|
|
1384
|
+
*/
|
|
1385
|
+
() => {
|
|
1386
|
+
this.collectDomData();
|
|
1387
|
+
this.focusDom(0, 0, 'right');
|
|
1388
|
+
}), 0);
|
|
1389
|
+
}
|
|
1390
|
+
else {
|
|
1391
|
+
// 新增行+翻页+聚焦第一行第一个元素
|
|
1392
|
+
this.addFormLine();
|
|
1393
|
+
this.paginationPageIndex++;
|
|
1394
|
+
setTimeout((/**
|
|
1395
|
+
* @return {?}
|
|
1396
|
+
*/
|
|
1397
|
+
() => {
|
|
1398
|
+
this.collectDomData();
|
|
1399
|
+
this.focusDom(0, 0);
|
|
1400
|
+
}), 0);
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
else {
|
|
1404
|
+
this.addFormLine();
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
// 聚焦到上一个dom
|
|
1408
|
+
/**
|
|
1409
|
+
* @param {?} x
|
|
1410
|
+
* @param {?} y
|
|
1411
|
+
* @return {?}
|
|
1412
|
+
*/
|
|
1413
|
+
jumpToPrevInput(x, y) {
|
|
1414
|
+
if (x === null || y === null || !this.collectDomList || this.collectDomList.length === 0) {
|
|
1415
|
+
return;
|
|
1416
|
+
}
|
|
1417
|
+
if (x === 0 && y === 0) {
|
|
1418
|
+
// 如果是第一个可输入元素, 判断是否有上一页, 如果有,则翻页+聚焦到上一页最后一个元素
|
|
1419
|
+
if (this.paginationPageIndex > 1) {
|
|
1420
|
+
// 翻页+聚焦到上一页最后一个元素
|
|
1421
|
+
this.paginationPageIndex--;
|
|
1422
|
+
setTimeout((/**
|
|
1423
|
+
* @return {?}
|
|
1424
|
+
*/
|
|
1425
|
+
() => {
|
|
1426
|
+
this.collectDomData();
|
|
1427
|
+
this.focusDom(this.collectDomList.length - 1, this.collectDomList[0].length - 1);
|
|
1428
|
+
}), 0);
|
|
1429
|
+
}
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1432
|
+
else {
|
|
1433
|
+
if (y === 0) {
|
|
1434
|
+
// 如果是第一列,则跳转到上一行最后一个输入框
|
|
1435
|
+
this.focusDom(x - 1, this.collectDomList[0].length - 1, 'left');
|
|
1436
|
+
}
|
|
1437
|
+
else {
|
|
1438
|
+
// 如果不是第一列,则跳转到当前行上一个输入框
|
|
1439
|
+
this.focusDom(x, y - 1, 'left');
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
/**
|
|
1444
|
+
* 聚焦到某个dom
|
|
1445
|
+
* @param {?} x 坐标x
|
|
1446
|
+
* @param {?} y 坐标y
|
|
1447
|
+
* @param {?=} jumpDirection 跳转方向
|
|
1448
|
+
* @return {?}
|
|
1449
|
+
*/
|
|
1450
|
+
focusDom(x, y, jumpDirection = 'right') {
|
|
1451
|
+
if (x === null || y === null || !this.collectDomList || this.collectDomList.length === 0) {
|
|
1452
|
+
return;
|
|
1453
|
+
}
|
|
1454
|
+
// 先清除一下当前的焦点
|
|
1455
|
+
this.cleanFocusDom(this.activeDomX, this.activeDomY);
|
|
1456
|
+
if (this.collectDomList[x] && this.collectDomList[x][y]) {
|
|
1457
|
+
/** @type {?} */
|
|
1458
|
+
const dom = this.collectDomList[x][y];
|
|
1459
|
+
// 需要判断下一个focus的dom是否是禁用状态,如果是禁用状态需要跳过
|
|
1460
|
+
if (dom instanceof NzSelectComponent) {
|
|
1461
|
+
if (dom.nzDisabled) {
|
|
1462
|
+
if (jumpDirection === 'right') {
|
|
1463
|
+
this.jumpToNextInput(x, y);
|
|
1464
|
+
}
|
|
1465
|
+
else if (jumpDirection === 'left') {
|
|
1466
|
+
this.jumpToPrevInput(x, y);
|
|
1467
|
+
}
|
|
1468
|
+
return;
|
|
1469
|
+
}
|
|
1470
|
+
dom.nzSelectTopControlComponent.inputElement.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
|
1471
|
+
// 这里多选框需要额外处理下,因为向下的时候会触发内部Input的聚焦,把下一个dom的focus放到宏任务中,延迟处理。
|
|
1472
|
+
if (dom.nzSelectService.mode === 'multiple') {
|
|
1473
|
+
setTimeout((/**
|
|
1474
|
+
* @return {?}
|
|
1475
|
+
*/
|
|
1476
|
+
() => {
|
|
1477
|
+
dom.focus();
|
|
1478
|
+
}), 0);
|
|
1479
|
+
}
|
|
1480
|
+
else {
|
|
1481
|
+
dom.focus();
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
else if (dom instanceof NzInputNumberComponent) {
|
|
1485
|
+
if (dom.nzDisabled) {
|
|
1486
|
+
if (jumpDirection === 'right') {
|
|
1487
|
+
this.jumpToNextInput(x, y);
|
|
1488
|
+
}
|
|
1489
|
+
else if (jumpDirection === 'left') {
|
|
1490
|
+
this.jumpToPrevInput(x, y);
|
|
1491
|
+
}
|
|
1492
|
+
return;
|
|
1493
|
+
}
|
|
1494
|
+
/** @type {?} */
|
|
1495
|
+
const inputDom = document.getElementById(dom.nzId);
|
|
1496
|
+
inputDom.focus();
|
|
1497
|
+
inputDom.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
|
1498
|
+
setTimeout((/**
|
|
1499
|
+
* @return {?}
|
|
1500
|
+
*/
|
|
1501
|
+
() => {
|
|
1502
|
+
inputDom.select();
|
|
1503
|
+
}), 0);
|
|
1504
|
+
}
|
|
1505
|
+
else if (dom instanceof ElementRef) {
|
|
1506
|
+
if (dom.nativeElement.disabled) {
|
|
1507
|
+
if (jumpDirection === 'right') {
|
|
1508
|
+
this.jumpToNextInput(x, y);
|
|
1509
|
+
}
|
|
1510
|
+
else if (jumpDirection === 'left') {
|
|
1511
|
+
this.jumpToPrevInput(x, y);
|
|
1512
|
+
}
|
|
1513
|
+
return;
|
|
1514
|
+
}
|
|
1515
|
+
dom.nativeElement.focus();
|
|
1516
|
+
dom.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
|
1517
|
+
setTimeout((/**
|
|
1518
|
+
* @return {?}
|
|
1519
|
+
*/
|
|
1520
|
+
() => {
|
|
1521
|
+
dom.nativeElement.select();
|
|
1522
|
+
}), 0);
|
|
1523
|
+
}
|
|
1524
|
+
else if (dom instanceof NzDatePickerComponent || dom instanceof NzRangePickerComponent || dom instanceof NzTimePickerComponent) {
|
|
1525
|
+
// TODO:在ngzorro8.5.x版本,时间相关的选择器没有暴露出open方法,暂时先不处理。(10.x及以上版本提供了open方法)
|
|
1526
|
+
if (jumpDirection === 'right') {
|
|
1527
|
+
this.jumpToNextInput(x, y);
|
|
1528
|
+
}
|
|
1529
|
+
else if (jumpDirection === 'left') {
|
|
1530
|
+
this.jumpToPrevInput(x, y);
|
|
1531
|
+
}
|
|
1532
|
+
return;
|
|
1533
|
+
}
|
|
1534
|
+
this.setActiveDom(x, y);
|
|
1535
|
+
}
|
|
1536
|
+
else {
|
|
1537
|
+
// 没有dom的场景下,需要判断是左还是右,
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
/**
|
|
1541
|
+
* @param {?} x
|
|
1542
|
+
* @param {?} y
|
|
1543
|
+
* @return {?}
|
|
1544
|
+
*/
|
|
1545
|
+
cleanFocusDom(x, y) {
|
|
1546
|
+
if (x === null || y === null || !this.collectDomList || this.collectDomList.length === 0) {
|
|
1547
|
+
return;
|
|
1548
|
+
}
|
|
1549
|
+
if (this.collectDomList[x] && this.collectDomList[x][y]) {
|
|
1550
|
+
/** @type {?} */
|
|
1551
|
+
const dom = this.collectDomList[x][y];
|
|
1552
|
+
if (dom instanceof NzSelectComponent) {
|
|
1553
|
+
dom.blur();
|
|
1554
|
+
dom.nzOpen = false;
|
|
1555
|
+
}
|
|
1556
|
+
else if (dom instanceof NzInputNumberComponent) {
|
|
1557
|
+
dom.nzOpen = false;
|
|
1558
|
+
dom.blur();
|
|
1559
|
+
}
|
|
1560
|
+
else if (dom instanceof ElementRef) {
|
|
1561
|
+
dom.nativeElement.blur();
|
|
1562
|
+
}
|
|
1563
|
+
else { }
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* @param {?} x
|
|
1568
|
+
* @param {?} y
|
|
1569
|
+
* @return {?}
|
|
1570
|
+
*/
|
|
1571
|
+
setActiveDom(x, y) {
|
|
1572
|
+
this.activeDomX = x;
|
|
1573
|
+
this.activeDomY = y;
|
|
1574
|
+
this.activeDom = this.collectDomList[this.activeDomX][this.activeDomY];
|
|
1575
|
+
if (this.activeDom instanceof NzSelectComponent) {
|
|
1576
|
+
this.activeSelectedComponentOpen = this.activeDom.open;
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
/**
|
|
1580
|
+
* 根据行号和列号名称获取当前聚焦的dom位置
|
|
1581
|
+
* @param {?} rowNumber 行号
|
|
1582
|
+
* @param {?} colNumber 列号
|
|
1583
|
+
* @return {?}
|
|
1584
|
+
*/
|
|
1585
|
+
setActiveDomInFormLines(rowNumber, colNumber) {
|
|
1586
|
+
this.activeDomX = rowNumber;
|
|
1587
|
+
this.activeDomY = this.getDomIndex(colNumber, this.formLines);
|
|
1588
|
+
this.setActiveDom(this.activeDomX, this.activeDomY);
|
|
1589
|
+
}
|
|
1590
|
+
/**
|
|
1591
|
+
* 键盘点击事件
|
|
1592
|
+
* @param {?} event 键盘事件
|
|
1593
|
+
* @return {?}
|
|
1594
|
+
*/
|
|
1595
|
+
onKeyDown(event) {
|
|
1596
|
+
if (this.activeDomX === null || this.activeDomY === null) {
|
|
1597
|
+
return;
|
|
1598
|
+
}
|
|
1599
|
+
switch (event.key) {
|
|
1600
|
+
case 'ArrowUp':
|
|
1601
|
+
if (this.activeDom instanceof NzSelectComponent && this.activeSelectedComponentOpen) {
|
|
1602
|
+
return;
|
|
1603
|
+
}
|
|
1604
|
+
if (this.activeDomX !== 0) {
|
|
1605
|
+
this.focusDom(this.activeDomX - 1, this.activeDomY);
|
|
1606
|
+
}
|
|
1607
|
+
break;
|
|
1608
|
+
case 'ArrowDown':
|
|
1609
|
+
// 判断是否在最后一行,如果在最后一行,直接+行翻页
|
|
1610
|
+
if (this.activeDom instanceof NzSelectComponent && this.activeSelectedComponentOpen) {
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1613
|
+
if (this.activeDomX !== this.collectDomList.length - 1) {
|
|
1614
|
+
this.focusDom(this.activeDomX + 1, this.activeDomY);
|
|
1615
|
+
}
|
|
1616
|
+
break;
|
|
1617
|
+
case 'ArrowLeft':
|
|
1618
|
+
this.jumpToPrevInput(this.activeDomX, this.activeDomY);
|
|
1619
|
+
break;
|
|
1620
|
+
case 'ArrowRight':
|
|
1621
|
+
this.jumpToNextInput(this.activeDomX, this.activeDomY);
|
|
1622
|
+
break;
|
|
1623
|
+
case 'Enter':
|
|
1624
|
+
if (this.activeDom instanceof NzSelectComponent) {
|
|
1625
|
+
this.activeSelectedComponentOpen = this.activeDom.open;
|
|
1626
|
+
if (this.activeSelectedComponentOpen === false) {
|
|
1627
|
+
this.focusDom(this.activeDomX, this.activeDomY);
|
|
1628
|
+
}
|
|
1629
|
+
break;
|
|
1630
|
+
}
|
|
1631
|
+
if (this.activeDomX === this.collectDomList.length - 1) {
|
|
1632
|
+
this.addNewLineAndFocus();
|
|
1633
|
+
}
|
|
1634
|
+
break;
|
|
1635
|
+
case 'Escape':
|
|
1636
|
+
if (this.activeDom instanceof NzSelectComponent) {
|
|
1637
|
+
/** @type {?} */
|
|
1638
|
+
const nowActiveDom = (/** @type {?} */ (this.activeDom));
|
|
1639
|
+
setTimeout((/**
|
|
1640
|
+
* @return {?}
|
|
1641
|
+
*/
|
|
1642
|
+
() => {
|
|
1643
|
+
this.activeSelectedComponentOpen = nowActiveDom.open;
|
|
1644
|
+
if (this.activeSelectedComponentOpen === false) {
|
|
1645
|
+
if (nowActiveDom.nzSelectService.mode === 'multiple') {
|
|
1646
|
+
setTimeout((/**
|
|
1647
|
+
* @return {?}
|
|
1648
|
+
*/
|
|
1649
|
+
() => {
|
|
1650
|
+
this.focusDom(this.activeDomX, this.activeDomY);
|
|
1651
|
+
}), 0);
|
|
1652
|
+
}
|
|
1653
|
+
else {
|
|
1654
|
+
this.focusDom(this.activeDomX, this.activeDomY);
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
}), 0);
|
|
1658
|
+
}
|
|
1659
|
+
break;
|
|
1660
|
+
default:
|
|
1661
|
+
// 如果当前聚焦的是选择框,且键入0-9a-zA-Z,则弹出
|
|
1662
|
+
if (this.activeDom instanceof NzSelectComponent && this.activeSelectedComponentOpen === false && /^[0-9a-zA-Z]$/.test(event.key)) {
|
|
1663
|
+
/** @type {?} */
|
|
1664
|
+
const dom = this.activeDom;
|
|
1665
|
+
dom.nzOpen = true;
|
|
1666
|
+
this.activeSelectedComponentOpen = true;
|
|
1667
|
+
// // TODO:这里暂时注释,不能直接带入键入值,这样会导致输入中文的时候带入英文字符,不符合预期
|
|
1668
|
+
// dom.nzSelectTopControlComponent.inputValue = event.key;
|
|
1669
|
+
// // 获取 input 元素
|
|
1670
|
+
// const inputElement = dom.nzSelectTopControlComponent.inputElement.nativeElement;
|
|
1671
|
+
// setTimeout(() => {
|
|
1672
|
+
// // 触发输入事件,以确保 Angular 检测到值的变化
|
|
1673
|
+
// const eventInput = new Event('input', { bubbles: true });
|
|
1674
|
+
// inputElement.dispatchEvent(eventInput);
|
|
1675
|
+
// }, 0);
|
|
1676
|
+
}
|
|
1677
|
+
break;
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
/**
|
|
1681
|
+
* 根据在初始dom下标和数据集 获取在collectDomList中的下标
|
|
1682
|
+
* @private
|
|
1683
|
+
* @param {?} index 初始下标
|
|
1684
|
+
* @param {?} list 数据集
|
|
1685
|
+
* @return {?}
|
|
1686
|
+
*/
|
|
1687
|
+
getDomIndex(index, list) {
|
|
1688
|
+
/** @type {?} */
|
|
1689
|
+
const typeList = ['Input', 'Select', 'Date', 'DateRange', 'TextArea', 'InputNumber', 'MultipleSelect'];
|
|
1690
|
+
/** @type {?} */
|
|
1691
|
+
let filterList = [];
|
|
1692
|
+
for (let i = 0; i < list.length; i++) {
|
|
1693
|
+
if (i === index) {
|
|
1694
|
+
return filterList.length;
|
|
1695
|
+
}
|
|
1696
|
+
if (typeList.includes(list[i].type)) {
|
|
1697
|
+
filterList.push(list[i]);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
return null;
|
|
1701
|
+
}
|
|
1702
|
+
// TODO:待删
|
|
1703
|
+
/**
|
|
1704
|
+
* @return {?}
|
|
1705
|
+
*/
|
|
1706
|
+
testPage() {
|
|
1707
|
+
this.paginationPageIndex++;
|
|
1708
|
+
}
|
|
1163
1709
|
/**
|
|
1164
1710
|
* @return {?}
|
|
1165
1711
|
*/
|
|
@@ -1259,14 +1805,18 @@ class HdFormLinesComponent {
|
|
|
1259
1805
|
* @param {?} value
|
|
1260
1806
|
* @return {?}
|
|
1261
1807
|
*/
|
|
1262
|
-
value =>
|
|
1808
|
+
value => {
|
|
1809
|
+
this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
|
|
1810
|
+
}));
|
|
1263
1811
|
}
|
|
1264
1812
|
else {
|
|
1265
1813
|
formGroupTmp.get(item.name).valueChanges.subscribe((/**
|
|
1266
1814
|
* @param {?} value
|
|
1267
1815
|
* @return {?}
|
|
1268
1816
|
*/
|
|
1269
|
-
value =>
|
|
1817
|
+
value => {
|
|
1818
|
+
this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
|
|
1819
|
+
}));
|
|
1270
1820
|
}
|
|
1271
1821
|
}
|
|
1272
1822
|
}));
|
|
@@ -1377,13 +1927,10 @@ class HdFormLinesComponent {
|
|
|
1377
1927
|
* @return {?}
|
|
1378
1928
|
*/
|
|
1379
1929
|
ngOnChanges(changes) {
|
|
1380
|
-
console.log('changes', changes);
|
|
1381
1930
|
if (changes['formLinesData'] && JSON.stringify(changes['formLinesData'].currentValue) !== JSON.stringify(changes['formLinesData'].previousValue)) {
|
|
1382
1931
|
if (this.storeFormLinesData && this.storeFormLinesData.length === 0) {
|
|
1383
|
-
console.log('1');
|
|
1384
1932
|
this.storeFormLinesData = this.formLinesData;
|
|
1385
1933
|
}
|
|
1386
|
-
console.log('2');
|
|
1387
1934
|
this.init();
|
|
1388
1935
|
}
|
|
1389
1936
|
if (changes['totalOption'] && JSON.stringify(changes['totalOption'].currentValue) !== JSON.stringify(changes['totalOption'].previousValue)) {
|
|
@@ -1476,9 +2023,10 @@ class HdFormLinesComponent {
|
|
|
1476
2023
|
let formGroupSubmit = this.fb.group(formGroupObj);
|
|
1477
2024
|
this.formLines.forEach((/**
|
|
1478
2025
|
* @param {?} item
|
|
2026
|
+
* @param {?} innerIndex
|
|
1479
2027
|
* @return {?}
|
|
1480
2028
|
*/
|
|
1481
|
-
(item) => {
|
|
2029
|
+
(item, innerIndex) => {
|
|
1482
2030
|
if (item.onChangeEvent) {
|
|
1483
2031
|
if (item.onChangeEvent) {
|
|
1484
2032
|
if (item.onChangeEventDebounceTime) {
|
|
@@ -1486,14 +2034,24 @@ class HdFormLinesComponent {
|
|
|
1486
2034
|
* @param {?} value
|
|
1487
2035
|
* @return {?}
|
|
1488
2036
|
*/
|
|
1489
|
-
value =>
|
|
2037
|
+
value => {
|
|
2038
|
+
if (item.type === FormLineType.Select && value !== null) {
|
|
2039
|
+
this.jumpToNextInput(this.activeDomX, this.activeDomY);
|
|
2040
|
+
}
|
|
2041
|
+
this.triggerEvent(item.onChangeEvent, value, formGroupSubmit);
|
|
2042
|
+
}));
|
|
1490
2043
|
}
|
|
1491
2044
|
else {
|
|
1492
2045
|
formGroupSubmit.get(item.name).valueChanges.subscribe((/**
|
|
1493
2046
|
* @param {?} value
|
|
1494
2047
|
* @return {?}
|
|
1495
2048
|
*/
|
|
1496
|
-
value =>
|
|
2049
|
+
value => {
|
|
2050
|
+
if (item.type === FormLineType.Select && value !== null) {
|
|
2051
|
+
this.jumpToNextInput(this.activeDomX, this.activeDomY);
|
|
2052
|
+
}
|
|
2053
|
+
this.triggerEvent(item.onChangeEvent, value, formGroupSubmit);
|
|
2054
|
+
}));
|
|
1497
2055
|
}
|
|
1498
2056
|
}
|
|
1499
2057
|
}
|
|
@@ -1521,9 +2079,10 @@ class HdFormLinesComponent {
|
|
|
1521
2079
|
addFormLineWithData() {
|
|
1522
2080
|
this.formLinesData.forEach((/**
|
|
1523
2081
|
* @param {?} formLinesDataItem
|
|
2082
|
+
* @param {?} index
|
|
1524
2083
|
* @return {?}
|
|
1525
2084
|
*/
|
|
1526
|
-
(formLinesDataItem) => {
|
|
2085
|
+
(formLinesDataItem, index) => {
|
|
1527
2086
|
/** @type {?} */
|
|
1528
2087
|
let formGroupObj = {};
|
|
1529
2088
|
this.formLines.forEach((/**
|
|
@@ -1542,9 +2101,10 @@ class HdFormLinesComponent {
|
|
|
1542
2101
|
let formGroupTmp = this.fb.group(formGroupObj);
|
|
1543
2102
|
this.formLines.forEach((/**
|
|
1544
2103
|
* @param {?} item
|
|
2104
|
+
* @param {?} innerIndex
|
|
1545
2105
|
* @return {?}
|
|
1546
2106
|
*/
|
|
1547
|
-
(item) => {
|
|
2107
|
+
(item, innerIndex) => {
|
|
1548
2108
|
if (item.onChangeEvent) {
|
|
1549
2109
|
if (item.onChangeEventDebounceTime) {
|
|
1550
2110
|
formGroupTmp.get(item.name).valueChanges.pipe(debounceTime(item.onChangeEventDebounceTime)).subscribe((/**
|
|
@@ -1552,6 +2112,9 @@ class HdFormLinesComponent {
|
|
|
1552
2112
|
* @return {?}
|
|
1553
2113
|
*/
|
|
1554
2114
|
value => {
|
|
2115
|
+
if (item.type === FormLineType.Select && value !== null) {
|
|
2116
|
+
this.jumpToNextInput(this.activeDomX, this.activeDomY);
|
|
2117
|
+
}
|
|
1555
2118
|
this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
|
|
1556
2119
|
}));
|
|
1557
2120
|
}
|
|
@@ -1561,6 +2124,9 @@ class HdFormLinesComponent {
|
|
|
1561
2124
|
* @return {?}
|
|
1562
2125
|
*/
|
|
1563
2126
|
value => {
|
|
2127
|
+
if (item.type === FormLineType.Select && value !== null) {
|
|
2128
|
+
this.jumpToNextInput(this.activeDomX, this.activeDomY);
|
|
2129
|
+
}
|
|
1564
2130
|
this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
|
|
1565
2131
|
}));
|
|
1566
2132
|
}
|
|
@@ -1578,6 +2144,20 @@ class HdFormLinesComponent {
|
|
|
1578
2144
|
addFormLine(index) {
|
|
1579
2145
|
this.linesFormArray.insert(index || this.linesFormArray.controls.length, this.newLineItem());
|
|
1580
2146
|
this.calculateLineNumber();
|
|
2147
|
+
setTimeout((/**
|
|
2148
|
+
* @return {?}
|
|
2149
|
+
*/
|
|
2150
|
+
() => {
|
|
2151
|
+
this.collectDomData();
|
|
2152
|
+
if (index !== null && index !== undefined) {
|
|
2153
|
+
this.activeDomX = index;
|
|
2154
|
+
}
|
|
2155
|
+
else {
|
|
2156
|
+
this.activeDomX = this.collectDomList.length - 1;
|
|
2157
|
+
}
|
|
2158
|
+
this.activeDomY = 0;
|
|
2159
|
+
this.focusDom(this.activeDomX, this.activeDomY);
|
|
2160
|
+
}), 0);
|
|
1581
2161
|
}
|
|
1582
2162
|
/**
|
|
1583
2163
|
* @param {?} index
|
|
@@ -1595,6 +2175,12 @@ class HdFormLinesComponent {
|
|
|
1595
2175
|
}
|
|
1596
2176
|
this.calculateLineNumber();
|
|
1597
2177
|
}
|
|
2178
|
+
setTimeout((/**
|
|
2179
|
+
* @return {?}
|
|
2180
|
+
*/
|
|
2181
|
+
() => {
|
|
2182
|
+
this.collectDomData();
|
|
2183
|
+
}), 0);
|
|
1598
2184
|
}
|
|
1599
2185
|
/**
|
|
1600
2186
|
* @param {?} event
|
|
@@ -1602,6 +2188,12 @@ class HdFormLinesComponent {
|
|
|
1602
2188
|
*/
|
|
1603
2189
|
pageIndexChange(event) {
|
|
1604
2190
|
this.paginationPageIndex = event;
|
|
2191
|
+
setTimeout((/**
|
|
2192
|
+
* @return {?}
|
|
2193
|
+
*/
|
|
2194
|
+
() => {
|
|
2195
|
+
this.collectDomData();
|
|
2196
|
+
}), 0);
|
|
1605
2197
|
}
|
|
1606
2198
|
/**
|
|
1607
2199
|
* @param {?} event
|
|
@@ -1609,6 +2201,12 @@ class HdFormLinesComponent {
|
|
|
1609
2201
|
*/
|
|
1610
2202
|
pageSizeChange(event) {
|
|
1611
2203
|
this.paginationPageSize = event;
|
|
2204
|
+
setTimeout((/**
|
|
2205
|
+
* @return {?}
|
|
2206
|
+
*/
|
|
2207
|
+
() => {
|
|
2208
|
+
this.collectDomData();
|
|
2209
|
+
}), 0);
|
|
1612
2210
|
}
|
|
1613
2211
|
/**
|
|
1614
2212
|
* @private
|
|
@@ -1806,12 +2404,15 @@ class HdFormLinesComponent {
|
|
|
1806
2404
|
}
|
|
1807
2405
|
/**
|
|
1808
2406
|
* @param {?} id
|
|
2407
|
+
* @param {?} rowNumber
|
|
2408
|
+
* @param {?} colNumber
|
|
1809
2409
|
* @return {?}
|
|
1810
2410
|
*/
|
|
1811
|
-
selectValue(id) {
|
|
2411
|
+
selectValue(id, rowNumber, colNumber) {
|
|
1812
2412
|
/** @type {?} */
|
|
1813
2413
|
const inputDom = document.querySelector(id);
|
|
1814
2414
|
inputDom.select();
|
|
2415
|
+
this.setActiveDomInFormLines(rowNumber, colNumber);
|
|
1815
2416
|
}
|
|
1816
2417
|
/**
|
|
1817
2418
|
* @param {?} text
|
|
@@ -1856,15 +2457,17 @@ class HdFormLinesComponent {
|
|
|
1856
2457
|
HdFormLinesComponent.decorators = [
|
|
1857
2458
|
{ type: Component, args: [{
|
|
1858
2459
|
selector: 'hd-form-lines',
|
|
1859
|
-
template: "<hd-button-group *ngIf=\"showForm && showSearch\">\n <ng-template #buttonGroupLeft>\n <nz-input-group [nzSuffix]=\"suffixIconSearch\">\n <input type=\"text\" nz-input (keyup.enter)=\"searchLines()\" placeholder=\"\u8BF7\u8F93\u5165\u5185\u5BB9\u641C\u7D22\" style=\"width: 300px;\"\n [(ngModel)]=\"filterStr\" />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <i nz-icon nzType=\"search\" (click)=\"searchLines()\"></i>\n </ng-template>\n </ng-template>\n</hd-button-group>\n<hd-space background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n<form *ngIf=\"showForm\" nz-form [formGroup]=\"validateHdFormLines\"\n class=\"ant-advanced-search-form hd-formLines-container\">\n <nz-table nzTemplateMode [nzFrontPagination]=\"false\" [nzLoading]=\"tableLoading\" [nzScroll]=\"scroll\">\n <thead>\n <tr>\n <th nzWidth=\"58px\" nzLeft=\"0px\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let item of formLines\">\n <th *ngIf=\"!item.hide\" [nzAlign]=\"item.align ? item.align : 'left'\">\n <span *ngIf=\"item.require\" style=\"color: red;\">*</span>{{item.label}}\n </th>\n </ng-container>\n <th style=\"width: 80px\" nzRight=\"0\">\u64CD\u4F5C</th>\n </tr>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let line of linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize);index as dataIndex\"\n formArrayName=\"lines\">\n <tr [formGroup]=\"line\">\n <td nzWidth=\"58px\" nzLeft=\"0px\">\n {{line.get('lineIndex').value}}\n </td>\n <ng-container *ngFor=\"let formItem of formLines\">\n <td *ngIf=\"!formItem.hide\" [nzAlign]=\"formItem.align ? formItem.align : 'left'\">\n <nz-form-item>\n <nz-form-control [nzErrorTip]=\"formItem.label + '\u4E0D\u80FD\u4E3A\u7A7A'\">\n <ng-container [ngSwitch]=\"formItem.type\">\n <ng-container *ngSwitchCase=\"0\">\n <nz-input-group [nzSuffix]=\"inputCleanTemplate\">\n <input [ngStyle]=\"getStyle(line, formItem, '100px')\" nz-input\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name ).value : null}\"\n [id]=\"'input-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#input-' + formItem.name + line.get('lineIndex').value) : null\"\n [maxlength]=\"formItem.maxLength || null\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [formControlName]=\"formItem.name\" />\n </nz-input-group>\n <ng-template #inputCleanTemplate>\n <i nz-icon nz-tooltip class=\"ant-input-clear-icon\" nzTheme=\"fill\" nzType=\"close-circle\"\n *ngIf=\"line.get(formItem.name).value && !line.get(formItem.name).disabled\"\n (click)=\"inputClean(formItem ,line)\"></i>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"1\">\n <nz-select nzDropdownClassName=\"hd-select-table\"\n *ngIf=\"formItem.selectOption.tableColumns;else nomarlSelectTemplate\"\n [nzShowSearch]=\"formItem.selectOption.hdShowSearch != null ? formItem.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"formItem.selectOption.hdAllowClear != null ? formItem.selectOption.hdAllowClear : true\"\n [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, formItem.onSearchEventEventDebounceTime)\"\n [ngStyle]=\"getStyle(line, formItem, '200px')\">\n <nz-option nzCustomContent nzDisabled>\n <div class=\"hd-option-header\"\n *ngIf=\"(formItem.selectOption?.selectList?.length > 0 || line.get(formItem.selectOption.selectListName)?.value?.length > 0);else emptyTemplate\">\n <div class=\"hd-option-header-column\"\n *ngFor=\"let selectOptionTableColumn of formItem.selectOption.tableColumns;index as index \"\n [ngStyle]=\"{'width': selectOptionTableColumn?.width ? (selectOptionTableColumn.width + ((index === 0 && !selectOptionTableColumn.label) ? 12 : 0) + 'px') : 'unset'}\">\n {{selectOptionTableColumn.label}}\n </div>\n </div>\n <ng-template #emptyTemplate>\n <div class=\"hd-select-empty\">\n <img\n src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNjRweCIgaGVpZ2h0PSI0MXB4IiB2aWV3Qm94PSIwIDAgNjQgNDEiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjUgKDY3NDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00NzIuMDAwMDAwLCAtMTMzNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgIHRyYW5zZm9ybT0idHJhbnNsYXRlKDY0LjAwMDAwMCwgMTExNC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0MC4wMDAwMDAsIDc4LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnICB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjguMDAwMDAwLCAxNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxnID4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxlbGxpcHNlICBmaWxsPSIjRjVGNUY1IiBjeD0iMzIiIGN5PSIzMyIgcng9IjMyIiByeT0iNyI+PC9lbGxpcHNlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGcgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg5LjAwMDAwMCwgMC4wMDAwMDApIiBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0iI0Q5RDlEOSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTQ2LDEyLjc2MDU2MDQgTDM1Ljg1NDMwNDcsMS4yNTczOTYzMyBDMzUuMzY3NDQxNCwwLjQ3MzgyNjYwNSAzNC42NTU4Nzg5LDAgMzMuOTA2NzYxNywwIEwxMi4wOTMyMzgzLDAgQzExLjM0NDEyMTEsMCAxMC42MzI1NTg2LDAuNDczOTUwMjU1IDEwLjE0NTY5NTMsMS4yNTczOTYzMyBMMi42MTQ3OTcyN2UtMTIsMTIuNzYwNTYwNCBMMCwyMiBMNDYsMjIgTDQ2LDEyLjc2MDU2MDQgWiIgID48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTMyLjYxMzI4MTMsMTUuOTMxNSBDMzIuNjEzMjgxMywxNC4zMjU4NTExIDMzLjYwNjk1MzEsMTMuMDAwMjM0IDM0LjgzOTY5OTIsMTMgTDQ2LDEzIEw0NiwzMS4xMzcxMjc3IEM0NiwzMy4yNTg5NTc0IDQ0LjY3OTM4NjcsMzUgNDMuMDUwNDI5NywzNSBMMi45NDk1NzAzMSwzNSBDMS4zMjA1MjM0NCwzNSAwLDMzLjI1ODg0MDQgMCwzMS4xMzcxMjc3IEwwLDEzIEwxMS4xNjAzMDA4LDEzIEMxMi4zOTMwNDY5LDEzIDEzLjM4NjcxODgsMTQuMzIyODA4NSAxMy4zODY3MTg4LDE1LjkyODQ1NzQgTDEzLjM4NjcxODgsMTUuOTQ5NjM4MyBDMTMuMzg2NzE4OCwxNy41NTUyODcyIDE0LjM5MTcxMDksMTguODUxMTgwOSAxNS42MjQ0NTcsMTguODUxMTgwOSBMMzAuMzc1NTQzLDE4Ljg1MTE4MDkgQzMxLjYwODI4OTEsMTguODUxMTgwOSAzMi42MTMyODEzLDE3LjU0MzM1MTEgMzIuNjEzMjgxMywxNS45Mzc3MDIxIEwzMi42MTMyODEzLDE1LjkzMTUgWiIgIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+\"\n alt=\"empty\">\n <p class=\"ant-empty-description\">\u6682\u65E0\u6570\u636E</p>\n </div>\n </ng-template>\n </nz-option>\n\n <nz-option nzCustomContent\n *ngFor=\"let selectItem of (formItem.selectOption.selectList || line.get(formItem.selectOption.selectListName).value)\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\">\n <div class=\"hd-option-line\">\n <div *ngFor=\"let selectOptionTableColumn of formItem.selectOption.tableColumns\"\n [ngStyle]=\"{'width': selectOptionTableColumn?.width ? selectOptionTableColumn.width + 'px' : 'unset'}\">\n <ng-container *ngIf=\"selectOptionTableColumn.icons;else notPictureTemplate\">\n <ng-container *ngFor=\"let icon of selectOptionTableColumn.icons\">\n <img *ngIf=\"icon.iconName === 'hd-recommend-star' && selectItem[icon.fieldName]\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAVpJREFUOE+l07FLQkEcB/Dv7713Zg1GQ0SgW9AmTYVp1BRUokZBEI1u/QVBUBD1D0Rt0dQaPYmotXza1tKQzQ1Fk0iDHr5vPEOTUpO88e77+9zvjjtBh8HTOb8e0hu0eN8Xzz22ikonoGzHdgXcAVB16S75U/mbn/m2AK+mglqbBUAGvCIRuVCJ7HLXQCUTPQOxXi8Q4FolnYWuAH0+HaEpjrdxAyC3VSq33xKgPTWiYYUai8IjUCabw4Zw1XWNF2+OZrXoi+cLImBth4odfQAw0elCW6zdKvU2/wVkYs8ggzBlRqrcI/DrrK1wQ7DWAIToV8lsqGxHDwTY6qYbA1jpCVAux3oBSirhDPYCOL6kE/s/QB77UrnNJoDDVkCN6pI+BJH+6xINQdpKOCf1d/AEYBxgUUQC5PcLbPMDXy1lhGXx7r0G6ExklpBwI0xh2w7ID+UzL71iL/MJdzuZdDL/kXcAAAAASUVORK5CYII=\"\n style=\"width: 16px;height: 16px;\">\n <img *ngIf=\"icon.iconName === 'hd-img-star' && selectItem[icon.fieldName]\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAyhJREFUWEe1ll1o1XYYxp8nPUmUihdCV3bAirvYzUC80Xpy3KwTZNR2CdOhDkTBwe6G32XzwqpjE3Qt4pUKZQqDyQZNTp1uY8yCJG0F2d2+LlWOOkShovQkaV45lcJpTdOTHJubBPI+z/Pj//H+/0TGR66uf8sPoz8A/Kstkp38YORxFitmEVU1vm1cBPlp9ZuQXtX0jmfxygQgvxSWBRWlDECvhgrwQFuqLufG4TAtRCaAwCl+IcDXtWEi2KFb7pUFBxCBEpSMMsDWGWEiNzXLe2/BASp2cTuJH+KCRMJ3dGvsrzQQqafAtw0XpBEfIhc00/tswQD8QWM1FP45d4A8V9XJN9k5Nl4vRKoR8G3jMshdyebRPs0cOftaAaRUbAsRrRRRhuczFsF/lPATNQrL3Hr7/nz1lGvvtkwGUSEC8gLkWfMGkAfQMp9J0n8ByhS5J+QDVr+BshBlUu6q3d5v9G3jIcg3GgnJqp2C853iCIB1WU0a1F2iOO2tPnK3CLQ1aJZKLpCfddPrmtoF8uuqZn9iyfcEzVQumYtlQDO9vS8PsprHd4xvAR7I7FuHUIBvdNP9crr0lT7g24U+UNlfh1f6Esrn2ofeuVphbCPyneJuAN+lT0jokZCduum9cobM2Qn9krEGEa6+hi36jEC3aro34vASW3FoG9si8sdGRoKCY6rlnpjLIxGgYhunSPY0AiAiP+mW93EmAN8ujoJobwgAuKOb7orUAHKjY1EwHjwFkGsEoKpVJ6WVH3n/p1oDwVBhk0TK742GV/UKYOZMt5QKoGIbX5E8mgwg4wCbADQn1c1uPvP2gWqB7xjDADck7OwBVan0QFFyQaj2A9wxV60A13XT7Uw1Ar5TlDiBQP6hRHs0a3Ss9n8wuK4jYtN5Em/H6B5ppht7r4jvhEOFtYiUGQEAnhDoV033ZNJwB45xRAS9IBfX1qnhRD7uhhQLENiFQ0Ll9LSBCM7olnu43gUpTjEfiPSB3D6tUQRbcpZ7bbZHLEBYKnRFogxV505rmjzIrtG/6w2fMS0l430RHAVoULBZtdybdQFkCcuqSXUtzxqSpHsBfmUdgJhaiDQAAAAASUVORK5CYII=\"\n style=\"width: 16px;height: 16px;\">\n </ng-container>\n </ng-container>\n <ng-template #notPictureTemplate>\n <ng-container\n *ngIf=\"!isTextOverflow(selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name], selectOptionTableColumn.width);else overflowTemplate\">\n <div>{{ judgeColEmpty(selectOptionTableColumn.render ?\n selectOptionTableColumn.render(selectItem) :\n selectItem[selectOptionTableColumn.name])}}</div>\n </ng-container>\n <ng-template #overflowTemplate>\n <div class=\"hd-option-overflow\" nz-tooltip\n [nzTooltipTitle]=\"selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name]\">\n {{\n judgeColEmpty(selectOptionTableColumn.render ?\n selectOptionTableColumn.render(selectItem) :\n selectItem[selectOptionTableColumn.name])}}</div>\n </ng-template>\n </ng-template>\n </div>\n </div>\n </nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.value === 'code' || formItem.selectOption.value === 'productCode' || formItem.selectOption.hdShowItemCode) ? ('['+ line.get(formItem.selectOption.value).value + ']' + line.get(formItem.selectOption.label).value) : line.get(formItem.selectOption.label).value\"\n [nzValue]=\"line.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n <ng-template #nomarlSelectTemplate>\n <nz-select\n [nzShowSearch]=\"formItem.selectOption.hdShowSearch != null ? formItem.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"formItem.selectOption.hdAllowClear != null ? formItem.selectOption.hdAllowClear : true\"\n [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, formItem.onSearchEventEventDebounceTime)\"\n [ngStyle]=\"getStyle(line, formItem, '200px')\">\n <nz-option\n *ngFor=\"let selectItem of (formItem.selectOption.selectList || line.get(formItem.selectOption.selectListName).value)\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\">\n </nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.value === 'code' || formItem.selectOption.value === 'productCode' || formItem.selectOption.hdShowItemCode) ? ('['+ line.get(formItem.selectOption.value).value + ']' + line.get(formItem.selectOption.label).value) : line.get(formItem.selectOption.label).value\"\n [nzValue]=\"line.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n </ng-template>\n\n </ng-container>\n <ng-container *ngSwitchCase=\"2\">\n <nz-date-picker *ngIf=\"formItem.showTime\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\" nzShowTime\n nzFormat=\"yyyy-MM-dd HH:mm:ss\">\n </nz-date-picker>\n <nz-date-picker *ngIf=\"!formItem.showTime\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\">\n </nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"3\">\n <nz-range-picker [nzPlaceHolder]=\"['\u5F00\u59CB\u65E5\u671F','\u7ED3\u675F\u65E5\u671F']\" [formControlName]=\"formItem.name\">\n </nz-range-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"4\">\n <textarea\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name).value : null}\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [maxlength]=\"formItem.maxLength || null\" rows=\"4\" nz-input\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"></textarea>\n </ng-container>\n <ng-container *ngSwitchCase=\"5\">\n <div style=\"display: flex;align-items: center;\">\n <nz-input-number [ngStyle]=\"getStyle(line, formItem, '100px')\"\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"\n [nzMin]=\"formItem?.inputNumber?.min || 0\" [nzMax]=\"formItem?.inputNumber?.max || 99999999\"\n [nzStep]=\"formItem?.inputNumber?.step || 1\"\n [nzPrecision]=\"formItem?.inputNumber?.precision || 2\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [nzId]=\"'inputNumber-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#inputNumber-' + formItem.name + line.get('lineIndex').value) : null\">\n </nz-input-number>\n <div *ngIf=\"formItem?.explainOptionRight?.show\"\n [style.color]=\"formItem?.explainOptionRight?.color ? formItem.explainOptionRight.color : null\">\n {{line.get(formItem.explainOptionRight.name).value}}</div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"6\">\n <nz-select nzMode=\"multiple\" [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n [nzShowSearch]=\"formItem.selectOption.hdShowSearch != null ? formItem.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"formItem.selectOption.hdAllowClear != null ? formItem.selectOption.hdAllowClear : true\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, formItem.onSearchEventEventDebounceTime)\">\n <nz-option *ngFor=\"let selectItem of formItem.selectOption.selectList\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\"></nz-option>\n <ng-container\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\">\n <nz-option *ngFor=\"let option of line.get(formItem.selectOption.value).value;index as i\"\n [nzLabel]=\"line.get(formItem.selectOption.label).value[i]\" [nzValue]=\"option\" nzHide>\n </nz-option>\n </ng-container>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"7\">\n {{(formItem.preserveNumber && line.get(formItem.name).value) ?\n LodashRound(line.get(formItem.name).value,formItem.preserveNumber).toFixed(formItem.preserveNumber)\n : line.get(formItem.name).value}}\n </ng-container>\n <ng-container *ngSwitchCase=\"8\">\n <nz-switch [formControlName]=\"formItem.name\"></nz-switch>\n </ng-container>\n <ng-container *ngSwitchCase=\"9\">\n <nz-time-picker [formControlName]=\"formItem.name\"></nz-time-picker>\n </ng-container>\n </ng-container>\n </nz-form-control>\n </nz-form-item>\n <div *ngIf=\"formItem?.explainOption?.show\"\n [style.color]=\"formItem?.explainOption?.color ? formItem.explainOption.color : null\">\n {{line.get(formItem.explainOption.name).value}}</div>\n </td>\n </ng-container>\n <td style=\"width: 80px\" nzRight=\"0\">\n <span class=\"common-btn-group\">\n <a *ngIf=\"operateButtons.includes('add')\" (click)=\"addFormLine(line.get('lineIndex').value)\">\u6DFB\u52A0</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && !showDeleteConfirm\"\n (click)=\"deleteFormLine(line.get('lineIndex').value)\">\u5220\u9664</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && showDeleteConfirm\" nz-popconfirm\n nzPopconfirmTitle=\"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u884C\u5417?\" nzPopconfirmPlacement=\"bottom\"\n (nzOnConfirm)=\"deleteFormLine(line.get('lineIndex').value)\">\u5220\u9664</a>\n </span>\n </td>\n </tr>\n </ng-container>\n <!-- \u5408\u8BA1\u533A\u57DF -->\n <tr *ngIf=\"showTotal\" class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{ (totalOption.value || totalOption.value ===\n 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal ) ? totalOption.value :\n LodashRound(totalOption.value,2).toFixed(2)) : '' }} </td>\n </ng-container>\n </tr>\n </tbody>\n </nz-table>\n <nz-list\n *ngIf=\"linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize).length === 0\"\n [nzDataSource]=\"[]\"></nz-list>\n <ng-container>\n <hd-space background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n <nz-pagination [nzSize]=\"'small'\" style=\"text-align: right;\" [nzPageIndex]=\"paginationPageIndex\"\n [nzPageSize]=\"paginationPageSize\" [nzPageSizeOptions]=\"[10, 20, 30, 40, 50]\"\n [nzTotal]=\"linesFormArray.controls.length\" nzShowSizeChanger (nzPageIndexChange)=\"pageIndexChange($event)\"\n (nzPageSizeChange)=\"pageSizeChange($event)\" [nzShowTotal]=\"totalTemplate\"></nz-pagination>\n <ng-template #totalTemplate let-total>\u5171 {{linesFormArray.controls.length}} \u6761\u6570\u636E</ng-template>\n </ng-container>\n</form>",
|
|
2460
|
+
template: "<hd-button-group *ngIf=\"showForm && showSearch\">\n <ng-template #buttonGroupLeft>\n <nz-input-group [nzSuffix]=\"suffixIconSearch\">\n <input type=\"text\" nz-input (keyup.enter)=\"searchLines()\" placeholder=\"\u8BF7\u8F93\u5165\u5185\u5BB9\u641C\u7D22\" style=\"width: 300px;\"\n [(ngModel)]=\"filterStr\" />\n </nz-input-group>\n <ng-template #suffixIconSearch>\n <i nz-icon nzType=\"search\" (click)=\"searchLines()\"></i>\n </ng-template>\n </ng-template>\n</hd-button-group>\n<!-- TODO: \u6D4B\u8BD5\u6309\u94AE\u7EC4 -->\n<hd-button-group>\n <ng-template #buttonGroupLeft>\n <hd-button type=\"primary\" (clickAction)=\"testPage()\">\u6D4B\u8BD5\u7FFB\u9875\u6309\u94AE</hd-button>\n <hd-button type=\"primary\" (clickAction)=\"focusDom(0, 0)\">\u6D4B\u8BD5\u805A\u7126\u9009\u62E9\u6846</hd-button>\n <hd-button type=\"primary\" (clickAction)=\"focusDom(0, 2)\">\u6D4B\u8BD5\u805A\u7126\u666E\u901A\u9009\u62E9\u6846</hd-button>\n <hd-button type=\"primary\" (clickAction)=\"focusDom(0, 3)\">\u6D4B\u8BD5\u805A\u7126\u591A\u9879\u9009\u62E9\u6846</hd-button>\n <hd-button type=\"primary\" (clickAction)=\"focusDom(0, 4)\">\u6D4B\u8BD5\u805A\u7126\u7981\u7528\u8F93\u5165\u6846</hd-button>\n <hd-button type=\"primary\" (clickAction)=\"focusDom(0, 7)\">\u6D4B\u8BD5\u805A\u7126\u6570\u5B57\u8F93\u5165\u6846</hd-button>\n <hd-button type=\"primary\" (clickAction)=\"jumpToNextInput(0, 1)\">\u6D4B\u8BD5\u805A\u7126\u4E0B\u4E00\u4E2A</hd-button>\n </ng-template>\n</hd-button-group>\n\n<hd-space background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n<form *ngIf=\"showForm\" nz-form [formGroup]=\"validateHdFormLines\" class=\"ant-advanced-search-form hd-formLines-container\"\n (keydown)=\"onKeyDown($event)\">\n <nz-table nzTemplateMode [nzFrontPagination]=\"false\" [nzLoading]=\"tableLoading\" [nzScroll]=\"scroll\">\n <thead>\n <tr>\n <th nzWidth=\"58px\" nzLeft=\"0px\">\u5E8F\u53F7</th>\n <ng-container *ngFor=\"let item of formLines\">\n <th *ngIf=\"!item.hide\" [nzAlign]=\"item.align ? item.align : 'left'\">\n <span *ngIf=\"item.require\" style=\"color: red;\">*</span>{{item.label}}\n </th>\n </ng-container>\n <th style=\"width: 80px\" nzRight=\"0\">\u64CD\u4F5C</th>\n </tr>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let line of linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize);index as dataIndex\"\n formArrayName=\"lines\">\n <tr [formGroup]=\"line\">\n <td nzWidth=\"58px\" nzLeft=\"0px\">\n {{line.get('lineIndex').value}}\n </td>\n <ng-container *ngFor=\"let formItem of formLines; index as innerIndex\">\n <td *ngIf=\"!formItem.hide\" [nzAlign]=\"formItem.align ? formItem.align : 'left'\">\n <nz-form-item>\n <nz-form-control [nzErrorTip]=\"formItem.label + '\u4E0D\u80FD\u4E3A\u7A7A'\">\n <ng-container [ngSwitch]=\"formItem.type\">\n <ng-container *ngSwitchCase=\"'Input'\">\n <nz-input-group [nzSuffix]=\"inputCleanTemplate\">\n <input #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [ngStyle]=\"getStyle(line, formItem, '100px')\" nz-input\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name ).value : null}\"\n [id]=\"'input-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#input-' + formItem.name + line.get('lineIndex').value, dataIndex , innerIndex) : null\"\n [maxlength]=\"formItem.maxLength || null\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [formControlName]=\"formItem.name\" />\n </nz-input-group>\n <ng-template #inputCleanTemplate>\n <i nz-icon nz-tooltip class=\"ant-input-clear-icon\" nzTheme=\"fill\" nzType=\"close-circle\"\n *ngIf=\"line.get(formItem.name).value && !line.get(formItem.name).disabled\"\n (click)=\"inputClean(formItem ,line)\"></i>\n </ng-template>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Select'\">\n <nz-select #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n nzDropdownClassName=\"hd-select-table\"\n *ngIf=\"formItem.selectOption.tableColumns;else nomarlSelectTemplate\"\n [nzShowSearch]=\"formItem.selectOption.hdShowSearch != null ? formItem.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"formItem.selectOption.hdAllowClear != null ? formItem.selectOption.hdAllowClear : true\"\n [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, formItem.onSearchEventEventDebounceTime)\"\n [ngStyle]=\"getStyle(line, formItem, '200px')\">\n <nz-option nzCustomContent nzDisabled>\n <div class=\"hd-option-header\"\n *ngIf=\"(formItem.selectOption?.selectList?.length > 0 || line.get(formItem.selectOption.selectListName)?.value?.length > 0);else emptyTemplate\">\n <div class=\"hd-option-header-column\"\n *ngFor=\"let selectOptionTableColumn of formItem.selectOption.tableColumns;index as index \"\n [ngStyle]=\"{'width': selectOptionTableColumn?.width ? (selectOptionTableColumn.width + ((index === 0 && !selectOptionTableColumn.label) ? 12 : 0) + 'px') : 'unset'}\">\n {{selectOptionTableColumn.label}}\n </div>\n </div>\n <ng-template #emptyTemplate>\n <div class=\"hd-select-empty\">\n <img\n src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNjRweCIgaGVpZ2h0PSI0MXB4IiB2aWV3Qm94PSIwIDAgNjQgNDEiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjUgKDY3NDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00NzIuMDAwMDAwLCAtMTMzNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgIHRyYW5zZm9ybT0idHJhbnNsYXRlKDY0LjAwMDAwMCwgMTExNC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0MC4wMDAwMDAsIDc4LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnICB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjguMDAwMDAwLCAxNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxnID4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxlbGxpcHNlICBmaWxsPSIjRjVGNUY1IiBjeD0iMzIiIGN5PSIzMyIgcng9IjMyIiByeT0iNyI+PC9lbGxpcHNlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGcgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg5LjAwMDAwMCwgMC4wMDAwMDApIiBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0iI0Q5RDlEOSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTQ2LDEyLjc2MDU2MDQgTDM1Ljg1NDMwNDcsMS4yNTczOTYzMyBDMzUuMzY3NDQxNCwwLjQ3MzgyNjYwNSAzNC42NTU4Nzg5LDAgMzMuOTA2NzYxNywwIEwxMi4wOTMyMzgzLDAgQzExLjM0NDEyMTEsMCAxMC42MzI1NTg2LDAuNDczOTUwMjU1IDEwLjE0NTY5NTMsMS4yNTczOTYzMyBMMi42MTQ3OTcyN2UtMTIsMTIuNzYwNTYwNCBMMCwyMiBMNDYsMjIgTDQ2LDEyLjc2MDU2MDQgWiIgID48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTMyLjYxMzI4MTMsMTUuOTMxNSBDMzIuNjEzMjgxMywxNC4zMjU4NTExIDMzLjYwNjk1MzEsMTMuMDAwMjM0IDM0LjgzOTY5OTIsMTMgTDQ2LDEzIEw0NiwzMS4xMzcxMjc3IEM0NiwzMy4yNTg5NTc0IDQ0LjY3OTM4NjcsMzUgNDMuMDUwNDI5NywzNSBMMi45NDk1NzAzMSwzNSBDMS4zMjA1MjM0NCwzNSAwLDMzLjI1ODg0MDQgMCwzMS4xMzcxMjc3IEwwLDEzIEwxMS4xNjAzMDA4LDEzIEMxMi4zOTMwNDY5LDEzIDEzLjM4NjcxODgsMTQuMzIyODA4NSAxMy4zODY3MTg4LDE1LjkyODQ1NzQgTDEzLjM4NjcxODgsMTUuOTQ5NjM4MyBDMTMuMzg2NzE4OCwxNy41NTUyODcyIDE0LjM5MTcxMDksMTguODUxMTgwOSAxNS42MjQ0NTcsMTguODUxMTgwOSBMMzAuMzc1NTQzLDE4Ljg1MTE4MDkgQzMxLjYwODI4OTEsMTguODUxMTgwOSAzMi42MTMyODEzLDE3LjU0MzM1MTEgMzIuNjEzMjgxMywxNS45Mzc3MDIxIEwzMi42MTMyODEzLDE1LjkzMTUgWiIgIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+\"\n alt=\"empty\">\n <p class=\"ant-empty-description\">\u6682\u65E0\u6570\u636E</p>\n </div>\n </ng-template>\n </nz-option>\n\n <nz-option nzCustomContent\n *ngFor=\"let selectItem of (formItem.selectOption.selectList || line.get(formItem.selectOption.selectListName).value)\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\">\n <div class=\"hd-option-line\">\n <div *ngFor=\"let selectOptionTableColumn of formItem.selectOption.tableColumns\"\n [ngStyle]=\"{'width': selectOptionTableColumn?.width ? selectOptionTableColumn.width + 'px' : 'unset'}\">\n <ng-container *ngIf=\"selectOptionTableColumn.icons;else notPictureTemplate\">\n <ng-container *ngFor=\"let icon of selectOptionTableColumn.icons\">\n <img *ngIf=\"icon.iconName === 'hd-recommend-star' && selectItem[icon.fieldName]\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAVpJREFUOE+l07FLQkEcB/Dv7713Zg1GQ0SgW9AmTYVp1BRUokZBEI1u/QVBUBD1D0Rt0dQaPYmotXza1tKQzQ1Fk0iDHr5vPEOTUpO88e77+9zvjjtBh8HTOb8e0hu0eN8Xzz22ikonoGzHdgXcAVB16S75U/mbn/m2AK+mglqbBUAGvCIRuVCJ7HLXQCUTPQOxXi8Q4FolnYWuAH0+HaEpjrdxAyC3VSq33xKgPTWiYYUai8IjUCabw4Zw1XWNF2+OZrXoi+cLImBth4odfQAw0elCW6zdKvU2/wVkYs8ggzBlRqrcI/DrrK1wQ7DWAIToV8lsqGxHDwTY6qYbA1jpCVAux3oBSirhDPYCOL6kE/s/QB77UrnNJoDDVkCN6pI+BJH+6xINQdpKOCf1d/AEYBxgUUQC5PcLbPMDXy1lhGXx7r0G6ExklpBwI0xh2w7ID+UzL71iL/MJdzuZdDL/kXcAAAAASUVORK5CYII=\"\n style=\"width: 16px;height: 16px;\">\n <img *ngIf=\"icon.iconName === 'hd-img-star' && selectItem[icon.fieldName]\"\n src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAyhJREFUWEe1ll1o1XYYxp8nPUmUihdCV3bAirvYzUC80Xpy3KwTZNR2CdOhDkTBwe6G32XzwqpjE3Qt4pUKZQqDyQZNTp1uY8yCJG0F2d2+LlWOOkShovQkaV45lcJpTdOTHJubBPI+z/Pj//H+/0TGR66uf8sPoz8A/Kstkp38YORxFitmEVU1vm1cBPlp9ZuQXtX0jmfxygQgvxSWBRWlDECvhgrwQFuqLufG4TAtRCaAwCl+IcDXtWEi2KFb7pUFBxCBEpSMMsDWGWEiNzXLe2/BASp2cTuJH+KCRMJ3dGvsrzQQqafAtw0XpBEfIhc00/tswQD8QWM1FP45d4A8V9XJN9k5Nl4vRKoR8G3jMshdyebRPs0cOftaAaRUbAsRrRRRhuczFsF/lPATNQrL3Hr7/nz1lGvvtkwGUSEC8gLkWfMGkAfQMp9J0n8ByhS5J+QDVr+BshBlUu6q3d5v9G3jIcg3GgnJqp2C853iCIB1WU0a1F2iOO2tPnK3CLQ1aJZKLpCfddPrmtoF8uuqZn9iyfcEzVQumYtlQDO9vS8PsprHd4xvAR7I7FuHUIBvdNP9crr0lT7g24U+UNlfh1f6Esrn2ofeuVphbCPyneJuAN+lT0jokZCduum9cobM2Qn9krEGEa6+hi36jEC3aro34vASW3FoG9si8sdGRoKCY6rlnpjLIxGgYhunSPY0AiAiP+mW93EmAN8ujoJobwgAuKOb7orUAHKjY1EwHjwFkGsEoKpVJ6WVH3n/p1oDwVBhk0TK742GV/UKYOZMt5QKoGIbX5E8mgwg4wCbADQn1c1uPvP2gWqB7xjDADck7OwBVan0QFFyQaj2A9wxV60A13XT7Uw1Ar5TlDiBQP6hRHs0a3Ss9n8wuK4jYtN5Em/H6B5ppht7r4jvhEOFtYiUGQEAnhDoV033ZNJwB45xRAS9IBfX1qnhRD7uhhQLENiFQ0Ll9LSBCM7olnu43gUpTjEfiPSB3D6tUQRbcpZ7bbZHLEBYKnRFogxV505rmjzIrtG/6w2fMS0l430RHAVoULBZtdybdQFkCcuqSXUtzxqSpHsBfmUdgJhaiDQAAAAASUVORK5CYII=\"\n style=\"width: 16px;height: 16px;\">\n </ng-container>\n </ng-container>\n <ng-template #notPictureTemplate>\n <ng-container\n *ngIf=\"!isTextOverflow(selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name], selectOptionTableColumn.width);else overflowTemplate\">\n <div>{{ judgeColEmpty(selectOptionTableColumn.render ?\n selectOptionTableColumn.render(selectItem) :\n selectItem[selectOptionTableColumn.name])}}</div>\n </ng-container>\n <ng-template #overflowTemplate>\n <div class=\"hd-option-overflow\" nz-tooltip\n [nzTooltipTitle]=\"selectOptionTableColumn.render ? selectOptionTableColumn.render(selectItem) : selectItem[selectOptionTableColumn.name]\">\n {{\n judgeColEmpty(selectOptionTableColumn.render ?\n selectOptionTableColumn.render(selectItem) :\n selectItem[selectOptionTableColumn.name])}}</div>\n </ng-template>\n </ng-template>\n </div>\n </div>\n </nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.value === 'code' || formItem.selectOption.value === 'productCode' || formItem.selectOption.hdShowItemCode) ? ('['+ line.get(formItem.selectOption.value).value + ']' + line.get(formItem.selectOption.label).value) : line.get(formItem.selectOption.label).value\"\n [nzValue]=\"line.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n <ng-template #nomarlSelectTemplate>\n <nz-select #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [nzShowSearch]=\"formItem.selectOption.hdShowSearch != null ? formItem.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"formItem.selectOption.hdAllowClear != null ? formItem.selectOption.hdAllowClear : true\"\n [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, formItem.onSearchEventEventDebounceTime)\"\n [ngStyle]=\"getStyle(line, formItem, '200px')\">\n <nz-option\n *ngFor=\"let selectItem of (formItem.selectOption.selectList || line.get(formItem.selectOption.selectListName).value)\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\">\n </nz-option>\n <nz-option\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\"\n [nzLabel]=\"(formItem.selectOption.value === 'code' || formItem.selectOption.value === 'productCode' || formItem.selectOption.hdShowItemCode) ? ('['+ line.get(formItem.selectOption.value).value + ']' + line.get(formItem.selectOption.label).value) : line.get(formItem.selectOption.label).value\"\n [nzValue]=\"line.get(formItem.selectOption.value).value\" nzHide></nz-option>\n </nz-select>\n </ng-template>\n\n </ng-container>\n <ng-container *ngSwitchCase=\"'Date'\">\n <nz-date-picker #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n *ngIf=\"formItem.showTime\" [ngStyle]=\"getStyle(line, formItem, '150px')\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\" nzShowTime\n nzFormat=\"yyyy-MM-dd HH:mm:ss\">\n </nz-date-picker>\n <nz-date-picker #formInputDom *ngIf=\"!formItem.showTime\"\n [ngStyle]=\"getStyle(line, formItem, '150px')\"\n (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [nzDisabledDate]=\"formItem.hdDisabledDate\">\n </nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'DateRange'\">\n <nz-range-picker #formInputDom [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\" [nzPlaceHolder]=\"['\u5F00\u59CB\u65E5\u671F','\u7ED3\u675F\u65E5\u671F']\"\n [formControlName]=\"formItem.name\">\n </nz-range-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'TextArea'\">\n <textarea #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [ngStyle]=\"{'color': formItem?.colorOption?.name ? line.get(formItem.colorOption.name).value : null}\"\n [placeholder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [maxlength]=\"formItem.maxLength || null\" rows=\"4\" nz-input\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"></textarea>\n </ng-container>\n <ng-container *ngSwitchCase=\"'InputNumber'\">\n <div style=\"display: flex;align-items: center;\">\n <nz-input-number #formInputDom [ngStyle]=\"getStyle(line, formItem, '100px')\"\n [maxlength]=\"formItem.maxLength || null\" [formControlName]=\"formItem.name\"\n [nzMin]=\"formItem?.inputNumber?.min || 0\" [nzMax]=\"formItem?.inputNumber?.max || 99999999\"\n [nzStep]=\"formItem?.inputNumber?.step || 1\"\n [nzPrecision]=\"formItem?.inputNumber?.precision || 2\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u8F93\u5165' + formItem.label\"\n [nzId]=\"'inputNumber-' + formItem.name + line.get('lineIndex').value\"\n (click)=\"formItem.isSelect ? selectValue('#inputNumber-' + formItem.name + line.get('lineIndex').value, dataIndex , innerIndex) : setActiveDomInFormLines(dataIndex , innerIndex)\">\n </nz-input-number>\n <div *ngIf=\"formItem?.explainOptionRight?.show\"\n [style.color]=\"formItem?.explainOptionRight?.color ? formItem.explainOptionRight.color : null\">\n {{line.get(formItem.explainOptionRight.name).value}}</div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'MultipleSelect'\">\n <nz-select #formInputDom (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n nzMode=\"multiple\" [nzServerSearch]=\"formItem.selectOption.hdServerSearch || false\"\n [nzDropdownMatchSelectWidth]=\"formItem.selectOption.hdDropdownMatchSelectWidth ? formItem.selectOption.hdDropdownMatchSelectWidth : false\"\n [nzShowSearch]=\"formItem.selectOption.hdShowSearch != null ? formItem.selectOption.hdShowSearch : true\"\n [nzAllowClear]=\"formItem.selectOption.hdAllowClear != null ? formItem.selectOption.hdAllowClear : true\"\n [nzPlaceHolder]=\"formItem.placeholder ? formItem.placeholder : '\u8BF7\u9009\u62E9' + formItem.label\"\n [formControlName]=\"formItem.name\" [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (nzOnSearch)=\"onSearchEvent(formItem.onSearchEvent || null, $event, line, formItem.onSearchEventEventDebounceTime)\">\n <nz-option *ngFor=\"let selectItem of formItem.selectOption.selectList\"\n [nzValue]=\"selectItem[formItem.selectOption.value]\" [nzLabel]=\"formItem.selectOption.showLabelAndValue ? '['+ selectItem[formItem.selectOption.value] +']' +\n selectItem[formItem.selectOption.label] : selectItem[formItem.selectOption.label]\"></nz-option>\n <ng-container\n *ngIf=\"formItem.selectOption.label && line.get(formItem.name) && line.get(formItem.selectOption.label)?.value && line.get(formItem.selectOption.value)?.value\">\n <nz-option *ngFor=\"let option of line.get(formItem.selectOption.value).value;index as i\"\n [nzLabel]=\"line.get(formItem.selectOption.label).value[i]\" [nzValue]=\"option\" nzHide>\n </nz-option>\n </ng-container>\n </nz-select>\n </ng-container>\n <ng-container *ngSwitchCase=\"'ViewDom'\">\n {{(formItem.preserveNumber && line.get(formItem.name).value) ?\n LodashRound(line.get(formItem.name).value,formItem.preserveNumber).toFixed(formItem.preserveNumber)\n : line.get(formItem.name).value}}\n </ng-container>\n <ng-container *ngSwitchCase=\"'Switch'\">\n <nz-switch (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [formControlName]=\"formItem.name\"></nz-switch>\n </ng-container>\n <ng-container *ngSwitchCase=\"'Time' \">\n <nz-time-picker #formInputDom [ngStyle]=\"getStyle(line, formItem, '200px')\"\n (click)=\"setActiveDomInFormLines(dataIndex , innerIndex)\"\n [formControlName]=\"formItem.name\"></nz-time-picker>\n </ng-container>\n </ng-container>\n </nz-form-control>\n </nz-form-item>\n <div *ngIf=\"formItem?.explainOption?.show\"\n [style.color]=\"formItem?.explainOption?.color ? formItem.explainOption.color : null\">\n {{line.get(formItem.explainOption.name).value}}</div>\n </td>\n </ng-container>\n <td style=\"width: 80px\" nzRight=\"0\">\n <span class=\"common-btn-group\">\n <a *ngIf=\"operateButtons.includes('add')\" (click)=\"addFormLine(line.get('lineIndex').value)\">\u6DFB\u52A0</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && !showDeleteConfirm\"\n (click)=\"deleteFormLine(line.get('lineIndex').value)\">\u5220\u9664</a>\n <a class=\"common-danger-btn\" *ngIf=\"operateButtons.includes('delete') && showDeleteConfirm\" nz-popconfirm\n nzPopconfirmTitle=\"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u884C\u5417?\" nzPopconfirmPlacement=\"bottom\"\n (nzOnConfirm)=\"deleteFormLine(line.get('lineIndex').value)\">\u5220\u9664</a>\n </span>\n </td>\n </tr>\n </ng-container>\n <!-- \u5408\u8BA1\u533A\u57DF -->\n <tr *ngIf=\"showTotal\" class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let totalOption of totalOptionList\">\n <td [nzAlign]=\"totalOption.align ? totalOption.align : 'left'\">{{ (totalOption.value || totalOption.value ===\n 0) ? (((totalOption.value % 1 === 0) && !totalOption.showDecimal ) ? totalOption.value :\n LodashRound(totalOption.value,2).toFixed(2)) : '' }} </td>\n </ng-container>\n </tr>\n </tbody>\n </nz-table>\n <nz-list\n *ngIf=\"linesFormArray.controls.slice((paginationPageIndex - 1) * paginationPageSize, (paginationPageIndex - 1) * paginationPageSize + paginationPageSize).length === 0\"\n [nzDataSource]=\"[]\"></nz-list>\n <ng-container>\n <hd-space background=\"transparent\" type=\"row\" size=\"16\"></hd-space>\n <nz-pagination [nzSize]=\"'small'\" style=\"text-align: right;\" [nzPageIndex]=\"paginationPageIndex\"\n [nzPageSize]=\"paginationPageSize\" [nzPageSizeOptions]=\"[2, 10, 20, 30, 40, 50]\"\n [nzTotal]=\"linesFormArray.controls.length\" nzShowSizeChanger (nzPageIndexChange)=\"pageIndexChange($event)\"\n (nzPageSizeChange)=\"pageSizeChange($event)\" [nzShowTotal]=\"totalTemplate\"></nz-pagination>\n <ng-template #totalTemplate let-total>\u5171 {{linesFormArray.controls.length}} \u6761\u6570\u636E</ng-template>\n </ng-container>\n</form>",
|
|
1860
2461
|
styles: ["::ng-deep .common-btn-group>a{font-size:12px;font-weight:400;color:#12a34f!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset}::ng-deep .ant-form-item-label>label{color:#4b504e}::ng-deep .ant-input-number-input{height:28px}::ng-deep .ant-input-number{height:28px}textarea.ant-input{height:auto;min-height:28px}::ng-deep .ant-select-selection--multiple{min-height:28px}::ng-deep .ant-select-selection__rendered>ul>li{height:22px!important;margin-top:3px!important;line-height:22px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:28px!important}::ng-deep .ant-input{height:28px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:28px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:12px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:12px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-time-picker{width:100%}.hd-formLines-container ::ng-deep td{padding:1.5px 8px!important}.hd-formLines-container .ant-table-tbody>tr>td,.hd-formLines-container ::ng-deep .ant-table-thead>tr>th{padding:16px 8px}.hd-formLines-container ::ng-deep .hd-table-total>td{border:0!important}.hd-formLines-container .ant-input-number{width:100%}::ng-deep .hd-select-table .ant-select-dropdown-menu-item-disabled{background:#f5f8f6!important;border-bottom:1px solid #e8e8e8;position:-webkit-sticky;position:sticky;top:0;z-index:10;padding:0}::ng-deep .hd-select-table .ant-select-dropdown-menu-item-disabled:hover{background:#f5f8f6!important}.hd-option-header{display:flex;align-items:center;color:rgba(0,0,0,.85);background:#f5f8f6}.hd-option-header-column{padding:5px 0}.hd-option-line{display:flex;align-items:center}.hd-option-overflow{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.hd-select-empty{display:flex;align-items:center;flex-direction:column;padding:20px 0;background:#fff}::ng-deep .ant-empty-small{background:#fff!important;padding:8px 0;margin:0}"]
|
|
1861
2462
|
}] }
|
|
1862
2463
|
];
|
|
1863
2464
|
/** @nocollapse */
|
|
1864
2465
|
HdFormLinesComponent.ctorParameters = () => [
|
|
1865
|
-
{ type: FormBuilder }
|
|
2466
|
+
{ type: FormBuilder },
|
|
2467
|
+
{ type: ChangeDetectorRef }
|
|
1866
2468
|
];
|
|
1867
2469
|
HdFormLinesComponent.propDecorators = {
|
|
2470
|
+
formInputDomList: [{ type: ViewChildren, args: ['formInputDom',] }],
|
|
1868
2471
|
tableLoading: [{ type: Input }],
|
|
1869
2472
|
showSearch: [{ type: Input }],
|
|
1870
2473
|
formLines: [{ type: Input }],
|
|
@@ -1894,6 +2497,8 @@ __decorate([
|
|
|
1894
2497
|
__metadata("design:type", Boolean)
|
|
1895
2498
|
], HdFormLinesComponent.prototype, "showTotal", void 0);
|
|
1896
2499
|
if (false) {
|
|
2500
|
+
/** @type {?} */
|
|
2501
|
+
HdFormLinesComponent.prototype.formInputDomList;
|
|
1897
2502
|
/** @type {?} */
|
|
1898
2503
|
HdFormLinesComponent.prototype.tableLoading;
|
|
1899
2504
|
/** @type {?} */
|
|
@@ -1957,6 +2562,16 @@ if (false) {
|
|
|
1957
2562
|
* @private
|
|
1958
2563
|
*/
|
|
1959
2564
|
HdFormLinesComponent.prototype.searchSubscription;
|
|
2565
|
+
/** @type {?} */
|
|
2566
|
+
HdFormLinesComponent.prototype.collectDomList;
|
|
2567
|
+
/** @type {?} */
|
|
2568
|
+
HdFormLinesComponent.prototype.activeDomX;
|
|
2569
|
+
/** @type {?} */
|
|
2570
|
+
HdFormLinesComponent.prototype.activeDomY;
|
|
2571
|
+
/** @type {?} */
|
|
2572
|
+
HdFormLinesComponent.prototype.activeDom;
|
|
2573
|
+
/** @type {?} */
|
|
2574
|
+
HdFormLinesComponent.prototype.activeSelectedComponentOpen;
|
|
1960
2575
|
/**
|
|
1961
2576
|
* @type {?}
|
|
1962
2577
|
* @private
|
|
@@ -1967,6 +2582,11 @@ if (false) {
|
|
|
1967
2582
|
* @private
|
|
1968
2583
|
*/
|
|
1969
2584
|
HdFormLinesComponent.prototype.fb;
|
|
2585
|
+
/**
|
|
2586
|
+
* @type {?}
|
|
2587
|
+
* @private
|
|
2588
|
+
*/
|
|
2589
|
+
HdFormLinesComponent.prototype.cdr;
|
|
1970
2590
|
}
|
|
1971
2591
|
|
|
1972
2592
|
/**
|
|
@@ -3151,8 +3771,6 @@ class HdTableComponent {
|
|
|
3151
3771
|
* @return {?}
|
|
3152
3772
|
*/
|
|
3153
3773
|
ngOnInit() {
|
|
3154
|
-
console.log('local', location);
|
|
3155
|
-
console.log('window', window);
|
|
3156
3774
|
this.localtionTmp = location.pathname;
|
|
3157
3775
|
if (this.localtionTmp) {
|
|
3158
3776
|
this.localtionTmp = this.localtionTmp.replace(/\//g, "_");
|
|
@@ -3863,7 +4481,7 @@ HdTableComponent.decorators = [
|
|
|
3863
4481
|
{ type: Component, args: [{
|
|
3864
4482
|
selector: 'hd-table',
|
|
3865
4483
|
template: "<ng-container>\n <hd-button-group>\n <ng-template #buttonGroupLeft>\n <ng-container *ngTemplateOutlet=\"tableLeftButton\"></ng-container>\n <hd-button *ngIf=\"showOperateColWarpButton\" type=\"default\" (click)=\"showDetail = !showDetail\">{{showDetail ?\n '\u7F29\u7565\u663E\u793A': '\u5C55\u5F00\u663E\u793A'}}</hd-button>\n </ng-template>\n <ng-template #buttonGroupRight>\n <ng-container *ngTemplateOutlet=\"tableRightButton\"></ng-container>\n <hd-button type=\"primary\" nz-dropdown nzTrigger=\"click\" [nzDropdownMenu]=\"menu\" (clickAction)=\"confirmDropdown()\"\n [nzVisible]=\"isDropdownVisible\">\u8BBE\u7F6E\u5217</hd-button>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <div style=\"max-height: 400px;overflow-y: scroll;\">\n <div *ngIf=\"showListNodes && nowListNodes.length > 0\" nz-menu style=\"padding: 5px 10px;\">\n <nz-tree *ngIf=\"showListNodes\" [nzData]=\"nowListNodes\" nzCheckable nzDraggable nzBlockNode\n nzShowExpand=\"false\" (nzCheckBoxChange)=\"checkAction($event)\" [nzBeforeDrop]=\"beforeDrop\"\n [nzTreeTemplate]=\"nzTreeTemplate\">\n </nz-tree>\n <ng-template #nzTreeTemplate let-node>\n <span\n class=\"ng-tns-c31-110 draggable ng-star-inserted ant-tree-node-content-wrapper ant-tree-node-content-wrapper-close\"\n [title]=\"node.key\" draggable=\"true\" aria-grabbed=\"true\">\n <span class=\"ant-tree-title\">\n <div class=\"hd-table-tree-node\">\n <span>{{node.key}}</span>\n <div *ngIf=\"!node.origin.disabled\" class=\"hd-table-tree-node-img\">\n <i nz-icon nzType=\"caret-up\" nzTheme=\"outline\"></i>\n <i nz-icon nzType=\"caret-down\" nzTheme=\"outline\"></i>\n </div>\n </div>\n </span>\n </span>\n </ng-template>\n </div>\n <div *ngIf=\"showListNodes && hideListNodes.length > 0\" nz-menu style=\"padding: 5px 10px;\">\n <nz-tree *ngIf=\"showListNodes\" [nzData]=\"hideListNodes\" nzCheckable nzShowExpand=\"false\"\n (nzCheckBoxChange)=\"checkAction($event)\">\n </nz-tree>\n </div>\n </div>\n <div style=\"text-align: right;background: #fff;padding: 4px;\">\n <hd-button style=\"margin-right: 4px;\" type=\"default\" size=\"small\" (clickAction)=\"cancelDropdown()\">\u53D6\u6D88\n </hd-button>\n <hd-button type=\"primary\" size=\"small\" (clickAction)=\"submitGrids()\">\u5B8C\u6210</hd-button>\n </div>\n </nz-dropdown-menu>\n </ng-template>\n </hd-button-group>\n <hd-space type=\"row\" size=\"12\"></hd-space>\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n <hd-space *ngIf=\"tableTotal\" type=\"row\" size=\"12\"></hd-space>\n <nz-table *ngIf=\"showTable\" #hdTable class=\"hd-table-container\" [nzScroll]=\"scroll\" nzShowSizeChanger\n nzShowSizeChanger nzShowQuickJumper nzFrontPagination=\"false\" nzSize=\"middle\" [nzData]=\"tableData.content\"\n [nzTotal]=\"tableData.totalElements\" [(nzPageIndex)]=\"tablePageIndex\" [nzLoading]=\"tableLoading\"\n [nzPageSizeOptions]=\"[ 10, 50, 100, 200 ]\" [(nzPageSize)]=\"tablePageSize\" (nzPageSizeChange)=\"search(true)\"\n (nzPageIndexChange)=\"search(false)\" (nzCurrentPageDataChange)=\"showSelected ? currentPageDataChange($event) : null\"\n [nzShowTotal]=\"tableTotalTemplate\">\n <thead (nzSortChange)=\"sort($event)\" nzSingleSort>\n <tr>\n <th nzWidth=\"40px\" nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"isAllDisplayDataChecked\"\n [nzIndeterminate]=\"isIndeterminate\" (nzCheckedChange)=\"checkAll($event)\"></th>\n <ng-container *ngFor=\"let col of tableCols\">\n <th *ngIf=\"col.isShow\" [nzWidth]=\"col.width + 'px'\" [nzAlign]=\"col.align\"\n [nzLeft]=\"col.fixed === 'left' ? col.fixedWidth + 'px' : null\"\n [nzRight]=\"col.fixed === 'right' ? 0 + 'px' : null\" nz-resizable nzBounds=\"window\" nzPreview\n (nzResizeEnd)=\"onResize($event, col)\" [nzShowSort]=\"col.canSort\" [nzSortKey]=\"col.name\">\n {{ col.title }}\n <nz-resize-handle nzDirection=\"right\">\n <div class=\"resize-trigger\"></div>\n </nz-resize-handle>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let data of hdTable.data;index as i\">\n <td nzLeft=\"0px\" *ngIf=\"showSelected\" nzShowCheckbox [(nzChecked)]=\"mapOfCheckedId[data[selectField]]\"\n (nzCheckedChange)=\"refreshStatus($event, data)\"></td>\n <ng-container *ngFor=\"let col of tableCols\">\n <td *ngIf=\"col.isShow\" [ngStyle]=\"{'max-width': col.width + 'px'}\" [nzAlign]=\"col.align\"\n [nzLeft]=\"col.fixed === 'left' ? col.fixedWidth + 'px' : null\"\n [nzRight]=\"col.fixed === 'right' ? 0 + 'px' : null\"\n [ngClass]=\"(col.canWarp && showDetail) ? 'common-td-wrap' : ''\">\n <ng-container *ngIf=\"col.title === '\u64CD\u4F5C';else notOperateTemplate\">\n <div class=\"common-btn-group\">\n <ng-container *ngFor=\"let btn of col.btnList\">\n <ng-container *ngIf=\"!btn.showConfirm;else showConfirmTemplate\">\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"btn.name === '\u5220\u9664' ? 'common-danger-btn': ''\"\n (click)=\"triggerEvent(btn.click || null, data)\">{{ btn.name }}</a>\n </ng-container>\n <ng-template #showConfirmTemplate>\n <a *ngIf=\"btn.permission ? btn.permission(data) : true\"\n [class]=\"btn.name === '\u5220\u9664' ? 'common-danger-btn': ''\" nz-popconfirm\n [nzPopconfirmTitle]=\"'\u786E\u8BA4\u8981' + btn.name + '\u5417?'\"\n (nzOnConfirm)=\"triggerEvent(btn.click || null, data)\">{{\n btn.name }}</a>\n </ng-template>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #notOperateTemplate>\n <ng-container *ngIf=\"col.name === 'state';else otherTemplate\">\n <hd-status [status]=\"data['state']\">{{ judgeColEmpty(col.render ? col.render(data) : data['state'])}}\n </hd-status>\n </ng-container>\n <ng-template #otherTemplate>\n <ng-container *ngIf=\"col.click;else noClickTemplate\">\n <ng-container\n *ngIf=\"!isTextOverflow(col.render ? col.render(data) : data[col.name], col.width);else overflowTemplate\">\n <a [ngStyle]=\"{'color': col?.color ? col.color : null}\"\n (click)=\"triggerEvent(col.click || null, data)\">{{ judgeColEmpty(col.render ? col.render(data) :\n data[col.name])}}</a>\n </ng-container>\n <ng-template #overflowTemplate>\n <a [ngStyle]=\"{'color': col?.color ? col.color : null}\" nz-tooltip\n [nzTooltipTitle]=\"col.render ? col.render(data) : data[col.name]\"\n (click)=\"triggerEvent(col.click || null, data)\">{{ judgeColEmpty(col.render ? col.render(data) :\n data[col.name])}}</a>\n </ng-template>\n </ng-container>\n <ng-template #noClickTemplate>\n <ng-container\n *ngIf=\"!isTextOverflow(col.render ? col.render(data) : data[col.name], col.width);else overflowTemplate\">\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\">{{ judgeColEmpty(col.render ?\n col.render(data) :\n data[col.name])}}</span>\n </ng-container>\n <ng-template #overflowTemplate>\n <span [ngStyle]=\"{'color': col?.color ? col.color : null}\" nz-tooltip\n [nzTooltipTitle]=\"col.render ? col.render(data) : data[col.name]\">\n {{ judgeColEmpty(col.render ? col.render(data) : data[col.name])}}</span>\n </ng-template>\n </ng-template>\n </ng-template>\n </ng-template>\n </td>\n </ng-container>\n </tr>\n <!-- \u5408\u8BA1\u6240\u6709\u6570\u636E\u533A\u57DF \u9700\u8981\u540E\u7AEF\u63A5\u53E3\u914D\u5408 -->\n <tr *ngIf=\"showTableTotal\" class=\"hd-table-total\">\n <td>\u5408\u8BA1</td>\n <ng-container *ngFor=\"let tableTotalOption of tableTotalOptionList\">\n <td>{{ tableTotalOption }}</td>\n </ng-container>\n </tr>\n </tbody>\n <ng-template #tableTotalTemplate>\n \u5171 {{tableData.totalElements}} \u6761\u6570\u636E\n </ng-template>\n </nz-table>\n</ng-container>",
|
|
3866
|
-
styles: ["::ng-deep .common-btn-group>a{font-size:12px;font-weight:400;color:#12a34f!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset;padding:0 6px!important}::ng-deep .ant-form-item-label>label{color:#4b504e}::ng-deep .ant-input-number-input{height:28px}::ng-deep .ant-input-number{height:28px}textarea.ant-input{height:auto;min-height:28px}::ng-deep .ant-select-selection--multiple{min-height:28px}::ng-deep .ant-select-selection__rendered>ul>li{height:22px!important;margin-top:3px!important;line-height:22px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:28px!important}::ng-deep .ant-input{height:28px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:28px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:12px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:12px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-time-picker{width:100%}.nz-resizable-preview{position:absolute;top:0;left:0;z-index:8;border:1px dashed #d1d1d1}.nz-resizable-handle{position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9}.nz-resizable-handle-top{width:100%;height:10px;top:-5px;left:0}.nz-resizable-handle-right{height:100%}.nz-resizable-handle-bottom{width:100%;height:10px;bottom:-5px;left:0}.nz-resizable-handle-left{width:10px;height:100%;top:0;left:-5px}.nz-resizable-handle-topRight{width:20px;height:20px;top:-5px;right:-5px;z-index:10}.nz-resizable-handle-bottomRight{width:20px;height:20px;right:-5px;bottom:-5px;z-index:10}.nz-resizable-handle-bottomLeft{width:20px;height:20px;bottom:-5px;left:-5px;z-index:10}.nz-resizable-handle-topLeft{width:20px;height:20px;top:-5px;left:-5px;z-index:10}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottom,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-top{cursor:row-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-left,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-right{cursor:col-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottomRight,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-topLeft{cursor:nwse-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottomLeft,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-topRight{cursor:nesw-resize}.hd-table-container ::ng-deep .ant-pagination-options-quick-jumper input{border-radius:2px;border:1px solid #d9d9d9}.hd-table-container ::ng-deep .ant-pagination-options .ant-select-selection{border-radius:2px}.hd-table-container ::ng-deep .ant-table-thead>tr>th{border-bottom:1px solid #ecf1ed;white-space:nowrap;text-overflow:ellipsis}.hd-table-container ::ng-deep .ant-table-tbody>tr>td{border-bottom:1px solid #ecf1ed;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.hd-table-container ::ng-deep .hd-table-total>td{border:0!important}::ng-deep .ant-dropdown-menu{border-radius:0}::ng-deep .ant-dropdown{margin-top:8px!important}.common-td-wrap{white-space:normal!important}.nz-resizable-preview{border-width:0 1px 0 0}.resize-trigger{width:10px;height:15px;position:relative;top:calc((100% - 15px)/ 2)}.resize-trigger::after{position:absolute;top:calc((100% - 15px)/ 2);left:0;background:#d5d5d5;content:'';width:1px;height:15px;z-index:1}.nz-resizable-handle-right{position:absolute;width:10px;top:0;right:-5px;z-index:inherit}.hd-table-tree-node{display:inline-flex;align-items:center;padding-right:10px}.hd-table-tree-node .hd-table-tree-node-img{display:flex;flex-direction:column;position:absolute;right:0;margin-top:-2.5px}.hd-table-tree-node .hd-table-tree-node-img i{opacity:.3}.hd-table-tree-node .hd-table-tree-node-img i:last-child{margin-top:-5px}img{width:20px;height:20px}.ant-table-th-left-sticky{z-index:2}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}"]
|
|
4484
|
+
styles: ["::ng-deep .common-btn-group>a{font-size:12px;font-weight:400;color:#12a34f!important;white-space:nowrap}::ng-deep .common-btn-group .common-danger-btn:hover{color:#f05b24!important}::ng-deep .common-btn-group>a:hover{color:#20bd62!important}::ng-deep .common-btn-group>a:not(:last-child)::after{content:'';margin:0 2px}::ng-deep .common-billNumber>a{color:#3b77e3}button{box-shadow:unset;text-shadow:unset;padding:0 6px!important}::ng-deep .ant-form-item-label>label{color:#4b504e}::ng-deep .ant-input-number-input{height:28px}::ng-deep .ant-input-number{height:28px}textarea.ant-input{height:auto;min-height:28px}::ng-deep .ant-select-selection--multiple{min-height:28px}::ng-deep .ant-select-selection__rendered>ul>li{height:22px!important;margin-top:3px!important;line-height:22px!important}::ng-deep .ant-advanced-search-form .ant-form-item{margin-bottom:0!important}::ng-deep .ant-select-selection--single{height:28px!important}::ng-deep .ant-input{height:28px}::ng-deep .ant-input[disabled]:hover{border-color:#d9d9d9!important}::ng-deep .ant-select-selection__rendered{line-height:28px!important}::ng-deep .ant-calendar-range-picker-input{text-align:left!important}::ng-deep .ant-calendar-picker{width:100%!important}::ng-deep .ant-row{margin-right:0!important;margin-left:0!important}::ng-deep .ant-col-6{padding-left:12px;padding-right:12px}::ng-deep .ant-col-12{padding-left:12px;padding-right:12px}::ng-deep .ant-col-18{padding-left:12px;padding-right:12px}::ng-deep .ant-col-24{padding-left:12px;padding-right:12px}::ng-deep .ant-alert-info{background-color:#f5f8f6;border:1px solid #cfe3d4}:host ::ng-deep th{background:#f5f8f6!important;font-weight:700!important;white-space:nowrap;font-size:12px;font-family:PingFangSC-Medium,PingFang SC;color:#2a3634;padding:8px!important;box-sizing:border-box}:host ::ng-deep td{font-weight:400;font-style:normal;font-size:12px;color:#2a3634;text-align:left;white-space:nowrap;padding:8px!important;box-sizing:border-box}::ng-deep .ant-pagination-options{display:inline-flex;align-items:center}::ng-deep .ant-time-picker{width:100%}.nz-resizable-preview{position:absolute;top:0;left:0;z-index:8;border:1px dashed #d1d1d1}.nz-resizable-handle{position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:9}.nz-resizable-handle-top{width:100%;height:10px;top:-5px;left:0}.nz-resizable-handle-right{height:100%}.nz-resizable-handle-bottom{width:100%;height:10px;bottom:-5px;left:0}.nz-resizable-handle-left{width:10px;height:100%;top:0;left:-5px}.nz-resizable-handle-topRight{width:20px;height:20px;top:-5px;right:-5px;z-index:10}.nz-resizable-handle-bottomRight{width:20px;height:20px;right:-5px;bottom:-5px;z-index:10}.nz-resizable-handle-bottomLeft{width:20px;height:20px;bottom:-5px;left:-5px;z-index:10}.nz-resizable-handle-topLeft{width:20px;height:20px;top:-5px;left:-5px;z-index:10}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottom,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-top{cursor:row-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-left,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-right{cursor:col-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottomRight,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-topLeft{cursor:nwse-resize}.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-bottomLeft,.nz-resizable:not(.nz-resizable-resizing) .nz-resizable-handle-topRight{cursor:nesw-resize}.hd-table-container ::ng-deep .ant-pagination-options-quick-jumper input{border-radius:2px;border:1px solid #d9d9d9}.hd-table-container ::ng-deep .ant-pagination-options .ant-select-selection{border-radius:2px}.hd-table-container ::ng-deep .ant-table-thead>tr>th{border-bottom:1px solid #ecf1ed;white-space:nowrap;text-overflow:ellipsis}.hd-table-container ::ng-deep .ant-table-tbody>tr>td{border-bottom:1px solid #ecf1ed;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.hd-table-container ::ng-deep .hd-table-total>td{border:0!important}::ng-deep .ant-dropdown-menu{border-radius:0}::ng-deep .ant-dropdown{margin-top:8px!important}.common-td-wrap{white-space:normal!important;word-break:break-all}.nz-resizable-preview{border-width:0 1px 0 0}.resize-trigger{width:10px;height:15px;position:relative;top:calc((100% - 15px)/ 2)}.resize-trigger::after{position:absolute;top:calc((100% - 15px)/ 2);left:0;background:#d5d5d5;content:'';width:1px;height:15px;z-index:1}.nz-resizable-handle-right{position:absolute;width:10px;top:0;right:-5px;z-index:inherit}.hd-table-tree-node{display:inline-flex;align-items:center;padding-right:10px}.hd-table-tree-node .hd-table-tree-node-img{display:flex;flex-direction:column;position:absolute;right:0;margin-top:-2.5px}.hd-table-tree-node .hd-table-tree-node-img i{opacity:.3}.hd-table-tree-node .hd-table-tree-node-img i:last-child{margin-top:-5px}img{width:20px;height:20px}.ant-table-th-left-sticky{z-index:2}::ng-deep .ant-table-thead>tr>th .ant-table-header-column .ant-table-column-sorters>:not(.ant-table-column-sorter){position:unset}"]
|
|
3867
4485
|
}] }
|
|
3868
4486
|
];
|
|
3869
4487
|
/** @nocollapse */
|
|
@@ -4273,134 +4891,6 @@ HdFilterService.decorators = [
|
|
|
4273
4891
|
HdFilterService.ctorParameters = () => [];
|
|
4274
4892
|
/** @nocollapse */ HdFilterService.ngInjectableDef = ɵɵdefineInjectable({ factory: function HdFilterService_Factory() { return new HdFilterService(); }, token: HdFilterService, providedIn: "root" });
|
|
4275
4893
|
|
|
4276
|
-
/**
|
|
4277
|
-
* @fileoverview added by tsickle
|
|
4278
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
4279
|
-
*/
|
|
4280
|
-
// 控件列表
|
|
4281
|
-
class FormLine {
|
|
4282
|
-
constructor() {
|
|
4283
|
-
// 输入框的提示文件
|
|
4284
|
-
this.require = false; // 是否必填
|
|
4285
|
-
// 是否必填
|
|
4286
|
-
this.hide = false; // 是否为隐藏字段,仅用于填充表单的字段,不显示在页面上
|
|
4287
|
-
// 列对齐方式
|
|
4288
|
-
this.value = null; // 值 不传默认为null
|
|
4289
|
-
// 需要保留小数的列的位数
|
|
4290
|
-
this.inputNumber = new InputNumber(); // number组件的min、max、step
|
|
4291
|
-
// 不可输入状态
|
|
4292
|
-
this.showTime = false; // 日期选择器是否包含时间
|
|
4293
|
-
this.canSearch = false; // 指明hide 情况下的控件是否可以被搜索,默认false
|
|
4294
|
-
}
|
|
4295
|
-
}
|
|
4296
|
-
if (false) {
|
|
4297
|
-
/** @type {?} */
|
|
4298
|
-
FormLine.prototype.type;
|
|
4299
|
-
/** @type {?} */
|
|
4300
|
-
FormLine.prototype.label;
|
|
4301
|
-
/** @type {?} */
|
|
4302
|
-
FormLine.prototype.name;
|
|
4303
|
-
/** @type {?} */
|
|
4304
|
-
FormLine.prototype.placeholder;
|
|
4305
|
-
/** @type {?} */
|
|
4306
|
-
FormLine.prototype.require;
|
|
4307
|
-
/** @type {?} */
|
|
4308
|
-
FormLine.prototype.hide;
|
|
4309
|
-
/** @type {?} */
|
|
4310
|
-
FormLine.prototype.align;
|
|
4311
|
-
/** @type {?} */
|
|
4312
|
-
FormLine.prototype.value;
|
|
4313
|
-
/** @type {?} */
|
|
4314
|
-
FormLine.prototype.isSelect;
|
|
4315
|
-
/** @type {?} */
|
|
4316
|
-
FormLine.prototype.selectOption;
|
|
4317
|
-
/** @type {?} */
|
|
4318
|
-
FormLine.prototype.explainOptionRight;
|
|
4319
|
-
/** @type {?} */
|
|
4320
|
-
FormLine.prototype.explainOption;
|
|
4321
|
-
/** @type {?} */
|
|
4322
|
-
FormLine.prototype.colorOption;
|
|
4323
|
-
/** @type {?} */
|
|
4324
|
-
FormLine.prototype.maxLength;
|
|
4325
|
-
/** @type {?} */
|
|
4326
|
-
FormLine.prototype.preserveNumber;
|
|
4327
|
-
/** @type {?} */
|
|
4328
|
-
FormLine.prototype.inputNumber;
|
|
4329
|
-
/** @type {?} */
|
|
4330
|
-
FormLine.prototype.onChangeEvent;
|
|
4331
|
-
/** @type {?} */
|
|
4332
|
-
FormLine.prototype.onSearchEvent;
|
|
4333
|
-
/** @type {?} */
|
|
4334
|
-
FormLine.prototype.defaultLabel;
|
|
4335
|
-
/** @type {?} */
|
|
4336
|
-
FormLine.prototype.hdDisabledDate;
|
|
4337
|
-
/** @type {?} */
|
|
4338
|
-
FormLine.prototype.disabled;
|
|
4339
|
-
/** @type {?} */
|
|
4340
|
-
FormLine.prototype.showTime;
|
|
4341
|
-
/** @type {?} */
|
|
4342
|
-
FormLine.prototype.style;
|
|
4343
|
-
/** @type {?} */
|
|
4344
|
-
FormLine.prototype.canSearch;
|
|
4345
|
-
/** @type {?} */
|
|
4346
|
-
FormLine.prototype.onChangeEventDebounceTime;
|
|
4347
|
-
/** @type {?} */
|
|
4348
|
-
FormLine.prototype.onSearchEventEventDebounceTime;
|
|
4349
|
-
}
|
|
4350
|
-
class ColorOption {
|
|
4351
|
-
}
|
|
4352
|
-
if (false) {
|
|
4353
|
-
/** @type {?} */
|
|
4354
|
-
ColorOption.prototype.name;
|
|
4355
|
-
/** @type {?} */
|
|
4356
|
-
ColorOption.prototype.color;
|
|
4357
|
-
}
|
|
4358
|
-
class ExplainOption {
|
|
4359
|
-
}
|
|
4360
|
-
if (false) {
|
|
4361
|
-
/** @type {?} */
|
|
4362
|
-
ExplainOption.prototype.show;
|
|
4363
|
-
/** @type {?} */
|
|
4364
|
-
ExplainOption.prototype.name;
|
|
4365
|
-
/** @type {?} */
|
|
4366
|
-
ExplainOption.prototype.color;
|
|
4367
|
-
}
|
|
4368
|
-
/** @enum {number} */
|
|
4369
|
-
const FormLineType = {
|
|
4370
|
-
Input: 0,
|
|
4371
|
-
Select: 1,
|
|
4372
|
-
Date: 2,
|
|
4373
|
-
DateRange: 3,
|
|
4374
|
-
TextArea: 4,
|
|
4375
|
-
InputNumber: 5,
|
|
4376
|
-
MultipleSelect: 6,
|
|
4377
|
-
ViewDom: 7,
|
|
4378
|
-
Switch: 8,
|
|
4379
|
-
Time: 9 // 时间选择器
|
|
4380
|
-
,
|
|
4381
|
-
};
|
|
4382
|
-
FormLineType[FormLineType.Input] = 'Input';
|
|
4383
|
-
FormLineType[FormLineType.Select] = 'Select';
|
|
4384
|
-
FormLineType[FormLineType.Date] = 'Date';
|
|
4385
|
-
FormLineType[FormLineType.DateRange] = 'DateRange';
|
|
4386
|
-
FormLineType[FormLineType.TextArea] = 'TextArea';
|
|
4387
|
-
FormLineType[FormLineType.InputNumber] = 'InputNumber';
|
|
4388
|
-
FormLineType[FormLineType.MultipleSelect] = 'MultipleSelect';
|
|
4389
|
-
FormLineType[FormLineType.ViewDom] = 'ViewDom';
|
|
4390
|
-
FormLineType[FormLineType.Switch] = 'Switch';
|
|
4391
|
-
FormLineType[FormLineType.Time] = 'Time';
|
|
4392
|
-
class HdFormLinesService {
|
|
4393
|
-
constructor() { }
|
|
4394
|
-
}
|
|
4395
|
-
HdFormLinesService.decorators = [
|
|
4396
|
-
{ type: Injectable, args: [{
|
|
4397
|
-
providedIn: 'root'
|
|
4398
|
-
},] }
|
|
4399
|
-
];
|
|
4400
|
-
/** @nocollapse */
|
|
4401
|
-
HdFormLinesService.ctorParameters = () => [];
|
|
4402
|
-
/** @nocollapse */ HdFormLinesService.ngInjectableDef = ɵɵdefineInjectable({ factory: function HdFormLinesService_Factory() { return new HdFormLinesService(); }, token: HdFormLinesService, providedIn: "root" });
|
|
4403
|
-
|
|
4404
4894
|
/**
|
|
4405
4895
|
* @fileoverview added by tsickle
|
|
4406
4896
|
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|