学员批量导入

This commit is contained in:
禺狨 2023-03-08 14:06:55 +08:00
parent b9d9bc566c
commit ef9d832570

View File

@ -37,7 +37,7 @@ export const MemberImportPage: React.FC = () => {
jsonArr.splice(0, 1); // 去掉表头 jsonArr.splice(0, 1); // 去掉表头
const jsonArrData = jsonArr.map((item: any, index: number) => { const jsonArrData = jsonArr.map((item: any, index: number) => {
// console.log(item, index); // console.log(item, index);
let arr = []; let jsonObj = item;
//在这写你需要的处理逻辑 //在这写你需要的处理逻辑
// jsonObj.id = data.length + index + 1; // jsonObj.id = data.length + index + 1;
// jsonObj.key = data.length + index + 1 + ''; // jsonObj.key = data.length + index + 1 + '';
@ -46,8 +46,7 @@ export const MemberImportPage: React.FC = () => {
// jsonObj.profession = item[1]; // jsonObj.profession = item[1];
// jsonObj.pay = item[2]; // jsonObj.pay = item[2];
// jsonObj.work = item[3]; // jsonObj.work = item[3];
arr.push(item); return jsonObj;
return arr;
}); });
// setData([...data, ...jsonArrData]); // setData([...data, ...jsonArrData]);