From b097983f1b896e2e6cb03e4c599c2030dddd76d2 Mon Sep 17 00:00:00 2001 From: wuzhuorong <973204353@qq.com> Date: Tue, 16 Jun 2026 11:25:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E6=96=B0=E5=A2=9E=E6=91=84?= =?UTF-8?q?=E5=83=8F=E5=A4=B4=E7=AE=A1=E7=90=86=E4=B8=8E=E8=A7=84=E5=88=99?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/layouts/MainLayout.vue | 6 +- apps/web/src/router/index.js | 16 +- apps/web/src/views/CameraManagement.vue | 683 +++++++++++++++++ apps/web/src/views/RuleConfiguration.vue | 903 +++++++++++++++++++++++ 4 files changed, 1606 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/views/CameraManagement.vue create mode 100644 apps/web/src/views/RuleConfiguration.vue diff --git a/apps/web/src/layouts/MainLayout.vue b/apps/web/src/layouts/MainLayout.vue index 57e68fc..c070691 100644 --- a/apps/web/src/layouts/MainLayout.vue +++ b/apps/web/src/layouts/MainLayout.vue @@ -99,7 +99,9 @@ import { WarningFilled, Bell, Fold, - Expand + Expand, + Connection, + SetUp } from '@element-plus/icons-vue' import { useAlertStore } from '@/stores/alertStore' import { connectAlertSocket, disconnectAlertSocket } from '@/services/mqtt.client' @@ -111,6 +113,8 @@ const alertStore = useAlertStore() const menuItems = [ { path: '/', title: '模型检测', icon: VideoCameraFilled }, + { path: '/cameras', title: '摄像头管理', icon: Connection }, + { path: '/rules', title: '规则配置', icon: SetUp }, { path: '/alerts', title: '预警列表', icon: WarningFilled } ] diff --git a/apps/web/src/router/index.js b/apps/web/src/router/index.js index 2f7d5d2..7b5e69d 100644 --- a/apps/web/src/router/index.js +++ b/apps/web/src/router/index.js @@ -1,6 +1,8 @@ import { createRouter, createWebHistory } from 'vue-router' import Home from '@/views/Home.vue' import AlertList from '@/views/AlertList.vue' +import CameraManagement from '@/views/CameraManagement.vue' +import RuleConfiguration from '@/views/RuleConfiguration.vue' import Layout from '@/layouts/MainLayout.vue' const routes = [ @@ -14,6 +16,18 @@ const routes = [ component: Home, meta: { title: '模型检测', icon: 'VideoCamera', keepAlive: true } }, + { + path: '/cameras', + name: 'CameraManagement', + component: CameraManagement, + meta: { title: '摄像头管理', icon: 'Connection', keepAlive: true } + }, + { + path: '/rules', + name: 'RuleConfiguration', + component: RuleConfiguration, + meta: { title: '规则配置', icon: 'SetUp', keepAlive: true } + }, { path: '/alerts', name: 'AlertList', @@ -29,4 +43,4 @@ const router = createRouter({ routes }) -export default router \ No newline at end of file +export default router diff --git a/apps/web/src/views/CameraManagement.vue b/apps/web/src/views/CameraManagement.vue new file mode 100644 index 0000000..ea77f2d --- /dev/null +++ b/apps/web/src/views/CameraManagement.vue @@ -0,0 +1,683 @@ + + + + + diff --git a/apps/web/src/views/RuleConfiguration.vue b/apps/web/src/views/RuleConfiguration.vue new file mode 100644 index 0000000..26e040c --- /dev/null +++ b/apps/web/src/views/RuleConfiguration.vue @@ -0,0 +1,903 @@ + + + + +