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