<!--
 * @Author: Jason Liu
 * @Date: 2022-03-10 10:49:24
 * @Desc: 基础模板
-->
<template>
  <basic-layout v-model="appList" />
</template>

<script>
const basicLayout = require("../../components/layouts").default;
console.log(basicLayout);
const { getAppsByRouter } = require("../../utils/appAnalysis");
import { system } from "../../router/router.config";
export default {
  components: { basicLayout },
  data() {
    return {
      appList: []
    };
  },
  created() {
    this.getAppList();
  },
  methods: {
    getAppList() {
      /**
       * @Author: Jason Liu
       * @description: 解析获取应用列表
       * @return {*}
       */      
      this.appList = getAppsByRouter(system);
      /**
       * @Author: Jason Liu
       * @description: 记录解析应用信息
       * @return {*}
       */      
      console.log(this.appList);
    },
    init() {}
  },
  watch: {
    $route(newVal) {
      /**
       * @Author: Jason Liu
       * @description: 判断页面路由的差异性
       * @param {*} newVal
       * @return {*}
       */      
      if (newVal.name != this.activeKey) {
        this.init();
      }
    }
  }
};
</script>

<style lang="less" scoped>
.app_container {
  padding: 12px 18px !important;
  // height: calc(100vh - 10px)!important;
}
</style>
