+
liuyg
2021-12-15 b7c39e4ccd65249dc385d76d08ed59834f83ad97
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<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> -->
      <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 command="西东大街">西东大街</el-dropdown-item>
          <el-dropdown-item command="长江路">长江路</el-dropdown-item>
          <el-dropdown-item command="科技园">科技园</el-dropdown-item>
          <el-dropdown-item command="逸夫楼">逸夫楼</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";
export default {
  name: "mobileCortrolButtom",
  data() {
    return {};
  },
  computed: {
    ...mapGetters(["mviewer"]),
  },
  created() {
    this.DC = global.DC;
  },
  mounted() {},
  methods: {
    handleCommand(command) {
      console.log(command, "定位");
      // 定位
      // this.mviewer.zoomToPosition(
      //     new DC.Position(
      //       e.wgs84Position.lng,
      //       e.wgs84Position.lat - 0.016,
      //       1530,
      //       0,
      //       -45
      //     )
      //   );
    },
    openBigPopupAfter() {
      this.$store.commit("MSET_BIGPOPUPAFTER", true);
    },
    goOn() {
      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);
      // });
    },
  },
};
</script>
 
<style scoped lang='scss'>
.m-left-mobileCortrolButtom {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  .m-l-inbut {
    float: left;
    width: 39px;
    height: 39px;
    background-color: #c9302c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    margin-left: 12px;
    border-radius: 5px;
    .icons {
      display: inline-block;
      width: 100%;
      height: 100%;
    }
    .icon {
      font-size: 20px;
      color: #fff;
      &::before {
        width: 100%;
        height: 100%;
      }
    }
  }
}
</style>