diff --git a/src/views/modules/home/index.vue b/src/views/modules/home/index.vue index 690f919e2..64cbdd157 100644 --- a/src/views/modules/home/index.vue +++ b/src/views/modules/home/index.vue @@ -332,12 +332,47 @@ export default { } }, handleClickNotice(item) { - const { msgType, targetId } = item; - this.readClearOne(item); - if (msgType == "community_house") { - this.$refs.fastcall.showHouseInfo(targetId); - } else if (msgType == "resident_base_info") { - this.$refs.fastcall.showResiInfo(targetId); + if (item.msgType == "community_house") { + let { agencyId, gridId, gridName, houseId, houseName, targetId } = item + this.$store.dispatch('saveDataH', { agencyId, gridId, gridName, houseId: targetId, houseName:'房屋详情' }); + this.$router.push({ name: 'house-huaxiang' }); + this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => { + if (item.name === "house-huaxiang") { + return { ...item, title: '房屋信息' }; + } + return item; + }); + } else if (item.msgType == "resident_base_info") { + let { + agencyId, + gridId, + gridName, + gender, + homeId, + homeName, + name, + targetId, + deptName + } = item; + this.$store.dispatch("saveData", { + agencyId, + gridId, + gridName, + gender, + homeId, + homeName, + 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; + } + ); } }, diff --git a/src/views/modules/home/notice.vue b/src/views/modules/home/notice.vue index 50e253193..9c47d84e3 100644 --- a/src/views/modules/home/notice.vue +++ b/src/views/modules/home/notice.vue @@ -85,15 +85,49 @@ export default { }, methods: { handleClickNotice(item, index) { - console.log("zheli") - const { msgType, targetId } = item; - this.readClearOne(item) - if (msgType == "community_house") { - this.$refs.fastcall.showHouseInfo(targetId); - } else if (msgType == "resident_base_info") { - this.$refs.fastcall.showResiInfo(targetId); - } - this.read(item, index); + // this.readClearOne(item); + if (item.msgType == "community_house") { + let { agencyId, gridId, gridName, houseId, houseName, targetId } = item + this.$store.dispatch('saveDataH', { agencyId, gridId, gridName, houseId: targetId, houseName:'房屋详情' }); + this.$router.push({ name: 'house-huaxiang' }); + this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => { + if (item.name === "house-huaxiang") { + return { ...item, title: '房屋信息' }; + } + return item; + }); + } else if (item.msgType == "resident_base_info") { + let { + agencyId, + gridId, + gridName, + gender, + homeId, + homeName, + name, + targetId, + deptName + } = item; + this.$store.dispatch("saveData", { + agencyId, + gridId, + gridName, + gender, + homeId, + homeName, + 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; + } + ); + } }, async read(item, index) { diff --git a/src/views/modules/portrayal/house/index.vue b/src/views/modules/portrayal/house/index.vue index 8e3285e05..534940008 100644 --- a/src/views/modules/portrayal/house/index.vue +++ b/src/views/modules/portrayal/house/index.vue @@ -252,7 +252,6 @@ export default { this.showCheckPassword = true; }, updataHouseIds(val){ - console.log(val); this.houseIds= val }, handelCLickShowCheckPassword(type) {