北京经济技术开发区经开区虚拟城市项目-【前端】-Web
Jin Lei
2023-11-16 deccf053a8e07b82f4cd8b95b3243f4c5f1d2b86
src/components/menu/tools/special.vue
@@ -2,52 +2,28 @@
  <div class="special" id="special">
    <div class="specialTools">
      <div class="specialTool" @click="tdglHandle">
        <el-tooltip
          class="item"
          effect="dark"
          content="土地管理"
          placement="top-start"
          popper-class="item_tooltip"
        >
        <el-tooltip class="item" effect="dark" content="土地管理" placement="top-start" popper-class="item_tooltip">
          <el-button>
            <img src="@/assets/img/left/ztfx/tdgl.png" />
          </el-button>
        </el-tooltip>
      </div>
      <div class="specialTool" @click="stdsj">
        <el-tooltip
          class="item"
          effect="dark"
          content="视图大数据平台"
          placement="top-start"
          popper-class="item_tooltip"
        >
        <el-tooltip class="item" effect="dark" content="视图大数据平台" placement="top-start" popper-class="item_tooltip">
          <el-button>
            <img src="@/assets/img/left/ztfx/dashuju.png" />
          </el-button>
        </el-tooltip>
      </div>
      <div class="specialTool" @click="spjkHandle">
        <el-tooltip
          class="item"
          effect="dark"
          content="视频监控"
          placement="top-start"
          popper-class="item_tooltip"
        >
        <el-tooltip class="item" effect="dark" content="视频监控" placement="top-start" popper-class="item_tooltip">
          <el-button>
            <img src="@/assets/img/left/ztfx/spjk.png" />
          </el-button>
        </el-tooltip>
      </div>
      <div class="specialTool" @click="jjHandle">
        <el-tooltip
          class="item"
          effect="dark"
          content="街景"
          placement="top-start"
          popper-class="item_tooltip"
        >
        <el-tooltip class="item" effect="dark" content="街景" placement="top-start" popper-class="item_tooltip">
          <el-button>
            <img src="@/assets/img/left/ztfx/jiejing.png" />
          </el-button>
@@ -55,26 +31,12 @@
      </div>
      <div class="specialTool" @click="qytj">
        <el-tooltip
          class="item"
          effect="dark"
          content="数据汇聚"
          placement="top-start"
          popper-class="item_tooltip"
        >
          <el-button> <img src="@/assets/img/left/ztfx/yqfk.png" /> </el-button
        ></el-tooltip>
        <el-tooltip class="item" effect="dark" content="数据汇聚" placement="top-start" popper-class="item_tooltip">
          <el-button> <img src="@/assets/img/left/ztfx/yqfk.png" /> </el-button></el-tooltip>
      </div>
      <div class="specialTool" @click="rangeQuery()">
        <el-tooltip
          class="item"
          effect="dark"
          content="范围查询"
          placement="top-start"
          popper-class="item_tooltip"
        >
          <el-button> <img src="@/assets/img/left/ztfx/sjxq.png" /> </el-button
        ></el-tooltip>
        <el-tooltip class="item" effect="dark" content="范围查询" placement="top-start" popper-class="item_tooltip">
          <el-button> <img src="@/assets/img/left/ztfx/sjxq.png" /> </el-button></el-tooltip>
      </div>
      <!-- <div class="specialTool" @click="guanxian(openGX)">
        <el-tooltip
