guanqb
2023-01-16 ebeaa70c6963852db1557df986a525fb2fe764fa
社区图片展示
2 files modified
73 ■■■■■ changed files
src/api/dept/index.js 19 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 54 ●●●● patch | view | raw | blame | history
src/api/dept/index.js
@@ -149,13 +149,24 @@
}
// 小区树形数据
export const getPoliceStationLazyTree = (type, id) => {
// export const getPoliceStationLazyTree = (type, id) => {
//     return request({
//         url: `/api/policeStationInfo/policeStationInfo/getPoliceStationLazyTree`,
//         method: 'get',
//         params: {
//             type,
//             id
//         }
//     })
// }
// 小区树形数据
export const getPoliceStationTrees = (name) => {
    return request({
        url: `/api/policeStationInfo/policeStationInfo/getPoliceStationLazyTree`,
        url: `/api/policeStationInfo/policeStationInfo/getPoliceStationTrees`,
        method: 'get',
        params: {
            type,
            id
            name
        }
    })
}
src/views/house/index.vue
@@ -25,7 +25,7 @@
                >
                    <el-input placeholder="请输入搜索条件" v-model="filterText"></el-input>
                    <!-- <el-tree
                    <el-tree
                        style="width: 360px; height: 400px; overflow: auto;"
                        class="select-tree-box"
                        :data="testData"
@@ -38,14 +38,6 @@
                        :expand-on-click-node="true"
                        check-strictly
                        :filter-node-method="filterNode"
                    ></el-tree>-->
                    <el-tree
                        style="width: 360px; height: 400px; overflow: auto;"
                        class="select-tree-box"
                        :props="props"
                        :load="loadNode"
                        ref="popupTree"
                        lazy
                    ></el-tree>
                </el-popover>
@@ -76,7 +68,12 @@
                        <div class="progress"></div>
                    </div>
                    <div class="housing-bg">
                        <!-- <img style="width: 100%; height: 100%;" :src="housingData.img" alt /> -->
                        <!-- <img style="height: 100%;" :src="villageInfo.pic_url" alt /> -->
                        <el-image
                            style=" height: 100%"
                            :src="villageInfo.pic_url"
                            :preview-src-list="villageInfo.pic_url_list"
                        ></el-image>
                    </div>
                    <div class="housing-introduce">
                        <div>
@@ -583,6 +580,7 @@
                <el-table-column prop="cardNo" label="身份证号"></el-table-column>
            </el-table>
        </el-dialog>
        <el-dialog
            :title="keyPersonTitle"
            :modal="false"
@@ -642,7 +640,7 @@
<script>
import { listQuery, accurateSearch } from "@/utils/search.js"
import { getSearchExtensively, getHouses, getSearchExtensivelyBgAoiDeepdata, getPoliceStationLazyTree, getVillageInfo, getVillagePersonStatisticInfoByBuildId, getVillagePersonInfo } from '@/api/dept/index.js'
import { getSearchExtensively, getHouses, getSearchExtensivelyBgAoiDeepdata, getPoliceStationTrees, getVillageInfo, getVillagePersonStatisticInfoByBuildId, getVillagePersonInfo } from '@/api/dept/index.js'
import { getAlarmList } from "@/api/home/index.js"
@@ -801,6 +799,12 @@
                this.villageInfo.name = villageData.name
                this.villageInfo.address = villageData.address
                this.villageInfo.type_name = villageData.type_name
                this.villageInfo.pic_url = 'http://192.168.0.112/' + villageData.pic_url.split(';')[0]
                this.villageInfo.pic_url_list = []
                villageData.pic_url.split(';').forEach(item => {
                    let pic_url_item = 'http://192.168.0.112/' + item
                    this.villageInfo.pic_url_list.push(pic_url_item)
                })
                // 停车场出入口商场
                let deepData = res.data.result[0].deep_infos.deep_info
                this.parkingLotData = []
@@ -1161,34 +1165,6 @@
                    this.currentTableHeight = this.$refs.resultContentBox.offsetHeight - this.$refs.housingEstateInfoBox.offsetHeight - this.$refs.navTabBox.offsetHeight - this.$refs.ElPagination.offsetHeight
                }
            })
        },
        async loadNode (node, resolve) {
            // console.log('node', node)
            if (node.level === 0) {
                let policeStaionList = []
                await getPoliceStationLazyTree(1).then(res => {
                    policeStaionList = res.data.data
                })
                return resolve(policeStaionList)
            }
            if (node.level == 1) {
                let areaList = []
                await getPoliceStationLazyTree(2, node.data.id).then(res => {
                    areaList = res.data.data
                })
                return resolve(areaList)
            }
            if (node.level == 2) {
                let villageList = []
                await getPoliceStationLazyTree(3, node.data.id).then(res => {
                    res.data.data.forEach(item => {
                        villageList = res.data.data
                    })
                })
                return resolve(villageList)
            }
            if (node.level == 3) return resolve([])
        },
        // 获取责任民警、所属辖区