fantasy-ngzorro 1.0.51 → 1.0.53
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 +31 -17
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-form-lines/hd-form-lines.component.js +30 -18
- package/esm5/hd-form-lines/hd-form-lines.component.js +32 -18
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +29 -17
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +31 -17
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-form-lines/hd-form-lines.component.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1758,6 +1758,8 @@
|
|
|
1758
1758
|
this.filterIndexStore = []; // 筛选出来的数据在原始列表中的下标
|
|
1759
1759
|
// 筛选出来的数据在原始列表中的下标
|
|
1760
1760
|
this.isFilterData = false; // 是否是已经筛选过的数据
|
|
1761
|
+
// 是否是已经筛选过的数据
|
|
1762
|
+
this.formValid = false; // 表单当前的状态
|
|
1761
1763
|
}
|
|
1762
1764
|
/**
|
|
1763
1765
|
* @return {?}
|
|
@@ -1800,6 +1802,15 @@
|
|
|
1800
1802
|
/**
|
|
1801
1803
|
* @return {?}
|
|
1802
1804
|
*/
|
|
1805
|
+
function () {
|
|
1806
|
+
return this.formValid;
|
|
1807
|
+
};
|
|
1808
|
+
/**
|
|
1809
|
+
* @return {?}
|
|
1810
|
+
*/
|
|
1811
|
+
HdFormLinesComponent.prototype.innerGetValid = /**
|
|
1812
|
+
* @return {?}
|
|
1813
|
+
*/
|
|
1803
1814
|
function () {
|
|
1804
1815
|
var _this = this;
|
|
1805
1816
|
/** @type {?} */
|
|
@@ -1890,7 +1901,6 @@
|
|
|
1890
1901
|
*/
|
|
1891
1902
|
function () {
|
|
1892
1903
|
var _this = this;
|
|
1893
|
-
this.tableLoading = true;
|
|
1894
1904
|
// 如果没有输入搜索字符串,则显示缓存内的所有数据
|
|
1895
1905
|
if (!this.filterStr) {
|
|
1896
1906
|
this.isFilterData = false;
|
|
@@ -1935,12 +1945,6 @@
|
|
|
1935
1945
|
// 处理筛选好的数据 然后重新渲染
|
|
1936
1946
|
this.formLinesData = filteredData;
|
|
1937
1947
|
this.init(true);
|
|
1938
|
-
setTimeout((/**
|
|
1939
|
-
* @return {?}
|
|
1940
|
-
*/
|
|
1941
|
-
function () {
|
|
1942
|
-
_this.tableLoading = false;
|
|
1943
|
-
}), 0);
|
|
1944
1948
|
};
|
|
1945
1949
|
/**
|
|
1946
1950
|
* @return {?}
|
|
@@ -1949,15 +1953,8 @@
|
|
|
1949
1953
|
* @return {?}
|
|
1950
1954
|
*/
|
|
1951
1955
|
function () {
|
|
1952
|
-
var _this = this;
|
|
1953
1956
|
this.formLinesData = this.storeFormLinesData;
|
|
1954
1957
|
this.init(true);
|
|
1955
|
-
setTimeout((/**
|
|
1956
|
-
* @return {?}
|
|
1957
|
-
*/
|
|
1958
|
-
function () {
|
|
1959
|
-
_this.tableLoading = false;
|
|
1960
|
-
}), 0);
|
|
1961
1958
|
};
|
|
1962
1959
|
/**
|
|
1963
1960
|
* @param {?} line
|
|
@@ -2179,7 +2176,7 @@
|
|
|
2179
2176
|
formGroupObj[item.selectOption.label] = _this.fb.control(formLinesDataItem[item.selectOption.label] || null, []);
|
|
2180
2177
|
}
|
|
2181
2178
|
}));
|
|
2182
|
-
formGroupObj.lineIndex = _this.fb.control(_this.linesFormArray.controls.length, []);
|
|
2179
|
+
formGroupObj.lineIndex = _this.fb.control(_this.linesFormArray.controls.length + 1, []);
|
|
2183
2180
|
/** @type {?} */
|
|
2184
2181
|
var formGroupTmp = _this.fb.group(formGroupObj);
|
|
2185
2182
|
_this.formLines.forEach((/**
|
|
@@ -2192,7 +2189,9 @@
|
|
|
2192
2189
|
* @param {?} value
|
|
2193
2190
|
* @return {?}
|
|
2194
2191
|
*/
|
|
2195
|
-
function (value) {
|
|
2192
|
+
function (value) {
|
|
2193
|
+
_this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
|
|
2194
|
+
}));
|
|
2196
2195
|
}
|
|
2197
2196
|
}));
|
|
2198
2197
|
_this.linesFormArray.insert(_this.linesFormArray.controls.length, formGroupTmp);
|
|
@@ -2364,7 +2363,20 @@
|
|
|
2364
2363
|
this.storeFormLinesData = data.lines;
|
|
2365
2364
|
}
|
|
2366
2365
|
}
|
|
2367
|
-
this.
|
|
2366
|
+
if (this.formValid) {
|
|
2367
|
+
// 如果整体表单是true,不管子表单是什么,都变成子表单的状态
|
|
2368
|
+
this.formValid = this.validateHdFormLines.valid;
|
|
2369
|
+
}
|
|
2370
|
+
else {
|
|
2371
|
+
// 如果整体表单是false:1、子表单为true,需要重算;2、子表单为false,用子表单状态
|
|
2372
|
+
if (this.validateHdFormLines.valid) {
|
|
2373
|
+
this.formValid = this.innerGetValid();
|
|
2374
|
+
}
|
|
2375
|
+
else {
|
|
2376
|
+
this.formValid = this.validateHdFormLines.valid;
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
// this.calculateLineNumber();
|
|
2368
2380
|
this.changeEvent.emit(this.validateHdFormLines);
|
|
2369
2381
|
};
|
|
2370
2382
|
/**
|
|
@@ -2557,6 +2569,8 @@
|
|
|
2557
2569
|
HdFormLinesComponent.prototype.filterIndexStore;
|
|
2558
2570
|
/** @type {?} */
|
|
2559
2571
|
HdFormLinesComponent.prototype.isFilterData;
|
|
2572
|
+
/** @type {?} */
|
|
2573
|
+
HdFormLinesComponent.prototype.formValid;
|
|
2560
2574
|
/**
|
|
2561
2575
|
* @type {?}
|
|
2562
2576
|
* @private
|