Files
jobslink-user-clent/pageMy/my/resume/addSkill.vue

293 lines
5.5 KiB
Vue
Raw Normal View History

2024-02-02 14:44:30 +08:00
<template>
<view style="background-color: #fefefe;">
<view class="titles">
添加职业技能
</view>
<view class="slo">
添加职业技能获得个性化的职位推荐
</view>
2024-03-25 22:07:09 +08:00
<!-- <view class="jobcontent" @click="goAddind">
2024-02-02 14:44:30 +08:00
<view class="jobinfo">
<view class="jobAddress">
2024-02-19 11:43:13 +08:00
我所属的行业
2024-02-02 14:44:30 +08:00
</view>
2024-02-17 09:42:41 +08:00
<view v-if="tradeName" class="jobText">{{ tradeName }}</view>
2024-02-02 14:44:30 +08:00
<view v-else class="jobText nochoose">请选择</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
2024-03-25 22:07:09 +08:00
</view> -->
2024-02-02 14:44:30 +08:00
<view class="border"></view>
<view class="jobcontent" @click="skill">
<view class="jobinfo">
<view class="jobAddress">
2024-03-27 09:41:54 +08:00
工种
2024-02-02 14:44:30 +08:00
</view>
2024-02-17 09:42:41 +08:00
<view v-if="worktypesName" class="jobText">{{ worktypesName }}</view>
2024-02-02 14:44:30 +08:00
<view v-else class="jobText nochoose">请选择</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
</view>
<view class="border"></view>
<view class="jobcontent" @click="skillLevel">
<view class="jobinfo">
<view class="jobAddress">
2024-03-27 09:41:54 +08:00
期望岗位
2024-02-02 14:44:30 +08:00
</view>
2024-02-17 09:42:41 +08:00
<view v-if="skillsName" class="jobText">{{ skillsName }}</view>
2024-02-02 14:44:30 +08:00
<view v-else class="jobText nochoose">请选择</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
</view>
<view class="border"></view>
<view class="btn">
2024-02-17 09:42:41 +08:00
<view v-if="skillsName" class="bottombtn" @click="submit">确定</view>
2024-02-02 14:44:30 +08:00
<view v-else class="bottombtn disabledBtn">确定</view>
</view>
</view>
</template>
<script>
2024-02-17 09:42:41 +08:00
import {
addSkills
} from '@/api/resume.js'
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
export default {
data() {
return {
tradeId: '',
tradeName: '',
worktypesId: '',
worktypesName: '',
skillsId: '',
skillsName: '',
}
},
onLoad(query) {
uni.$off('setInd')
uni.$on('setInd', ({
id,
name
}) => {
this.tradeId = id
this.tradeName = name
this.worktypesId = ''
this.worktypesName = ''
this.skillsId = ''
this.skillsName = ''
})
uni.$off('setworkTypes')
uni.$on('setworkTypes', ({
detail
}) => {
console.log(detail, "id,name");
// this.worktypesId = id
this.worktypesName = detail.parentLabel + "-" + detail.label
// this.skillsId = ''
// this.skillsName = ''
})
uni.$off('setSkill')
uni.$on('setSkill', ({
detail
}) => {
2024-03-29 14:53:16 +08:00
console.log('detail,', detail)
2024-02-17 09:42:41 +08:00
// this.skillsId = id
2024-03-29 14:53:16 +08:00
this.skillsName = `${detail.parentLabel}-${detail.parentTwoLabel}-${detail.label}`
2024-02-17 09:42:41 +08:00
})
},
methods: {
goAddind: function () {
uni.navigateTo({
url: './addInd?id=' + this.tradeId
2024-02-02 14:44:30 +08:00
})
},
2024-02-17 09:42:41 +08:00
skill: function () {
2024-03-25 22:07:09 +08:00
// if (this.tradeId) {
2024-03-29 14:53:16 +08:00
uni.navigateTo({
url: `./skill?id=${this.worktypesId}&tradeId=${this.tradeId}&maxLayer=2&type=1`
})
2024-03-25 22:07:09 +08:00
// } else {
// uni.showToast({
// title: '请先选择从事的行业',
// icon: 'none'
// });
// }
2024-02-17 09:42:41 +08:00
},
skillLevel: function () {
2024-03-25 22:07:09 +08:00
2024-03-29 14:53:16 +08:00
uni.navigateTo({
url: `./skillLevel?id=${this.skillsId}&worktypesId=${this.worktypesId}&maxLayer=3&type=2`
})
2024-02-17 09:42:41 +08:00
},
2024-03-29 14:53:16 +08:00
submit: async function () {
// console.log(this.tradeName, this.worktypesName, this.skillsName);
2024-02-17 09:42:41 +08:00
let result = this.worktypesName.split('-');
let result1 = this.skillsName.split('-');
2024-03-29 14:53:16 +08:00
2024-02-17 09:42:41 +08:00
// 工种
2024-03-29 14:53:16 +08:00
await addSkills(this.tradeName, result[0], result[1], 0)
2024-02-17 09:42:41 +08:00
// 岗位
2024-03-29 14:53:16 +08:00
await addSkills(this.tradeName, `${result1[0]}${result1[1]}`, result1[2], 1)
uni.navigateBack()
2024-02-02 14:44:30 +08:00
}
}
2024-02-17 09:42:41 +08:00
}
2024-02-02 14:44:30 +08:00
</script>
<style>
2024-02-17 09:42:41 +08:00
.slo {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
padding: 0 30rpx;
padding-top: 10rpx;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.titles {
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #333333;
padding: 0 30rpx;
padding-top: 30rpx;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.border {
margin-left: 30rpx;
width: 720rpx;
border-bottom: 2rpx solid #ddd;
opacity: 0.6;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.jobText {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #666666;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.nochoose {
color: #ccc;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.jobAddress {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #999999;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.jobcontent {
padding: 30rpx;
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
background: #fefefe;
display: flex;
/* align-items: center; */
align-items: flex-end;
justify-content: space-between;
line-height: 63rpx;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.jobcontent image {
width: 40rpx;
height: 40rpx;
margin-bottom: 5px;
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.listBody {}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.list_text {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #666666;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.list image {
width: 40rpx;
height: 40rpx;
margin-left: auto;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.list {
padding: 0 30rpx;
height: 126rpx;
background: #fefefe;
display: flex;
align-items: center;
justify-content: space-between;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.title image {
width: 40rpx;
height: 40rpx;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.title {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
display: flex;
padding: 10rpx 30rpx;
background-color: #fefefe;
align-items: center;
justify-content: space-between;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.userInfo {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #999999;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.name {
margin-left: 20rpx;
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #333333;
line-height: 50rpx;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.head image:last-child {
width: 40rpx;
height: 40rpx;
margin-left: auto;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.head image {
width: 100rpx;
height: 100rpx;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.head {
padding: 30rpx;
width: 690rpx;
background-color: #fefefe;
display: flex;
align-items: center;
justify-content: flex-start;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.bottombtn {
background-color: #1b66ff;
color: #fff;
text-align: center;
border-radius: 10rpx;
font-family: PingFangSC-Medium;
font-size: 32rpx;
height: 90rpx;
line-height: 90rpx;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.btn {
background-color: #fefefe;
width: 690rpx;
padding: 30rpx;
padding-bottom: 80rpx;
position: fixed;
bottom: 0;
left: 0;
}
2024-02-02 14:44:30 +08:00
2024-02-17 09:42:41 +08:00
.disabledBtn {
background-color: #c8c9cc;
}
2024-02-02 14:44:30 +08:00
</style>