|
@@ -2,7 +2,7 @@ import BasicTable from '@/components/Table'
|
|
|
import { PageContainer } from '@ant-design/pro-layout'
|
|
import { PageContainer } from '@ant-design/pro-layout'
|
|
|
import { Input, List, Popover, Space, Tag } from 'antd'
|
|
import { Input, List, Popover, Space, Tag } from 'antd'
|
|
|
import type { ColumnsType } from 'antd/lib/table'
|
|
import type { ColumnsType } from 'antd/lib/table'
|
|
|
-import React, { useEffect, useMemo, useState } from 'react'
|
|
|
|
|
|
|
+import React, { useEffect, useMemo, useRef, useState } from 'react'
|
|
|
import { connect } from '@@/plugin-dva'
|
|
import { connect } from '@@/plugin-dva'
|
|
|
import Organization from './components/Organization'
|
|
import Organization from './components/Organization'
|
|
|
|
|
|
|
@@ -53,13 +53,14 @@ const content = (
|
|
|
|
|
|
|
|
const Contacts: React.FC<ContactsProps> = props => {
|
|
const Contacts: React.FC<ContactsProps> = props => {
|
|
|
const { dispatch, allStaffList = [] } = props
|
|
const { dispatch, allStaffList = [] } = props
|
|
|
|
|
+ const tRef = useRef()
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
departmentId: '0',
|
|
departmentId: '0',
|
|
|
params: {
|
|
params: {
|
|
|
- projectType: 1,
|
|
|
|
|
search: null
|
|
search: null
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
const initData = () => {
|
|
const initData = () => {
|
|
|
dispatch({
|
|
dispatch({
|
|
|
type: 'staff/fetchStaffList'
|
|
type: 'staff/fetchStaffList'
|
|
@@ -128,12 +129,6 @@ const Contacts: React.FC<ContactsProps> = props => {
|
|
|
search: false,
|
|
search: false,
|
|
|
width: 100
|
|
width: 100
|
|
|
},
|
|
},
|
|
|
- // {
|
|
|
|
|
- // title: '生日',
|
|
|
|
|
- // dataIndex: 'birthday',
|
|
|
|
|
- // search: false,
|
|
|
|
|
- // width: 150
|
|
|
|
|
- // },
|
|
|
|
|
{
|
|
{
|
|
|
title: '入职时间',
|
|
title: '入职时间',
|
|
|
dataIndex: 'hiredate',
|
|
dataIndex: 'hiredate',
|
|
@@ -149,8 +144,10 @@ const Contacts: React.FC<ContactsProps> = props => {
|
|
|
{allStaffList.length ? (
|
|
{allStaffList.length ? (
|
|
|
<BasicTable
|
|
<BasicTable
|
|
|
rowKey="id"
|
|
rowKey="id"
|
|
|
|
|
+ actionRef={tRef}
|
|
|
columns={columns}
|
|
columns={columns}
|
|
|
dataSource={dataSource}
|
|
dataSource={dataSource}
|
|
|
|
|
+ params={state.params}
|
|
|
search={false}
|
|
search={false}
|
|
|
toolbar={{
|
|
toolbar={{
|
|
|
multipleLine: true,
|
|
multipleLine: true,
|
|
@@ -181,7 +178,11 @@ const Contacts: React.FC<ContactsProps> = props => {
|
|
|
<Popover content={content} title={'本月寿星:'} trigger="click" placement="bottomLeft">
|
|
<Popover content={content} title={'本月寿星:'} trigger="click" placement="bottomLeft">
|
|
|
<span>
|
|
<span>
|
|
|
{character?.map(item => {
|
|
{character?.map(item => {
|
|
|
- return <span key={item.id}>{item.name}</span>
|
|
|
|
|
|
|
+ return (
|
|
|
|
|
+ <span style={{ marginLeft: -2 }} key={item.id}>
|
|
|
|
|
+ {item.name}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ )
|
|
|
})}
|
|
})}
|
|
|
</span>
|
|
</span>
|
|
|
</Popover>
|
|
</Popover>
|