<template>
  <div id="talkInfo">
    <el-row>
      <el-col :span="24" class="top">
        <el-col :span="24">
          <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/' }"
              ><i class="el-icon-s-home"></i>
              <span>网站首页</span>
            </el-breadcrumb-item>
            <el-breadcrumb-item><span>宣讲会</span></el-breadcrumb-item>
            <el-breadcrumb-item class="webDetail">详情</el-breadcrumb-item>
          </el-breadcrumb>
        </el-col>
      </el-col>
      <el-col :span="24" class="fenxiang">
        <share></share>
      </el-col>
      <el-col :span="24" class="talk">
        <el-col :span="24" class="talkTop">
          <h3 style="border-left:5px solid #0457c7;padding:0 10px;">宣讲会信息</h3>
          <el-col :span="24" class="talkTopInfo">
            <p>
              宣讲单位：{{ talkInfo && talkInfo.title ? talkInfo.title : '测试单位'
              }}<el-button type="primary" icon="el-icon-search" class="btn" @click="turnTo">工商查询</el-button>
            </p>
          </el-col>
          <el-col :span="24" class="talkTopInfo">
            <p>宣讲时间：{{ talkInfo && talkInfo.time ? talkInfo.time : '测试单位' }}</p>
          </el-col>
          <el-col :span="24" class="talkTopInfo">
            <p>宣讲地点：{{ talkInfo && talkInfo.address ? talkInfo.address : '测试单位' }}</p>
          </el-col>
        </el-col>
        <el-col :span="24" class="talkJianjie">
          <h3 style="border-left:5px solid #0457c7;padding:0 10px;">单位简介</h3>
          <p>{{ talkInfo && talkInfo.intro ? talkInfo.intro : '测试单位' }}</p>
        </el-col>
        <el-col :span="24" class="talkPro">
          <h3 style="border-left:5px solid #0457c7;padding:0 10px;">招聘简章</h3>
          <p>{{ talkInfo && talkInfo.content ? talkInfo.content : '测试单位' }}</p>
        </el-col>
        <el-col :span="24" class="talkJobs">
          <h3 style="border-left:5px solid #0457c7;padding:0 10px;">招聘职位</h3>
          <el-row class="rowStyle" v-for="(item, index) in list" :key="index" :gutter="10">
            <el-col :span="16">
              <el-link class="job__name" :underline="false" @click="turnToJobs(item.id)">
                <span title="查看职位">{{ item.job_name ? item.job_name : '' }}</span>
              </el-link>
            </el-col>
            <el-col class="money" :span="4">
              {{ item.salary ? item.salary.text : '' }}
            </el-col>
            <el-col :span="4" style="text-align:center;"> 招聘人数：{{ item.job_number }} </el-col>
            <el-col :span="16"> 招聘专业 : {{ item.zy_req ? item.zy_req : '' }} </el-col>
            <el-col :span="8"> {{ item.xl_req ? item.xl_req : '' }} | {{ item.city ? item.city : '' }} </el-col>
          </el-row>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import share from '@/layout/share.vue';
export default {
  name: 'talkInfo',
  props: {
    talkInfo: null,
    list: null,
  },
  components: {
    share,
  },
  data: () => ({}),
  created() {},
  computed: {},
  methods: {
    turnTo() {
      window.open('https://www.tianyancha.com/');
    },
    turnToJobs(id) {
      let query = {};
      if (this.origin) query.origin = this.origin;
      if (this.type) query.type = this.type;
      query.id = id;
      this.$router.push({ path: '/jobsDetail', query: query });
    },
  },
};
</script>

<style lang="less" scoped>
p {
  padding: 0;
  margin: 0;
}
.btn {
  margin: 0 20px;
}
.top {
  padding: 10px 0;
}
.fenxiang {
  padding: 10px 0;
}
.talkTopInfo {
  padding: 5px 15px;
}
.talkJianjie p {
  padding: 0 15px;
}
.talkPro p {
  padding: 0 15px;
}
.talkJobs .rowStyle {
  padding: 10px;
  border-bottom: 1px dashed #ccc;
}
.job__name {
  font-size: 18px;
}
</style>
