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 @@ + + + + +