<template>
    <!-- 项目首页 -->
    <div class="fullHeight">
      <vhead :titleName="projectName" :showR="true"></vhead>
      <div class="content-part"></div>
    </div>
  </template>
  <script>
  import vhead from "@/components/header";
  import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
  export default {
    name: "workSpace",
    components: { vhead },
    data() {
      return {
        projectSn: "",
        projectName: "",
      };
    },
    created() {
      this.projectSn = this.$store.state.projectSn;
    },
    mounted() {
      this.getDataDateils();
    },
    methods: {
      //获取详情
      getDataDateils() {
        let data = {
          projectSn: this.projectSn,
        };
        getProjectDetail(data).then((res) => {
          // console.log(res);
          if (res.code == 200) {
            this.projectName = res.result.projectName;
            document.title = this.projectName;
            this.$store.commit("setProDetail", res.result);
          }
        });
      }
    }
  };
  </script>
  <style lang="less" scoped>
  .content-part{
    width: 90%;
    height: calc(100% - 60px);
    border: 1px solid #ccc;
    margin: 0 auto;
  }
  </style>
  