From 26cda335c597146d0933315cac67d8a0fb6fd601 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Tue, 14 Jan 2025 11:43:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.env.development | 2 +- frontend/src/routers/index.ts | 2 +- frontend/src/routers/modules/dynamicRouter.ts | 1 + .../views/home/components/channelsTest.vue | 20 +++++++---- .../home/components/channelsTestTable.vue | 36 +++++++++---------- frontend/src/views/home/components/table.vue | 2 +- frontend/src/views/home/tabs/dashboard.vue | 2 +- .../machine/device/components/devicePopup.vue | 8 +++-- .../src/views/machine/testScript/index.vue | 8 +++-- 9 files changed, 46 insertions(+), 35 deletions(-) diff --git a/frontend/.env.development b/frontend/.env.development index 8f13788..01e3f04 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -19,6 +19,6 @@ VITE_API_URL=/api # 开发环境跨域代理,支持配置多个 -VITE_PROXY=[["/api","http://192.168.1.124:18092/"]] +VITE_PROXY=[["/api","http://192.168.1.121:18092/"]] #VITE_PROXY=[["/api","http://192.168.1.125:18092/"]] # VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文 diff --git a/frontend/src/routers/index.ts b/frontend/src/routers/index.ts index 3d11a40..fbd5f6e 100644 --- a/frontend/src/routers/index.ts +++ b/frontend/src/routers/index.ts @@ -46,7 +46,7 @@ router.beforeEach(async (to, from, next) => { const authStore = useAuthStore() // 1.NProgress 开始 NProgress.start() - + console.log('11111111111111'); // 2.动态设置标题 const title = import.meta.env.VITE_GLOB_APP_TITLE document.title = to.meta.title ? `${to.meta.title} - ${title}` : title diff --git a/frontend/src/routers/modules/dynamicRouter.ts b/frontend/src/routers/modules/dynamicRouter.ts index eaf517e..b0025de 100644 --- a/frontend/src/routers/modules/dynamicRouter.ts +++ b/frontend/src/routers/modules/dynamicRouter.ts @@ -36,6 +36,7 @@ export const initDynamicRouter = async () => { // 3.添加动态路由 authStore.flatMenuListGet.forEach(item => { item.children && delete item.children; + if (item.component && typeof item.component == "string") { item.component = modules["/src/views" + item.component + ".vue"]; } diff --git a/frontend/src/views/home/components/channelsTest.vue b/frontend/src/views/home/components/channelsTest.vue index 802a4fa..f3e6c73 100644 --- a/frontend/src/views/home/components/channelsTest.vue +++ b/frontend/src/views/home/components/channelsTest.vue @@ -1,5 +1,5 @@