File was renamed from rsf-admin/src/page/matnr/MatnrListAside.jsx |
| | |
| | | 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'); |
| | | }); |
| | | request.post('/matnrGroup/tree') |
| | | .then(res => { |
| | | console.log('Tree Data:', res); |
| | | if (res?.data?.code === 200) { |
| | | setTreeData(res.data.data); |
| | | } else { |
| | | notify(res.data.msg); |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | notify('Error fetching tree data'); |
| | | }); |
| | | |
| | | |
| | | |