From 43b99e9d1c2e79f4c024784aaf15e3ff02881534 Mon Sep 17 00:00:00 2001 From: zx <604444282@qq.com> Date: Wed, 12 Jan 2022 16:39:40 +0800 Subject: [PATCH] zx --- src/components/v-echars/index.vue | 3 +-- src/views/BrandInsight/titsopo/index.vue | 16 ++++++++-------- src/views/BrandInsight/titsopo/opt.js | 1 + 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/v-echars/index.vue b/src/components/v-echars/index.vue index 0dabc83..585a79b 100644 --- a/src/components/v-echars/index.vue +++ b/src/components/v-echars/index.vue @@ -59,8 +59,7 @@ export default { params.event.event.stopPropagation(); let o = { key: params.data.name, - offsetX: params.event.offsetX, - offsetY: params.event.offsetY, + index: params.seriesIndex, } this.$emit("clickMark", o); } diff --git a/src/views/BrandInsight/titsopo/index.vue b/src/views/BrandInsight/titsopo/index.vue index e5af3a2..9e9c205 100644 --- a/src/views/BrandInsight/titsopo/index.vue +++ b/src/views/BrandInsight/titsopo/index.vue @@ -56,6 +56,7 @@ export default { width:300, height:280 }, + activeCol: 0, //-*-// load: false, btnLoading: false, @@ -64,8 +65,7 @@ export default { sBrand: "奥迪", }, opt: {}, - markPointUrl: '', - urlArr: [] + urlArr: [] //url列表 }; }, created() { @@ -85,15 +85,16 @@ export default { let hotTopArr = []; let urlArr = []; let hotIndex = []; + let dataI = 0; data.forEach((ele) => { let time = ele.Time; let value = ele.Data; dx.push(time); ds.push(value); if(ele.hotTop[0]) { - this.markPointUrl = ele.hotTop[0].url; ele.hotTop.forEach((e) => { let urlObj = { + column: dataI, title: doStr(e.title, 30), url: e.url }; @@ -104,7 +105,8 @@ export default { label: time, hotTop: ele.hotTop } - hotTopArr.push(obj) + hotTopArr.push(obj); + dataI = dataI + 1; }); this.urlArr = urlArr; //获取有热点信息的索引 @@ -149,6 +151,7 @@ export default { }); }, clickMark(data) { + this.activeCol = data.index this.modelShow = true; let mw = window.event; if((this.ecbox.width - mw.offsetX - 20) > this.ecmodel.width) { @@ -262,10 +265,7 @@ export default { padding: 11px; width: 100%; font-size: 15px; - .vshow-link { - color: rgb(54, 189, 239); - width: 100%; - } + color: rgb(54, 189, 239); } } diff --git a/src/views/BrandInsight/titsopo/opt.js b/src/views/BrandInsight/titsopo/opt.js index a8b4f24..4eb6349 100644 --- a/src/views/BrandInsight/titsopo/opt.js +++ b/src/views/BrandInsight/titsopo/opt.js @@ -50,6 +50,7 @@ function createData(ds = [], hotIndex = []) { } } }; + //设定标记点 hotIndex.forEach(e => { let yMax = 0; //y轴 let colorMax = 0; //颜色的索引