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; }); }; // 暴露给父组件的方法