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

修复bug

parent aee91a17
...@@ -11,3 +11,5 @@ export const dictJobTypeApi = params => instance.post("/dict/dictJobType/getTree ...@@ -11,3 +11,5 @@ export const dictJobTypeApi = params => instance.post("/dict/dictJobType/getTree
export const getBannerListApi = type => instance.post(`/banner/list/${type}`); export const getBannerListApi = type => instance.post(`/banner/list/${type}`);
//更具code码获取城市名称 //更具code码获取城市名称
export const getCityNameByCodeApi = code => instance.post(`/dict/dictProvinceCityDistrict/find/city/${code}`); export const getCityNameByCodeApi = code => instance.post(`/dict/dictProvinceCityDistrict/find/city/${code}`);
//更具code码获取地区名称
export const getDistNameByCodeApi = code => instance.post(`/dict/dictProvinceCityDistrict/find/dist/${code}`);
...@@ -185,11 +185,11 @@ const onCancel = () => { ...@@ -185,11 +185,11 @@ const onCancel = () => {
// 1. 确认 接收数据 // 1. 确认 接收数据
const onConfirm = () => { const onConfirm = () => {
const [minAge, maxAge] = age.value; const [minAge, maxAge] = age.value;
const { min: minWorkYear, max: maxWorkYear } = 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, minWorkYear, maxWorkYear, education, jobType, sex }); emit("confirm", { minAge, maxAge, minWorkAge, maxWorkAge, education, jobType, sex });
}; };
</script> </script>
......
...@@ -62,7 +62,7 @@ const onClickItem = e => { ...@@ -62,7 +62,7 @@ const onClickItem = e => {
emit("update:modelValue", value); emit("update:modelValue", value);
} }
emit("update"); emit("update",value);
}; };
</script> </script>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="text-wrap"> <view class="text-wrap">
<view class="name"> <view class="name">
{{ data.name || "名字" }} {{ data.name || "名字" }}
<!-- <text>· 今日活跃</text> --> <text>{{data.positionName||''}}</text>
</view> </view>
<view class="other"> <view class="other">
{{ data.workAge }}年 | {{ educationLevelText }}{{ data.minSalary + "~" + data.maxSalary }} {{ data.workAge }}年 | {{ educationLevelText }}{{ data.minSalary + "~" + data.maxSalary }}
......
...@@ -78,7 +78,7 @@ const list = ref([]); ...@@ -78,7 +78,7 @@ const list = ref([]);
let flag = true; let flag = true;
const getApplicationList = () => { const getApplicationList = () => {
if (!flag) return; if (!flag) return;
uni.showLoading({ title: "加载中..." }); uni.showLoading({ title: "加载中...",mask:true });
getApplicationListApi(apiParams).then(res => { getApplicationListApi(apiParams).then(res => {
if (res.data?.length && flag) { if (res.data?.length && flag) {
list.value.push(...res.data); list.value.push(...res.data);
......
...@@ -95,6 +95,7 @@ const jobListColumns = ref([]); ...@@ -95,6 +95,7 @@ const jobListColumns = ref([]);
const positionConfirm = ({ selectedItems }) => { const positionConfirm = ({ selectedItems }) => {
jobTypeText.value = selectedItems.name; jobTypeText.value = selectedItems.name;
resetPageParams(); resetPageParams();
getResumeRecommendListParams.value.recommend = true
getResumeRecommendList(); getResumeRecommendList();
}; };
function getJobListApiFn() { function getJobListApiFn() {
...@@ -148,6 +149,7 @@ const getResumeRecommendListParams = ref({ ...@@ -148,6 +149,7 @@ const getResumeRecommendListParams = ref({
const isEnd = ref(false); const isEnd = ref(false);
const resetParams = () => { const resetParams = () => {
isEnd.value = false;
applicationList.value = []; applicationList.value = [];
getApplicationListParams.value = { getApplicationListParams.value = {
jobType: "", jobType: "",
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<view class="t2">选择对应的职位并填写职位信息</view> <view class="t2">选择对应的职位并填写职位信息</view>
</view> </view>
<view class="content"> <view class="content">
<selectbox :options="EnumWorkMode" label-key="text" value-key="code" v-model="pinias.formData.workMode"></selectbox> <selectbox @update="changeWorkMode" :options="EnumWorkMode" label-key="text" value-key="code" v-model="pinias.formData.workMode"></selectbox>
<form-row> <form-row>
<form-item title="职位类型"> <form-item title="职位类型">
<wd-col-picker <wd-col-picker
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</form-row> </form-row>
<form-row> <form-row>
<form-item title="职位描述" :border="false" icon=""> <form-item title="职位描述" :border="false" icon="">
<textarea v-model="pinias.formData.positionDesc" placeholder="请输入你的职位描述"></textarea> <textarea v-model="pinias.formData.positionDesc" placeholder="请输入你的职位描述" maxlength="800"></textarea>
</form-item> </form-item>
</form-row> </form-row>
</view> </view>
...@@ -82,8 +82,7 @@ const changeWorkMode = mode => { ...@@ -82,8 +82,7 @@ const changeWorkMode = mode => {
pinias.setFormDataKey("workMode", mode); pinias.setFormDataKey("workMode", mode);
pinias.setFormDataKey("minSalary", 0); pinias.setFormDataKey("minSalary", 0);
pinias.setFormDataKey("maxSalary", 0); pinias.setFormDataKey("maxSalary", 0);
console.log("mode", mode); // console.log("mode", mode);
if (mode == 2) { if (mode == 2) {
// 小时 // 小时
pinias.setFormDataKey("settlementType", 1); pinias.setFormDataKey("settlementType", 1);
...@@ -118,7 +117,7 @@ const next = () => { ...@@ -118,7 +117,7 @@ const next = () => {
console.log(pinias.formData); console.log(pinias.formData);
if (validateForm(pinias.formData, ["jobTypeId", "jobTypeName", "name", "positionDesc"])) { if (validateForm(pinias.formData, ["jobTypeId", "jobTypeName", "name", "positionDesc"])) {
uni.navigateTo({ uni.redirectTo({
url: "/pages/recommend/releasePostion/step2" url: "/pages/recommend/releasePostion/step2"
}); });
} }
......
...@@ -232,16 +232,17 @@ const next = () => { ...@@ -232,16 +232,17 @@ const next = () => {
.map(v => v.text) .map(v => v.text)
.join(",") .join(",")
); );
// 薪资
if (pinias.formData.negotiableSalary == 0) { if (pinias.formData.negotiableSalary == 0) {
if (pinias.formData.maxSalary == 0 || pinias.formData.minSalary == 0) { if (!(pinias.formData.maxSalary && pinias.formData.minSalary)) {
xma.showToast({ xma.showToast({
title: "请输薪资", title: "请输选择薪资",
icon: "none" icon: "none"
}); });
return; return;
} }
} }
uni.navigateTo({ uni.redirectTo({
url: "/pages/recommend/releasePostion/step3" url: "/pages/recommend/releasePostion/step3"
}); });
}; };
......
...@@ -12,13 +12,15 @@ ...@@ -12,13 +12,15 @@
<wd-col-picker <wd-col-picker
v-model="cityValue" v-model="cityValue"
:columns="cityOpstion" :columns="cityOpstion"
style="width: 100%;"
value-key="code" value-key="code"
label-key="name" label-key="name"
:column-change="columnChangeCity" :column-change="columnChangeCity"
@confirm="handleConfirmCity" @confirm="handleConfirmCity"
use-default-slot use-default-slot
> >
<p :class="{ placeholder: !cityText }" class="text-single">{{ cityText || "请选择公司所在地" }}</p> <p :class="{ placeholder: !cityText }" class="text-single" style="width: 100%;">{{ cityText || "请选择公司所在地" }}</p>
</wd-col-picker> </wd-col-picker>
<view class="arrow"></view> <view class="arrow"></view>
</view> </view>
...@@ -91,7 +93,7 @@ onLoad(() => { ...@@ -91,7 +93,7 @@ onLoad(() => {
}); });
const next = () => { const next = () => {
if (validateForm(pinias.formData, ["address"])) { if (validateForm(pinias.formData, ["address"])) {
uni.navigateTo({ uni.redirectTo({
url: "/pages/recommend/releasePostion/step4" url: "/pages/recommend/releasePostion/step4"
}); });
} }
......
...@@ -248,12 +248,9 @@ const next = () => { ...@@ -248,12 +248,9 @@ const next = () => {
validateForm(pinias.formData, [ validateForm(pinias.formData, [
"identityRequirement", "identityRequirement",
"educationRequirement", "educationRequirement",
"positionalTitle",
"professionalCertificates",
"specialCertificates"
]) ])
) { ) {
uni.navigateTo({ uni.redirectTo({
url: "/pages/recommend/releasePostion/step5" url: "/pages/recommend/releasePostion/step5"
}); });
} }
......
...@@ -100,9 +100,8 @@ const submit = () => { ...@@ -100,9 +100,8 @@ const submit = () => {
}, 2000); }, 2000);
setTimeout(() => { setTimeout(() => {
uni.switchTab({ uni.switchTab({
url: "/pages/recommend/index" url: "/pages/user/index"
}); });
pinias.resetForm(); pinias.resetForm();
}, 3000); }, 3000);
} else { } else {
......
...@@ -15,7 +15,53 @@ ...@@ -15,7 +15,53 @@
<image v-if="resumeData.avatarPath" class="avatar" :src="evn.APP_IMAGE_BASE_API + resumeData.avatarPath" mode="" /> <image v-if="resumeData.avatarPath" class="avatar" :src="evn.APP_IMAGE_BASE_API + resumeData.avatarPath" mode="" />
<image v-else class="avatar" src="@/static/image/user/default-avatar.png" mode="" /> <image v-else class="avatar" src="@/static/image/user/default-avatar.png" mode="" />
</view> </view>
<!-- 个人信息 -->
<view class="basics">
<text class="gradient-title">个人信息</text>
<view class="basics-top">
<view class="item">
<img v-show="resumeData.sex === 1" src="@/static/image/user/man.png" alt="" />
<img v-show="resumeData.sex === 2" src="@/static/image/user/woman.png" alt="" />
<text>{{ resumeData.sex === 1 ? "男" : "女" }}</text>
</view>
<view class="item">
<img src="@/static/image/user/birth.png" alt="" />
<text>{{ resumeData.birthday }}</text>
</view>
<view class="item">
<!-- <img src="@/static/image/user/bag.png" alt=""> -->
<text>{{ resumeData.workExperienceYear }}</text>
</view>
</view>
<view class="information">
<text class="label">身份</text>
<text class="value">{{ resumeData.identityTypes }}</text>
</view>
<view class="information">
<text class="label">专业</text>
<text class="value">{{ resumeData.major || "无" }}</text>
</view>
<view class="information">
<text class="label">专业技术职称</text>
<text class="value">{{ resumeData.positionalTitle || "无" }}</text>
</view>
<view class="information">
<text class="label">职业资格/技能等级证书</text>
<text class="value">{{ resumeData.professionalCertificates || "无" }}</text>
</view>
<view class="information">
<text class="label">特种作业证</text>
<text class="value">{{ resumeData.specialCertificates || "无" }}</text>
</view>
<view class="information">
<text class="label">户籍地</text>
<text class="value">{{ resumeData.residenceCodes }}</text>
</view>
<view class="information">
<text class="label">常住地</text>
<text class="value">{{ resumeData.birthCodes }}</text>
</view>
</view>
<!-- 个人优势 --> <!-- 个人优势 -->
<view class="advantage"> <view class="advantage">
<view class="flex-between"> <view class="flex-between">
...@@ -126,9 +172,9 @@ import { ...@@ -126,9 +172,9 @@ import {
getApplicationByIdApi, getApplicationByIdApi,
getUserResumeByApplicationIdApi getUserResumeByApplicationIdApi
} from "@/api/postion"; } from "@/api/postion";
import { getCityNameByCodeApi } from "@/api/common"; import { getCityNameByCodeApi,getDistNameByCodeApi } from "@/api/common";
import { getEnumText, getEumData } from "@/utils/utils.js"; import { getEnumText, getEumData,getEnumText2} from "@/utils/utils.js";
import evn from "@/utils/config.js"; import evn from "@/utils/config.js";
import { useMessage } from "wot-design-uni"; import { useMessage } from "wot-design-uni";
// 投递id // 投递id
...@@ -184,14 +230,29 @@ const getUserResume = ({ userId, jobId, applicationId }) => { ...@@ -184,14 +230,29 @@ const getUserResume = ({ userId, jobId, applicationId }) => {
operator, operator,
cityCode cityCode
} = res.data.userResume; } = res.data.userResume;
const { workAge, education, avatarPath, phone } = res.data.userInfo; const {
workAge,
education,
avatarPath,
phone,
residenceCodes,
birthCodes,
specialCertificates,
positionalTitle,
professionalCertificates,
major,
identityTypes,
sex,
name,
username,
birthday
} = res.data.userInfo;
resumeData.personalAdvantage = personalAdvantages; //个人优势 resumeData.personalAdvantage = personalAdvantages; //个人优势
resumeData.maxSalary = maxSalary && maxSalary / 1000 + "k"; //薪水 resumeData.maxSalary = maxSalary && maxSalary / 1000 + "k"; //薪水
resumeData.minSalary = minSalary && minSalary / 1000 + "k"; resumeData.minSalary = minSalary && minSalary / 1000 + "k";
resumeData.preferredPosition = positionNames; resumeData.preferredPosition = positionNames;
resumeData.preferredCityName = (await getCityNameByCodeApi(cityCode)).data.cityName; resumeData.preferredCityName = (await getCityNameByCodeApi(cityCode)).data.cityName;
resumeData.realName = operator;
const educationExperienceJson = JSON.parse(educationExperience || "[]"); //教育精力 const educationExperienceJson = JSON.parse(educationExperience || "[]"); //教育精力
resumeData.educationExperience = educationExperienceJson; resumeData.educationExperience = educationExperienceJson;
resumeData.workExperienceYear = workAge; //工作年限 resumeData.workExperienceYear = workAge; //工作年限
...@@ -204,6 +265,30 @@ const getUserResume = ({ userId, jobId, applicationId }) => { ...@@ -204,6 +265,30 @@ const getUserResume = ({ userId, jobId, applicationId }) => {
applicationData.value = res.data.application || { status: 0 }; applicationData.value = res.data.application || { status: 0 };
applicationData.value.userPhone = phone; applicationData.value.userPhone = phone;
/* 个人信息 */
resumeData.realName = name;
resumeData.workExperienceYear = workAge;
resumeData.educationLevel = await getEnumText("EnumEducation", education);
resumeData.username = username;
resumeData.avatarPath = avatarPath;
resumeData.age = calculateAge(birthday);
resumeData.sex = sex;
resumeData.identityTypes = await getEnumText2("EnumIdentityType", identityTypes.split(","));
resumeData.birthday = formatTimestamp(28800000);
resumeData.major = major;
resumeData.positionalTitle = positionalTitle;
resumeData.professionalCertificates = professionalCertificates;
resumeData.specialCertificates = specialCertificates;
console.log('ascsacsacsa',residenceCodes);
getDistNameByCodeApi(residenceCodes.split(",")[2]).then(res => {
resumeData.residenceCodes = res.data.provinceName + res.data.cityName + res.data.districtName;
});
getDistNameByCodeApi(birthCodes.split(",")[2]).then(res => {
resumeData.birthCodes = res.data.provinceName + res.data.cityName + res.data.districtName;
});
/* /*
const { realName, workExperience: workExperienceYear, educationLevel, avatarPath } = res.data.user; const { realName, workExperience: workExperienceYear, educationLevel, avatarPath } = res.data.user;
...@@ -212,6 +297,28 @@ const getUserResume = ({ userId, jobId, applicationId }) => { ...@@ -212,6 +297,28 @@ const getUserResume = ({ userId, jobId, applicationId }) => {
*/ */
}); });
}; };
// 时间戳转为年月日
function formatTimestamp(timestampInMilliseconds) {
// 创建日期对象
var date = new Date(timestampInMilliseconds);
// 获取年月日
var year = date.getUTCFullYear();
var month = ("0" + (date.getUTCMonth() + 1)).slice(-2); // 月份是从0开始的,所以加1,并确保两位数
var day = ("0" + date.getUTCDate()).slice(-2); // 确保两位数
return `${year}.${month}.${day}`;
}
function calculateAge(birthday) {
var birthdayDate = new Date(birthday); // 将时间戳转换为日期对象
var today = new Date(); // 获取当前日期
var age = today.getFullYear() - birthdayDate.getFullYear(); // 计算年份差
// 检查生日是否已经过去
var m = today.getMonth() - birthdayDate.getMonth();
if (m < 0 || (m === 0 && today.getDate() < birthdayDate.getDate())) {
age--;
}
return age;
}
const pageType = ref(null); const pageType = ref(null);
onLoad(({ userId, jobId, applicationId, type }) => { onLoad(({ userId, jobId, applicationId, type }) => {
pageType.value = type; pageType.value = type;
...@@ -345,6 +452,49 @@ const invitation = () => { ...@@ -345,6 +452,49 @@ const invitation = () => {
border-radius: 50%; border-radius: 50%;
} }
} }
.basics {
padding: 0 32rpx 32rpx;
margin-top: 32rpx;
border-bottom: 16rpx solid #f3f4f8;
.basics-top {
display: flex;
align-items: center;
.item {
display: flex;
align-items: center;
margin-right: 96rpx;
img {
width: 28rpx;
height: 28rpx;
margin-right: 16rpx;
}
text {
font-size: 24rpx;
color: #1b2026;
}
}
}
.information {
.label {
margin-right: 16rpx;
font-size: 24rpx;
color: #77818f;
}
.value {
font-size: 24rpx;
color: #1b2026;
}
}
view {
margin-top: 16rpx;
font-size: 24rpx;
line-height: 36rpx;
color: #1b2026;
}
.arrow {
border-color: #1b2026;
}
}
.state { .state {
padding: 0 32rpx 32rpx; padding: 0 32rpx 32rpx;
margin-top: 32rpx; margin-top: 32rpx;
......
...@@ -31,6 +31,15 @@ export const getEnumText = async (type, code) => { ...@@ -31,6 +31,15 @@ export const getEnumText = async (type, code) => {
const eumData = await getEumData(type); const eumData = await getEumData(type);
return eumData.find(item => item.code == code)?.text || "无"; return eumData.find(item => item.code == code)?.text || "无";
}; };
export const getEnumText2 = async (type, codes) => {
const eumData = await getEumData(type);
// 使用 Array.prototype.map 和 .filter 方法来获取所有匹配项的 text
const texts = eumData.filter(item => codes.includes(item.code)).map(item => item.text);
// 将获取到的 text 数组合并成一个字符串,用 "|" 分割
return texts.join("|") || "无";
};
/** /**
* 将数据存储在本地存储空间中。 * 将数据存储在本地存储空间中。
* @param {string} key 要存储的数据的关键字,用于检索数据。 * @param {string} key 要存储的数据的关键字,用于检索数据。
......
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