Browse Source

feat: 1111

lanjianrong 3 years ago
parent
commit
f49f8a1bd4

+ 3 - 3
src/pages/Institutions/model.ts

@@ -1,6 +1,6 @@
 // import { getProjectTypeList } from '@/services/api/project'
 // import consts from '@/utils/consts'
-import { queryAccountTypeList } from '@/services/api/institution'
+import { getAccountTypeList } from '@/services/api/institution'
 import consts from '@/utils/consts'
 import type { Effect, Reducer } from 'umi'
 
@@ -41,8 +41,8 @@ const InstitutionsModel: InstitutionsModelType = {
       //   })
       // }
     },
-    *getAccountTypeList(_, { call, put }) {
-      const response = yield call(queryAccountTypeList)
+    *queryAccountTypeList(_, { call, put }) {
+      const response = yield call(getAccountTypeList)
       if (response?.code === consts.RET_CODE.SUCCESS) {
         yield put({
           type: 'save',

+ 1 - 1
src/pages/Project/Management/components/ProjectModal.tsx

@@ -68,7 +68,7 @@ const ProjectModal: React.FC<ProjectModalProps> = ({
 
   const onMount = () => {
     form.setValues({ ...defaultFormData })
-    delay(300).then(() => {
+    delay().then(() => {
       form.setSchemaByPath('projectTypeID', {
         enum: pTypeList.map(item => item.value),
         enumNames: pTypeList.map(item => item.label)

+ 1 - 1
src/pages/Project/Management/index.tsx

@@ -90,7 +90,7 @@ const List: React.FC<ListProps> = ({ schema, dispatch, pTypeList }) => {
                 defaultFormData: {
                   ID: record.ID,
                   name: record.name,
-                  projectTypeID: record.projectType?.ID
+                  projectTypeID: record.projectTypeID
                 }
               })
             }}>