@@ -121,10 +83,12 @@
  width: 111%;
  margin-left: -15px;
}
.el-button:focus,
.el-button:hover {
  background: transparent;
}
.special {
  position: absolute;
  left: 65px;
@@ -135,9 +99,11 @@
  background-color: rgba(14, 50, 143, 0.5);
  width: 350px;
}
.specialTools {
  margin-left: 20px;
}
.specialTool {
  border: 1px solid #999;
  border-radius: 5px;
@@ -146,9 +112,11 @@
  height: 40px;
  margin: 5px;
}
.specialTool img {
  margin: 4px;
}
.specialTools::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 5px;
@@ -173,6 +141,7 @@
  border-radius: 0;
  background: rgba(218, 218, 218, 0.1);
}
.specialTool:hover {
  background: rgba(0, 168, 255, 0.16);
}
@@ -180,9 +149,11 @@
.tool-title {
  margin: 1px 10px;
}
.tool-title label {
  vertical-align: top;
}
.special label {
  margin-left: 10px;
  font-size: 17px;
@@ -191,6 +162,7 @@
  /* color: #3d3d3d; */
  color: white;
}
.el-button {
  padding: 0 !important;
  font-size: 24px;
@@ -199,14 +171,17 @@
  display: block;
  background: rgba(0, 0, 0, 0);
}
.el-button label {
  font-size: 14px;
}
.closeTool {
  position: absolute;
  bottom: 0;
  left: 0;
}
.active {
  background: rgba(0, 168, 255, 0.16);
}
@@ -343,7 +318,7 @@
    ...mapState(["viewer1Show", "yqfk", "cesiumInit"]),
    ...mapState(["viewer1Show", "yqfk", "qyEchartsShow"]),
  },
  mounted() {},
  mounted() { },
  watch: {
    cesiumInit: {
      handler(newVal, oldVal) {
@@ -418,7 +393,7 @@
              sgworld.drawObj &&
                (sgworld.drawObj.drawHandler &&
                  sgworld.drawObj.drawHandler.destroy(),
                sgworld.drawObj.end && sgworld.drawObj.end());
                  sgworld.drawObj.end && sgworld.drawObj.end());
              let props = pick.id.properties;
              let screenHeight =
@@ -497,7 +472,7 @@
          {},
          "0",
          true,
          function () {}
          function () { }
        );
        window.panoramaHandler = new Cesium.ScreenSpaceEventHandler(
          Viewer.scene.canvas
@@ -523,7 +498,7 @@
      } else {
        try {
          window.panoramaLayer.deleteObject();
        } catch (e) {}
        } catch (e) { }
        window.panoramaHandler.destroy();
        window.panoramaHandler = undefined;
      }
@@ -575,17 +550,20 @@
            let obj = {};
            let lng;
            let lat;
            let isCamera = false;
            if (nPickFeature.id.tag) {
              let properties = nPickFeature.id.properties;
              let propertyNames = nPickFeature.id.properties.propertyNames;
              if (propertyNames.indexOf("监控名") !== -1) {
                obj["JK名称"] = properties["JK名称"]._value;
                obj["JK类型"] = properties["JK类型"]._value;
                obj["功能"] = properties["功能"]._value;
                obj["所在区"] = properties["所在区"]._value;
                obj["JK编号"] = properties["JK编号"]._value;
                obj["JK内码"] = properties["JK内码"]._value;
                isCamera = true;
                // obj["JK名称"] = properties["JK名称"]._value;
                // obj["JK类型"] = properties["JK类型"]._value;
                // obj["功能"] = properties["功能"]._value;
                // obj["所在区"] = properties["所在区"]._value;
                // obj["JK编号"] = properties["JK编号"]._value;
                // obj["JK内码"] = properties["JK内码"]._value;
              } else {
                propertyNames.forEach((item) => {
                  obj[item] = properties[item]._value;
                });
@@ -602,20 +580,44 @@
              lng = nPickFeature.id.positions[0];
              lat = nPickFeature.id.positions[1];
            }
            if (!isCamera) {
              tooltipHTML = "";
              // console.log(obj);
            tooltipHTML = "";
            // console.log(obj);
              for (let i in obj) {
                let value = obj[i];
                value && (tooltipHTML += `<p>${i}:${value || "无"}</p>`);
              }
            for (let i in obj) {
              let value = obj[i];
              value && (tooltipHTML += `<p>${i}:${value || "无"}</p>`);
              if (tooltip) {
                tooltip.show(false);
                tooltip = null;
              }
              tooltip = sgworld.Core.CreateResultTooltip(window.Viewer, {
                color: "black",
                addY: -40,
                far: 200000,
                closeBtn: true,
                close: () => {
                  this.resetImg();
                  this.resetBorder();
                },
              });
              let description = `<div style='background:
                                      rgba(14, 50, 143, 0.6);
                                      border: 1px solid #205fbc;
                                       border-radius: 5px;
                                       color: #fff;
                                       padding: 15px;
                                       box-shadow: 0px 1px 10px 0px rgba(3, 10, 26, 0.38);
                                       '>${tooltipHTML}</div>`;
              tooltip.showAt(
                Cesium.Cartesian3.fromDegrees(lng, lat, 0),
                description
              );
            }
            if (tooltip) {
              tooltip.show(false);
              tooltip = null;
            }
            //关闭地块信息弹窗
            Bus.$emit("closeLandInfoPop", true);
            layuiLayer.close(SmartEarthPopupData.layerProp);
@@ -782,7 +784,7 @@
        });
      });
    },
    handleCommand(command) {
      switch (command) {
        case "qytj":