燕山石化溯源三维电子沙盘-【前端】-Web
WX
2023-08-11 b4494b8196c25917f5b5cf8e9e1228db5c8be2f3
风场功能完善
已修改2个文件
64 ■■■■ 文件已修改
src/assets/js/menuTool.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/dateTimePicker.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/menuTool.js
@@ -56,23 +56,19 @@
        break;
      case "d21": //全场风场模拟
        this.createFC("fc", "", {
          start: "",
          end: "",
          Classify: "Main",
        });
        this.createFC("fc", "");
        break;
      case "d22": //西部风场模拟
        this.createFC("fc", "", {
          start: "",
          end: "",
          start: 0,
          end: 30,
          Classify: "West",
        });
        break;
      case "d23": //东部风场模拟
        this.createFC("fc", "", {
          start: "",
          end: "",
          start: 0,
          end: 30,
          Classify: "East",
        });
        break;
@@ -158,6 +154,15 @@
        this.delWRW();
        break;
      case "d2": //风场模拟清除
        this.delFC();
        break;
      case "d21": //风场模拟清除
        this.delFC();
        break;
      case "d22": //风场模拟清除
        this.delFC();
        break;
      case "d23": //风场模拟清除
        this.delFC();
        break;
      case "d3": //污染物模拟清除
@@ -313,9 +318,15 @@
  },
  //风场模拟
  createFC(type, date, data) {
    let config = data || {
      start: 1,
      end: 30,
      Classify: "Main",
    };
    if (type == "fc") {
      sgworld.Core.postMessage(
        `Type=shunxuwinds;Bool=true;Density=${FC.Density};Speed=${FC.Speed};StartLayer=${data.start};EndLayer=${data.end};Classify=${data.Classify};`
        `Type=shunxuwinds;Bool=true;Density=${FC.Density};Speed=${FC.Speed};StartLayer=${config.start};EndLayer=${config.end};Classify=${config.Classify};`
      );
    } else if (type == "sj") {
      let arr = date.split(/\s+/);
src/components/dateTimePicker.vue
@@ -91,12 +91,12 @@
      value: "",
      fetch: "",
      start: 0,
      end: 0,
      end: 30,
    });
    let btnState = false;
    let CS = {
      start: "",
      end: "",
      start: 0,
      end: 30,
      Classify: "",
    };
    const selectBtn = () => {
@@ -130,10 +130,13 @@
        }
        emit("changeTime", { data: newTimeStr, week: week });
        if (props.tpData == "d2") {
          if (!btnState) {
            return ElMessage.error("请先选择风区");
          }
        if (props.tpData == "d21") {
          menuTool.createFC("sj", newTimeStr);
        } else if (props.tpData == "d22") {
          CS.Classify = "West";
          menuTool.createFC("sj", newTimeStr, CS);
        } else if (props.tpData == "d23") {
          CS.Classify = "East";
          menuTool.createFC("sj", newTimeStr, CS);
        } else {
          menuTool.createWRW("sj", newTimeStr);
@@ -141,7 +144,6 @@
      }
    };
    function FQselectBtn() {
      btnState = true;
      selectform.value = "";
      CS.start = selectform.start;
      CS.end = selectform.end;
@@ -150,7 +152,13 @@
        CS.start = selectform.end;
        CS.end = selectform.start;
      }
      menuTool.createFC("fc", "", CS);
      if (props.tpData == "d22") {
        CS.Classify = "West";
        menuTool.createFC("fc", "", CS);
      } else if (props.tpData == "d23") {
        CS.Classify = "East";
        menuTool.createFC("fc", "", CS);
      }
    }
    function changeTime() {}
    return {
@@ -213,6 +221,13 @@
        color: #ffffff;
        padding-right: 10px;
      }
      i {
        font-size: 24px;
        font-weight: 400;
        color: #ffffff;
        padding-right: 10px;
        padding-left: 10px;
      }
      :deep(.el-date-editor) {
        height: 64px;
      }