From c6650e3743bd1e9e19cffb41e07853b47ad56ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A6=86=E9=92=B1=E8=90=BD=E5=B0=BD=E6=A7=BF=E8=8A=B1?= =?UTF-8?q?=E7=A8=80?= <2675540038@qq.com> Date: Thu, 20 Feb 2025 14:57:51 +0800 Subject: [PATCH] 1 --- src/pages/pc/pc_message.vue | 20 ++++----- src/pages/register/index.vue | 46 +++++++++++-------- src/pages/user/user_edit.vue | 85 +++++++++++++++++++----------------- 3 files changed, 82 insertions(+), 69 deletions(-) diff --git a/src/pages/pc/pc_message.vue b/src/pages/pc/pc_message.vue index 357bef6..7dddbd7 100644 --- a/src/pages/pc/pc_message.vue +++ b/src/pages/pc/pc_message.vue @@ -24,27 +24,26 @@ - diff --git a/src/pages/register/index.vue b/src/pages/register/index.vue index 6fb8083..4faeed8 100644 --- a/src/pages/register/index.vue +++ b/src/pages/register/index.vue @@ -77,22 +77,22 @@
- + - + - + - + - + @@ -110,19 +110,19 @@ - + - + - + - + - + @@ -398,22 +398,22 @@
- + - + - + - + - + - + @@ -425,7 +425,7 @@ - + @@ -1370,8 +1370,16 @@ export default { this.$message.error('请输入身份证号码!'); return; } - if (this.formData.jiguan == '') { - this.$message.error('请输入籍贯!'); + if (this.formData.work_unit == '') { + this.$message.error('请输入工作单位!'); + return; + } + if (this.formData.unit_position == '') { + this.$message.error('请输入单位职务!'); + return; + } + if (this.formData.mail_address == '') { + this.$message.error('请输入通讯地址!'); return; } if (this.formData.business_license_image == '') { diff --git a/src/pages/user/user_edit.vue b/src/pages/user/user_edit.vue index 83cca75..1d0c715 100644 --- a/src/pages/user/user_edit.vue +++ b/src/pages/user/user_edit.vue @@ -1205,7 +1205,7 @@ export default { this.formData.phone = res.data.phone; this.formData.position_id = res.data.position_id; this.formData.industry_id = res.data.industry_id==0?null:res.data.industry_id; - this.formData.region_id = res.data.region_id; + this.formData.region_id = res.data.region_id==0?null:res.data.region_id; this.formData.password = res.data.password; this.formData.nikename = res.data.nikename; this.formData.gender = res.data.gender; @@ -1226,35 +1226,10 @@ export default { this.formData.other_contacts = res.data.other_contacts; this.formData.other_social_positions = res.data.other_social_positions; this.formData.position = res.data.position; - if (res.data.cardf_image == '') { - this.formData.cardf_image_show = []; - } else { - this.formData.cardf_image_show = [{url: store.state.user.apiUrl + res.data.cardf_image}]; - } - if (res.data.cardz_image == '') { - this.formData.cardz_image_show = []; - } else { - this.formData.cardz_image_show = [{url: store.state.user.apiUrl + res.data.cardz_image}]; - } - if (res.data.photo_image == '') { - this.formData.photo_image_show = []; - } else { - this.formData.photo_image_show = [{url: store.state.user.apiUrl + res.data.photo_image}]; - } - if (res.data.company_image == '') { - this.formData.company_image_show = []; - } else { - this.formData.company_image_show = [{url: store.state.user.apiUrl + res.data.company_image}]; - } this.formData.cardf_image = res.data.cardf_image; this.formData.cardz_image = res.data.cardz_image; this.formData.photo_image = res.data.photo_image; this.formData.company_image = res.data.company_image; - if (res.data.business_license_image == '') { - this.formData.business_license_image_show = []; - } else { - this.formData.business_license_image_show = [{url: store.state.user.apiUrl + res.data.business_license_image}]; - } this.formData.business_license_image = res.data.business_license_image; this.formData.unified_code = res.data.unified_code; this.formData.enterprise_nature = res.data.enterprise_nature; @@ -1286,17 +1261,6 @@ export default { this.formData.documents_file_show = [{url: store.state.user.apiUrl + res.data.documents_file}]; this.formData.introduction = res.data.introduction; this.formData.enterprise_name = res.data.enterprise_name; - if(res.data.work_experience==null||res.data.work_experience==''){ - this.workList = []; - }else{ - this.workList = JSON.parse(res.data.work_experience); - } - this.social_duties = res.data.main_social_positions.split(','); - if(res.data.other_contacts==null||res.data.other_contacts==''){ - this.contactsList = []; - }else{ - this.contactsList = JSON.parse(res.data.other_contacts); - } this.formData.longitude = res.data.longitude; this.formData.dimension=res.data.dimension; this.formData.reporting_method = res.data.reporting_method; @@ -1308,8 +1272,51 @@ export default { this.formData.mail_address=res.data.mail_address; this.formData.zip_code=res.data.zip_code; this.formData.registered_capital=res.data.registered_capital; - this.tuan_list = JSON.parse(res.data.tuanweifuzerenxinxi); - + if(res.data.tuanweifuzerenxinxi!=''&&res.data.tuanweifuzerenxinxi!=null){ + this.tuan_list = JSON.parse(res.data.tuanweifuzerenxinxi); + }else{ + this.tuan_list = []; + } + if (res.data.business_license_image == '') { + this.formData.business_license_image_show = []; + } else { + this.formData.business_license_image_show = [{url: store.state.user.apiUrl + res.data.business_license_image}]; + } + if (res.data.cardf_image == '') { + this.formData.cardf_image_show = []; + } else { + this.formData.cardf_image_show = [{url: store.state.user.apiUrl + res.data.cardf_image}]; + } + if (res.data.cardz_image == '') { + this.formData.cardz_image_show = []; + } else { + this.formData.cardz_image_show = [{url: store.state.user.apiUrl + res.data.cardz_image}]; + } + if (res.data.photo_image == '') { + this.formData.photo_image_show = []; + } else { + this.formData.photo_image_show = [{url: store.state.user.apiUrl + res.data.photo_image}]; + } + if (res.data.company_image == '') { + this.formData.company_image_show = []; + } else { + this.formData.company_image_show = [{url: store.state.user.apiUrl + res.data.company_image}]; + } + if(res.data.work_experience==null||res.data.work_experience==''){ + this.workList = []; + }else{ + this.workList = JSON.parse(res.data.work_experience); + } + if( res.data.main_social_positions==''|| res.data.main_social_positions==null){ + this.social_duties = []; + }else { + this.social_duties = res.data.main_social_positions.split(','); + } + if(res.data.other_contacts==null||res.data.other_contacts==''){ + this.contactsList = []; + }else{ + this.contactsList = JSON.parse(res.data.other_contacts); + } }) .catch((e) => { console.log(e);