无人机管理后台前端(已迁走)
张含笑
2025-06-14 3d9e149b3e42cb68efeffc695a1858b6c58de1dd
feat:正射不显示定位
4 files modified
31 ■■■■ changed files
src/api/dataCenter/dataCenter.js 8 ●●●●● patch | view | raw | blame | history
src/views/dataCenter/components/dataCenterMap.vue 11 ●●●● patch | view | raw | blame | history
src/views/dataCenter/components/searchData.vue 1 ●●●● patch | view | raw | blame | history
src/views/dataCenter/dataCenter.vue 11 ●●●●● patch | view | raw | blame | history
src/api/dataCenter/dataCenter.js
@@ -53,4 +53,12 @@
        method: 'post',
        params:data
    })
}
// 正射文件
export const getOrthoimageInfo = params => {
    return request({
        url: '/drone-odm/odmTaskInfo/odmTaskInfo/getOrthoimageInfo',
        method: 'get',
        params,
    })
}
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,
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);
};
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>
@@ -392,6 +392,15 @@
  });
};
// 查看弹框
// 正射
const a ='odm_orthophoto.tif..tif'
function isTifFile(filename) {
  const lastDot = filename.lastIndexOf('.');
  if (lastDot === -1) return false; // 无后缀
  return filename.slice(lastDot + 1).toLowerCase() === 'tif';
}
console.log('1',isTifFile(a));
const dialogVisible = ref(false);
const dialogDetailList = ref(null);
const detailTitle = ref('');