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