flat: 修改全职岗位和零工岗位问题
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
}) => {
|
||||
console.log('detail,', detail)
|
||||
// this.skillsId = id
|
||||
this.skillsName = `${detail.parentLabel}-${detail.parentTwoLabel}-${detail.label}`
|
||||
this.skillsName = `${detail.parentLabel}-${detail.label}`
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
@@ -113,10 +113,12 @@
|
||||
// }
|
||||
},
|
||||
skillLevel: function() {
|
||||
|
||||
uni.navigateTo({
|
||||
url: `./skillLevel?id=${this.skillsId}&worktypesId=${this.worktypesId}&maxLayer=3&type=2`
|
||||
uni.navigateTo({
|
||||
url: `./skill?id=${this.worktypesId}&tradeId=${this.tradeId}&maxLayer=2&type=2`
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: `./skillLevel?id=${this.skillsId}&worktypesId=${this.worktypesId}&maxLayer=3&type=2`
|
||||
// })
|
||||
},
|
||||
submit: async function() {
|
||||
// console.log(this.tradeName, this.worktypesName, this.skillsName);
|
||||
|
||||
@@ -31,8 +31,10 @@
|
||||
<view class="list_text">
|
||||
{{ item.worktypes }}、{{ item.skills }}
|
||||
</view>
|
||||
<view>
|
||||
<image src="../../../static/img/left_right.png" mode=""></image>
|
||||
<view class="delt" @click="removeSkills(item.id, index)">
|
||||
删除
|
||||
<!-- 向右滑动删除 -->
|
||||
<!-- <image src="../../../static/img/left_right.png" mode=""></image> -->
|
||||
</view>
|
||||
</view>
|
||||
</m-slide-list>
|
||||
@@ -74,17 +76,21 @@
|
||||
</view>
|
||||
</view>
|
||||
<image src="../../../static/img/right.svg" mode=""></image>
|
||||
</view>
|
||||
<view class="jobcontent" @click="showPickerFunc('wage')">
|
||||
</view>
|
||||
<!-- @click="showPickerFunc('wage')" -->
|
||||
<view class="jobcontent" >
|
||||
<view class="jobinfo">
|
||||
<view v-bind:class="['jobAddress', { 'input-error': !myResume.wage && isShowBorder }]">
|
||||
我的期望薪资
|
||||
</view>
|
||||
<view v-bind:class="['jobText']">
|
||||
{{ myResume.wage ? myResume.wage : '请选择' }}
|
||||
<view v-bind:class="['jobText', 'jobDis']">
|
||||
<!-- {{ myResume.wage ? myResume.wage : '请选择' }} -->
|
||||
|
||||
<u--input type="number" border="none" @focus="change1" @change="change($event, 'wage')" :value="myResume.wage" placeholder="请输入期望薪资范围" class="jobNumber" /><span>~</span>
|
||||
<u--input type="number" border="none" @focus="change1" @change="change($event, 'wageUpper')" :value="myResume.wageUpper" placeholder="请输入期望薪资范围" class="jobNumber" /><span>元/月</span>
|
||||
</view>
|
||||
</view>
|
||||
<image src="../../../static/img/right.svg" mode=""></image>
|
||||
<!-- <image src="../../../static/img/right.svg" mode=""></image> -->
|
||||
</view>
|
||||
<view class="jobcontent">
|
||||
<view class="jobinfo">
|
||||
@@ -165,7 +171,7 @@
|
||||
<!-- 省市 -->
|
||||
<data-picker :show="areaModal.addressShow" @confirm='confirmAddress' @cancel='areaModal.addressShow = false'
|
||||
@close='areaModal.addressShow = false' :defaultNames="areaModal.defaultNames" :indexs="areaModal.indexs"
|
||||
:defaultIds="areaModal.defaultIds" :showToolbar="false" :showBottombar="true"
|
||||
:defaultIds="areaModal.defaultIds" :showToolbar="false" :showBottombar="true" :sourceData=areaData
|
||||
:labelName="areaModal.labelName"></data-picker>
|
||||
</view>
|
||||
</template>
|
||||
@@ -191,7 +197,9 @@
|
||||
import {
|
||||
cloneDeep,
|
||||
forIn
|
||||
} from 'lodash';
|
||||
} from 'lodash';
|
||||
import area from "./province-city-county.json"
|
||||
|
||||
const validateForm = {
|
||||
name: '请输入企业名称',
|
||||
work: '请输入工作岗位',
|
||||
@@ -217,7 +225,8 @@
|
||||
city: {},
|
||||
education: {},
|
||||
wage: "",
|
||||
phone: "",
|
||||
phone: "",
|
||||
wageUpper: ''
|
||||
},
|
||||
mySkills: [],
|
||||
id: undefined,
|
||||
@@ -241,12 +250,14 @@
|
||||
address: '',
|
||||
addressShow: false,
|
||||
title: 'Hello',
|
||||
// indexs: [0, 0, 8],
|
||||
indexs: [0,0],
|
||||
// defaultIds: [1, 110000, 110106],
|
||||
defaultNames: ['北京市', '北京市', '东城区'],
|
||||
// defaultNames: ['北京市', '北京市', '东城区'],
|
||||
// defaultNames: ['德阳市', '旌阳区'],
|
||||
labelName: "areaName"
|
||||
|
||||
},
|
||||
},
|
||||
areaData: []
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
@@ -254,7 +265,11 @@
|
||||
GoLogin()
|
||||
return
|
||||
}
|
||||
this.getSkill()
|
||||
this.getSkill()
|
||||
// this.areaData = area.find(i => i.id === 510000).children
|
||||
const areaObj = area.find(i => i.id === 510000).children
|
||||
const areaObj1 = areaObj.find(i => i.id === 510600)
|
||||
this.areaData = [areaObj1]
|
||||
},
|
||||
created() {
|
||||
this.getResume()
|
||||
@@ -265,7 +280,7 @@
|
||||
watch: {
|
||||
myResume: {
|
||||
handler: function(newVal, oldVal) {
|
||||
if (newVal.city && newVal.education && newVal.wage && newVal.phone) {
|
||||
if (newVal.city && newVal.education && newVal.wage && newVal.phone && newVal.wageUpper) {
|
||||
this.canSubMit = true;
|
||||
} else {
|
||||
this.canSubMit = false;
|
||||
@@ -346,7 +361,8 @@
|
||||
education: {
|
||||
label: data.education
|
||||
},
|
||||
wage: data.wage,
|
||||
wage: data.wage,
|
||||
wageUpper: data.wageUpper,
|
||||
phone: data.telephone
|
||||
}
|
||||
this.isShowButton = false;
|
||||
@@ -484,7 +500,15 @@
|
||||
}
|
||||
this.isShowButton = true;
|
||||
this.showPicker = true;
|
||||
},
|
||||
},
|
||||
change(e, type) {
|
||||
console.log(type, e, '----')
|
||||
this.myResume[type] = e
|
||||
|
||||
},
|
||||
change1(){
|
||||
this.isShowButton = true;
|
||||
},
|
||||
pickerButtonFunc(e) {
|
||||
console.log(e, this.myResume, this.myResume[this.showType]);
|
||||
this.myResume[this.showType] = e.value[0];
|
||||
@@ -514,7 +538,8 @@
|
||||
city,
|
||||
education,
|
||||
phone,
|
||||
wage
|
||||
wage,
|
||||
wageUpper,
|
||||
} = this.myResume
|
||||
// 中国大陆手机号码正则表达式
|
||||
const mobileRegex = /\b(1[3-9]\d{9})\b/;
|
||||
@@ -522,7 +547,7 @@
|
||||
const landlineRegex = /\b(0\d{2,3}-\d{7,8}(-\d{1,4})?)\b/;
|
||||
|
||||
const workList = JSON.stringify(this.gzList)
|
||||
|
||||
if (!wage || !wageUpper) return this.showToast("请正确填写薪资范围");
|
||||
if (mobileRegex.test(phone) || landlineRegex.test(phone)) {
|
||||
// 电话号码格式正确
|
||||
console.log(phone, "电话号码格式正确");
|
||||
@@ -531,7 +556,8 @@
|
||||
education: education.label,
|
||||
workplace: city.workplace ? city.workplace : city.parentLabel + '-' + city.label,
|
||||
telephone: phone,
|
||||
wage,
|
||||
wage,
|
||||
wageUpper,
|
||||
workExperience: workList
|
||||
}).then(res => {
|
||||
this.isShowButton = false;
|
||||
@@ -816,5 +842,49 @@
|
||||
|
||||
.input-error {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
.delt {
|
||||
color: red;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.jobDis {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
height: 60rpx;
|
||||
border: 1rpx solid #999999;
|
||||
border-radius: 40rpx;
|
||||
|
||||
span:nth-of-type(1) {
|
||||
padding: 0 20rpx;
|
||||
border: 1rpx solid #999999;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
span:nth-of-type(2) {
|
||||
padding: 0 10rpx;
|
||||
width: 80rpx;
|
||||
font-size: 20rpx;
|
||||
border-left: 1rpx solid #999999;
|
||||
}
|
||||
}
|
||||
.jobNumber {
|
||||
height: 60rpx;
|
||||
padding-left: 16rpx;
|
||||
/* border: 1rpx solid #999999; */
|
||||
/* border-top: none;
|
||||
border-bottom: none; */
|
||||
}
|
||||
|
||||
.uni-input-placeholder {
|
||||
padding-left: 16rpx !important;
|
||||
}
|
||||
.uni-input-input, .uni-input-placeholder {
|
||||
padding-left: 16rpx !important;
|
||||
}
|
||||
.u-input__content__field-wrapper__field {
|
||||
padding-left: 16rpx !important;
|
||||
}
|
||||
</style>
|
||||
22271
pageMy/my/resume/province-city-county.json
Normal file
22271
pageMy/my/resume/province-city-county.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,27 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="title">
|
||||
全部
|
||||
</view>
|
||||
<block v-for="(item, index) in city" :key="index">
|
||||
<view class="search">
|
||||
<input
|
||||
v-model="searchKeyword"
|
||||
type="text"
|
||||
class="search-input"
|
||||
placeholder="请输入关键词搜索"
|
||||
@input="handleSearch"
|
||||
@focus="isSearchFocused = true"
|
||||
@blur="handleSearchBlur"
|
||||
/>
|
||||
</view>
|
||||
<view class="title">
|
||||
全部
|
||||
</view>
|
||||
<block v-for="(item, index) in filteredResults" :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>
|
||||
</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">
|
||||
@@ -37,7 +49,11 @@
|
||||
id: '',
|
||||
label: '',
|
||||
|
||||
tradeId: '',
|
||||
tradeId: '',
|
||||
searchKeyword: '', // 模糊关键字搜索
|
||||
isSearchFocused: true,
|
||||
searchFields: ['name'],
|
||||
type: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -51,7 +67,20 @@
|
||||
} else {
|
||||
return this.workTypeList;
|
||||
}
|
||||
}
|
||||
},
|
||||
filteredResults() {
|
||||
if (!this.searchKeyword) {
|
||||
return this.city
|
||||
}
|
||||
|
||||
const keyword = this.searchKeyword.toLowerCase()
|
||||
return this.city.filter(item => {
|
||||
return this.searchFields.some(field => {
|
||||
const value = this.getObjectValue(item, field)
|
||||
return value && value.toLowerCase().includes(keyword)
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getWorktypesList(1).then(res => {
|
||||
@@ -64,12 +93,15 @@
|
||||
tradeId,
|
||||
parentId,
|
||||
layer,
|
||||
maxLayer
|
||||
maxLayer,
|
||||
type
|
||||
}) {
|
||||
this.parentId = parentId
|
||||
this.tradeId = tradeId || 0
|
||||
this.layer = parseInt(layer || 1)
|
||||
this.maxLayer = parseInt(maxLayer || 2)
|
||||
this.maxLayer = parseInt(maxLayer || 2)
|
||||
console.log(type, 'type')
|
||||
this.type = type
|
||||
},
|
||||
onShow: function() {},
|
||||
methods: {
|
||||
@@ -88,18 +120,32 @@
|
||||
},
|
||||
goCityInfo(item) {
|
||||
uni.navigateTo({
|
||||
url: `./skill?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${item.id}&parentLabel=${item.name}`
|
||||
url: `./skill?layer=${this.layer + 1}&maxLayer=${this.maxLayer}&parentId=${item.id}&parentLabel=${item.name}&type=${this.type}`
|
||||
})
|
||||
},
|
||||
comfirm: function() {
|
||||
if (this.id) {
|
||||
uni.$emit('setworkTypes', {
|
||||
detail: {
|
||||
id: this.id,
|
||||
label: this.label,
|
||||
parentLabel: this.$route.query.parentLabel
|
||||
}
|
||||
})
|
||||
if (this.id) {
|
||||
console.log(this.type)
|
||||
if (this.type == '1') {
|
||||
console.log('00000000')
|
||||
uni.$emit('setworkTypes', {
|
||||
detail: {
|
||||
id: this.id,
|
||||
label: this.label,
|
||||
parentLabel: this.$route.query.parentLabel
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('1111111')
|
||||
uni.$emit('setSkill', {
|
||||
detail: {
|
||||
id: this.id,
|
||||
label: this.label,
|
||||
parentLabel: this.$route.query.parentLabel,
|
||||
parentTwoLabel: this.$route.query.parentTwoLabel
|
||||
},
|
||||
})
|
||||
}
|
||||
uni.navigateBack({
|
||||
delta: this.layer
|
||||
})
|
||||
@@ -109,7 +155,23 @@
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// 模糊搜索
|
||||
handleSearch() {
|
||||
|
||||
console.log(this.searchKeyword)
|
||||
},
|
||||
// 失去焦点
|
||||
handleSearchBlur() {
|
||||
|
||||
},
|
||||
// 获取对象深层值
|
||||
getObjectValue(obj, path) {
|
||||
return path.split('.').reduce((current, key) => {
|
||||
return current && current[key] !== undefined ? current[key] : ''
|
||||
}, obj)
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
@@ -185,5 +247,18 @@
|
||||
|
||||
page {
|
||||
background-color: #fefefe;
|
||||
}
|
||||
}
|
||||
|
||||
.search {
|
||||
width: 80%;
|
||||
height: 60rpx;
|
||||
margin: 10rpx auto;
|
||||
border: 1rpx solid #dddddd;
|
||||
border-radius: 40rpx;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
.search-input {
|
||||
width: 80%;
|
||||
height: 60rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user