diff --git a/web/client/src/sections/humanAffairs/containers/communication/employeeCommunication.jsx b/web/client/src/sections/humanAffairs/containers/communication/employeeCommunication.jsx index 5cf3825..9eebe0e 100644 --- a/web/client/src/sections/humanAffairs/containers/communication/employeeCommunication.jsx +++ b/web/client/src/sections/humanAffairs/containers/communication/employeeCommunication.jsx @@ -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(true); const [dataToDetail, setDataToDetail] = useState(null); const [tableData, setTableData] = useState([]); + const [exportUrl, setExportUrl] = useState(''); const page = useRef(query.page); function seachValueChange(value) { setKeyword(value) @@ -84,7 +85,7 @@ const EmployeeCommunication = (props) => { title: '沟通时间', dataIndex: 'communicateDate', key: 'communicateDate', - width: 120, + width: 120, render: (text, record) => {text ? moment(text).format("YYYY-MM-DD") : '-'} }, { title: '沟通内容', @@ -191,14 +192,19 @@ const EmployeeCommunication = (props) => { setModalV(false) } - function handleChange (date) { + 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')) + setTimeRange(moment(date[0]).format('YYYY-MM-DD 00:00:00') + ',' + moment(date[1]).format('YYYY-MM-DD 23:59:59')) } else { setTimeRange(''); } } + + const exportAllData = () => { + let url = `export/employee/communicate?token=${user.token}×tamp=${moment().valueOf()}` + setExportUrl(url); + } const scroll = useMemo(() => ({}), []); return (