From 7adba84f40042fb39d6a9ece62164947a0379541 Mon Sep 17 00:00:00 2001 From: Noneday <59395983@qq.com> Date: Wed, 22 Nov 2023 10:36:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=AF=BC=E5=87=BAexcel?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E5=8A=A8=E6=80=81=E9=A2=9C=E8=89=B2=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/router/axios.js | 3 ++- front/src/views/rpt_design/utils/export_excel.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/front/src/router/axios.js b/front/src/router/axios.js index 8f07835..d03dadc 100644 --- a/front/src/router/axios.js +++ b/front/src/router/axios.js @@ -64,7 +64,8 @@ axios.interceptors.response.use(async res => { //如果在白名单里则自行catch逻辑处理 if (statusWhiteList.includes(status)) return Promise.reject(res); //如果是401则跳转到登录页面 - if (status === 401){ + + if (status === 401 && res.config.url!='/user/login'){ if(res.headers['token-expired']=='true' || cur_message().indexOf("过期")>=0 ){ // Create new promise to handle exponential backoff await store.dispatch("RefreshToken") diff --git a/front/src/views/rpt_design/utils/export_excel.js b/front/src/views/rpt_design/utils/export_excel.js index 3022452..54f1265 100644 --- a/front/src/views/rpt_design/utils/export_excel.js +++ b/front/src/views/rpt_design/utils/export_excel.js @@ -53,7 +53,7 @@ function find_style(tbl,rowNo,colNo,cur_tbl_class_dict){ let one=tbl.abs_to_design[idx] let cur_ret={} if(one.row[0]<=rowNo && rowNo<=one.row[1] && one.col[0]<=colNo && colNo<=one.col[1]){ - Object.assign(cur_ret,default_css,cur_tbl_class_dict[tbl.loc_style[one.cell+"_S"] ??""],cur_tbl_class_dict[tbl.loc_style[one.cell+"_D"] ??""] + Object.assign(cur_ret,default_css,cur_tbl_class_dict[tbl.loc_style[one.cell+"_S"] ??""],cur_tbl_class_dict[tbl.loc_style[`${rowNo}_${colNo}_D`] ??""] ) return cur_ret }