diff --git a/src/components/v-echars/index.vue b/src/components/v-echars/index.vue
index fe62346..3be21bf 100644
--- a/src/components/v-echars/index.vue
+++ b/src/components/v-echars/index.vue
@@ -50,10 +50,19 @@ export default {
}
this.$emit("getData", o);
}
- })
+ if(params.componentType === 'markPoint') {
+ let o = {
+ key: params.data.name,
+ value: params.value,
+ mark: params.componentType
+ }
+ this.$emit("getData", o);
+ }
+ });
// this.myChart.off("click");
// 给图像加点击事件
- this.myChart.getZr().on("click", (params) => {
+
+ this.myChart.getZr().on("dblclick", (params) => {
//param.name x轴值,param.data y轴值
let pointInPixel = [params.offsetX, params.offsetY];
if (
@@ -75,8 +84,9 @@ export default {
if(ex && ex.componentSubType === 'line') {
this.$emit("getData", obj);
}
- }
+ };
});
+
// 将鼠标变成小手
this.myChart.getZr().on("mousemove", () => {
this.myChart.getZr().setCursorStyle("pointer");
diff --git a/src/views/BrandInsight/titsopo/index.vue b/src/views/BrandInsight/titsopo/index.vue
index 847a84c..dbb4262 100644
--- a/src/views/BrandInsight/titsopo/index.vue
+++ b/src/views/BrandInsight/titsopo/index.vue
@@ -15,7 +15,7 @@
@@ -37,6 +37,7 @@ export default {
sBrand: "奥迪",
},
opt: {},
+ markPointUrl: ''
};
},
created() {
@@ -59,13 +60,15 @@ export default {
let value = ele.Data;
dx.push(time);
ds.push(value);
+ if(ele.hotTop[0]) {
+ this.markPointUrl = ele.hotTop[0].url;
+ }
let obj = {
label: time,
hotTop: ele.hotTop
}
hotTopArr.push(obj)
});
- console.log(hotTopArr)
this.opt = createOpt(dx, ds, hotTopArr);
this.load = false;
});
@@ -101,15 +104,18 @@ export default {
},
});
},
- //
- clickEchars(data = []) {
+ clickEchars(data) {
if(!this.btnPrm('btn_brand_datalist')) {
return
}
+ if(data.mark == 'markPoint'){
+ window.open(this.markPointUrl);
+ console.log(this.markPointUrl);
+ return;
+ }
let qudao = [];
let startTime = "";
let endTime = moment(new Date()).format("YYYY-MM-DD HH:mm:ss");
- console.log(data)
data.forEach((ele) => {
let seriesName = ele.seriesName;
startTime = ele.name;
diff --git a/src/views/BrandInsight/titsopo/opt.js b/src/views/BrandInsight/titsopo/opt.js
index b58a840..c7778d4 100644
--- a/src/views/BrandInsight/titsopo/opt.js
+++ b/src/views/BrandInsight/titsopo/opt.js
@@ -38,7 +38,15 @@ function createData(ds = []) {
emphasis: {
focus: 'series'
},
- data: [arr1[j].value]
+ data: [arr1[j].value],
+ markPoint: {
+ data: [
+ {
+ type: 'max', name: 'Max',symbol:'pin',
+ label: '!'
+ }
+ ],
+ }
}
arr.push(obj)
} else {