|
@@ -29,7 +29,7 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { point_type } = toRefs<any>(proxy?.useDict('point_type'));
|
|
|
const appStore = useAppStore();
|
|
|
const mapStore = useMapStore();
|
|
|
-const emits = defineEmits(['handleShowWarehouse', 'handleShowVideo', 'handleShowPeople', 'resize']);
|
|
|
+const emits = defineEmits(['handleShowWarehouse', 'handleShowVideo', 'handleShowPeople', 'closeDetailDialog', 'resize']);
|
|
|
|
|
|
const mapRef = ref(null);
|
|
|
const containerRef = ref();
|
|
@@ -116,7 +116,12 @@ const init = () => {
|
|
|
// let drawTool = new DrawTool({ mapUtils, map });
|
|
|
handleResize();
|
|
|
},
|
|
|
- onMarkerClick: (data) => {
|
|
|
+ onMarkerClick: (data, flag) => {
|
|
|
+ let title = titleList[data.dataType];
|
|
|
+ if (flag && !!title) {
|
|
|
+ data.title = title;
|
|
|
+ emits('closeDetailDialog', data);
|
|
|
+ }
|
|
|
// 多点位
|
|
|
if (data.type === '1') {
|
|
|
getPointInfoList2({
|
|
@@ -160,7 +165,10 @@ const init = () => {
|
|
|
content.appendChild(tableBox);
|
|
|
let closeBtn = document.createElement('div');
|
|
|
closeBtn.className = 'close';
|
|
|
- closeBtn.onclick = () => mapUtils.hideInfo(true);
|
|
|
+ closeBtn.onclick = () => {
|
|
|
+ mapUtils.hideInfo(true);
|
|
|
+ emits('closeDetailDialog', data);
|
|
|
+ };
|
|
|
content.appendChild(closeBtn);
|
|
|
mapUtils.showInfo(content, [data.longitude, data.latitude], -data.scale * data.size[1], true);
|
|
|
});
|
|
@@ -253,7 +261,10 @@ const handlePointDetails = (data) => {
|
|
|
div.appendChild(table);
|
|
|
let closeBtn = document.createElement('div');
|
|
|
closeBtn.className = 'close';
|
|
|
- closeBtn.onclick = () => mapUtils.hideInfo(true);
|
|
|
+ closeBtn.onclick = () => {
|
|
|
+ mapUtils.hideInfo(true);
|
|
|
+ emits('closeDetailDialog', data);
|
|
|
+ };
|
|
|
div.appendChild(closeBtn);
|
|
|
mapUtils.showInfo(div, [data.longitude, data.latitude], -data.scale * data.size[1], true);
|
|
|
} else if (data.dataType === 'video') {
|