guanqb
2023-02-07 7235570db630064bc8dabf2a9cea2c1c536f1506
社区房屋加载优化
2 files modified
12 ■■■■■ changed files
src/views/house/index.vue 7 ●●●● patch | view | raw | blame | history
src/views/video/list.vue 5 ●●●●● patch | view | raw | blame | history
src/views/house/index.vue
@@ -313,7 +313,7 @@
                            </div>-->
                            <el-main
                                v-loading="pictLoading"
                                element-loading-background="rgba(17, 38, 163, 0.1)"
                                element-loading-background="rgba(17, 38, 163, .1)"
                                element-loading-text="数据正在加载中"
                                element-loading-spinner="el-icon-loading"
                                v-show="isShowHouseBox"
@@ -901,7 +901,6 @@
                    list.forEach(item => {
                        item.leaf = !item.hasChildren
                    })
                    console.log(777, node, list)
                })
                return resolve(list)
            }
@@ -997,6 +996,7 @@
                // let maxHeight = res.data.data.floor_num * 2.8
                let maxHeight = 98
                console.log(3333, res.data.data)
                this.floorChoosed = []
                this.$EventBus.$emit('showHouse3D', { positions: res.data.data.geom, minHeight: 0, maxHeight: maxHeight })
                if (res.data.data != null) {
@@ -1037,6 +1037,7 @@
        // 点击户室
        residentDetailsClick (params) {
            this.floorChoosed = params
            this.$EventBus.$emit('clearHouse3D')
            this.getVillagePersonInfo(params.house_id)
            this.residentDetailsTitle = `${params.house_num}住户信息`
            this.residentDetailsShow = true
@@ -1048,7 +1049,9 @@
        },
        buildingClick (item) {
            this.unitHouseChoosed = []
            this.pictLoading = true
            this.$EventBus.$emit('clearHouse3D')
            this.buildingChoosed = item
            this.floorInfo.elev = item.elev
            this.floorInfo.floor_num = item.floor_num
src/views/video/list.vue
@@ -195,7 +195,6 @@
            props: {
                label: 'name',
                children: 'zones',
                // isLeaf: true
                isLeaf: (data, node) => {
                    if (data.parent == false) {
                        return true
@@ -608,10 +607,6 @@
                await getTreeDevices({ page: 1, count: 100, parentId: node.data.id, onlyCatalog: false }).then(res => {
                    data = res.data.data.list
                })
                console.log(node, data, 5555)
                // data.forEach(item => {
                //     item.isLeaf = !item.parent
                // })
                return resolve(data)
            }
        },