From fa3ea11f0afdabe9e327d4c36c9b5d2a89ca4849 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Tue, 12 Mar 2024 15:47:41 +0800 Subject: [PATCH] =?UTF-8?q?bug#1037=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=BD=93=E5=A4=A9,bug#1036=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E9=80=89=E4=B8=AD=E7=BE=A4=E4=BC=97=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E6=8F=90=E7=A4=BA,=E5=B1=85=E6=B0=91=E5=B9=B4?= =?UTF-8?q?=E9=BE=84=E5=90=8E=E7=AB=AF=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/resiSearch.vue | 6 ++--- .../modules/portrayal/jumin/cpts/staffTag.vue | 2 +- src/views/modules/portrayal/jumin/index.vue | 27 +------------------ 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 0333e38f7..80c340365 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -56,11 +56,11 @@ - - @@ -858,8 +858,6 @@ export default { // }, handleAgeChange() { - console.log(11 > 5); - console.log(11 > 10); if (this.form.ageStart) { if (this.form.ageStart > this.form.ageEnd) { this.$message.warning('结束年龄不能小于开始年龄') diff --git a/src/views/modules/portrayal/jumin/cpts/staffTag.vue b/src/views/modules/portrayal/jumin/cpts/staffTag.vue index 74fc9c442..a538c9f3e 100644 --- a/src/views/modules/portrayal/jumin/cpts/staffTag.vue +++ b/src/views/modules/portrayal/jumin/cpts/staffTag.vue @@ -202,7 +202,7 @@ export default { if (val === 1) { this.$emit('showDialog', { value: val }, val === 1) this.formData.tableData[0].value= 1 - }else{ + }else if(this.formType != 'add'){ this.$confirm(`确认取消党员标签`, '确认信息', { confirmButtonText: '确认取消', cancelButtonText: '暂不取消', diff --git a/src/views/modules/portrayal/jumin/index.vue b/src/views/modules/portrayal/jumin/index.vue index e2475a368..d62488fa8 100644 --- a/src/views/modules/portrayal/jumin/index.vue +++ b/src/views/modules/portrayal/jumin/index.vue @@ -4,7 +4,7 @@
- {{ resiDetailObj.baseInfoDto.name }}({{ age }}岁) --
@@ -669,7 +669,6 @@ export default { active: 0, menuList: [], score: null, - age: null, nationalityList: [], //国籍字典 marriageArr: [], //婚姻状况字典 @@ -1129,26 +1128,6 @@ export default { console.log(error); } }, - // 计算年龄 - calculateAge(birthdayTimestamp) { - // 获取当前日期 - const currentDate = new Date(); - // 将生日时间戳转换为日期对象 - const birthdayDate = new Date(birthdayTimestamp); - // 计算年龄 - let age = currentDate.getFullYear() - birthdayDate.getFullYear(); - // 检查是否已经过了生日 - const currentMonth = currentDate.getMonth(); - const birthMonth = birthdayDate.getMonth(); - if ( - currentMonth < birthMonth || - (currentMonth === birthMonth && - currentDate.getDate() < birthdayDate.getDate()) - ) { - age--; - } - return age; - }, async getNationalityList() { try { const { data } = await this.$http.post("sys/dict/data/dictlist", { @@ -1244,10 +1223,6 @@ export default { ); this.score = res.data.data.integrityData.score; - const birthdayTimestamp = Date.parse( - res.data.data.baseInfoDto.birthday - ); - this.age = this.calculateAge(birthdayTimestamp); } else if (res.data.code >= 8000) { this.resiDetailObj = {}; this.$message.error(res.data.msg);