Commit c0642abf authored by 李明环(东信)'s avatar 李明环(东信)

需求修改

parent c9d3e2ce
...@@ -77,6 +77,21 @@ ...@@ -77,6 +77,21 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 专业 -->
<div class="filter-item certificate">
<p class="title">学历要求</p>
<div class="filter-select">
<div
class="select-item"
:class="{ active: v.active }"
@click="onClickCertificate(v)"
v-for="(v, i) in certificateList"
:key="i"
>
{{ v.name }}
</div>
</div>
</div>
</div> </div>
<div class="bottom-wrap"> <div class="bottom-wrap">
<button class="cancel" @click="onCancel">取消</button> <button class="cancel" @click="onCancel">取消</button>
...@@ -123,12 +138,15 @@ const onClickWorkYear = v => { ...@@ -123,12 +138,15 @@ const onClickWorkYear = v => {
workYearList.value.forEach(v => (v.active = false)); workYearList.value.forEach(v => (v.active = false));
v.active = true; v.active = true;
}; };
// 专业 // 证书
const dictJobTypeList = ref([]); const certificateList = ref([]);
const onClickMajor = v => { const onClickCertificate = v => {
dictJobTypeList.value.forEach(v => (v.active = false)); certificateList.value.forEach(v => (v.active = false));
v.active = true; v.active = true;
}; };
// 类型
// 证书
// positionalTitle professionalCertificates specialCertificates
// 初始化数据 // 初始化数据
const initData = async () => { const initData = async () => {
/* 初始化菜单 */ /* 初始化菜单 */
...@@ -136,8 +154,8 @@ const initData = async () => { ...@@ -136,8 +154,8 @@ const initData = async () => {
{ active: true, name: "学历", className: "education" }, { active: true, name: "学历", className: "education" },
{ active: false, name: "年龄", className: "age" }, { active: false, name: "年龄", className: "age" },
{ active: false, name: "性别", className: "gender" }, { active: false, name: "性别", className: "gender" },
{ active: false, name: "工作年限", className: "workYear" } { active: false, name: "工作年限", className: "workYear" },
// { active: false, name: "专业", className: "major" } { active: false, name: "证书", className: "certificate" }
]; ];
/* 初始化数据 */ /* 初始化数据 */
educationList.value = await getEumData("EnumEducationRequirement"); educationList.value = await getEumData("EnumEducationRequirement");
...@@ -174,11 +192,16 @@ const initData = async () => { ...@@ -174,11 +192,16 @@ const initData = async () => {
max: null max: null
} }
]; ];
const dictJobType = await dictJobTypeApi({}); certificateList.value = [
dictJobTypeList.value = dictJobType.data; { active: false, name: "专业技术职称", key: "positionalTitle" },
{ active: false, name: "职业等级证书", key: "professionalCertificates" },
{ active: false, name: "特种作业证书", key: "specialCertificates" }
];
/* const dictJobType = await dictJobTypeApi({});
dictJobTypeList.value = dictJobType.data; */
}; };
initData(); initData();
/* /*
接受两个方法 接受两个方法
1. 确认 接收数据 1. 确认 接收数据
2. 取消 2. 取消
...@@ -193,9 +216,12 @@ const onConfirm = () => { ...@@ -193,9 +216,12 @@ const onConfirm = () => {
const [minAge, maxAge] = age.value; const [minAge, maxAge] = age.value;
const { min: minWorkAge, max: maxWorkAge } = workYearList.value.find(v => v.active) || { min: 0, max: 100 }; const { min: minWorkAge, max: maxWorkAge } = workYearList.value.find(v => v.active) || { min: 0, max: 100 };
const education = educationList.value.find(v => v.active)?.code; const education = educationList.value.find(v => v.active)?.code;
const jobType = dictJobTypeList.value.find(v => v.active)?.id; // const jobType = dictJobTypeList.value.find(v => v.active)?.id;
const sex = genderList.value.find(v => v.active)?.code; const sex = genderList.value.find(v => v.active)?.code;
emit("confirm", { minAge, maxAge, minWorkAge, maxWorkAge, education, jobType, sex }); const certificateKey = certificateList.value.find(v => v.active)?.key;
const temp = { minAge, maxAge, minWorkAge, maxWorkAge, education, jobType: "", sex };
certificateKey && (temp[certificateKey] = certificateKey);
emit("confirm", temp);
}; };
</script> </script>
......
...@@ -303,7 +303,7 @@ getColumnsCity(); ...@@ -303,7 +303,7 @@ getColumnsCity();
const handleConfirmCity = ({ value, selectedItems }) => { const handleConfirmCity = ({ value, selectedItems }) => {
const textIndex = _.compact(value).length - 1; const textIndex = _.compact(value).length - 1;
if (textIndex === -1) { if (textIndex === -1) {
cityText.value = "全"; cityText.value = "全";
} else { } else {
cityText.value = selectedItems[textIndex].name; cityText.value = selectedItems[textIndex].name;
} }
......
...@@ -122,7 +122,7 @@ const next = () => { ...@@ -122,7 +122,7 @@ const next = () => {
xma.hideKeyboard(); xma.hideKeyboard();
console.log(pinias.formData); console.log(pinias.formData);
if (validateForm(pinias.formData, ["jobTypeId", "jobTypeName", "name", "positionDesc"])) { if (validateForm(pinias.formData, ["jobTypeId", "jobTypeName", "name", "positionDesc"], "post")) {
uni.redirectTo({ uni.redirectTo({
url: "/pages/recommend/releasePostion/step2" url: "/pages/recommend/releasePostion/step2"
}); });
......
...@@ -51,7 +51,7 @@ const pinias = useReleasePostionStore(); ...@@ -51,7 +51,7 @@ const pinias = useReleasePostionStore();
const showTab = ref(true); const showTab = ref(true);
import { validateForm } from "@/utils/utils"; import { validateForm } from "@/utils/utils";
// 地区接口地址 // 地区接口地址
const keys = ["district", "street"]; const keys = ["city", "district", "street"];
/* 获取省市区 */ /* 获取省市区 */
const cityOpstion = ref([]); const cityOpstion = ref([]);
const cityValue = ref([]); const cityValue = ref([]);
...@@ -59,7 +59,7 @@ const cityValue = ref([]); ...@@ -59,7 +59,7 @@ const cityValue = ref([]);
const cityText = ref(""); const cityText = ref("");
let citySelectedItems = []; let citySelectedItems = [];
getAreaListApi({ type: "city", code: "52" }).then(res => { getAreaListApi({ type: "province", code: "" }).then(res => {
cityOpstion.value.push(res.data); cityOpstion.value.push(res.data);
}); });
const columnChangeCity = ({ selectedItem, resolve, index, finish }) => { const columnChangeCity = ({ selectedItem, resolve, index, finish }) => {
...@@ -99,9 +99,10 @@ const columnChangeCity = ({ selectedItem, resolve, finish }) => { ...@@ -99,9 +99,10 @@ const columnChangeCity = ({ selectedItem, resolve, finish }) => {
const handleConfirmCity = ({ selectedItems }) => { const handleConfirmCity = ({ selectedItems }) => {
cityText.value = selectedItems.map(v => v.name || "").join("-"); cityText.value = selectedItems.map(v => v.name || "").join("-");
citySelectedItems = selectedItems; citySelectedItems = selectedItems;
const [city, district, street] = selectedItems; const [province, city, district, street] = selectedItems;
pinias.formData.address = selectedItems.map(v => v.name || "").join(""); pinias.formData.address = selectedItems.map(v => v.name || "").join("");
pinias.formData.provinceCode = 520000; // pinias.formData.provinceCode = 520000;
pinias.formData.provinceCode = province.code;
pinias.formData.cityCode = city.code; pinias.formData.cityCode = city.code;
pinias.formData.cityName = district.name; pinias.formData.cityName = district.name;
pinias.formData.districtCode = district.code; pinias.formData.districtCode = district.code;
......
...@@ -269,8 +269,8 @@ const columnChangeMajor = ({ selectedItem, resolve, finish }) => { ...@@ -269,8 +269,8 @@ const columnChangeMajor = ({ selectedItem, resolve, finish }) => {
}; };
const handleConfirmMajor = ({ value }) => { const handleConfirmMajor = ({ value }) => {
console.log(value); console.log(value);
majorText.value = value[0]; majorText.value = value[1];
pinias.formData.majorRequirement = value[0]; pinias.formData.majorRequirement = value[1];
}; };
const majorText = ref(""); const majorText = ref("");
getMajorTreeApi().then(res => { getMajorTreeApi().then(res => {
...@@ -335,7 +335,7 @@ const next = () => { ...@@ -335,7 +335,7 @@ const next = () => {
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); console.log(pinias.formData);
if (validateForm(pinias.formData, ["identityRequirement", "educationRequirement", "majorRequirement"])) { if (validateForm(pinias.formData, ["identityRequirement", "educationRequirement", "majorRequirement"], "post")) {
uni.redirectTo({ uni.redirectTo({
url: "/pages/recommend/releasePostion/step5" url: "/pages/recommend/releasePostion/step5"
}); });
......
...@@ -89,7 +89,7 @@ const submit = () => { ...@@ -89,7 +89,7 @@ const submit = () => {
uni.hideLoading(); uni.hideLoading();
}); });
} else { } else {
if (validateForm(pinias.formData, ["contactPhone", "contactPerson"])) { if (validateForm(pinias.formData, ["contactPhone", "contactPerson"], "post")) {
// 提交 // 提交
createJobApi(pinias.formData) createJobApi(pinias.formData)
.then(res => { .then(res => {
......
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