Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua
commit
bb068def12
|
|
@ -48,7 +48,8 @@
|
|||
</div>
|
||||
|
||||
<a-modal
|
||||
style="width: 100vw; top: 0px; left: 0px; margin: 0px; padding: 0px"
|
||||
class="dragModal"
|
||||
width="100%"
|
||||
wrap-class-name="full-modal"
|
||||
v-model:open="showInfoOpen"
|
||||
title="详情"
|
||||
|
|
@ -137,35 +138,49 @@
|
|||
if (res) {
|
||||
showInfoData.value = res;
|
||||
showInfoOpen.value = true;
|
||||
// 添加鼠标拖动监听器
|
||||
addListener();
|
||||
}
|
||||
});
|
||||
} else if (subject.value == '非法采矿') {
|
||||
showMainInfoId.value = id;
|
||||
showInfoOpen.value = true;
|
||||
// 添加鼠标拖动监听器
|
||||
addListener();
|
||||
} else if (subject.value == '耕地非粮化') {
|
||||
GetCaseInfoById({ id: id }).then((res) => {
|
||||
showInfoData.value = res;
|
||||
showInfoOpen.value = true;
|
||||
// 添加鼠标拖动监听器
|
||||
addListener();
|
||||
});
|
||||
} else if (subject.value == '重点问题') {
|
||||
getCaseInfoByIdtotal({ id: id }).then((res) => {
|
||||
showInfoData.value = res;
|
||||
showInfoOpen.value = true;
|
||||
// 添加鼠标拖动监听器
|
||||
addListener();
|
||||
});
|
||||
} else if (subject.value == '巡察审计') {
|
||||
getInspectionAuditCaseInfoById({ id: id }).then((res) => {
|
||||
showInfoData.value = res;
|
||||
showInfoOpen.value = true;
|
||||
// 添加鼠标拖动监听器
|
||||
addListener();
|
||||
});
|
||||
} else if (subject.value == '生态保护红线监管') {
|
||||
getRedLineCaseInfoById({ id: id }).then((res) => {
|
||||
showInfoData.value = res;
|
||||
showInfoOpen.value = true;
|
||||
// 添加鼠标拖动监听器
|
||||
addListener();
|
||||
});
|
||||
} else if (subject.value == '生态修复') {
|
||||
getRepairCaseInfoById({ id: id }).then((res) => {
|
||||
showInfoData.value = res;
|
||||
showInfoOpen.value = true;
|
||||
// 添加鼠标拖动监听器
|
||||
addListener();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -318,6 +333,46 @@
|
|||
|
||||
MapboxComponent.value.handlerChangeTifLayer(layer);
|
||||
}
|
||||
|
||||
|
||||
// 鼠标拖动监听器-参数
|
||||
let isDragging = false;
|
||||
let initialMouseX;
|
||||
let initialMouseY;
|
||||
let initialModalX;
|
||||
let initialModalY;
|
||||
// 添加鼠标拖动监听器
|
||||
function addListener() {
|
||||
setTimeout(() => {
|
||||
const dragModalDocument: any = document.querySelector('.dragModal');
|
||||
if (dragModalDocument) {
|
||||
// 鼠标按下
|
||||
dragModalDocument.addEventListener('mousedown', function(event) {
|
||||
isDragging = true;
|
||||
initialMouseX = event.clientX;
|
||||
initialMouseY = event.clientY;
|
||||
initialModalX = dragModalDocument.offsetLeft;
|
||||
initialModalY = dragModalDocument.offsetTop;
|
||||
dragModalDocument.style.cursor = 'grabbing';
|
||||
});
|
||||
// 鼠标移动
|
||||
dragModalDocument.addEventListener('mousemove', function(event) {
|
||||
if (isDragging) {
|
||||
const deltaX = event.clientX - initialMouseX;
|
||||
const deltaY = event.clientY - initialMouseY;
|
||||
dragModalDocument.style.left = initialModalX + deltaX + 'px';
|
||||
dragModalDocument.style.top = initialModalY + deltaY + 'px';
|
||||
}
|
||||
});
|
||||
// 鼠标放开
|
||||
dragModalDocument.addEventListener('mouseup', function(event) {
|
||||
isDragging = false;
|
||||
dragModalDocument.style.cursor = 'default';
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getLayerSettings();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue