liuyg
2021-12-31 e40ee62d3e9b71ffe3432d32a53a00c4097b5708
src/components/mobileCortrolButtom/index.vue
@@ -1,6 +1,6 @@
<template>
  <div class="m-left-mobileCortrolButtom">
    <div class="m-l-inbut"><i class="el-icon-s-help"></i></div>
    <!-- <div class="m-l-inbut" @click="mubiao"><i class="el-icon-s-help"></i></div> -->
    <div class="m-l-inbut">
      <!-- <i class="el-icon-s-flag"></i> -->
      <el-dropdown trigger="click" @command="handleCommand">
@@ -20,7 +20,7 @@
    <div class="m-l-inbut" @click="openBigPopupAfter">
      <i class="el-icon-menu"></i>
    </div>
    <div class="m-l-inbut" @click="goOn"><i class="el-icon-location"></i></div>
    <!-- <div class="m-l-inbut" @click="goOn"><i class="el-icon-location"></i></div> -->
  </div>
</template>
@@ -34,6 +34,24 @@
    return {
      DC: "",
      tabTable: [],
      ccData: [
        {
          lnt: 115.86471885,
          lat: 28.74382592,
        },
        {
          lnt: 115.86711312,
          lat: 28.74315701,
        },
        {
          lnt: 115.86872136,
          lat: 28.74009846,
        },
        {
          lnt: 115.87413129,
          lat: 28.743337,
        },
      ],
    };
  },
  computed: {
@@ -45,19 +63,26 @@
  },
  mounted() {},
  methods: {
    mubiao() {
      let that = this;
      //测试fllyTo
    },
    handleCommand(command) {
      let that = this;
      let position = [+command.lnt + 0.01197, +command.lat - 0.0021];
      console.log(command, "定位");
      // 定位
      // this.mviewer.zoomToPosition(
      //   new that.DC.Position(
      //     command.position[0],
      //     command.position[1] - 0.012,
      //     1530,
      //     0,
      //     -45
      //   )
      // );
      // this.$store.commit("MSETCC_SETCC", {
      //   lntLat: position,
      // });
      this.$store.dispatch("mapFlyTo", {
        //飞入
        lntLat: [...position, 500],
        heading: 0,
        pitch: -45,
        roll: 0,
        noOpen: true,
      });
    },
    openBigPopupAfter() {
      this.$store.commit("MSET_BIGPOPUPAFTER", true);
@@ -77,16 +102,28 @@
      // });
    },
    getStreet() {
      let that = this;
      getListarc().then((res) => {
        let title = [];
        res.data.data.forEach((item) => {
        const data = res.data.data;
        for (let k = 0; k < data.length; k++) {
          title.push({
            title: item.dictValue,
            title: data[k].dictValue,
            flag: false,
            key: item.dictKey,
            key: data[k].dictKey,
            child: [],
            lnt: that.ccData[k].lnt,
            lat: that.ccData[k].lat,
          });
        });
        }
        // res.data.data.forEach((item) => {
        //   title.push({
        //     title: item.dictValue,
        //     flag: false,
        //     key: item.dictKey,
        //     child: [],
        //   });
        // });
        this.tabTable = title;
        this.$store.commit("MSET_POPUPTABLENAME", title);
      });
@@ -105,12 +142,12 @@
    float: left;
    width: 39px;
    height: 39px;
    background-color: #c9302c;
    background-color: rgb(33, 150, 243);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-size: 32px;
    margin-left: 12px;
    border-radius: 5px;
    .icons {
@@ -119,7 +156,7 @@
      height: 100%;
    }
    .icon {
      font-size: 20px;
      font-size: 32px;
      color: #fff;
      &::before {
        width: 100%;