@@ -70,23 +70,24 @@ const AppLayout = () => {
{isPhone ? null : (
{
// setCollapsed(collapsed);
// }}
style={{
background: '#fff',
overflow: 'auto',
- // height: `calc(100vh - ${headerHeight}px)`,
+ height: `calc(100vh - ${headerHeight}px)`,
position: 'sticky',
// zIndex: 1000,
left: 0,
- // top: headerHeight,
+ top: headerHeight,
}}
- width={200}
+ width={180}
// width={window?.dfConfig?.language == 'zh-cn' ? 100 : 240}
// collapsed={collapsed}
- // collapsedWidth={60}
+ collapsedWidth={60}
>
{/* */}
diff --git a/src/main.tsx b/src/main.tsx
index 52bb540..f329669 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,12 +1,9 @@
import { createRoot } from 'react-dom/client';
import './index.css';
-import { HashRouter } from 'react-router-dom';
import App from './App.tsx';
createRoot(document.getElementById('root')!).render(
//
-
- ,
- ,
+ ,
// ,
);
diff --git a/src/pages/Company/List/index.tsx b/src/pages/Company/List/index.tsx
index 0302dd3..b1adbd2 100644
--- a/src/pages/Company/List/index.tsx
+++ b/src/pages/Company/List/index.tsx
@@ -1,7 +1,6 @@
import { Button, DatePicker, Input, Select } from 'antd';
import { stringify } from 'qs';
import { useEffect, useRef, useState } from 'react';
-import { useNavigate } from 'react-router-dom';
import { FormItemPlugin, FormPlugin } from '@/components/FormPlugin';
import { GapBox } from '@/components/GapBox';
import PageContainerPlugin from '@/components/PageContainer/PageContainerPlugin';
@@ -34,7 +33,6 @@ const CompanyListForm: React.FC = () => {
const [ajaxData, setAjaxData] = useState({ count: 0, data: [] });
const [showMoreSearch, setShowMoreSearch] = useState(false);
const CompanyEditModalRef = useRef(null);
- const nav = useNavigate();
const { loading: userLoading, request: userRequest } = useRequest(CompanyServices.getCompanyList, {
onSuccessCodeZero: (res) => {
diff --git a/src/pages/User/List/index.tsx b/src/pages/User/List/index.tsx
index 963d0cb..013262a 100644
--- a/src/pages/User/List/index.tsx
+++ b/src/pages/User/List/index.tsx
@@ -1,7 +1,6 @@
import { Button, DatePicker, Input, Select } from 'antd';
import { stringify } from 'qs';
import { useEffect, useRef, useState } from 'react';
-import { useSearchParams } from 'react-router-dom';
import { FormItemPlugin, FormPlugin } from '@/components/FormPlugin';
import { GapBox } from '@/components/GapBox';
import PageContainerPlugin from '@/components/PageContainer/PageContainerPlugin';
@@ -14,6 +13,7 @@ import { stateOptions, userSex, userState } from '@/configs/usersConfig';
import type { IAjaxDataBase, IParamsBase } from '@/interfaces/common';
import CompanySelect from '@/pages/Company/List/components/CompanySelect';
import { type IUserEditModalType, UserEditModal } from '@/pages/User/List/components/UserEditModal';
+import { getURLSearchParams } from '@/router/routerUtils';
import { UserServices } from '@/services/UserServices';
import { useAuthStore } from '@/store/AuthStore';
import { tableFixedByPhone, toArray } from '@/utils/common';
@@ -38,7 +38,7 @@ const UserListForm: React.FC = () => {
const [ajaxData, setAjaxData] = useState({ count: 0, data: [] });
const [showMoreSearch, setShowMoreSearch] = useState(false);
const UserEditModalRef = useRef(null);
- const [searchParams] = useSearchParams();
+ const searchParams = getURLSearchParams();
const company_id = searchParams.get('company_id');
const [params, setParams] = useState({ curr_page: 1, page_count: 20, company_id });
diff --git a/src/utils/commonUtils.ts b/src/utils/commonUtils.ts
index f8428fd..0b02fc9 100644
--- a/src/utils/commonUtils.ts
+++ b/src/utils/commonUtils.ts
@@ -62,39 +62,6 @@ export const navigateBackIfEmpty = (dataLength: number, curr_page: number, page:
/** 检测支持语言 */
export const checkSupportLanguage = (lang?: string | null) => (lang && ['zh-cn', 'en'].includes(lang) ? lang : 'zh-cn');
-// export const notificationFun = (option: {
-// title?: React.ReactNode;
-// type?: 'info' | 'success' | 'warning' | 'error' | 'normal';
-// content?: React.ReactNode;
-// }) => {
-// const { title = t('系统提示'), type = 'success' } = option;
-// Notification[type]({
-// title: title,
-// content: option.content || '',
-// });
-// };
-
-// export const modalFun = (option: {
-// title?: React.ReactNode;
-// type?: 'info' | 'success' | 'warning' | 'error' | 'confirm';
-// content?: React.ReactNode;
-// onOk: (e?: MouseEvent) => Promise;
-// okText?: string;
-// okButtonProps?: ButtonProps;
-// }) => {
-// const { title = t('系统提示'), type = 'confirm', onOk } = option;
-// Modal[type]({
-// title: title,
-// content: option.content || '',
-// okButtonProps: {
-// autoFocus: true,
-// ...option.okButtonProps,
-// },
-// onOk: onOk,
-// okText: option.okText,
-// });
-// };
-
/** 笛卡尔积 */
export const cartesianProduct = (...arrays: any[]) => {
let result: any[] = [];