From 96121faf7e0046deef97690ebfa9ca1457d1e57c Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Tue, 11 Feb 2025 17:04:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/map/map.ts | 4 + .../components-tool/editNodeProperties.vue | 28 +- .../components-tool/equipmentToolDialog.vue | 212 +++++++++++++- src/views/mapPage/realTimeMap/editMap.vue | 271 +++++++++--------- src/views/mapPage/realTimeMap/格式.md | 20 ++ 5 files changed, 378 insertions(+), 157 deletions(-) create mode 100644 src/views/mapPage/realTimeMap/格式.md diff --git a/src/api/map/map.ts b/src/api/map/map.ts index 0a9cedf9..d73b6813 100644 --- a/src/api/map/map.ts +++ b/src/api/map/map.ts @@ -75,3 +75,7 @@ export const getPositionMapItemList = async (params) => { export const getDeviceInformationList = async (params) => { return await request.get({ url: `/system/device/information/list`, params }) } +//地图绑定设备 +export const mapBindDeviceInfo = async (data) => { + return await request.post({ url: `/system/device/information/mapBindDeviceInfo`, data }) +} diff --git a/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue b/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue index 15455ad8..1d91189c 100644 --- a/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue +++ b/src/views/mapPage/realTimeMap/components-tool/editNodeProperties.vue @@ -59,15 +59,15 @@ - +
- + cm
- +
- + cm
@@ -124,12 +124,12 @@ const props = defineProps({ }) const form = ref({ - locationX: undefined, - locationY: undefined, type: 1, layersNumber: 1, //层数 - length: undefined, //长度 - width: undefined, //宽度 + locationX: undefined, + locationY: undefined, + locationDeep: undefined, //长度 + locationWide: undefined, //宽度 direction: 1, //方向 inDirection: undefined, outDirection: undefined, @@ -153,8 +153,8 @@ const submit = () => { let list = [] for (let index = 0; index < form.value.layersNumber; index++) { list.push({ - locationWide: form.value.width || undefined, - locationDeep: form.value.length || undefined, + locationWide: form.value.locationWide || undefined, + locationDeep: form.value.locationDeep || undefined, direction: form.value.direction || undefined, //方向 inDirection: form.value.inDirection || undefined, //进入方向 outDirection: form.value.outDirection || undefined, //离开方向 @@ -166,8 +166,8 @@ const submit = () => { let obj = { id: form.value.id || undefined, mapId: props.positionMapId, - locationWide: form.value.width || undefined, - locationDeep: form.value.length || undefined, + locationWide: form.value.locationWide || undefined, + locationDeep: form.value.locationDeep || undefined, direction: form.value.direction || undefined, //方向 inDirection: form.value.inDirection || undefined, //进入方向 outDirection: form.value.outDirection || undefined //离开方向 @@ -181,8 +181,8 @@ const submit = () => { const open = (item) => { form.value = item - form.value.locationX = item.x - form.value.locationY = item.y + form.value.locationX = item.locationX + form.value.locationY = item.locationY form.value.type = item.type || 1 dialogFormVisible.value = true } diff --git a/src/views/mapPage/realTimeMap/components-tool/equipmentToolDialog.vue b/src/views/mapPage/realTimeMap/components-tool/equipmentToolDialog.vue index 95b88397..9f0964c4 100644 --- a/src/views/mapPage/realTimeMap/components-tool/equipmentToolDialog.vue +++ b/src/views/mapPage/realTimeMap/components-tool/equipmentToolDialog.vue @@ -1,10 +1,59 @@