@@ -106,7 +98,16 @@
class="indexpage-container-box-point-item"
v-for="(item, index) in pointList"
:key="index"
- :style="{ left: item.locationX * radio + 'px', top: item.locationY * radio + 'px' }"
+ :style="{
+ left:
+ (item.locationX - item.locationWide / 2 / nowObject.showYamlJson.resolution / 100) *
+ radio +
+ 'px',
+ top:
+ (item.locationY - item.locationDeep / 2 / nowObject.showYamlJson.resolution / 100) *
+ radio +
+ 'px'
+ }"
>
@@ -258,8 +259,8 @@
class="indexpage-container-box-point-item-inner"
v-if="item.type == 6"
:style="{
- width: 40 * radio + 'px',
- height: 40 * radio + 'px'
+ width: 150 * radio + 'px',
+ height: 150 * radio + 'px'
}"
>
@@ -282,10 +283,15 @@
placement="top"
v-if="item.type == 1"
>
-
-
-
-
+
+
@@ -411,6 +417,7 @@ import { color } from 'echarts'
import { resetDragPosition } from '@/utils/drag'
import carDialog from './carDialog.vue'
import { is } from 'bpmn-js/lib/util/ModelUtil'
+import JSONBigInt from 'json-bigint'
const imgUrl = ref('')
const carDialogRef = ref(null)
const socketClient = ref(null)
@@ -453,12 +460,26 @@ const changeIsDrag = () => {
}
})
}
+
+const handleChooseRoute = (val, i) => {
+ console.log('============================', val)
+ if (lineList.value.length) {
+ lineList.value.forEach((item, index) => {
+ if (index == i) {
+ item.isSelect = true
+ } else {
+ item.isSelect = false
+ }
+ })
+ }
+}
+
// 获取曲线的路径
const getCurvePath = (curve) => {
- let startPointX = (Number(curve.startPointX) + Number(curve.beginWidth) / 2) * radio.value
- let startPointY = (Number(curve.startPointY) + Number(curve.beginHigh) / 2) * radio.value
- let endPointX = (Number(curve.endPointX) + Number(curve.endWidth) / 2) * radio.value
- let endPointY = (Number(curve.endPointY) + Number(curve.endHigh) / 2) * radio.value
+ let startPointX = Number(curve.startPointX) * radio.value
+ let startPointY = Number(curve.startPointY) * radio.value
+ let endPointX = Number(curve.endPointX) * radio.value
+ let endPointY = Number(curve.endPointY) * radio.value
return `M ${startPointX} ${startPointY} C ${curve.beginControlX * radio.value} ${curve.beginControlY * radio.value}, ${curve.endControlX * radio.value} ${curve.endControlY * radio.value}, ${endPointX} ${endPointY}`
}
@@ -628,7 +649,30 @@ const getPositionMapListFun = async (positionMapId) => {
// console.log(data)
pointList.value = data
- // console.log(pointList.value)
+ console.log('=======================', pointList.value)
+ pointList.value.forEach((item) => {
+ if (item.type === 1) {
+ item.locationDeep = 40
+ item.locationWide = 40
+ } else if (item.type === 5 || item.type === 6) {
+ item.locationDeep = 150
+ item.locationWide = 150
+ } else if (item.type === 2) {
+ //库位点
+ item.dataList = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
+ item.locationDeep = item.dataList[0].locationDeep
+ item.locationWide = item.dataList[0].locationWide
+ } else if (item.type === 3) {
+ item.dataObj = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
+ item.locationDeep = item.dataObj.locationDeep
+ item.locationWide = item.dataObj.locationWide
+ } else if (item.type === 4) {
+ item.dataObj = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
+ item.locationDeep = item.dataObj.locationDeep
+ item.locationWide = item.dataObj.locationWide
+ } else if (item.type === 7) {
+ }
+ })
// let lineStyle = calculateDistanceAndAngle(
// {
// left: pointList.value[0].locationX,
@@ -656,11 +700,11 @@ const resetPosition = () => {
}
// 计算直线中间箭头的路径
const getLineMidArrowPath = (item) => {
- const midX = (Number(item.startPointX) + Number(item.endPointX)) / 2 * radio.value
- const midY = (Number(item.startPointY) + Number(item.endPointY)) / 2 * radio.value
+ const midX = ((Number(item.startPointX) + Number(item.endPointX)) / 2) * radio.value
+ const midY = ((Number(item.startPointY) + Number(item.endPointY)) / 2) * radio.value
- let dx = item.endPointX* radio.value - item.startPointX* radio.value
- let dy = item.endPointY* radio.value - item.startPointY* radio.value
+ let dx = item.endPointX * radio.value - item.startPointX * radio.value
+ let dy = item.endPointY * radio.value - item.startPointY * radio.value
let length = Math.sqrt(dx * dx + dy * dy)
if (length === 0) {
@@ -754,7 +798,7 @@ const disconnect = () => {
}
//获取扫描图
const getMapData = async (item) => {
- console.log('============', JSON.parse(item.yamlJson))
+ // console.log('============', JSON.parse(item.yamlJson))
nowObject.value = JSON.parse(JSON.stringify(item))
nowObject.value.showYamlJson = JSON.parse(item.yamlJson)
let websoketUrl = `${replaceHttpWithWs(import.meta.env.VITE_BASE_URL)}/infra/ws?type=map&floor=${nowObject.value.floor}&area=${nowObject.value.area}`
From 8e35679b2c21ab4632139f5d79d8605ee46f5898 Mon Sep 17 00:00:00 2001
From: xhf <1424913779@qq.com>
Date: Thu, 27 Feb 2025 17:31:43 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapPage/realTimeMap/components/indexPage.vue | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/views/mapPage/realTimeMap/components/indexPage.vue b/src/views/mapPage/realTimeMap/components/indexPage.vue
index 9da9302c..04da3702 100644
--- a/src/views/mapPage/realTimeMap/components/indexPage.vue
+++ b/src/views/mapPage/realTimeMap/components/indexPage.vue
@@ -462,15 +462,26 @@ const changeIsDrag = () => {
}
const handleChooseRoute = (val, i) => {
- console.log('============================', val)
+ // console.log('============================', val)
if (lineList.value.length) {
- lineList.value.forEach((item, index) => {
+ if(val.isSelect){
+ lineList.value.forEach((item, index) => {
+ if (index == i) {
+ item.isSelect = false
+ } else {
+ item.isSelect = false
+ }
+ })
+ } else {
+ lineList.value.forEach((item, index) => {
if (index == i) {
item.isSelect = true
} else {
item.isSelect = false
}
})
+ }
+
}
}
From 8ce825094c401663f4953d89e94eeab167713012 Mon Sep 17 00:00:00 2001
From: xhf <1424913779@qq.com>
Date: Thu, 27 Feb 2025 17:33:23 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E5=AD=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/mapPage/realTimeMap/components/indexPage.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/mapPage/realTimeMap/components/indexPage.vue b/src/views/mapPage/realTimeMap/components/indexPage.vue
index 04da3702..e10b5fe4 100644
--- a/src/views/mapPage/realTimeMap/components/indexPage.vue
+++ b/src/views/mapPage/realTimeMap/components/indexPage.vue
@@ -348,7 +348,7 @@
class="affix-container-left-box-item-bottom"
@click="legendObj.legendShow = !legendObj.legendShow"
>
-
图层
+
图例
