|
@@ -10,14 +10,7 @@ import {
|
|
|
moveOrganizationalStructure,
|
|
|
queryOrganizationalStructureList
|
|
|
} from '@/services/api/institution'
|
|
|
-import type { OrganizationModalEnum } from './Organization'
|
|
|
-
|
|
|
-export enum ModalType {
|
|
|
- ADD = 0,
|
|
|
- UPDATE = 1,
|
|
|
- DEL = 2,
|
|
|
- MOVE = 5
|
|
|
-}
|
|
|
+import { OrganizationModalEnum } from './Organization'
|
|
|
|
|
|
type OrganizationModalProps = {
|
|
|
visible: boolean
|
|
@@ -44,6 +37,7 @@ const OrganizationModal: React.FC<OrganizationModalProps> = ({
|
|
|
accountTotal,
|
|
|
reload
|
|
|
}) => {
|
|
|
+ console.log(type === OrganizationModalEnum.RENAME)
|
|
|
const ref = useRef<FormInstance>(null)
|
|
|
const [state, setState] = useState({
|
|
|
organizationList: []
|
|
@@ -148,7 +142,7 @@ const OrganizationModal: React.FC<OrganizationModalProps> = ({
|
|
|
}}
|
|
|
onOk={() => handleOnFinish()}>
|
|
|
<ProForm formRef={ref} submitter={{ render: false }}>
|
|
|
- {type === ModalType.ADD ? (
|
|
|
+ {type === OrganizationModalEnum.ADD ? (
|
|
|
<>
|
|
|
<ProFormText
|
|
|
name="name"
|
|
@@ -157,7 +151,7 @@ const OrganizationModal: React.FC<OrganizationModalProps> = ({
|
|
|
/>
|
|
|
</>
|
|
|
) : null}
|
|
|
- {type === ModalType.UPDATE ? (
|
|
|
+ {type === OrganizationModalEnum.RENAME ? (
|
|
|
<>
|
|
|
<ProFormText name="ID" hidden />
|
|
|
<ProFormText
|
|
@@ -167,7 +161,7 @@ const OrganizationModal: React.FC<OrganizationModalProps> = ({
|
|
|
/>
|
|
|
</>
|
|
|
) : null}
|
|
|
- {type === ModalType.DEL ? (
|
|
|
+ {type === OrganizationModalEnum.DEL ? (
|
|
|
<>
|
|
|
<ProFormText name="ID" hidden />
|
|
|
<p>确认删除?</p>
|
|
@@ -186,7 +180,7 @@ const OrganizationModal: React.FC<OrganizationModalProps> = ({
|
|
|
) : null}
|
|
|
</>
|
|
|
) : null}
|
|
|
- {type === ModalType.MOVE ? (
|
|
|
+ {type === OrganizationModalEnum.MOVE ? (
|
|
|
<>
|
|
|
<ProFormText name="ID" hidden />
|
|
|
<Form.Item label="目标架构" name="moveID">
|