| | |
| | | ProFormDigit, |
| | | ProFormText, |
| | | ProFormSelect, |
| | | ProFormDateTimePicker |
| | | ProFormDateTimePicker, |
| | | ProFormTreeSelect |
| | | } from '@ant-design/pro-components'; |
| | | import { Form, Modal } from 'antd'; |
| | | import moment from 'moment'; |
| | |
| | | disabled |
| | | hidden={true} |
| | | /> |
| | | |
| | | <ProFormTreeSelect |
| | | name="parentId" |
| | | label="上级菜单" |
| | | params={props.treeData} |
| | | request={async () => { |
| | | return props.treeData; |
| | | }} |
| | | placeholder="请选择" |
| | | rules={[{ required: true, message: "上级菜单不能为空" }]} |
| | | fieldProps={{ |
| | | defaultValue: 0 |
| | | }} |
| | | /> |
| | | <ProForm.Group> |
| | | <ProFormText |
| | | name="name" |
| | |
| | | }} |
| | | request={(params, sorter, filter) => |
| | | Http.doPostPromise('/api/menu/tree', { ...params, ...searchParam }, (res) => { |
| | | setTreeData(res.data) |
| | | |
| | | // const rootMenu = { id: 0, label: '主类目', children: [], value: 0 }; |
| | | // const memuData = buildTreeData(res.data, 'menuId', 'menuName', '', '', ''); |
| | | // rootMenu.children = memuData; |
| | | // const treeData = []; |
| | | // treeData.push(rootMenu); |
| | | // setMenuTree(treeData); |
| | | |
| | | setTreeData(res.data); |
| | | return { |
| | | data: res.data, |
| | | success: true, |