mirror of https://github.com/nocodb/nocodb
Wing-Kam Wong
3 years ago
2 changed files with 9 additions and 7 deletions
@ -1,20 +1,22 @@ |
|||||||
import ExcelTemplateAdapter from '~/components/import/templateParsers/ExcelTemplateAdapter' |
import ExcelTemplateAdapter from '~/components/import/templateParsers/ExcelTemplateAdapter' |
||||||
|
|
||||||
export default class ExcelUrlTemplateAdapter extends ExcelTemplateAdapter { |
export default class ExcelUrlTemplateAdapter extends ExcelTemplateAdapter { |
||||||
constructor(url, $store, parserConfig) { |
constructor(url, $store, parserConfig, $api) { |
||||||
const name = url.split('/').pop() |
const name = url.split('/').pop() |
||||||
super(name, null, parserConfig) |
super(name, null, parserConfig) |
||||||
this.url = url |
this.url = url |
||||||
|
this.$api = $api |
||||||
this.$store = $store |
this.$store = $store |
||||||
} |
} |
||||||
|
|
||||||
async init() { |
async init() { |
||||||
const res = await this.$store.dispatch('sqlMgr/ActSqlOp', [null, 'handleAxiosCall', |
const data = await this.$api.utils.axiosRequestMake({ |
||||||
[{ |
apiMeta: { |
||||||
url: this.url, |
url: this.url, |
||||||
responseType: 'arraybuffer' |
responseType: 'arraybuffer' |
||||||
}]]) |
} |
||||||
this.excelData = res.data |
}) |
||||||
|
this.excelData = data.data |
||||||
await super.init()
|
await super.init()
|
||||||
} |
} |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue