北京经济技术开发区经开区虚拟城市项目-【前端】-Web
lixuliang
2023-10-20 4509dd489115a499a0f63487ec90adfdc7a5cd56
src/components/right/right-top.vue
@@ -224,7 +224,8 @@
    </div>
    <!-- 分层分户按钮 -->
    <div class="fcfhBox" v-if="isShowFCFH">
      <button
      <FCFH />
      <!-- <button
        id="btn1"
        class="layui-btn"
        :class="{ fcfhactive: fcfhopen }"
@@ -240,7 +241,7 @@
      >
        关闭拾取
      </button>
      <span class="closeBtn" @click="closefcfhBox">×</span>
      <span class="closeBtn" @click="closefcfhBox">×</span> -->
    </div>
  </div>
</template>
@@ -682,10 +683,11 @@
import { mapState, mapMutations } from "vuex";
import Bus from "../tools/Bus";
import { queryBySquare } from "@/utils/request";
import FCFH from "@/components/right/FCFH";
//交通图层
let trafficLayer, panoramaLayer;
let flyPoint;
export default {
  components: {
    location,
@@ -698,6 +700,7 @@
    leftztfx,
    lefttx,
    Layer,
    FCFH,
  },
  name: "right-top",
  data() {
@@ -793,9 +796,10 @@
      this.kuangxuan();
    });
    Bus.$on("ShowFCFH", (data) => {
      if (data) {
        this.isShowFCFH = true;
      if (this.isShowFCFH == data) {
        return;
      }
      this.isShowFCFH = data;
    });
  },
  destroyed() {
@@ -807,6 +811,7 @@
  },
  methods: {
    ...mapMutations(["setViewer1Show", "setYqfk"]),
    /*分层分户*/
    fcfhpick(open) {
      if (open) {
        this.fcfhopen = true;
@@ -867,6 +872,9 @@
      }
    },
    closePOIbox() {
      flyPoint && Viewer.entities.remove(flyPoint);
      flyPoint = undefined;
      this.isShowDetail = false;
      this.showRangeBox = false;
      this.pointInfo = {};
@@ -1338,6 +1346,7 @@
      this.isShowDetail = false;
    },
    flyToPOI(item) {
      flyPoint && Viewer.entities.remove(flyPoint);
      sgworld.Navigate.flyToPointsInterest({
        destination: Cesium.Cartesian3.fromDegrees(
          item.geometry.coordinates[0],
@@ -1351,6 +1360,19 @@
        },
        duration: 3,
      });
      flyPoint = Viewer.entities.add({
        position: Cesium.Cartesian3.fromDegrees(
          parseFloat(item.geometry.coordinates[0]),
          parseFloat(item.geometry.coordinates[1])
        ),
        billboard: {
          verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
          scale: 1,
          image: window.SmartEarthRootUrl + "Workers/image/mark.png",
          heightReference: 1,
          disableDepthTestDistance: Number.POSITIVE_INFINITY,
        },
      });
    },
  },
  watch: {