diff --git a/src/App.vue b/src/App.vue
index d8a5f84..8980e20 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -34,27 +34,27 @@ onMounted(() => {
connect(sseBase + '/admin-api/warehousealarm/alarm-records/subscribe')
// 添加演示报警,用于查看效果
- setTimeout(() => {
- addAlarm({
- alarm_id: 'ALM20260708143000',
- alarm_level: '2',
- alarm_level_name: '报警',
- alarm_time: '2026-07-08 14:30:00',
- description: '仓库#3 温湿度传感器触发高温报警',
- cameraId: '2',
- pic: 'https://picsum.photos/400/300?random=1',
- sensor_data: [
- {
- sensor_code: 'st_001',
- sensor_name: '温湿度传感器',
- data: [
- { name: '温度', value: 38.5, sensor_threshold: 30, unit: '°C' },
- { name: '湿度', value: 65.2, sensor_threshold: 80, unit: '%' },
- ],
- },
- ],
- })
- }, 2000)
+ // setTimeout(() => {
+ // addAlarm({
+ // alarm_id: 'ALM20260708143000',
+ // alarm_level: '2',
+ // alarm_level_name: '报警',
+ // alarm_time: '2026-07-08 14:30:00',
+ // description: '仓库#3 温湿度传感器触发高温报警',
+ // cameraId: '2',
+ // pic: 'https://picsum.photos/400/300?random=1',
+ // sensor_data: [
+ // {
+ // sensor_code: 'st_001',
+ // sensor_name: '温湿度传感器',
+ // data: [
+ // { name: '温度', value: 38.5, sensor_threshold: 30, unit: '°C' },
+ // { name: '湿度', value: 65.2, sensor_threshold: 80, unit: '%' },
+ // ],
+ // },
+ // ],
+ // })
+ // }, 2000)
})
diff --git a/src/api/cameraControl/camera/index.ts b/src/api/cameraControl/camera/index.ts
index cd05b17..d34488d 100644
--- a/src/api/cameraControl/camera/index.ts
+++ b/src/api/cameraControl/camera/index.ts
@@ -3,37 +3,18 @@ import request from '@/config/axios'
// 相机 API
export const CameraControlApi = {
- // 查询相机分页
- cameraControl: async (urlStr: string,data) => {
+ // 相机控制(POST)
+ cameraControl: async (urlStr: string, data) => {
return await request.post({ url: urlStr, data })
},
-
- // //查询相机列表
- // getCameraList: () => {
- // return request.get({ url: `/logistics/camera/list` })
- // },
- // // 查询相机详情
- // getCamera: async (id: number) => {
- // return await request.get({ url: `/logistics/camera/get?id=` + id })
- // },
- // // 新增相机
- // createCamera: async (data: CameraVO) => {
- // return await request.post({ url: `/logistics/camera/create`, data })
- // },
-
- // // 修改相机
- // updateCamera: async (data: CameraVO) => {
- // return await request.put({ url: `/logistics/camera/update`, data })
- // },
-
- // // 删除相机
- // deleteCamera: async (id: number) => {
- // return await request.delete({ url: `/logistics/camera/delete?id=` + id })
- // },
-
- // // 导出相机 Excel
- // exportCamera: async (params) => {
- // return await request.download({ url: `/logistics/camera/export-excel`, params })
- // },
+ // 查询录像文件列表(GET)
+ getRecordFiles: async (params: {
+ cameraId: number
+ channel?: number
+ startTime: string
+ endTime: string
+ }) => {
+ return await request.get({ url: `/camera/control/record-files`, params })
+ },
}
diff --git a/src/api/warehousealarm/alarmrecords/index.ts b/src/api/warehousealarm/alarmrecords/index.ts
index 83b6df3..f0944b0 100644
--- a/src/api/warehousealarm/alarmrecords/index.ts
+++ b/src/api/warehousealarm/alarmrecords/index.ts
@@ -49,4 +49,32 @@ export const AlarmRecordsApi = {
exportAlarmRecords: async (params) => {
return await request.download({ url: `/warehousealarm/alarm-records/export-excel`, params })
},
+
+ // 统计报警数量(返回 int)
+ getAlarmCount: async (params: {
+ status?: number
+ triggerTime?: string[]
+ }) => {
+ return await request.get({ url: `/warehousealarm/alarm-records/count`, params })
+ },
+
+ // 事件统计(横向柱状图)
+ getStatsDuration: async (params: {
+ dimension: string // year / month / week
+ ruleIds: string // 逗号分隔
+ startTime: string
+ endTime: string
+ }) => {
+ return await request.get({ url: `/warehousealarm/alarm-records/stats/duration`, params })
+ },
+
+ // 事件趋势(折线图)
+ getStatsTrend: async (params: {
+ dimension: string // year / month
+ ruleIds: string
+ startTime: string
+ endTime: string
+ }) => {
+ return await request.get({ url: `/warehousealarm/alarm-records/stats/trend`, params })
+ },
}
\ No newline at end of file
diff --git a/src/api/warehousealarm/devicelatestdata/index.ts b/src/api/warehousealarm/devicelatestdata/index.ts
index 6454729..99d592c 100644
--- a/src/api/warehousealarm/devicelatestdata/index.ts
+++ b/src/api/warehousealarm/devicelatestdata/index.ts
@@ -17,6 +17,24 @@ export const DeviceLatestDataApi = {
getDeviceTypesPageAll: async (params: any) => {
return await request.get({ url: `/warehousealarm/device-latest-data/pageAll`, params })
},
+ getDeviceTypesListAll: async () => {
+ return await request.get({ url: `/warehousealarm/device-latest-data/listAll` })
+ },
+
+ // 设备在线率统计
+ getOnlineRate: async () => {
+ return await request.get({ url: `/warehousealarm/device-latest-data/online-rate` })
+ },
+
+ // 各区域温度
+ getTemperatureByZone: async () => {
+ return await request.get({ url: `/warehousealarm/device-latest-data/temperature-by-zone` })
+ },
+
+ // 各区域湿度
+ getHumidityByZone: async () => {
+ return await request.get({ url: `/warehousealarm/device-latest-data/humidity-by-zone` })
+ },
// 查询设备最新数据详情
getDeviceLatestData: async (id: number) => {
diff --git a/src/api/warehousealarm/rules/index.ts b/src/api/warehousealarm/rules/index.ts
index 62beded..1910dfd 100644
--- a/src/api/warehousealarm/rules/index.ts
+++ b/src/api/warehousealarm/rules/index.ts
@@ -58,4 +58,9 @@ export const RulesApi = {
getRuleConditionsListByRuleId: async (ruleId) => {
return await request.get({ url: `/warehousealarm/rules/rule-conditions/list-by-rule-id?ruleId=` + ruleId })
},
+
+ // 获取设备列表(无分页,支持 typeId 和 deviceName 过滤)
+ getDevicesPageByRules: async (params: { typeId?: number; deviceName?: string }) => {
+ return await request.get({ url: `/warehousealarm/rules/devicesPage`, params })
+ },
}
\ No newline at end of file
diff --git a/src/assets/imgs/device/alarm_light .png b/src/assets/imgs/device/alarm_light .png
new file mode 100644
index 0000000..c1859a5
Binary files /dev/null and b/src/assets/imgs/device/alarm_light .png differ
diff --git a/src/assets/imgs/device/alarm_light_e.png b/src/assets/imgs/device/alarm_light_e.png
new file mode 100644
index 0000000..4e2c952
Binary files /dev/null and b/src/assets/imgs/device/alarm_light_e.png differ
diff --git a/src/assets/imgs/device/alarm_light_info.png b/src/assets/imgs/device/alarm_light_info.png
new file mode 100644
index 0000000..ef05a6b
Binary files /dev/null and b/src/assets/imgs/device/alarm_light_info.png differ
diff --git a/src/assets/imgs/device/camera.png b/src/assets/imgs/device/camera.png
new file mode 100644
index 0000000..29df43b
Binary files /dev/null and b/src/assets/imgs/device/camera.png differ
diff --git a/src/assets/imgs/device/camera_e.png b/src/assets/imgs/device/camera_e.png
new file mode 100644
index 0000000..e53d0e2
Binary files /dev/null and b/src/assets/imgs/device/camera_e.png differ
diff --git a/src/assets/imgs/device/camera_info.png b/src/assets/imgs/device/camera_info.png
new file mode 100644
index 0000000..b91e50b
Binary files /dev/null and b/src/assets/imgs/device/camera_info.png differ
diff --git a/src/assets/imgs/device/edge_server.png b/src/assets/imgs/device/edge_server.png
new file mode 100644
index 0000000..d2e5d91
Binary files /dev/null and b/src/assets/imgs/device/edge_server.png differ
diff --git a/src/assets/imgs/device/edge_server_e.png b/src/assets/imgs/device/edge_server_e.png
new file mode 100644
index 0000000..9135343
Binary files /dev/null and b/src/assets/imgs/device/edge_server_e.png differ
diff --git a/src/assets/imgs/device/edge_server_info.png b/src/assets/imgs/device/edge_server_info.png
new file mode 100644
index 0000000..4c3f010
Binary files /dev/null and b/src/assets/imgs/device/edge_server_info.png differ
diff --git a/src/assets/imgs/device/smoke.png b/src/assets/imgs/device/smoke.png
new file mode 100644
index 0000000..48c6ff9
Binary files /dev/null and b/src/assets/imgs/device/smoke.png differ
diff --git a/src/assets/imgs/device/smoke_e.png b/src/assets/imgs/device/smoke_e.png
new file mode 100644
index 0000000..cc34888
Binary files /dev/null and b/src/assets/imgs/device/smoke_e.png differ
diff --git a/src/assets/imgs/device/smoke_info.png b/src/assets/imgs/device/smoke_info.png
new file mode 100644
index 0000000..ab6b41a
Binary files /dev/null and b/src/assets/imgs/device/smoke_info.png differ
diff --git a/src/assets/imgs/device/temp_humidity.png b/src/assets/imgs/device/temp_humidity.png
new file mode 100644
index 0000000..7333c59
Binary files /dev/null and b/src/assets/imgs/device/temp_humidity.png differ
diff --git a/src/assets/imgs/device/temp_humidity_e.png b/src/assets/imgs/device/temp_humidity_e.png
new file mode 100644
index 0000000..899f0f6
Binary files /dev/null and b/src/assets/imgs/device/temp_humidity_e.png differ
diff --git a/src/assets/imgs/device/temp_humidity_info.png b/src/assets/imgs/device/temp_humidity_info.png
new file mode 100644
index 0000000..cf7544e
Binary files /dev/null and b/src/assets/imgs/device/temp_humidity_info.png differ
diff --git a/src/assets/imgs/device/tilt.png b/src/assets/imgs/device/tilt.png
new file mode 100644
index 0000000..1a5a652
Binary files /dev/null and b/src/assets/imgs/device/tilt.png differ
diff --git a/src/assets/imgs/device/tilt_e.png b/src/assets/imgs/device/tilt_e.png
new file mode 100644
index 0000000..eec14c9
Binary files /dev/null and b/src/assets/imgs/device/tilt_e.png differ
diff --git a/src/assets/imgs/device/tilt_info.png b/src/assets/imgs/device/tilt_info.png
new file mode 100644
index 0000000..fe6ca74
Binary files /dev/null and b/src/assets/imgs/device/tilt_info.png differ
diff --git a/src/assets/imgs/device/water_leak.png b/src/assets/imgs/device/water_leak.png
new file mode 100644
index 0000000..5273e8d
Binary files /dev/null and b/src/assets/imgs/device/water_leak.png differ
diff --git a/src/assets/imgs/device/water_leak_e.png b/src/assets/imgs/device/water_leak_e.png
new file mode 100644
index 0000000..3a6d56a
Binary files /dev/null and b/src/assets/imgs/device/water_leak_e.png differ
diff --git a/src/assets/imgs/device/water_leak_info.png b/src/assets/imgs/device/water_leak_info.png
new file mode 100644
index 0000000..f548387
Binary files /dev/null and b/src/assets/imgs/device/water_leak_info.png differ
diff --git a/src/assets/imgs/home/2.png b/src/assets/imgs/home/2.png
new file mode 100644
index 0000000..85558fb
Binary files /dev/null and b/src/assets/imgs/home/2.png differ
diff --git a/src/assets/imgs/home/20260723174613_1689_48.png b/src/assets/imgs/home/20260723174613_1689_48.png
new file mode 100644
index 0000000..8b126c3
Binary files /dev/null and b/src/assets/imgs/home/20260723174613_1689_48.png differ
diff --git a/src/assets/imgs/home/background.png b/src/assets/imgs/home/background.png
new file mode 100644
index 0000000..bec306a
Binary files /dev/null and b/src/assets/imgs/home/background.png differ
diff --git a/src/assets/imgs/home/warehouse.png b/src/assets/imgs/home/warehouse.png
new file mode 100644
index 0000000..addd4a9
Binary files /dev/null and b/src/assets/imgs/home/warehouse.png differ
diff --git a/src/assets/imgs/icon/day.png b/src/assets/imgs/icon/day.png
new file mode 100644
index 0000000..8f9e5d2
Binary files /dev/null and b/src/assets/imgs/icon/day.png differ
diff --git a/src/assets/imgs/icon/error.png b/src/assets/imgs/icon/error.png
new file mode 100644
index 0000000..c68a7f3
Binary files /dev/null and b/src/assets/imgs/icon/error.png differ
diff --git a/src/assets/imgs/icon/mother.png b/src/assets/imgs/icon/mother.png
new file mode 100644
index 0000000..b0e0019
Binary files /dev/null and b/src/assets/imgs/icon/mother.png differ
diff --git a/src/assets/imgs/icon/work.png b/src/assets/imgs/icon/work.png
new file mode 100644
index 0000000..8a435f9
Binary files /dev/null and b/src/assets/imgs/icon/work.png differ
diff --git a/src/components/AlarmNotification/AlarmPanel.vue b/src/components/AlarmNotification/AlarmPanel.vue
index 32e13a4..d5aa78c 100644
--- a/src/components/AlarmNotification/AlarmPanel.vue
+++ b/src/components/AlarmNotification/AlarmPanel.vue
@@ -6,7 +6,7 @@
报警通知 ({{ alarmList.length }})
+
+
+
+
diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue
index a070751..dcbde0c 100644
--- a/src/views/Home/Index.vue
+++ b/src/views/Home/Index.vue
@@ -1,546 +1,328 @@
-
-
-
-
-
-
-
-