From b0d3684dd9d7ea8640137f5d55d5043614d0870e Mon Sep 17 00:00:00 2001 From: LWH <2199719306@qq.com> Date: Thu, 19 Mar 2026 11:33:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BA=E5=A4=84=E5=88=86=E5=92=8C?= =?UTF-8?q?=E8=A7=A3=E9=99=A4=E5=A4=84=E5=88=86=E6=A8=A1=E5=9D=97=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20Excel=20=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E5=8C=85=E5=90=AB=E5=89=8D=E7=AB=AF=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E3=80=81=E5=90=8E=E7=AB=AF=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E3=80=81=E7=A9=BA=E8=A1=8C=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=E3=80=81=E5=AD=A6=E5=8F=B7=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E5=8F=8A=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/auth.js | 6 ++ .../routine/disciplinaryApplication/index.vue | 4 + src/views/routine/relieve/index.vue | 73 +++++++++++++++++++ 3 files changed, 83 insertions(+) diff --git a/src/utils/auth.js b/src/utils/auth.js index 2fe05d8..748f3c5 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -4,6 +4,12 @@ const TokenKey = 'Admin-Token' export function getToken() { console.log('getToken') + // 先从 sessionStorage 获取 + const token = sessionStorage.getItem(TokenKey) + if (token) { + return token + } + // 如果 sessionStorage 没有,再从 Cookie 获取 return Cookies.get(TokenKey) } diff --git a/src/views/routine/disciplinaryApplication/index.vue b/src/views/routine/disciplinaryApplication/index.vue index e83c059..50d43df 100644 --- a/src/views/routine/disciplinaryApplication/index.vue +++ b/src/views/routine/disciplinaryApplication/index.vue @@ -244,6 +244,7 @@ :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" + :with-credentials="true" drag > @@ -510,6 +511,9 @@ export default { handleImport() { this.upload.title = "学生处分导入"; this.upload.open = true; + console.log('Token:', getToken()); + console.log('Upload headers:', this.upload.headers); + console.log('Upload url:', this.upload.url); }, /** 下载模板操作 */ importTemplate() { diff --git a/src/views/routine/relieve/index.vue b/src/views/routine/relieve/index.vue index 3b94a09..e7268e4 100644 --- a/src/views/routine/relieve/index.vue +++ b/src/views/routine/relieve/index.vue @@ -29,6 +29,9 @@ 导出 + + 解除处分导入 + @@ -189,11 +192,40 @@ 取 消 + + + + + + 将文件拖到此处,或点击上传 + + 仅允许导入 xls、xlsx 格式文件。 + 下载模板 + + + +