无人机管理后台前端(已迁走)
张含笑
2025-06-14 4dcdb83514596334f5ab7140cbe708a0aba941a8
Merge branch 'refs/heads/feature/v2.0.0/后台管理数据中心'
4 files modified
132 ■■■■■ changed files
src/api/dataCenter/dataCenter.js 10 ●●●●● 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 110 ●●●● patch | view | raw | blame | history
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,
          },
    })
}
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>
@@ -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;