Browse Source

feat: 1111

lanjianrong 3 years ago
parent
commit
d96d8f43fb
1 changed files with 13 additions and 15 deletions
  1. 13 15
      src/pages/Institutions/Company/Detail/components/OrganizationModal.tsx

+ 13 - 15
src/pages/Institutions/Company/Detail/components/OrganizationModal.tsx

@@ -10,14 +10,14 @@ import {
   moveOrganizationalStructure,
   queryOrganizationalStructureList
 } from '@/services/api/institution'
-import { ModalType } from '@/utils/enum'
+import type { OrganizationModalEnum } from './Organization'
 
-// export enum ModalType {
-//   ADD = 0,
-//   UPDATE = 1,
-//   DEL = 2,
-//   MOVE = 5
-// }
+export enum ModalType {
+  ADD = 0,
+  UPDATE = 1,
+  DEL = 2,
+  MOVE = 5
+}
 
 type OrganizationModalProps = {
   visible: boolean
@@ -44,31 +44,29 @@ const OrganizationModal: React.FC<OrganizationModalProps> = ({
   accountTotal,
   reload
 }) => {
-  console.log(type)
-
   const ref = useRef<FormInstance>(null)
   const [state, setState] = useState({
     organizationList: []
   })
 
   const titleTypeEunm = {
-    0: {
+    1: {
       key: 'ADD',
       name: '添加父级组织'
     },
-    1: {
+    2: {
       key: 'ADDITEM',
       name: '添加子项'
     },
-    2: {
-      key: 'UPDATE',
+    3: {
+      key: 'RENAME',
       name: '重命名'
     },
-    3: {
+    4: {
       key: 'DEL',
       name: '删除组织架构'
     },
-    4: {
+    5: {
       key: 'MOVE',
       name: '移动'
     }