| | |
| | | hidden: false, |
| | | width: 100, |
| | | render: (_, record) => { |
| | | console.log(_); |
| | | return <span style={{ fontWeight: "bold" }}>{_}</span> |
| | | } |
| | | }, |
| | |
| | | }} |
| | | request={(params, sorter, filter) => |
| | | Http.doPostPromise('/api/menu/tree', { ...params, ...searchParam }, (res) => { |
| | | console.log(res.data); |
| | | // console.log(res); return; |
| | | // const records = res.data.records; |
| | | // console.log(records); |
| | | |
| | | // const rootMenu = { id: 0, label: '主类目', children: [], value: 0 }; |
| | | // const memuData = buildTreeData(records, 'menuId', 'menuName', '', '', ''); |
| | | // rootMenu.children = memuData; |
| | | // const treeData = []; |
| | | // treeData.push(rootMenu); |
| | | // setTreeData(treeData); |
| | | |
| | | setTreeData(res.data) |
| | | return { |
| | | data: res.data, |
| | | success: true, |
| | |
| | | <Edit |
| | | open={modalVisible} |
| | | values={currentRow || {}} |
| | | treeData = {treeData} |
| | | onCancel={ |
| | | () => { |
| | | setModalVisible(false); |
| | |
| | | actionRef.current.reload(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }} |
| | | /> |
| | | </PageContainer> |
| | | ); |