lanjianrong %!s(int64=3) %!d(string=hai) anos
pai
achega
d1fcdfa7fe

+ 0 - 68
src/pages/Institutions/Company/Detail/components/Organization.tsx

@@ -38,24 +38,9 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
     expandTreeIds: [],
     expandTreeIds: [],
     defaultFormData: null,
     defaultFormData: null,
     parentID: '',
     parentID: '',
-<<<<<<< HEAD
     modalType: OrganizationModalEnum.ADD,
     modalType: OrganizationModalEnum.ADD,
     accountTotal: null
     accountTotal: null
   })
   })
-=======
-    typeEum: '0',
-    up: 'up',
-    down: 'down',
-    accountTotal: null
-  })
-  // const titleType = {
-  //   ADD: 1,
-  //   ADDITEM: 2,
-  //   RENAME: 3,
-  //   DEL: 4,
-  //   MOVE: 5
-  // }
->>>>>>> 8d40226 (fix: 组织架构弹窗内容报错问题)
 
 
   const { run: tryOrganizationList } = useRequest(
   const { run: tryOrganizationList } = useRequest(
     () => queryOrganizationalStructureList({ dataID, structureType }),
     () => queryOrganizationalStructureList({ dataID, structureType }),
@@ -143,11 +128,7 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                   ...state,
                   ...state,
                   visible: true,
                   visible: true,
                   defaultFormData: record,
                   defaultFormData: record,
-<<<<<<< HEAD
                   modalType: OrganizationModalEnum.MOVE
                   modalType: OrganizationModalEnum.MOVE
-=======
-                  typeEum: ModalType.MOVE
->>>>>>> 8d40226 (fix: 组织架构弹窗内容报错问题)
                 })
                 })
               }}
               }}
             >
             >
@@ -168,11 +149,7 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                   structureType: structureType,
                   structureType: structureType,
                   parentID: record.ID
                   parentID: record.ID
                 },
                 },
-<<<<<<< HEAD
                 modalType: OrganizationModalEnum.ADDITEM
                 modalType: OrganizationModalEnum.ADDITEM
-=======
-                typeEum: ModalType.ADDITEM
->>>>>>> 8d40226 (fix: 组织架构弹窗内容报错问题)
               })
               })
             }}
             }}
           >
           >
@@ -187,11 +164,7 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                 ...state,
                 ...state,
                 visible: true,
                 visible: true,
                 defaultFormData: record,
                 defaultFormData: record,
-<<<<<<< HEAD
                 modalType: OrganizationModalEnum.RENAME
                 modalType: OrganizationModalEnum.RENAME
-=======
-                typeEum: ModalType.UPDATE
->>>>>>> 8d40226 (fix: 组织架构弹窗内容报错问题)
               })
               })
             }}
             }}
           >
           >
@@ -208,11 +181,7 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                       ...state,
                       ...state,
                       visible: true,
                       visible: true,
                       defaultFormData: record,
                       defaultFormData: record,
-<<<<<<< HEAD
                       modalType: OrganizationModalEnum.DEL,
                       modalType: OrganizationModalEnum.DEL,
-=======
-                      typeEum: ModalType.DEL,
->>>>>>> 8d40226 (fix: 组织架构弹窗内容报错问题)
                       accountTotal: record.accountTotal
                       accountTotal: record.accountTotal
                     })
                     })
                   }}
                   }}
@@ -260,12 +229,7 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                 setState({
                 setState({
                   ...state,
                   ...state,
                   visible: true,
                   visible: true,
-<<<<<<< HEAD
                   modalType: OrganizationModalEnum.ADD,
                   modalType: OrganizationModalEnum.ADD,
-=======
-                  currentModalType: ModalType.ADD,
-                  typeEum: ModalType.ADD,
->>>>>>> 8d40226 (fix: 组织架构弹窗内容报错问题)
                   defaultFormData: {
                   defaultFormData: {
                     dataID: dataID,
                     dataID: dataID,
                     structureType: structureType,
                     structureType: structureType,
@@ -279,38 +243,6 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
           ]
           ]
         }}
         }}
       />
       />
-      {/* {state.organizationList && state.organizationList.length ? (
-        <ProTable<API.OrganizationalStructureListItem>
-          rowKey="ID"
-          actionRef={tRef}
-          columns={columns}
-          dataSource={state.organizationList}
-          defaultExpandAllRows={true}
-          indentSize={30}
-          search={false}
-          pagination={false}
-          toolbar={{
-            actions: [
-              <Button
-                onClick={() =>
-                  setState({
-                    ...state,
-                    visible: true,
-                    currentModalType: ModalType.ADD,
-                    modalType: titleType.ADD,
-                    defaultFormData: {
-                      dataID: dataID,
-                      structureType: structureType,
-                      parentID: state.parentID
-                    }
-                  })
-                }>
-                添加组织
-              </Button>
-            ]
-          }}
-        />
-      ) : null} */}
       <OrganizationModal
       <OrganizationModal
         type={state.modalType}
         type={state.modalType}
         visible={state.visible}
         visible={state.visible}

+ 7 - 4
src/pages/user/Login/index.tsx

@@ -37,7 +37,7 @@ const Login: React.FC = () => {
   const [type] = useState<string>('account')
   const [type] = useState<string>('account')
   const { initialState, setInitialState } = useModel('@@initialState')
   const { initialState, setInitialState } = useModel('@@initialState')
 
 
-  const { run } = useRequest(queryAcountList, {
+  const { run } = useRequest(queryCurrentUser, {
     manual: true,
     manual: true,
     onSuccess: async result => {
     onSuccess: async result => {
       setInitialState({
       setInitialState({
@@ -150,7 +150,8 @@ const Login: React.FC = () => {
               }}
               }}
               onFinish={async values => {
               onFinish={async values => {
                 handleSubmit(values as API.LoginParams)
                 handleSubmit(values as API.LoginParams)
-              }}>
+              }}
+            >
               {/* <Tabs activeKey={type} onChange={setType}>
               {/* <Tabs activeKey={type} onChange={setType}>
                 <Tabs.TabPane
                 <Tabs.TabPane
                   key="account"
                   key="account"
@@ -215,14 +216,16 @@ const Login: React.FC = () => {
               <div
               <div
                 style={{
                 style={{
                   marginBottom: 24
                   marginBottom: 24
-                }}>
+                }}
+              >
                 <ProFormCheckbox noStyle name="autoLogin">
                 <ProFormCheckbox noStyle name="autoLogin">
                   <FormattedMessage id="pages.login.rememberMe" defaultMessage="自动登录" />
                   <FormattedMessage id="pages.login.rememberMe" defaultMessage="自动登录" />
                 </ProFormCheckbox>
                 </ProFormCheckbox>
                 <a
                 <a
                   style={{
                   style={{
                     float: 'right'
                     float: 'right'
-                  }}>
+                  }}
+                >
                   <FormattedMessage id="pages.login.forgotPassword" defaultMessage="忘记密码" />
                   <FormattedMessage id="pages.login.forgotPassword" defaultMessage="忘记密码" />
                 </a>
                 </a>
               </div>
               </div>