Commit 75e66524 authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents f806280c 92079c6b
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="filter-item age"> <div class="filter-item age">
<p class="title" style="margin-top: 0">年龄</p> <p class="title" style="margin-top: 0">年龄</p>
<wd-slider <wd-slider
style="margin: 0 25rpx" style="margin: 0 75rpx"
v-model="age" v-model="age"
:step="1" :step="1"
hide-min-max hide-min-max
...@@ -125,7 +125,7 @@ const onClickEducation = v => { ...@@ -125,7 +125,7 @@ const onClickEducation = v => {
v.active = true; v.active = true;
}; };
// 年龄 // 年龄
const age = ref([0, 100]); const age = ref([16, 100]);
// 性别 // 性别
const genderList = ref([]); const genderList = ref([]);
const onClickGender = v => { const onClickGender = v => {
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<!-- 筛选 --> <!-- 筛选 -->
<view class="filter flex-between" v-show="activeTab == '求职推荐'"> <view class="filter flex-between" v-show="activeTab == '求职推荐'">
<view class="filter-opstion"> <view class="filter-opstion">
<view class="t1">以下职位推荐</view> <view class="t1">职位类型推荐</view>
<wd-picker <!-- <wd-picker
:columns="jobListColumns" :columns="jobListColumns"
value-key="id" value-key="id"
label-key="name" label-key="name"
...@@ -21,7 +21,19 @@ ...@@ -21,7 +21,19 @@
> >
<view class="t2">{{ jobTypeText || "无" }}</view> <view class="t2">{{ jobTypeText || "无" }}</view>
<view class="arrow"></view> <view class="arrow"></view>
</wd-picker> </wd-picker> -->
<wd-col-picker
v-model="value"
:columns="columns"
:column-change="columnChange"
@confirm="handleConfirm"
label-key="name"
value-key="id"
use-default-slot
>
<view class="t2">{{ jobTypeText || "无" }}</view>
<view class="arrow"></view>
</wd-col-picker>
</view> </view>
<view class="filter-other flex-between"> <view class="filter-other flex-between">
...@@ -87,7 +99,7 @@ ...@@ -87,7 +99,7 @@
import { ref } from "vue"; import { ref } from "vue";
import jobSeekersCard from "@/components/jobSeekersCard/index.vue"; import jobSeekersCard from "@/components/jobSeekersCard/index.vue";
import { getJobListApi, getApplicationListApi, getRecommendedResumeListApi, getPositionListApi } from "@/api/postion"; import { getJobListApi, getApplicationListApi, getRecommendedResumeListApi, getPositionListApi } from "@/api/postion";
import { getTreeListApi } from "@/api/common"; import { getTreeListApi, dictJobTypeApi } from "@/api/common";
import { getLoginUserApi, companyReviewInfo } from "@/api/user"; import { getLoginUserApi, companyReviewInfo } from "@/api/user";
import { getMajorTreeApi } from "@/api/common"; import { getMajorTreeApi } from "@/api/common";
import { getEumData, getEnumText } from "@/utils/utils"; import { getEumData, getEnumText } from "@/utils/utils";
...@@ -127,7 +139,7 @@ function getJobListApiFn() { ...@@ -127,7 +139,7 @@ function getJobListApiFn() {
} }
}); });
} }
getJobListApiFn(); // getJobListApiFn();
const jobTypeText = ref(""); const jobTypeText = ref("");
function fresherrefresh() { function fresherrefresh() {
refresherEnabled.value = true; refresherEnabled.value = true;
...@@ -266,6 +278,7 @@ const getResumeRecommendList = () => { ...@@ -266,6 +278,7 @@ const getResumeRecommendList = () => {
}); });
} }
}; };
getResumeRecommendList();
const companyReviewInfoFn = () => { const companyReviewInfoFn = () => {
companyReviewInfo().then(res => { companyReviewInfo().then(res => {
if (!res.data) { if (!res.data) {
...@@ -380,6 +393,29 @@ getMajorTreeApi().then(res => { ...@@ -380,6 +393,29 @@ getMajorTreeApi().then(res => {
}); });
} }
}); });
/* 职业类型 */
const value = ref([]);
const columns = ref([]);
const getJobType = () => {
dictJobTypeApi({}).then(res => {
columns.value.push(res.data);
});
};
getJobType();
const columnChange = ({ selectedItem, resolve, finish }) => {
if (selectedItem.children?.length > 0) {
resolve(selectedItem.children);
} else {
finish();
}
};
const handleConfirm = ({ selectedItems, value }) => {
jobTypeText.value = selectedItems[1].name;
getResumeRecommendListParams.value.jobType = selectedItems[1].id;
resetPageParams();
getResumeRecommendListParams.value.recommend = false;
getResumeRecommendList();
};
// 显示其他筛选 // 显示其他筛选
const showOtherFilter = ref(false); const showOtherFilter = ref(false);
const filterConfirm = data => { const filterConfirm = data => {
...@@ -466,7 +502,7 @@ onLoad(() => { ...@@ -466,7 +502,7 @@ onLoad(() => {
padding: 0 32rpx 0 44rpx; padding: 0 32rpx 0 44rpx;
.filter-opstion { .filter-opstion {
max-width: 230rpx; max-width: 230rpx;
:deep(.wd-picker__field) { :deep(.wd-col-picker__field) {
display: flex; display: flex;
align-items: center; align-items: center;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!-- <Filter /> --> <!-- <Filter /> -->
<view class="title"> <view class="title">
<view class="t1">1/5填写岗位信息</view> <view class="t1">1/5填写岗位信息</view>
<view class="t2">选择对应的职位类别填写岗位信息</view> <view class="t2">选择对应的职位类别填写岗位信息</view>
</view> </view>
<view class="content"> <view class="content">
<selectbox <selectbox
......
...@@ -249,7 +249,7 @@ const next = () => { ...@@ -249,7 +249,7 @@ const next = () => {
if (pinias.formData.negotiableSalary == 0) { if (pinias.formData.negotiableSalary == 0) {
if (!(pinias.formData.maxSalary && pinias.formData.minSalary)) { if (!(pinias.formData.maxSalary && pinias.formData.minSalary)) {
xma.showToast({ xma.showToast({
title: "请输选择薪资", title: "请输选择岗位薪资",
icon: "none" icon: "none"
}); });
return; return;
......
...@@ -269,12 +269,12 @@ const columnChangeMajor = ({ selectedItem, resolve, finish }) => { ...@@ -269,12 +269,12 @@ const columnChangeMajor = ({ selectedItem, resolve, finish }) => {
} }
}; };
const handleConfirmMajor = ({ value }) => { const handleConfirmMajor = ({ value }) => {
console.log(value);
if (value[1]) { if (value[1]) {
majorText.value = value[1]; majorText.value = value[1];
pinias.formData.majorRequirement = value.join("-"); pinias.formData.majorRequirement = value.join("-");
} else { } else {
majorText.value = ""; majorText.value = "不限";
pinias.formData.majorRequirement = "";
} }
}; };
const majorText = ref(""); const majorText = ref("");
...@@ -343,14 +343,15 @@ const next = () => { ...@@ -343,14 +343,15 @@ const next = () => {
pinias.formData.positionalTitle = majorInputValue.value + "-" + majorSelectValue.value; pinias.formData.positionalTitle = majorInputValue.value + "-" + majorSelectValue.value;
if (certificateInputValue.value && certificateSelectValue.value) if (certificateInputValue.value && certificateSelectValue.value)
pinias.formData.professionalCertificates = certificateInputValue.value + "-" + certificateSelectValue.value; pinias.formData.professionalCertificates = certificateInputValue.value + "-" + certificateSelectValue.value;
console.log(pinias.formData); if (!majorText.value) {
if ( uni.showToast({
validateForm( title: `请完善专业!`,
pinias.formData, icon: "none",
["identityRequirement", "educationRequirement", "maxAgeRequirement", "majorRequirement"], duration: 2000
"post" });
) return;
) { }
if (validateForm(pinias.formData, ["identityRequirement", "educationRequirement", "maxAgeRequirement"], "post")) {
/* uni.redirectTo({ /* uni.redirectTo({
url: "/pages/recommend/releasePostion/step5" url: "/pages/recommend/releasePostion/step5"
}); */ }); */
......
...@@ -50,6 +50,9 @@ import { useReleasePostionStore } from "./store"; ...@@ -50,6 +50,9 @@ import { useReleasePostionStore } from "./store";
const pinias = useReleasePostionStore(); const pinias = useReleasePostionStore();
import { validateForm } from "@/utils/utils"; import { validateForm } from "@/utils/utils";
const submit = () => { const submit = () => {
if (!validateForm(pinias.formData, ["number", "contactPhone", "contactPerson"], "post")) {
return;
}
xma.hideKeyboard(); xma.hideKeyboard();
xma.showLoading({ xma.showLoading({
title: "提交中", title: "提交中",
...@@ -96,42 +99,40 @@ const submit = () => { ...@@ -96,42 +99,40 @@ const submit = () => {
uni.hideLoading(); uni.hideLoading();
}); });
} else { } else {
if (validateForm(pinias.formData, ["contactPhone", "contactPerson"], "post")) { // 提交
// 提交 createJobApi(pinias.formData)
createJobApi(pinias.formData) .then(res => {
.then(res => { if (res.code == 200) {
if (res.code == 200) { setTimeout(() => {
setTimeout(() => { wx.hideLoading({
wx.hideLoading({ complete: complete => {
complete: complete => { if (complete.errMsg == "hideLoading:ok") {
if (complete.errMsg == "hideLoading:ok") { wx.showToast({
wx.showToast({ title: "提交成功",
title: "发布成功", icon: "none"
icon: "none" });
});
}
} }
}); }
}, 2000); });
setTimeout(() => { }, 2000);
pinias.resetForm(); setTimeout(() => {
uni.switchTab({ pinias.resetForm();
url: "/pages/user/index" uni.switchTab({
}); url: "/pages/user/index"
}, 3000);
} else {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
}); });
} }, 3000);
}) } else {
.catch(err => { uni.showToast({
console.log(err); title: res.msg,
uni.hideLoading(); icon: "none",
}); duration: 2000
} });
}
})
.catch(err => {
console.log(err);
uni.hideLoading();
});
} }
}; };
</script> </script>
......
...@@ -42,7 +42,7 @@ export const useReleasePostionStore = defineStore("useReleasePostionStore", () = ...@@ -42,7 +42,7 @@ export const useReleasePostionStore = defineStore("useReleasePostionStore", () =
minSalary: null, minSalary: null,
maxSalary: null, maxSalary: null,
benefits: "", benefits: "",
identityRequirement: 1, identityRequirement: null,
educationRequirement: null, educationRequirement: null,
minAgeRequirement: null, minAgeRequirement: null,
maxAgeRequirement: null, maxAgeRequirement: null,
...@@ -79,7 +79,7 @@ export const useReleasePostionStore = defineStore("useReleasePostionStore", () = ...@@ -79,7 +79,7 @@ export const useReleasePostionStore = defineStore("useReleasePostionStore", () =
maxSalary: null, maxSalary: null,
majorRequirement: "", majorRequirement: "",
benefits: "", benefits: "",
identityRequirement: 1, identityRequirement: null,
educationRequirement: 1, educationRequirement: 1,
minAgeRequirement: null, minAgeRequirement: null,
maxAgeRequirement: null, maxAgeRequirement: null,
......
...@@ -85,16 +85,19 @@ export const validateForm = (formData, requiredFields, type) => { ...@@ -85,16 +85,19 @@ export const validateForm = (formData, requiredFields, type) => {
const phoneRegex = /^1[3-9]\d{9}$/; // 正则表达式匹配中国大陆手机号码 const phoneRegex = /^1[3-9]\d{9}$/; // 正则表达式匹配中国大陆手机号码
const fieldMapping = { const fieldMapping = {
jobTypeText: "职位类型", jobTypeText: "职位类型",
jobTypeId: "职位类型",
postitDesc: "职位描述", postitDesc: "职位描述",
jobName: "职位名称", jobName: "职位名称",
address: "工作地址", address: "工作地址",
identityRequirement: "人员类别", identityRequirement: "身份",
educationRequirement: "学历", educationRequirement: "学历",
maxAgeRequirement: "年龄", maxAgeRequirement: "年龄",
number: "招聘人数",
contactPerson: "联系人", contactPerson: "联系人",
jobType: "职位类型", jobType: "职位类型",
position: "职位", position: "职位",
name: "名字", name: "职位名字",
positionDesc: "职位描述",
majorRequirement: "专业", majorRequirement: "专业",
positionalTitle: "专业技术职称", positionalTitle: "专业技术职称",
professionalCertificates: "职业等级证书", professionalCertificates: "职业等级证书",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment