|
@@ -9,11 +9,12 @@ import StaffDrawer, { ModalType } from '@/pages/Institutions/Staff/components/St
|
|
import type { SchemaBaseModelState } from '@/pages/Schema/Base/model'
|
|
import type { SchemaBaseModelState } from '@/pages/Schema/Base/model'
|
|
import { BaseMenuEnum } from '@/pages/Schema/Base'
|
|
import { BaseMenuEnum } from '@/pages/Schema/Base'
|
|
import type { InstitutionsModelState } from '@/pages/Institutions/model'
|
|
import type { InstitutionsModelState } from '@/pages/Institutions/model'
|
|
|
|
+import { generateColumns } from '@/utils/util'
|
|
|
|
|
|
type ListProps = ConnectProps & {
|
|
type ListProps = ConnectProps & {
|
|
accountType: API.AccountType[]
|
|
accountType: API.AccountType[]
|
|
}
|
|
}
|
|
-const Staff: React.FC<ListProps> = ({ dataID, dispatch, accountTypeList }) => {
|
|
|
|
|
|
+const Staff: React.FC<ListProps> = ({ schema, dataID, dispatch, accountTypeList }) => {
|
|
const tRef = useRef<ActionType>(null)
|
|
const tRef = useRef<ActionType>(null)
|
|
// console.log(accountTypeList)
|
|
// console.log(accountTypeList)
|
|
|
|
|
|
@@ -32,9 +33,7 @@ const Staff: React.FC<ListProps> = ({ dataID, dispatch, accountTypeList }) => {
|
|
}, [])
|
|
}, [])
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
params: {
|
|
params: {
|
|
- search: null,
|
|
|
|
- accountType: 1,
|
|
|
|
- dataID
|
|
|
|
|
|
+ search: null
|
|
},
|
|
},
|
|
visible: false,
|
|
visible: false,
|
|
currentModalType: ModalType.ADD,
|
|
currentModalType: ModalType.ADD,
|
|
@@ -98,7 +97,7 @@ const Staff: React.FC<ListProps> = ({ dataID, dispatch, accountTypeList }) => {
|
|
rowKey="ID"
|
|
rowKey="ID"
|
|
params={state.params}
|
|
params={state.params}
|
|
actionRef={tRef}
|
|
actionRef={tRef}
|
|
- columns={columns}
|
|
|
|
|
|
+ columns={generateColumns(columns, schema)}
|
|
search={false}
|
|
search={false}
|
|
request={async (params, filter, sorter) => {
|
|
request={async (params, filter, sorter) => {
|
|
const { code = -1, data: { items = [], totle = 0 } = {} } = await queryAcountList({
|
|
const { code = -1, data: { items = [], totle = 0 } = {} } = await queryAcountList({
|