<!--
 * @Descripttion: 当前组件信息
 * @version: 1.0.0
 * @Author: 无尘
 * @Date: 2018-10-10 14:44:45
 * @LastEditors: 无尘
 * @LastEditTime: 2020-06-30 16:00:05
 -->
<template>
  <div class="enterprise-wrap">
    <!-- 公共头部菜单插件 -->
    <vue-office-header :projectName="projectName" @collapseTag="collapseTag" @toRouterView="toRouterView"> </vue-office-header>
    <div class="enterprise-wrap__body">
      <div id="content" class="content">
        <div class="content-body" style="min-height: calc(100vh - 46px);">
          <transition name="fade" mode="out-in">
            <router-view></router-view>
          </transition>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import vueOfficeHeader from '@/components/vue-office-header';
export default {
  name: 'enterprise',
  components: {
    vueOfficeHeader
  },
  data() {
    return {
      projectName: 'haoban-manage-web', // 当前项目名
      collapseFlag: false, // 折叠参数
      contentHeight: window.screen.availHeight - 5 + 'px'
    };
  },
  computed: {},
  methods: {
    // 处理路由跳转
    toRouterView(val) {
      let that = this;
      // 模拟检查数据
      // //有两个参数
      //{
      //  name:,
      //  path:
      //}
      that.$router.push({
        path: val.path
      });
    },

    // 折叠事件
    collapseTag(val) {
      let that = this;
      that.collapseFlag = val;
    }
  },
  mounted() {
    const that = this;
    that.contentHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 64 + 'px';
  }
};
</script>
<style lang="less">
.enterprise-wrap {
  background: #f0f2f5;

  .enterprise-wrap__body {
    .content {
      padding-top: 46px;
      min-width: 1400px;
      -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
      box-sizing: border-box;
    }
  }
}

.w-426 {
  width: 426px;
  max-width: 426px;
}
</style>
