<template>
  <div class="bottom-view">
    <div class="left container">
      <content-title :title="title.dynamic"></content-title>
      <dynamicView v-for="(item, index) in list" :key="index" :number="index + 1" :item="item"></dynamicView>
    </div>
    <div class="right container">
      <content-title :title="title.recommend"></content-title>
      <recommendView></recommendView>
    </div>
  </div>
</template>
<script>
import dynamicView from "./dynamic-view";
import recommendView from "./recommend-view";
import contentTitle from "./content-title";
import * as Apis from '../api';
export default {
  components: {
    dynamicView,
    recommendView,
    contentTitle
  },
  data() {
    return {
      title: { dynamic: "部门发布动态", recommend: "部门推荐能力" },
      list: [
       
      ]
    };
  },
  mounted() {
    this.getResourceByDept();
  },
  methods: {
    //发布动态
    getResourceByDept() {
      let data = {
        limit: 5,
        page: 1
      };
      Apis.getResourceByDept(
        data,
        res => {
          if (res.data.code !== 0) {
            return;
          }
          this.list = res.data.data.records || []
        },
        err => {
          console.log("err", err);
        }
      );
    }
  }
}
</script>
<style lang="scss" scoped>
.bottom-view {
  width: 100%;
  height: 335px;
  // background: green;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  //   color: #fff;
  .container {
    background: #fff;
    width: 800px;
    height: 335px;
    padding: 0px 0 20px 10px;
  }
}
</style>