From acb45c731c3ccd0a67061efb4e7bdf4f56005672 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 12 Jan 2022 08:52:13 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/school-web
---
src/components/mobileGoTo/index.vue | 84 +++++++++++++++++++++++++++++++----------
1 files changed, 63 insertions(+), 21 deletions(-)
diff --git a/src/components/mobileGoTo/index.vue b/src/components/mobileGoTo/index.vue
index 3aaf38a..d245106 100644
--- a/src/components/mobileGoTo/index.vue
+++ b/src/components/mobileGoTo/index.vue
@@ -1,16 +1,25 @@
<template>
- <div v-show="openmobileGoTo" class="mobileGoTo">
- <el-input v-model="height"></el-input>
+ <div v-if="openmobileGoTo" class="mobileGoTo">
+ <el-input v-model="int1"></el-input>
+ <el-input v-model="lat1"></el-input>
+ <el-input v-model="int2"></el-input>
+ <el-input v-model="lat2"></el-input>
+ <!-- <el-input v-model="lnt"></el-input>
+ <el-input v-model="lat"></el-input> -->
+ <!-- <el-input v-model="height"></el-input>
<el-input v-model="heading"></el-input>
<el-input v-model="pitch"></el-input>
- <el-input v-model="roll"></el-input>
+ <el-input v-model="roll"></el-input> -->
<!-- <el-input v-model="alt"></el-input> -->
<el-button type="primary" @click="submitForm('')">跳转</el-button>
+ <div class="mobileGoTocontext">{{ context }}</div>
+ <el-button type="primary" @click="dingwei">规划路线</el-button>
</div>
</template>
<script>
import { mapGetters } from "vuex";
+import axios from "axios";
export default {
name: "mobileGoTo",
computed: {
@@ -22,17 +31,33 @@
"ccDataState",
"perspectiveControls",
"perspectiveControl",
+ "dimensionData",
+ "isendPosition",
+ "endPosition",
]),
+ startLngLat() {
+ return [+this.int1, +this.lat1];
+ },
+ endLngLat() {
+ return [+this.int2, +this.lat2];
+ },
},
data() {
return {
- lnt: "121.53772514948211",
- lat: "31.23938286341316",
- alt: "90.648862227",
+ lnt: "114.039946",
+ lat: "27.628475",
+ alt: "0",
height: 800,
heading: 0,
pitch: -45,
roll: 0,
+ context: null,
+ // startLngLat: [114.039946, 27.628475],
+ // endLngLat: [114.038355, 27.63057],
+ int1: 114.039946,
+ lat1: 27.628475,
+ int2: 114.038355,
+ lat2: 27.63057,
};
},
watch: {
@@ -50,29 +75,40 @@
this.pitch = this.perspectiveControl.pitch;
this.roll = this.perspectiveControl.roll;
},
+ isendPosition() {
+ this.int2 = this.endPosition[0];
+ this.lat2 = this.endPosition[1];
+ console.log(this.endPosition);
+ },
},
methods: {
submitForm() {
if (this.lnt && this.lat) {
let that = this;
// 定制化窗体
- // let position = {};
- // let lntLat = [that.lnt, that.lat];
- // let d = {
- // position,
- // lntLat,
- // query: { position, lntLat },
- // useJWD: true, //仅使用经纬度
- // };
- // that.$store.dispatch("setMobileWindows", d);
+ let position = {};
+ let lntLat = [that.lnt, that.lat];
let d = {
- height: this.height,
- heading: this.heading,
- pitch: this.pitch,
- roll: this.roll,
+ position,
+ lntLat,
+ query: { position, lntLat },
+ useJWD: true, //仅使用经纬度
};
- that.$store.dispatch("MSET_GOTOCC", d);
+ that.$store.dispatch("setMobileWindows", d);
+ // let d = {
+ // height: this.height,
+ // heading: this.heading,
+ // pitch: this.pitch,
+ // roll: this.roll,
+ // };
+ // that.$store.dispatch("MSET_GOTOCC", d);
}
+ },
+ // dingwei(startLngLat, endLngLat) {
+ dingwei() {
+ let ints = [this.startLngLat, this.endLngLat];
+ console.log(ints);
+ this.$store.dispatch("MSET_GOTOWHERE", ints);
},
},
};
@@ -84,5 +120,11 @@
bottom: 60px;
width: 73%;
z-index: 500;
+ .mobileGoTocontext {
+ width: 100%;
+ height: 100%;
+ background-color: #fff;
+ word-wrap: break-word;
+ }
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3