From 4b54a50d8c9bb151a19ecdd056ff65f8b9b0a4ec Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Mon, 9 Feb 2026 11:40:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(aiot):=20=E5=88=A0=E9=99=A4=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E8=A7=86=E9=A2=91=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除 views/aiot/video 和 api/aiot/video 目录, 撤回 auth.ts 中的菜单过滤逻辑。 Co-Authored-By: Claude Opus 4.6 --- apps/web-antd/src/api/aiot/video/index.ts | 43 ------- apps/web-antd/src/store/auth.ts | 13 +- .../src/views/aiot/video/live/index.vue | 112 ------------------ 3 files changed, 1 insertion(+), 167 deletions(-) delete mode 100644 apps/web-antd/src/api/aiot/video/index.ts delete mode 100644 apps/web-antd/src/views/aiot/video/live/index.vue diff --git a/apps/web-antd/src/api/aiot/video/index.ts b/apps/web-antd/src/api/aiot/video/index.ts deleted file mode 100644 index 4fdd62dae..000000000 --- a/apps/web-antd/src/api/aiot/video/index.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { wvpRequestClient } from '#/api/aiot/request'; - -export namespace AiotVideoApi { - /** 流信息 */ - export interface StreamInfo { - app?: string; - stream?: string; - ip?: string; - flv?: string; - ws_flv?: string; - rtmp?: string; - hls?: string; - rtsp?: string; - mediaServerId?: string; - tracks?: StreamTrack[]; - } - - export interface StreamTrack { - codec_id?: number; - codec_id_name?: string; - ready?: boolean; - type?: number; - width?: number; - height?: number; - fps?: number; - } -} - -// ==================== 视频播放 API ==================== - -/** 开始播放 */ -export function playStart(deviceId: string, channelId: string) { - return wvpRequestClient.get( - `/aiot/video/play/start/${deviceId}/${channelId}`, - ); -} - -/** 停止播放 */ -export function playStop(deviceId: string, channelId: string) { - return wvpRequestClient.get( - `/aiot/video/play/stop/${deviceId}/${channelId}`, - ); -} diff --git a/apps/web-antd/src/store/auth.ts b/apps/web-antd/src/store/auth.ts index f7c59bbff..dcef71175 100644 --- a/apps/web-antd/src/store/auth.ts +++ b/apps/web-antd/src/store/auth.ts @@ -138,18 +138,7 @@ export const useAuthStore = defineStore('auth', () => { userStore.setUserInfo(authPermissionInfo.user); userStore.setUserRoles(authPermissionInfo.roles); // accessStore - // 过滤掉 visible=false 的菜单项(含子菜单递归过滤) - const filterVisibleMenus = (menus: any[]): any[] => { - return menus - .filter((menu) => menu.visible !== false) - .map((menu) => ({ - ...menu, - children: menu.children - ? filterVisibleMenus(menu.children) - : undefined, - })); - }; - accessStore.setAccessMenus(filterVisibleMenus(authPermissionInfo.menus)); + accessStore.setAccessMenus(authPermissionInfo.menus); accessStore.setAccessCodes(authPermissionInfo.permissions); return authPermissionInfo; } diff --git a/apps/web-antd/src/views/aiot/video/live/index.vue b/apps/web-antd/src/views/aiot/video/live/index.vue deleted file mode 100644 index bd0139d7f..000000000 --- a/apps/web-antd/src/views/aiot/video/live/index.vue +++ /dev/null @@ -1,112 +0,0 @@ - - -