Browse Source

(*)员工沟通列表条件查询修改

master
zmh 2 years ago
parent
commit
59d9d37477
  1. 23
      web/client/src/sections/humanAffairs/containers/communication/employeeCommunication.jsx

23
web/client/src/sections/humanAffairs/containers/communication/employeeCommunication.jsx

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

Loading…
Cancel
Save