shuishen
2022-04-27 510ae9f8768cd16c39fde70e1ae40b164500d5d5
src/components/mobileGoTo/index.vue
@@ -18,34 +18,34 @@
</template>
<script>
import { mapGetters } from "vuex";
import axios from "axios";
import { mapGetters } from 'vuex'
import axios from 'axios'
export default {
  name: "mobileGoTo",
    name: 'mobileGoTo',
  computed: {
    ...mapGetters([
      "openmobileGoTo",
      "query",
      "MobileWindowChangeData",
      "ccDataState",
      "perspectiveControls",
      "perspectiveControl",
      "dimensionData",
      "isendPosition",
      "endPosition",
            'openmobileGoTo',
            'query',
            'MobileWindowChangeData',
            'ccDataState',
            'perspectiveControls',
            'perspectiveControl',
            'dimensionData',
            'isendPosition',
            'endPosition'
    ]),
    startLngLat() {
      return [+this.int1, +this.lat1];
            return [+this.int1, +this.lat1]
    },
    endLngLat() {
      return [+this.int2, +this.lat2];
    },
            return [+this.int2, +this.lat2]
        }
  },
  data() {
    return {
      lnt: "114.039946",
      lat: "27.628475",
      alt: "0",
            lnt: '114.039946',
            lat: '27.628475',
            alt: '0',
      height: 800,
      heading: 0,
      pitch: -45,
@@ -56,44 +56,44 @@
      int1: 114.039946,
      lat1: 27.628475,
      int2: 114.038355,
      lat2: 27.63057,
    };
            lat2: 27.63057
        }
  },
  watch: {
    MobileWindowChangeData() {
      this.lnt = this.query.lntLat[0];
      this.lat = this.query.lntLat[1];
            this.lnt = this.query.lntLat[0]
            this.lat = this.query.lntLat[1]
    },
    ccDataState() {
      this.lnt = this.query.lntLat[0];
      this.lat = this.query.lntLat[1];
            this.lnt = this.query.lntLat[0]
            this.lat = this.query.lntLat[1]
    },
    perspectiveControls() {
      this.height = this.perspectiveControl.height;
      this.heading = this.perspectiveControl.heading;
      this.pitch = this.perspectiveControl.pitch;
      this.roll = this.perspectiveControl.roll;
            this.height = this.perspectiveControl.height
            this.heading = this.perspectiveControl.heading
            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);
    },
            this.int2 = this.endPosition[0]
            this.lat2 = this.endPosition[1]
            console.log(this.endPosition)
        }
  },
  methods: {
    submitForm() {
      if (this.lnt && this.lat) {
        let that = this;
                const that = this
        // 定制化窗体
        let position = {};
        let lntLat = [that.lnt, that.lat];
        let d = {
                const position = {}
                const lntLat = [that.lnt, that.lat]
                const d = {
          position,
          lntLat,
          query: { position, lntLat },
          useJWD: true, //仅使用经纬度
        };
        that.$store.dispatch("setMobileWindows", d);
                    useJWD: true // 仅使用经纬度
                }
                that.$store.dispatch('setMobileWindows', d)
        //   let d = {
        //     height: this.height,
        //     heading: this.heading,
@@ -105,12 +105,12 @@
    },
    // dingwei(startLngLat, endLngLat) {
    dingwei() {
      let ints = [this.startLngLat, this.endLngLat];
      console.log(ints);
      this.$store.dispatch("MSET_GOTOWHERE", ints);
    },
  },
};
            const ints = [this.startLngLat, this.endLngLat]
            console.log(ints)
            this.$store.dispatch('MSET_GOTOWHERE', ints)
        }
    }
}
</script>
<style lang="scss" scoped>