From b13b7fed3e7450ba9ab8ef3b479a8c3ab50fa50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=99=E6=88=91?= <2731628804@qq.com> Date: Wed, 14 Jan 2026 20:21:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A8=E8=BF=B9=E5=9B=9E=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../peopleManag/CheckpointAnalysis/index.vue | 43 ++++++++----------- src/views/home/index.vue | 8 ++-- 2 files changed, 20 insertions(+), 31 deletions(-) diff --git a/src/views/backOfficeSystem/peopleManag/CheckpointAnalysis/index.vue b/src/views/backOfficeSystem/peopleManag/CheckpointAnalysis/index.vue index 0e8d226..f7c9f02 100644 --- a/src/views/backOfficeSystem/peopleManag/CheckpointAnalysis/index.vue +++ b/src/views/backOfficeSystem/peopleManag/CheckpointAnalysis/index.vue @@ -198,32 +198,23 @@ const saveUsers = (users) => { listQuery.value.yjRyxm = users[0].yjRyxm; listQuery.value.yjRysfzh = users[0].yjRysfzh; qcckPost({ yjRysfzh: listQuery.value.yjRysfzh }, '/mosty-jcz/tbJczYjxx/getPageList').then((res) => { - for (let i = 0; i < res.records.length; i++) { - const item = res.records[i]; - emitter.emit("addPointArea", { - coords: [{ jd: item.jd, wd: item.wd }], - icon: require("@/assets/point/zsdw.png"), - flag: "yjry_gj" - }); - } - // let list = res.records.map((item) => { - // return [item.jd, item.wd] - // }) - // let obj = { position: list, text: '', id: '2222' } - // console.log(obj, 'obj'); - // emitter.emit("echoPlane", { - // flag: `yjry_gj`, - // type: "polygon", - // coords: [obj], // 保持使用第一个数据点进行测试 - // fontSize: "20px", - // fontColor: '#000', - // }); - // emitter.emit("setMapCenter", { location: [res.records[0].jd, res.records[0].wd], zoomLevel: 10 }); - // emitter.emit("addPointArea", { - // coords: [{ jd: res.records[0].jd, wd: res.records[0].wd }], - // icon: require("@/assets/point/zsdw.png"), - // flag: "jczMap_Gzy" - // }); + let list = res.records.map((item) => { + return [item.jd, item.wd] + }) + let obj = { coords: [list], text: '', id: '2222' } + console.log(obj, 'obj'); + emitter.emit("echoLine", { + flag: `yjry_gj`, + type: "solid", + coords: [obj], // 保持使用第一个数据点进行测试 + isclear:true + }); + emitter.emit("setMapCenter", { location: [res.records[0].jd, res.records[0].wd], zoomLevel: 10 }); + emitter.emit("addPointArea", { + coords: [{ jd: res.records[0].jd, wd: res.records[0].wd }], + icon: require("@/assets/point/zsdw.png"), + flag: "jczMap_Gzy" + }); }); }; diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 91fb250..bfd3792 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -85,7 +85,7 @@ const getjczgetJczList = () => { }); }; const makerCenter = () => { - const dw = require("@/assets/point/dingwei.png") + const dw = require("@/assets/point/dingwei.png") const coords = centralPoint.map(item => { return { jd: item.point[0], wd: item.point[1], jzMc: item.name } }) @@ -209,11 +209,11 @@ const getMapData = () => { pyl: arrowhead[key].pyl, }) } - console.log(jtData,'jtData'); + console.log(jtData, 'jtData'); // 修复后的多边形绘制代码 for (let i = 0; i < jtData.length; i++) { - console.log(jtData[i],'jtData[i]'); + console.log(jtData[i], 'jtData[i]'); console.log("正在绘制第", i, "个多边形"); emitter.emit("echoPlane", { @@ -315,6 +315,4 @@ const getMapData = () => { box-sizing: border-box; } } - -