<template>
  <div class="api-body-content border-box">
    <div class="common-nav">
      <nav-bread :nav-path="navPath" />
    </div>
    <div class="api-body-main common-body-main border-box">
      <div class="api-main-content border-box" />
    </div>
  </div>
</template>
<script>
import navBread from '@/components/nav/nav-bread.vue';
import { getRequest } from '@/api/api';
export default {
  name: 'Overview',
  components: {
    navBread
  },
  data() {
    return {
      // 面包屑参数
      navPath: [
        {
          name: '概览',
          path: ''
        }
      ]
    };
  },

  /* 接收数据 */
  mounted() {
    const that = this;
    that.$emit('showTab', 1);
  },
  methods: {
    /**
     *  获取数据
     */
    getData() {
      const that = this;
      let para = {
        project: that.repProjectName,
        router: that.pathName,
        requestProject: that.repProjectName
      };
      getRequest('/haoban-manage-web/menu-detail', para)
        .then(res => {
          let resData = res.data;
          if (resData.errorCode == 1) {
            if (!resData.result) {
              that.$message.error({
                duration: 1000,
                message: '暂无数据'
              });
              return;
            }
            return;
          }
          that.$message.error({
            duration: 1000,
            message: resData.message
          });
        })
        .catch(function(error) {
          that.$message.error({
            duration: 1000,
            message: error.message
          });
        });
    }
  },
  watch: {
    $route: {
      handler: function(val, oldVal) {},
      // 深度观察监听
      deep: true
    }
  }
};
</script>

<style lang="less" scoped></style>
