345
wangjuncheng
昨天 770dae03ffe931e4c2dfc1860b60c058cc5ed149
345
已修改4个文件
33 ■■■■■ 文件已修改
src/api/trApi.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/menu/TimeLine.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tools/LayerTree.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/water.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/trApi.js
@@ -164,7 +164,7 @@
    const response = await fetch(url); // 发起请求  
    // console.log(url,'aaaaaaaaa')
    console.log(url,'aaaaaaaaa')
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
src/components/menu/TimeLine.vue
@@ -1135,24 +1135,23 @@
  if (selectedScheme.value.type === 2) {
    try {
      await ElMessageBox.confirm("方案未停止时结束模拟后,后台将停止计算", {
        confirmButtonText: "结束模拟",
        cancelButtonText: "返回列表",
        confirmButtonText: "返回列表",
        cancelButtonText: "结束模拟",
        type: "warning",
      });
      const res = await stopSim(selectedScheme.value.id);
      // 用户点击了确认,这里不执行任何操作,仅关闭对话框
    } catch (error) {
      stopSim(selectedScheme.value.id).then((res) => {
      if (res.code == 404) {
        ElMessage.warning("该服务已停止");
      } else {
        ElMessage.success("服务正在停止中");
      }
    } catch (error) {
      // 用户点击了【返回列表】或者出现错误
      });
      // return;
    }
  }
  // 不管 type 是不是 2,最终都执行结束模拟操作
  // 不管type是不是2,最终都执行结束模拟的操作
  endSimulation();
}
src/components/tools/LayerTree.vue
@@ -366,6 +366,14 @@
 function handleCheckChange(data, checked) {
  const label = data.label;
  // 如果是父节点(地区节点),处理所有子节点
  if (data.children && data.children.length > 0) {
    data.children.forEach(child => {
      handleCheckChange(child, checked); // 递归处理子节点
    });
    return;
  }
  // 地形数据处理
  if (label === "地形数据") {
    handleTerrainLayer(checked);
@@ -539,8 +547,8 @@
function handleModelLayer(checked) {
  if (checked) {
    addTileset(
      // "http://106.120.22.26:9103/gisserver/c3dserver/sunhugou3d/tileset.json"
      "http://192.168.37.61:9004/tile/model/service/Iakp0nhx/tileset.json?labtoken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiItMSxUaHUgQXByIDE4IDE1OjMwOjU3IENTVCAyMDI0In0.j_YKsCRsIQtpgOWfFvMwAP65Rlx9uXyVte_xkE95Vdo"
      "http://106.120.22.26:9103/gisserver/c3dserver/sunhugou3d/tileset.json"
      // "http://192.168.37.61:9004/tile/model/service/Iakp0nhx/tileset.json?labtoken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiItMSxUaHUgQXByIDE4IDE1OjMwOjU3IENTVCAyMDI0In0.j_YKsCRsIQtpgOWfFvMwAP65Rlx9uXyVte_xkE95Vdo"
    )
      .then((model) => {
        treeMap.set("模型数据", model);
src/utils/water.js
@@ -85,7 +85,7 @@
    color: SmartEarth.Cesium.Color.fromCssColorString("#D4F2E7"),
    loop: false,
    callback: timeCallback,
    alphaByDepth: 0.5,
    alphaByDepth: 0.0,
    waterHeightLevels,
    colorRender,
    sizeIndex: 0,
@@ -129,7 +129,7 @@
export function updateWaterColor(color, alpha) {
  if (water) {
    water.color = Cesium.Color.fromCssColorString(color);
    water.alphaByDepth = alpha;
    water.alphaByDepth = 0;
  } else {
    console.warn("No water simulation to pause.");
  }