From c1bc78d2c640dc3d0c84783c2a8be71897f8e904 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Sat, 14 Jun 2025 15:34:53 +0800
Subject: [PATCH] Merge branch 'refs/heads/master' into test

---
 src/views/dataCenter/components/searchData.vue    |    1 
 src/hooks/useRouteLine/useRouteLine.js            |   16 ++++-
 src/views/tickets/orderLog.vue                    |    7 +-
 src/views/dataCenter/dataCenter.vue               |  110 +++++++++++++++++++-----------------
 src/views/dataCenter/components/dataCenterMap.vue |   11 ++-
 src/components/map-container/mapContainer.vue     |    2 
 src/api/dataCenter/dataCenter.js                  |   10 +++
 7 files changed, 95 insertions(+), 62 deletions(-)

diff --git a/src/api/dataCenter/dataCenter.js b/src/api/dataCenter/dataCenter.js
index 66db6d6..e520c23 100644
--- a/src/api/dataCenter/dataCenter.js
+++ b/src/api/dataCenter/dataCenter.js
@@ -53,4 +53,14 @@
 		method: 'post',
 		params:data
 	})
+}
+// 正射文件
+export const getOrthoimageInfo = jobId => {
+	return request({
+		url: '/drone-odm/odmTaskInfo/odmTaskInfo/getOrthoimageInfo',
+		method: 'get',
+		params: {
+			jobId,
+		  },
+	})
 }
\ No newline at end of file
diff --git a/src/components/map-container/mapContainer.vue b/src/components/map-container/mapContainer.vue
index ac4e60b..839228b 100644
--- a/src/components/map-container/mapContainer.vue
+++ b/src/components/map-container/mapContainer.vue
@@ -113,7 +113,7 @@
  * @param data 数据  数据格式 [[lng, lat], [lng, lat], [lng, lat]]
  */
 async function addPolyline (data) {
-    await renderPreviewLine(data.url, data.type, data.cb)
+    await renderPreviewLine(data.url, data.type, data.cb, data.infos)
 }
 
 onMounted(() => {
diff --git a/src/hooks/useRouteLine/useRouteLine.js b/src/hooks/useRouteLine/useRouteLine.js
index 3397ee7..01d0b57 100644
--- a/src/hooks/useRouteLine/useRouteLine.js
+++ b/src/hooks/useRouteLine/useRouteLine.js
@@ -33,6 +33,7 @@
 		execute_height_mode: '',
 		auto_flight_speed: '',
 		wayline_type: '',
+		infos: {}
 	})
 
 	const routeLineListClick = async data => {
@@ -42,7 +43,9 @@
 		await renderRouteLine(data.data)
 	}
 
-	async function renderPreviewLine (kmzUrl, wayline_type, cb = () => { }) {
+	async function renderPreviewLine (kmzUrl, wayline_type, cb = () => { }, infos = {}) {
+
+
 		resetCurRouteLineData()
 
 		const { pointPlacemark, polygonList, templateType, startPoint, execute_height_mode, auto_flight_speed } =
@@ -55,6 +58,7 @@
 			execute_height_mode,
 			auto_flight_speed,
 			wayline_type,
+			infos: infos
 		}
 
 		cb(curRouteLineData.value.polygonList.map(item => [Number(item[0]), Number(item[1])]))
@@ -130,8 +134,6 @@
 			})
 		}
 
