From 92186cbf64ba94f6157dad7192bf9c3c90d59d64 Mon Sep 17 00:00:00 2001 From: SongZhen <> Date: Mon, 9 Oct 2023 18:16:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=A5=BC=E6=A0=8B?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataBoard/cpts/homeDetails/index.vue | 118 +++++++++++++----- 1 file changed, 88 insertions(+), 30 deletions(-) diff --git a/src/views/dataBoard/cpts/homeDetails/index.vue b/src/views/dataBoard/cpts/homeDetails/index.vue index 3fccea977..d52eeb6c5 100644 --- a/src/views/dataBoard/cpts/homeDetails/index.vue +++ b/src/views/dataBoard/cpts/homeDetails/index.vue @@ -12,6 +12,9 @@ }, ]" /> +
+
{{ item.buildingName }}{{ item.unitName }}
+
@@ -104,6 +107,7 @@ export default { homeMsg: {}, list: [], homeText: "", + buildingList: [], houseMountArr: [], }; }, @@ -150,36 +154,50 @@ export default { getList() { this.loading = true; const homeType = this.$route.query.type; - // if (homeType === "building") { - // this.$http.get(`/actual/base/streetOverview/getUnitHouseOverviewList?unitId=` + this.$route.query.id).then((res) => { - // console.log(res); - // }); - // } else { - this.$http.get(`/actual/base/streetOverview/getUnitHouseList?unitId=` + this.$route.query.id).then((res) => { - const { - code, - data: { houseList, unitInfo }, - } = res.data; - if (code === 0) { - let unitInfos = unitInfo || {}; - this.list = houseList; - this.homeMsg = unitInfos; - this.homeText = (unitInfos.quartersName ? unitInfos.quartersName : "") + (unitInfos.buildingName ? unitInfos.buildingName : "") + (unitInfos.unitNum ? unitInfos.unitNum + "单元" : ""); - console.log(this.homeText, " this.homeText"); - this.houseMountArr = this.getDoorNameList(this.list); - // this.houseMountArr = [ - // [{ doorName: 101 }, { doorName: 102 }, { doorName: 103 }, { doorName: 104 }, { doorName: 105 }, { doorName: 106 }, { doorName: 107 }, { doorName: 108 }, { doorName: 109 }], - // [{ doorName: 201 }, { doorName: 202 }, { doorName: 203 }, { doorName: 204 }, { doorName: 205 }, { doorName: 206 }, { doorName: 207 }, { doorName: 208 }, { doorName: 209 }], - // ]; - if (this.houseMountArr.length > 0) { - this.flexWidth = this.houseMountArr[0].length * 58; + if (homeType === "building") { + this.$http.get(`/actual/base/streetOverview/getUnitListByBuilding?buildingId=` + "1514914015259979777").then((res) => { + const { code, data } = res.data; + if (code === 0) { + this.buildingList = data; + this.homeText = this.buildingList[0].buildingName + this.buildingList[0].unitName; + this.buildingList.forEach((item, i) => { + if (i === 0) { + item.ifActive = true; + } else { + item.ifActive = false; + } + }); + this.loading = false; + } else { + this.loading = false; } - this.loading = false; - } else { - this.loading = false; - } - }); - // } + }); + } else { + this.$http.get(`/actual/base/streetOverview/getUnitHouseList?unitId=` + this.$route.query.id).then((res) => { + const { + code, + data: { houseList, unitInfo }, + } = res.data; + if (code === 0) { + let unitInfos = unitInfo || {}; + this.list = houseList; + this.homeMsg = unitInfos; + this.homeText = (unitInfos.quartersName ? unitInfos.quartersName : "") + (unitInfos.buildingName ? unitInfos.buildingName : "") + (unitInfos.unitNum ? unitInfos.unitNum + "单元" : ""); + console.log(this.homeText, " this.homeText"); + this.houseMountArr = this.getDoorNameList(this.list); + // this.houseMountArr = [ + // [{ doorName: 101 }, { doorName: 102 }, { doorName: 103 }, { doorName: 104 }, { doorName: 105 }, { doorName: 106 }, { doorName: 107 }, { doorName: 108 }, { doorName: 109 }], + // [{ doorName: 201 }, { doorName: 202 }, { doorName: 203 }, { doorName: 204 }, { doorName: 205 }, { doorName: 206 }, { doorName: 207 }, { doorName: 208 }, { doorName: 209 }], + // ]; + if (this.houseMountArr.length > 0) { + this.flexWidth = this.houseMountArr[0].length * 58; + } + this.loading = false; + } else { + this.loading = false; + } + }); + } }, getRentFlag(type) { @@ -200,6 +218,19 @@ export default { ]); return houseTypeMap.get(type); }, + + chooseNav(item) { + let buildList = [...this.buildingList]; + this.homeText = item.buildingName + item.unitName; + buildList.forEach((d) => { + if (item.id === d.id) { + d.ifActive = true; + } else { + d.ifActive = false; + } + }); + this.buildingList = buildList; + }, }, }; @@ -221,9 +252,36 @@ export default { font-weight: 500; } +@mixin navListCommon { + min-width: 120px; + height: 36px; + font-size: 14px; + font-family: PingFang SC; + font-weight: 500; + margin-right: 4px; + text-align: center; + line-height: 36px; + cursor: pointer; +} + +.top-nav-list { + display: flex; + margin-bottom: 16px; + .top-nav-item { + @include navListCommon; + background-image: url("~@/assets/images/home/noChooseMain.png"); + color: #96b1ce; + } + .top-nav-itemAC { + @include navListCommon; + background-image: url("~@/assets/images/home/chooseMain.png"); + color: #fff; + } +} + .homeWrap { .bread { - margin-bottom: 25px; + margin-bottom: 16px; } .apar_top { From f0081f892ed51395239a490e35b6c07cc0725138 Mon Sep 17 00:00:00 2001 From: SongZhen <> Date: Tue, 10 Oct 2023 15:00:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=A5=BC=E6=A0=8B+=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 6 +- src/views/components/fixed1920.vue | 2 +- .../cpts/family/modules/BusinessRecords.vue | 47 ++------ .../cpts/family/modules/EnjoyService.vue | 35 +++--- .../dataBoard/cpts/homeDetails/index.vue | 113 +++++++++++------- src/views/dataBoard/cpts/map/index.vue | 2 +- .../overview/familyPortrait/index.vue | 70 ++++++----- src/views/dataBoardMain/main-content.vue | 2 +- 8 files changed, 143 insertions(+), 134 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index a6090f905..6f93f324e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -258,7 +258,8 @@ export const dataBoardRoutes = { title: "居民画像", isTab: false, }, - },, + }, + , { path: "overview/familyPortrait", props: true, @@ -455,10 +456,11 @@ export const dataBoardRoutes = { path: "/homeDetails/index", props: true, component: () => import("@/views/dataBoard/cpts/homeDetails/index"), - name: "homeDetails", + name: "HomeDetails", meta: { title: "单元", isTab: false, + keepAlive: false, }, }, { diff --git a/src/views/components/fixed1920.vue b/src/views/components/fixed1920.vue index 46341a169..0fc13df29 100644 --- a/src/views/components/fixed1920.vue +++ b/src/views/components/fixed1920.vue @@ -18,7 +18,7 @@ export default { computed: { bdStyle() { const { clientHeight, clientWidth } = this; - console.log("clientHeight", clientHeight); + // console.log("clientHeight", clientHeight); const scale = clientWidth / 1920; const height = clientHeight / scale; const top = (clientHeight - height) / 2; diff --git a/src/views/dataBoard/cpts/family/modules/BusinessRecords.vue b/src/views/dataBoard/cpts/family/modules/BusinessRecords.vue index eb9028f0d..b9a6e0240 100644 --- a/src/views/dataBoard/cpts/family/modules/BusinessRecords.vue +++ b/src/views/dataBoard/cpts/family/modules/BusinessRecords.vue @@ -1,36 +1,12 @@ @@ -123,9 +99,7 @@ export default { this.type = e; }, changeTotal(item) { - this.typeList[item.name].label = item.total - ? `${this.typeLists[item.name].label}(${item.total})` - : this.typeLists[item.name].label; + this.typeList[item.name].label = item.total ? `${this.typeLists[item.name].label}(${item.total})` : this.typeLists[item.name].label; }, }, }; @@ -138,15 +112,14 @@ export default { } .table { /deep/ .el-table td, - /deep/ .el-table th, /deep/ .el-table tr { - padding: 14px !important; + padding: 3px 14px !important; border: none !important; - min-height: 52px; } - /deep/ .el-table td, /deep/ .el-table th { background: none !important; + padding: 6px 14px !important; + border: none !important; } /deep/ .el-table td { font-size: 14px; diff --git a/src/views/dataBoard/cpts/family/modules/EnjoyService.vue b/src/views/dataBoard/cpts/family/modules/EnjoyService.vue index 7f028803a..06868b2fa 100644 --- a/src/views/dataBoard/cpts/family/modules/EnjoyService.vue +++ b/src/views/dataBoard/cpts/family/modules/EnjoyService.vue @@ -1,6 +1,6 @@ + \ No newline at end of file + diff --git a/src/views/dataBoardMain/main-content.vue b/src/views/dataBoardMain/main-content.vue index 9724dbc5e..9c734e908 100644 --- a/src/views/dataBoardMain/main-content.vue +++ b/src/views/dataBoardMain/main-content.vue @@ -5,7 +5,7 @@