From 6851cc1e217a2af9ae62ebb3bf28e00a0d8ddadb Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 31 Dec 2021 09:06:55 +0800
Subject: [PATCH] +
---
src/components/mobileCortrolButtom/index.vue | 139 ++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 127 insertions(+), 12 deletions(-)
diff --git a/src/components/mobileCortrolButtom/index.vue b/src/components/mobileCortrolButtom/index.vue
index ea17825..eed285d 100644
--- a/src/components/mobileCortrolButtom/index.vue
+++ b/src/components/mobileCortrolButtom/index.vue
@@ -1,30 +1,132 @@
<template>
<div class="m-left-mobileCortrolButtom">
- <div class="m-l-inbut"><i class="el-icon-s-help"></i></div>
- <div class="m-l-inbut"><i class="el-icon-s-flag"></i></div>
- <div class="m-l-inbut"><i class="el-icon-menu"></i></div>
- <div class="m-l-inbut"><i class="el-icon-location"></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">
+ <span class="el-dropdown-link icons">
+ <i class="el-icon-s-flag icon"></i>
+ </span>
+ <el-dropdown-menu slot="dropdown">
+ <el-dropdown-item
+ v-for="(item, index) in tabTable"
+ :key="index"
+ :command="item"
+ >{{ item.title }}</el-dropdown-item
+ >
+ </el-dropdown-menu>
+ </el-dropdown>
+ </div>
+ <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>
</template>
<script>
+import { mapGetters } from "vuex";
+import { getIp, getUsers } from "@/api/mobile/ip/index";
+import { getListarc } from "@/api/mobile/public/arc";
export default {
name: "mobileCortrolButtom",
- computed: {},
data() {
return {
- viewer: null,
- DC: null,
+ 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: {
+ ...mapGetters(["mviewer", "openmobileGoTo"]),
},
created() {
this.DC = global.DC;
+ this.getStreet();
},
mounted() {},
methods: {
- initialize(viewer) {
- viewer.scene.globe.depthTestAgainstTerrain = false;
- this.viewer = viewer;
+ mubiao() {
+ let that = this;
+ //测试fllyTo
+ },
+ handleCommand(command) {
+ let that = this;
+ let position = [+command.lnt + 0.01197, +command.lat - 0.0021];
+ console.log(command, "定位");
+ // 定位
+ // 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);
+ },
+ goOn() {
+ let that = this;
+ this.$store.commit("MSET_OPENMOBILEGOTO", !that.openmobileGoTo);
+ // console.log(returnCitySN["cip"]);
+ // let data = {
+ // ip: returnCitySN["cip"],
+ // key: "7WKBZ-QDY62-WEEUG-C7KUN-ADAF5-L5BKZ",
+ // };
+ // console.log("定位", data.ip);
+ // getIp(data).then((res) => {
+ // // getUsers(data).then((res) => {
+ // console.log(res);
+ // });
+ },
+ getStreet() {
+ let that = this;
+ getListarc().then((res) => {
+ let title = [];
+ const data = res.data.data;
+ for (let k = 0; k < data.length; k++) {
+ title.push({
+ title: data[k].dictValue,
+ flag: false,
+ 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);
+ });
},
},
};
@@ -40,14 +142,27 @@
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 {
+ display: inline-block;
+ width: 100%;
+ height: 100%;
+ }
+ .icon {
+ font-size: 32px;
+ color: #fff;
+ &::before {
+ width: 100%;
+ height: 100%;
+ }
+ }
}
}
</style>
--
Gitblit v1.9.3