<template>
  <div id="post">
    <el-col :span="24" class="list" @click.native="$router.push({ path: '/jobsDetail', query: { id: data.id } })">
      <el-col :span="20" class="title">
        <p class="textOver"><span class="dian"></span>{{ data.job_name }}</p>
        <p class="textOver"><span class="dian"></span>需求人数:{{ data.job_number }}</p>
        <p class="textOver"><span class="dian"></span>薪资:{{ data | getSalary }}</p>
        <p class="textOver"><span class="dian"></span>福利待遇:{{ data.welfare }}</p>
        <p class="textOver"><span class="dian"></span>职位诱惑:{{ data.job_tag }}</p>
      </el-col>
      <el-col :span="4" class="date">{{ data.time }}</el-col>
    </el-col>
  </div>
</template>

<script>
import _ from 'lodash';
export default {
  name: 'post',
  props: {
    data: null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {},
  methods: {},
  filters: {
    getSalary(data) {
      return _.get(data, `salary.text`);
    },
  },
};
</script>

<style lang="less" scoped>
p {
  padding: 0;
  margin: 0;
}
.textOver {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dian {
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: #4f4f4f;
  border-radius: 90px;
  margin: 5px 8px;
}
.title {
  padding: 10px 0;
}
.title p {
  font-size: 16px;
  color: #4f4f4f;
}
.date {
  font-size: 14px;
  color: #323131;
  text-align: right;
  padding: 10px 0;
}
.list:hover {
  cursor: pointer;
}
</style>
