From 01f9c88fd0ee768155e5b341c2bb95a85bc11a08 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Sat, 05 Mar 2022 17:49:36 +0800
Subject: [PATCH] ++
---
src/components/mobileCortrolButtom/index.vue | 95 +++++++++++++++++++++++++++++++++++------------
1 files changed, 71 insertions(+), 24 deletions(-)
diff --git a/src/components/mobileCortrolButtom/index.vue b/src/components/mobileCortrolButtom/index.vue
index 417eede..5381441 100644
--- a/src/components/mobileCortrolButtom/index.vue
+++ b/src/components/mobileCortrolButtom/index.vue
@@ -1,7 +1,7 @@
<template>
<div class="m-left-mobileCortrolButtom">
- <div class="m-l-inbut" @click="mubiao"><i class="el-icon-s-help"></i></div>
- <div class="m-l-inbut">
+ <!-- <div class="m-l-inbut" @click="mubiao"><i class="el-icon-s-help"></i></div> -->
+ <div class="m-l-inbut" v-show="false">
<!-- <i class="el-icon-s-flag"></i> -->
<el-dropdown trigger="click" @command="handleCommand">
<span class="el-dropdown-link icons">
@@ -20,7 +20,10 @@
<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="openActivity">
+ <i class="el-icon-s-opportunity"></i>
+ </div> -->
+ <!-- <div class="m-l-inbut" @click="goOn"><i class="el-icon-location"></i></div> -->
</div>
</template>
@@ -28,6 +31,7 @@
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",
data() {
@@ -36,47 +40,90 @@
tabTable: [],
ccData: [
{
- lnt: 115.87071885,
- lat: 28.74382592,
+ lnt: 114.03835559,
+ lat: 27.63057034,
},
{
- lnt: 121.50266534548483,
- lat: 31.24357506330159,
+ lnt: 114.03971446,
+ lat: 27.62986481,
},
{
- lnt: 121.56405019,
- lat: 31.20845211,
+ lnt: 114.03841654,
+ lat: 27.62919726,
},
{
- lnt: 121.55500463461836,
- lat: 31.257934074839717,
+ lnt: 114.039946,
+ lat: 27.62847544,
},
],
};
},
computed: {
- ...mapGetters(["mviewer", "openmobileGoTo"]),
+ ...mapGetters(["mviewer", "openmobileGoTo", "dimensionData"]),
},
created() {
this.DC = global.DC;
- this.getStreet();
+ // this.getStreet();
},
mounted() {},
methods: {
+ openActivity() {
+ let d = {
+ main: [
+ {
+ name: "活动",
+ type: 1,
+ method: getActivity,
+ },
+ ],
+ qurey: "活动",
+ };
+ this.$store.commit("MSET_POPUPOUROPENDATA", d);
+ this.$store.commit("MSET_BIGPOPUP", { name: "活动" });
+ // this.$store.commit("set_showActivity", true);
+ },
mubiao() {
let that = this;
//测试fllyTo
},
handleCommand(command) {
let that = this;
+ let position = [+command.lnt + 0.00027, +command.lat + 0.00048, 450];
console.log(command, "定位");
// 定位
- this.$store.dispatch("mapFlyTo", {
- //飞入
- lntLat: [command.lnt, command.lat, 2530],
- heading: 0,
- pitch: -45,
- roll: 0,
+ // this.$store.commit("MSETCC_SETCC", {
+ // lntLat: position,
+ // });
+ // this.$store.dispatch("mapFlyTo", {
+ // //飞入
+ // lntLat: [...position, 450],
+ // heading: 0,
+ // pitch: -90,
+ // roll: 0,
+ // noOpen: true,
+ // });
+ that.mviewer.camera.setView({
+ // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
+ // fromDegrees()方法,将经纬度和高程转换为世界坐标
+ destination: new global.DC.Namespace.Cesium.Cartesian3.fromDegrees(
+ // 114.0351,
+ // 27.6314,
+ // 200.0
+ position[0],
+ position[1],
+ position[2]
+ ),
+ orientation: {
+ heading: global.DC.Namespace.Cesium.Math.toRadians(
+ that.dimensionData.heading
+ ),
+ pitch: global.DC.Namespace.Cesium.Math.toRadians(
+ that.dimensionData.pitch
+ ),
+ // heading: data.heading,
+ // pitch: data.pitch,
+ roll: that.dimensionData.roll,
+ },
});
},
openBigPopupAfter() {
@@ -127,22 +174,22 @@
};
</script>
-<style scoped lang='scss'>
+<style scoped lang="scss">
.m-left-mobileCortrolButtom {
position: fixed;
- bottom: 20px;
+ bottom: 35px;
left: 20px;
z-index: 200;
.m-l-inbut {
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 {
@@ -151,7 +198,7 @@
height: 100%;
}
.icon {
- font-size: 20px;
+ font-size: 32px;
color: #fff;
&::before {
width: 100%;
--
Gitblit v1.9.3