diff --git a/public/config/config.json b/public/config/config.json index 935dfd6..f4aab33 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,7 +1,29 @@ { - "title":"智能一体机管理系统", - "baseUrl": "http://192.168.10.236:9000", + "title": "智能一体机管理系统", + "baseUrl": "http://192.168.166.127:9000", "playerType": "get", "version": "1.0.0", - "node": "16.18.1" + "node": "16.18.1", + "push_type": [ + { + "name": "甲烷浓度推送", + "value": "1" + }, + { + "name": "模型识别结果推送", + "value": "2" + }, + { + "name": "报警记录推送", + "value": "3" + }, + { + "name": "有害气体浓度推送", + "value": "4" + }, + { + "name": "心率血氧数据推送", + "value": "5" + } + ] } diff --git a/public/config/config.json b/public/config/config.json index 935dfd6..f4aab33 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,7 +1,29 @@ { - "title":"智能一体机管理系统", - "baseUrl": "http://192.168.10.236:9000", + "title": "智能一体机管理系统", + "baseUrl": "http://192.168.166.127:9000", "playerType": "get", "version": "1.0.0", - "node": "16.18.1" + "node": "16.18.1", + "push_type": [ + { + "name": "甲烷浓度推送", + "value": "1" + }, + { + "name": "模型识别结果推送", + "value": "2" + }, + { + "name": "报警记录推送", + "value": "3" + }, + { + "name": "有害气体浓度推送", + "value": "4" + }, + { + "name": "心率血氧数据推送", + "value": "5" + } + ] } diff --git a/src/api/page/control.ts b/src/api/page/control.ts index f98a662..ea910f3 100644 --- a/src/api/page/control.ts +++ b/src/api/page/control.ts @@ -7,3 +7,18 @@ method: 'get', }) } +// 下发配置 +export function pushConfig(data: any) { + return request({ + url: '/api/push/set_push_config', + method: 'post', + data + }) +} +// 获取 +export function getConfig() { + return request({ + url: '/api/push/list', + method: 'get', + }) +} diff --git a/public/config/config.json b/public/config/config.json index 935dfd6..f4aab33 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,7 +1,29 @@ { - "title":"智能一体机管理系统", - "baseUrl": "http://192.168.10.236:9000", + "title": "智能一体机管理系统", + "baseUrl": "http://192.168.166.127:9000", "playerType": "get", "version": "1.0.0", - "node": "16.18.1" + "node": "16.18.1", + "push_type": [ + { + "name": "甲烷浓度推送", + "value": "1" + }, + { + "name": "模型识别结果推送", + "value": "2" + }, + { + "name": "报警记录推送", + "value": "3" + }, + { + "name": "有害气体浓度推送", + "value": "4" + }, + { + "name": "心率血氧数据推送", + "value": "5" + } + ] } diff --git a/src/api/page/control.ts b/src/api/page/control.ts index f98a662..ea910f3 100644 --- a/src/api/page/control.ts +++ b/src/api/page/control.ts @@ -7,3 +7,18 @@ method: 'get', }) } +// 下发配置 +export function pushConfig(data: any) { + return request({ + url: '/api/push/set_push_config', + method: 'post', + data + }) +} +// 获取 +export function getConfig() { + return request({ + url: '/api/push/list', + method: 'get', + }) +} diff --git a/src/api/page/device.ts b/src/api/page/device.ts index 40d80a4..4cfd8df 100644 --- a/src/api/page/device.ts +++ b/src/api/page/device.ts @@ -61,7 +61,14 @@ // 更新场景和摄像头的绑定 export function updateSceneRelations(data: any) { return request({ - url: `/api/device_scene_relation/update_by_device?device_id=${data.id}&scene_id=${data.scene_id}`, + url: `/api/device_scene_relation/update_by_device?device_id=${data.id}&scene_id=${data.scene_id}&range_points=${data.range_points}`, method: 'post', }) } +// 获取场景和摄像头的绑定 +export function getSceneRelations(data: any) { + return request({ + url: `/api/device_scene_relation/get_by_device?device_id=${data.id}`, + method: 'get', + }) +} diff --git a/public/config/config.json b/public/config/config.json index 935dfd6..f4aab33 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,7 +1,29 @@ { - "title":"智能一体机管理系统", - "baseUrl": "http://192.168.10.236:9000", + "title": "智能一体机管理系统", + "baseUrl": "http://192.168.166.127:9000", "playerType": "get", "version": "1.0.0", - "node": "16.18.1" + "node": "16.18.1", + "push_type": [ + { + "name": "甲烷浓度推送", + "value": "1" + }, + { + "name": "模型识别结果推送", + "value": "2" + }, + { + "name": "报警记录推送", + "value": "3" + }, + { + "name": "有害气体浓度推送", + "value": "4" + }, + { + "name": "心率血氧数据推送", + "value": "5" + } + ] } diff --git a/src/api/page/control.ts b/src/api/page/control.ts index f98a662..ea910f3 100644 --- a/src/api/page/control.ts +++ b/src/api/page/control.ts @@ -7,3 +7,18 @@ method: 'get', }) } +// 下发配置 +export function pushConfig(data: any) { + return request({ + url: '/api/push/set_push_config', + method: 'post', + data + }) +} +// 获取 +export function getConfig() { + return request({ + url: '/api/push/list', + method: 'get', + }) +} diff --git a/src/api/page/device.ts b/src/api/page/device.ts index 40d80a4..4cfd8df 100644 --- a/src/api/page/device.ts +++ b/src/api/page/device.ts @@ -61,7 +61,14 @@ // 更新场景和摄像头的绑定 export function updateSceneRelations(data: any) { return request({ - url: `/api/device_scene_relation/update_by_device?device_id=${data.id}&scene_id=${data.scene_id}`, + url: `/api/device_scene_relation/update_by_device?device_id=${data.id}&scene_id=${data.scene_id}&range_points=${data.range_points}`, method: 'post', }) } +// 获取场景和摄像头的绑定 +export function getSceneRelations(data: any) { + return request({ + url: `/api/device_scene_relation/get_by_device?device_id=${data.id}`, + method: 'get', + }) +} diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 1c34de2..ec769ff 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -3,6 +3,7 @@ import type { Ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import ResetPwd from './resetPwd.vue' +import pushConfig from './pushConfig.vue' import eventBus from '@/utils/eventBus' import useSettingsStore from '@/store/modules/settings' import useRouteStore from '@/store/modules/route' @@ -90,15 +91,30 @@ }) }) } +// 配置下发 +const configRef = ref() +const setting = () => { + configRef.value.initDialog() +}