From 4cddb9a71bb532537e26a9fabf94d04a00290f26 Mon Sep 17 00:00:00 2001 From: wwp <782568523@qq.com> Date: Mon, 30 Sep 2024 16:00:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/modules/usermanage/dormitory.ts | 4 + SafeCampus.WEB/src/api/modules/warn/zjrq.ts | 8 ++ SafeCampus.WEB/src/views/home/index.vue | 94 +++++++++---------- .../components/formDormitory/index.vue | 4 +- 4 files changed, 60 insertions(+), 50 deletions(-) diff --git a/SafeCampus.WEB/src/api/modules/usermanage/dormitory.ts b/SafeCampus.WEB/src/api/modules/usermanage/dormitory.ts index 5b8f83d..aec6ee6 100644 --- a/SafeCampus.WEB/src/api/modules/usermanage/dormitory.ts +++ b/SafeCampus.WEB/src/api/modules/usermanage/dormitory.ts @@ -78,6 +78,10 @@ const userManageDormitoryApi = { /** 获取归寝时间 */ getReturnTime() { return httpChamber.get("getReturnTime"); + }, + // 获取宿舍楼摄像头列表 + getBuildCameraList() { + return http.get("getBuildCameraList"); } }; diff --git a/SafeCampus.WEB/src/api/modules/warn/zjrq.ts b/SafeCampus.WEB/src/api/modules/warn/zjrq.ts index fe9d0e3..6ed6a6c 100644 --- a/SafeCampus.WEB/src/api/modules/warn/zjrq.ts +++ b/SafeCampus.WEB/src/api/modules/warn/zjrq.ts @@ -45,6 +45,14 @@ const warnZJRQApi = { /** 处理预警 */ handWarn(params: ReqId) { return http.post("handWarn", params); + }, + // 首页基础数据 + basicInfo() { + return http.get("getBaseStatistics"); + }, + // 首页高危预警 + highWarn() { + return http.get("getHighRisk"); } }; diff --git a/SafeCampus.WEB/src/views/home/index.vue b/SafeCampus.WEB/src/views/home/index.vue index f63b5d0..7948175 100644 --- a/SafeCampus.WEB/src/views/home/index.vue +++ b/SafeCampus.WEB/src/views/home/index.vue @@ -16,7 +16,7 @@
摄像头数量
-
3
+
{{ basicInfo.cameraCount }}
@@ -27,7 +27,7 @@
预警信息总量
-
1972
+
{{ basicInfo.warnCount }}
@@ -38,7 +38,7 @@
处理意见提交
-
40
+
{{ basicInfo.handCount }}
@@ -49,7 +49,7 @@
参与安防教师
-
22
+
{{ basicInfo.teacherCount }}
@@ -86,7 +86,7 @@
高危预警信息统计
- +
@@ -108,7 +108,7 @@ diff --git a/SafeCampus.WEB/src/views/userManage/dormitory/components/formDormitory/index.vue b/SafeCampus.WEB/src/views/userManage/dormitory/components/formDormitory/index.vue index 301b366..39a4142 100644 --- a/SafeCampus.WEB/src/views/userManage/dormitory/components/formDormitory/index.vue +++ b/SafeCampus.WEB/src/views/userManage/dormitory/components/formDormitory/index.vue @@ -142,8 +142,8 @@ onMounted(() => { getCreamaList(); }); const getCreamaList = () => { - monitorLIVEApi.list({ pageNum: 1, pageSize: 1000 }).then(res => { - creamaData.value = res.data.list; + userManageDormitoryApi.getBuildCameraList().then((res: any) => { + creamaData.value = res.data; }); }; // 暴露给父组件的方法