| | |
| | | import { |
| | | SavedQueriesList, |
| | | FilterLiveSearch, |
| | | useNotify, |
| | | FilterList, |
| | | FilterListItem, |
| | | useStore, |
| | |
| | | |
| | | const MatListAside = () => { |
| | | const theme = useTheme(); |
| | | const notify = useNotify(); |
| | | const { setFilters } = useListContext(); // 获取列表上下文 |
| | | const [selectedOption, setSelectedOption] = useState(null); |
| | | const treeData = [ |
| | | const [treeData, setTreeData] = useState([]); |
| | | |
| | | useEffect(() => { |
| | | request.get('/matnrGroup/tree') |
| | | .then(res => { |
| | | console.log('Tree Data:', res); |
| | | if (res?.data?.code === 200) { |
| | | setTreeData(res.data.data); |
| | | } else { |
| | | notify(res.data); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | notify('Error fetching tree data'); |
| | | }); |
| | | |
| | | |
| | | |
| | | },[]); |
| | | |
| | | |
| | | |
| | | const treeData1 = [ |
| | | { |
| | | id: '19', |
| | | label: '半成品 ', |
| | |
| | | setFilters({ groupId: nodeId }); |
| | | // 在这里可以根据 nodeId 更新主内容区域 |
| | | }; |
| | | const handleSearch = () => { |
| | | console.log('Search Input:', selectedOption); |
| | | }; |
| | | |
| | | |
| | | const CustomCheckbox = React.forwardRef(function CustomCheckbox(props, ref) { |
| | |
| | | > |
| | | <CardContent> |
| | | <SavedQueriesList icon={<BookmarkIcon />} /> |
| | | <FilterLiveSearch source='condition' hiddenLabel /> |
| | | <FilterLiveSearch source="condition" /> |
| | | <RichTreeView |
| | | defaultExpandedItems={['grid', 'pickers']} |
| | | expansionTrigger="iconContainer" |