Jelajahi Sumber

修改部分bug

wangfumin 4 minggu lalu
induk
melakukan
d2665e8367
7 mengubah file dengan 50 tambahan dan 24 penghapusan
  1. TEMPAT SAMPAH
      public/fire.ico
  2. TEMPAT SAMPAH
      public/jmlogo.png
  3. TEMPAT SAMPAH
      public/logo_big.ico
  4. TEMPAT SAMPAH
      public/police.ico
  5. 1 1
      src/constant/caseFile.ts
  6. 18 12
      src/view/case/drawMap/creatMap.vue
  7. 31 11
      src/view/case/newCaseFile.vue

TEMPAT SAMPAH
public/fire.ico


TEMPAT SAMPAH
public/jmlogo.png


TEMPAT SAMPAH
public/logo_big.ico


TEMPAT SAMPAH
public/police.ico


+ 1 - 1
src/constant/caseFile.ts

@@ -5,7 +5,7 @@ export const DrawFormats = [".jpg", ".jpeg", ".png"];
 export const photoFormats = [".jpg", ".jpeg", ".png"];
 export const OtherFormats = [".pdf", ".jpeg", ".doc", ".docx", ".jpg", ".png", ".raw", ".dcm"];
 export const BoardTypeDesc = {
-  [BoardType.scene]: "现场图",
+  [BoardType.scene]: "平面图",
   [BoardType.map]: "方位图",
 };
 export const DrawFormatDesc = "jpg、png等格式的文件";

+ 18 - 12
src/view/case/drawMap/creatMap.vue

@@ -15,7 +15,7 @@
                   <el-option label="地址" value="1"></el-option>
                   <el-option label="经纬度" value="2"></el-option>
                 </el-select>
-                <input class="search-input-latlng" v-if="selectedSearchAdress === '2'" @input="handleSearch" autocomplete="off" @keydown="handleKeyDown" placeholder="输入经纬度" />
+                <input class="search-input-latlng" v-if="selectedSearchAdress === '2'" @input="handleSearch" autocomplete="off" @keydown="handleKeyDown" placeholder="39.908739,116.397513" />
                 <input class="search-input-address" v-else id="searchInput" @input="handleSearch" autocomplete="off" placeholder="输入地址" />
                 <!-- <input id="searchInput" @input="handleSearch" autocomplete="off" @keydown="handleKeyDown" :placeholder="selectedSearchAdress === '1' ? '输入地址' : '输入经纬度'" /> -->
             </div>
@@ -96,7 +96,9 @@ let poiPicker: any = null
 const AMAP_KEY = '2ae5a7713612a8d5a65cfd54c989c969'
 const selectedSearchAdress = ref('1')
 const searchInputValue = ref('')
-
+// 根基app打开不同地址
+const appId = import.meta.env.VITE_APP_APP || 'fire'
+const url = 'http://test-mix3d.4dkankan.com'
 // 防抖定时器
 let searchDebounceTimer: number | null = null
 // 监听visible变化
@@ -267,9 +269,9 @@ const locateByCoordinates = (lat: number, lng: number) => {
     const searchResults = document.getElementById('searchResults')
     if (searchResults) {
       searchResults.innerHTML = `
-        <div style="padding: 16px; text-align: center; color: #606266;">
-          <div style="font-weight: 500; margin-bottom: 8px;">经纬度定位成功</div>
-          <div style="font-size: 12px;">
+        <div style="padding: 16px; text-align: center; color: #606266;width:345px;height: 106px;border: 1px solid #D9D9D9;">
+          <div style="font-weight: 500; margin-bottom: 8px;color:#67C23A;">经纬度定位成功</div>
+          <div style="font-size: 14px;color: #A7A7A7;">
             纬度: ${lat}<br/>
             经度: ${lng}
           </div>
@@ -318,9 +320,9 @@ const debouncedSearch = (inputValue: string, searchType: string) => {
         const searchResults = document.getElementById('searchResults')
         if (searchResults) {
           searchResults.innerHTML = `
-            <div style="padding: 16px; text-align: center; color: #f56c6c;">
-              <div style="font-weight: 500; margin-bottom: 8px;">经纬度格式错误</div>
-              <div style="font-size: 12px; line-height: 1.5;">
+            <div style="padding: 16px; text-align: center; width:345px;height: 106px;border: 1px solid #D9D9D9;">
+              <div style="font-weight: 600; margin-bottom: 8px;color: #B3261E;">经纬度格式错误</div>
+              <div style="font-size: 12px; line-height: 1.5;color:#A7A7A7;">
                 请输入正确的经纬度格式:<br/>
                 纬度,经度(例如:23.11766,113.28122)<br/>
                 纬度范围:-90 到 90<br/>
@@ -532,16 +534,20 @@ const handleConfirm = async () => {
         caseId: props.caseId,
         width: mapSizeInfo.width,
         high: mapSizeInfo.height,
-        listCover: uploadResult.url, // 封面图
+        listCover: '', // 封面图不传,等那边确定才会有
         mapUrl: uploadResult.url,    // 地图URL
         title: '方位图'
       }
     })
 
-    ElMessage.success('方位图保存成功!')
     console.log('方位图保存成功:', response)
-    console.log(`http://test-mix3d.4dkankan.com/draw/index.html#/tabulation?caseId=${props.caseId}&tabulationId=${response.data.id}&token=${user.value.token}`)
-    window.open(`http://test-mix3d.4dkankan.com/draw/index.html#/tabulation?caseId=${props.caseId}&tabulationId=${response.data.id}&token=${user.value.token}`, '_blank')
+    if(appId === 'fire'){
+      window.open(`${url}/draw/fire/index.html#/tabulation?caseId=${props.caseId}&tabulationId=${response.data.id}&token=${user.value.token}`, '_blank')
+    }else{
+      window.open(`${url}/draw/criminal/index.html#/tabulation?caseId=${props.caseId}&tabulationId=${response.data.id}&token=${user.value.token}`, '_blank')
+    }
+    // console.log(`http://test-mix3d.4dkankan.com/draw/index.html#/tabulation?caseId=${props.caseId}&tabulationId=${response.data.id}&token=${user.value.token}`)
+
     handleClose()
   } catch (error) {
     console.error('保存方位图失败:', error)

+ 31 - 11
src/view/case/newCaseFile.vue

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