Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua
commit
ae1fe142ab
|
|
@ -1,24 +1,27 @@
|
||||||
<template>
|
<template>
|
||||||
<a-tabs
|
<a-tabs style="width: 100%" v-model:activeKey="activeKey">
|
||||||
style="width: 100%;"
|
<a-tab-pane key="1" tab="基础查询">
|
||||||
v-model:activeKey="activeKey"
|
<BasicQuery :data="props.info?.result" />
|
||||||
>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="1" tab="基础查询"><BasicQuery :data="props.info?.result"/></a-tab-pane>
|
<a-tab-pane key="2" tab="时序影像">
|
||||||
<a-tab-pane key="2" tab="时序影像"><TimeImages :data="props.info?.yingxiang"/> </a-tab-pane>
|
<TimeImages
|
||||||
|
:data="props.info?.yingxiang?.sort((a, b) => dayjs(b.shijian) - dayjs(a.shijian))"
|
||||||
|
/>
|
||||||
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, defineProps } from "vue"
|
import dayjs from 'dayjs';
|
||||||
import BasicQuery from './BasicQuery/index.vue'
|
import { ref, defineProps } from 'vue';
|
||||||
import TimeImages from './TimeImages/index.vue'
|
import BasicQuery from './BasicQuery/index.vue';
|
||||||
|
import TimeImages from './TimeImages/index.vue';
|
||||||
|
|
||||||
const props = defineProps(['info'])
|
const props = defineProps(['info']);
|
||||||
const activeKey = ref('1')
|
const activeKey = ref('1');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:deep(.ant-tabs-nav){
|
:deep(.ant-tabs-nav) {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -53,12 +53,20 @@
|
||||||
width="100%"
|
width="100%"
|
||||||
wrap-class-name="full-modal"
|
wrap-class-name="full-modal"
|
||||||
v-model:open="showInfoOpen"
|
v-model:open="showInfoOpen"
|
||||||
title="详情"
|
|
||||||
:footer="null"
|
:footer="null"
|
||||||
:maskClosable="true"
|
:maskClosable="true"
|
||||||
:destroyOnClose="true"
|
:destroyOnClose="true"
|
||||||
@cancel="showInfoOpen = false"
|
@cancel="closeModal"
|
||||||
|
ref="modalRef"
|
||||||
>
|
>
|
||||||
|
<template #title>
|
||||||
|
<div ref="modalTitleRef" style="width: 100%; cursor: move">详情</div>
|
||||||
|
</template>
|
||||||
|
<template template #modalRender="{ originVNode }">
|
||||||
|
<div :style="transformStyle">
|
||||||
|
<component :is="originVNode" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<template v-if="showInfoOpen">
|
<template v-if="showInfoOpen">
|
||||||
<ShowInfoModal :showInfoData="showInfoData" v-if="subject == '违法用地'" />
|
<ShowInfoModal :showInfoData="showInfoData" v-if="subject == '违法用地'" />
|
||||||
|
|
@ -125,7 +133,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted, computed } from 'vue';
|
import { ref, onMounted, onUnmounted, computed, watch, watchEffect } from 'vue';
|
||||||
|
import { useDraggable } from '@vueuse/core';
|
||||||
import Map from './Converge/index.vue';
|
import Map from './Converge/index.vue';
|
||||||
import layerButton from './mapComponent/left_layerButton.vue';
|
import layerButton from './mapComponent/left_layerButton.vue';
|
||||||
import statisticalType from './mapComponent/left_statisticalType.vue';
|
import statisticalType from './mapComponent/left_statisticalType.vue';
|
||||||
|
|
@ -164,6 +173,38 @@
|
||||||
const buttonSelect = ref(2);
|
const buttonSelect = ref(2);
|
||||||
const showMainInfoId = ref();
|
const showMainInfoId = ref();
|
||||||
|
|
||||||
|
const modalTitleRef = ref(null);
|
||||||
|
const { x, y, isDragging } = useDraggable(modalTitleRef);
|
||||||
|
const startX = ref<number>(0);
|
||||||
|
const startY = ref<number>(0);
|
||||||
|
const startedDrag = ref(false);
|
||||||
|
const transformX = ref(0);
|
||||||
|
const transformY = ref(0);
|
||||||
|
const preTransformX = ref(0);
|
||||||
|
const preTransformY = ref(0);
|
||||||
|
|
||||||
|
watch([x, y], () => {
|
||||||
|
if (!startedDrag.value) {
|
||||||
|
startX.value = x.value;
|
||||||
|
startY.value = y.value;
|
||||||
|
preTransformX.value = transformX.value;
|
||||||
|
preTransformY.value = transformY.value;
|
||||||
|
}
|
||||||
|
startedDrag.value = true;
|
||||||
|
});
|
||||||
|
watch(isDragging, () => {
|
||||||
|
if (!isDragging) {
|
||||||
|
startedDrag.value = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
watchEffect(() => {
|
||||||
|
if (startedDrag.value) {
|
||||||
|
transformX.value = preTransformX.value + x.value - startX.value;
|
||||||
|
transformY.value = preTransformY.value + y.value - startY.value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const getInfoList = (id) => {
|
const getInfoList = (id) => {
|
||||||
console.log(id);
|
console.log(id);
|
||||||
console.log(subject.value);
|
console.log(subject.value);
|
||||||
|
|
@ -172,49 +213,35 @@
|
||||||
if (res) {
|
if (res) {
|
||||||
showInfoData.value = res;
|
showInfoData.value = res;
|
||||||
showInfoOpen.value = true;
|
showInfoOpen.value = true;
|
||||||
// 添加鼠标拖动监听器
|
|
||||||
addListener();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (subject.value == '非法采矿') {
|
} else if (subject.value == '非法采矿') {
|
||||||
showMainInfoId.value = id;
|
showMainInfoId.value = id;
|
||||||
showInfoOpen.value = true;
|
showInfoOpen.value = true;
|
||||||
// 添加鼠标拖动监听器
|
|
||||||
addListener();
|
|
||||||
} else if (subject.value == '耕地非粮化') {
|
} else if (subject.value == '耕地非粮化') {
|
||||||
GetCaseInfoById({ id: id }).then((res) => {
|
GetCaseInfoById({ id: id }).then((res) => {
|
||||||
showInfoData.value = res;
|
showInfoData.value = res;
|
||||||
showInfoOpen.value = true;
|
showInfoOpen.value = true;
|
||||||
// 添加鼠标拖动监听器
|
|
||||||
addListener();
|
|
||||||
});
|
});
|
||||||
} else if (subject.value == '重点问题') {
|
} else if (subject.value == '重点问题') {
|
||||||
getCaseInfoByIdtotal({ id: id }).then((res) => {
|
getCaseInfoByIdtotal({ id: id }).then((res) => {
|
||||||
showInfoData.value = res;
|
showInfoData.value = res;
|
||||||
showInfoOpen.value = true;
|
showInfoOpen.value = true;
|
||||||
// 添加鼠标拖动监听器
|
|
||||||
addListener();
|
|
||||||
});
|
});
|
||||||
} else if (subject.value == '巡察审计') {
|
} else if (subject.value == '巡察审计') {
|
||||||
getInspectionAuditCaseInfoById({ id: id }).then((res) => {
|
getInspectionAuditCaseInfoById({ id: id }).then((res) => {
|
||||||
showInfoData.value = res;
|
showInfoData.value = res;
|
||||||
showInfoOpen.value = true;
|
showInfoOpen.value = true;
|
||||||
// 添加鼠标拖动监听器
|
|
||||||
addListener();
|
|
||||||
});
|
});
|
||||||
} else if (subject.value == '生态保护红线监管') {
|
} else if (subject.value == '生态保护红线监管') {
|
||||||
getRedLineCaseInfoById({ id: id }).then((res) => {
|
getRedLineCaseInfoById({ id: id }).then((res) => {
|
||||||
showInfoData.value = res;
|
showInfoData.value = res;
|
||||||
showInfoOpen.value = true;
|
showInfoOpen.value = true;
|
||||||
// 添加鼠标拖动监听器
|
|
||||||
addListener();
|
|
||||||
});
|
});
|
||||||
} else if (subject.value == '生态修复') {
|
} else if (subject.value == '生态修复') {
|
||||||
getRepairCaseInfoById({ id: id }).then((res) => {
|
getRepairCaseInfoById({ id: id }).then((res) => {
|
||||||
showInfoData.value = res;
|
showInfoData.value = res;
|
||||||
showInfoOpen.value = true;
|
showInfoOpen.value = true;
|
||||||
// 添加鼠标拖动监听器
|
|
||||||
addListener();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -369,44 +396,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 鼠标拖动监听器-参数
|
|
||||||
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(() => {
|
onMounted(() => {
|
||||||
getLayerSettings();
|
getLayerSettings();
|
||||||
});
|
});
|
||||||
|
|
@ -437,6 +426,16 @@
|
||||||
showAttributeWindow.value = false;
|
showAttributeWindow.value = false;
|
||||||
isMinusAttributeWindow.value = true;
|
isMinusAttributeWindow.value = true;
|
||||||
};
|
};
|
||||||
|
const transformStyle = computed(() => {
|
||||||
|
return {
|
||||||
|
transform: `translate(${transformX.value}px, ${transformY.value}px)`,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
const closeModal = () => {
|
||||||
|
showInfoOpen.value = false
|
||||||
|
transformX.value = 0
|
||||||
|
transformY.value = 0
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div :id="mapContainerName" class="map-container">
|
<div :id="mapContainerName" class="map-container">
|
||||||
<div class="search-container-box">
|
<div class="search-container-box">
|
||||||
<SearchComponent @toPosition="toPosition" @handlerFilter="handlerFilter" :layer="layerSettings"></SearchComponent>
|
<SearchComponent @toPosition="toPosition" @handlerFilter="handlerFilter" :layerSettings="layerSettings"></SearchComponent>
|
||||||
</div>
|
</div>
|
||||||
<div class="map-type-switch-container">
|
<div class="map-type-switch-container">
|
||||||
<div class="switch-button" v-if="mapAngle == '3D'" @click="handlerChangeMapAngle()">
|
<div class="switch-button" v-if="mapAngle == '3D'" @click="handlerChangeMapAngle()">
|
||||||
|
|
@ -848,7 +848,7 @@ import { GeojsonToWkt } from './src/WktGeojsonTransform';
|
||||||
maxzoom: 13,
|
maxzoom: 13,
|
||||||
minzoom: 10,
|
minzoom: 10,
|
||||||
});
|
});
|
||||||
map.setTerrain({ source: 'mapbox-dem', exaggeration: 1 });
|
// map.setTerrain({ source: 'mapbox-dem', exaggeration: 1 });
|
||||||
|
|
||||||
// 设置2D地图
|
// 设置2D地图
|
||||||
map.easeTo({ pitch: 0, bearing: 0, duration: 1000 });
|
map.easeTo({ pitch: 0, bearing: 0, duration: 1000 });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue