4ccb3c1af05a64749b2aaba0129c72ce79c8aa42..263bf9730455a7bcc4fdc6471f8f9d0c96e47c9e
9 天以前 wangjuncheng
添加经纬度高度
263bf9 对比 | 目录
9 天以前 wangjuncheng
7631
4dc0f8 对比 | 目录
已修改5个文件
74 ■■■■ 文件已修改
src/components/monifangzhen/WaterDepthContent.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/left/CitySim.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/left/KGSim.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/left/KGSimOption/PredictiveSimulation.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/left/KGSimOption/RealTimeSimulation.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/monifangzhen/WaterDepthContent.vue
@@ -237,7 +237,7 @@
  localLoading.value = true;
  return getFlowRate(params).then(data => {
    // console.log('获取到的数据:', data);
    console.log('获取到的数据:', data);
    if (data && data.code === 200) {
      return data.data; // 返回原始数据数组
    } else {
src/views/left/CitySim.vue
@@ -196,7 +196,7 @@
    }
    await simStore.addSimCheme(forms);
    // 打印拦挡坝所需要的数据
    // printDamEntities();
    printDamEntities();
    resetForm(); // 只有在保存成功后才重置表单
    EventBus.emit("close-selectArea");
  } catch (error) { }
@@ -655,9 +655,26 @@
    const entity = entities[i];
    if (entity.name && (entity.name === '栏档坝1' || entity.name === '栏档坝2')) {
      let position = entity.position?._value;
      // 如果有位置信息,就将其从笛卡尔坐标转为经纬度和高度
      let cartographic = undefined;
      if (position) {
        cartographic = Cesium.Cartographic.fromCartesian(position);
      }
      damDataList.push({
        name: entity.name,
        position: entity.position?._value,
        position: position ? {
          x: position.x,
          y: position.y,
          z: position.z
        } : null,
        cartographic: cartographic ? {
          longitude: Cesium.Math.toDegrees(cartographic.longitude), // 经度(度)
          latitude:  Cesium.Math.toDegrees(cartographic.latitude),  // 纬度(度)
          height:    cartographic.height                           // 高度(米)
        } : null,
        heading: entity.heading?._value ?? entity.heading,
        pitch: entity.pitch?._value ?? entity.pitch,
        roll: entity.roll?._value ?? entity.roll,
@@ -665,6 +682,7 @@
      });
    }
  }
  if (damDataList.length > 0) {
    console.log("【栏档坝实体数据列表】:", damDataList);
    deleteDamEntitiesAfterDelay();
src/views/left/KGSim.vue
@@ -13,10 +13,10 @@
    <div class="engineering-buttons">
      <p>治理工程标绘</p>
      <el-button type="primary" @click="toggleDitch">
        {{ ditchingActive ? "关闭开沟" : "开启开沟" }}
        {{ ditchingActive ? "关闭土方开挖" : "开启土方开挖" }}
      </el-button>
      <el-button type="primary" @click="toggleDam">
        {{ damActive ? "关闭加坝" : "开启加坝" }}
        {{ damActive ? "关闭增加拦挡坝" : "开启增加拦挡坝" }}
        </el-button>
    </div>
@@ -162,7 +162,7 @@
.engineering-buttons {
  .el-button {
    width: 100px;
    width: 48%;
  }
}
src/views/left/KGSimOption/PredictiveSimulation.vue
@@ -254,11 +254,11 @@
// 打开保存方案对话框
const openSaveDialog = async () => {
  // 在 setup 内部更新 geom 的值
  printDamEntities();
  try {
    forms.geom = props.selectedArea;
    await simStore.addSimCheme(forms);
    // 打印拦挡坝所需要的数据
    // printDamEntities();
    resetForm();
    EventBus.emit("close-selectArea");
  } catch (err) {}
@@ -316,9 +316,26 @@
    const entity = entities[i];
    if (entity.name && (entity.name === '栏档坝1' || entity.name === '栏档坝2')) {
      let position = entity.position?._value;
      // 如果有位置信息,就将其从笛卡尔坐标转为经纬度和高度
      let cartographic = undefined;
      if (position) {
        cartographic = Cesium.Cartographic.fromCartesian(position);
      }
      damDataList.push({
        name: entity.name,
        position: entity.position?._value,
        position: position ? {
          x: position.x,
          y: position.y,
          z: position.z
        } : null,
        cartographic: cartographic ? {
          longitude: Cesium.Math.toDegrees(cartographic.longitude), // 经度(度)
          latitude:  Cesium.Math.toDegrees(cartographic.latitude),  // 纬度(度)
          height:    cartographic.height                           // 高度(米)
        } : null,
        heading: entity.heading?._value ?? entity.heading,
        pitch: entity.pitch?._value ?? entity.pitch,
        roll: entity.roll?._value ?? entity.roll,
@@ -326,6 +343,7 @@
      });
    }
  }
  if (damDataList.length > 0) {
    console.log("【栏档坝实体数据列表】:", damDataList);
    deleteDamEntitiesAfterDelay();
src/views/left/KGSimOption/RealTimeSimulation.vue
@@ -211,7 +211,7 @@
    formData.geom = props.selectedArea;
    await simAPIStore.addSimCheme(formData);
    // 打印拦挡坝所需要的数据
    // printDamEntities();
    printDamEntities();
    resetForm();
    EventBus.emit("close-selectArea");
  } catch (err) {}
@@ -416,9 +416,26 @@
    const entity = entities[i];
    if (entity.name && (entity.name === '栏档坝1' || entity.name === '栏档坝2')) {
      let position = entity.position?._value;
      // 如果有位置信息,就将其从笛卡尔坐标转为经纬度和高度
      let cartographic = undefined;
      if (position) {
        cartographic = Cesium.Cartographic.fromCartesian(position);
      }
      damDataList.push({
        name: entity.name,
        position: entity.position?._value,
        position: position ? {
          x: position.x,
          y: position.y,
          z: position.z
        } : null,
        cartographic: cartographic ? {
          longitude: Cesium.Math.toDegrees(cartographic.longitude), // 经度(度)
          latitude:  Cesium.Math.toDegrees(cartographic.latitude),  // 纬度(度)
          height:    cartographic.height                           // 高度(米)
        } : null,
        heading: entity.heading?._value ?? entity.heading,
        pitch: entity.pitch?._value ?? entity.pitch,
        roll: entity.roll?._value ?? entity.roll,
@@ -426,6 +443,7 @@
      });
    }
  }
  if (damDataList.length > 0) {
    console.log("【栏档坝实体数据列表】:", damDataList);
    deleteDamEntitiesAfterDelay();