简历更新
This commit is contained in:
@@ -50,6 +50,21 @@ export const setLearn = (id, learnSkill) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*保存我的简历信息*/
|
||||||
|
export const setResume = ({id,education,wage,workplace,telephone}) => {
|
||||||
|
return request({
|
||||||
|
url: "/api/jobslink-api/user/user/resume/update",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
id,
|
||||||
|
education,
|
||||||
|
wage,
|
||||||
|
workplace,
|
||||||
|
telephone
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/*行业库*/
|
/*行业库*/
|
||||||
export const getTrade = () => {
|
export const getTrade = () => {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
:defaultIds="areaModal.defaultIds" :showToolbar="false" :showBottombar="true"
|
:defaultIds="areaModal.defaultIds" :showToolbar="false" :showBottombar="true"
|
||||||
:labelName="areaModal.labelName"></data-picker>
|
:labelName="areaModal.labelName"></data-picker>
|
||||||
<!-- 行业 -->
|
<!-- 行业 -->
|
||||||
<u-picker :show="industryModal.industryShow" :columns="industryModal.industry"></u-picker>
|
<u-picker @confirm="pickerIndustryFunc" @cancel="industryModal.industryShow = false" :show="industryModal.industryShow" :columns="industryModal.industry"></u-picker>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -283,8 +283,13 @@ export default {
|
|||||||
this.areaModal.address = [...new Set(val.value)].join(' / ')
|
this.areaModal.address = [...new Set(val.value)].join(' / ')
|
||||||
console.log(this.areaModal.address);
|
console.log(this.areaModal.address);
|
||||||
this.areaModal.addressShow = false
|
this.areaModal.addressShow = false
|
||||||
|
},
|
||||||
|
pickerIndustryFunc(val) {
|
||||||
|
console.log(val);
|
||||||
|
this.industryModal.industryShow = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<view class="title_text">
|
<view class="title_text">
|
||||||
我的职业技能
|
我的职业技能
|
||||||
</view>
|
</view>
|
||||||
<image v-if="mySkills.length < 10" src="../../../static/img/add.gray.svg" mode="" @click="goAdd"></image>
|
<image v-if="mySkills.length < 5" src="../../../static/img/add.gray.svg" mode="" @click="goAdd"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="listBody">
|
<view class="listBody">
|
||||||
@@ -36,73 +36,58 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="jobcontent" @click="goSetCity">
|
<view class="jobcontent" @click="goSetCity">
|
||||||
<view class="jobinfo">
|
<view class="jobinfo">
|
||||||
<view class="jobAddress">
|
<view
|
||||||
|
v-bind:class="['jobAddress', { 'input-error': (!myResume.city.id || !myResume.city.workplace) && isShowBorder }]">
|
||||||
您想工作的地点
|
您想工作的地点
|
||||||
</view>
|
</view>
|
||||||
<view v-bind:class="['jobText', { nochoose: !myResume.cityId }]">
|
<view v-bind:class="['jobText']">
|
||||||
{{ myResume.cityId ? getCity(myResume.cityId) : '请选择' }}
|
{{ myResume.city == {} ? myResume.city.id ? getCity(myResume.city.id) : myResume.city.workplace : '请选择' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="../../../static/img/right.svg" mode=""></image>
|
<image src="../../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="jobcontent" @click="showPickerFunc('education')">
|
<view class="jobcontent" @click="showPickerFunc('education')">
|
||||||
<view class="jobinfo">
|
<view class="jobinfo">
|
||||||
<view class="jobAddress">
|
<view v-bind:class="['jobAddress', { 'input-error': !myResume.education.label && isShowBorder }]">
|
||||||
您的学历
|
您的学历
|
||||||
</view>
|
</view>
|
||||||
<view v-bind:class="['jobText', { nochoose: !myResume.cityId }]">
|
<view v-bind:class="['jobText']">
|
||||||
{{ myResume.education ? this.myResume.education : '请选择' }}
|
{{ myResume.education == {} ? myResume.education.label : '请选择' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="../../../static/img/right.svg" mode=""></image>
|
<image src="../../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="jobcontent" @click="showPickerFunc('wage')">
|
<view class="jobcontent" @click="showPickerFunc('wage')">
|
||||||
<view class="jobinfo">
|
<view class="jobinfo">
|
||||||
<view class="jobAddress">
|
<view v-bind:class="['jobAddress', { 'input-error': !myResume.wage && isShowBorder }]">
|
||||||
您的期望薪资
|
您的期望薪资
|
||||||
</view>
|
</view>
|
||||||
<view v-bind:class="['jobText', { nochoose: !myResume.cityId }]">
|
<view v-bind:class="['jobText']">
|
||||||
{{ myResume.wage ? this.myResume.wage : '请选择' }}
|
{{ myResume.wage ? myResume.wage : '请选择' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="../../../static/img/right.svg" mode=""></image>
|
<image src="../../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="jobcontent" @click="goSetCity">
|
<view class="jobcontent">
|
||||||
<view class="jobinfo">
|
<view class="jobinfo">
|
||||||
<view class="jobAddress">
|
<view v-bind:class="['jobAddress', { 'input-error': !myResume.phone && isShowBorder }]">
|
||||||
您的期望薪资
|
|
||||||
</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>
|
||||||
<view v-bind:class="['jobText', { nochoose: !myResume.cityId }]">
|
<u--input :value="myResume.phone" @focus="setPhoneFunc1" @change="setPhoneFunc" type="number"
|
||||||
{{ myResume.cityId ? getCity(myResume.cityId) : '请选择' }}
|
placeholder="请输入您的电话" border="none" clearable></u--input>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<image src="../../../static/img/right.svg" mode=""></image>
|
</view>
|
||||||
</view> -->
|
|
||||||
<view class="border"></view>
|
|
||||||
<!--<view class="jobcontent" @click="goWantSkill">
|
|
||||||
<view class="jobinfo">
|
|
||||||
<view class="jobAddress">
|
|
||||||
我想学习的技能(选填)
|
|
||||||
</view>
|
|
||||||
<view class="jobText" v-bind:class="myResume.learnSkill?'':'nochoose'">
|
|
||||||
{{myResume.learnSkill?myResume.learnSkill:'请填写'}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<image src="../../../static/img/right.svg" mode=""></image>
|
|
||||||
</view>-->
|
|
||||||
|
|
||||||
<u-picker @confirm="pickerButtonFunc" @cancel="showPicker = false" :show="showPicker" :columns="columns"></u-picker>
|
<view v-if="isShowButton" class="saveWrapper">
|
||||||
|
<u-button @click="subMitResume" type="primary" shape="circle" text="保存"></u-button>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="border"></view>
|
||||||
|
|
||||||
|
<u-picker @confirm="pickerButtonFunc" @cancel="showPicker = false" :show="showPicker" :columns="columns"
|
||||||
|
keyName="label"></u-picker>
|
||||||
|
|
||||||
|
<u-toast ref="uToast"></u-toast>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -115,7 +100,8 @@ import {
|
|||||||
myResume,
|
myResume,
|
||||||
removeSkills,
|
removeSkills,
|
||||||
setCity,
|
setCity,
|
||||||
setLearn
|
setLearn,
|
||||||
|
setResume
|
||||||
} from '@/api/resume.js';
|
} from '@/api/resume.js';
|
||||||
import mSlideList from '@/components/mark-slide-list/mark-slide-list.vue';
|
import mSlideList from '@/components/mark-slide-list/mark-slide-list.vue';
|
||||||
import controller from '@/components/mark-slide-list/controller';
|
import controller from '@/components/mark-slide-list/controller';
|
||||||
@@ -127,9 +113,15 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
controller: new controller(),
|
controller: new controller(),
|
||||||
myResume: {},
|
myResume: {
|
||||||
|
city: {},
|
||||||
|
education: {},
|
||||||
|
wage: "",
|
||||||
|
phone: "",
|
||||||
|
},
|
||||||
mySkills: [],
|
mySkills: [],
|
||||||
id: '',
|
id: '1298609524179660801',
|
||||||
|
// id: '',
|
||||||
buttonList: [{
|
buttonList: [{
|
||||||
title: '删除',
|
title: '删除',
|
||||||
background: '#ff3b32',
|
background: '#ff3b32',
|
||||||
@@ -137,25 +129,46 @@ export default {
|
|||||||
}],
|
}],
|
||||||
showPicker: false,
|
showPicker: false,
|
||||||
showType: "",
|
showType: "",
|
||||||
columns: [
|
columns: [[]],
|
||||||
['MBA/EMBA', '博士', '硕士', '本科', '大专', '高中', '中专/中技'
|
|
||||||
, '初中及以下', '不限'
|
canSubMit: false,
|
||||||
]
|
isShowButton: false,
|
||||||
],
|
isShowBorder: false,
|
||||||
|
isShowAddSkill: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getResume()
|
|
||||||
this.getSkill()
|
this.getSkill()
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getResume()
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userInfo', 'auth'])
|
...mapGetters(['userInfo', 'auth'])
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
myResume: {
|
||||||
|
handler: function (newVal, oldVal) {
|
||||||
|
if (newVal.city && newVal.education && newVal.wage && newVal.phone) {
|
||||||
|
this.canSubMit = true;
|
||||||
|
} else {
|
||||||
|
this.canSubMit = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getResume() {
|
getResume() {
|
||||||
myResume().then(res => {
|
myResume().then(res => {
|
||||||
const data = res.data.data
|
const data = res.data.data
|
||||||
this.myResume = data
|
this.myResume = {
|
||||||
|
city: { workplace: data.workplace },
|
||||||
|
education: { label: data.education },
|
||||||
|
wage: data.wage,
|
||||||
|
phone: data.telephone
|
||||||
|
}
|
||||||
|
this.isShowButton = false;
|
||||||
if (data && data.id) {
|
if (data && data.id) {
|
||||||
this.id = data.id
|
this.id = data.id
|
||||||
}
|
}
|
||||||
@@ -191,11 +204,12 @@ export default {
|
|||||||
uni.$off('setCity')
|
uni.$off('setCity')
|
||||||
uni.$on('setCity', ({ detail }) => {
|
uni.$on('setCity', ({ detail }) => {
|
||||||
console.log(detail, '---------------');
|
console.log(detail, '---------------');
|
||||||
|
this.isShowButton = true
|
||||||
setCity(this.id, detail.parentLabel + '-' + detail.label).then(res => {
|
this.myResume.city = detail
|
||||||
this.myResume.cityId = detail.id
|
// setCity(this.id, detail.parentLabel + '-' + detail.label).then(res => {
|
||||||
this.getResume()
|
// this.myResume.cityId = detail.id
|
||||||
})
|
// this.getResume()
|
||||||
|
// })
|
||||||
})
|
})
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/setCity/setCity?maxLayer=2`
|
url: `/pages/setCity/setCity?maxLayer=2`
|
||||||
@@ -233,29 +247,79 @@ export default {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case "education":
|
case "education":
|
||||||
this.columns =
|
this.columns =
|
||||||
[['MBA/EMBA', '博士', '硕士', '本科', '大专', '高中', '中专/中技'
|
[[
|
||||||
, '初中及以下', '不限'
|
{ label: 'MBA/EMBA', value: 0 }, { label: '博士', value: 1 }, { label: '硕士', value: 2 }, { label: '本科', value: 3 },
|
||||||
|
{ label: '大专', value: 4 }, { label: '高中', value: 5 }, { label: '中专/中技', value: 6 }, { label: '初中及以下,', value: 7 },
|
||||||
|
{ label: '不限', value: 8 }
|
||||||
]]
|
]]
|
||||||
break;
|
break;
|
||||||
case "wage":
|
case "wage":
|
||||||
this.columns =[['10-15元/小时', '16-20元/小时', '21-25元/小时', '26-30元/小时', '30元/小时以上', '100-150元/天', '151-200元/天'
|
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元(含)/月",
|
, '201-250元/天', '251-300元/天', "300元/天以上", "2000元(含)以下/月", "2000-5000元(含)/月", "5000-8000元(含)/月",
|
||||||
"8000-10000元(含)/月","10000-15000元(含)/月","15000-20000元(含)/月","20000-25000元(含)/月","25000-30000元(含)/月","30000元以上/月","面议、暂无要求"
|
"8000-10000元(含)/月", "10000-15000元(含)/月", "15000-20000元(含)/月", "20000-25000元(含)/月", "25000-30000元(含)/月", "30000元以上/月", "面议、暂无要求"
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
this.isShowButton = true;
|
||||||
this.showPicker = true;
|
this.showPicker = true;
|
||||||
},
|
},
|
||||||
pickerButtonFunc(e) {
|
pickerButtonFunc(e) {
|
||||||
console.log(e, this.myResume, this.myResume[this.showType]);
|
console.log(e, this.myResume, this.myResume[this.showType]);
|
||||||
this.myResume[this.showType] = e.value[0];
|
this.myResume[this.showType] = e.value[0];
|
||||||
this.showPicker = false;
|
this.showPicker = false;
|
||||||
|
},
|
||||||
|
setPhoneFunc(e) {
|
||||||
|
this.myResume.phone = e;
|
||||||
|
},
|
||||||
|
setPhoneFunc1(e) {
|
||||||
|
this.isShowButton = true;
|
||||||
|
},
|
||||||
|
showToast(text) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
type: 'error',
|
||||||
|
icon: false,
|
||||||
|
title: '失败主题',
|
||||||
|
message: text,
|
||||||
|
iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
subMitResume() {
|
||||||
|
console.log(this.myResume);
|
||||||
|
this.isShowBorder = true;
|
||||||
|
if (!this.canSubMit) return;
|
||||||
|
const { city, education, phone, wage } = this.myResume
|
||||||
|
// 中国大陆手机号码正则表达式
|
||||||
|
const mobileRegex = /\b(1[3-9]\d{9})\b/;
|
||||||
|
// 中国大陆座机号码正则表达式
|
||||||
|
const landlineRegex = /\b(0\d{2,3}-\d{7,8}(-\d{1,4})?)\b/;
|
||||||
|
|
||||||
|
|
||||||
|
if (mobileRegex.test(phone) || landlineRegex.test(phone)) {
|
||||||
|
// 电话号码格式正确
|
||||||
|
console.log(phone, "电话号码格式正确");
|
||||||
|
setResume({
|
||||||
|
id: this.id, education: education.label, workplace: city.parentLabel + '-' + city.label, telephone: phone, wage
|
||||||
|
}).then(res => {
|
||||||
|
this.isShowButton = false;
|
||||||
|
this.getResume()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 电话号码格式不正确
|
||||||
|
console.log(phone, "电话号码格式不正确");
|
||||||
|
this.showToast("电话号码格式不正确");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -284,7 +348,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nochoose {
|
.nochoose {
|
||||||
color: #ccc;
|
/* color: #ccc; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.jobcontent {
|
.jobcontent {
|
||||||
@@ -294,6 +358,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
line-height: 63rpx;
|
line-height: 63rpx;
|
||||||
|
border: 1px solid #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jobcontent image {
|
.jobcontent image {
|
||||||
@@ -381,4 +446,16 @@ page {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.saveWrapper {
|
||||||
|
width: 80%;
|
||||||
|
padding: 20rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.input-error {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user