无人机管理后台前端(已迁走)
张含笑
2025-06-16 f03b3fbc36f39cdfb2c3c30cd967948ab4abab3e
src/views/dataCenter/dataCenter.vue
@@ -35,7 +35,7 @@
              class="quanjing"
              @click="clickpanorama(scope.row)"
              v-if="scope.row?.resultType === 5"
              :src="scope.row?.link"
              :src="scope.row?.smallUrl"
              alt=""
            />
            <img
@@ -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
@@ -384,23 +389,48 @@
};
// 全部下载
const aLLDownloadFile = () => {
    loading = ElLoading.service({ background: 'rgba(0, 0, 0, 0.5)', text: '打包中,请稍等...' });
  const params = {
    ...jobListParams.searchParams,
  };
  downloadApi(params).then(res => {
    aLinkDownload(res.data.data, `sjzx-file-pack-${dayjs().format('YYYYMMDDHHmmss')}.zip`);
     loading.close();
  });
};
// 查看弹框
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;
};