<template>
  <card class="wel-admin-hello">
    <h1>您好，{{userInfo.real_name}}</h1>
    <span>待办提醒：</span>
    <span>
      招聘中
      <i>{{form.employCount}}</i>
    </span>
    <span>
      任务中
      <i>{{form.doIngCount}}</i>
    </span>
    <span>
      已完成
      <i>{{form.completCount}}</i>
    </span>
  </card>
</template>

<script>
import { missionCount } from "@/api/tenant/index";
import { mapGetters } from "vuex";
import card from "./card";

export default {
  components: { card },
  data() {
    return {
      form: {}
    };
  },
  mounted() {
    this.getData();
  },
  methods: {
    getData() {
      missionCount().then(resp => {
        this.form = resp.data.data;
      });
    }
  },
  computed: {
    ...mapGetters(["userInfo"])
  }
};
</script>

<style>
.wel-admin-hello {
  height: 160px;
  padding-left: 30px;
}
.wel-admin-hello h1 {
  font-size: 24px;
  margin: 14px 0 26px 0;
}
.wel-admin-hello span {
  font-size: 20px;
  font-weight: bold;
  display: inline-block;
  line-height: 18px;
  margin-right: 20px;
}
.wel-admin-hello i {
  font-style: normal;
  color: #5d9df8;
}
</style>
