From b3bf79115e6469365c98ce8a76d164d34defb1bd Mon Sep 17 00:00:00 2001 From: wwp <782568523@qq.com> Date: Thu, 18 Jul 2024 17:37:41 +0800 Subject: [PATCH] 11 --- SafeCampus.WEB/src/api/interface/sys/index.ts | 1 + .../src/api/interface/sys/monitor/camera.ts | 60 ++ .../src/api/interface/sys/monitor/index.ts | 1 + .../src/api/modules/monitor/live.ts | 43 +- .../monitor/live/components/moveForm.vue | 32 +- .../src/views/monitor/live/index.scss | 37 +- .../src/views/monitor/live/index.vue | 685 +++++++++--------- .../src/views/sysconfig/ability/index.vue | 177 +++-- 8 files changed, 572 insertions(+), 464 deletions(-) create mode 100644 SafeCampus.WEB/src/api/interface/sys/monitor/camera.ts create mode 100644 SafeCampus.WEB/src/api/interface/sys/monitor/index.ts diff --git a/SafeCampus.WEB/src/api/interface/sys/index.ts b/SafeCampus.WEB/src/api/interface/sys/index.ts index 663fadb..0c7974e 100644 --- a/SafeCampus.WEB/src/api/interface/sys/index.ts +++ b/SafeCampus.WEB/src/api/interface/sys/index.ts @@ -21,3 +21,4 @@ export * from "./organization"; export * from "./auth"; export * from "./warn"; export * from "./usermanage"; +export * from "./monitor"; diff --git a/SafeCampus.WEB/src/api/interface/sys/monitor/camera.ts b/SafeCampus.WEB/src/api/interface/sys/monitor/camera.ts new file mode 100644 index 0000000..b5d6743 --- /dev/null +++ b/SafeCampus.WEB/src/api/interface/sys/monitor/camera.ts @@ -0,0 +1,60 @@ +/** + * @description 单页管理接口 + * @license Apache License Version 2.0 + * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛 + * @remarks + * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款: + * 1.请不要删除和修改根目录下的LICENSE文件。 + * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。 + * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin + * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。 + * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。 + * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关 + */ +import { ReqPage } from "@/api/interface"; +/** + * @Description: 单页管理接口 + * @Author: wangwenpei + * @Date: 2023-12-15 15:34:54 + */ +export namespace sysCamera { + /**单页分页查询 */ + export interface Page extends ReqPage { + alarmType: "visual_fence"; + } + + /** 单页信息 */ + export interface MonitorInfo { + /** id */ + id: number | string; + deviceStatus: boolean; + directUrlIp: string; + fieldId: number | string; + fieldName: string; + groupId: number; + lastTime: string; + pushUserId: number; + resHeight: number; + resWidth: number; + sensorId: string; + sensorName: string; + /** 摄像头快照 */ + snapshotUrl: string; + } + /**摄像头分页查询 */ + export interface List extends ReqPage { + sensorName?: string; + sensorId?: number | string; + groupId?: number | string; + } + // 摄像头分组 + export interface Tree extends MonitorInfo { + children: Tree[]; + } + // 摄像头分组添加编辑删除信息 + export interface MonitorGroupInfo { + /** id */ + id: number | string; + name: string; + } +} diff --git a/SafeCampus.WEB/src/api/interface/sys/monitor/index.ts b/SafeCampus.WEB/src/api/interface/sys/monitor/index.ts new file mode 100644 index 0000000..594629f --- /dev/null +++ b/SafeCampus.WEB/src/api/interface/sys/monitor/index.ts @@ -0,0 +1 @@ +export * from "./camera"; diff --git a/SafeCampus.WEB/src/api/modules/monitor/live.ts b/SafeCampus.WEB/src/api/modules/monitor/live.ts index e5bbb47..1227609 100644 --- a/SafeCampus.WEB/src/api/modules/monitor/live.ts +++ b/SafeCampus.WEB/src/api/modules/monitor/live.ts @@ -13,28 +13,53 @@ * @see https://gitee.com/dotnetmoyu/SimpleAdmin */ import { moduleRequest } from "@/api/request"; -import { ReqstartId, ResPage, ZJRQ, ReqstopId } from "@/api/interface"; +import { ReqstartId, ResPage, sysCamera, ReqstopId } from "@/api/interface"; const http = moduleRequest("/business/deviceApi/"); +const http2 = moduleRequest("/business/cameraInfo/"); +const http3 = moduleRequest("/business/cameraGroup/"); /** * @Description: 单页管理 - * @Author: huguodong + * @Author: wangwenpei * @Date: 2023-12-15 15:34:54 */ const monitorLIVEApi = { /** 获取单页分页 */ - page(params: ZJRQ.Page) { - return http.post>("brief", params); + page(params: sysCamera.Page) { + return http.post>("brief", params); }, /** 获取单页详情 */ detail(params: ReqstartId) { - return http.get("getStartVideoLive", params); + return http.get("getStartVideoLive", params); + }, + /** 停止视频流获取 */ + stopUrl(params: ReqstopId) { + return http.get("getStopVideoLive", params); + }, + /** 获取监控列表 */ + list(params: sysCamera.List) { + return http2.get>("getPageList", params); + }, + // 批量设置分组 + setGroup(params: sysCamera.setGroup) { + return http2.post>("batchSetGroup", params); + }, + // 获取摄像头分组树 + groupList(params: sysCamera.Tree) { + return http3.get>("getNoPageList"); + }, + // 添加摄像头分组树 + addGroup(params: sysCamera.MonitorGroupInfo) { + return http3.post>("add", params); }, - /** 停止视频流获取 */ - stopUrl(params: ReqstopId) { - return http.get("getStopVideoLive", params); + // 编辑摄像头分组树 + updateGroup(params: sysCamera.MonitorGroupInfo) { + return http3.put>("update", params); }, - + // 删除摄像头分组树 + deleteGroup(params: sysCamera.MonitorGroupInfo) { + return http3.delete>("delete", params); + } }; /** * @Description: 监控管理按钮权限码 diff --git a/SafeCampus.WEB/src/views/monitor/live/components/moveForm.vue b/SafeCampus.WEB/src/views/monitor/live/components/moveForm.vue index 6a6f1c9..d56779b 100644 --- a/SafeCampus.WEB/src/views/monitor/live/components/moveForm.vue +++ b/SafeCampus.WEB/src/views/monitor/live/components/moveForm.vue @@ -15,8 +15,8 @@ label-width="auto" label-suffix=" :" > - - + + - - - \ No newline at end of file diff --git a/SafeCampus.WEB/src/views/sysconfig/ability/index.vue b/SafeCampus.WEB/src/views/sysconfig/ability/index.vue index 0cf0611..cc6c9d8 100644 --- a/SafeCampus.WEB/src/views/sysconfig/ability/index.vue +++ b/SafeCampus.WEB/src/views/sysconfig/ability/index.vue @@ -4,52 +4,89 @@ * @Date: 2023-12-15 15:44:05 !-->