src/components/mobileCortrolButtom/index.vue
@@ -12,7 +12,8 @@
                        v-for="(item, index) in tabTable"
                        :key="index"
                        :command="item"
                    >{{ item.title }}</el-dropdown-item>
            >{{ item.title }}</el-dropdown-item
          >
                </el-dropdown-menu>
            </el-dropdown>
        </div>
@@ -22,70 +23,121 @@
        <!-- <div class="m-l-inbut" @click="openActivity">
      <i class="el-icon-s-opportunity"></i>
        </div>-->
        <!-- <div class="m-l-inbut" @click="goOn"><i class="el-icon-location"></i></div> -->
    <div class="m-l-inbut" @click="zoomIns">
      <i class="el-icon-refresh"></i>
    </div>
    <div class="m-l-inbut" @click="goOns"><i class="el-icon-location"></i></div>
    </div>
</template>
<script>
import { mapGetters } from 'vuex'
import { getIp, getUsers } from '@/api/mobile/ip/index'
import { getListarc } from '@/api/mobile/public/arc'
import { getActivity } from '@/api/mobile/hd/hd'
import { mapGetters } from "vuex";
import { getIp, getUsers } from "@/api/mobile/ip/index";
import { getListarc } from "@/api/mobile/public/arc";
import { getActivity } from "@/api/mobile/hd/hd";
export default {
    name: 'mobileCortrolButtom',
  name: "mobileCortrolButtom",
    data () {
        return {
            tabTable: [],
            ccData: [
                {
                    lnt: 114.03835559,
                    lat: 27.63057034
          lat: 27.63057034,
                },
                {
                    lnt: 114.03971446,
                    lat: 27.62986481
          lat: 27.62986481,
                },
                {
                    lnt: 114.03841654,
                    lat: 27.62919726
          lat: 27.62919726,
                },
                {
                    lnt: 114.039946,
                    lat: 27.62847544
                }
            ]
        }
          lat: 27.62847544,
        },
      ],
    };
    },
    computed: {
        ...mapGetters(['mviewer', 'openmobileGoTo', 'dimensionData'])
    ...mapGetters([
      "mviewer",
      "openmobileGoTo",
      "dimensionData",
      "startPointFn",
      "dimension",
    ]),
    },
    created () {
        // this.getStreet();
    },
    mounted () { },
    methods: {
    goOns() {
      let that = this;
      this.$store.commit("GET_NOWPOSITION", (res) => {
        that.$store.dispatch("pcMoveView", {
          jd: res[0],
          wd: res[1],
          viewer: that.mviewer,
        });
        let data = [
          {
            name: "我的位置",
            jd: res[0],
            wd: res[1],
          },
        ];
        that.$store.dispatch("addLabelLayerIconMobelUse", {
          list: data,
          clear: true,
          mviewer: that.mviewer,
        });
      });
    },
    zoomIns(val) {
      // this.$store.dispatch("mapFlyTo", {
      //   //飞入
      //   lntLat: [115.87988885, 28.72502592, 2100],
      //   // lntLat: [115.87186406, 28.74449337, 1200],
      //   // lntLat: [121.50492752204283, 31.21567802276832, 2530],
      //   heading: 0,
      //   pitch: -45,
      //   roll: 0,
      //   noOpen: true,
      // });
      //   if (val) {
      //     if (this.dimension != val) {
      //       this.$store.dispatch("MSET_DIMENSIONS", val);
      //     }
      //     return;
      //   }
      this.startPointFn();
    },
        openActivity () {
            const d = {
                main: [
                    {
                        name: '活动',
            name: "活动",
                        type: 1,
                        method: getActivity
                    }
            method: getActivity,
          },
                ],
                qurey: '活动'
            }
            this.$store.commit('MSET_POPUPOUROPENDATA', d)
            this.$store.commit('MSET_BIGPOPUP', { name: '活动' })
        qurey: "活动",
      };
      this.$store.commit("MSET_POPUPOUROPENDATA", d);
      this.$store.commit("MSET_BIGPOPUP", { name: "活动" });
            // this.$store.commit("set_showActivity", true);
        },
        mubiao () {
            // 测试fllyTo
        },
        handleCommand (command) {
            const that = this
            const position = [+command.lnt + 0.00027, +command.lat + 0.00048, 450]
            console.log(command, '定位')
      const that = this;
      const position = [+command.lnt + 0.00027, +command.lat + 0.00048, 450];
      console.log(command, "定位");
            // 定位
            // this.$store.commit("MSETCC_SETCC", {
            //   lntLat: position,
@@ -119,16 +171,16 @@
                    ),
                    // heading: data.heading,
                    // pitch: data.pitch,
                    roll: that.dimensionData.roll
                }
            })
          roll: that.dimensionData.roll,
        },
      });
        },
        openBigPopupAfter () {
            this.$store.commit('MSET_BIGPOPUPAFTER', true)
      this.$store.commit("MSET_BIGPOPUPAFTER", true);
        },
        goOn () {
            const that = this
            this.$store.commit('MSET_OPENMOBILEGOTO', !that.openmobileGoTo)
      const that = this;
      this.$store.commit("MSET_OPENMOBILEGOTO", !that.openmobileGoTo);
            // console.log(returnCitySN["cip"]);
            // let data = {
            //   ip: returnCitySN["cip"],
@@ -141,10 +193,10 @@
            // });
        },
        getStreet () {
            const that = this
      const that = this;
            getListarc().then((res) => {
                const title = []
                const data = res.data.data
        const title = [];
        const data = res.data.data;
                for (let k = 0; k < data.length; k++) {
                    title.push({
                        title: data[k].dictValue,
@@ -152,8 +204,8 @@
                        key: data[k].dictKey,
                        child: [],
                        lnt: that.ccData[k].lnt,
                        lat: that.ccData[k].lat
                    })
            lat: that.ccData[k].lat,
          });
                }
                // res.data.data.forEach((item) => {
                //   title.push({
@@ -163,12 +215,12 @@
                //     child: [],
                //   });
                // });
                this.tabTable = title
                this.$store.commit('MSET_POPUPTABLENAME', title)
            })
        }
    }
}
        this.tabTable = title;
        this.$store.commit("MSET_POPUPTABLENAME", title);
      });
    },
  },
};
</script>
<style scoped lang="scss">