<template>
  <div id="app" class="stms-framework default">
    <!-- 头部 -->
    <Navigator v-if="!hideHeader" />
    <div class="stms-framework-container">
      <!-- 左侧 -->
      <leftMenu v-if="!hideHeader" />
      <div class="stms-framework-content">
        <div class="stms-framework-content-flex">
          <router-view />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Navigator from "./components/navigator";
import leftMenu from "./components/leftMenu";
export default {
  components: {
    Navigator,
    leftMenu,
  },
  data() {
    return {
    };
  },
  computed: {
    hideHeader() {
      return (
        window.location.href.includes("cameraView") ||
        window.location.href.includes("reportPreview")
      );
    },
    menu() {
      return this.$store.getters.menu;
    },
    path() {
      return this.$route.path;
    },
    params() {
      return this.$route.params;
    },
  },
  created() {
    localStorage.removeItem("pathdata");
    localStorage.removeItem("pathActive");
    localStorage.removeItem("pathList");
  },
  mounted() {
    !this.hideHeader && this.init();
  },
  methods: {
    init() {
      this.$store.dispatch("QUERY_MENU");
      document.title = map_config.SYS_TITLE;
    },
  },
};
</script>

<style lang="less" scoped>
#app {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: "Source Han Sans CN", sans-serif;
  color: white;
  height: 100%;
  width: 100%;
  background-color: #030916;
}
.stms-framework-container{
  position: absolute;
  top: 80px;
  left: 0;
  height: calc(100% - 80px);
  padding: 8px;
  color: white;
}
</style>
