|
@@ -88,8 +88,8 @@
|
|
|
<form-item label="学校"> <el-input v-model="info.info.yx" placeholder="请输入院校" readonly></el-input></form-item>
|
|
|
<form-item label="所学专业"> <el-input v-model="info.info.zy" placeholder="请输入所学专业" readonly></el-input></form-item>
|
|
|
<form-item label="生源地"> <el-input v-model="info.info.syszd" placeholder="请输入学生生源地" readonly></el-input></form-item>
|
|
|
- <form-item label="手机号"> <el-input v-model="info.contact.mobile" placeholder="请输入手机号"></el-input></form-item>
|
|
|
- <form-item label="邮箱"> <el-input v-model="info.contact.email" placeholder="请输入邮箱"></el-input></form-item>
|
|
|
+ <form-item label="手机号"> <el-input v-model="contact.mobile" placeholder="请输入手机号"></el-input></form-item>
|
|
|
+ <form-item label="邮箱"> <el-input v-model="contact.email" placeholder="请输入邮箱"></el-input></form-item>
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
<el-card class="box-card" shadow="never" style="margin-top: 2rem">
|
|
@@ -357,6 +357,7 @@ export default {
|
|
|
preInfo: {},
|
|
|
educationsForm: {},
|
|
|
worksForm: {},
|
|
|
+ contact: {},
|
|
|
uploads: {},
|
|
|
provinceList: [],
|
|
|
cityList: [],
|
|
@@ -409,11 +410,14 @@ export default {
|
|
|
...mapActions(['userOperation', 'resumesOperation', 'dicOperation']),
|
|
|
async search() {
|
|
|
let result = await this.resumesOperation({ type: 'search', data: { id: this.user.id } });
|
|
|
- this.$set(this, `expect`, result.data.expect);
|
|
|
- this.returnData(result.data);
|
|
|
+ if (`${result.errcode}` === `0` && result.data !== null) {
|
|
|
+ this.$set(this, `expect`, result.data.expect);
|
|
|
+ this.returnData(result.data);
|
|
|
+ }
|
|
|
this.$set(this, `info`, result.data ? result.data : { info: {} });
|
|
|
result = await this.userOperation({ type: 'search', data: { id: this.user.id } });
|
|
|
this.$set(this.info, `info`, result.data.info ? result.data.info : { info: {} });
|
|
|
+ this.firstCheck();
|
|
|
this.$set(this, `loading`, true);
|
|
|
},
|
|
|
async toSubmit() {
|
|
@@ -421,6 +425,7 @@ export default {
|
|
|
data = this.proData(data);
|
|
|
this.info.expect = data;
|
|
|
data = this.proPic(JSON.parse(JSON.stringify(this.info)));
|
|
|
+ data.contact = JSON.parse(JSON.stringify(this.contact));
|
|
|
let result;
|
|
|
if (this.info.id) {
|
|
|
result = await this.resumesOperation({ type: 'update', data: { info: data, id: this.info.id } });
|
|
@@ -592,6 +597,9 @@ export default {
|
|
|
if (data.attachments.length > 0) {
|
|
|
this.$set(this.uploads, `attachments`, data.attachments);
|
|
|
}
|
|
|
+ if (data.contact) {
|
|
|
+ this.$set(this, `contact`, data.contact);
|
|
|
+ }
|
|
|
},
|
|
|
checkResume() {
|
|
|
let preInfo = JSON.parse(JSON.stringify(this.info));
|
|
@@ -655,6 +663,10 @@ export default {
|
|
|
return true;
|
|
|
}
|
|
|
},
|
|
|
+ firstCheck() {
|
|
|
+ if (this.info.id) return;
|
|
|
+ this.$set(this.expect, `city`, []);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|