|
@@ -61,7 +61,6 @@ class SchoolService extends CrudService {
|
|
|
type,
|
|
|
batchid
|
|
|
);
|
|
|
- console.log('in function:');
|
|
|
// 将得到的数据校验
|
|
|
const datacheck = await this.datacheck(studatas);
|
|
|
if (datacheck.errorcode === '1') {
|
|
@@ -177,6 +176,7 @@ class SchoolService extends CrudService {
|
|
|
const sheetNames = workbook.SheetNames; // 获取表名
|
|
|
const sheet = workbook.Sheets[sheetNames[0]]; // 通过表名得到表对象
|
|
|
// 遍历26个字母
|
|
|
+ console.log('in function:');
|
|
|
const theadRule = [];
|
|
|
const range = XLSX.utils.decode_range(sheet['!ref']);
|
|
|
const col_start = range.s.c;
|
|
@@ -185,9 +185,11 @@ class SchoolService extends CrudService {
|
|
|
const addr = XLSX.utils.encode_col(i) + XLSX.utils.encode_row(0);
|
|
|
theadRule.push(sheet[addr].v);
|
|
|
}
|
|
|
+ console.log('in function2:');
|
|
|
// const theadRule = [ sheet.A1.v, sheet.B1.v, sheet.C1.v, sheet.D1.v, sheet.E1.v, sheet.F1.v, sheet.G1.v, sheet.H1.v, sheet.I1.v, sheet.J1.v, sheet.K1.v, sheet.L1.v, sheet.M1.v, sheet.N1.v, sheet.O1.v, sheet.P1.v, sheet.Q1.v, sheet.R1.v ];
|
|
|
const params = XLSX.utils.sheet_to_json(sheet); // 通过工具将表对象的数据读出来并转成json
|
|
|
// const theadRule = [ '序号', '姓名', '性别', '民族', '身份证号', '学校名称', '院系', '专业', '入学年份', '毕业年份', '在校曾担任何种职务', '手机号', 'QQ号', '家庭所在地', '家庭是否困难', '是否获得过助学金' ];
|
|
|
+ console.log('in function3:');
|
|
|
if (!params) return [];
|
|
|
let i = 0;
|
|
|
const length = params.length;
|
|
@@ -232,7 +234,10 @@ class SchoolService extends CrudService {
|
|
|
type,
|
|
|
});
|
|
|
}
|
|
|
+ console.log('in function4:');
|
|
|
exceldata = [ ...exceldata, ..._datas ];
|
|
|
+ console.log(`exceldata=>${exceldata}`);
|
|
|
+
|
|
|
return exceldata;
|
|
|
}
|
|
|
|