wangjuncheng
2025-04-20 d8a0684a057df926c788525575eecdddde977133
src/views/mnfz.vue
@@ -49,7 +49,8 @@
  waterSimulateParams.value = form;
}
function endSimulate() {
  // showDebuffDetail.value = true
  showDebuffDetail.value = false
  clearTrailLine();
  removeDataSources();
  setTimeout(() => {
    showWaterSimulate.value = false;
@@ -67,8 +68,8 @@
      // 设置样式,将颜色改为红色
      dataSource.entities.values.forEach((entity) => {
        entity.polygon.material = new Cesium.Color(1.0, 0.0, 0.0, 0.6); // 红色,80% 不透明度
        entity.polygon.outlineColor = Cesium.Color.YELLOW; // 设置轮廓颜色为红色(如果需要)
        entity.polygon.outline = true; // 显示轮廓(如果需要)
        entity.polygon.outlineColor = Cesium.Color.YELLOW;
        entity.polygon.outline = true;
      });
      // 添加数据源到 viewer
@@ -156,6 +157,19 @@
  );
  TrailLine.push(_TrailLine);
}
// 清除轨迹线对象
function clearTrailLine() {
  TrailLine.forEach((item, index) => {
    if (item && typeof item.deleteObject === 'function') {
      item.deleteObject();
    } else if (item && typeof item.clear === 'function') {
      item.clear();
    } else if (item && earthCtrl && earthCtrl.coreMap) {
      earthCtrl.coreMap.entities.remove(item);
    }
  });
  TrailLine = [];
}
// function showLine() {
//   earthCtrl.factory.createSimpleGraphic(
//     "polyline",