Browse Source

(*)前端获取导入数据

master
ww664853070 2 years ago
parent
commit
12d57f3f89
  1. 4
      web/client/src/sections/humanAffairs/containers/importPersonalTrainRecord.jsx
  2. 1
      web/client/src/sections/humanAffairs/containers/personalTrainRecord.jsx

4
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 = []; //

1
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))

Loading…
Cancel
Save