|
@@ -32,8 +32,8 @@
|
|
|
ref="intentionForm"
|
|
|
label-position="top"
|
|
|
>
|
|
|
- <u-form-item label="工作城市" prop="city" required>
|
|
|
- <u-input v-model="intentionForm.city" type="select" @click="workCityClick" placeholder="请选择工作城市"/>
|
|
|
+ <u-form-item label="工作城市" prop="cityName" required>
|
|
|
+ <u-input v-model="intentionForm.workCity" type="select" @click="workCityClick" placeholder="请选择工作城市"/>
|
|
|
<!-- <u-select v-model="cityShow" :list="cityList" @confirm="cityConfirm"></u-select> -->
|
|
|
<u-city-select v-if="cityShow" v-model="cityShow" :default-region="defaultRegion" @city-change="cityConfirm"/>
|
|
|
</u-form-item>
|
|
@@ -45,9 +45,13 @@
|
|
|
<u-input v-model="intentionForm.industry" type="select" @click="industryShow = true" placeholder="请选择期望行业"/>
|
|
|
<u-select v-model="industryShow" :list="industryList" @confirm="industryConfirm"></u-select>
|
|
|
</u-form-item> -->
|
|
|
- <u-form-item label="薪资要求" prop="salary" required>
|
|
|
- <u-input v-model="intentionForm.salary" type="select" @click="salaryShow = true" placeholder="请选择薪资要求"/>
|
|
|
- <u-select v-model="salaryShow" :list="salaryList" @confirm="salaryConfirm"></u-select>
|
|
|
+ <u-form-item label="最低薪资要求(k)" prop="expectedLowestSalary" required>
|
|
|
+ <u-input v-model="intentionForm.expectedLowestSalary" type="select" @click="lowestsalaryShow = true" placeholder="请选择薪资要求"/>
|
|
|
+ <u-select v-model="lowestsalaryShow" :list="salaryList" @confirm="salaryLowestConfirm" :default-value="[Number(intentionForm.expectedLowestSalary) - 1]"></u-select>
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item label="最高薪资要求(k)" prop="expectedHighestSalary" required>
|
|
|
+ <u-input v-model="intentionForm.expectedHighestSalary" type="select" @click="highestSalaryShow = true" placeholder="请选择薪资要求"/>
|
|
|
+ <u-select v-model="highestSalaryShow" :list="salaryList" @confirm="salaryHighestConfirm" :default-value="[Number(intentionForm.expectedHighestSalary) - 1]"></u-select>
|
|
|
</u-form-item>
|
|
|
</u-form>
|
|
|
<view class="evaluate-intention-intention-submit">
|
|
@@ -83,7 +87,6 @@
|
|
|
|
|
|
<script>
|
|
|
import { industry } from './industry.js';
|
|
|
- import { city } from './city.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -97,50 +100,67 @@
|
|
|
],
|
|
|
tabCur: 0,
|
|
|
intentionForm: {
|
|
|
- city: '',
|
|
|
+ provinceName: '',
|
|
|
+ provinceId: '',
|
|
|
+ cityName: '',
|
|
|
cityId: '',
|
|
|
- position: '',
|
|
|
- positionId: '',
|
|
|
- industry: '',
|
|
|
- industryId: '',
|
|
|
- salary: '',
|
|
|
- salaryId: ''
|
|
|
+ areaName : '',
|
|
|
+ areaId: '',
|
|
|
+ // position: '',
|
|
|
+ // positionId: '',
|
|
|
+ // industry: '',
|
|
|
+ // industryId: '',
|
|
|
+ expectedLowestSalary: '',
|
|
|
+ expectedHighestSalary: '',
|
|
|
+ workCity: ''
|
|
|
},
|
|
|
defaultRegion: [],
|
|
|
intentionRules: {
|
|
|
- city: [
|
|
|
+ cityName: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: '请选择您的工作城市',
|
|
|
trigger: ['change','blur']
|
|
|
}
|
|
|
],
|
|
|
- position: [
|
|
|
+ // position: [
|
|
|
+ // {
|
|
|
+ // required: true,
|
|
|
+ // message: '请选择您的期望职位',
|
|
|
+ // trigger: ['change', 'blur']
|
|
|
+ // }
|
|
|
+ // ],
|
|
|
+ // industry: [
|
|
|
+ // {
|
|
|
+ // required: true,
|
|
|
+ // message: '请选择您的期望行业',
|
|
|
+ // trigger: ['change', 'blur']
|
|
|
+ // }
|
|
|
+ // ],
|
|
|
+ expectedLowestSalary: [
|
|
|
{
|
|
|
- required: true,
|
|
|
- message: '请选择您的期望职位',
|
|
|
+ required: true,
|
|
|
+ message: '请选择您的最低薪资要求',
|
|
|
trigger: ['change', 'blur']
|
|
|
}
|
|
|
],
|
|
|
- industry: [
|
|
|
+ expectedHighestSalary: [
|
|
|
{
|
|
|
- required: true,
|
|
|
- message: '请选择您的期望行业',
|
|
|
+ required: true,
|
|
|
+ message: '请选择您的最高薪资要求',
|
|
|
trigger: ['change', 'blur']
|
|
|
- }
|
|
|
- ],
|
|
|
- salary: [
|
|
|
+ },
|
|
|
{
|
|
|
- required: true,
|
|
|
- message: '请选择您的期望薪资',
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
+ return Number(value) >= Number(this.intentionForm.expectedLowestSalary);
|
|
|
+ },
|
|
|
+ message: '最高薪资要求不能小于最低薪资要求',
|
|
|
trigger: ['change', 'blur']
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
// 城市下拉显示
|
|
|
cityShow: false,
|
|
|
- // 城市列表
|
|
|
- cityList: city,
|
|
|
// 职位下拉显示
|
|
|
positionShow: false,
|
|
|
// 职位列表
|
|
@@ -163,30 +183,10 @@
|
|
|
// 行业列表
|
|
|
industryList: industry,
|
|
|
// 薪资下拉显示
|
|
|
- salaryShow: false,
|
|
|
+ highestSalaryShow: false,
|
|
|
+ lowestsalaryShow: false,
|
|
|
// 薪资列表
|
|
|
- salaryList: [
|
|
|
- {
|
|
|
- value: 1,
|
|
|
- label: '1k ~ 3k'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 2,
|
|
|
- label: '3k ~ 5k'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 3,
|
|
|
- label: '5k ~ 7k'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 4,
|
|
|
- label: '7k ~ 10k'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 5,
|
|
|
- label: '10k ~ 以上'
|
|
|
- }
|
|
|
- ],
|
|
|
+ salaryList: [],
|
|
|
// 自我评价
|
|
|
evaluateForm: {
|
|
|
content: ''
|
|
@@ -198,6 +198,16 @@
|
|
|
if (page.tabCur) {
|
|
|
this.tabCur = Number(page.tabCur)
|
|
|
}
|
|
|
+ // 设置薪资范围
|
|
|
+ let numList = []
|
|
|
+ for(let i = 1; i < 51; i++) {
|
|
|
+ const obj = {
|
|
|
+ value: String(i),
|
|
|
+ label: String(i)
|
|
|
+ }
|
|
|
+ numList.push(obj)
|
|
|
+ }
|
|
|
+ this.salaryList = numList
|
|
|
},
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
onReady() {
|
|
@@ -212,11 +222,21 @@
|
|
|
getMemberinfo(){
|
|
|
this.$u.api.getmemberinfo().then(res => {
|
|
|
if (res.code === 200){
|
|
|
- this.evaluateForm.content = res.data.selfAssessment
|
|
|
- this.intentionForm.city = res.data.workCity
|
|
|
- this.intentionForm.position = res.data.expectedPost
|
|
|
- this.intentionForm.industry = res.data.expectedIndustry
|
|
|
- this.intentionForm.salary = (res.data.expectedLowestSalary + 'k ~ ' + res.data.expectedHighestSalary + 'k')
|
|
|
+ const data = res.data;
|
|
|
+ this.evaluateForm.content = data.selfAssessment
|
|
|
+ // this.intentionForm.position = res.data.expectedPost
|
|
|
+ // this.intentionForm.industry = res.data.expectedIndustry
|
|
|
+ this.intentionForm.expectedLowestSalary = String(data.expectedLowestSalary)
|
|
|
+ this.intentionForm.expectedHighestSalary = String(data.expectedHighestSalary)
|
|
|
+ if (data.provinceName) {
|
|
|
+ this.intentionForm.workCity = data.provinceName + '-' + data.cityName + '-' + data.areaName
|
|
|
+ }
|
|
|
+ this.intentionForm.provinceId = data.provinceId
|
|
|
+ this.intentionForm.provinceName = data.provinceName
|
|
|
+ this.intentionForm.cityId = data.cityId
|
|
|
+ this.intentionForm.cityName = data.cityName
|
|
|
+ this.intentionForm.areaId = data.areaId
|
|
|
+ this.intentionForm.areaName = data.areaName
|
|
|
} else {
|
|
|
this.$refs.uToast.show({
|
|
|
title: res.msg,
|
|
@@ -235,7 +255,13 @@
|
|
|
* @param { Object } item
|
|
|
*/
|
|
|
cityConfirm(item) {
|
|
|
- this.intentionForm.city = item.province.label + '-' + item.city.label + '-' + item.area.label
|
|
|
+ this.intentionForm.provinceName = item.province.label;
|
|
|
+ this.intentionForm.provinceId = item.province.value;
|
|
|
+ this.intentionForm.cityName = item.city.label;
|
|
|
+ this.intentionForm.cityId = item.city.value;
|
|
|
+ this.intentionForm.areaName = item.area.label;
|
|
|
+ this.intentionForm.areaId = item.area.value;
|
|
|
+ this.intentionForm.workCity = item.province.label + '-' + item.city.label + '-' + item.area.label
|
|
|
},
|
|
|
/**
|
|
|
* 职位下拉
|
|
@@ -254,12 +280,18 @@
|
|
|
this.intentionForm.industryId = item[0].value
|
|
|
},
|
|
|
/**
|
|
|
- * 薪资下拉
|
|
|
+ * 最低薪资下拉
|
|
|
+ * @param {Object} item
|
|
|
+ */
|
|
|
+ salaryLowestConfirm(item) {
|
|
|
+ this.intentionForm.expectedLowestSalary = item[0].label
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 最高薪资下拉
|
|
|
* @param {Object} item
|
|
|
*/
|
|
|
- salaryConfirm(item) {
|
|
|
- this.intentionForm.salary = item[0].label
|
|
|
- this.intentionForm.salaryId = item[0].value
|
|
|
+ salaryHighestConfirm(item) {
|
|
|
+ this.intentionForm.expectedHighestSalary = item[0].label
|
|
|
},
|
|
|
/**
|
|
|
* 跳转到指定页面
|
|
@@ -267,6 +299,9 @@
|
|
|
jumpPage(url) {
|
|
|
this.$u.route(url)
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 提交求职意向
|
|
|
+ */
|
|
|
submitIntention() {
|
|
|
this.$refs.intentionForm.validate(valid => {
|
|
|
if (valid) {
|
|
@@ -277,11 +312,14 @@
|
|
|
title: '数据提交中,请等待'
|
|
|
})
|
|
|
this.$u.api.resume.submitJobIntention({
|
|
|
- workCity: form.city,
|
|
|
- expectedPost: form.position,
|
|
|
- expectedIndustry: form.industry,
|
|
|
- expectedLowestSalary: form.salary.split(' ~ ')[0].replace('k', ''),
|
|
|
- expectedHighestSalary: form.salary.split(' ~ ')[1].replace('k', '')
|
|
|
+ provinceName: form.provinceName,
|
|
|
+ provinceId: form.provinceId,
|
|
|
+ cityName: form.cityName,
|
|
|
+ cityId: form.cityId,
|
|
|
+ areaName : form.areaName ,
|
|
|
+ areaId: form.areaId,
|
|
|
+ expectedLowestSalary: form.expectedLowestSalary,
|
|
|
+ expectedHighestSalary: form.expectedHighestSalary
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$refs.uToast.show({
|
|
@@ -355,9 +393,7 @@
|
|
|
* 城市下拉
|
|
|
*/
|
|
|
workCityClick() {
|
|
|
- if (this.intentionForm.city) {
|
|
|
- this.defaultRegion = this.intentionForm.city.split('-');
|
|
|
- }
|
|
|
+ this.defaultRegion = [this.intentionForm.provinceName, this.intentionForm.cityName, this.intentionForm.areaName ]
|
|
|
this.cityShow = true;
|
|
|
}
|
|
|
}
|