|
|
@@ -3,12 +3,14 @@
|
|
|
<!-- <view class="jdtSty" :style="'width:' + formTableInfos.completeness + '%'"></view> -->
|
|
|
<u-navbar back-icon-name="arrow-left" style="position: relative;">
|
|
|
<view style="justify-content: center;margin-left: 85rpx;flex: 1;">
|
|
|
- <view style="color: #0c141f;font-size: 32rpx;font-weight: bold;text-align: center;">{{id !== null ? '修改简历':'新建简历'}}</view>
|
|
|
- <view style="font-size: 18rpx;color: #666;text-align: center;" v-if="formTableInfos.completeness">简历完成度{{formTableInfos.completeness}}%</view>
|
|
|
- </view>
|
|
|
- <view v-if="formTableInfos.completeness" style="height: 2rpx;background-color: #3FEFB7;position: absolute;bottom: -2rpx;left: 0;" :style="'width:' + formTableInfos.completeness + 'vw'">
|
|
|
-
|
|
|
+ <view style="color: #0c141f;font-size: 32rpx;font-weight: bold;text-align: center;">{{ id !== null ? '修改简历' : '新建简历' }}</view>
|
|
|
+ <view style="font-size: 18rpx;color: #666;text-align: center;" v-if="formTableInfos.completeness">简历完成度{{ formTableInfos.completeness }}%</view>
|
|
|
</view>
|
|
|
+ <view
|
|
|
+ v-if="formTableInfos.completeness"
|
|
|
+ style="height: 2rpx;background-color: #3FEFB7;position: absolute;bottom: -2rpx;left: 0;"
|
|
|
+ :style="'width:' + formTableInfos.completeness + 'vw'"
|
|
|
+ ></view>
|
|
|
</u-navbar>
|
|
|
<view class="pad_59">
|
|
|
<view class="lisbox">
|
|
|
@@ -27,11 +29,11 @@
|
|
|
</view>
|
|
|
<!-- <view class="color_b" style="margin-bottom: 24rpx;">{{ userInfo.realname }}</view> -->
|
|
|
<view class="dis_fy" style="margin-bottom: 24rpx;">
|
|
|
- <view class="le_h">{{ userInfo.sex === 0 ? '男' : '女' }}</view>
|
|
|
+ <view class="le_h">{{ formTableInfos.sex === 0 ? '男' : '女' }}</view>
|
|
|
<view class="fgs"></view>
|
|
|
- <view class="le_h">{{ getYears(userInfo.userBirth) }}岁</view>
|
|
|
+ <view class="le_h">{{ getYears(formTableInfos.userBirth) }}岁</view>
|
|
|
<view class="fgs"></view>
|
|
|
- <view class="le_h">{{ userInfo.houseCity }} - {{ userInfo.houseDistrict }}</view>
|
|
|
+ <view class="le_h">{{ formTableInfos.city }} - {{ formTableInfos.district }}</view>
|
|
|
</view>
|
|
|
<!-- {{ userInfo.telphone }} -->
|
|
|
<view class="le_h" style="margin-bottom: 24rpx;display: flex;align-items: center;">
|
|
|
@@ -465,39 +467,68 @@ export default {
|
|
|
array_Arrivaltime: ['随时', '1周内', '1个月内', '3个月内', '待定'],
|
|
|
array_eduType: ['小学', '初中', '中专/高中', '专科', '本科', '硕士研究生', '博士研究生'],
|
|
|
array_cfType: ['建筑资历证书', '非建筑资历证书'],
|
|
|
- userInfo: {},
|
|
|
userSchool: {},
|
|
|
id: null,
|
|
|
- showJDT: false,
|
|
|
+ showJDT: false
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- this.getUserInfo();
|
|
|
+ // this.getUserInfo();
|
|
|
this.getUserSchool();
|
|
|
if (options.id !== undefined) {
|
|
|
this.id = options.id;
|
|
|
this.init(options.id);
|
|
|
+ } else {
|
|
|
+ this.initForm();
|
|
|
}
|
|
|
},
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
onReady() {
|
|
|
this.$refs.uForm.setRules(this.rules);
|
|
|
},
|
|
|
- computed: { ...mapGetters(['dictObj']) },
|
|
|
+ computed: { ...mapGetters(['dictObj', 'userInfo']) },
|
|
|
+
|
|
|
mounted() {
|
|
|
this.getCateList();
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ userInfo(val, oldVal) {
|
|
|
+ if (val) {
|
|
|
+ this.initForm();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ initForm() {
|
|
|
+ this.formTableInfos.realname = this.userInfo.realname;
|
|
|
+ this.formTableInfos.sex = this.userInfo.sex;
|
|
|
+ this.formTableInfos.userBirth = this.userInfo.userBirth;
|
|
|
+ this.formTableInfos.city = this.userInfo.houseCity;
|
|
|
+ this.formTableInfos.district = this.userInfo.houseDistrict;
|
|
|
+ // this.formTableInfos.telphone = this.userInfo.telphone;
|
|
|
+ // this.formTableInfos.eduLevel = userInfo.
|
|
|
+ this.formTableInfos.email = this.userInfo.email;
|
|
|
+ },
|
|
|
init(v) {
|
|
|
var self = this;
|
|
|
this.$api.recruitresumeId(v).then(res => {
|
|
|
if (res.data.code === 200) {
|
|
|
- self.showJDT = true
|
|
|
- res.data.data.certificateJson = JSON.parse(res.data.data.certificateJson);
|
|
|
- res.data.data.eduExperienceJson = JSON.parse(res.data.data.eduExperienceJson);
|
|
|
- res.data.data.projectExperienceJson = JSON.parse(res.data.data.projectExperienceJson);
|
|
|
- res.data.data.workExperienceJson = JSON.parse(res.data.data.workExperienceJson);
|
|
|
- res.data.data.userBirth = self.getYears(res.data.data.userBirth.slice(0, res.data.data.userBirth.indexOf('T')));
|
|
|
+ self.showJDT = true;
|
|
|
+ if (res.data.data.certificateJson !== null) {
|
|
|
+ res.data.data.certificateJson = JSON.parse(res.data.data.certificateJson);
|
|
|
+ }
|
|
|
+ if (res.data.data.eduExperienceJson !== null) {
|
|
|
+ res.data.data.eduExperienceJson = JSON.parse(res.data.data.eduExperienceJson);
|
|
|
+ }
|
|
|
+ if (res.data.data.projectExperienceJson !== null) {
|
|
|
+ res.data.data.projectExperienceJson = JSON.parse(res.data.data.projectExperienceJson);
|
|
|
+ }
|
|
|
+ if (res.data.data.workExperienceJson !== null) {
|
|
|
+ res.data.data.workExperienceJson = JSON.parse(res.data.data.workExperienceJson);
|
|
|
+ }
|
|
|
+ if (res.data.data.userBirth !== null && res.data.data.userBirth.indexOf('T') !== -1) {
|
|
|
+ res.data.data.userBirth = res.data.data.userBirth.slice(0, res.data.data.userBirth.indexOf('T'));
|
|
|
+ }
|
|
|
if (res.data.data.eduLevel) {
|
|
|
self.index_level = self.dictObj['edu_level'].indexOf(res.data.data.eduLevel);
|
|
|
}
|
|
|
@@ -512,14 +543,15 @@ export default {
|
|
|
res.data.data.startYear = res.data.data.startYear + '年';
|
|
|
}
|
|
|
this.formTableInfos = res.data.data;
|
|
|
+ console.log(this.formTableInfos);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- getUserInfo() {
|
|
|
- this.$api.getInfo().then(res => {
|
|
|
- this.userInfo = res.data.data;
|
|
|
- });
|
|
|
- },
|
|
|
+ // getUserInfo() {
|
|
|
+ // this.$api.getInfo().then(res => {
|
|
|
+ // this.userInfo = res.data.data;
|
|
|
+ // });
|
|
|
+ // },
|
|
|
getUserSchool() {
|
|
|
this.$api.getSchoolInfo().then(res => {
|
|
|
this.userSchool = res.data.data;
|
|
|
@@ -986,7 +1018,7 @@ export default {
|
|
|
const awaitsMys = await this.$api.addrecruitresume(data);
|
|
|
uni.hideLoading();
|
|
|
if (awaitsMys.data.code === 200) {
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
uni.showToast({
|
|
|
title: '提交成功',
|
|
|
icon: 'success',
|
|
|
@@ -999,7 +1031,7 @@ export default {
|
|
|
}, 1000);
|
|
|
}
|
|
|
});
|
|
|
- },500);
|
|
|
+ }, 500);
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '提交失败',
|
|
|
@@ -1012,7 +1044,7 @@ export default {
|
|
|
const awaitsMys = await this.$api.editrecruitresume(data);
|
|
|
uni.hideLoading();
|
|
|
if (awaitsMys.data.code === 200) {
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
uni.showToast({
|
|
|
title: '修改成功',
|
|
|
icon: 'success',
|
|
|
@@ -1025,8 +1057,7 @@ export default {
|
|
|
}, 1000);
|
|
|
}
|
|
|
});
|
|
|
- },500);
|
|
|
-
|
|
|
+ }, 500);
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '修改失败',
|
|
|
@@ -1310,7 +1341,8 @@ export default {
|
|
|
this.$navTo.togo('/pages2/wd/info', {});
|
|
|
},
|
|
|
getYears(strBirthday) {
|
|
|
- if (strBirthday === undefined) {
|
|
|
+ console.log(strBirthday, 101);
|
|
|
+ if (!strBirthday) {
|
|
|
return '-';
|
|
|
}
|
|
|
var returnAge;
|
|
|
@@ -1354,10 +1386,10 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
- .jdtSty{
|
|
|
- height: 2rpx;
|
|
|
- background-color: #3FEFB7;
|
|
|
- }
|
|
|
+.jdtSty {
|
|
|
+ height: 2rpx;
|
|
|
+ background-color: #3fefb7;
|
|
|
+}
|
|
|
.pad_59 {
|
|
|
padding: 15rpx 28rpx 59rpx 59rpx;
|
|
|
}
|