fix
pyt
2025-02-25 4c0ddfd3d54f1bfa4651e218a2838488d948955c
fix
2个文件已修改
135 ■■■■■ 已修改文件
management/src/pages/setting/user/index.jsx 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/pages/setting/user/service.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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(false);
  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>
management/src/pages/setting/user/service.js
@@ -8,6 +8,15 @@
    });
}
// 单位列表
export const getUnitList = async (params) => {
    return request(`/api/huacheng-sangeshenbian/department/list`, {
        method: 'GET',
        params
    });
}
// 编辑获取角色权限树
export const getTree = async (id) => {
    return request(`/api/huacheng-sangeshenbian/systemRole/getSystemRoleInfo/${id}`, {