guanqb
2023-01-13 44bb470d516a33351675deaf2cf6113a5bf1af43
社区数据对接
5 files modified
351 ■■■■ changed files
src/api/dept/index.js 14 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue 6 ●●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue 2 ●●● patch | view | raw | blame | history
src/views/home/index.vue 243 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 86 ●●●● patch | view | raw | blame | history
src/api/dept/index.js
@@ -158,4 +158,18 @@
            id
        }
    })
}
// 转id
export const getAoiByBgId = (bg_id) => {
    return request({
        url: `/sf3d/area/getAoiByBgId`,
        method: 'get',
        requestBaseUrl: 'fengt',
        params: {
            bg_id,
            adcode: 361102,
            type: 0
        }
    })
}
src/views/activity/index.vue
@@ -177,7 +177,7 @@
                    </ul>
                </div>
            </div>
            <div class="right">
            <div class="right" v-if="false">
                <ul>
                    <li>
                        <button @click="removeAllArrow()">清除</button>
@@ -736,6 +736,9 @@
                        let positionNewArr = this.convertPolylineOrPolygonPositionDate(item.position, item.type)
                        count++
                        if (count == 1) {
                            if (tc) {
                                tc.clear()
                            }
                            tc = new global.DC.TrackController(global.viewer)
                            track = new global.DC.Track(positionNewArr, 15)
                            track.setModel('/model/qiche.gltf', {
@@ -743,7 +746,6 @@
                            })
                            tc.addTrack(track)
                        }
                        console.log(3333333333, positionNewArr)
                        this.$EventBus.$emit('layerPolylineAdd', {
                            layerName: 'newCarDrawLayers',
                            positions: positionNewArr,
src/views/home/components/leftContainer.vue
@@ -1010,7 +1010,7 @@
        getAreaStatisticInfo (type) {
            getAreaStatisticInfo(type).then(res => {
                if (type == 1) {
                if (type == 2) {
                    this.areaNum = res.data.data.areaNum
                    this.villageNum = res.data.data.villageNum
                    let nameArr = []
src/views/home/index.vue
@@ -11,17 +11,29 @@
<template>
    <div class="home-page container">
        <left-container class="left-container" @showpeopledetail="showpeopledetail" @showlanddetail="showlanddetail"
            @showkeypersondetail="showkeypersondetail" ref="leftContainer"></left-container>
        <left-container
            class="left-container"
            @showpeopledetail="showpeopledetail"
            @showlanddetail="showlanddetail"
            @showkeypersondetail="showkeypersondetail"
            ref="leftContainer"
        ></left-container>
        <right-container class="right-container" @showequimentdetail="showequimentdetail"
            @selectPoliceChangeEventData="selectPoliceChangeEventData" @changeActivityType="changeActivityType"
            ref="rightContainer"></right-container>
        <right-container
            class="right-container"
            @showequimentdetail="showequimentdetail"
            @selectPoliceChangeEventData="selectPoliceChangeEventData"
            @changeActivityType="changeActivityType"
            ref="rightContainer"
        ></right-container>
        <bottom-container class="bottom-container" ref="bottomContainer"
        <bottom-container
            class="bottom-container"
            ref="bottomContainer"
            @changePoliceSituationHistoryType="changePoliceSituationHistoryType"
            @policeSituationChange="policeSituationChange"
            @policeSituationSiteClick="policeSituationSiteClick"></bottom-container>
            @policeSituationSiteClick="policeSituationSiteClick"
        ></bottom-container>
        <div class="center-container">
            <div class="layers-control-btn house">
@@ -45,24 +57,51 @@
        </div>
        <div ref="RegionSelect" style="left: 0;" class="region-select">
            <map-select class="map-select" @selectCheck="policeStationSelect" :checkValue="policeStationCheckValue"
                :options="policeStationOptions" :optionsName="'name'"></map-select>
            <map-select
                class="map-select"
                @selectCheck="policeStationSelect"
                :checkValue="policeStationCheckValue"
                :options="policeStationOptions"
                :optionsName="'name'"
            ></map-select>
            <map-select class="map-select" @selectCheck="areaSelect" :checkValue="areaCheckValue" :options="areaOptions"
                :optionsName="'name'"></map-select>
            <map-select
                class="map-select"
                @selectCheck="areaSelect"
                :checkValue="areaCheckValue"
                :options="areaOptions"
                :optionsName="'name'"
            ></map-select>
            <map-select class="map-select" @selectCheck="housingSelect" :checkValue="housingCheckValue"
                :options="housingOptions" :optionsName="'name'"></map-select>
            <map-select
                class="map-select"
                @selectCheck="housingSelect"
                :checkValue="housingCheckValue"
                :options="housingOptions"
                :optionsName="'name'"
            ></map-select>
        </div>
        <el-dialog :title="panoramaTitle" :modal="true" :visible.sync="panoramaVisible"
            :before-close="panoramaBeforeClose" :close-on-click-modal="true" class="panorama-details-box">
        <el-dialog
            :title="panoramaTitle"
            :modal="true"
            :visible.sync="panoramaVisible"
            :before-close="panoramaBeforeClose"
            :close-on-click-modal="true"
            class="panorama-details-box"
        >
            <!-- <iframe src="http://vr.jxpskj.com/JXSFKZQJ/QJ/" style="width: 100%; height: 100%;" frameborder="0"></iframe>-->
            <iframe :src="panoramaVrUrl" style="width: 100%; height: 100%;" frameborder="0" />
        </el-dialog>
        <el-dialog :title="phoneTitle" :modal="true" :visible.sync="phoneVisible" :before-close="phoneBeforeClose"
            :close-on-click-modal="true" class="phone-details-box">
        <el-dialog
            :title="phoneTitle"
            :modal="true"
            :visible.sync="phoneVisible"
            :before-close="phoneBeforeClose"
            :close-on-click-modal="true"
            class="phone-details-box"
        >
            <div class="item">
                <div>责任人:</div>
                <div>{{ phoneDetails.person }}</div>
@@ -81,8 +120,14 @@
            </div>
        </el-dialog>
        <el-dialog :title="peopleTitle" :modal="true" :visible.sync="peopleVisible" :before-close="peopleBeforeClose"
            :close-on-click-modal="true" class="area-details-box">
        <el-dialog
            :title="peopleTitle"
            :modal="true"
            :visible.sync="peopleVisible"
            :before-close="peopleBeforeClose"
            :close-on-click-modal="true"
            class="area-details-box"
        >
            <div class="item">
                <div>责任区负责人:</div>
                <div>王某某</div>
@@ -101,14 +146,23 @@
            </div>
        </el-dialog>
        <el-dialog :title="equimentTitle" :modal="true" :visible.sync="equimentVisible"
            :before-close="equimentBeforeClose" :close-on-click-modal="true" class="equiment-details-box">
        <el-dialog
            :title="equimentTitle"
            :modal="true"
            :visible.sync="equimentVisible"
            :before-close="equimentBeforeClose"
            :close-on-click-modal="true"
            class="equiment-details-box"
        >
            <div class="equiment-detail">
                <div class="others">
                    <el-table :data="equimentTableData" style="width: 100%"
                    <el-table
                        :data="equimentTableData"
                        style="width: 100%"
                        :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                        :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                        :row-class-name="tableRowClassName">
                        :row-class-name="tableRowClassName"
                    >
                        <el-table-column type="index" :index="indexMethod" label="序号"></el-table-column>
                        <el-table-column prop="channelId" label="通道编号"></el-table-column>
                        <el-table-column prop="deviceId" label="设备编号"></el-table-column>
@@ -120,26 +174,46 @@
                        </el-table-column>
                        <el-table-column label="操作">
                            <template slot-scope="scope">
                                <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>
                        </el-table-column>
                    </el-table>
                    <div class="pages">
                        <el-pagination background layout="prev, pager, next" :total="equimentPagingTotal"
                            :page-size="pagesize" pager-count="3" :current-page="currentPage"
                            @current-change="handleCurrentChange"></el-pagination>
                        <el-pagination
                            background
                            layout="prev, pager, next"
                            :total="equimentPagingTotal"
                            :page-size="pagesize"
                            pager-count="3"
                            :current-page="currentPage"
                            @current-change="handleCurrentChange"
                        ></el-pagination>
                    </div>
                </div>
            </div>
        </el-dialog>
        <el-dialog :title="landTitle" :modal="true" :visible.sync="landVisible" :before-close="landBeforeClose"
            :close-on-click-modal="true" class="land-details-box">
            <el-table :data="landDetailArr" style="width: 100%"
        <el-dialog
            :title="landTitle"
            :modal="true"
            :visible.sync="landVisible"
            :before-close="landBeforeClose"
            :close-on-click-modal="true"
            class="land-details-box"
        >
            <el-table
                :data="landDetailArr"
                style="width: 100%"
                :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }">
                :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }"
            >
                <el-table-column prop="housingEastate" label="小区名称" width="100"></el-table-column>
                <el-table-column prop="location" label="位置" width="140"></el-table-column>
                <el-table-column prop="area" label="面积" width="120"></el-table-column>
@@ -148,11 +222,20 @@
            </el-table>
        </el-dialog>
        <el-dialog :title="keyPersonTitle" :modal="true" :visible.sync="keyPersonVisible"
            :before-close="keyPersonBeforeClose" :close-on-click-modal="true" class="keyPerson-details-box">
            <el-table :data="keyPersonDetailArr" style="width: 100%"
        <el-dialog
            :title="keyPersonTitle"
            :modal="true"
            :visible.sync="keyPersonVisible"
            :before-close="keyPersonBeforeClose"
            :close-on-click-modal="true"
            class="keyPerson-details-box"
        >
            <el-table
                :data="keyPersonDetailArr"
                style="width: 100%"
                :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }">
                :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }"
            >
                <el-table-column prop="type" label="重点人员类型"></el-table-column>
                <el-table-column prop="name" label="姓名"></el-table-column>
                <el-table-column prop="sex" label="性别"></el-table-column>
@@ -163,11 +246,23 @@
            </el-table>
        </el-dialog>
        <el-dialog title="警情信息" :modal="true" :visible.sync="policeSituationVisible"
            :before-close="policeSituationBeforeClose" :close-on-click-modal="true" class="policeSituation-details-box">
        <el-dialog
            title="警情信息"
            :modal="true"
            :visible.sync="policeSituationVisible"
            :before-close="policeSituationBeforeClose"
            :close-on-click-modal="true"
            class="policeSituation-details-box"
        >
            <div class="btn-change">
                <div :class="{ on: policeInformationType == '接警信息' }" @click="alarmOrActAsPolice('接警信息')">接警信息</div>
                <div :class="{ on: policeInformationType == '出警信息' }" @click="alarmOrActAsPolice('出警信息')">出警信息</div>
                <div
                    :class="{ on: policeInformationType == '接警信息' }"
                    @click="alarmOrActAsPolice('接警信息')"
                >接警信息</div>
                <div
                    :class="{ on: policeInformationType == '出警信息' }"
                    @click="alarmOrActAsPolice('出警信息')"
                >出警信息</div>
            </div>
            <div v-show="policeInformationType == '接警信息'" class="box">
@@ -229,7 +324,10 @@
                </div>
            </div>
            <div v-show="policeInformationType == '出警信息' && JSON.stringify(CJdata) != '{}'" class="box">
            <div
                v-show="policeInformationType == '出警信息' && JSON.stringify(CJdata) != '{}'"
                class="box"
            >
                <div class="item">
                    <div>处警单位编号:</div>
                    <div>{{ CJdata.CJDWBH }}</div>
@@ -286,14 +384,29 @@
                </div>
            </div>
            <div v-show="policeInformationType == '出警信息' && JSON.stringify(CJdata) == '{}'" class="box no-data">暂无数据
            </div>
            <div
                v-show="policeInformationType == '出警信息' && JSON.stringify(CJdata) == '{}'"
                class="box no-data"
            >暂无数据</div>
        </el-dialog>
        <el-dialog :title="dialogEquimentVideoTitle" :modal="true" :visible.sync="dialogEquimentVideoVisible"
            :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="dialogEquimentVideoTitle"
            :modal="true"
            :visible.sync="dialogEquimentVideoVisible"
            :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>
@@ -626,6 +739,7 @@
                cylinderLayer.clear()
                this.initAreaOptionLayer(item)
                this.areaCheckValue = '请选择责任区'
                this.housingCheckValue = '请选择小区'
                getPoliceStationTree(2, item.id).then(res => {
                    this.areaOptions = res.data.data
                })
@@ -650,7 +764,7 @@
                getPoliceStationTree(3, item.id).then(res => {
                    this.housingOptions = res.data.data
                    res.data.data.forEach(item => {
                        let itPositionStr = item.replace(/POINT\(/g, '')
                        let itPositionStr = item.position[0].replace(/POINT\(/g, '')
                        itPositionStr = itPositionStr.replace(/\)/g, '')
                        let positionArr = [Number(itPositionStr.split(' ')[0]), Number(itPositionStr.split(' ')[1])]
                        this.$EventBus.$emit('layerPointAdd', {
@@ -659,9 +773,11 @@
                            params: {
                                lng: positionArr[0],
                                lat: positionArr[1],
                                alt: 0,
                                url: '/img/icon/house.png'
                                alt: 50,
                                url: '/img/icon/house.png',
                                id: item.id
                            },
                            incident: this.houseSiteClick,
                            distanceDisplayCondition: { "near": 0, "far": 200000 }
                        })
                    })
@@ -674,12 +790,19 @@
        housingSelect (item) {
            this.housingCheckValue = item.name
            if (item.housingsName == "全部") {
                this.initHousingLayer(this.areaChecked)
            } else {
                this.initLivingLayer(item)
            }
            // if (item.housingsName == "全部") {
            //     this.initHousingLayer(this.areaChecked)
            // } else {
            //     this.initLivingLayer(item)
            // }
            let itPositionStr = item.position[0].replace(/POINT\(/g, '')
            itPositionStr = itPositionStr.replace(/\)/g, '')
            let positionArr = [Number(itPositionStr.split(' ')[0]), Number(itPositionStr.split(' ')[1])]
            this.$EventBus.$emit('toPosition', {
                siteJd: positionArr[0],
                siteWd: positionArr[1],
                siteGd: 100,
            })
        },
        getCenter (str) {
@@ -714,7 +837,7 @@
        },
        houseSiteClick (e) {
            this.$router.push({ path: '/layout/house', query: { searchName: 'xxx小区' } })
            this.$router.push({ path: '/layout/house', query: { id: e.overlay.attrParams.id } })
        },
        carChange (e) {
@@ -1026,15 +1149,7 @@
        },
        initHousingLayer (item) {
            // let center = this.getAreaCenter(item.areaCheckName)
            this.clearPolygonLayer()
            // this.$EventBus.$emit('toPosition', {
            //     siteJd: center[0],
            //     siteWd: center[1],
            //     siteGd: 18000,
            //     siteHeading: -3,
            //     sitePitch: -90
            // })
            let itPositionStr = item.position[0].replace(/MULTIPOLYGON\(\(\(/g, '')
            itPositionStr = itPositionStr.replace(/\)\)\)/g, '')
            itPositionStr = itPositionStr.replace(/,/g, ";")
src/views/house/index.vue
@@ -72,28 +72,29 @@
            <div v-show="contentShow" class="result-content" ref="resultContentBox">
                <div class="housing-estate-info" ref="housingEstateInfoBox">
                    <div class="housing-title">
                        {{ housingData.name }}
                        <!-- {{ housingData.name }} -->
                        xxx
                        <div class="progress"></div>
                    </div>
                    <div class="housing-bg">
                        <img style="width: 100%; height: 100%;" :src="housingData.img" alt />
                        <!-- <img style="width: 100%; height: 100%;" :src="housingData.img" alt /> -->
                    </div>
                    <div class="housing-introduce">
                        <div>
                            <div class="l">分类属性:</div>
                            <div class="r">{{ housingData.classify }}</div>
                            <!-- <div class="r">{{ housingData.classify }}</div> -->
                        </div>
                        <div>
                            <div class="l">所属辖区:</div>
                            <div class="r">{{ housingData.area }}</div>
                            <!-- <div class="r">{{ housingData.area }}</div> -->
                        </div>
                        <div>
                            <div class="l">责任民警:</div>
                            <div class="r">{{ housingData.principal }}</div>
                            <!-- <div class="r">{{ housingData.principal }}</div> -->
                        </div>
                        <div>
                            <div class="l">标准地址:</div>
                            <div class="r">{{ housingData.address }}</div>
                            <!-- <div class="r">{{ housingData.address }}</div> -->
                        </div>
                    </div>
                </div>
@@ -627,8 +628,8 @@
<script>
import { listQuery, accurateSearch } from "@/utils/search.js"
import housingData from '@/assets/data/housingData.js'
import { getResidentialQuartersList, getResidentialQuartersInfo, getSearchExtensively, getAoiByPt, getUnitbuild, getHouses, getSearchExtensivelyBgAoiDeepdata } from '@/api/dept/index.js'
// import housingData from '@/assets/data/housingData.js'
import { getResidentialQuartersList, getResidentialQuartersInfo, getSearchExtensively, getAoiByPt, getUnitbuild, getHouses, getSearchExtensivelyBgAoiDeepdata, getPoliceStationLazyTree, getAoiByBgId } from '@/api/dept/index.js'
import { getAlarmList } from "@/api/home/index.js"
@@ -656,14 +657,14 @@
            lastFloorShow: false,
            nextFloorShow: true,
            houseDate: {},
            housingData: {
                name: '',
                img: '/img/housing/one.jpg',
                classify: '住宅区',
                area: 'xxx警务室',
                principal: '王敦顿',
                address: '江西省上饶市市广信区信美路18号'
            },
            // housingData: {
            //     name: '',
            //     img: '/img/housing/one.jpg',
            //     classify: '住宅区',
            //     area: 'xxx警务室',
            //     principal: '王敦顿',
            //     address: '江西省上饶市市广信区信美路18号'
            // },
            searchValue: '',
            searchArray: [],
            searchValBoxShow: false,
@@ -845,6 +846,10 @@
        },
    },
    created () {
        console.log(this.$route.query.id, 111112233)
        getAoiByBgId(this.$route.query.id).then(res => {
            console.log(565656, res.data.data.features[0].properties.aoi_id)
        })
        // this.getResidentialQuartersList('361102')
        this.getResidentialQuartersInfo('6E5271B45D1611EAB6183C15FB00027B', '361102')
        this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', '62556EAF4B731B9DE0530EF4520A0CFC', '1|3')
@@ -899,7 +904,7 @@
        getResidentialQuartersInfo (areaId, adcode) {
            getResidentialQuartersInfo(areaId, adcode).then(res => {
                this.getHouses(res.data.data.build[1].build_id, '361102')
                this.housingData.name = res.data.data.aoi_name
                // this.housingData.name = res.data.data.aoi_name
                this.callPolicePage.currentPage = 1
                this.getAlarmList()
@@ -1073,14 +1078,14 @@
            } else {
                this.searchValBoxShow = true
                this.searchArray = listQuery(housingData, this.searchValue, 'name')
                // this.searchArray = listQuery(housingData, this.searchValue, 'name')
            }
        },
        searchClick () {
            this.searchValBoxShow = false
            this.housingData = accurateSearch(housingData, this.searchValue, 'name', {})
            // this.housingData = accurateSearch(housingData, this.searchValue, 'name', {})
            this.searchValue = ''
        },
@@ -1088,7 +1093,7 @@
        searchVlaClick (item) {
            this.searchValBoxShow = false
            this.housingData = item
            // this.housingData = item
            this.searchValue = ''
        },
@@ -1254,7 +1259,6 @@
        // 获取历史接警记录
        getAlarmList () {
            getAlarmList({ current: this.callPolicePage.currentPage, size: this.pagesize, sfdz: this.housingData.name }).then(res => {
                this.callPolicePage.count = res.data.data.pages
@@ -1293,7 +1297,45 @@
                    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, 111)
            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([])
        },
        // async getAoiByBgId (bg_id) {
        //     let newId = ''
        //     await getAoiByBgId(bg_id).then(res => {
        //         console.log(565656, res.data.data.features[0].properties.aoi_id)
        //         newId = res.data.data.features[0].properties.aoi_id
        //     })
        //     return newId
        // }
    },
    destroyed () {