燕山石化溯源三维电子沙盘-【前端】-Web
WX
2023-09-06 8f8419c816dd9837e8a3264fc480abf928bbc93e
src/assets/js/menuTool.js
@@ -43,7 +43,12 @@
          heading: -90,
        });
        break;
      case "b4": //污染物扩散趋势
        window.sgworld.Core.postMessage({ TypeG1: "Start" });
        window.sgworld.Navigate.flyToPosition(115.95108, 39.7411754, 7200, {
          heading: -90,
        });
        break;
      case "c2": //预警信息
        break;
      case "c3": //报警信息
@@ -130,6 +135,9 @@
        break;
      case "b3": //污染物扩散趋势清除
        window.sgworld.Core.postMessage({ TypeG1: "Delete" });
        break;
      case "b4": //污染物扩散趋势清除
        window.sgworld.Core.postMessage({ TypeG1: "End" });
        break;
      case "c1": //预警信息清除报警信息清除
        this.closePoi();
@@ -230,7 +238,7 @@
    this.closePoi();
    this.YJlist.forEach((e) => {
      let ids = window.sgworld.Core.createRandomId();
      this.createPoi(e, "img/yjd.png", ids, "locationName", "WY", -25);
      this.createPoi(e, "img/yjd.png", ids, "name", "WY", -25);
      this.YJpoi.push(ids);
    });
  },
@@ -239,7 +247,7 @@
    this.closePoi();
    this.BJlist.forEach((e) => {
      let ids = window.sgworld.Core.createRandomId();
      this.createPoi(e, "img/bjd.png", ids, "locationName", "WY", -25);
      this.createPoi(e, "img/bjd.png", ids, "name", "WY", -25);
      this.BJpoi.push(ids);
    });
  },
@@ -372,6 +380,9 @@
      sgworld.Core.postMessage(
        `Type=wuranwu;Bool=true;Type2=zidingyi;Yearstart=${day[0]};Mouthstart=${day[1]};Daystart=${day[2]};Hourend=${Hour};Alpha=0.03;Speed=0.5;`
      );
      // console.log(
      //   `Type=wuranwu;Bool=true;Type2=zidingyi;Yearstart=${day[0]};Mouthstart=${day[1]};Daystart=${day[2]};Hourend=${Hour};Alpha=0.03;Speed=0.5;`
      // );
    }
  },
  async bjthis(time) {
@@ -381,9 +392,7 @@
    var obj = {};
    this.BJlist = dt.result.reduce(function (item, next) {
      obj[next.locationName]
        ? ""
        : (obj[next.locationName] = true && item.push(next));
      obj[next.name] ? "" : (obj[next.name] = true && item.push(next));
      return item;
    }, []);
@@ -402,12 +411,9 @@
    // });
    var obj = {};
    this.YJlist = dt1.result.reduce(function (item, next) {
      obj[next.locationName]
        ? ""
        : (obj[next.locationName] = true && item.push(next));
      obj[next.name] ? "" : (obj[next.name] = true && item.push(next));
      return item;
    }, []);
    // this.YJtext = `${this.YJlist.length}条预警信息`;
    store.commit("getYJtext", this.YJlist);
    this.createYJpoi();