|
|
@ -12,6 +12,7 @@ const EmployeeCommunication = (props) => { |
|
|
|
const { humanAffairs } = actions; |
|
|
|
const [keywordTarget, setKeywordTarget] = useState('personalName'); |
|
|
|
const [keyword, setKeyword] = useState('');//搜索内容 |
|
|
|
const [timeRange, setTimeRange] = useState('');//沟通时间范围 |
|
|
|
const [limits, setLimits] = useState()//每页实际条数 |
|
|
|
const [query, setQuery] = useState({ limit: 10, page: 0 }); //页码信息 |
|
|
|
const [modalV, setModalV] = useState(false); |
|
|
@ -28,7 +29,7 @@ const EmployeeCommunication = (props) => { |
|
|
|
|
|
|
|
function getEmployeeCommunicateData(param) { |
|
|
|
let queryParam = param || query; |
|
|
|
dispatch(humanAffairs.getEmployeeCommunicate({ keywordTarget, keyword, ...queryParam })).then(r => { |
|
|
|
dispatch(humanAffairs.getEmployeeCommunicate({ keywordTarget, keyword, timeRange, ...queryParam })).then(r => { |
|
|
|
if (r.success) { |
|
|
|
setTableData(r.payload?.data?.rows); |
|
|
|
setLimits(r.payload?.data?.count); |
|
|
@ -83,19 +84,20 @@ const EmployeeCommunication = (props) => { |
|
|
|
title: '沟通时间', |
|
|
|
dataIndex: 'communicateDate', |
|
|
|
key: 'communicateDate', |
|
|
|
width: 130, |
|
|
|
width: 120, |
|
|
|
render: (text, record) => <span>{text ? moment(text).format("YYYY-MM-DD") : '-'}</span> |
|
|
|
}, { |
|
|
|
title: '沟通内容', |
|
|
|
dataIndex: 'communicateContent', |
|
|
|
key: 'communicateContent', |
|
|
|
width: 140, |
|
|
|
width: 150, |
|
|
|
render: (t, r) => { |
|
|
|
return (<Tooltip content={t}> |
|
|
|
<div style={{ |
|
|
|
textOverflow: 'ellipsis', |
|
|
|
overflow: 'hidden', |
|
|
|
whiteSpace: 'nowrap', |
|
|
|
width: 120 |
|
|
|
width: 150 |
|
|
|
}}> |
|
|
|
{t} |
|
|
|
</div> |
|
|
@ -172,7 +174,7 @@ const EmployeeCommunication = (props) => { |
|
|
|
}, { |
|
|
|
title: '操作', |
|
|
|
dataIndex: 'action', |
|
|
|
width: 120, |
|
|
|
width: 90, |
|
|
|
render: (text, record) => { |
|
|
|
return <div> |
|
|
|
<span style={{ color: '#1890FF', cursor: 'pointer' }} onClick={() => onDetail(record)}>查看详情</span> |
|
|
@ -189,6 +191,14 @@ const EmployeeCommunication = (props) => { |
|
|
|
setModalV(false) |
|
|
|
} |
|
|
|
|
|
|
|
function handleChange (date) { |
|
|
|
if (date.length > 1) { |
|
|
|
setTimeRange(moment(date[0]).format('YYYY-MM-DD 00:00:00')+','+moment(date[1]).format('YYYY-MM-DD 23:59:59')) |
|
|
|
} |
|
|
|
else { |
|
|
|
setTimeRange(''); |
|
|
|
} |
|
|
|
} |
|
|
|
const scroll = useMemo(() => ({}), []); |
|
|
|
return (<div style={{ padding: '0px 12px' }}> |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
@ -227,8 +237,7 @@ const EmployeeCommunication = (props) => { |
|
|
|
</div> |
|
|
|
<div style={{ marginRight: '18px' }}> |
|
|
|
<span style={{ verticalAlign: 'sub', color: 'rgba(0, 0, 0, 0.65)', fontSize: '14px', fontWeight: 'bold' }}>沟通时间:</span> |
|
|
|
<DatePicker |
|
|
|
initValue={[moment(new Date()).add(-1, 'y').format('YYYY-MM-DD'), moment(new Date()).format('YYYY-MM-DD')]} |
|
|
|
<DatePicker onChange={handleChange} |
|
|
|
field='entryTime' type="dateRange" density="compact" showClear style={{ width: 370, color: "#F9F9F9" }} /> |
|
|
|
</div> |
|
|
|
<Button theme='solid' type='primary' style={{ width: 80, borderRadius: 2, height: 32, background: '#DBECFF', color: '#005ABD' }} |
|
|
|