修改
This commit is contained in:
@ -48,6 +48,7 @@ const loading = ref(false);
|
||||
const tableData = ref([]);
|
||||
const risk_level_type = ref();
|
||||
const safety_inspection_type = ref();
|
||||
const router = useRouter();
|
||||
// 新增:获取项目地理信息数据
|
||||
const getProjectGisData = async () => {
|
||||
try {
|
||||
@ -159,6 +160,7 @@ const initEcharts = () => {
|
||||
<div style="font-weight: bold;">${data.name}</div>
|
||||
<div>地点:${data.projectSite}</div>
|
||||
<div>经纬度:${data.value[0].toFixed(6)}, ${data.value[1].toFixed(6)}</div>
|
||||
|
||||
`;
|
||||
}
|
||||
if (params.seriesType === 'map') {
|
||||
@ -196,6 +198,17 @@ const initEcharts = () => {
|
||||
};
|
||||
|
||||
myChart.setOption(option);
|
||||
// 添加点击事件监听 - 这是关键修改部分
|
||||
myChart.on('click', function (params: any) {
|
||||
// 检查点击的是散点图系列
|
||||
if (params.componentType === 'series' && params.seriesType === 'scatter') {
|
||||
// 跳转到项目详情页
|
||||
navigateToProjectDetail();
|
||||
}
|
||||
});
|
||||
};
|
||||
const navigateToProjectDetail = () => {
|
||||
window.open('http://xny.yj-3d.com:7788/ProjectScreen', '_blank');
|
||||
};
|
||||
const risk_level_type1 = ref([]);
|
||||
const safety_inspection_type1 = ref([]);
|
||||
|
Reference in New Issue
Block a user