Commit 116e8ad4 authored by xinzhedeai's avatar xinzhedeai

add: 大屏浸润线容器点击跳转后台页面浸润线页面,传递设备id并设置设备值

parent ba8a07b1
......@@ -376,6 +376,19 @@ export default {
}
};
Highchart.template.high(panel.el, data, opts);
// 新增:给图表外围容器添加点击事件
panel.el.addEventListener("click", () => {
const deviceId = panel.item.deviceid;
if (deviceId) {
window.open(
`/dataMonitor/jrx/history?deviceId=${deviceId}`,
"width=800,height=600"
);
} else {
console.warn("未获取到有效的deviceId");
}
});
});
} else if (type === "t_6") {
// 降雨量
......
......@@ -175,6 +175,12 @@ export default {
this.form.config = this.pageApi.config;
this.rules = reqApi.getRules(this.Dict.baseInfo) || this.Dict.rules || {};
this.pageApi.created && this.pageApi.created();
// 新增:获取地址栏deviceId参数并设置到form.query.code
const deviceId = this.$route.query.deviceId;
if (deviceId) {
this.form.query.sensorid = deviceId; // 将deviceId赋值到查询条件的code字段
}
},
mounted() {
// 新增:动态调整Canvas尺寸 目前支持7层。
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment