<!--
 * @Author: Praise-Sun 18053314396@163.com
 * @Date: 2022-09-05 09:35:35
 * @LastEditors: Praise-Sun 18053314396@163.com
 * @LastEditTime: 2022-09-14 11:37:43
 * @FilePath: \tunnel-ui\src\App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div id="app">
    <router-view />
    <!-- <websocket @newEvent="onNewEvent"/> -->
    <WarningNotify ref="notifyShow" />
      <!-- <websocket_phone /> -->
  </div>
</template>

<script>
import websocket from "@/views/websocket";
import WarningNotify from "@screen/components/WarningNotify.vue";
// import websocket_phone from "@/views/websocket_phone";
export default {
  name: "App",
  data() {
    return {
      // path: this.$route.path,
    };
  },
  mounted(){
    this.$store.commit("menu/resetRecent");
  },
  components: {
    websocket,
    WarningNotify
    // websocket_phone
  },
  watch: {
    $route(to, from) {
      // this.path = this.$route.path;
    },
  },
  metaInfo() {
    return {
      // ${process.env.VUE_APP_TITLE}
      title:
        this.$store.state.settings.dynamicTitle &&
        this.$store.state.settings.title,
      titleTemplate: (title) => {
        return title
          ? `${title} - ${systemConfig.title(systemConfig.systemType)}`
          : process.env.VUE_APP_TITLE;
      },
    };
  },
  methods:{
    onNewEvent(para){
      if (para.subEvent == "0" || para.subEvent == "1"){
        this.$refs["notifyShow"].showNotify(para);
      }
    }
  }
};
</script>

<style>
@font-face {
  font-family: "YouSheBiaoTiHei";
  src: url("/static/fonts/优设标题黑.ttf");
}

@font-face {
  font-family: "PangMenZhengDao";
  src: url("/static/fonts/庞门正道标题体.ttf");
}

@font-face {
  font-family: "PangMenZhengDao-3";
  src: url("/static/fonts/庞门正道标题体3.ttf");
}

.amap-marker-label {
  border: 0;
  background-color: transparent;
}
</style>
