tangning 3 viikkoa sitten
vanhempi
commit
11b56713fc

+ 4 - 0
src/app/fire/view/dispatch/editLeaveMsg.vue

@@ -19,6 +19,8 @@ import { addFireLeaveMsg } from "@/app/fire/store/fire";
 
 
 const props = defineProps<{
 const props = defineProps<{
   projectId: string;
   projectId: string;
+  refresh: any;
+  onQuit: any;
 }>();
 }>();
 const content = ref("");
 const content = ref("");
 
 
@@ -32,6 +34,8 @@ defineExpose<QuiskExpose>({
       content: content.value,
       content: content.value,
       projectId: props.projectId,
       projectId: props.projectId,
     });
     });
+    props.refresh()
+    return true
   },
   },
 });
 });
 </script>
 </script>

+ 1 - 1
src/app/fire/view/dispatch/index.vue

@@ -145,7 +145,7 @@ const revokeTeaching = async (row?: Fire) => {
 const showMessageHandler = (row: Fire) => {
 const showMessageHandler = (row: Fire) => {
   showLeaveMsgList({
   showLeaveMsgList({
     projectId: row.id,
     projectId: row.id,
-    onAddLeaveMsg: () => addLeaveMsg({ projectId: row.id }),
+    onAddLeaveMsg: (refresh) => addLeaveMsg({ projectId: row.id, refresh }),
   });
   });
 };
 };
 
 

+ 2 - 4
src/app/fire/view/dispatch/leaveMsgList.vue

@@ -52,7 +52,7 @@ import { QuiskExpose } from "@/helper/mount";
 
 
 const props = defineProps<{
 const props = defineProps<{
   projectId: string;
   projectId: string;
-  onAddLeaveMsg: (projectId: string) => boolean | Promise<boolean>;
+  onAddLeaveMsg: (refresh: any) => boolean | Promise<boolean>;
 }>();
 }>();
 
 
 const { state, refresh, changPageSize, changPageCurrent } = usePagging({
 const { state, refresh, changPageSize, changPageCurrent } = usePagging({
@@ -66,9 +66,7 @@ const format = (date: number) => dateFormat(new Date(date), "yyyy-MM-dd hh:mm");
 
 
 defineExpose<QuiskExpose>({
 defineExpose<QuiskExpose>({
   async submit() {
   async submit() {
-    if (await props.onAddLeaveMsg(props.projectId)) {
-      refresh();
-    }
+    await props.onAddLeaveMsg(refresh)
     throw "不退出";
     throw "不退出";
   },
   },
 });
 });

+ 1 - 1
src/store/editCsae.ts

@@ -348,7 +348,7 @@ export const getMix3dPaggingOffline = async (params: ScenePaggingParams): Promis
       return { list: [], total: 0 } as PaggingRes<any>;
       return { list: [], total: 0 } as PaggingRes<any>;
     }
     }
   }
   }
-  return (await axios.post(getMix3dList, { params })).data as PaggingRes<any>;
+  return (await axios.post(getMix3dList, { ...params })).data as PaggingRes<any>;
 };
 };
 
 
 // =============== 现场勘验:照片制卷列表(离线支持) ===============
 // =============== 现场勘验:照片制卷列表(离线支持) ===============

+ 2 - 1
src/util/index.ts

@@ -1,7 +1,8 @@
 import { Base64 } from "js-base64";
 import { Base64 } from "js-base64";
 import { positionTransform } from "./mt4";
 import { positionTransform } from "./mt4";
 
 
