This commit is contained in:
ljx
2025-09-12 19:28:43 +08:00
parent 6a07a25c2e
commit ae21698e5f
15 changed files with 1489 additions and 22 deletions

View File

@ -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([]);