|
@ -151,6 +151,10 @@ export default { |
|
|
allCells.push(newRow); |
|
|
allCells.push(newRow); |
|
|
} |
|
|
} |
|
|
that.fileData1Header = { ...allCells[3] } |
|
|
that.fileData1Header = { ...allCells[3] } |
|
|
|
|
|
ElMessage({ |
|
|
|
|
|
message: `导入成功,请导入下一个文件`, |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
}) |
|
|
that.fileData1 = allCells |
|
|
that.fileData1 = allCells |
|
|
} |
|
|
} |
|
|
fileReader.onerror = function (error) { |
|
|
fileReader.onerror = function (error) { |
|
@ -173,6 +177,10 @@ export default { |
|
|
let sheetName = workbook.SheetNames[0] |
|
|
let sheetName = workbook.SheetNames[0] |
|
|
let sheetData = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]) |
|
|
let sheetData = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]) |
|
|
that.dealData2(sheetData) |
|
|
that.dealData2(sheetData) |
|
|
|
|
|
ElMessage({ |
|
|
|
|
|
message: `导入成功,请预览或者导出`, |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
fileReader.onerror = function (error) { |
|
|
fileReader.onerror = function (error) { |
|
|
ElMessage({ |
|
|
ElMessage({ |
|
|