字典配置轨迹文件格式

This commit is contained in:
wangxk 2025-08-01 10:56:49 +08:00
parent d76271da24
commit 50462faaff
2 changed files with 44 additions and 30 deletions

View File

@ -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)
} }
// === === // === ===

View File

@ -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>