|
|
@ -1,14 +1,14 @@ |
|
|
|
import React, { useEffect, useRef, useState, useMemo } from 'react'; |
|
|
|
import { connect } from 'react-redux'; |
|
|
|
import moment from 'moment' |
|
|
|
import { Select, Input, Button, Tooltip, Table, Pagination, Skeleton, DatePicker } from '@douyinfe/semi-ui'; |
|
|
|
import { Select, Input, Button, Tooltip, Table, Pagination, Skeleton, DatePicker, Toast } from '@douyinfe/semi-ui'; |
|
|
|
import { IconSearch } from '@douyinfe/semi-icons'; |
|
|
|
import DetailModal from './detailModal'; |
|
|
|
import { SkeletonScreen } from "$components"; |
|
|
|
import '../../style.less' |
|
|
|
|
|
|
|
const EmployeeCommunication = (props) => { |
|
|
|
const { dispatch, actions } = props |
|
|
|
const { dispatch, actions, user } = props |
|
|
|
const { humanAffairs } = actions; |
|
|
|
const [keywordTarget, setKeywordTarget] = useState('personalName'); |
|
|
|
const [keyword, setKeyword] = useState('');//搜索内容 |
|
|
@ -18,6 +18,7 @@ const EmployeeCommunication = (props) => { |
|
|
|
const [modalV, setModalV] = useState(false); |
|
|
|
const [dataToDetail, setDataToDetail] = useState(null); |
|
|
|
const [tableData, setTableData] = useState([]); |
|
|
|
const [exportUrl, setExportUrl] = useState(''); |
|
|
|
const page = useRef(query.page); |
|
|
|
function seachValueChange(value) { |
|
|
|
setKeyword(value) |
|
|
@ -189,6 +190,11 @@ const EmployeeCommunication = (props) => { |
|
|
|
setTimeRange(''); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const exportAllData = () => { |
|
|
|
let url = `export/employee/communicate?token=${user.token}×tamp=${moment().valueOf()}` |
|
|
|
setExportUrl(url); |
|
|
|
} |
|
|
|
const scroll = useMemo(() => ({}), []); |
|
|
|
return (<div style={{ padding: '0px 12px' }}> |
|
|
|
<div style={{ display: 'flex' }}> |
|
|
@ -237,7 +243,10 @@ const EmployeeCommunication = (props) => { |
|
|
|
}}>查询</Button> |
|
|
|
</div> |
|
|
|
<div style={{ display: 'flex', marginRight: 20 }}> |
|
|
|
<div style={{ padding: '6px 20px', background: '#0F7EFB', color: '#FFFFFF', fontSize: 14, marginLeft: 18, cursor: "pointer" }}> |
|
|
|
<div style={{ padding: '6px 20px', background: '#0F7EFB', color: '#FFFFFF', fontSize: 14, marginLeft: 18, cursor: "pointer" }} |
|
|
|
onClick={() => { |
|
|
|
exportAllData() |
|
|
|
}}> |
|
|
|
导出 |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -291,6 +300,9 @@ const EmployeeCommunication = (props) => { |
|
|
|
close={() => closeAndFetch()} |
|
|
|
onCancel={() => setModalV(false)} /> : '' |
|
|
|
} |
|
|
|
{ |
|
|
|
exportUrl ? <iframe src={`/_api/${exportUrl}`} style={{ display: 'none' }} /> : '' |
|
|
|
} |
|
|
|
</div >) |
|
|
|
} |
|
|
|
|
|
|
|