|
@@ -106,12 +106,9 @@
|
|
|
<el-image
|
|
|
ref="imageRef"
|
|
|
:src="file.type === 'old' ? file.filesUrl : file.listCover"
|
|
|
- :preview-src-list="srcList"
|
|
|
- :initial-index="index"
|
|
|
fit="cover"
|
|
|
- class="card-image"
|
|
|
- :hide-on-click-modal="true"
|
|
|
:preview-teleported="true"
|
|
|
+ class="card-image"
|
|
|
>
|
|
|
<template #error>
|
|
|
<div class="image-error">
|
|
@@ -256,7 +253,9 @@ import Records from "./records/index.vue";
|
|
|
import Manifest from "./records/manifest.vue";
|
|
|
import CreatMap from "./drawMap/creatMap.vue";
|
|
|
import { user } from "@/store/user";
|
|
|
-
|
|
|
+// 根基app打开不同地址
|
|
|
+const appId = import.meta.env.VITE_APP_APP || 'fire'
|
|
|
+const url = 'http://test-mix3d.4dkankan.com'
|
|
|
const props = defineProps<{
|
|
|
caseId?: number;
|
|
|
currentMenuKey?: string;
|
|
@@ -402,8 +401,6 @@ const previewImage = (index: number) => {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- // 如果是其他文件类型,使用原来的查看逻辑
|
|
|
- const appId = import.meta.env.VITE_APP_APP || 'fire';
|
|
|
if ([".raw", ".dcm"].includes(ext)) {
|
|
|
window.open(
|
|
|
`/${appId}/xfile-viewer/index.html?file=${file.filesUrl}&name=${file.filesTitle}&time=` +
|
|
@@ -437,11 +434,13 @@ const refresh = async () => {
|
|
|
]);
|
|
|
|
|
|
// 提取数据并为每种类型添加标记
|
|
|
- const tabulationList = (tabulationRes?.data || []).map(item => ({
|
|
|
+ let tabulationList = (tabulationRes?.data || []).map(item => ({
|
|
|
...item,
|
|
|
title: item.title || '方位图',
|
|
|
type: 'tabulation' as const
|
|
|
}));
|
|
|
+ // 方位图需要清除封面图为空的数据
|
|
|
+ tabulationList = tabulationList.filter(item => item.listCover !== '');
|
|
|
const overviewList = (overviewRes?.data || []).map(item => ({
|
|
|
...item,
|
|
|
title: item.title || '平面图',
|
|
@@ -515,10 +514,18 @@ const gotoDraw = (type: BoardType, id: number) => {
|
|
|
const handleEdit = (file: CaseFile) => {
|
|
|
if (file.type === 'tabulation') {
|
|
|
// tabulation 类型的编辑链接
|
|
|
- window.open(`http://test-mix3d.4dkankan.com/draw/index.html#/tabulation?caseId=${caseId.value}&tabulationId=${file.id}&token=${user.value.token}`, '_blank');
|
|
|
+ if(appId === 'fire'){
|
|
|
+ window.open(`${url}/draw/fire/index.html#/tabulation?caseId=${caseId.value}&tabulationId=${file.id}&token=${user.value.token}`, '_blank');
|
|
|
+ } else {
|
|
|
+ window.open(`${url}/draw/criminal/index.html#/tabulation?caseId=${caseId.value}&tabulationId=${file.id}&token=${user.value.token}`, '_blank');
|
|
|
+ }
|
|
|
} else if (file.type === 'overview') {
|
|
|
// overview 类型的编辑链接
|
|
|
- window.open(`http://test-mix3d.4dkankan.com/draw/index.html#/overview?caseId=${caseId.value!}&overviewId=${file.id}&token=${user.value.token}`, '_blank');
|
|
|
+ if(appId === 'fire'){
|
|
|
+ window.open(`${url}/draw/fire/index.html#/overview?caseId=${caseId.value!}&overviewId=${file.id}&token=${user.value.token}`, '_blank');
|
|
|
+ } else {
|
|
|
+ window.open(`${url}/draw/criminal/index.html#/overview?caseId=${caseId.value!}&overviewId=${file.id}&token=${user.value.token}`, '_blank');
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
// 地图弹窗相关
|
|
@@ -530,7 +537,17 @@ const openMapDialog = () => {
|
|
|
}
|
|
|
// 创建现场图
|
|
|
const openOverView = () => {
|
|
|
- window.open(`http://test-mix3d.4dkankan.com/draw/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank')
|
|
|
+ // let avtUrl = {
|
|
|
+ // criminal: `/criminal/criminal.ico`,
|
|
|
+ // fire: `/fire/fire.ico`,
|
|
|
+ // cjzfire: `/cjzfire/cjzfire.ico`,
|
|
|
+ // }
|
|
|
+ console.log('appId', appId)
|
|
|
+ if(appId === 'fire'){
|
|
|
+ window.open(`${url}/draw/fire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank')
|
|
|
+ } else {
|
|
|
+ window.open(`${url}/draw/criminal/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank')
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 处理地图选择确认
|
|
@@ -658,6 +675,9 @@ onUnmounted(() => {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
+ :deep(.el-image-viewer__canvas){
|
|
|
+ background-color: #000;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.card-image-container {
|