<template>
  <div class="gpsbuttonBox">
    <el-button type="primary" @click="handleShowGPS">获取GPS位置 </el-button>

    <gps-position ref="gpsdialog_ref"></gps-position>
  </div>
</template>
<script>
// import infoDialog from "./infoDialog.vue";
import gpsPosition from "./gpsPosition.vue";
import {} from "@/utils/api/index";
export default {
  components: {
    gpsPosition,
  },
  data() {
    return {};
  },
  watch: {
    termId: {
      handler(newVal, oldVal) {},
      deep: true,
      immediate: true,
    },
    cmdId: {
      handler(newVal, oldVal) {},
      deep: true,
      immediate: true,
    },
  },
  computed: {
    termId() {
      return this.$store.state.termId;
    },
    cmdId() {
      return this.$store.state.cmdId;
    },
  },
  methods: {
    //获取GPS位置
    handleShowGPS() {
      this.$refs.gpsdialog_ref.display(this.cmdId, this.termId);
      this.$refs.gpsdialog_ref.getgpssql();
    },
  },
};
</script>
<style lang="less">
.gpsbuttonBox {
  // width: 100%;
  // display: flex;
  // justify-content: space-between;
}
</style>
