outaozhen 4 år sedan
förälder
incheckning
15316ff0d2
2 ändrade filer med 11 tillägg och 4 borttagningar
  1. 3 2
      src/pages/Hr/Contacts/index.tsx
  2. 8 2
      src/services/typding.d.ts

+ 3 - 2
src/pages/Hr/Contacts/index.tsx

@@ -1,11 +1,12 @@
 import BasicTable from '@/components/Table'
 import { PageContainer } from '@ant-design/pro-layout'
+import type { ColumnsType } from 'antd/lib/table'
 import React, { useEffect, useMemo, useState } from 'react'
 import { connect } from 'umi'
 import Organization from './components/Organization'
 
 export type ContactsProps = {
-  allStaffList: any[]
+  allStaffList: API.ContractList[]
 }
 
 const Contacts: React.FC<ContactsProps> = props => {
@@ -33,7 +34,7 @@ const Contacts: React.FC<ContactsProps> = props => {
   const onSelect = id => {
     setState({ ...state, departmentId: id })
   }
-  const columns = [
+  const columns: ColumnsType<API.ContractItem> = [
     {
       title: '工号',
       dataIndex: 'jobNumber',

+ 8 - 2
src/services/typding.d.ts

@@ -23,8 +23,14 @@ declare namespace API {
   /** @description 通讯录 */
   type ContractItem = {
     id: string
+    jobNumber: string
+    username: string
+    telephone: string
+    qq: string
+    departmentName: string
+    position: string
+    birthday: string
+    hiredate: string
   }
   type ContractList = ContractItem[]
-  type ContractUpdateParmas = ContractItem
-  type ContractAddParams = Omit<ContractItem, 'id'>
 }