From 34639d3a776fa68b7cefc032a845a0d571ebe9a1 Mon Sep 17 00:00:00 2001 From: liubo <1060247260@qq.com> Date: Fri, 9 Jun 2023 14:36:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/additionalInformation.vue | 465 +++++++++--------- .../userinfo/components/educationList.vue | 33 +- .../userinfo/components/jobExperience.vue | 14 +- .../userinfo/components/jobWantedStatus.vue | 23 +- .../personnelCategoryList.vue | 2 +- .../userinfo/components/trainingIntention.vue | 2 +- src/components/userinfo/userInfoModal.vue | 11 +- src/plugs/utils.js | 6 +- 8 files changed, 297 insertions(+), 259 deletions(-) diff --git a/src/components/userinfo/components/additionalInformation.vue b/src/components/userinfo/components/additionalInformation.vue index b07b147..6b9195c 100644 --- a/src/components/userinfo/components/additionalInformation.vue +++ b/src/components/userinfo/components/additionalInformation.vue @@ -1,30 +1,28 @@ \ No newline at end of file diff --git a/src/components/userinfo/components/educationList.vue b/src/components/userinfo/components/educationList.vue index 7cb153e..33a7346 100644 --- a/src/components/userinfo/components/educationList.vue +++ b/src/components/userinfo/components/educationList.vue @@ -2,7 +2,7 @@
教育经历 - + 取消 添加 保存 @@ -90,15 +90,15 @@
-
+
{{ item.name || '-' }} | {{ item.major || '-' }} | - {{ item.educationName || '-' }} + {{ getEducationName(item.education) }} | {{ item.beginDate || '-' }}~{{ item.endDate || '-' }} - + editIcon @@ -134,8 +134,8 @@ export default { default: null }, info: { - type: Object, - default: null + type: Array, + default: [] } }, data() { @@ -165,12 +165,11 @@ export default { }, created() { this.defaultInfo = { ...this.inputInfo }; - this.init(); + // this.init(); }, mounted() {}, methods: { init() { - // this.info = null; this.querySysMemberEdu(); }, // 查询用户教育经历 @@ -183,25 +182,31 @@ export default { // return; // } console.info("educationlist", this.info); - const data = this.info; + const data = [...this.info]; + this.info = []; if (data) { data.map(async item => { const educationName = item.education - ? await this.getEducation(data[0].education) + ? await this.getEducation(item.education) : "-"; Reflect.set(item, "educationName", educationName); }); this.inputFirstClick = [true, true, true]; this.info = data; } + console.info(this.info[0].educationName); // } catch (error) { // console.log(error); // return '-'; // } }, + getEducationName(education) { + const educationName = education ? this.getEducation(education) : "-"; + return educationName; + }, setDefaultSelectEducation(education) { const index = this.educationWordList.findIndex( - item => item.dataDictionary === education + item => item.dataDictionary == education ); if (index > -1) { this.selectEducationIndex = index; @@ -212,11 +217,11 @@ export default { * @param { String } education 对应字典中学历编号 * @return { String } 返回对应学历信息 */ - async getEducation(education) { + getEducation(education) { try { let educationString = "-"; this.educationWordList.map(item => { - if (item.dataDictionary === education) { + if (item.dataDictionary == education) { educationString = item.typeName; } }); @@ -287,7 +292,7 @@ export default { }, checkData() { if (isEmpty(this.inputInfo.name)) return "请输入学校"; - if (this.selectEducationIndex === undefined) return "请选择学历"; + if (this.selectEducationIndex == undefined) return "请选择学历"; if (isEmpty(this.inputInfo.beginDate)) return "请选择入学时间"; if (isEmpty(this.inputInfo.endDate)) return "请选择毕业时间"; if (this.inputInfo.beginDate._d > this.inputInfo.endDate._d) diff --git a/src/components/userinfo/components/jobExperience.vue b/src/components/userinfo/components/jobExperience.vue index 5cfc5f1..89e9228 100644 --- a/src/components/userinfo/components/jobExperience.vue +++ b/src/components/userinfo/components/jobExperience.vue @@ -164,8 +164,8 @@ export default { default: 1 }, info: { - type: Object, - default: null + type: Array, + default: [] } }, data() { @@ -193,8 +193,8 @@ export default { }, async created() { this.defaultInputInfo = { ...this.inputInfo }; - this.jobList = await this.getJobTypeList("岗位分类"); - this.jobList = removeEmptyArrays(this.jobList); + const jobList = await this.getJobTypeList("岗位分类"); + this.jobList = removeEmptyArrays(jobList); this.init(); }, mounted() {}, @@ -226,6 +226,12 @@ export default { // console.log(error); // } }, + async getEducationName(education) { + const educationName = education + ? await this.getEducation(education) + : "-"; + return educationName; + }, /** * 字典查询匹配期望岗位 * @param { String } jobTypeOne 层级一岗位匹配 diff --git a/src/components/userinfo/components/jobWantedStatus.vue b/src/components/userinfo/components/jobWantedStatus.vue index b8b0210..f8ccf1b 100644 --- a/src/components/userinfo/components/jobWantedStatus.vue +++ b/src/components/userinfo/components/jobWantedStatus.vue @@ -30,7 +30,7 @@ * 求职状态: - {{ info && info.jobWantedStatus || '-' }} + {{ info && getJobWantedStatus(info.status) || '-' }}
* 意向薪资: - {{ info && info.wishSalaryRange || '-' }} + {{ info && getSalaryRange(info.salary) || '-' }}
{{ info && info.provinceCode ? getWorkCity(cityList, info.provinceCode, info.cityCode, info.districtCode) : '-' }} + >{{ info && info.provinceCode ? getWorkCity(cityList, info.provinceCode, info.cityCode, info.districtCode) || '-' : '-' }}
* 意向岗位: - {{ info && info.wishJob || '-' }} + {{ info && getWithJob(info.jobTypeOne, info.jobTypeTwo) || '-' }}
* 期望行业: - {{ info && info.laborType || '-' }} + + {{ info && getLaborType( + info.laborTypeOne, + info.laborTypeTwo + ) || '-' }} +
* 工作性质: - {{ info && info.jobCategory || '-' }} + + {{ info && getJobCategory( + info.jobCategory ? info.jobCategory.toString() : null + ) || '-' }} +
-
+
@@ -221,6 +221,7 @@ export default { async mounted() { try { this.educationWordList = await this.getJobLightspotLabel("学历分类"); + console.info("educationWordList", this.educationWordList); } catch (error) { console.log("error", error); } diff --git a/src/plugs/utils.js b/src/plugs/utils.js index d175be2..d8ac5fd 100644 --- a/src/plugs/utils.js +++ b/src/plugs/utils.js @@ -35,16 +35,16 @@ export const getWorkCity = (cityRes, province, city, area) => { const addressList = []; if (cityRes && province) { for (let provinceItem of cityRes) { - if (provinceItem.code == province) { + if (provinceItem.code.substr(0, 6) == province) { addressList.push(provinceItem.name); } if (city) { for (let cityItem of provinceItem.list) { - if (cityItem.code == city) { + if (cityItem.code.substr(0, 6) == city) { addressList.push(cityItem.name); if (area) { for (let areaItem of cityItem.list) { - if (areaItem.code == area) { + if (areaItem.code.substr(0, 6) == area) { addressList.push(areaItem.name); } }