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

<script>
  const { basicLayout } = require('w-vue-basis/layouts');

  const { getAppsByRouter } = require('w-vue-middle/utils/appAnalysis');

  import { system } from 'w-vue-chongqing/src/router/router.config';

  export default {
    components: { basicLayout },
    data() {
      return {
        appList: [],
      };
    },
    created() {
      this.getAppList();
    },
    methods: {
      /**
       * @Author: Jason Liu
       * @description: 获取AppId
       */
      getAppList() {
        this.appList = getAppsByRouter(system);
      },
      init() {},
    },
    watch: {
      $route(newVal) {
        if (newVal.name != this.activeKey) {
          this.init();
        }
      },
    },
  };
</script>

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