getCurrentSelectionEntityParams function
获取当前选中项中用户选择的筛选数据
Implementation
Map<String, String> getCurrentSelectionEntityParams(
BrnSelectionEntity selectionEntity) {
Map<String, String> params = Map();
String? parentKey = selectionEntity.key;
List<String?> selectedEntity = selectionEntity.children
.where((BrnSelectionEntity f) => f.isSelected)
.where((BrnSelectionEntity f) => !BrunoTools.isEmpty(f.value))
.map((BrnSelectionEntity f) => f.value)
.toList();
String selectedParams =
selectedEntity.isEmpty ? '' : selectedEntity.join(',');
if (!BrunoTools.isEmpty(selectedParams) && !BrunoTools.isEmpty(parentKey)) {
params[parentKey!] = selectedParams;
}
return params;
}