字典配置轨迹文件格式
This commit is contained in:
parent
d76271da24
commit
50462faaff
@ -7,11 +7,7 @@
|
|||||||
|
|
||||||
<svg ref="svgRef" class="trajectory-svg" :width="svgWidth" :height="svgHeight">
|
<svg ref="svgRef" class="trajectory-svg" :width="svgWidth" :height="svgHeight">
|
||||||
<g class="zoom-container">
|
<g class="zoom-container">
|
||||||
<image
|
<image :xlink:href="imageUrl" :width="svgWidth" :height="svgHeight" />
|
||||||
:xlink:href="imageUrl"
|
|
||||||
:width="svgWidth"
|
|
||||||
:height="svgHeight"
|
|
||||||
/>
|
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
@ -216,24 +212,26 @@ const toggleFullscreen = () => {
|
|||||||
// === 全屏状态更新处理 ===
|
// === 全屏状态更新处理 ===
|
||||||
const handleFullscreenChange = () => {
|
const handleFullscreenChange = () => {
|
||||||
isFullscreen.value = !!document.fullscreenElement
|
isFullscreen.value = !!document.fullscreenElement
|
||||||
|
|
||||||
// 全屏切换时主动清除原有轨迹
|
// 全屏切换时主动清除原有轨迹
|
||||||
clearOldElements()
|
clearOldElements()
|
||||||
|
requestAnimationFrame(() => {
|
||||||
// 延迟执行以确保DOM更新
|
// 延迟执行以确保DOM更新
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
initMap()
|
initMap()
|
||||||
updateTrajectory()
|
updateTrajectory()
|
||||||
}, 500)
|
}, 500)
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// === 窗口大小变化处理 ===
|
// === 窗口大小变化处理 ===
|
||||||
const handleResize = () => {
|
const handleResize = () => {
|
||||||
if (resizeTimeout) clearTimeout(resizeTimeout)
|
if (resizeTimeout) clearTimeout(resizeTimeout)
|
||||||
resizeTimeout = setTimeout(() => {
|
resizeTimeout = setTimeout(() => {
|
||||||
|
clearOldElements()
|
||||||
initMap()
|
initMap()
|
||||||
updateTrajectory()
|
updateTrajectory()
|
||||||
}, 300)
|
},500)
|
||||||
}
|
}
|
||||||
|
|
||||||
// === 响应式监听与生命周期 ===
|
// === 响应式监听与生命周期 ===
|
||||||
|
20
web/src/views/testdata/datamanagement/index.vue
vendored
20
web/src/views/testdata/datamanagement/index.vue
vendored
@ -44,6 +44,7 @@ import VideoPlayerAsyncLoading from "@/components/file/preview/VideoPlayerAsyncL
|
|||||||
import TextViewerAsyncLoading from "@/components/file/preview/TextViewerAsyncLoading.vue";
|
import TextViewerAsyncLoading from "@/components/file/preview/TextViewerAsyncLoading.vue";
|
||||||
import MarkdownViewerDialogAsyncLoading from "@/components/file/preview/MarkdownViewerDialogAsyncLoading.vue";
|
import MarkdownViewerDialogAsyncLoading from "@/components/file/preview/MarkdownViewerDialogAsyncLoading.vue";
|
||||||
import { display } from "html2canvas/dist/types/css/property-descriptors/display";
|
import { display } from "html2canvas/dist/types/css/property-descriptors/display";
|
||||||
|
import { getDict } from '@/api/dict'
|
||||||
const { dialogVideoVisible, dialogTextVisible, dialogPdfVisible, dialogOfficeVisible, dialog3dVisible } = useFilePreview();
|
const { dialogVideoVisible, dialogTextVisible, dialogPdfVisible, dialogOfficeVisible, dialog3dVisible } = useFilePreview();
|
||||||
const { clearALlFinishedUploadFile } = useFileUpload();
|
const { clearALlFinishedUploadFile } = useFileUpload();
|
||||||
const { currentStorageKey } = useHeaderStorageList();
|
const { currentStorageKey } = useHeaderStorageList();
|
||||||
@ -51,6 +52,7 @@ const { openRow } = useFileData();
|
|||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getProject()
|
getProject()
|
||||||
|
getDictOne()
|
||||||
|
|
||||||
});
|
});
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
@ -63,6 +65,15 @@ onBeforeUnmount(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
const trackFileType = ref([])
|
||||||
|
function getDictOne() {
|
||||||
|
getDict({ dictcode: 'Trajectory_File_Key' }).then((res: any) => {
|
||||||
|
trackFileType.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function iftrackFile(name: string): boolean {
|
||||||
|
return trackFileType.value.some((item: any) => name.includes(item.dictname));
|
||||||
|
}
|
||||||
//拖动条
|
//拖动条
|
||||||
const vMove = {
|
const vMove = {
|
||||||
mounted(el: any) {
|
mounted(el: any) {
|
||||||
@ -1769,6 +1780,10 @@ function getSSELink() {
|
|||||||
try {
|
try {
|
||||||
const data = JSON.parse(e.data)
|
const data = JSON.parse(e.data)
|
||||||
console.log('SSE消息:', data)
|
console.log('SSE消息:', data)
|
||||||
|
if(data.message == '配置文件选择错误,请重新选择!'){
|
||||||
|
ElMessage.warning(data.message)
|
||||||
|
return
|
||||||
|
}
|
||||||
if (data) {
|
if (data) {
|
||||||
dynamicCoordinates.value.push([data.lon, data.lat])
|
dynamicCoordinates.value.push([data.lon, data.lat])
|
||||||
if (dynamicCoordinates.value.length > 2) {
|
if (dynamicCoordinates.value.length > 2) {
|
||||||
@ -1960,7 +1975,8 @@ const configradio: any = ref(null)
|
|||||||
style="cursor: pointer;"> -->
|
style="cursor: pointer;"> -->
|
||||||
<img src="@/assets/project/chong.png" alt="" title="重命名" @click="editfile(scope.row, false)"
|
<img src="@/assets/project/chong.png" alt="" title="重命名" @click="editfile(scope.row, false)"
|
||||||
style="cursor: pointer;">
|
style="cursor: pointer;">
|
||||||
<img v-if="scope.row.fileName.includes('ins_img') || scope.row.fileName == 'VINS.csv'"
|
|
||||||
|
<img v-if="iftrackFile(scope.row.fileName)"
|
||||||
src="@/assets/MenuIcon/guiji.png" alt="" @click="openMap(scope.row)" title="轨迹预览图"
|
src="@/assets/MenuIcon/guiji.png" alt="" @click="openMap(scope.row)" title="轨迹预览图"
|
||||||
style="cursor: pointer;">
|
style="cursor: pointer;">
|
||||||
<img src="@/assets/MenuIcon/lbcz_xg.png" alt="" @click="editfile(scope.row, true)"
|
<img src="@/assets/MenuIcon/lbcz_xg.png" alt="" @click="editfile(scope.row, true)"
|
||||||
@ -2281,7 +2297,7 @@ const configradio: any = ref(null)
|
|||||||
<el-button @click="">取消</el-button>
|
<el-button @click="">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 800px;height:600px;overflow: hidden;margin: auto;" v-else>
|
<div style="width: 800px;height:600px;margin: auto;" v-else>
|
||||||
<Imggui :imageUrl="pngobj.pngurl" :bounds="pngobj.textcontent" :trajectory="imgarrdata"
|
<Imggui :imageUrl="pngobj.pngurl" :bounds="pngobj.textcontent" :trajectory="imgarrdata"
|
||||||
:qvehuan="qvehuan" @qvehuan1="handleCustomEvent" />
|
:qvehuan="qvehuan" @qvehuan1="handleCustomEvent" />
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user