-export const dateFormat = (date: Date, fmt: string) => {
+export const dateFormat = (dates: Date, fmt: string) => {
+  let date = new Date(dates);
   var o: any = {
   var o: any = {
     "M+": date.getMonth() + 1, //月份
     "M+": date.getMonth() + 1, //月份
     "d+": date.getDate(), //日
     "d+": date.getDate(), //日

+ 1 - 1
src/view/newFireCase/mix3dManager/sceneContent.vue

@@ -9,7 +9,7 @@
     style="width: 100%"
     style="width: 100%"
     size="large"
     size="large"
   >
   >
-    <el-table-column label="场景标题" prop="name">
+    <el-table-column label="标题" prop="name">
       <template v-slot:default="{ row }">
       <template v-slot:default="{ row }">
         <span class="oper-span" @click="openFusionView(row)">{{ row.fusionTitle }}</span>
         <span class="oper-span" @click="openFusionView(row)">{{ row.fusionTitle }}</span>
       </template>
       </template>

+ 1 - 1
src/view/newFireCase/newFireDetails/components/basicInfo.vue

@@ -405,7 +405,7 @@ const searchAMapAddress = async () => {
 const handleMapConfirm = (LocationInfo: any) => {
 const handleMapConfirm = (LocationInfo: any) => {
   console.log(LocationInfo, 666)
   console.log(LocationInfo, 666)
   const {cityname, adname, address, name, location} = LocationInfo;
   const {cityname, adname, address, name, location} = LocationInfo;
-  bindFire.value.mapUrl = cityname + adname + address + name;
+  bindFire.value.mapUrl = cityname?`${cityname+ adname + address + name}`:name;
   bindFire.value.latlng = bindFire.value.latAndLong = `${location.lat},${location.lng}`;
   bindFire.value.latlng = bindFire.value.latAndLong = `${location.lat},${location.lng}`;
   showMapDialog.value = false;
   showMapDialog.value = false;
 }
 }

+ 18 - 9
src/view/newFireCase/newFireDetails/components/creatMap.vue

@@ -161,7 +161,10 @@ const initMap = async () => {
     });
     });
 
 
     AMapUI.loadUI(['misc/PoiPicker'], function(PoiPicker) {
     AMapUI.loadUI(['misc/PoiPicker'], function(PoiPicker) {
-
+    // 正确:异步加载插件后再实例化
+    AMap.plugin("AMap.Geocoder", () => {
+      geocoder = new AMap.Geocoder();
+    });
     poiPicker = new PoiPicker({
     poiPicker = new PoiPicker({
         input: 'searchInput',
         input: 'searchInput',
         placeSearchOptions: {
         placeSearchOptions: {
@@ -283,14 +286,20 @@ const locateByCoordinates = (lat: number, lng: number) => {
     //     city: "", //城市设为北京,默认:“全国”
     //     city: "", //城市设为北京,默认:“全国”
     //     radius: 1000 //范围,默认:500
     //     radius: 1000 //范围,默认:500
     // });
     // });
-    // geocoder.getAddress(lngLat, function(status, result) {
-    //         if (status === 'complete'&&result.regeocode) {
-    //             var address = result.regeocode.formattedAddress;
-    //             console.log('经纬度定位address:', address)
-    //         }else{
-    //           ElMessage.success('根据经纬度查询地址失败')
-    //         }
-    //     });
+    geocoder.getAddress(lngLat, function(status, result) {
+            if (status === 'complete'&&result.regeocode) {
+                var address = result.regeocode.formattedAddress;
+                selectedLocation.value = {
+                  ...result.regeocode.addressComponent,
+                  location: lngLat,
+                  name: address,
+                  lat: lat,
+                  lng: lng
+                };//选中的信息
+            }else{
+              // ElMessage.success('根据经纬度查询地址失败')
+            }
+        });
     console.log('经纬度定位:', searchResults)
     console.log('经纬度定位:', searchResults)
     ElMessage.success('经纬度定位成功')
     ElMessage.success('经纬度定位成功')
   } catch (error) {
   } catch (error) {

+ 8 - 4
src/view/newFireCase/newFireDetails/components/mix3d.vue

@@ -77,6 +77,7 @@
        <el-table
        <el-table
          ref="tableRef"
          ref="tableRef"
          :data="tableData"
          :data="tableData"
+         show-overflow-tooltip
          height="420"
          height="420"
          style="width: 100%"
          style="width: 100%"
          border
          border
@@ -94,9 +95,9 @@
              {{ row.deptName }}
              {{ row.deptName }}
            </template>
            </template>
          </el-table-column>
          </el-table-column>
-         <el-table-column label="拍摄时间" width="200">
+         <el-table-column label="创建时间" width="200">
            <template #default="{ row }">
            <template #default="{ row }">
-             {{ row.createTime }}
+             {{ dateFormat(row.createTime, 'yyyy-MM-dd hh:mm') }}
            </template>
            </template>
          </el-table-column>
          </el-table-column>
        </el-table>
        </el-table>
@@ -132,6 +133,7 @@ import { user } from "@/store/user";
 import { isOfflineMode } from '@/util/offline'
 import { isOfflineMode } from '@/util/offline'
 const url = import.meta.env.VITE_SEVER_URL || 'https://mix3d.4dkankan.com';
 const url = import.meta.env.VITE_SEVER_URL || 'https://mix3d.4dkankan.com';
 const nowRouteName = import.meta.env.VITE_APP_APP;
 const nowRouteName = import.meta.env.VITE_APP_APP;
+import { dateFormat } from "@/util";
 
 
 const route = useRoute();
 const route = useRoute();
 const router = useRouter();
 const router = useRouter();
@@ -190,11 +192,11 @@ const onDelete = async (scene: any) => {
   if ((scenes.value || []).length <= 1) {
   if ((scenes.value || []).length <= 1) {
     const sceneList = (await getFusionAndSceneList({ caseId: caseId.value, type: 'scene' })) as unknown as any[];
     const sceneList = (await getFusionAndSceneList({ caseId: caseId.value, type: 'scene' })) as unknown as any[];
     if (!sceneList || sceneList.length === 0) {
     if (!sceneList || sceneList.length === 0) {
-      ElMessage.error('至少保留一个实景三维/多元融合场景');
+      ElMessage.error('至少保留一个实景三维/多元融合');
       return;
       return;
     }
     }
   }
   }
-  if (await confirm('确定要移除当前融合场景吗?')) {
+  if (await confirm('确定要移除当前多元融合吗?')) {
     const delId = String((scene as any)?.fusionId || '');
     const delId = String((scene as any)?.fusionId || '');
     const newList = (scenes.value || []).filter((s: any) => String(s?.fusionId || '') !== delId);
     const newList = (scenes.value || []).filter((s: any) => String(s?.fusionId || '') !== delId);
     const fusionIds = newList.map((s: any) => s?.fusionId).filter((v: any) => v !== undefined && v !== null);
     const fusionIds = newList.map((s: any) => s?.fusionId).filter((v: any) => v !== undefined && v !== null);
@@ -224,6 +226,7 @@ const importedIdSet = computed(() => {
     const id = String((s && (s.fusionId ?? s.id)) || '');
     const id = String((s && (s.fusionId ?? s.id)) || '');
     if (id) set.add(id);
     if (id) set.add(id);
   });
   });
+  console.log('importedIdSet', set);
   return set;
   return set;
 });
 });
 const selectedIdSet = computed(() => {
 const selectedIdSet = computed(() => {
@@ -306,6 +309,7 @@ const onSelectionChange = (rows: any[]) => {
     map.set(rowKey(r), r);
     map.set(rowKey(r), r);
   });
   });
   selectedRows.value = Array.from(map.values());
   selectedRows.value = Array.from(map.values());
+  console.log('selectedRows', selectedRows.value);
 };
 };
 
 
 const onConfirmEdit = async () => {
 const onConfirmEdit = async () => {

+ 5 - 5
src/view/newFireCase/newFireDetails/components/scene.vue

@@ -154,7 +154,7 @@ import { DocumentAdd, Edit, Delete, FullScreen } from '@element-plus/icons-vue';
 import comPagination from "@/components/pagination/index.vue";
 import comPagination from "@/components/pagination/index.vue";
 import { Scene, SceneType, getSWKKSyncLink } from '@/store/scene';
 import { Scene, SceneType, getSWKKSyncLink } from '@/store/scene';
 import { getScenePaggingOffline as getScenePagging, getFusionAndSceneList } from '@/store/editCsae';
 import { getScenePaggingOffline as getScenePagging, getFusionAndSceneList } from '@/store/editCsae';
-import { SceneTypeDesc } from '@/constant/scene';
+import { SceneTypeDesc, SceneTypePaths } from '@/constant/scene';
 import { getCaseScenes, replaceCaseScenes, getSceneKey, getCaseScenesBySceneType } from '@/store/case';
 import { getCaseScenes, replaceCaseScenes, getSceneKey, getCaseScenesBySceneType } from '@/store/case';
 import { confirm } from '@/helper/message';
 import { confirm } from '@/helper/message';
 import { ElMessage } from 'element-plus';
 import { ElMessage } from 'element-plus';
@@ -284,11 +284,11 @@ const onOpen = async (scene: Scene) => {
   let type = [0, 1, 3, 4, 6].includes(Number(scene.sceneType)) ? 1 : 0;
   let type = [0, 1, 3, 4, 6].includes(Number(scene.sceneType)) ? 1 : 0;
   const token = await transformSWToken(scene, type);
   const token = await transformSWToken(scene, type);
   if(!token) return;
   if(!token) return;
-  let newUrl = ''
+  let newUrl = SceneTypePaths[scene.sceneType][1];
   if(window.location.host.includes('localhost') || window.location.host.includes('test')){
   if(window.location.host.includes('localhost') || window.location.host.includes('test')){
-    newUrl = `https://test.4dkankan.com/epg.html?m=${scene.num}&token=${token}`
+    newUrl += `?m=${scene.num}&token=${token}`
   } else {
   } else {
-    newUrl = `https://4dkankan.com/epg.html?m=${scene.num}&token=${token}`
+    newUrl += `?m=${scene.num}&token=${token}`
   }
   }
   window.open(newUrl, '_blank');
   window.open(newUrl, '_blank');
 };
 };
@@ -486,7 +486,7 @@ onMounted(async () => {
   display: flex;
   display: flex;
   .let-bar{
   .let-bar{
     width: 510px;
     width: 510px;
-    height: 100%;
+    height: calc(100% - 221.36px);
     overflow: auto;
     overflow: auto;
     .no-data{
     .no-data{
       line-height: 100px;
       line-height: 100px;

+ 1 - 1
src/view/newFireCase/newFireDetails/components/siteInspection.vue

@@ -258,7 +258,7 @@
         <!-- 现场图右侧:图片查看器 -->
         <!-- 现场图右侧:图片查看器 -->
         <template v-if="activeTab === 'scene'">
         <template v-if="activeTab === 'scene'">
           <div v-if="currentSceneImageUrl" class="scene-image" @click="showViewer = true">
           <div v-if="currentSceneImageUrl" class="scene-image" @click="showViewer = true">
-            <el-image :src="currentSceneImageUrl" fit="contain" class="inline-image" />
+            <el-image :src="currentSceneImageUrl" loading="lazy" fit="contain" class="inline-image" />
             <!-- <div class="click-tip">点击图片放大</div> -->
             <!-- <div class="click-tip">点击图片放大</div> -->
           </div>
           </div>
           <div class="viewer-placeholder" v-else>选择左侧图片进行查看</div>
           <div class="viewer-placeholder" v-else>选择左侧图片进行查看</div>

+ 1 - 2
src/view/newFireCase/newdispatch/editFire.vue

@@ -50,7 +50,6 @@
             height="420"
             height="420"
             style="width: 100%"
             style="width: 100%"
             :row-class-name="rowClassName"
             :row-class-name="rowClassName"
-            v-loading="tableLoading"
             @selection-change="onSelectionChange"
             @selection-change="onSelectionChange"
           >
           >
             <el-table-column type="selection" width="48" :selectable="isRowSelectable" />
             <el-table-column type="selection" width="48" :selectable="isRowSelectable" />
@@ -71,7 +70,7 @@
             </el-table-column>
             </el-table-column>
             <el-table-column label="拍摄时间" width="200">
             <el-table-column label="拍摄时间" width="200">
               <template #default="{ row }">
               <template #default="{ row }">
-                {{ row.createTime }}
+              {{ dateFormat(row.createTime, 'yyyy-MM-dd hh:mm') }}
               </template>
               </template>
             </el-table-column>
             </el-table-column>
           </el-table>
           </el-table>