From a070976c0c460d58e267ec65d1b9f9882676194b Mon Sep 17 00:00:00 2001 From: FengHui Date: Tue, 19 May 2026 13:21:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=A1=B5=E9=9D=A2=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.js | 4 +- .../pages/complete-info/complete-info.vue | 51 +++++++++++- packageA/pages/personalInfo/personalInfo.vue | 83 ++++++++++++++++++- pages/msglog/read.vue | 7 ++ utils/request.js | 4 +- 5 files changed, 141 insertions(+), 8 deletions(-) diff --git a/config.js b/config.js index 4f174da..dff82d2 100644 --- a/config.js +++ b/config.js @@ -6,8 +6,8 @@ */ export default { // baseUrl: 'http://39.98.44.136:8080', // 测试 - baseUrl: 'https://www.xjksly.cn/api/ks', // 正式环境 - // baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试 + // baseUrl: 'https://www.xjksly.cn/api/ks', // 正式环境 + baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试 // LCBaseUrl:'http://10.110.145.145:9100',//内网端口 // LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶 diff --git a/packageA/pages/complete-info/complete-info.vue b/packageA/pages/complete-info/complete-info.vue index 4fe8672..1476876 100644 --- a/packageA/pages/complete-info/complete-info.vue +++ b/packageA/pages/complete-info/complete-info.vue @@ -106,6 +106,11 @@ 学历 + + 人员类型 + + {{ userTypeError }} + 身份证 { @@ -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() { openSelectPopup({ title: '区域', @@ -662,6 +702,13 @@ function nextStep() { experienceError.value = ''; } + // 人员类型校验 + if (!state.userTypeText) { + userTypeError.value = '请选择人员类型'; + } else { + userTypeError.value = ''; + } + // 学历校验 if (!state.educationText) { $api.msg('请选择您的学历'); @@ -673,6 +720,7 @@ function nextStep() { if (sexError.value) return; if (ageError.value) return; if (experienceError.value) return; + if (userTypeError.value) return; if (idCardError.value || !fromValue.idCard) { if (!fromValue.idCard) $api.msg('请输入身份证号码'); return; @@ -787,7 +835,8 @@ function complete() { jobTitleId: fromValue.jobTitleId, salaryMin: fromValue.salaryMin, salaryMax: fromValue.salaryMax, - ytjPassword: fromValue.ytjPassword + ytjPassword: fromValue.ytjPassword, + userType: fromValue.userType }, appSkillsList: appSkillsList }; diff --git a/packageA/pages/personalInfo/personalInfo.vue b/packageA/pages/personalInfo/personalInfo.vue index 4a2be78..28135c4 100644 --- a/packageA/pages/personalInfo/personalInfo.vue +++ b/packageA/pages/personalInfo/personalInfo.vue @@ -64,6 +64,10 @@ placeholder="请选择您的政治面貌" /> + + 人员类型 + + 身份证 @@ -169,8 +173,10 @@ const needGoBackTwoStep = ref(false); const state = reactive({ educationText: '', politicalAffiliationText: '', - skills: [], // 新的技能数据结构,包含id字段 - currentEditingSkillIndex: -1 // 当前正在编辑的技能索引 + userTypeText: '', + userTypeValues: [], + skills: [], + currentEditingSkillIndex: -1 }); const fromValue = reactive({ name: '', @@ -180,7 +186,8 @@ const fromValue = reactive({ education: '', politicalAffiliation: '', idCard: '', - phone: '' + phone: '', + userType: '' }); // 输入校验相关 @@ -271,6 +278,15 @@ function initLoad() { if (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); percent.value = result; } @@ -319,6 +335,33 @@ function initEducationText() { 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 = () => { if (!fromValue.name) { return $api.msg('请输入姓名'); @@ -332,6 +375,9 @@ const confirm = () => { if (!fromValue.politicalAffiliation) { return $api.msg('请选择政治面貌'); } + if (!fromValue.userType) { + return $api.msg('请选择人员类型'); + } if (!checkingPhoneRegExp(fromValue.phone)) { 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()) { const years = []; diff --git a/pages/msglog/read.vue b/pages/msglog/read.vue index c75efb6..fe72212 100644 --- a/pages/msglog/read.vue +++ b/pages/msglog/read.vue @@ -66,6 +66,13 @@ async function loadData() { } 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) { case '职位上新': useReadMsg().markAsRead(item, index); diff --git a/utils/request.js b/utils/request.js index ac5db72..0dcea0a 100644 --- a/utils/request.js +++ b/utils/request.js @@ -201,8 +201,8 @@ export function createRequest(url, data = {}, method = 'GET', loading = false, h // 响应拦截 if (resData.statusCode === 200) { const responseData = handleResponseData(resData.data) - // console.log('[请求] 接口地址:', config.baseUrl + url) - // console.log('[请求] 解密后数据:', responseData) + console.log('[请求] 接口地址:', config.baseUrl + url) + console.log('[请求] 解密后数据:', JSON.stringify(responseData)) const { code, msg