diff --git a/src/js/dai/request.js b/src/js/dai/request.js index 19cbc73fb..dc88257c3 100644 --- a/src/js/dai/request.js +++ b/src/js/dai/request.js @@ -41,7 +41,7 @@ const request = curry( if (res.data.code > 8000 && res.data.code < 10000) { message({ - message: res.data.msg || "未知错误", + message: res.data.msg, type: 'error', duration: 2 * 1000 }) @@ -68,7 +68,7 @@ const request = curry( reslove( Object.assign({}, returnIniData, { httpCode: "9999", //访问出现意外 - msg:err, + msg:"网络错误", }) ); }; diff --git a/src/views/components/resiForm.vue b/src/views/components/resiForm.vue index ffa5967e6..05339ec84 100644 --- a/src/views/components/resiForm.vue +++ b/src/views/components/resiForm.vue @@ -1190,7 +1190,7 @@ export default { centerFlag: 1,//是否党员中心户:1是,0否 joinBranchName: '',//入党时所在党支部 joinCommunityTime: '',//组织关系转入社区时间yyyy-MM-dd - longHolidayFlag: 1,//是否请长假:1是,0否 + // longHolidayFlag: 1,//是否请长假:1是,0否 }, ensureHouseDto: {//保障房信息 housingNature: '',//住房性质,字典code @@ -1782,116 +1782,88 @@ export default { async handleClick (tab, event) { console.log(tab); console.log(event); - console.log(this.form.resiId); + console.log(this.form.resiId ); + const tabMapping = { + '教育': { + dtoKey: 'eduInfoDto', + fn: this.residentEduInfo + }, + '兴趣爱好': { + dtoKey: 'hobbyInfoDto', + fn: this.residentHobbyInfo + }, + '宗教信仰': { + dtoKey: 'religionDto', + fn: this.residentReligion + }, + '健康': { + dtoKey: 'healthDto', + fn: this.getHealthInfoDetailById + }, + '工作': { + dtoKey: 'workInfoDto', + fn: this.residentWorkInfo + }, + '经济情况': { + dtoKey: 'economyDto', + fn: this.getEconomyDetailById + }, + '居住': { + dtoKey: 'resideInfoDto', + fn: this.getResideInfoDetailById + }, + '家庭': { + dtoKey: 'familyInfoDto', + fn: this.getFamilyInfoDetailById + }, + '出生信息': { + dtoKey: 'birthRecordDTO', + fn: this.residentBirthRecord + }, + '党员': { + dtoKey: 'parymemberInfoDto', + fn: this.residentPartyMemberInfo + }, + '保障房信息': { + dtoKey: 'ensureHouseDto', + fn: this.residentEnsureHouse + }, + '失业': { + dtoKey: 'unemployedDto', + fn: this.residentUnemployed + }, + '退役军人': { + dtoKey: 'veteranDto', + fn: this.getVeteranDetailById + }, + '统战': { + dtoKey: 'unitedFrontDto', + fn: this.residentUnitedFront + }, + '志愿者信息': { + dtoKey: 'volunteerDto', + fn: this.getVolunteerDetailById + }, + '特殊人群': { + dtoKey: 'specialDto', + fn: this.residentSpecial + }, + '老年人': { + dtoKey: 'oldPeopleDto', + fn: this.getOldPeopleDetailById + }, + '公益岗人员': { + dtoKey: 'postDto', + fn: this.getWelfareDetailById + }, + }; + let currentTab = tabMapping[tab._props.label]; - if (tab._props.label == '教育') { - if (!this.form.resiId) { - this.newForm.eduInfoDto = this.form.eduInfoDto - } else { - await this.residentEduInfo(this.form.resiId) - } - } else if (tab._props.label == '兴趣爱好') { + if (currentTab) { if (!this.form.resiId) { - this.newForm.hobbyInfoDto = this.form.hobbyInfoDto - } else { - await this.residentHobbyInfo(this.form.resiId) - } - } else if (tab._props.label == '宗教信仰') { - if (!this.form.resiId) { - this.newForm.religionDto = this.form.religionDto - } else { - await this.residentReligion(this.form.resiId) - } - } else if (tab._props.label == '健康') { - if (!this.form.resiId) { - this.newForm.healthDto = this.form.healthDto - } else { - await this.getHealthInfoDetailById(this.form.resiId) - } - } else if (tab._props.label == '工作') { - if (!this.form.resiId) { - this.newForm.workInfoDto = this.form.workInfoDto - } else { - await this.residentWorkInfo(this.form.resiId) - } - } else if (tab._props.label == '经济情况') { - if (!this.form.resiId) { - this.newForm.economyDto = this.form.economyDto - } else { - await this.getEconomyDetailById(this.form.resiId) - } - } else if (tab._props.label == '居住') { - if (!this.form.resiId) { - this.newForm.resideInfoDto = this.form.resideInfoDto - } else { - await this.getResideInfoDetailById(this.form.resiId) - } - } else if (tab._props.label == '家庭') { - if (!this.form.resiId) { - this.newForm.familyInfoDto = this.form.familyInfoDto - } else { - await this.getFamilyInfoDetailById(this.form.resiId) - } - } else if (tab._props.label == '出生信息') { - if (!this.form.resiId) { - this.newForm.birthRecordDTO = this.form.birthRecordDTO - } else { - await this.residentBirthRecord(this.form.resiId) - } - } else if (tab._props.label == '党员') { - if (!this.form.resiId) { - this.newForm.parymemberInfoDto = this.form.parymemberInfoDto - } else { - await this.residentPartyMemberInfo(this.form.resiId) - } - } else if (tab._props.label == '保障房信息') { - if (!this.form.resiId) { - this.newForm.ensureHouseDto = this.form.ensureHouseDto - } else { - await this.residentEnsureHouse(this.form.resiId) - } - } else if (tab._props.label == '失业') { - if (!this.form.resiId) { - this.newForm.unemployedDto = this.form.unemployedDto - } else { - await this.residentUnemployed(this.form.resiId) - } - } else if (tab._props.label == '退役军人') { - if (!this.form.resiId) { - this.newForm.veteranDto = this.form.veteranDto - } else { - await this.getVeteranDetailById(this.form.resiId) - } - } else if (tab._props.label == '统战') { - if (!this.form.resiId) { - this.newForm.unitedFrontDto = this.form.unitedFrontDto - } else { - await this.residentUnitedFront(this.form.resiId) - } - } else if (tab._props.label == '志愿者信息') { - if (!this.form.resiId) { - this.newForm.volunteerDto = this.form.volunteerDto - } else { - await this.getVolunteerDetailById(this.form.resiId) - } - } else if (tab._props.label == '特殊人群') { - if (!this.form.resiId) { - this.newForm.specialDto = this.form.specialDto - } else { - await this.residentSpecial(this.form.resiId) - } - } else if (tab._props.label == '老年人') { - if (!this.form.resiId) { - this.newForm.oldPeopleDto = this.form.oldPeopleDto - } else { - await this.getOldPeopleDetailById(this.form.resiId) - } - } else if (tab._props.label == '公益岗人员') { - if (!this.form.resiId) { - this.newForm.postDto = this.form.postDto + this.newForm[currentTab.dtoKey] = this.form[currentTab.dtoKey]; } else { - //这个位置是调取公益岗人员详情 - await this.getWelfareDetailById(this.form.resiId) + await currentTab.fn(this.form.resiId); } } }, @@ -2313,7 +2285,7 @@ export default { centerFlag: null,//是否党员中心户:1是,0否 joinBranchName: '',//入党时所在党支部 joinCommunityTime: '',//组织关系转入社区时间yyyy-MM-dd - longHolidayFlag: null,//是否请长假:1是,0否 + // longHolidayFlag: null,//是否请长假:1是,0否 } this.newForm.parymemberInfoDto = this.form.parymemberInfoDto } diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 16fdb0ba9..fb814d197 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -87,7 +87,7 @@ 所属组织: + :props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency" clearable>
@@ -126,7 +126,6 @@
- 智能查询: {{ btnItem.name }} diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 767bcc5b6..9a3266dc5 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -12,15 +12,13 @@ 智能查询 + @click="handleSearchFrom">查询 重置 - 查询 + { diff --git a/src/views/modules/communityParty/regionalParty/units.vue b/src/views/modules/communityParty/regionalParty/units.vue index 5132b9e59..a84106e31 100644 --- a/src/views/modules/communityParty/regionalParty/units.vue +++ b/src/views/modules/communityParty/regionalParty/units.vue @@ -75,7 +75,7 @@
- + { - this.$refs.ref_detail_topic.initForm(this.eventId); + this.$refs.ref_detail_topic.initForm(this.projectId); }); }, diaDetailClose() {