@zgfe/modules-dm 1.0.2-dm.22 → 1.0.2-dm.23
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.
|
@@ -222,8 +222,8 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
222
222
|
setfilterTypeData = _useState18[1];
|
|
223
223
|
|
|
224
224
|
useEffect(function () {
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
console.log('filterTypeData', filterTypeData); // 判断不同type的筛选条件
|
|
226
|
+
|
|
227
227
|
var _judgeFun = function _judgeFun(item, filterItem) {
|
|
228
228
|
switch (filterItem.type) {
|
|
229
229
|
case 'mark_type':
|
|
@@ -241,8 +241,9 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
241
241
|
case 'is_stop':
|
|
242
242
|
return item.is_stop == filterItem.value || item.groupId != undefined;
|
|
243
243
|
}
|
|
244
|
-
};
|
|
244
|
+
};
|
|
245
245
|
|
|
246
|
+
var clearEmptyGroupFlag = false; // 多条件同时筛选
|
|
246
247
|
|
|
247
248
|
var _tableHandleData = [];
|
|
248
249
|
tableHandleDataBasics.map(function (item) {
|
|
@@ -250,6 +251,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
250
251
|
filterTypeData.map(function (filterItem) {
|
|
251
252
|
if (!_judgeFun(item, filterItem)) {
|
|
252
253
|
falg = false;
|
|
254
|
+
if (filterItem.type == 'event_hidden' || filterItem.type == 'is_stop') clearEmptyGroupFlag = true;
|
|
253
255
|
}
|
|
254
256
|
});
|
|
255
257
|
falg && _tableHandleData.push(item);
|
|
@@ -262,7 +264,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
262
264
|
}
|
|
263
265
|
});
|
|
264
266
|
|
|
265
|
-
setTotal(total); // 过滤空组
|
|
267
|
+
setTotal(total); // 过滤空组 , event_hidden 和 is_stop,触发
|
|
266
268
|
|
|
267
269
|
var clearEmptyGroup = function clearEmptyGroup(data) {
|
|
268
270
|
var _data = _.cloneDeep(data);
|
|
@@ -281,7 +283,11 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
281
283
|
return _data;
|
|
282
284
|
};
|
|
283
285
|
|
|
284
|
-
|
|
286
|
+
if (!clearEmptyGroupFlag) {
|
|
287
|
+
setTableHandleData(_tableHandleData);
|
|
288
|
+
} else {
|
|
289
|
+
setTableHandleData(clearEmptyGroup(_tableHandleData));
|
|
290
|
+
}
|
|
285
291
|
}, [filterTypeData, tableHandleDataBasics]); // 是否已包含筛选type
|
|
286
292
|
|
|
287
293
|
var filterHas = function filterHas(type) {
|
|
@@ -125,8 +125,7 @@ var PlanList = function PlanList(props) {
|
|
|
125
125
|
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
126
126
|
}
|
|
127
127
|
}).then(function (res) {
|
|
128
|
-
|
|
129
|
-
setListData(res.data.planList);
|
|
128
|
+
res.data && res.data.planList && setListData(res.data.planList);
|
|
130
129
|
}).catch(function (err) {
|
|
131
130
|
console.error('查询列表失败', err);
|
|
132
131
|
}).finally(function () {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-dm",
|
|
3
|
-
"version": "1.0.2-dm.
|
|
3
|
+
"version": "1.0.2-dm.23",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"license": "ISC",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/lodash": "^4.14.182",
|
|
42
42
|
"@umijs/fabric": "^2.8.1",
|
|
43
43
|
"@umijs/test": "^3.0.5",
|
|
44
|
-
"@zgfe/business-lib": "1.1.7-dmd2.
|
|
44
|
+
"@zgfe/business-lib": "1.1.7-dmd2.8",
|
|
45
45
|
"antd": "4.22.6",
|
|
46
46
|
"dumi": "^1.1.0",
|
|
47
47
|
"father-build": "^1.17.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"umi-request": "^1.4.0",
|
|
54
54
|
"yorkie": "^2.0.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "04b81f0ef247ec3084e74d34b068327862525217",
|
|
57
57
|
"gitHooks": {
|
|
58
58
|
"pre-commit": "lint-staged"
|
|
59
59
|
}
|