|
@@ -10,7 +10,7 @@ import { getAuthCache, getPermAuthCache, setAuthCache } from '@/utils/auth'
|
|
|
import React, { useRef, useState, useLayoutEffect, useMemo } from 'react'
|
|
import React, { useRef, useState, useLayoutEffect, useMemo } from 'react'
|
|
|
import { useMount } from 'ahooks'
|
|
import { useMount } from 'ahooks'
|
|
|
import { useTableScroll } from './hooks/useTableScroll'
|
|
import { useTableScroll } from './hooks/useTableScroll'
|
|
|
-import type { BasicTableProps } from '@/types/typing'
|
|
|
|
|
|
|
+import type { BasicTableProps, PermStateEnum } from '@/types/typing'
|
|
|
import type { ParamsType } from '@ant-design/pro-provider'
|
|
import type { ParamsType } from '@ant-design/pro-provider'
|
|
|
import type { DensitySize } from '@ant-design/pro-table/lib/components/ToolBar/DensityIcon'
|
|
import type { DensitySize } from '@ant-design/pro-table/lib/components/ToolBar/DensityIcon'
|
|
|
// import { Resizable } from 'react-resizable'
|
|
// import { Resizable } from 'react-resizable'
|
|
@@ -50,6 +50,7 @@ const BasicTable: {
|
|
|
Summary: typeof import('rc-table/lib/Footer/Summary').default
|
|
Summary: typeof import('rc-table/lib/Footer/Summary').default
|
|
|
} = ({
|
|
} = ({
|
|
|
// resizable = false,
|
|
// resizable = false,
|
|
|
|
|
+ onPermChange,
|
|
|
rowKey,
|
|
rowKey,
|
|
|
headerTitle,
|
|
headerTitle,
|
|
|
params,
|
|
params,
|
|
@@ -120,9 +121,10 @@ const BasicTable: {
|
|
|
<>
|
|
<>
|
|
|
<PermSelect
|
|
<PermSelect
|
|
|
dataType={mainMenuType}
|
|
dataType={mainMenuType}
|
|
|
- onConfirm={({ staffIds, dataPermission }) =>
|
|
|
|
|
|
|
+ onConfirm={({ staffIds, dataPermission }: PermStateEnum) => {
|
|
|
|
|
+ if (onPermChange) onPermChange({ staffIds, dataPermission })
|
|
|
setState({ ...state, params: { ...state.params, staffIds, dataPermission } })
|
|
setState({ ...state, params: { ...state.params, staffIds, dataPermission } })
|
|
|
- }
|
|
|
|
|
|
|
+ }}
|
|
|
/>
|
|
/>
|
|
|
<div className="ml-4">{headerTitle}</div>
|
|
<div className="ml-4">{headerTitle}</div>
|
|
|
</>
|
|
</>
|