From add7d772aed401a1e7259dedac8019e0f5141fbf Mon Sep 17 00:00:00 2001 From: guoapeng Date: Thu, 20 Mar 2025 17:49:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=8A=B6=E6=80=81=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 3 +- .env.prod | 3 +- .env.test | 3 +- .eslintrc-auto-import.json | 3 +- auto-imports.d.ts | 1 + src/apis/system.ts | 17 +-- src/components/common/FTButton/index.vue | 40 ++++- src/components/common/FTDialog/index.vue | 9 +- src/components/common/FTStream/index.vue | 13 +- src/components/home/Check/index.vue | 158 ++++++++++++++++++++ src/components/home/stop/index.vue | 28 ++++ src/components/martixCraft/Edit/index.vue | 17 ++- src/components/point/Edit/index.vue | 4 + src/components/spray/startSpray/index.vue | 104 +++++++++++-- src/components/spray/trayGraph/index.vue | 19 +-- src/env.d.ts | 1 + src/libs/http.ts | 10 +- src/libs/socket.ts | 4 +- src/libs/utils.ts | 183 +++++++++++++---------- src/stores/useSystemStore.ts | 21 ++- src/views/clean/index.vue | 23 ++- src/views/debug/index.vue | 238 ++++++++++++++++-------------- src/views/home/index.vue | 21 +++ src/views/login/index.vue | 13 +- src/views/main/index.vue | 54 +++++-- src/views/point/index.vue | 1 + src/views/spray/index.vue | 123 ++++++++------- src/views/spraySet/index.vue | 81 +++++----- vite.config.ts | 4 +- 29 files changed, 817 insertions(+), 382 deletions(-) create mode 100644 src/components/home/Check/index.vue create mode 100644 src/components/home/stop/index.vue diff --git a/.env.dev b/.env.dev index e691d2d..4d4fdee 100644 --- a/.env.dev +++ b/.env.dev @@ -2,4 +2,5 @@ FT_NODE_ENV=dev -FT_WS_URL=ws://192.168.1.199:8080/ws \ No newline at end of file +FT_WS_URL=ws://192.168.1.199:8080/ws +FT_PROXY=http://192.168.1.199:8080 \ No newline at end of file diff --git a/.env.prod b/.env.prod index f38cde4..52f3349 100644 --- a/.env.prod +++ b/.env.prod @@ -2,4 +2,5 @@ FT_NODE_ENV=prod -FT_WS_URL=ws://192.168.1.168/ws \ No newline at end of file +FT_WS_URL=ws://192.168.1.168/ws +FT_PROXY=http://192.168.1.168 \ No newline at end of file diff --git a/.env.test b/.env.test index 835ed14..bd4db42 100644 --- a/.env.test +++ b/.env.test @@ -2,4 +2,5 @@ FT_NODE_ENV=test -FT_WS_URL=ws://192.168.1.205/ws/ \ No newline at end of file +FT_WS_URL=ws://192.168.1.200:8080/ws +FT_PROXY=http://192.168.1.199:8080 \ No newline at end of file diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index 28c8cd1..3c297f1 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -76,6 +76,7 @@ "watchEffect": true, "watchPostEffect": true, "watchSyncEffect": true, - "withModifiers": true + "withModifiers": true, + "ElNotification": true } } diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 94179d8..f6369c1 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -7,6 +7,7 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElNotification: typeof import('element-plus/es')['ElNotification'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] diff --git a/src/apis/system.ts b/src/apis/system.ts index ce5d19b..7b3a254 100644 --- a/src/apis/system.ts +++ b/src/apis/system.ts @@ -6,20 +6,7 @@ import http from 'libs/http' */ export const login = (params: { username: string, password: string }) => http.post('/auth/login', params) -export const getStreamData = () => fetch('/api/cmd/stream-data') -export const control = (params: any) => fetch('/api/device/front/control', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify(params), -}) +export const control = (params: any) => http.post('/function', params) -export const debugControl = (params: any) => fetch('/api/device/debug/front/control', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, - body: JSON.stringify(params), -}) +export const debugControl = (params: any) => http.post('/function/debug', params) diff --git a/src/components/common/FTButton/index.vue b/src/components/common/FTButton/index.vue index e2d67ff..b2f8fd1 100644 --- a/src/components/common/FTButton/index.vue +++ b/src/components/common/FTButton/index.vue @@ -1,5 +1,7 @@