diff --git a/src/utils/vector-layer-utils.js b/src/utils/vector-layer-utils.js index 9c801b5..c4f97de 100644 --- a/src/utils/vector-layer-utils.js +++ b/src/utils/vector-layer-utils.js @@ -150,7 +150,8 @@ export function setHighlight(layerId, sourceId, mapId = "homeMap") { return; if (mapId == "workUnitMap_uuv") { - showUnitReport(mapId, e.features[0].properties.unit_name, e.features[0].geometry.coordinates); + // 相关逻辑位于单位统计页面 + // showUnitReport(mapId, e.features[0].properties.unit_name, e.features[0].geometry.coordinates); return; } @@ -166,9 +167,6 @@ export function setHighlight(layerId, sourceId, mapId = "homeMap") { // // const featuresByLayer = groupFeaturesByLayer(allFeatures); // // console.log('点击位置附近的所有要素:', featuresByLayer); - // console.log(e.features.length, e.features); - // console.log("1 e: ", e); - let feature = e.features[0]; if (e.features.length > 1 && e.options) feature = e.features.filter(f => f.properties.sample_name == e.options.sample_name)[0]; @@ -193,9 +191,6 @@ export function setHighlight(layerId, sourceId, mapId = "homeMap") { clickedLineIds = clickedLineIds.filter((item) => item !== clickedLineId); } else { Vue.config.maps[mapId].setFeatureState({ source: sourceId, sourceLayer: sourceLayer, id: clickedLineId }, { click: true }); - // 显示信息框 - // if (sourceId === 'GMSL Cable Data') - // document.getElementById("cable-overlay")!.style.display = 'block'; // 单击时加入选择列表(用于单击 ESC 键时取消选择状态) clickedLineIds.push(clickedLineId); // document.removeEventListener("keydown", removeHighlight, true); @@ -246,27 +241,28 @@ export async function showUnitReport(mapId, unit, coordinates) { alert("未查询到相关单位的统计信息"); return; } + const description = `
| 参航信息 | +单位参航信息 | ||
| 单位名称: ${unitReports[0].unit_name} | +单位名称: ${unitReports[0].unit_name} | ||
| 首潜人数: ${unitReports[0].f_drving_total || ""} | -首次参航人数: ${unitReports[0].f_voyage_total || ""} | +参航次数: ${unitReports[0].voyage_total || "/"} | +参航天数: ${unitReports[0].voyage_days || "/"} |
| 参航次数: ${unitReports[0].voyage_total || ""} | -参航天数: ${unitReports[0].voyage_days || ""} | +参航人数: ${unitReports[0].member_total || "/"} | +下潜次数: ${unitReports[0].drving_total || "/"} |
| 参航人数: ${unitReports[0].member_total || ""} | -下潜次数: ${unitReports[0].drving_total || ""} | +首潜人数: ${unitReports[0].f_drving_total || "/"} | +首次参航人数: ${unitReports[0].f_voyage_total || "/"} |