File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 3333 "/system/assistant/info/*" ,
3434 "/system/assistant/app/*" ,
3535 "/system/assistant/picture/*" ,
36- "/datasource/uploadExcel" ,
3736 "/system/authentication/platform/status" ,
3837 "/system/authentication/login/*" ,
3938 "/system/authentication/sso/*" ,
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { setSize } from '@/utils/utils'
1616import EmptyBackground from ' @/views/dashboard/common/EmptyBackground.vue'
1717import icon_fileExcel_colorful from ' @/assets/datasource/icon_excel.png'
1818import IconOpeDelete from ' @/assets/svg/icon_delete.svg'
19+ import { useCache } from ' @/utils/useCache'
1920
2021const props = withDefaults (
2122 defineProps <{
@@ -128,6 +129,10 @@ const close = () => {
128129 saveLoading .value = false
129130}
130131
132+ const { wsCache } = useCache ()
133+ const token = wsCache .get (' user.token' )
134+ const headers = ref <any >({ ' X-SQLBOT-TOKEN' : ` Bearer ${token } ` })
135+
131136const initForm = (item : any , editTable : boolean = false ) => {
132137 isEditTable .value = false
133138 keywords .value = ' '
@@ -539,6 +544,7 @@ defineExpose({
539544 v-if =" form.filename && !form.id"
540545 class =" upload-user"
541546 accept =" .xlsx,.xls,.csv"
547+ :headers =" headers"
542548 :action =" getUploadURL"
543549 :before-upload =" beforeUpload"
544550 :on-error =" onError"
@@ -554,6 +560,7 @@ defineExpose({
554560 v-else-if =" !form.id"
555561 class =" upload-user"
556562 accept =" .xlsx,.xls,.csv"
563+ :headers =" headers"
557564 :action =" getUploadURL"
558565 :before-upload =" beforeUpload"
559566 :on-success =" onSuccess"
You can’t perform that action at this time.
0 commit comments