From 9726df3966d67dd02b3bc6c5d50f1230c21a6e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 18 Sep 2024 09:42:24 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=97=A5=E5=BF=97excel=E5=AF=BC=E5=87=BA=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/monitor/logininfor/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/monitor/logininfor/index.vue b/src/views/monitor/logininfor/index.vue index 03d0d8f..4cc890d 100644 --- a/src/views/monitor/logininfor/index.vue +++ b/src/views/monitor/logininfor/index.vue @@ -198,7 +198,7 @@ const handleExport = () => { { ...queryParams.value }, - `config_${new Date().getTime()}.xlsx` + `logininfor_${new Date().getTime()}.xlsx` ); }; From 364dfb969de09b97c4629e1c46b9ed9c2352da1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Mon, 7 Oct 2024 10:45:25 +0800 Subject: [PATCH 2/7] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/index.vue | 2 +- src/utils/sse.ts | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/layout/index.vue b/src/layout/index.vue index 0919aad..ce47a30 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -73,7 +73,7 @@ onMounted(() => { }); onMounted(() => { - initSSE(import.meta.env.VITE_APP_BASE_API + '/resource/sse') + initSSE(import.meta.env.VITE_APP_BASE_API + '/resource/sse'); }); const handleClickOutside = () => { diff --git a/src/utils/sse.ts b/src/utils/sse.ts index a08f282..0f74d0e 100644 --- a/src/utils/sse.ts +++ b/src/utils/sse.ts @@ -2,8 +2,6 @@ import { getToken } from '@/utils/auth'; import { ElNotification } from 'element-plus'; import useNoticeStore from '@/store/modules/notice'; -let message = ''; - // 初始化 export const initSSE = (url: any) => { url = url + '?Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID @@ -15,13 +13,13 @@ export const initSSE = (url: any) => { retries: 10, delay: 3000, onFailed() { - console.log('Failed to connect after 10 retries') - }, + console.log('Failed to connect after 10 retries'); + } } }); watch(error, () => { - console.log('SSE connection error:', error.value) + console.log('SSE connection error:', error.value); error.value = null; }); @@ -41,5 +39,3 @@ export const initSSE = (url: any) => { data.value = null; }); }; - - From 4918552492723d00a846ce2d552cf8888c5a5f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Sat, 12 Oct 2024 10:58:23 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E8=AF=B7?= =?UTF-8?q?=E5=81=87=E6=97=A5=E6=9C=9F=E9=80=89=E6=8B=A9=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/leave/leaveEdit.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/workflow/leave/leaveEdit.vue b/src/views/workflow/leave/leaveEdit.vue index a4ed946..dd0ce7c 100644 --- a/src/views/workflow/leave/leaveEdit.vue +++ b/src/views/workflow/leave/leaveEdit.vue @@ -23,10 +23,12 @@ From 1644070e97af5df11a9cc655a93f4e3e778ae879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A5=BF=E7=93=9Ci?= <5785714@qq.com> Date: Mon, 14 Oct 2024 20:33:16 +0800 Subject: [PATCH 4/7] =?UTF-8?q?add=20SSE=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 1 + .env.production | 1 + src/utils/sse.ts | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/.env.development b/.env.development index 05d6778..e94d5fa 100644 --- a/.env.development +++ b/.env.development @@ -30,3 +30,4 @@ VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e' # websocket 开关 默认使用sse推送 VITE_APP_WEBSOCKET = false +VITE_APP_SSE = true diff --git a/.env.production b/.env.production index c6b1f85..0b487f6 100644 --- a/.env.production +++ b/.env.production @@ -33,3 +33,4 @@ VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e' # websocket 开关 默认使用sse推送 VITE_APP_WEBSOCKET = false +VITE_APP_SSE = true diff --git a/src/utils/sse.ts b/src/utils/sse.ts index 0f74d0e..9174f0d 100644 --- a/src/utils/sse.ts +++ b/src/utils/sse.ts @@ -4,6 +4,10 @@ import useNoticeStore from '@/store/modules/notice'; // 初始化 export const initSSE = (url: any) => { + if (import.meta.env.VITE_APP_SSE === 'false') { + return; + } + url = url + '?Authorization=Bearer ' + getToken() + '&clientid=' + import.meta.env.VITE_APP_CLIENT_ID const { data, From f0895e941958ec32181af266cdb13440849ddb45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A5=BF=E7=93=9Ci?= <5785714@qq.com> Date: Mon, 14 Oct 2024 20:50:20 +0800 Subject: [PATCH 5/7] =?UTF-8?q?add=20=E5=A2=9E=E5=8A=A0=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 ++ .env.production | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.env.development b/.env.development index e94d5fa..14e1335 100644 --- a/.env.development +++ b/.env.development @@ -30,4 +30,6 @@ VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e' # websocket 开关 默认使用sse推送 VITE_APP_WEBSOCKET = false + +# sse 开关 VITE_APP_SSE = true diff --git a/.env.production b/.env.production index 0b487f6..1109bc6 100644 --- a/.env.production +++ b/.env.production @@ -33,4 +33,6 @@ VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e' # websocket 开关 默认使用sse推送 VITE_APP_WEBSOCKET = false + +# sse 开关 VITE_APP_SSE = true From a62a3de23c6b331e957a7d1f19b372c389caf141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 15 Oct 2024 13:49:32 +0800 Subject: [PATCH 6/7] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20pr!150=20sse?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E7=BC=BA=E5=B0=91=E5=8F=98=E9=87=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/env.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/env.d.ts b/src/types/env.d.ts index 777c858..1fb9f62 100644 --- a/src/types/env.d.ts +++ b/src/types/env.d.ts @@ -19,6 +19,7 @@ interface ImportMetaEnv { VITE_APP_RSA_PRIVATE_KEY: string; VITE_APP_CLIENT_ID: string; VITE_APP_WEBSOCKET: string; + VITE_APP_SSE: string; } interface ImportMeta { readonly env: ImportMetaEnv; From 6f4891d677aa15e85263a5d274d436b2add51beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 17 Oct 2024 18:15:18 +0800 Subject: [PATCH 7/7] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=8F=90=E4=BA=A4=E7=94=A8=E6=88=B7id=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=8F=90=E4=BA=A4=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E9=9B=AA=E8=8A=B1id=E5=A4=B1=E7=9C=9F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/workflow/leave/leaveEdit.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/workflow/leave/leaveEdit.vue b/src/views/workflow/leave/leaveEdit.vue index dd0ce7c..55556fd 100644 --- a/src/views/workflow/leave/leaveEdit.vue +++ b/src/views/workflow/leave/leaveEdit.vue @@ -192,8 +192,8 @@ const handleStartWorkFlow = async (data: LeaveVO) => { taskVariables.value = { entity: data, leaveDays: data.leaveDays, - userList: [1, 3], - userList2: [1, 3] + userList: ["1", "3"], + userList2: ["1", "3"] }; submitFormData.value.variables = taskVariables.value; const resp = await startWorkFlow(submitFormData.value);