guanqb
2023-02-08 18f115e1483b0250bc23da1fc1b28140a1852fd5
社区地图回显
5 files modified
247 ■■■■ changed files
src/api/dept/index.js 13 ●●●●● patch | view | raw | blame | history
src/components/map/index.vue 3 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 86 ●●●● patch | view | raw | blame | history
src/views/police/index.vue 144 ●●●● patch | view | raw | blame | history
src/views/video/list.vue 1 ●●●● patch | view | raw | blame | history
src/api/dept/index.js
@@ -64,7 +64,8 @@
 */
export const getAoiByPt = (lng, lat, height, adcode, tolerance) => {
    return request({
        url: '/sf3d/area/getAoiByPt',
        // url: '/sf3d/area/getAoiByPt',
        url: '/sf3d/area/stdgetAoiByPt',
        method: 'get',
        requestBaseUrl: 'fengt',
        params: {
@@ -101,7 +102,8 @@
 */
export const getHouses = (build_id, adcode) => {
    return request({
        url: '/sf3d/build/houses',
        // url: '/sf3d/build/houses',
        url: '/sf3d/build/stdhouses',
        method: 'get',
        requestBaseUrl: 'fengt',
        params: {
@@ -111,12 +113,14 @@
    })
}
/**
 * 大搜
 * @param {*} adcode
 * @returns
 */
export const getSearchExtensively = (ak, region, query) => {
export const getSearchExtensively = (ak, region, query, ids) => {
    return request({
        url: '/zhs/bs/search',
        method: 'get',
@@ -124,7 +128,8 @@
        params: {
            ak,
            region,
            query
            query,
            ids
        }
    })
}
src/components/map/index.vue
@@ -255,7 +255,8 @@
            sqTitleLayer.addOverlay(sqTileset)
            sqTileset.on(global.DC.MouseEventType.CLICK, (e) => {
                console.log(e, 989999)
                // console.log(e, e.wgs84Position.alt, 989999)
                that.$EventBus.$emit('stdgetAoiByPt', { lng: e.wgs84Position.lng, lat: e.wgs84Position.lat, height: e.wgs84Position.alt })
            })
            // let positions = [[117.9514788, 28.4478968, 0], [117.9514698, 28.4478947, 0], [117.9513974, 28.4476981, 0], [117.9515047, 28.4476748, 0], [117.9515289, 28.4476939, 0], [117.9515508, 28.447755, 0], [117.9516278, 28.4477353, 0], [117.9516623, 28.4478497, 0], [117.9514788, 28.4478968, 0]]
src/views/house/index.vue
@@ -363,10 +363,10 @@
                                                v-for="(value, index) in item.floor_house"
                                                :key="index"
                                                @click="residentDetailsClick(value)"
                                                :class="{ on: floorChoosed.house_num == value.house_num }"
                                                :class="{ on: floorChoosed== value.properties.fojcu }"
                                            >
                                                <!-- :class="[{ 'chuzu': value.houseType == '出租' }, { 'zizhu': value.houseType == '自住' }, { 'kongzhi': value.houseType == '空置' }, { 'shangye': value.houseType == '商业' }]" -->
                                                {{ value.house_num }}
                                                {{ value.properties.fojcu }}
                                                <!-- <div class="flow"></div>
                                            <div class="focus"></div>
                                                <div class="warning"></div>-->
@@ -663,7 +663,7 @@
    getSearchExtensively, getHouses, getSearchExtensivelyBgAoiDeepdata,
    getPoliceStationLazyTree, getPoliceStationTrees, getVillageInfo,
    getVillagePersonStatisticInfoByBuildId, getVillagePersonInfo,
    getResidentialQuartersInfo, getAoiByBgId, getPoliceSationVillageInfo
    getResidentialQuartersInfo, getAoiByBgId, getPoliceSationVillageInfo, getAoiByPt
} from '@/api/dept/index.js'
import { getAlarmList } from "@/api/home/index.js"
@@ -795,7 +795,6 @@
                // this.getResidentialQuartersInfo('6E513C5E5D1611EAB6183C15FB00027B', '361102')
                this.getResidentialQuartersInfo(villageId, '361102')
            })
        }
        window.addEventListener('resize', this.setTableHeight)
@@ -819,6 +818,10 @@
            }
        })
        const that = this
        this.$EventBus.$on('stdgetAoiByPt', (params) => {
            that.getAoiByPtStd(params.lng, params.lat, params.height, '361102', '0.00001')
        })
    },
    updated () {
@@ -991,21 +994,23 @@
        },
        // 楼栋单元楼层户室查询
        getHouses (build_id, adcode) {
        getHouses (build_id, adcode, aoiArr) {
            getHouses(build_id, adcode).then(res => {
                // let maxHeight = res.data.data.floor_num * 2.8
                let maxHeight = 98
                console.log(3333, res.data.data)
                let houseData = res.data.data.properties
                console.log(3333, houseData)
                this.floorChoosed = []
                this.$EventBus.$emit('showHouse3D', { positions: res.data.data.geom, minHeight: 0, maxHeight: maxHeight })
                this.$EventBus.$emit('showHouse3D', { positions: houseData.kmj3a, minHeight: 0, maxHeight: maxHeight })
                if (res.data.data != null) {
                    let unitData = res.data.data.unit[this.unitValue - 1].house
                if (res.data != null && houseData.nwwqd.features != []) {
                    // let unitData = res.data.data.unit[this.unitValue - 1].house
                    let unitData = houseData.nwwqd.features
                    this.floorInfo.house_num = unitData.length
                    let houseFloorList = []
                    unitData.forEach(item => {
                        if (houseFloorList.indexOf(Number(item.floor_num)) === -1) {
                            houseFloorList.push(Number(item.floor_num))
                        if (houseFloorList.indexOf(Number(item.properties.cftlg)) === -1) {
                            houseFloorList.push(Number(item.properties.cftlg))
                        }
                    })
                    houseFloorList = houseFloorList.sort((a, b) => {
@@ -1014,11 +1019,33 @@
                    let newArr = []
                    houseFloorList.forEach(floor => {
                        let houseArr = unitData.filter(item => {
                            return Number(item.floor_num) == floor
                            return Number(item.properties.cftlg) == floor
                        })
                        newArr.push({ floor_num: floor, floor_house: houseArr.slice(0, 4) })
                    })
                    this.unitHouseChoosed = newArr
                    if (aoiArr) {
                        this.unitHouseChoosed.forEach((item, index) => {
                            let aoiHeight = aoiArr[1]
                            let minHeight = item.floor_house[0].properties.szhfr
                            let maxHeight = item.floor_house[0].properties.szhfr + item.floor_house[0].properties.hnagn
                            if (minHeight < aoiHeight && aoiHeight < maxHeight) {
                                this.floorsType = Math.ceil((index + 1) / 5)
                                if (this.floorsType > 3) {
                                    for (let i = 0; i < this.floorsType - 3; i++) {
                                        this.nextFloorBtn()
                                    }
                                }
                                item.floor_house.forEach(one => {
                                    let polygon = this.$turf.polygon([JSON.parse(one.properties.kmj3a).coordinates[0]])
                                    let point = this.$turf.point(aoiArr[0])
                                    if (this.$turf.booleanContains(polygon, point)) {
                                        this.residentDetailsClick(one)
                                    }
                                })
                            }
                        })
                    }
                    this.pictLoading = false
                    console.log('unitHouseChoosed', this.unitHouseChoosed)
                } else {
@@ -1036,30 +1063,32 @@
        // 点击户室
        residentDetailsClick (params) {
            this.floorChoosed = params
            this.floorChoosed = params.properties.fojcu
            this.$EventBus.$emit('clearHouse3D')
            this.getVillagePersonInfo(params.house_id)
            this.residentDetailsTitle = `${params.house_num}住户信息`
            this.getVillagePersonInfo(params.properties.snxmi)
            this.residentDetailsTitle = `${params.properties.fojcu}住户信息`
            this.residentDetailsShow = true
            this.$EventBus.$emit('showHouse3D', { positions: params.geom, minHeight: params.minHeight, maxHeight: params.minHeight + params.floor_h })
            this.$EventBus.$emit('showHouse3D', { positions: params.properties.kmj3a, minHeight: params.properties.szhfr, maxHeight: params.properties.szhfr + params.properties.hnagn })
        },
        residentDetailsClose () {
            this.residentDetailsShow = false
        },
        buildingClick (item) {
        buildingClick (item, aoiArr) {
            this.unitHouseChoosed = []
            this.pictLoading = true
            this.$EventBus.$emit('clearHouse3D')
            if (!aoiArr) {
                this.$EventBus.$emit('clearHouse3D')
                this.$EventBus.$emit('toPosition', item)
            }
            this.buildingChoosed = item
            this.floorInfo.elev = item.elev
            this.floorInfo.floor_num = item.floor_num
            // 获取户籍人口重点人口数据
            this.choosedBuildId = item.build_id
            this.getVillagePersonStatisticInfoByBuildId(item.build_id)
            this.getHouses(item.build_id, '361102')
            this.$EventBus.$emit('toPosition', item)
            this.getHouses(item.build_id, '361102', aoiArr)
            this.floorsType = 1
            document.querySelector(".floor-num").style.left = '0px'
            this.lastFloorShow = false
@@ -1375,7 +1404,22 @@
            })
        },
        // 大搜点查询
        getAoiByPtStd (lng, lat, height, adcode, tolerance) {
            getAoiByPt(lng, lat, height, adcode, tolerance).then(res => {
                let bgId = res.data.data.properties.ijnnl
                getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', '', bgId).then(async res => {
                    console.log(bgId, res.data.result[0].name, res.data.result[0].cid, 998877)
                    let chooseBuildItem = []
                    this.buildingList.forEach(item => {
                        if (item.build_id == res.data.result[0].cid) {
                            chooseBuildItem = item
                        }
                    })
                    this.buildingClick(chooseBuildItem, [[lng, lat], height])
                })
            })
        },
    },
src/views/police/index.vue
@@ -14,43 +14,77 @@
        <div v-show="boxShow" class="container-content">
            <div class="switch-box" v-show="!detailFlag">
                资源类别:
                <el-select v-model="typeValue" @change="navClick" placeholder="请选择" class="type-select-css">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"
                        class="option-css"></el-option>
                <el-select
                    v-model="typeValue"
                    @change="navClick"
                    placeholder="请选择"
                    class="type-select-css"
                >
                    <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        class="option-css"
                    ></el-option>
                </el-select>
            </div>
            <div class="list-show" v-if="!detailFlag">
                <div class="search-box">
                    资源名称:
                    <input v-model="searchValue" @input="searchChange" type="text" placeholder="请输入…" />
                    <input
                        v-model="searchValue"
                        @input="searchChange"
                        type="text"
                        placeholder="请输入…"
                    />
                </div>
                <div class="list" ref="tableBox">
                    <el-table :data="equimentTableData"
                    <el-table
                        :data="equimentTableData"
                        :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', borderColor: '#324e75' }"
                        :cell-style="{ 'text-align': 'center', borderColor: '#324e75', cursor: 'pointer' }"
                        :height="currentTableHeight">
                        <el-table-column prop="name" :show-overflow-tooltip="true" label="名称"
                            min-width="30%"></el-table-column>
                        <el-table-column prop="channelId" :show-overflow-tooltip="true" label="通道编号"
                            min-width="24%"></el-table-column>
                        <el-table-column prop="status" label="状态" min-width="18%">
                        :height="currentTableHeight"
                    >
                        <el-table-column
                            prop="name"
                            :show-overflow-tooltip="true"
                            label="名称"
                            min-width="56%"
                        ></el-table-column>
                        <el-table-column prop="status" label="状态" min-width="14%">
                            <template slot-scope="scope">
                                <div class="state-box" :class="{ online: scope.row.status == '1' }"></div>
                            </template>
                        </el-table-column>
                        <el-table-column label="操作" align="center" min-width="28%">
                        <el-table-column label="操作" align="center" min-width="30%">
                            <template slot-scope="scope">
                                <el-button @click="rowClick(scope.row)" type="text" size="small" title="定位">
                                <el-button
                                    @click="rowClick(scope.row)"
                                    type="text"
                                    size="small"
                                    title="定位"
                                >
                                    <i class="el-icon-location"></i>
                                </el-button>
                                <el-button v-show="navType == 0" @click="equipmentTrack(scope.row)" type="text"
                                    size="small" title="轨迹">
                                <el-button
                                    v-show="navType == 0"
                                    @click="equipmentTrack(scope.row)"
                                    type="text"
                                    size="small"
                                    title="轨迹"
                                >
                                    <i class="el-icon-position"></i>
                                </el-button>
                                <el-button @click="play(scope.row)" type="text" size="small" title="播放视频">
                                <el-button
                                    @click="play(scope.row)"
                                    type="text"
                                    size="small"
                                    title="播放视频"
                                >
                                    <i class="el-icon-video-play"></i>
                                </el-button>
                            </template>
@@ -58,9 +92,15 @@
                    </el-table>
                    <div class="pages" ref="tablePagination">
                        <el-pagination background layout="prev, pager, next" you:page-size="equimentPage.pageSize"
                            :page-count="equimentPage.count" :pager-count="4" :current-page="equimentPage.currentPage"
                            @current-change="handleCurrentChange"></el-pagination>
                        <el-pagination
                            background
                            layout="prev, pager, next"
                            you:page-size="equimentPage.pageSize"
                            :page-count="equimentPage.count"
                            :pager-count="4"
                            :current-page="equimentPage.currentPage"
                            @current-change="handleCurrentChange"
                        ></el-pagination>
                    </div>
                </div>
            </div>
@@ -88,8 +128,8 @@
                            <div>状态:</div>
                            <div>
                                {{
                                    currentSelectEquipment.status ? (currentSelectEquipment.status == 0 ? '离线' : '在线') :
                                        ''
                                currentSelectEquipment.status ? (currentSelectEquipment.status == 0 ? '离线' : '在线') :
                                ''
                                }}
                            </div>
                        </li>
@@ -97,9 +137,16 @@
                        <li>
                            <div>选择时间:</div>
                            <div class="datetime">
                                <el-date-picker v-model="trackTime" type="daterange" unlink-panels range-separator="至"
                                    start-placeholder="开始日期" size="mini" :editable="false"
                                    end-placeholder="结束日期"></el-date-picker>
                                <el-date-picker
                                    v-model="trackTime"
                                    type="daterange"
                                    unlink-panels
                                    range-separator="至"
                                    start-placeholder="开始日期"
                                    size="mini"
                                    :editable="false"
                                    end-placeholder="结束日期"
                                ></el-date-picker>
                            </div>
                        </li>
@@ -112,8 +159,13 @@
        </div>
        <div class="search-content">
            <input v-model="searchExtensivelyValue" @input="searchExtensivelyChange" @focus="searchExtensivelyFocus"
                type="text" placeholder="请输入搜索条件" />
            <input
                v-model="searchExtensivelyValue"
                @input="searchExtensivelyChange"
                @focus="searchExtensivelyFocus"
                type="text"
                placeholder="请输入搜索条件"
            />
            <div class="clear" v-show="isShowClearBtn" @click="clearSearchValue" title="清空">
                <img src="../../../public/img/icon/clear.png" alt />
            </div>
@@ -122,15 +174,31 @@
        <div v-show="searchExtensivelyValBoxShow" class="searchExtensively-val-box">
            <div>
                <div @click="searchExtensivelyVlaClick(item)" v-for="(item, index) in searchExtensivelyArray"
                    :key="index">{{ item.name }}</div>
                <div
                    @click="searchExtensivelyVlaClick(item)"
                    v-for="(item, index) in searchExtensivelyArray"
                    :key="index"
                >{{ item.name }}</div>
            </div>
        </div>
        <el-dialog :title="dialogTitle" :modal="false" :visible.sync="dialogVisible" :before-close="dialogBeforeClose"
            :close-on-click-modal="true" class="car-video-box">
            <video autoplay controls width="100%" height="100%" ref="videoElement" id="videoElement"
                style="object-fit: fill"></video>
        <el-dialog
            :title="dialogTitle"
            :modal="false"
            :visible.sync="dialogVisible"
            :before-close="dialogBeforeClose"
            :close-on-click-modal="true"
            class="car-video-box"
        >
            <video
                autoplay
                controls
                width="100%"
                height="100%"
                ref="videoElement"
                id="videoElement"
                style="object-fit: fill"
            ></video>
        </el-dialog>
    </div>
</template>
@@ -680,7 +748,7 @@
            align-items: center;
            justify-content: space-around;
            &>div {
            & > div {
                flex: 1;
            }
        }
@@ -794,18 +862,18 @@
                color: #fff;
                border-bottom: 1px solid #fff;
                &>div {
                & > div {
                    text-align: center;
                }
                &>div:first-child {
                & > div:first-child {
                    flex: 2;
                }
                &>div:last-child {
                & > div:last-child {
                    flex: 6;
                    &>div {
                    & > div {
                        width: 100% !important;
                    }
                }
@@ -907,7 +975,7 @@
        border-radius: 10px;
        overflow: hidden;
        &>div {
        & > div {
            height: 100%;
            overflow-y: auto;
src/views/video/list.vue
@@ -274,7 +274,6 @@
            })
        },
        async siteClick (e) {
            if (this.flvPlayer != null) {
                this.flvPlayer.pause()