outaozhen 3 年之前
父节点
当前提交
0efbec66cc

+ 24 - 7
src/pages/Institutions/Company/Detail/components/Organization.tsx

@@ -1,9 +1,16 @@
-import { Button, Popconfirm, message } from 'antd'
+import { Button, Popconfirm, message, Tooltip } from 'antd'
 import type { ActionType } from '@ant-design/pro-table'
 import ProTable from '@ant-design/pro-table'
 import React, { useState, useRef } from 'react'
 import { useRequest } from 'umi'
-import { DeleteOutlined } from '@ant-design/icons'
+import {
+  ArrowDownOutlined,
+  ArrowUpOutlined,
+  DeleteOutlined,
+  EditOutlined,
+  PlusSquareOutlined,
+  SwapOutlined
+} from '@ant-design/icons'
 import {
   queryOrganizationalStructureList,
   moveSortOrganizationalStructure
@@ -76,7 +83,9 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                 okText="确认"
                 cancelText="取消"
                 onConfirm={() => tryMoveOrganization({ ID: record.ID, operation: state.up })}>
-                上移
+                <Tooltip placement="top" title="上移">
+                  <ArrowUpOutlined />
+                </Tooltip>
               </Popconfirm>
             </div>
           ) : null}
@@ -87,7 +96,9 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                 okText="确认"
                 cancelText="取消"
                 onConfirm={() => tryMoveOrganization({ ID: record.ID, operation: state.down })}>
-                下移
+                <Tooltip placement="top" title="下移">
+                  <ArrowDownOutlined />
+                </Tooltip>
               </Popconfirm>
             </div>
           ) : null}
@@ -103,7 +114,9 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                   typeEum: titleType.MOVE
                 })
               }}>
-              移动
+              <Tooltip placement="top" title="移动">
+                <SwapOutlined />
+              </Tooltip>
             </div>
           ) : null}
           <div
@@ -122,7 +135,9 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                 typeEum: titleType.ADDITEM
               })
             }}>
-            添加子项
+            <Tooltip placement="top" title="添加子项">
+              <PlusSquareOutlined />
+            </Tooltip>
           </div>
           <div
             className="px-2 text-primary cursor-pointer hover:text-hex-967bbd"
@@ -135,7 +150,9 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                 typeEum: titleType.RENAME
               })
             }}>
-            重命名
+            <Tooltip placement="top" title="重命名">
+              <EditOutlined />
+            </Tooltip>
           </div>
           {!record.parentID === false ? (
             <div className="pl-2 text-hex-fd3995 cursor-pointer hover:text-hex-967bbd">

+ 5 - 5
src/pages/Institutions/Staff/index.tsx

@@ -3,11 +3,11 @@ import type { ProColumnType, ActionType } from '@ant-design/pro-table'
 import { Button } from 'antd'
 import consts from '@/utils/consts'
 import { useRef, useState, useEffect } from 'react'
-import { connect, useRequest } from 'umi'
+import { connect } from 'umi'
 import type { ConnectProps } from 'umi'
 import type { InstitutionsModelState } from '../model'
 // import StaffModal, { ModalType } from './components/StaffModal'
-import { queryAcountList, queryAccountDetail } from '@/services/api/institution'
+import { queryAcountList } from '@/services/api/institution'
 import dayjs from 'dayjs'
 import StaffDrawer, { ModalType } from './components/StaffDrawer'
 import type { SchemaBaseModelState } from '@/pages/Schema/Base/model'
@@ -38,8 +38,7 @@ const CompanyList: React.FC<ListProps> = ({ dispatch, accountTypeList }) => {
   }, [])
   const [state, setState] = useState({
     params: {
-      search: null,
-      accountType: 1
+      search: null
     },
     visible: false,
     visibles: false,
@@ -120,7 +119,8 @@ const CompanyList: React.FC<ListProps> = ({ dispatch, accountTypeList }) => {
                 visible: true,
                 currentModalType: ModalType.UPDATE,
                 defaultFormData: {
-                  // ...record,
+                  ...record,
+                  institution: null,
                   institutionID: record.ID,
                   accountType: record.accountType,
                   dataID: record.institution.ID