|
|
@ -147,7 +147,7 @@ export default { |
|
|
options.container = 'luckysheet' |
|
|
options.container = 'luckysheet' |
|
|
options.loadUrl = `http://219.146.91.110:30801/api/actual/base/luckySheet/workbook/load?workbookId=${this.currentId}` |
|
|
options.loadUrl = `http://219.146.91.110:30801/api/actual/base/luckySheet/workbook/load?workbookId=${this.currentId}` |
|
|
options.updateUrl = `ws://219.146.91.110:30801/api/actual/base/ws/luckysheet/${this.currentId}/${id}` |
|
|
options.updateUrl = `ws://219.146.91.110:30801/api/actual/base/ws/luckysheet/${this.currentId}/${id}` |
|
|
options.loadSheetUrl = `http://219.146.91.110:30801/api/actual/base/luckySheet/workbook/loadSheets?workbookId=${this.currentId}` |
|
|
options.loadSheetUrl = `http://219.146.91.110:30801/api/actual/base/luckySheet/workbook/loadSheets` |
|
|
window.luckysheet.create({ |
|
|
window.luckysheet.create({ |
|
|
...options, |
|
|
...options, |
|
|
hook: { |
|
|
hook: { |
|
|
@ -184,14 +184,14 @@ export default { |
|
|
let name = files[0].name; |
|
|
let name = files[0].name; |
|
|
let suffixArr = name.split('.'), |
|
|
let suffixArr = name.split('.'), |
|
|
suffix = suffixArr[suffixArr.length - 1]; |
|
|
suffix = suffixArr[suffixArr.length - 1]; |
|
|
debugger |
|
|
|
|
|
if (suffix != 'xlsx') return alert('目前只支持导入xlsx文件'); |
|
|
if (suffix != 'xlsx') return alert('目前只支持导入xlsx文件'); |
|
|
LuckyExcel.transformExcelToLucky(files[0], function (exportJson, luckysheetfile) { |
|
|
LuckyExcel.transformExcelToLucky(files[0], function (exportJson, luckysheetfile) { |
|
|
|
|
|
console.log(exportJson.sheets); |
|
|
if (exportJson.sheets == null || exportJson.sheets.length == 0) return alert('读取excel文件内容失败, 目前不支持XLS文件!'); |
|
|
if (exportJson.sheets == null || exportJson.sheets.length == 0) return alert('读取excel文件内容失败, 目前不支持XLS文件!'); |
|
|
window.luckysheet.destroy(); |
|
|
window.luckysheet.destroy(); |
|
|
window.luckysheet.create({ |
|
|
window.luckysheet.create({ |
|
|
...options, |
|
|
...options, |
|
|
data: exportJson.sheets, |
|
|
data: exportJson.sheets[0], |
|
|
title: exportJson.info.name, |
|
|
title: exportJson.info.name, |
|
|
hook: { |
|
|
hook: { |
|
|
|
|
|
|
|
|
|