无人机管理后台前端(已迁走)
张含笑
2025-06-14 e68dd2f8f92089a302f1aa5e37ab5ac5a16dac4e
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>
@@ -147,7 +147,7 @@
          <div>拍摄时间:{{ dialogDetailList?.createTime }}</div>
          <div>文件类型:{{ photoTypeMap[dialogDetailList?.photoType] }}</div>
          <div>文件格式:{{ resultTypeMap[dialogDetailList?.resultType] }}</div>
          <div>照片文件大小:{{ dialogDetailList?.attachSize }}</div>
          <div>照片文件大小:{{bytesToMB(dialogDetailList?.attachSize)  }}</div>
          <div>
            <el-button
              type="success"
@@ -212,10 +212,15 @@
  deleteFileMultipleApi,
  downloadApi,
  updataTitleApi,
  getOrthoimageInfo
} from '@/api/dataCenter/dataCenter';
import { getShowImg, getSmallImg } from '@/utils/util';
import { onMounted, watch } from 'vue';
import dayjs from 'dayjs';
function bytesToMB(bytes, decimalPlaces = 2) {
  if (typeof bytes !== 'number' || bytes < 0) return '无效输入';
  return (bytes / 1048576).toFixed(decimalPlaces) + ' MB';
}
// 视频一帧
function convertVideoUrlToThumbnail(videoUrl) {
  // 检查是否是有效的视频URL
@@ -392,15 +397,37 @@
  });
};
// 查看弹框
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 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;
};