From 3e40a02e2d8aeb0e822849bb63b70f7e3cadf154 Mon Sep 17 00:00:00 2001 From: 落日与鲸 <10806022+gong-jinbao@user.noreply.gitee.com> Date: 星期二, 25 二月 2025 20:09:15 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide --- management/src/pages/setting/user/index.jsx | 126 ++++++++++++++--------------------------- 1 files changed, 44 insertions(+), 82 deletions(-) diff --git a/management/src/pages/setting/user/index.jsx b/management/src/pages/setting/user/index.jsx index 3c75f51..448916c 100644 --- a/management/src/pages/setting/user/index.jsx +++ b/management/src/pages/setting/user/index.jsx @@ -1,22 +1,57 @@ import { buildProTableDataSource, 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, Row, Menu ,Space } from 'antd'; -import { useRef, useState } from 'react'; +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 { AppstoreOutlined, MailOutlined, SettingOutlined } from '@ant-design/icons'; -import { add, del, edit, getList } from './service'; +import { add, del, edit, getList, getUnitList } from './service'; const Role = () => { const actionRef = useRef(); const addViewRef = useRef(); const [modalVisible, handleModalVisibles] = useState(true); const access = useAccess(); + useEffect(() => { + getUnitList().then((res) => { + console.log(res); + }); + }, []); const items = [ { key: '1', - icon: <MailOutlined />, - label: 'Navigation One', + icon: ( + <div + style={{ + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', + width: '100%', + }} + > + <span>组织部</span> + <div> + <PlusOutlined + onClick={(e) => { + e.stopPropagation(); + console.log(e); + }} + /> + <EditOutlined + onClick={(e) => { + e.stopPropagation(); + console.log(e); + }} + /> + <DeleteOutlined + onClick={(e) => { + e.stopPropagation(); + console.log(e); + }} + /> + </div> + </div> + ), children: [ { key: '11', @@ -32,80 +67,6 @@ }, { key: '14', - label: 'Option 4', - }, - ], - }, - { - key: '2', - icon: <AppstoreOutlined />, - label: 'Navigation Two', - children: [ - { - key: '21', - label: 'Option 1', - }, - { - key: '22', - label: 'Option 2', - }, - { - key: '23', - label: 'Submenu', - children: [ - { - key: '231', - label: 'Option 1', - }, - { - key: '232', - label: 'Option 2', - }, - { - key: '233', - label: 'Option 3', - }, - ], - }, - { - key: '24', - label: 'Submenu 2', - children: [ - { - key: '241', - label: 'Option 1', - }, - { - key: '242', - label: 'Option 2', - }, - { - key: '243', - label: 'Option 3', - }, - ], - }, - ], - }, - { - key: '3', - icon: <SettingOutlined />, - label: 'Navigation Three', - children: [ - { - key: '31', - label: 'Option 1', - }, - { - key: '32', - label: 'Option 2', - }, - { - key: '33', - label: 'Option 3', - }, - { - key: '34', label: 'Option 4', }, ], @@ -186,7 +147,8 @@ mode="inline" defaultSelectedKeys={['231']} style={{ - // width: 256, + // width: 256, + height: '100%', }} items={items} /> @@ -201,7 +163,7 @@ showQuickJumper: true, defaultPageSize: 10, }} - request={(params) => buildProTableDataSource(getList, params)} + // request={(params) => buildProTableDataSource(getList, params)} toolBarRender={(action, selectRows) => [ <Access accessible={access['/system_setting/role_management/add']}> <Space> -- Gitblit v1.7.1