| | |
| | | import { buildProTableDataSource, sendRequest, showDelConfirm } from '@/utils/antdUtils'; |
| | | import { sendRequest, showDelConfirm } from '@/utils/antdUtils'; |
| | | import { DeleteOutlined, EditOutlined, PlusOutlined } from '@ant-design/icons'; |
| | | import { PageContainer, ProFormText, ProTable, QueryFilter } from '@ant-design/pro-components'; |
| | | import { Button, Col, Menu, Row, Space } from 'antd'; |
| | | import { useEffect, useRef, useState } from 'react'; |
| | | import { Access, useAccess } from 'umi'; |
| | | import AddAndEdit from './components/addAndEdit'; |
| | | import { add, del, edit, getList, getUnitList } from './service'; |
| | | import { add, del, edit, getUnitList } from './service'; |
| | | |
| | | const Role = () => { |
| | | const actionRef = useRef(); |
| | | const addViewRef = useRef(); |
| | | const [modalVisible, handleModalVisibles] = useState(true); |
| | | const [modalVisible, handleModalVisibles] = useState(false); |
| | | const access = useAccess(); |
| | | useEffect(() => { |
| | | getUnitList().then((res) => { |
| | | console.log(res); |
| | | }); |
| | | }, []); |
| | | const items = [ |
| | | const [items, setItems] = useState([ |
| | | { |
| | | key: '1', |
| | | icon: ( |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | | ]); |
| | | useEffect(() => { |
| | | getUnitList().then((res) => { |
| | | console.log(res); |
| | | }); |
| | | console.log(items); |
| | | }, []); |
| | | const columns = [ |
| | | { |
| | | title: '角色名称', |
| | |
| | | </div> |
| | | <Row style={{ marginTop: 20, background: '#fff' }}> |
| | | <Col span={4}> |
| | | <Space style={{ margin: '10px 0' }}> |
| | | <span style={{ margin: '0 27px'}}>单位管理</span> |
| | | <Button type="primary">添加</Button> |
| | | </Space> |
| | | <Menu |
| | | mode="inline" |
| | | defaultSelectedKeys={['231']} |
| | | style={{ |
| | | // width: 256, |
| | | height: '100%', |
| | | }} |
| | | items={items} |
| | | /> |