多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
664 B

import ExcelTemplateAdapter from './ExcelTemplateAdapter'
const { $api } = useNuxtApp()
export default class ExcelUrlTemplateAdapter extends ExcelTemplateAdapter {
url: string
quickImportType: string
excelData: any
constructor(url: string, parserConfig: Record<string, any>, quickImportType: string) {
const name = url.split('/').pop()
super(name, parserConfig)
this.url = url
this.quickImportType = quickImportType
this.excelData = null
}
async init() {
const data: any = await $api.utils.axiosRequestMake({
apiMeta: {
url: this.url,
},
})
this.excelData = data.data
await super.init()
}
}