招聘筛选及简历更新

This commit is contained in:
dengxin
2024-02-17 09:42:41 +08:00
parent a4aaf7856c
commit ef2e6dec38
13 changed files with 1464 additions and 941 deletions

View File

@@ -11,7 +11,7 @@
<view class="jobAddress">
我从事的行业
</view>
<view v-if="tradeName" class="jobText">{{tradeName}}</view>
<view v-if="tradeName" class="jobText">{{ tradeName }}</view>
<view v-else class="jobText nochoose">请选择</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
@@ -22,7 +22,7 @@
<view class="jobAddress">
我具备的技能
</view>
<view v-if="worktypesName" class="jobText">{{worktypesName}}</view>
<view v-if="worktypesName" class="jobText">{{ worktypesName }}</view>
<view v-else class="jobText nochoose">请选择</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
@@ -33,265 +33,274 @@
<view class="jobAddress">
我的技能水平
</view>
<view v-if="skillsName" class="jobText">{{skillsName}}</view>
<view v-if="skillsName" class="jobText">{{ skillsName }}</view>
<view v-else class="jobText nochoose">请选择</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
</view>
<view class="border"></view>
<view class="btn">
<view v-if="skillsId " class="bottombtn" @click="submit">确定</view>
<view v-if="skillsName" class="bottombtn" @click="submit">确定</view>
<view v-else class="bottombtn disabledBtn">确定</view>
</view>
</view>
</template>
<script>
import {
addSkills
} from '@/api/resume.js'
import {
addSkills
} from '@/api/resume.js'
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', ({
id,
name
}) => {
this.worktypesId = id
this.worktypesName = name
this.skillsId = ''
this.skillsName = ''
})
uni.$off('setSkill')
uni.$on('setSkill', ({
id,
name
}) => {
this.skillsId = id
this.skillsName = name
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
}) => {
// this.skillsId = id
this.skillsName = detail.parentLabel + "-" + detail.label
})
},
methods: {
goAddind: function () {
uni.navigateTo({
url: './addInd?id=' + this.tradeId
})
},
methods: {
goAddind: function() {
skill: function () {
if (this.tradeId) {
uni.navigateTo({
url: './addInd?id=' + this.tradeId
url: `./skill?id=${this.worktypesId}&tradeId=${this.tradeId}&maxLayer=2&type=1`
})
},
skill: function() {
if (this.tradeId) {
uni.navigateTo({
url: `./skill?id=${this.worktypesId}&tradeId=${this.tradeId}`
})
} else {
uni.showToast({
title: '请先选择从事的行业',
icon: 'none'
});
}
},
skillLevel: function() {
if (!this.tradeId) {
uni.showToast({
title: '请先选择从事的行业',
icon: 'none'
});
} else if (!this.worktypesId) {
uni.showToast({
title: '请先选择具备的技能',
icon: 'none'
});
} else {
uni.navigateTo({
url: `./skillLevel?id=${this.skillsId}&worktypesId=${this.worktypesId}`
})
}
},
submit: function() {
addSkills(this.tradeName, this.worktypesName, this.skillsName).then(res => {
uni.navigateBack()
} else {
uni.showToast({
title: '请先选择从事的行业',
icon: 'none'
});
}
},
skillLevel: function () {
if (!this.tradeId) {
uni.showToast({
title: '请先选择从事的行业',
icon: 'none'
});
} else if (!this.worktypesName) {
uni.showToast({
title: '请先选择具备的技能',
icon: 'none'
});
} else {
uni.navigateTo({
url: `./skillLevel?id=${this.skillsId}&worktypesId=${this.worktypesId}&maxLayer=2&type=2`
})
}
},
submit: function () {
console.log(this.tradeName, this.worktypesName, this.skillsName);
let result = this.worktypesName.split('-');
let result1 = this.skillsName.split('-');
console.log(result, result1);
// 工种
addSkills(this.tradeName, result[0], result[1], 0).then(res => {
uni.navigateBack()
})
// 岗位
addSkills(this.tradeName, result1[0], result1[1], 1).then(res => {
uni.navigateBack()
})
}
}
}
</script>
<style>
.slo {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
.slo {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
padding: 0 30rpx;
padding-top: 10rpx;
}
padding: 0 30rpx;
padding-top: 10rpx;
}
.titles {
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #333333;
padding: 0 30rpx;
padding-top: 30rpx;
}
.titles {
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #333333;
padding: 0 30rpx;
padding-top: 30rpx;
}
.border {
margin-left: 30rpx;
width: 720rpx;
border-bottom: 2rpx solid #ddd;
opacity: 0.6;
}
.border {
margin-left: 30rpx;
width: 720rpx;
border-bottom: 2rpx solid #ddd;
opacity: 0.6;
}
.jobText {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #666666;
}
.jobText {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #666666;
}
.nochoose {
color: #ccc;
}
.nochoose {
color: #ccc;
}
.jobAddress {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #999999;
}
.jobAddress {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #999999;
}
.jobcontent {
padding: 30rpx;
.jobcontent {
padding: 30rpx;
background: #fefefe;
display: flex;
/* align-items: center; */
align-items: flex-end;
justify-content: space-between;
line-height: 63rpx;
}
background: #fefefe;
display: flex;
/* align-items: center; */
align-items: flex-end;
justify-content: space-between;
line-height: 63rpx;
}
.jobcontent image {
width: 40rpx;
height: 40rpx;
margin-bottom: 5px;
.jobcontent image {
width: 40rpx;
height: 40rpx;
margin-bottom: 5px;
}
}
.listBody {}
.listBody {}
.list_text {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #666666;
}
.list_text {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #666666;
}
.list image {
width: 40rpx;
height: 40rpx;
margin-left: auto;
}
.list image {
width: 40rpx;
height: 40rpx;
margin-left: auto;
}
.list {
padding: 0 30rpx;
height: 126rpx;
background: #fefefe;
display: flex;
align-items: center;
justify-content: space-between;
}
.list {
padding: 0 30rpx;
height: 126rpx;
background: #fefefe;
display: flex;
align-items: center;
justify-content: space-between;
}
.title image {
width: 40rpx;
height: 40rpx;
}
.title image {
width: 40rpx;
height: 40rpx;
}
.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;
}
.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;
}
.userInfo {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #999999;
}
.userInfo {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #999999;
}
.name {
margin-left: 20rpx;
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #333333;
line-height: 50rpx;
}
.name {
margin-left: 20rpx;
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #333333;
line-height: 50rpx;
}
.head image:last-child {
width: 40rpx;
height: 40rpx;
margin-left: auto;
}
.head image:last-child {
width: 40rpx;
height: 40rpx;
margin-left: auto;
}
.head image {
width: 100rpx;
height: 100rpx;
}
.head image {
width: 100rpx;
height: 100rpx;
}
.head {
padding: 30rpx;
width: 690rpx;
background-color: #fefefe;
display: flex;
align-items: center;
justify-content: flex-start;
}
.head {
padding: 30rpx;
width: 690rpx;
background-color: #fefefe;
display: flex;
align-items: center;
justify-content: flex-start;
}
.bottombtn {
background-color: #1b66ff;
color: #fff;
text-align: center;
border-radius: 10rpx;
font-family: PingFangSC-Medium;
font-size: 32rpx;
height: 90rpx;
line-height: 90rpx;
}
.bottombtn {
background-color: #1b66ff;
color: #fff;
text-align: center;
border-radius: 10rpx;
font-family: PingFangSC-Medium;
font-size: 32rpx;
height: 90rpx;
line-height: 90rpx;
}
.btn {
background-color: #fefefe;
width: 690rpx;
padding: 30rpx;
padding-bottom: 80rpx;
position: fixed;
bottom: 0;
left: 0;
}
.btn {
background-color: #fefefe;
width: 690rpx;
padding: 30rpx;
padding-bottom: 80rpx;
position: fixed;
bottom: 0;
left: 0;
}
.disabledBtn {
background-color: #c8c9cc;
}
.disabledBtn {
background-color: #c8c9cc;
}
</style>

View File

@@ -6,7 +6,7 @@
<view class="name">
<view class="userName">
{{auth.authInfo.realName}}
{{ auth.authInfo.realName }}
</view>
<view class="userInfo">
个人基本信息
@@ -19,16 +19,17 @@
<view class="title_text">
我的职业技能
</view>
<image v-if="mySkills.length<10" src="../../../static/img/add.gray.svg" mode="" @click="goAdd"></image>
<image v-if="mySkills.length < 10" src="../../../static/img/add.gray.svg" mode="" @click="goAdd"></image>
</view>
<view class="listBody">
<m-slide-list @controller-reg="controller.reg" @controller-moving="controller.moving" @controller-opened="controller.opened"
@controller-closed="controller.closed" @remove="removeSkills(item.id,index)" v-for="(item,index) in mySkills" :key="item.id"
:button="buttonList">
<m-slide-list @controller-reg="controller.reg" @controller-moving="controller.moving"
@controller-opened="controller.opened" @controller-closed="controller.closed"
@remove="removeSkills(item.id, index)" v-for="(item, index) in mySkills" :key="item.id"
:button="buttonList">
<view class="list">
<view class="list_text">
{{item.trade}}·{{item.worktypes}}·{{item.skills}}
{{ item.trade }}·{{ item.worktypes }}·{{ item.skills }}
</view>
</view>
</m-slide-list>
@@ -38,12 +39,56 @@
<view class="jobAddress">
您想工作的地点
</view>
<view v-bind:class="['jobText',{nochoose: !myResume.cityId}]">
{{myResume.cityId ? getCity(myResume.cityId) : '请选择'}}
<view v-bind:class="['jobText', { nochoose: !myResume.cityId }]">
{{ myResume.cityId ? getCity(myResume.cityId) : '请选择' }}
</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
</view>
<view class="jobcontent" @click="showPickerFunc('education')">
<view class="jobinfo">
<view class="jobAddress">
您的学历
</view>
<view v-bind:class="['jobText', { nochoose: !myResume.cityId }]">
{{ myResume.education ? this.myResume.education : '请选择' }}
</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
</view>
<view class="jobcontent" @click="showPickerFunc('wage')">
<view class="jobinfo">
<view class="jobAddress">
您的期望薪资
</view>
<view v-bind:class="['jobText', { nochoose: !myResume.cityId }]">
{{ myResume.wage ? this.myResume.wage : '请选择' }}
</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
</view>
<!-- <view class="jobcontent" @click="goSetCity">
<view class="jobinfo">
<view class="jobAddress">
您的期望薪资
</view>
<view v-bind:class="['jobText', { nochoose: !myResume.cityId }]">
{{ myResume.cityId ? getCity(myResume.cityId) : '请选择' }}
</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
</view>
<view class="jobcontent" @click="goSetCity">
<view class="jobinfo">
<view class="jobAddress">
您的联系方式
</view>
<view v-bind:class="['jobText', { nochoose: !myResume.cityId }]">
{{ myResume.cityId ? getCity(myResume.cityId) : '请选择' }}
</view>
</view>
<image src="../../../static/img/right.svg" mode=""></image>
</view> -->
<view class="border"></view>
<!--<view class="jobcontent" @click="goWantSkill">
<view class="jobinfo">
@@ -56,244 +101,284 @@
</view>
<image src="../../../static/img/right.svg" mode=""></image>
</view>-->
<u-picker @confirm="pickerButtonFunc" @cancel="showPicker = false" :show="showPicker" :columns="columns"></u-picker>
</view>
</template>
<script>
import {
mapGetters
} from 'vuex'
import {
mySkills,
myResume,
removeSkills,
setCity,
setLearn
} from '@/api/resume.js';
import mSlideList from '@/components/mark-slide-list/mark-slide-list.vue';
import controller from '@/components/mark-slide-list/controller';
import {
mapGetters
} from 'vuex'
import {
mySkills,
myResume,
removeSkills,
setCity,
setLearn
} from '@/api/resume.js';
import mSlideList from '@/components/mark-slide-list/mark-slide-list.vue';
import controller from '@/components/mark-slide-list/controller';
export default {
components: {
mSlideList
export default {
components: {
mSlideList
},
data() {
return {
controller: new controller(),
myResume: {},
mySkills: [],
id: '',
buttonList: [{
title: '删除',
background: '#ff3b32',
clickName: 'remove'
}],
showPicker: false,
showType: "",
columns: [
['MBA/EMBA', '博士', '硕士', '本科', '大专', '高中', '中专/中技'
, '初中及以下', '不限'
]
],
}
},
onShow() {
this.getResume()
this.getSkill()
},
computed: {
...mapGetters(['userInfo', 'auth'])
},
methods: {
getResume() {
myResume().then(res => {
const data = res.data.data
this.myResume = data
if (data && data.id) {
this.id = data.id
}
});
},
data() {
return {
controller: new controller(),
myResume: {},
mySkills: [],
id: '',
buttonList: [{
title: '删除',
background: '#ff3b32',
clickName: 'remove'
}]
}
getSkill() {
mySkills().then(res => {
this.mySkills = res.data.data;
})
},
onShow() {
this.getResume()
this.getSkill()
},
computed: {
...mapGetters(['userInfo', 'auth'])
},
methods: {
getResume() {
myResume().then(res => {
const data = res.data.data
this.myResume = data
if (data && data.id) {
this.id = data.id
}
});
},
getSkill() {
mySkills().then(res => {
this.mySkills = res.data.data;
goWantSkill: function () {
uni.$off('getWantSkill')
uni.$once('getWantSkill', (cb) => {
cb(this.myResume.learnSkill)
})
uni.$off('setWantSkill')
uni.$once('setWantSkill', ({
skill,
done
}) => {
setLearn(this.id, skill).then(res => {
uni.navigateBack()
}).catch(() => {
done && done()
})
},
goWantSkill: function() {
uni.$off('getWantSkill')
uni.$once('getWantSkill', (cb) => {
cb(this.myResume.learnSkill)
})
uni.$off('setWantSkill')
uni.$once('setWantSkill', ({
skill,
done
}) => {
setLearn(this.id, skill).then(res => {
uni.navigateBack()
}).catch(() => {
done && done()
})
this.getResume()
})
uni.navigateTo({
url: './setWskill?id=' + this.id
})
},
goSetCity: function () {
uni.$off('setCity')
uni.$on('setCity', ({ detail }) => {
console.log(detail, '---------------');
setCity(this.id, detail.parentLabel + '-' + detail.label).then(res => {
this.myResume.cityId = detail.id
this.getResume()
})
uni.navigateTo({
url: './setWskill?id=' + this.id
})
},
goSetCity: function() {
uni.$off('setCity')
uni.$on('setCity', (id) => {
setCity(this.id, id).then(res => {
this.myResume.cityId = id
this.getResume()
})
})
uni.navigateTo({
url: `/pages/setCity/setCity?maxLayer=2`
})
},
goAdd: function() {
uni.navigateTo({
url: './addSkill'
})
},
goUserBase: function() {
uni.navigateTo({
url: '../userBase'
})
},
getCity: function(val) {
if (val) {
let areas = this.$store.getters.getAreaParents(val)
if (areas.length) {
return areas[0].label + '-' + areas[1].label
}
})
uni.navigateTo({
url: `/pages/setCity/setCity?maxLayer=2`
})
},
goAdd: function () {
uni.navigateTo({
url: './addSkill'
})
},
goUserBase: function () {
uni.navigateTo({
url: '../userBase'
})
},
getCity: function (val) {
if (val) {
let areas = this.$store.getters.getAreaParents(val)
if (areas.length) {
return areas[0].label + '-' + areas[1].label
}
},
removeSkills: function(id, index) {
removeSkills(id).then(res => {
uni.showToast({
title: '操作成功',
icon: 'none'
});
this.mySkills.splice(index, 1)
})
}
},
removeSkills: function (id, index) {
removeSkills(id).then(res => {
uni.showToast({
title: '操作成功',
icon: 'none'
});
this.mySkills.splice(index, 1)
})
},
showPickerFunc(type) {
this.showType = type;
switch (type) {
case "education":
this.columns =
[['MBA/EMBA', '博士', '硕士', '本科', '大专', '高中', '中专/中技'
, '初中及以下', '不限'
]]
break;
case "wage":
this.columns =[['10-15元/小时', '16-20元/小时', '21-25元/小时', '26-30元/小时', '30元/小时以上', '100-150元/天', '151-200元/天'
, '201-250元/天', '251-300元/天',"300元/天以上","2000元以下/月","2000-5000元/月","5000-8000元/月",
"8000-10000元/月","10000-15000元/月","15000-20000元/月","20000-25000元/月","25000-30000元/月","30000元以上/月","面议、暂无要求"
]]
break;
default:
break;
}
this.showPicker = true;
},
pickerButtonFunc(e) {
console.log(e, this.myResume, this.myResume[this.showType]);
this.myResume[this.showType] = e.value[0];
this.showPicker = false;
}
}
}
</script>
<style>
.border {
margin-left: 30rpx;
width: 720rpx;
border: 1rpx solid #f2f2f2;
.border {
margin-left: 30rpx;
width: 720rpx;
border: 1rpx solid #f2f2f2;
/* height: 1rpx;
/* height: 1rpx;
background-color: #ddd; */
}
}
.jobText {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #666666;
}
.jobText {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #666666;
}
.jobAddress {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
}
.jobAddress {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
}
.nochoose {
color: #ccc;
}
.nochoose {
color: #ccc;
}
.jobcontent {
padding: 30rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: space-between;
line-height: 63rpx;
}
.jobcontent {
padding: 30rpx;
background: #fff;
display: flex;
align-items: center;
justify-content: space-between;
line-height: 63rpx;
}
.jobcontent image {
width: 40rpx;
height: 40rpx;
}
.jobcontent image {
width: 40rpx;
height: 40rpx;
}
.listBody {}
.listBody {}
.list_text {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #666666;
background: #ffffff;
overflow-y: auto;
white-space: nowrap;
}
.list_text {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #666666;
background: #ffffff;
overflow-y: auto;
white-space: nowrap;
}
.list image {
width: 40rpx;
height: 40rpx;
margin-left: auto;
}
.list image {
width: 40rpx;
height: 40rpx;
margin-left: auto;
}
.list {
padding: 0 15px 0 30rpx;
height: 126rpx;
line-height: 126rpx;
background: #fff;
border-bottom: 1px solid #f2f2f2;
}
.list {
padding: 0 15px 0 30rpx;
height: 126rpx;
line-height: 126rpx;
background: #fff;
border-bottom: 1px solid #f2f2f2;
}
.title image {
width: 40rpx;
height: 40rpx;
}
.title image {
width: 40rpx;
height: 40rpx;
}
.title {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
display: flex;
padding: 25rpx 30rpx;
/* padding-top: 30rpx; */
background-color: #fff;
align-items: center;
justify-content: space-between;
border: 1rpx solid #f2f2f2;
}
.title {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
display: flex;
padding: 25rpx 30rpx;
/* padding-top: 30rpx; */
background-color: #fff;
align-items: center;
justify-content: space-between;
border: 1rpx solid #f2f2f2;
}
.userInfo {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #999999;
}
.userInfo {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #999999;
}
.name {
margin-left: 20rpx;
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #333333;
line-height: 50rpx;
}
.name {
margin-left: 20rpx;
font-family: PingFangSC-Medium;
font-size: 36rpx;
color: #333333;
line-height: 50rpx;
}
.head image:last-child {
width: 40rpx;
height: 40rpx;
margin-left: auto;
}
.head image:last-child {
width: 40rpx;
height: 40rpx;
margin-left: auto;
}
.head image {
width: 100rpx;
height: 100rpx;
}
.head image {
width: 100rpx;
height: 100rpx;
}
page {
background-color: #f6f6f6;
}
page {
background-color: #f6f6f6;
}
.head {
padding: 30rpx;
width: 690rpx;
background-color: #fff;
display: flex;
align-items: center;
justify-content: flex-start;
}
.head {
padding: 30rpx;
width: 690rpx;
background-color: #fff;
display: flex;
align-items: center;
justify-content: flex-start;
}
</style>

View File

@@ -0,0 +1,51 @@
<template>
<select-template ref="select" title="请选择技能" slo="请选择最符合你能力的标签,标签会帮你定制个性化推荐任务信息" :list="skillLevel" search @submit="goAdd"></select-template>
</template>
<script>
import {
getWorktypes
} from '@/api/resume.js'
import selectTemplate from './selectTemplate.vue'
export default {
components: {
selectTemplate
},
data() {
return {
skillLevel: [],
tradeId: '',
id: ''
}
},
onLoad: function({
id,
tradeId
}) {
this.tradeId = tradeId
},
onShow: function() {
this.getData()
},
mounted() {
this.$refs.select.setActiveId(this.tradeId)
},
methods: {
getData: function() {
if (this.tradeId) {
getWorktypes(this.tradeId).then(res => {
this.skillLevel = res.data.data
})
}
},
goAdd(res) {
uni.$emit('setworkTypes', res)
uni.navigateBack()
}
}
}
</script>
<style>
</style>

View File

@@ -1,51 +1,182 @@
<template>
<select-template ref="select" title="请选择技能" slo="请选择最符合你能力的标签,标签会帮你定制个性化推荐任务信息" :list="skillLevel" search @submit="goAdd"></select-template>
<view>
<view class="title">
全部
</view>
<block v-for="(item, index) in city" :key="index">
<view class="cityList" @click="cityClick(item)">
{{ item.name }}
<image src="../../../static/img/correct.svg" v-if="id === item.id" mode=""></image>
<image v-else-if="layer !== maxLayer" src="../../../static/img/right.svg" mode=""></image>
</view>
</block>
<view class="" v-if="layer === maxLayer" style="height: 230rpx;background-color: #f6f6f6;"></view>
<view class="btn" v-if="layer === maxLayer" @click="comfirm">
<view class="bottombtn">
确定
</view>
</view>
</view>
</template>
<script>
import {
getWorktypes
} from '@/api/resume.js'
import selectTemplate from './selectTemplate.vue'
import {
getWorktypesList
} from '@/api/resume.js'
export default {
components: {
selectTemplate
},
data() {
return {
skillLevel: [],
tradeId: '',
id: ''
}
},
onLoad: function({
id,
tradeId
}) {
this.tradeId = tradeId
},
onShow: function() {
this.getData()
},
mounted() {
this.$refs.select.setActiveId(this.tradeId)
},
methods: {
getData: function() {
if (this.tradeId) {
getWorktypes(this.tradeId).then(res => {
this.skillLevel = res.data.data
})
export default {
data() {
return {
workTypeList: [],
choose: false,
chooseIndex: '',
parentId: undefined,
layer: 1,
maxLayer: 2,
id: '',
label: '',
tradeId: '',
}
},
computed: {
city() {
if (this.parentId) {
const parentItem = this.workTypeList.find(item => item.id == this.parentId);
if (parentItem) {
return parentItem.child;
}
},
goAdd(res) {
uni.$emit('setworkTypes', res)
uni.navigateBack()
} else {
return this.workTypeList;
}
}
},
mounted() {
getWorktypesList(1).then(res => {
this.workTypeList = res.data.data;
})
},
onLoad({
tradeId,
parentId,
layer,
maxLayer
}) {
this.parentId = parentId
this.tradeId = tradeId || 0
this.layer = parseInt(layer || 1)
this.maxLayer = parseInt(maxLayer || 2)
},
onShow: function () { },
methods: {
cityClick(item) {
if (this.layer === this.maxLayer) {
this.selectCity(item)
} else {
this.goCityInfo(item)
}
},
selectCity(item) {
console.log(item, "item");
this.id = item.id;
this.label = item.name;
},
goCityInfo(item) {
uni.navigateTo({
url: `./skill?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${item.id}&parentLabel=${item.name}`
})
},
comfirm: function () {
if (this.id) {
uni.$emit('setworkTypes', { detail: { id: this.id, label: this.label, parentLabel: this.$route.query.parentLabel } })
uni.navigateBack({
delta: this.layer
})
} else {
uni.showToast({
title: "请选择地点",
icon: "none"
})
}
},
}
}
</script>
<style>
.bottombtn {
background-color: #1B66FF;
color: #fff;
text-align: center;
border-radius: 10rpx;
font-family: PingFangSC-Medium;
font-size: 32rpx;
height: 90rpx;
line-height: 90rpx;
}
.btn {
background-color: #fefefe;
width: 690rpx;
padding: 30rpx;
padding-bottom: 80rpx;
position: fixed;
bottom: 0;
left: 0;
}
.cityList image {
width: 32rpx;
height: 32rpx;
}
.cityList {
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #333333;
padding: 30rpx;
padding-left: 0;
margin-left: 30rpx;
width: 690rpx;
border-bottom: 1rpx solid #dddddd;
}
.location {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #333333;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 30rpx;
}
.comfirm {
margin-left: auto;
}
.location image {
width: 40rpx;
height: 40rpx;
}
.title {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
background-color: #f6f6f6;
padding: 30rpx;
}
page {
background-color: #fefefe;
}
</style>

View File

@@ -1,55 +1,182 @@
<template>
<select-template ref="select" title="请选择技能水平" slo="请选择最符合你能力的标签,标签会帮你定制个性化推荐任务信息" :list="skillLevel" @submit="goAdd"></select-template>
<view>
<view class="title">
全部
</view>
<block v-for="(item, index) in city" :key="index">
<view class="cityList" @click="cityClick(item)">
{{ item.name }}
<image src="../../../static/img/correct.svg" v-if="id === item.id" mode=""></image>
<image v-else-if="layer !== maxLayer" src="../../../static/img/right.svg" mode=""></image>
</view>
</block>
<view class="" v-if="layer === maxLayer" style="height: 230rpx;background-color: #f6f6f6;"></view>
<view class="btn" v-if="layer === maxLayer" @click="comfirm">
<view class="bottombtn">
确定
</view>
</view>
</view>
</template>
<script>
import testData from '@/common/textdata.js';
import {
getSkills
} from '@/api/resume.js'
import selectTemplate from './selectTemplate.vue'
import {
getWorktypesList
} from '@/api/resume.js'
export default {
components: {
selectTemplate
},
data() {
return {
skillLevel: [],
worktypesId: null,
activeName: '',
activeId: '',
id: ''
export default {
data() {
return {
workTypeList: [],
choose: false,
chooseIndex: '',
parentId: undefined,
layer: 1,
maxLayer: 2,
id: '',
label: '',
tradeId: '',
}
},
computed: {
city() {
if (this.parentId) {
const parentItem = this.workTypeList.find(item => item.id == this.parentId);
if (parentItem) {
return parentItem.child;
}
} else {
return this.workTypeList;
}
}
},
mounted() {
getWorktypesList(2).then(res => {
this.workTypeList = res.data.data;
})
},
onLoad({
tradeId,
parentId,
layer,
maxLayer
}) {
this.parentId = parentId
this.tradeId = tradeId || 0
this.layer = parseInt(layer || 1)
this.maxLayer = parseInt(maxLayer || 2)
},
onShow: function () { },
methods: {
cityClick(item) {
if (this.layer === this.maxLayer) {
this.selectCity(item)
} else {
this.goCityInfo(item)
}
},
onLoad({
id,
worktypesId
}) {
this.id = id
this.worktypesId = worktypesId
selectCity(item) {
console.log(item, "item");
this.id = item.id;
this.label = item.name;
},
onShow: function() {
this.getData()
goCityInfo(item) {
uni.navigateTo({
url: `./skillLevel?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${item.id}&parentLabel=${item.name}`
})
},
mounted() {
this.$refs.select.setActiveId(this.id)
comfirm: function () {
if (this.id) {
uni.$emit('setSkill', { detail: { id: this.id, label: this.label, parentLabel: this.$route.query.parentLabel } })
uni.navigateBack({
delta: this.layer
})
} else {
uni.showToast({
title: "请选择地点",
icon: "none"
})
}
},
methods: {
getData: function() {
if (this.worktypesId) {
getSkills(this.worktypesId).then(res => {
this.skillLevel = res.data.data
})
}
},
goAdd(res) {
uni.$emit('setSkill', res)
uni.navigateBack()
},
}
}
}
</script>
<style>
.bottombtn {
background-color: #1B66FF;
color: #fff;
text-align: center;
border-radius: 10rpx;
font-family: PingFangSC-Medium;
font-size: 32rpx;
height: 90rpx;
line-height: 90rpx;
}
.btn {
background-color: #fefefe;
width: 690rpx;
padding: 30rpx;
padding-bottom: 80rpx;
position: fixed;
bottom: 0;
left: 0;
}
.cityList image {
width: 32rpx;
height: 32rpx;
}
.cityList {
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #333333;
padding: 30rpx;
padding-left: 0;
margin-left: 30rpx;
width: 690rpx;
border-bottom: 1rpx solid #dddddd;
}
.location {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #333333;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 30rpx;
}
.comfirm {
margin-left: auto;
}
.location image {
width: 40rpx;
height: 40rpx;
}
.title {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
background-color: #f6f6f6;
padding: 30rpx;
}
page {
background-color: #fefefe;
}
</style>