diff --git a/packages/grid/AppBuildMap/buildingStatistics.vue b/packages/grid/AppBuildMap/buildingStatistics.vue index 00209001..7096a132 100644 --- a/packages/grid/AppBuildMap/buildingStatistics.vue +++ b/packages/grid/AppBuildMap/buildingStatistics.vue @@ -1,74 +1,75 @@ @@ -96,11 +97,11 @@ export default { rooms: [], selected: {}, currentBuilding: {}, - unitNumber:1, + unitNumber: 1, tips: [], - position:{ - x:"", - y:"" + position: { + x: "", + y: "" }, } }, @@ -115,23 +116,23 @@ export default { } }, created() { - this.dict.load('householdRelation', 'residentTipType',"houseLivingType") + this.dict.load('householdRelation', 'residentTipType', "houseLivingType") if (this.isFormDv && this.query.buildingId) { this.getRoomsByBuilding(this.query.buildingId, this.query.unitNum) - this.currentBuilding = { buildingNumber: this.query.buildingNumber} + this.currentBuilding = {buildingNumber: this.query.buildingNumber} this.unitNumber = this.query.unitNum return false } - this.getRoomsByBuilding(this.$route.query?.buildingId,this.$route.query?.unitNum) + this.getRoomsByBuilding(this.$route.query?.buildingId, this.$route.query?.unitNum) this.currentBuilding = {buildingNumber: this.$route.query?.buildingNumber}; this.unitNumber = this.$route.query?.unitNum; }, methods: { handleSelectRoom(room, e) { console.log(e) - if (room.livingNumber>0) { - this.$nextTick(()=>{ + if (room.livingNumber > 0) { + this.$nextTick(() => { this.position.x = e.pageX + 40 + "px" this.position.y = e.pageY + "px" this.selected = room; @@ -140,15 +141,17 @@ export default { // this.getRoomDetail(room.id) } }, - selectedBuilding(building,unitNumber) { + selectedBuilding(building, unitNumber) { this.selected = {} this.tips = [] - this.$router.push({query: {...this.$route.query, buildingId: building.id,unitNum:unitNumber}}).catch(e=>{e}) + this.$router.push({query: {...this.$route.query, buildingId: building.id, unitNum: unitNumber}}).catch(e => { + e + }) this.currentBuilding = building this.unitNumber = unitNumber - this.getRoomsByBuilding(building.id,unitNumber) + this.getRoomsByBuilding(building.id, unitNumber) }, - getRoomsByBuilding(buildingId,unitNumber) { + getRoomsByBuilding(buildingId, unitNumber) { this.root.instance.post("/app/appcommunityhouseinfo/list", null, { params: { unitNumber, @@ -170,11 +173,11 @@ export default { this.selected = { ...this.selected, ...res.data, residents: residents.map(e => { - let {tips} = e - //显示为户主 - let relationLabel = e.householdName == 1 ? "户主" : this.root.dict.getLabel("householdRelation", e.householdRelation) - return {...e, tips: tips ? tips.split("|") : [], relationLabel} - } + let {tips} = e + //显示为户主 + let relationLabel = e.householdName == 1 ? "户主" : this.root.dict.getLabel("householdRelation", e.householdRelation) + return {...e, tips: tips ? tips.split("|") : [], relationLabel} + } ) } } @@ -197,7 +200,7 @@ export default { display: flex; flex-direction: column; - ::v-deep .ailist-title{ + ::v-deep .ailist-title { margin: 0 20px; } @@ -337,29 +340,37 @@ export default { ::v-deep .floors { max-height: 520px; + max-width: 60vw; + margin: 0 20px; + padding: 0 50px; + position: relative; - .el-scrollbar__wrap { - overflow-x: hidden; - margin-bottom: 0 !important; + &:before { + display: block; + content: " "; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + background-image: url("https://cdn.cunwuyun.cn/buildSta/floor.png"); + background-size: 100% 105px; } } .floor { - margin: 0 20px; + position: relative; height: 105px; - flex-shrink: 0; - max-width: calc(100% - 40px); display: flex; + flex-shrink: 0; align-items: center; - background-image: url("https://cdn.cunwuyun.cn/buildSta/floor.png"); - background-size: 100% 105px; - padding: 0 30px; box-sizing: border-box; gap: 20px; .room { width: 60px; height: 72px; + flex-shrink: 0; background-image: url("https://cdn.cunwuyun.cn/buildSta/room.png"); text-align: center; padding-top: 20px;