From 26219b413984ae692fc9bcaff795ea661ac86a23 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Wed, 19 Jun 2024 09:47:14 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=B1=85=E6=B0=91=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=83=85=E5=86=B5=E5=8A=A0=E6=95=B0=E6=8D=AE=E6=88=AA=E6=AD=A2?= =?UTF-8?q?=E6=97=A5=E6=9C=9F,=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/resi.vue | 21 ++++++++++++++++----- src/views/modules/home/index.vue | 26 ++++++++++++++------------ 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 39d0b2c7e..eb73ecd90 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -102,10 +102,10 @@ + @command="(command) => confirmBatch(command)" v-if="updeBtn" > 信息无误确认 - 全部确认 + 全部确认 批量确认 @@ -212,7 +212,7 @@ 变更记录 死亡登记 迁出登记 - 信息无误确认 + @@ -295,6 +295,7 @@ export default { }, data() { return { + updeBtn:false, showSercahStatus: false, exportLoading:false, exportBtn: false, @@ -743,7 +744,9 @@ export default { this.$message.warning("请先选择要删除的居民"); } }, + // 确认无误居民信息提交 confirmBatch(command) { + if(command === '1'){ this.$confirm("是否全部确认信息", "提示", { confirmButtonText: "确定", @@ -1116,8 +1119,11 @@ export default { }, async confirresiBatch(ids) { + this.valueb = this.$route.query.param1; + let _obj = JSON.parse(JSON.stringify(this.$refs.myResiSearch.form)); + _obj.attentionCrowds = _obj.attentionCrowds.flat() const url = `/actual/base/residentCategoryUpdateInfo/unchangePartUpdate`; - let params = {ids}; + let params = {ids,..._obj}; const { data, code, msg } = await requestPost(url, params); if (code !== 0) { return this.$message.error(msg); @@ -1242,7 +1248,12 @@ export default { watch: { $route: { handler: function (newVal, oldVal) { - if((newVal.name == "base-resi" || oldVal.name === 'home') && newVal.query.type){ + if(newVal.name == "base-resi" && newVal.query.type === 'residentCategory'){ + this.updeBtn = true + }else { + this.updeBtn = false + } + if((newVal.name == "base-resi" || oldVal.name === 'home') && newVal.query.type ==='updateResi'){ this.$nextTick(()=>{ this.$refs.myResiSearch.form.updateCategory = newVal.query.category; this.handleSearchFrom(); diff --git a/src/views/modules/home/index.vue b/src/views/modules/home/index.vue index 1ef1bd252..ba68bc4e8 100644 --- a/src/views/modules/home/index.vue +++ b/src/views/modules/home/index.vue @@ -144,7 +144,7 @@
-
居民信息更新情况
居民信息更新情况 (数据截止到{{yesterdayDate}})
更新设置
@@ -203,6 +203,7 @@ export default { data() { return { + yesterdayDate:null, searchStatus: "ini", //ing over searchData: { type: "jumin", @@ -307,15 +308,24 @@ export default { this.$nextTick(() => { this.initChart() this.initEcharts(); - }) - this.agencyLevel = localStorage.getItem("level", data.level); + this.getYesterdayDate() + // this.agencyLevel = localStorage.getItem("level", data.level); console.log( "dynamicMenuRoutes----------------------------", this.$store.state.sidebarMenuList ); }, methods: { + // 获取昨天时间 + getYesterdayDate() { + const now = new Date(); + now.setDate(now.getDate() - 1); + const year = now.getFullYear(); + const month = (now.getMonth() + 1).toString().padStart(2, '0'); + const day = now.getDate().toString().padStart(2, '0'); + this.yesterdayDate = `${year}-${month}-${day}`; + }, formatNumber(number) { if (typeof number === 'string') { // 如果是字符串,去除非数字字符并转为数字类型 @@ -478,20 +488,12 @@ export default { name: '居民详情', resiId: targetId, }); - this.$router.push({ name: "jumin-huaxiang" }); - this.$store.state.contentTabs = this.$store.state.contentTabs.map( - (item) => { - if (item.name === "jumin-huaxiang") { - return { ...item, title: name }; - } - return item; - } - ); }else if(item.msgType == "resident_category"){ this.$router.push({ name: "base-resi", query: { category: item.category || null, + type:"residentCategory" }, }); } else if(item.msgType == "sys_version_upgrade_publish"){ From 958684f77b1525502ddefecd1d6e9588c8352ce1 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Wed, 19 Jun 2024 10:09:05 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E6=9B=B4=E6=96=B0=E5=85=A5=E5=8F=82=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/resi.vue | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index eb73ecd90..f276e277a 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -101,8 +101,9 @@ + + @command="(command) => confirmBatch(command)" > 信息无误确认 全部确认 @@ -1117,13 +1118,31 @@ export default { } }) }, - + //处理参数 + extractSpecificKeys(obj, keys) { + const resultArray = []; + keys.forEach(key => { + if (key in obj) { + const value = obj[key]; + if (Array.isArray(value)) { + resultArray.push(...value); // 展开数组并加入结果数组 + } else { + resultArray.push(value); // 将非数组的值加入结果数组 + } + } + }); + return resultArray; + }, async confirresiBatch(ids) { this.valueb = this.$route.query.param1; let _obj = JSON.parse(JSON.stringify(this.$refs.myResiSearch.form)); _obj.attentionCrowds = _obj.attentionCrowds.flat() + let updateCategorys = this.extractSpecificKeys(_obj,['attentionCrowds','healthStatus','specialCategoryCodes','identity']) const url = `/actual/base/residentCategoryUpdateInfo/unchangePartUpdate`; - let params = {ids,..._obj}; + let params = {ids,partyFlag:_obj.partyFlag,updateCategorys}; + if(!ids){ + params = { ..._obj,updateCategorys} + } const { data, code, msg } = await requestPost(url, params); if (code !== 0) { return this.$message.error(msg); From 41f80e2ae043a349c78d6c8b8d4bb2d4b4b757aa Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Wed, 19 Jun 2024 10:59:37 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8D=A2=E5=85=A8=E9=83=A8=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/resiSearch.vue | 2 +- src/views/modules/base/resi.vue | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index ca3e58948..1335645c9 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -610,7 +610,7 @@ export default { ageEnd: '', integrityScoreFrom: null,//居民信息完整度はじめ integrityScoreTo: null,//居民信息完整度end - identity:'', + identity:null, gender: '', cultureLevel: '', localResidenceFlag: '', diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index f276e277a..dfe271647 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -101,9 +101,8 @@ - + @command="(command) => confirmBatch(command)" v-if="updeBtn" > 信息无误确认 全部确认 @@ -1126,7 +1125,7 @@ export default { const value = obj[key]; if (Array.isArray(value)) { resultArray.push(...value); // 展开数组并加入结果数组 - } else { + } else if(value){ resultArray.push(value); // 将非数组的值加入结果数组 } } @@ -1138,7 +1137,7 @@ export default { let _obj = JSON.parse(JSON.stringify(this.$refs.myResiSearch.form)); _obj.attentionCrowds = _obj.attentionCrowds.flat() let updateCategorys = this.extractSpecificKeys(_obj,['attentionCrowds','healthStatus','specialCategoryCodes','identity']) - const url = `/actual/base/residentCategoryUpdateInfo/unchangePartUpdate`; + const url = `/actual/base/residentCategoryUpdateInfo/${ids?'unchangePartUpdate':'unchangeMultiUpdate'}`; let params = {ids,partyFlag:_obj.partyFlag,updateCategorys}; if(!ids){ params = { ..._obj,updateCategorys} From 5d658af37a99bbcb18a6b5358e2b7ab6e7deec69 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Wed, 19 Jun 2024 18:26:05 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataBoard/renfang/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/dataBoard/renfang/index.vue b/src/views/dataBoard/renfang/index.vue index 54014aa16..1009a8eec 100644 --- a/src/views/dataBoard/renfang/index.vue +++ b/src/views/dataBoard/renfang/index.vue @@ -568,7 +568,7 @@ export default { clickAgencyItem(item) { console.log(item); if (item.level === 'neighborHood') { - this.$router.push('/homeDetails/index?id=' + item.id) + this.$router.push('/homeDetails/index?id=' + item.id + '&breadList='+JSON.stringify(this.breadList)) } else { this.toBread({ orgId: item.id,