|
@@ -19,11 +19,13 @@ type ListProps = ConnectProps & {
|
|
|
}
|
|
|
|
|
|
const CompanyList: React.FC<ListProps> = ({ dispatch, accountTypeList }) => {
|
|
|
+ console.log(accountTypeList)
|
|
|
+
|
|
|
const tRef = useRef<ActionType>(null)
|
|
|
useEffect(() => {
|
|
|
if (!accountTypeList.length) {
|
|
|
dispatch({
|
|
|
- type: 'project/queryAccountTypeList'
|
|
|
+ type: 'institutions/queryAccountTypeList'
|
|
|
})
|
|
|
}
|
|
|
dispatch({
|
|
@@ -87,7 +89,6 @@ const CompanyList: React.FC<ListProps> = ({ dispatch, accountTypeList }) => {
|
|
|
title: '账号类型',
|
|
|
filters: true,
|
|
|
filterMultiple: false,
|
|
|
- render: (_, record) => <div>{record.accountType.name}</div>,
|
|
|
valueEnum: accountTypeList.reduce((prev, curr) => {
|
|
|
const items = { ...prev }
|
|
|
items[curr.value] = {
|
|
@@ -189,7 +190,10 @@ export default connect(
|
|
|
institutions: InstitutionsModelState
|
|
|
schemaBase: SchemaBaseModelState
|
|
|
}) => ({
|
|
|
- accountTypeList: institutions.accountType.map(item => ({ label: item.name, value: item.ID })),
|
|
|
+ accountTypeList: institutions.accountType.map(item => ({
|
|
|
+ label: item.name,
|
|
|
+ value: item.value
|
|
|
+ })),
|
|
|
schema: schemaBase.base[BaseMenuEnum.STAFF]?.schema
|
|
|
})
|
|
|
)(CompanyList)
|