diff --git a/src/views/tunnel/index-back.vue b/src/views/tunnel/index-back.vue new file mode 100644 index 0000000..0d2e308 --- /dev/null +++ b/src/views/tunnel/index-back.vue @@ -0,0 +1,1193 @@ + + + + + + + diff --git a/src/views/tunnel/index.vue b/src/views/tunnel/index.vue index 0d2e308..2e2aa75 100644 --- a/src/views/tunnel/index.vue +++ b/src/views/tunnel/index.vue @@ -371,7 +371,23 @@ const btnList = ref([ ]); const serialNumber = ref(""); const roleKey = ref(""); +function convertCoordsToArray(coordsArray) { + return coordsArray.map(point => `${point.x},${point.y}`).join(','); +} +// 示例使用: +const coordsData = [ + { x: 163, y: 487 }, + { x: 153, y: 483 }, + { x: 217, y: 480 }, + { x: 170, y: 644 }, + { x: 111, y: 640 }, + { x: 145, y: 483 } +]; + +const result = convertCoordsToArray(coordsData); +console.log(result); +// 输出: "163,487,153,483,217,480,170,644,111,640,145,483" const clickHot = (id) => { console.log('点击热区===============') router.push('/' + id + '/' + siteId)