-
-
 		let pointList = handlePointListForKmz({
 			placemark: data,
 			startPoint: curRouteLineData.value.startPoint,
@@ -141,6 +143,14 @@
 
 		pointList.shift()
 
+		if (JSON.stringify(curRouteLineData.value.infos) != '{}') {
+			pointList.unshift({
+				longitude: curRouteLineData.value.infos[0].longitude,
+				latitude: curRouteLineData.value.infos[0].latitude,
+				height: curRouteLineData.value.infos[0].height || 0,
+			})
+		}
+
 		const routePositions = pointList.map(i => Cesium.Cartesian3.fromDegrees(Number(i.longitude), Number(i.latitude), Number(i.height)))
 
 		previewDataSource.entities.add({
diff --git a/src/views/dataCenter/components/dataCenterMap.vue b/src/views/dataCenter/components/dataCenterMap.vue
index 80203e1..5bb09ed 100644
--- a/src/views/dataCenter/components/dataCenterMap.vue
+++ b/src/views/dataCenter/components/dataCenterMap.vue
@@ -89,8 +89,9 @@
 const restoreAllIcons = () => {
   dataPointEntities.value.forEach(entity => {
     if (entity.billboard) {
+    const status = entity?.properties?._customData?._value?.data.status
       entity.billboard.image =
-        props.dotData.resultType === 2 ? getEventImage(entity.status) : defaultIcon;
+        status === 1 ? defaultIcon  : getEventImage(item.status);
     }
   });
   activeEntity.value = null;
@@ -110,8 +111,10 @@
   // 恢复所有点的默认图标
   restoreAllIcons();
   if (currentClickEntity.billboard) {
+    const status = currentClickEntity?.properties?._customData?._value?.data.status
+    console.log('stayus',status);
     currentClickEntity.billboard.image =
-      props.dotData.resultType === 2 ? getEventImage(currentClickEntity.status) : activeIcon;
+      status === 1 ?activeIcon  : getEventActiveImage(status);
     currentClickEntity.billboard.scale = 1; // 可选缩放效果
     activeEntity.value = currentClickEntity;
   }
@@ -168,7 +171,7 @@
         pixelOffset: new Cesium.Cartesian2(0, 55),
       },
       billboard: {
-        image: props.dotData.resultType === 2 ? getEventImage(item.status) : defaultIcon, // 初始为默认图标
+        image: item.status === 1 ?defaultIcon  : getEventImage(item.status), // 初始为默认图标
         width: 40,
         height: 40,
         pixelOffset: new Cesium.Cartesian2(0, -15),
@@ -258,6 +261,8 @@
  * @param data 数据
  */
 const initEntityOrPopup = data => {
+console.log('data',data);
+
   //地图点在范围内
   watch(
     () => isMapInitialized.value,
diff --git a/src/views/dataCenter/components/searchData.vue b/src/views/dataCenter/components/searchData.vue
index ec23ee8..d0fe2f8 100644
--- a/src/views/dataCenter/components/searchData.vue
+++ b/src/views/dataCenter/components/searchData.vue
@@ -249,7 +249,6 @@
       ? dayjs(dateRange?.value[1]).endOf('day').format(timeFormat)
       : null,
   };
-  console.log('searchForm', params);
   // 调用父组件方法
   emit('search', params);
 };
diff --git a/src/views/dataCenter/dataCenter.vue b/src/views/dataCenter/dataCenter.vue
index 2991ab9..86128c1 100644
--- a/src/views/dataCenter/dataCenter.vue
+++ b/src/views/dataCenter/dataCenter.vue
@@ -74,7 +74,7 @@
             <span
               class="location"
               @click="positionDetail(scope.row)"
-              v-if="scope.row.resultType !== 1"
+              v-if="scope.row.resultType !== 1 && !isTifFile(scope.row.nickName)" 
               >定位</span
             >
           </template>
@@ -98,8 +98,7 @@
     <el-dialog v-model="dialogVisible" width="60%" append-to-body>
       <template #header="{ titleId, titleClass }">
         <div class="my-header">
-          <h4 :id="titleId" :class="titleClass">{{ detailTitle}}</h4>
-         
+          <h4 :id="titleId" :class="titleClass">{{ detailTitle }}</h4>
         </div>
       </template>
       <div class="detailContainer">
@@ -115,7 +114,7 @@
         <div class="rightDetail">
           <div class="title">
             <div class="inputEdit">
-              文件名称:<span class="fileTitle"  v-if="!dialogDetailList?.checkedinput">{{
+              文件名称:<span class="fileTitle" v-if="!dialogDetailList?.checkedinput">{{
                 dialogDetailList?.nickName
               }}</span>
               <el-input
@@ -126,7 +125,7 @@
                 clearable
               />
             </div>
-            <div class="editname" >
+            <div class="editname">
               <span v-if="!dialogDetailList?.checkedinput" @click="editTitle(dialogDetailList)"
                 ><el-icon><Edit /></el-icon
               ></span>
@@ -149,13 +148,15 @@
           <div>文件类型:{{ photoTypeMap[dialogDetailList?.photoType] }}</div>
           <div>文件格式:{{ resultTypeMap[dialogDetailList?.resultType] }}</div>
           <div>照片文件大小:{{ dialogDetailList?.attachSize }}</div>
-          <div> <el-button
-            type="success"
-            plain
-            icon="el-icon-download"
-            @click="detailDownLoad(dialogDetailList)"
-            >下载</el-button
-          ></div>
+          <div>
+            <el-button
+              type="success"
+              plain
+              icon="el-icon-download"
+              @click="detailDownLoad(dialogDetailList)"
+              >下载</el-button
+            >
+          </div>
         </div>
       </div>
     </el-dialog>
@@ -191,7 +192,6 @@
       ref="mapComponent"
       v-model:show="dataCenterMapVisible"
       :jobId="jobId"
-     
       @lookDetail="lookDetail"
       :dotData="mapList"
     ></dataCenterMap>
@@ -212,6 +212,7 @@
   deleteFileMultipleApi,
   downloadApi,
   updataTitleApi,
+  getOrthoimageInfo
 } from '@/api/dataCenter/dataCenter';
 import { getShowImg, getSmallImg } from '@/utils/util';
 import { onMounted, watch } from 'vue';
@@ -238,7 +239,7 @@
   ir: '红外',
 };
 const loadings = ref(true);
-let loading
+let loading;
 const total = ref(0);
 const startTime = dayjs().subtract(6, 'day').startOf('day');
 const endTime = dayjs().endOf('day');
@@ -269,14 +270,13 @@
 
 // 获取列表数据
 const getaiImagesPage = () => {
-loadings.value = true;
+  loadings.value = true;
   const params = {
     orderByCreateTime: jobListParams.orderByCreateTime,
     ...jobListParams.searchParams,
   };
   getaiImagesPageAPI(params, { current: jobListParams.current, size: jobListParams.size }).then(
     res => {
-      
       total.value = res.data.data.total;
       tableData.value = res.data.data.records.map(i => ({
         ...i,
@@ -328,7 +328,7 @@
         .then(res => {
           ElMessage.success('删除成功');
           getaiImagesPage();
-        }) 
+        })
         .catch(error => {
           ElMessage.error('删除失败');
         });
@@ -355,9 +355,8 @@
       }, index * 500); // 每个文件下载间隔50毫秒
     });
   } else {
-    loading = ElLoading.service({ background: 'rgba(0, 0, 0, 0.5)', text: '打包中,请稍等...' })
-    const fileIds = list.map(i =>i.id);
-    console.log('fileIds', fileIds, list);
+    loading = ElLoading.service({ background: 'rgba(0, 0, 0, 0.5)', text: '打包中,请稍等...' });
+    const fileIds = list.map(i => i.id);
     let aaa = {
       areaCode: '',
       attachIds: fileIds,
@@ -372,9 +371,8 @@
     };
 
     downloadApi(aaa).then(res => {
-      console.log('res.data.data', res.data.data);
       aLinkDownload(res.data.data, `sjzx-file-pack-${dayjs().format('YYYYMMDDHHmmss')}.zip`);
-      loading.close()
+      loading.close();
     });
   }
 };
@@ -387,29 +385,45 @@
 };
 // 全部下载
 const aLLDownloadFile = () => {
- 
-   const params = {
+  const params = {
     ...jobListParams.searchParams,
   };
-  // console.log('params',params);
-  
-    downloadApi(params).then(res => {
-      // console.log('res.data.data', res.data.data);
-      aLinkDownload(res.data.data, `sjzx-file-pack-${dayjs().format('YYYYMMDDHHmmss')}.zip`);
-     
-    });
-   
+  downloadApi(params).then(res => {
+    aLinkDownload(res.data.data, `sjzx-file-pack-${dayjs().format('YYYYMMDDHHmmss')}.zip`);
+  });
 };
 // 查看弹框
+
+
+function isTifFile(filename) {
+  const lastDot = filename.lastIndexOf('.');
+  if (lastDot === -1) return false; // 无后缀
+  return filename.slice(lastDot + 1).toLowerCase() === 'tif';
+}
+// 接口
+const getOrthoimageInfoFUN =()=>{
+
+}
+
 const dialogVisible = ref(false);
 const dialogDetailList = ref(null);
-const detailTitle = ref('')
+const detailTitle = ref('');
 const lookDetail = val => {
-  getAttachInfoAPI(val.id).then(res => {
-  detailTitle.value =  res.data.data.nickName
+console.log('查看',val.resultType);
+// if(val.resultType === 4){ // 正射
+//   getOrthoimageInfo(val.id).then(res=>{
+//     console.log('正射',res.data.data);
+//      dialogDetailList.value = res.data.data;
+//   })
+// }else{
+ getAttachInfoAPI(val.id).then(res => {
+    detailTitle.value = res.data.data.nickName;  
     dialogDetailList.value = res.data.data;
     dialogDetailList.value = { ...res.data.data, checkedinput: false };
+      // console.log('detailTitle.value',dialogDetailList.value);
   });
+// }
+ 
   dialogVisible.value = true;
 };
 
@@ -448,7 +462,7 @@
   // 验证并提示
   if (!validateNickname(updateparams.nickName, '名称')) return;
   item.checkedinput = false;
-  detailTitle.value = item.nickName
+  detailTitle.value = item.nickName;
   updataTitleApi(updateparams)
     .then(res => {
       if (res.status === 200) {
@@ -464,23 +478,20 @@
 };
 
 // 地图弹框
-const mapComponent = ref(null);// 创建子组件引用
+const mapComponent = ref(null); // 创建子组件引用
 const mapList = ref(null);
 const dataCenterMapVisible = ref(false);
 const jobId = ref('');
-const statusType = ref(null)
+const statusType = ref(null);
 const positionDetail = val => {
-// console.log('地图',val);
-
   jobId.value = val.wayLineJobId;
-  // console.log('statusType.value',statusType.value);
   mapList.value = val;
   dataCenterMapVisible.value = true;
   // 确保地图组件加载完成
   nextTick(() => {
     if (mapComponent.value) {
       // 调用子组件方法并传递数据
-      mapComponent.value.initEntityOrPopup(val)
+      mapComponent.value.initEntityOrPopup(val);
     }
   });
 };
@@ -489,7 +500,6 @@
   getaiImagesPage();
   // 监听打开全景事件
   EventBus.on('open-panorama', params => {
-    // console.log('收到全景事件:', params);
     panoramaParamsShow.value = params.show;
     panoramaParamsUrl.value = params.url;
   });
@@ -498,7 +508,6 @@
   // 组件卸载时移除事件监听,防止内存泄漏
   EventBus.off('open-panorama');
 });
-
 </script>
 
 <style scoped lang="scss">
@@ -580,12 +589,12 @@
         display: flex;
         align-items: center;
         width: 100%;
-     .fileTitle{
-     width: 70%;
-     white-space: nowrap;
-     overflow: hidden;
-    text-overflow: ellipsis;
-     }
+        .fileTitle {
+          width: 70%;
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
+        }
       }
     }
     div {
@@ -596,7 +605,6 @@
 .my-header :deep(.el-dialog__title) {
   margin: 0 !important;
   height: 19px;
- 
 }
 .my-header {
   display: flex;
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 66ea5ae..a5adc5c 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -1056,7 +1056,7 @@
       this.initMapLine()
     },
 
-    initMapLine (cb = () => { }) {
+    initMapLine (infos = {}, cb = () => { }) {
       let currentLine = this.wayLineList.find(item => item.wayline_id == this.form.file_id)
 
       if (!currentLine) return
@@ -1066,7 +1066,8 @@
           this.$refs.MapContainer.initAddEntity('polyline', {
             url: `${import.meta.env.VITE_APP_AIRLINE_URL + currentLine.object_key}?_t=${new Date().getTime()}`,
             type: currentLine.wayline_type,
-            cb
+            cb,
+            infos
           })
         }
       })
@@ -1078,7 +1079,7 @@
 
       that.device_sns = []
 
-      this.initMapLine(async (polygon) => {
+      this.initMapLine({}, async (polygon) => {
         const currentLine = that.wayLineList.find(item => item.wayline_id === waylineId)
 
         //按照航线来

--
Gitblit v1.9.3