@@ -11,7 +11,6 @@ import icon_form_outlined from '@/assets/svg/icon_form_outlined.svg'
1111import FixedSizeList from ' element-plus-secondary/es/components/virtual-list/src/components/fixed-size-list.mjs'
1212import { debounce } from ' lodash-es'
1313import { Plus } from ' @element-plus/icons-vue'
14- import { useCache } from ' @/utils/useCache'
1514import { haveSchema } from ' @/views/ds/js/ds-type'
1615import { setSize } from ' @/utils/utils'
1716import EmptyBackground from ' @/views/dashboard/common/EmptyBackground.vue'
@@ -33,7 +32,6 @@ const props = withDefaults(
3332 }
3433)
3534
36- const { wsCache } = useCache ()
3735const dsFormRef = ref <FormInstance >()
3836const emit = defineEmits ([' refresh' , ' changeActiveStep' , ' close' ])
3937const isCreate = ref (true )
@@ -42,13 +40,7 @@ const checkList = ref<any>([])
4240const tableList = ref <any >([])
4341const excelUploadSuccess = ref (false )
4442const tableListLoading = ref (false )
45- const token = wsCache .get (' user.token' )
4643const checkLoading = ref (false )
47- const request_key = computed (() => {
48- // eslint-disable-next-line no-undef
49- return LicenseGenerator .generate ()
50- })
51- const headers = ref <any >({ ' X-SQLBOT-TOKEN' : ` Bearer ${token } ` , ' X-SQLBOT-KEY' : request_key })
5244const dialogTitle = ref (' ' )
5345const getUploadURL = import .meta .env .VITE_API_BASE_URL + ' /datasource/uploadExcel'
5446const saveLoading = ref <boolean >(false )
@@ -537,7 +529,6 @@ defineExpose({
537529 v-if =" form.filename && !form.id"
538530 class =" upload-user"
539531 accept =" .xlsx,.xls,.csv"
540- :headers =" headers"
541532 :action =" getUploadURL"
542533 :before-upload =" beforeUpload"
543534 :on-error =" onError"
@@ -553,7 +544,6 @@ defineExpose({
553544 v-else-if =" !form.id"
554545 class =" upload-user"
555546 accept =" .xlsx,.xls,.csv"
556- :headers =" headers"
557547 :action =" getUploadURL"
558548 :before-upload =" beforeUpload"
559549 :on-success =" onSuccess"
0 commit comments