From 8ca7f7c74de140b79ea7dd821ca0236b11ce7551 Mon Sep 17 00:00:00 2001 From: yxl <584911253@qq.com> Date: 星期五, 03 一月 2025 18:13:20 +0800 Subject: [PATCH] 修改提交 --- src/views/chartView/index.vue | 46 +++++++++++++++++++++++++++++++++++++++------- 1 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/views/chartView/index.vue b/src/views/chartView/index.vue index d6299d3..0c46f68 100644 --- a/src/views/chartView/index.vue +++ b/src/views/chartView/index.vue @@ -259,7 +259,6 @@ }, setMapfunc(res, obj) { this.$store.state.showLenged = false; - switch (res.func) { case "queryRelationship": var roleMsg = null; @@ -318,16 +317,49 @@ this.refashMsg(roleMsg.list); break; case "aroundPoi": - mapSetFunc.init(res); - this.setUpdateHistoryInFor(obj, res.msg); - var roleMsg = msgData.getAffairsData([ - { type: "text", val: res.msg }, - ]); + let dataList = [ + { + type: "鍙墦鍑荤洰鏍�", + color:'#FF3366', + list: [], + }, + { + type: "涓嶅彲鎵撳嚮鐩爣", + color:'#33FF66', + list: [], + }, + { + type: "鍏朵粬", + color:'#3366FF', + list: [], + }, + ]; + res.data.forEach((item) => { + if (item.ifstrike === "1") { + dataList[0].list.push(item.seid); + } else if (item.ifstrike === "2") { + dataList[1].list.push(item.seid); + } else { + dataList[2].list.push(item.seid); + } + }); + const resultData = dataList + .map((item) => `| ${item.type} | ${item.list.length} |`) + .join("\n"); + var a = `| 鏁版嵁绫诲瀷 | 鏁版嵁閲� |\n|------|------|\n`+resultData; + console.log("aaa", a); + this.setUpdateHistoryInFor(obj, a); + var roleMsg = msgData.getMdData("markdown", a); this.refashMsg(roleMsg.list); + const finalData = { + func: "aroundPoi", + data: dataList, + } + mapSetFunc.init(finalData); break; case "getParam": mapSetFunc.init(res); - console.log('res.data.targetinfo',res); + console.log("res.data.targetinfo", res); this.setUpdateHistoryInFor(obj, res.msg); var roleMsg = msgData.getAffairsData([ { type: "text", val: res.data[0].targetinfo }, -- Gitblit v1.9.3