From 12d57f3f896a73e729c094f1923281b909ccdd14 Mon Sep 17 00:00:00 2001 From: ww664853070 Date: Mon, 19 Dec 2022 17:07:17 +0800 Subject: [PATCH] =?UTF-8?q?(*)=E5=89=8D=E7=AB=AF=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../humanAffairs/containers/importPersonalTrainRecord.jsx | 4 +++- .../sections/humanAffairs/containers/personalTrainRecord.jsx | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) 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))