You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

442 lines
12 KiB
Vue

4 years ago
<template>
<div class="detail-container">
<div class="maincontent w">
<div class="maincontentleft">
<div class="subset">
<div class="subsetleft">
<div class="imgbox">
<a-carousel
arrows
:autoplay="true"
effect="fade"
4 years ago
:dots="true"
4 years ago
ref="scrollimg"
>
<div
slot="prevArrow"
class="custom-slick-arrow"
style="left: 5px; z-index: 99"
>
<a-icon type="left-circle" />
</div>
<div
slot="nextArrow"
class="custom-slick-arrow"
style="right: 5px; z-index: 99"
>
<a-icon type="right-circle" />
</div>
4 years ago
<img
v-for="(item, index) in storeImage"
:key="index"
:src="item"
alt=""
/>
4 years ago
</a-carousel>
</div>
<div class="jobinfobox">
4 years ago
<div class="jobname">{{ jobDetail.aliasName }}</div>
4 years ago
<div class="jobinfo">
4 years ago
<span>{{ jobDetail.district }}</span>
<span>{{ jobDetail.gender }}</span>
<span>{{ jobDetail.age }}</span>
4 years ago
</div>
<div class="jobtag">
<span>返费</span>
4 years ago
<span
v-for="(item, index) in jobDetail.jobSpecialLabelNames"
:key="index"
>{{ item }}</span
>
</div>
<div class="jobpricemonth">
<span>{{ jobDetail.minMonthlyPay }}</span
>-<span>{{ jobDetail.maxMonthlyPay }}</span
>/
</div>
<div class="jobpricehour">
<template v-if="jobDetail.hourlyPay"
><span>{{ jobDetail.hourlyPay }}</span
>/小时</template
>
<template v-else-if="jobDetail.dayPay"
><span>{{ jobDetail.hourlyPay }}</span
>/</template
>
4 years ago
</div>
<div class="billbutton">
<span>服务费 <i>1.5</i>/小时</span>
<button>录单</button>
</div>
</div>
</div>
</div>
<div class="jobinformationbox">
<h1><span class="beforeblock"></span>职位信息</h1>
4 years ago
<div
v-html="jobDetail.baseInfo"
style="white-space: break-spaces"
></div>
4 years ago
</div>
</div>
<div class="maincontentright">
<div class="hotphone">
<h1>服务热线</h1>
<p>0371-666666666</p>
</div>
<div class="companyinfo">
<div class="companydetail">
<h1><span class="beforeblock"></span>企业详情</h1>
<p>无锡健鼎科技</p>
<div class="imgbox">
<img src="../../assets/无锡健鼎.png" alt="" />
</div>
<p>
我是文案我很长很长我是文案我 很长很长我是文案我很长很长我
是文案我很长很长我是文案我很 长很长
</p>
</div>
<div class="companylocation">
<h1><span class="beforeblock"></span>企业位置</h1>
<div class="imgbox">
<img src="../../assets/map.png" alt="" />
</div>
</div>
</div>
4 years ago
<recommend />
4 years ago
</div>
</div>
</div>
</template>
<script>
4 years ago
import { getJobDetailApi } from "../../api/job";
import { disposeJobListData } from "../../utils/commonUtil";
import recommend from "../../components/FirstJob/components/recommend.vue";
4 years ago
export default {
// 组件名称
name: "",
// 局部注册的组件
4 years ago
components: {
recommend,
},
4 years ago
// 组件参数 接收来自父组件的数据
props: {},
// 组件状态值
data() {
return {
4 years ago
relationList: [],
jobDetail: {},
storeImage: [],
id: this.$route.params.id,
4 years ago
};
},
// 计算属性
computed: {},
// 侦听器
watch: {},
// 生命周期钩子 注:没用到的钩子请自行删除
/**
* 组件实例创建完成属性已绑定但DOM还未生成$ el属性还不存在
*/
created() {
// console.log(this.$router.matcher.match());
4 years ago
this.getJobDetail();
4 years ago
},
/**
* el 被新创建的 vm.el 替换并挂载到实例上去之后调用该钩子
* 如果 root 实例挂载了一个文档内元素 mounted 被调用时 vm.el 也在文档内
*/
mounted() {
4 years ago
// console.log(this.$refs.scrollimg);
// this.$refs.scrollimg.goTo(0, false);
4 years ago
},
// 组件方法
4 years ago
methods: {
async getJobDetail() {
try {
const { data } = await getJobDetailApi(this.id);
console.log(data);
if (data.status === 200) {
this.jobDetail = disposeJobListData(data.data.storeJob);
data.data.storeImage.forEach((item) => {
this.storeImage.push(item.url);
});
} else {
this.$message.warning("数据获取失败");
}
// = data.data.recordList;
console.log(data);
console.log(this.jobDetail);
} catch (error) {
console.log(error);
}
},
},
4 years ago
};
</script>
<style scoped lang="less">
.detail-container {
overflow: hidden;
background-color: #fff;
}
/deep/ .maincontent {
display: flex;
justify-content: space-between;
margin-top: 16px;
.maincontentleft {
width: 914px;
margin-right: 16px;
text-align: left;
.subset {
display: flex;
justify-content: space-between;
padding: 16px;
margin-bottom: 16px;
width: 914px;
height: 302px;
border: 1px solid #eeefef;
.subsetleft {
display: flex;
.imgbox {
width: 360px;
height: 270px;
margin-right: 20px;
4 years ago
// .slick-active {
// button {
// background-color: #fe6a00 !important;
// }
// }
4 years ago
// .slick-track {
// transition: all 0s ease 0s !important;
// }
img {
4 years ago
position: relative;
// top: 50%;
// left: 50%;
// transform: translateX(-50%) translateY(-50%);
4 years ago
}
.ant-carousel {
.slick-slide {
text-align: center;
4 years ago
height: 270px;
4 years ago
// height: 160px;
// line-height: 160px;
background: #364d79;
overflow: hidden;
}
.custom-slick-arrow {
width: 40px;
height: 40px;
font-size: 40px;
margin-top: -20px;
border-radius: 50%;
color: #fff;
background-color: rgba(31, 45, 61, 0.11);
opacity: 0.6;
}
.custom-slick-arrow:before {
4 years ago
// color: #ff6a00;
4 years ago
display: none;
}
.custom-slick-arrow:hover {
4 years ago
// background-color: #ff6a00cc;
4 years ago
opacity: 0.8;
}
.slick-slide h3 {
color: #fff;
}
}
}
.jobinfobox {
.jobname {
// margin: 12px 0;
font-size: 24px;
font-weight: 600;
text-align: left;
color: #4d575e;
line-height: 33px;
}
.jobinfo {
margin-top: 16px;
opacity: 0.5;
font-size: 18px;
font-weight: 400;
text-align: left;
color: #4d575e;
line-height: 25px;
}
.jobtag {
margin-top: 16px;
span:first-child {
4 years ago
color: #ff6a00;
background: rgba(254, 97, 0, 0.06);
4 years ago
}
span {
margin-right: 8px;
font-size: 18px;
padding: 4px 8px;
text-align: left;
4 years ago
background: rgba(51, 51, 51, 0.06);
4 years ago
border-radius: 4px;
}
}
.jobpricemonth {
margin-top: 16px;
font-size: 18px;
text-align: left;
color: #4d575e;
line-height: 25px;
}
.jobpricehour {
margin-top: 12px;
font-size: 18px;
font-weight: bold;
text-align: left;
4 years ago
color: #ff6a00;
4 years ago
// line-height: 24px;
span {
vertical-align: baseline;
font-size: 24px;
line-height: 24px;
}
}
.billbutton {
display: flex;
justify-content: start;
margin-top: 20px;
span {
padding: 13px;
margin-right: 24px;
border-radius: 4px;
background-color: rgba(254, 97, 0, 0.1);
font-size: 24px;
font-weight: bold;
4 years ago
color: #ff6a00;
4 years ago
line-height: 24px;
}
button {
width: 160px;
height: 50px;
border: none;
4 years ago
background-color: #ff6a00;
4 years ago
color: #fff;
font-weight: bold;
font-size: 24px;
border-radius: 4px;
}
}
}
}
}
.jobinformationbox {
width: 914px;
border: 1px solid #eeefef;
padding: 20px;
h1 {
font-size: 24px;
text-align: left;
color: #4d575e;
line-height: 33px;
4 years ago
margin-bottom: 30px;
4 years ago
span {
height: 25px;
}
}
dl {
dt {
margin: 30px 0 20px 0;
font-size: 20px;
text-align: left;
color: #4d575e;
line-height: 28px;
}
dd {
ul {
li {
line-height: 32px;
}
}
}
}
}
}
.maincontentright {
> div {
margin-bottom: 16px;
}
.hotphone {
width: 270px;
height: 106px;
padding: 20px 32px;
border-radius: 4px;
background-color: #fff;
border: 1px solid #eeefef;
p {
font-size: 24px;
color: #ff6a00;
font-weight: bold;
margin-top: 12px;
}
}
.companyinfo {
padding: 20px;
border: 1px solid #eeefef;
.companydetail {
h1 {
text-align: left;
margin-bottom: 12px;
}
p:first-of-type {
font-size: 18px;
font-weight: bold;
text-align: left;
color: #4d575e;
margin-bottom: 12px;
line-height: 22px;
}
.imgbox {
width: 230px;
height: 172px;
margin-bottom: 12px;
img {
width: 100%;
height: 100%;
}
}
p:last-of-type {
font-size: 16px;
text-align: left;
color: #788085;
line-height: 22px;
margin-bottom: 15px;
}
}
.companylocation {
h1 {
height: 50px;
line-height: 50px;
text-align: left;
border-top: 1px solid #eeefef;
}
.imgbox {
width: 230px;
height: 172px;
img {
width: 100%;
height: 100%;
}
}
}
}
}
}
</style>