@@ -94,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'
+ }"
>
@@ -246,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'
}"
>
@@ -335,7 +348,7 @@
class="affix-container-left-box-item-bottom"
@click="legendObj.legendShow = !legendObj.legendShow"
>
-
图层
+
图例

{
}
})
}
+
+const handleChooseRoute = (val, i) => {
+ // console.log('============================', val)
+ if (lineList.value.length) {
+ 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
+ }
+ })
+ }
+ }
+}
+
// 获取曲线的路径
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}`
}
@@ -621,7 +659,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,
@@ -747,7 +808,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}`