消息页面需求修改

This commit is contained in:
FengHui
2026-05-19 13:21:35 +08:00
parent 57994d1b2c
commit a070976c0c
5 changed files with 141 additions and 8 deletions

View File

@@ -6,8 +6,8 @@
*/ */
export default { export default {
// baseUrl: 'http://39.98.44.136:8080', // 测试 // baseUrl: 'http://39.98.44.136:8080', // 测试
baseUrl: 'https://www.xjksly.cn/api/ks', // 正式环境 // baseUrl: 'https://www.xjksly.cn/api/ks', // 正式环境
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试 baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试
// LCBaseUrl:'http://10.110.145.145:9100',//内网端口 // LCBaseUrl:'http://10.110.145.145:9100',//内网端口
// LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶 // LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶

View File

@@ -106,6 +106,11 @@
<view class="input-titile">学历</view> <view class="input-titile">学历</view>
<input class="input-con" v-model="state.educationText" disabled placeholder="请选择学历" /> <input class="input-con" v-model="state.educationText" disabled placeholder="请选择学历" />
</view> </view>
<view class="content-input" :class="{ 'input-error': userTypeError }" @click="changeUserType">
<view class="input-titile">人员类型</view>
<input class="input-con" v-model="state.userTypeText" disabled placeholder="请选择人员类型(可多选)" />
<view v-if="userTypeError" class="error-message">{{ userTypeError }}</view>
</view>
<view class="content-input" :class="{ 'input-error': idCardError }"> <view class="content-input" :class="{ 'input-error': idCardError }">
<view class="input-titile">身份证</view> <view class="input-titile">身份证</view>
<input <input
@@ -280,6 +285,8 @@ const state = reactive({
workExperience: '', workExperience: '',
salayText: '', salayText: '',
jobsText: [], jobsText: [],
userTypeText: '',
userTypeValues: [],
skills: [], // 技能数据结构 { name, level } skills: [], // 技能数据结构 { name, level }
currentEditingSkillIndex: -1 // 当前正在编辑的技能索引 currentEditingSkillIndex: -1 // 当前正在编辑的技能索引
}); });
@@ -295,6 +302,7 @@ const fromValue = reactive({
name: '', name: '',
age: '', age: '',
ytjPassword: '', ytjPassword: '',
userType: '',
}); });
// 输入校验相关 // 输入校验相关
@@ -303,6 +311,7 @@ const nameError = ref('');
const ageError = ref(''); const ageError = ref('');
const sexError = ref(''); const sexError = ref('');
const experienceError = ref(''); const experienceError = ref('');
const userTypeError = ref('');
const passwordError = ref(''); const passwordError = ref('');
onLoad((parmas) => { onLoad((parmas) => {
@@ -597,6 +606,37 @@ async function changeEducation() {
}); });
} }
async function changeUserType() {
let userTypeData = oneDictData('user_type');
if (!userTypeData || userTypeData.length === 0) {
try {
userTypeData = await getDictSelectOption('user_type');
if (!userTypeData || userTypeData.length === 0) {
$api.msg('人员类型数据加载中,请稍后再试');
return;
}
} catch (error) {
console.error('加载人员类型字典数据失败:', error);
$api.msg('加载人员类型数据失败');
return;
}
}
openSelectPopup({
title: '人员类型',
maskClick: true,
data: [userTypeData],
multiSelect: true,
defaultValues: state.userTypeValues,
success: (selectedValues, selectedItems) => {
state.userTypeValues = selectedValues;
fromValue.userType = selectedValues.join(',');
state.userTypeText = selectedItems.map(item => item.label).join('、');
},
});
}
function changeArea() { function changeArea() {
openSelectPopup({ openSelectPopup({
title: '区域', title: '区域',
@@ -662,6 +702,13 @@ function nextStep() {
experienceError.value = ''; experienceError.value = '';
} }
// 人员类型校验
if (!state.userTypeText) {
userTypeError.value = '请选择人员类型';
} else {
userTypeError.value = '';
}
// 学历校验 // 学历校验
if (!state.educationText) { if (!state.educationText) {
$api.msg('请选择您的学历'); $api.msg('请选择您的学历');
@@ -673,6 +720,7 @@ function nextStep() {
if (sexError.value) return; if (sexError.value) return;
if (ageError.value) return; if (ageError.value) return;
if (experienceError.value) return; if (experienceError.value) return;
if (userTypeError.value) return;
if (idCardError.value || !fromValue.idCard) { if (idCardError.value || !fromValue.idCard) {
if (!fromValue.idCard) $api.msg('请输入身份证号码'); if (!fromValue.idCard) $api.msg('请输入身份证号码');
return; return;
@@ -787,7 +835,8 @@ function complete() {
jobTitleId: fromValue.jobTitleId, jobTitleId: fromValue.jobTitleId,
salaryMin: fromValue.salaryMin, salaryMin: fromValue.salaryMin,
salaryMax: fromValue.salaryMax, salaryMax: fromValue.salaryMax,
ytjPassword: fromValue.ytjPassword ytjPassword: fromValue.ytjPassword,
userType: fromValue.userType
}, },
appSkillsList: appSkillsList appSkillsList: appSkillsList
}; };

View File

@@ -64,6 +64,10 @@
placeholder="请选择您的政治面貌" placeholder="请选择您的政治面貌"
/> />
</view> </view>
<view class="content-input" @click="changeUserType">
<view class="input-titile">人员类型</view>
<input class="input-con triangle" v-model="state.userTypeText" disabled placeholder="请选择人员类型(可多选)" />
</view>
<view class="content-input"> <view class="content-input">
<view class="input-titile">身份证</view> <view class="input-titile">身份证</view>
<input class="input-con" v-model="fromValue.idCard" placeholder="请输入身份证号码" /> <input class="input-con" v-model="fromValue.idCard" placeholder="请输入身份证号码" />
@@ -169,8 +173,10 @@ const needGoBackTwoStep = ref(false);
const state = reactive({ const state = reactive({
educationText: '', educationText: '',
politicalAffiliationText: '', politicalAffiliationText: '',
skills: [], // 新的技能数据结构包含id字段 userTypeText: '',
currentEditingSkillIndex: -1 // 当前正在编辑的技能索引 userTypeValues: [],
skills: [],
currentEditingSkillIndex: -1
}); });
const fromValue = reactive({ const fromValue = reactive({
name: '', name: '',
@@ -180,7 +186,8 @@ const fromValue = reactive({
education: '', education: '',
politicalAffiliation: '', politicalAffiliation: '',
idCard: '', idCard: '',
phone: '' phone: '',
userType: ''
}); });
// 输入校验相关 // 输入校验相关
@@ -271,6 +278,15 @@ function initLoad() {
if (currentUserInfo.politicalAffiliation) { if (currentUserInfo.politicalAffiliation) {
state.politicalAffiliationText = dictLabel('affiliation', currentUserInfo.politicalAffiliation); state.politicalAffiliationText = dictLabel('affiliation', currentUserInfo.politicalAffiliation);
} }
// 回显人员类型
if (currentUserInfo.userType) {
fromValue.userType = currentUserInfo.userType;
const userTypeValues = currentUserInfo.userType.split(',');
state.userTypeValues = userTypeValues;
initUserTypeText(userTypeValues);
}
const result = getFormCompletionPercent(fromValue); const result = getFormCompletionPercent(fromValue);
percent.value = result; percent.value = result;
} }
@@ -319,6 +335,33 @@ function initEducationText() {
checkDict(); checkDict();
} }
function initUserTypeText(userTypeValues) {
const trySetText = (data) => {
if (data && data.length > 0) {
const labels = userTypeValues.map(v => {
const item = data.find(d => String(d.value) === String(v));
return item ? item.label : '';
}).filter(Boolean);
if (labels.length > 0) {
state.userTypeText = labels.join('、');
return true;
}
}
return false;
};
if (trySetText(dictStore.state.user_type)) return;
getDictSelectOption('user_type').then(data => {
if (!trySetText(data)) {
state.userTypeText = fromValue.userType;
}
}).catch(() => {
state.userTypeText = fromValue.userType;
});
}
const confirm = () => { const confirm = () => {
if (!fromValue.name) { if (!fromValue.name) {
return $api.msg('请输入姓名'); return $api.msg('请输入姓名');
@@ -332,6 +375,9 @@ const confirm = () => {
if (!fromValue.politicalAffiliation) { if (!fromValue.politicalAffiliation) {
return $api.msg('请选择政治面貌'); return $api.msg('请选择政治面貌');
} }
if (!fromValue.userType) {
return $api.msg('请选择人员类型');
}
if (!checkingPhoneRegExp(fromValue.phone)) { if (!checkingPhoneRegExp(fromValue.phone)) {
return $api.msg('请输入正确手机号'); return $api.msg('请输入正确手机号');
} }
@@ -653,6 +699,37 @@ const changePoliticalAffiliation = () => {
}); });
}; };
async function changeUserType() {
let userTypeData = oneDictData('user_type');
if (!userTypeData || userTypeData.length === 0) {
try {
userTypeData = await getDictSelectOption('user_type');
if (!userTypeData || userTypeData.length === 0) {
$api.msg('人员类型数据加载中,请稍后再试');
return;
}
} catch (error) {
console.error('加载人员类型字典数据失败:', error);
$api.msg('加载人员类型数据失败');
return;
}
}
openSelectPopup({
title: '人员类型',
maskClick: true,
data: [userTypeData],
multiSelect: true,
defaultValues: state.userTypeValues,
success: (selectedValues, selectedItems) => {
state.userTypeValues = selectedValues;
fromValue.userType = selectedValues.join(',');
state.userTypeText = selectedItems.map(item => item.label).join('、');
},
});
}
function generateDatePickerArrays(startYear = 1950, endYear = new Date().getFullYear()) { function generateDatePickerArrays(startYear = 1950, endYear = new Date().getFullYear()) {
const years = []; const years = [];

View File

@@ -66,6 +66,13 @@ async function loadData() {
} }
function seeDetail(item, index) { function seeDetail(item, index) {
if (item.noticeType === '4') {
useReadMsg().markAsRead(item, index);
if (item.bussinessId) {
navTo(`/packageA/pages/post/post?jobId=${encodeURIComponent(item.bussinessId)}&encryptJobId=${encodeURIComponent(item.bussinessId)}`);
}
return;
}
switch (item.title) { switch (item.title) {
case '职位上新': case '职位上新':
useReadMsg().markAsRead(item, index); useReadMsg().markAsRead(item, index);

View File

@@ -201,8 +201,8 @@ export function createRequest(url, data = {}, method = 'GET', loading = false, h
// 响应拦截 // 响应拦截
if (resData.statusCode === 200) { if (resData.statusCode === 200) {
const responseData = handleResponseData(resData.data) const responseData = handleResponseData(resData.data)
// console.log('[请求] 接口地址:', config.baseUrl + url) console.log('[请求] 接口地址:', config.baseUrl + url)
// console.log('[请求] 解密后数据:', responseData) console.log('[请求] 解密后数据:', JSON.stringify(responseData))
const { const {
code, code,
msg msg