@@ -32,13 +33,18 @@ import colorCell from "./ColorCell/index.vue";
export default {
data() {
return {
- show: true,
+ show: false,
info: {},
list: [],
};
},
computed: {
- ...mapGetters(["queryParamsXiaoqu", "leftColor", "rightTopColor"]),
+ ...mapGetters([
+ "queryParamsXiaoqu",
+ "leftColor",
+ "rightTopColor",
+ "houseItem",
+ ]),
},
components: {
colorCell,
@@ -55,6 +61,27 @@ export default {
},
created() {},
methods: {
+ clickHouse(item) {
+ console.log(item);
+ this.$store.commit("SET_BUILDING_WIDTH", {
+ id: item.id,
+ buildingId: item.building_id,
+ deptId: item.dept_id,
+ buildingWidth:
+ this.houseItem.buildingWidth > 0
+ ? this.houseItem.buildingWidth
+ : window.innerWidth - this.$refs.houseItem.offsetWidth,
+ name: item.name,
+ color: item.color,
+ isD: item.is_d,
+ isJ: item.is_j,
+ isK: item.is_k,
+ isx: item.is_x,
+ typename: item.typename,
+ leftColor: item.leftColor,
+ rightTopColor: item.rightTopColor,
+ });
+ },
async getBuildingInfo() {
let info = await getBuilding(this.queryParamsXiaoqu.buildingId);
this.info = info.data;
@@ -65,6 +92,8 @@ export default {
buildingId: this.queryParamsXiaoqu.buildingId,
});
+ console.log(res.data.filter((item) => item.name == "101室"));
+
this.list = this.filterFloor(res.data);
console.log(this.list);
@@ -96,17 +125,14 @@ export default {
categorizedRooms[floor].push(this.handleColor(room));
});
- // 确定最大楼层
- const maxFloor = Math.max(...Object.keys(categorizedRooms).map(Number));
- // 对每层房间号进行从小到大排序
+ const totalFloors = this.info.floor;
const sortedRoomsByFloor = [];
- for (let floor = 0; floor <= maxFloor; floor++) {
- const roomsForFloor = categorizedRooms[floor] || [];
- sortedRoomsByFloor.push(
- roomsForFloor.sort(
- (a, b) => parseInt(a.name, 10) - parseInt(b.name, 10)
- )
+ for (let floor = 1; floor <= totalFloors; floor++) {
+ const roomsForFloor = (categorizedRooms[floor] || []).sort(
+ (a, b) => a.name - b.name
);
+
+ sortedRoomsByFloor.push(roomsForFloor);
}
return sortedRoomsByFloor.reverse();
@@ -119,9 +145,9 @@ export default {
.building-container {
position: absolute;
z-index: 100;
- top: 80px;
+ top: 75px;
right: 0;
- height: calc(100% - 80px);
+ height: calc(100% - 75px);
display: flex;
overflow-y: auto;
background: #113666;
@@ -151,11 +177,14 @@ export default {
.building-house-container {
padding-top: 85px;
position: relative;
-
+ min-width: 135px;
+ // max-width: 700px;
+ // overflow-x: auto;
+ // overflow-y: hidden;
height: 100%;
background: url("~@/assets/images/ui/img_home@2x.png");
background-repeat: no-repeat;
- background-size: auto 100%;
+ background-size: cover;
.building-name {
position: absolute;
left: 130px;
@@ -176,12 +205,12 @@ export default {
align-items: center;
box-sizing: border-box;
margin-bottom: 6px;
-
+ height: 23px;
.floor-item {
cursor: pointer;
margin-right: 6px;
- height: 23px;
- width: 55px;
+ height: 100%;
+ width: 60px;
text-align: center;
line-height: 23px;
color: #fff;
diff --git a/src/views/components/xiaoqu/house.vue b/src/views/components/xiaoqu/house.vue
new file mode 100644
index 0000000..1dd2748
--- /dev/null
+++ b/src/views/components/xiaoqu/house.vue
@@ -0,0 +1,564 @@
+
+
+
+
+
+
+
+
+
{{ item.name }}
+
+
+
+
+
+ 性別:{{ getGender(item.credentialNo) }}
+
+
+
+
+
身份证号:
+
{{ item.credentialNo }}
+
+
+
户籍:
+
+ {{ item.typename }}
+
+
+
+
+
+
年龄:
+
+ {{ calculateAge(item.credentialNo) }}岁
+
+
+
+
手机号:
+
{{ item.phone }}
+
+
+
分色:
+
+
+ {{ item.color }}
+
+
+
+
+
+
出生年月:
+
+ {{ extractBirthMonth(item.credentialNo) }}
+
+
+
+
数据更新时间:
+
+ {{ item.updateTime }}
+
+
+
+
更新人员:
+
+ {{ item.updateBy }}
+
+
+
+
+
+
+ 中共党员
+
+
+ 帮扶对象
+
+
+ 重点人群
+
+
+ 退伍军人
+
+
+
+
+
+
+ 户主
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/xiaoqu.vue b/src/views/xiaoqu.vue
index 057a6ea..34e3c2d 100644
--- a/src/views/xiaoqu.vue
+++ b/src/views/xiaoqu.vue
@@ -28,6 +28,7 @@
+
@@ -46,6 +47,7 @@ import {
mapSearchBox,
bottomList,
building,
+ house,
} from "@/views/components/index.js";
export default {
data() {
@@ -64,6 +66,7 @@ export default {
mapSearchBox,
bottomList,
building,
+ house,
},
computed: {
...mapGetters(["xiaoquIntroduce", "queryParamsXiaoqu"]),