diff --git a/web/client/src/sections/humanAffairs/containers/importPersonalTrainRecord.jsx b/web/client/src/sections/humanAffairs/containers/importPersonalTrainRecord.jsx index 1623cfb..fa56b25 100644 --- a/web/client/src/sections/humanAffairs/containers/importPersonalTrainRecord.jsx +++ b/web/client/src/sections/humanAffairs/containers/importPersonalTrainRecord.jsx @@ -18,6 +18,7 @@ const ImportPerformanceSummaryModal = props => { const confirm = () => { if (postData.length) { setLoading(true) + console.log(postData,'-------------------') // dispatch(businessManagement.importSalePerformance(postData)).then(res => { // if (res.success) { // onCancel() @@ -64,13 +65,14 @@ const ImportPerformanceSummaryModal = props => { if (window.FileReader) { let reader = new FileReader(); reader.readAsBinaryString(request.response); + reader.onload = event => { try { const { result } = event.target; // 以二进制流方式读取得到整份excel表格对象 const workbook = XLSX.read(result, { type: "binary", - cellDates: true,//设为true,将天数的时间戳转为时间格式 + // cellDates: true,//设为true,将天数的时间戳转为时间格式 codepage: 936,//解决了乱码问题 }); let data = []; // 存储获取到的数据 diff --git a/web/client/src/sections/humanAffairs/containers/personalTrainRecord.jsx b/web/client/src/sections/humanAffairs/containers/personalTrainRecord.jsx index c9e5a90..5fbb4a3 100644 --- a/web/client/src/sections/humanAffairs/containers/personalTrainRecord.jsx +++ b/web/client/src/sections/humanAffairs/containers/personalTrainRecord.jsx @@ -10,7 +10,6 @@ const PersonalTrainRecord = (props) => { const [limits, setLimits] = useState()//每页实际条数 const [query, setQuery] = useState({ limit: 10, page: 0 }); //页码信息 const [importModalV, setImportModalV] = useState(false); //页码信息 - console.log(actions, '================') useEffect(() => { const { getPersonalTrainRecord } = actions.humanAffairs dispatch(getPersonalTrainRecord(query))