guanqb
2023-01-15 da4fb809758f056895f914c5be1178986087d223
Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
5 files modified
685 ■■■■ changed files
src/api/dept/index.js 39 ●●●●● patch | view | raw | blame | history
src/components/map/index.vue 30 ●●●● patch | view | raw | blame | history
src/views/home/components/bottomContainer.vue 80 ●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue 258 ●●●●● patch | view | raw | blame | history
src/views/home/index.vue 278 ●●●●● patch | view | raw | blame | history
src/api/dept/index.js
@@ -4,9 +4,9 @@
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2022-12-05 15:23:32
 * @FilePath: \srs-police-affairs\src\api\dept\index.js
 * @Description:
 *
 * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved.
 * @Description:
 *
 * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved.
 */
import request from "@/router/axios.js"
@@ -208,3 +208,36 @@
        }
    })
}
// 获取各个派出所的人口数量,以及人口总数和重点人员数量
export const getVillagePersonStatisticInfo = () => {
    return request({
        url: `/api/villagePersonInfo/villagePersonInfo/getVillagePersonStatisticInfo`,
        method: 'get',
    })
}
// 获取对应id下的派出所的责任区人口
export const getVillagePersonStatisticInfoByPoliceStationId = (name, id) => {
    return request({
        url: `/api/villagePersonInfo/villagePersonInfo/getVillagePersonStatisticInfoByPoliceStationId`,
        method: 'get',
        params: {
            name,
            id
        }
    })
}
// 获取该责任区下的人员列表信息
export const getAreaPage = (current, size, areaId) => {
    return request({
        url: `/api/policeStationInfo/policeStationInfo/getAreaPage`,
        method: 'get',
        params: {
            current,
            size,
            areaId
        }
    })
}
src/components/map/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 17:00:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-01-09 10:15:17
 * @LastEditTime: 2023-01-15 14:56:18
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -15,37 +15,20 @@
        <!-- 全屏控制按钮 -->
        <div class="screen-full-btn">
            <el-tooltip v-if="isFullscreen" content="缩放" placement="bottom" effect="dark">
                <i
                    class="fa fa-compress"
                    style="vertical-align: middle; cursor: pointer"
                    @click="fullscreenchange"
                ></i>
                <i class="fa fa-compress" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
            </el-tooltip>
            <el-tooltip v-if="!isFullscreen" content="全屏" placement="bottom" effect="dark">
                <i
                    class="fa fa-expand"
                    style="vertical-align: middle; cursor: pointer"
                    @click="fullscreenchange"
                ></i>
                <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
            </el-tooltip>
        </div>
        <!-- 切换矢量图按钮 -->
        <div
            class="image-switch-icon-btn"
            title="切换影像"
            @mouseover="showImgBtn = true"
            @mouseleave="showImgBtn = false"
        >
        <div class="image-switch-icon-btn" title="切换影像" @mouseover="showImgBtn = true" @mouseleave="showImgBtn = false">
            <div class="icon-box">
                <img src="/img/base_map.png" alt />
            </div>
            <div
                class="image-switch-img-btn"
                v-show="showImgBtn"
                @mouseover="showImgBtn = true"
                @mouseleave="showImgBtn = false"
            >
            <div class="image-switch-img-btn" v-show="showImgBtn" @mouseover="showImgBtn = true"
                @mouseleave="showImgBtn = false">
                <div class="img" @click="switchImg">
                    <span :class="{ on: imgtype == 0 }">影像</span>
                </div>
@@ -573,7 +556,6 @@
            } else if (type == 'HeatPoint') {
                layersObjcect[layerName].setPositions(params.positions)
            }
        },
src/views/home/components/bottomContainer.vue
@@ -6,12 +6,23 @@
                <div class="timeTab" v-show="historytype">
                    <span class="beforetime" :class="{ choosed: timetype == 0 }" @click="timeTabClick(0)">周</span>
                    <span class="beforetime" :class="{ choosed: timetype == 1 }" @click="timeTabClick(1)">月</span>
                    <span class="beforetime" :class="{ choosed: timetype == 2 }" @click="timeTabClick(2)">自定义</span>
                </div>
                <div class="timeSeclect" v-show="historytype">
                    <el-date-picker :clearable="false" v-model="currentTime" type="daterange" align="right"
                        unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
                    <el-date-picker v-show="timetype == 0" v-model="currentWeekTime" @change="datePickerChange"
                        type="week" align="center" format="yyyy 第 WW 周" placeholder="选择周">
                    </el-date-picker>
                    <el-date-picker v-show="timetype == 1" v-model="currentMonthTime" @change="datePickerChange"
                        type="month" align="center" placeholder="选择月">
                    </el-date-picker>
                    <el-date-picker v-show="timetype == 2" :clearable="false" v-model="currentTime" type="daterange"
                        align="center" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
                        @change="datePickerChange" :picker-options="pickerOptions"></el-date-picker>
                </div>
                <div class="history-tab">
                    <span class="beforetime" :class="{ choosed: historytype == 0 }"
                        @click="historyTabClick(0)">实时</span>
@@ -138,14 +149,18 @@
export default {
    data () {
        return {
            timetype: 0,
            timetype: 2,
            historytype: 0,
            // 实时
            policeSituationRealtimeArr: [],
            // 历史
            policeSituationHistoryArr: [],
            eventTime: '',
            // 当前选择时间
            // 当前选择周时间
            currentWeekTime: '',
            // 当前选择月时间
            currentMonthTime: '',
            // 当前选择自定义时间
            currentTime: [],
            pickerOptions: {
@@ -254,12 +269,25 @@
        // 时间改变事件
        datePickerChange (e) {
            console.log(this.dateFormat(e))
            // this.timetype
            const date = e.map(item => {
                return this.dateFormat(item)
            })
            if (this.timetype == 0) {
            this.getAlarmList({ start: date[0], end: date[1], current: this.currentPage })
                this.getAlarmList({ type: this.timetype, time: this.dateFormat(e), current: this.currentPage })
            } else if (this.timetype == 1) {
                this.getAlarmList({ type: this.timetype, time: this.dateFormat(e), current: this.currentPage })
            } else {
                const date = e.map(item => {
                    return this.dateFormat(item)
                })
                this.getAlarmList({ start: date[0], end: date[1], current: this.currentPage })
            }
        },
        // 获取当前日期
@@ -286,6 +314,8 @@
                } else {
                    this.policeSituationRealtimeArr = []
                }
                this.$emit('policeSituationChange')
            })
            // this.policeSituationRealtimeArr = [{
@@ -389,6 +419,8 @@
                }
                this.setTableHeight()
                this.$emit('policeSituationChange')
            })
            // this.policeSituationHistoryArr = [{
@@ -482,36 +514,52 @@
            this.currentPage = 1
            this.getAlarmList({ type, time: this.dateFormat(new Date()), current: this.currentPage })
            if (type == 2) {
            this.$emit('policeSituationChange')
                this.defaultDate()
                const date = this.currentTime.map(item => {
                    return this.dateFormat(item)
                })
                this.getAlarmList({ start: date[0], end: date[1], current: this.currentPage })
            } else {
                this.currentWeekTime = new Date()
                this.currentMonthTime = new Date()
                this.getAlarmList({ type, time: this.dateFormat(new Date()), current: this.currentPage })
            }
        },
        // 实时历史选择
        historyTabClick (type) {
        async historyTabClick (type) {
            this.historytype = type
            this.timetype = 0
            this.timetype = 2
            this.$emit('changePoliceSituationHistoryType', type)
            const date = this.currentTime.map(item => {
                return this.dateFormat(item)
            })
            if (type == 0) {
                this.getAnswerPolices()
                await this.getAnswerPolices()
            } else {
                this.currentPage = 1
                this.getAlarmList({
                await this.getAlarmList({
                    start: date[0],
                    end: date[1],
                    current: this.currentPage
                })
            }
            this.$emit('changePoliceSituationHistoryType', type)
            this.$emit('policeSituationChange')
        },
        chooseRealData () {
src/views/home/components/leftContainer.vue
@@ -20,7 +20,7 @@
                        @click="personTabClick(0)"
                    >
                        <div class="tab-title-small">户籍人口:</div>
                        <div class="tab-title-small">164.57万人</div>
                        <div class="tab-title-small">{{policeStationPersonInfo.total}}人</div>
                    </div>
                    <div
                        class="tab"
@@ -28,7 +28,7 @@
                        @click="personTabClick(1)"
                    >
                        <div class="tab-title-small">重点人员:</div>
                        <div class="tab-title-small">1人</div>
                        <div class="tab-title-small">{{policeStationPersonInfo.emphasisNum}}人</div>
                    </div>
                    <!-- <div class="tab3" :class="{ 'select-on-tab': tabType == 2 }" @click="personTabClick(2)">
                        <div class="num">91995人</div>
@@ -189,6 +189,7 @@
<script>
import { fontSize } from '@/utils/fontSize.js'
import { getAreaStatisticInfo } from "@/api/home/index.js"
import {getVillagePersonStatisticInfo, getVillagePersonStatisticInfoByPoliceStationId} from "@/api/dept";
let homePersonmyChart
let houseMyChart
@@ -309,6 +310,8 @@
            villageNum: '',
            areaOptionData: [],
            villageOptionData: [],
            policeStationPersonInfo:{},
            villagePersonStatisticInfoList:[],
        }
    },
@@ -319,9 +322,8 @@
    mounted () {
        this.initLandEcharts()
        this.initPersonEcharts()
        this.getPoliceStationInfo()
        this.inithouseEcharts()
        this.clickPeopleChart()
        this.clickLandChart()
        this.$nextTick(() => {
@@ -339,7 +341,19 @@
        initPersonEcharts () {
            var chartDom = document.getElementById('PersonEcharts')
            homePersonmyChart = this.$echarts.init(chartDom)
            homePersonmyChart.setOption(this.initPersonOptions(['车站所', '沙溪所', '灵溪所', '北门所', '江光所', '江光所', '水南所', '秦峰所', '茅家岭所', '西市所', '朝阳所'], [881, 2211, 6414, 4321, 1232, 881, 2211, 6414, 4321, 1232], ['#06B5D7', '#44C0C1', '#71C8B1']))
            var xDate = [],yDate=[]
            //传入x,y轴数据
            this.policeStationPersonInfo.data.forEach(e=>{
              xDate.push(e.name)
              yDate.push({
                value:e.num,
                id:e.id,
                type:'policeStation',
                name:e.name
              })
            })
            homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, ['#06B5D7', '#44C0C1', '#71C8B1']))
        },
        initPersonOptions (xDate, yDate, colors) {
@@ -433,10 +447,10 @@
                this.initPersonEcharts()
                homePersonmyChart.off('click')
                this.clickPeopleChart()
                xDate = ['车站所', '沙溪所', '灵溪所', '北门所', '江光所', '水南所', '秦峰所', '茅家岭所', '西市所', '朝阳所']
                yDate = [881, 2211, 6414, 4321, 1232, 881, 2211, 6414, 4321, 1232]
                colors = ['#06B5D7', '#44C0C1', '#71C8B1']
                homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // xDate = ['车站所', '沙溪所', '灵溪所', '北门所', '江光所', '水南所', '秦峰所', '茅家岭所', '西市所', '朝阳所']
                // yDate = [881, 2211, 6414, 4321, 1232, 881, 2211, 6414, 4321, 1232]
                // colors = ['#06B5D7', '#44C0C1', '#71C8B1']
                // homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
            } else if (type == 1) {
                this.peopleTabClick(type)
            }
@@ -523,7 +537,7 @@
                    //     show: true,
                    //     type: 'bar',
                    //     barGap: '-100%',
                    //     barWidth: '35%', //统计条宽度
                    //     barWidth: '35%', //统计条宽度
                    //     itemStyle: {
                    //         normal: {
                    //             color: 'rgba(102, 102, 102,0.5)'
@@ -651,7 +665,7 @@
                //         end: 40,
                //         zoomOnMouseWheel: false,  // 关闭滚轮缩放
                //         moveOnMouseWheel: true, // 开启滚轮平移
                //         moveOnMouseMove: true  // 鼠标移动能触发数据窗口平移
                //         moveOnMouseMove: true  // 鼠标移动能触发数据窗口平移
                //     }
                // ]
            }
@@ -693,84 +707,90 @@
            homePersonmyChart.on('click', params => {
                let xDate, yDate, colors
                this.dataDeep = 2
                if (params.name == '车站所') {
                    xDate = ['责任区1', '责任区2', '责任区3', '责任区4', '责任区5']
                    yDate = [88, 221, 641, 432, 123]
                    colors = ['#ccf9d0', '#f9d888', '#f7857e']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '沙溪所') {
                    xDate = ['责任区1', '责任区2', '责任区3', '责任区4', '责任区5']
                    yDate = [641, 423, 221, 123, 88]
                    colors = ['#102129', '#1f3942', '#2a4f5f']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '灵溪所') {
                    xDate = ['责任区1', '责任区2', '责任区3', '责任区4', '责任区5']
                    yDate = [111, 531, 211, 431, 64]
                    colors = ['#23b9e9', '#c76ee0', '#f05265']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '北门所') {
                    xDate = ['责任区1', '责任区2', '责任区3', '责任区4', '责任区5']
                    yDate = [887, 234, 452, 321, 154]
                    colors = ['#b22d2b', '#614976', '#4c3042']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '江光所') {
                    xDate = ['责任区1', '责任区2', '责任区3', '责任区4', '责任区5']
                    yDate = [400, 500, 200, 450, 245]
                    colors = ['#3089bf', '#77d8f9', '#f4fcfe']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '湖北') {
                    xDate = ['武汉市', '黄石市', '宜昌市', '鄂州市', '荆门市']
                    yDate = [88, 221, 641, 432, 123]
                    colors = ['#2b5144', '#5a987f', '#94ebc1']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '上海') {
                    xDate = ['黄浦区', '长宁区', '静安区', '虹口区', '闵行区']
                    yDate = [641, 423, 221, 123, 88]
                    colors = ['#f750c2', '#d6369a', '#bc1f76']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '北京') {
                    xDate = ['东城区', '西城区', '海淀区', '昌平区', '大兴区']
                    yDate = [111, 531, 211, 431, 64]
                    colors = ['#7e81d5', '#86abe6', '#8fe5e3']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '广东') {
                    xDate = ['珠海市', '东菀市', '佛山市', '中山市', '惠州市']
                    yDate = [887, 234, 452, 321, 154]
                    colors = ['#ba1432', '#6b0e33', '#2a0b35']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '浙江') {
                    xDate = ['杭州市', '舟山市', '宁波市', '嘉兴市', '绍兴市']
                    yDate = [400, 300, 200, 450, 245]
                    colors = ['#f12e10', '#f36c15', '#f4a818']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '日本') {
                    xDate = ['东京都', '北海道', '大阪府', '京都府', '43县']
                    yDate = [88, 221, 641, 432, 123]
                    colors = ['#6e978f', '#ad885a', '#e97b27']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '美国') {
                    xDate = ['加利福尼亚州', '德克萨斯州', '纽约州', '俄亥俄州']
                    yDate = [641, 423, 221, 123, 88]
                    colors = ['#d54956', '#9f976e', '#73d781']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '俄罗斯') {
                    xDate = ['西北联邦', '中央联邦', '南方联邦', '伏尔加联邦']
                    yDate = [111, 531, 211, 431, 64]
                    colors = ['#7d65c0', '#a47db4', '#e0a8c5']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '英国') {
                    xDate = ['英格兰', '威尔士', '苏格兰', '北爱尔兰']
                    yDate = [887, 234, 452, 321, 154]
                    colors = ['#584d7b', '#9b836a', '#f8ce52']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else if (params.name == '印度') {
                    xDate = ['德里', '哈里亚纳邦', '旁遮普邦', '喜马偕尔邦', '北方邦']
                    yDate = [400, 300, 200, 450, 245]
                    colors = ['#0f97f2', '#7d629d', '#e1344f']
                    homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                } else {
                    this.$emit('showpeopledetail', params.name)
                if (params.data.type == 'policeStation'){
                  this.getVillagePersonStatisticInfoByPoliceStationId(params.data.name,params.data.id)
                }else {
                  this.$emit('showpeopledetail', params.data.id,params.data.name)
                }
                // if (params.name == '车站所') {
                //     xDate = ['责任区1', '责任区2', '责任区3', '责任区4', '责任区5']
                //     yDate = [88, 221, 641, 432, 123]
                //     colors = ['#ccf9d0', '#f9d888', '#f7857e']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '沙溪所') {
                //     xDate = ['责任区1', '责任区2', '责任区3', '责任区4', '责任区5']
                //     yDate = [641, 423, 221, 123, 88]
                //     colors = ['#102129', '#1f3942', '#2a4f5f']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '灵溪所') {
                //     xDate = ['责任区1', '责任区2', '责任区3', '责任区4', '责任区5']
                //     yDate = [111, 531, 211, 431, 64]
                //     colors = ['#23b9e9', '#c76ee0', '#f05265']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '北门所') {
                //     xDate = ['责任区1', '责任区2', '责任区3', '责任区4', '责任区5']
                //     yDate = [887, 234, 452, 321, 154]
                //     colors = ['#b22d2b', '#614976', '#4c3042']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '江光所') {
                //     xDate = ['责任区1', '责任区2', '责任区3', '责任区4', '责任区5']
                //     yDate = [400, 500, 200, 450, 245]
                //     colors = ['#3089bf', '#77d8f9', '#f4fcfe']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '湖北') {
                //     xDate = ['武汉市', '黄石市', '宜昌市', '鄂州市', '荆门市']
                //     yDate = [88, 221, 641, 432, 123]
                //     colors = ['#2b5144', '#5a987f', '#94ebc1']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '上海') {
                //     xDate = ['黄浦区', '长宁区', '静安区', '虹口区', '闵行区']
                //     yDate = [641, 423, 221, 123, 88]
                //     colors = ['#f750c2', '#d6369a', '#bc1f76']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '北京') {
                //     xDate = ['东城区', '西城区', '海淀区', '昌平区', '大兴区']
                //     yDate = [111, 531, 211, 431, 64]
                //     colors = ['#7e81d5', '#86abe6', '#8fe5e3']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '广东') {
                //     xDate = ['珠海市', '东菀市', '佛山市', '中山市', '惠州市']
                //     yDate = [887, 234, 452, 321, 154]
                //     colors = ['#ba1432', '#6b0e33', '#2a0b35']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '浙江') {
                //     xDate = ['杭州市', '舟山市', '宁波市', '嘉兴市', '绍兴市']
                //     yDate = [400, 300, 200, 450, 245]
                //     colors = ['#f12e10', '#f36c15', '#f4a818']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '日本') {
                //     xDate = ['东京都', '北海道', '大阪府', '京都府', '43县']
                //     yDate = [88, 221, 641, 432, 123]
                //     colors = ['#6e978f', '#ad885a', '#e97b27']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '美国') {
                //     xDate = ['加利福尼亚州', '德克萨斯州', '纽约州', '俄亥俄州']
                //     yDate = [641, 423, 221, 123, 88]
                //     colors = ['#d54956', '#9f976e', '#73d781']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '俄罗斯') {
                //     xDate = ['西北联邦', '中央联邦', '南方联邦', '伏尔加联邦']
                //     yDate = [111, 531, 211, 431, 64]
                //     colors = ['#7d65c0', '#a47db4', '#e0a8c5']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '英国') {
                //     xDate = ['英格兰', '威尔士', '苏格兰', '北爱尔兰']
                //     yDate = [887, 234, 452, 321, 154]
                //     colors = ['#584d7b', '#9b836a', '#f8ce52']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else if (params.name == '印度') {
                //     xDate = ['德里', '哈里亚纳邦', '旁遮普邦', '喜马偕尔邦', '北方邦']
                //     yDate = [400, 300, 200, 450, 245]
                //     colors = ['#0f97f2', '#7d629d', '#e1344f']
                //     homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
                // } else {
                //     this.$emit('showpeopledetail', params.name)
                // }
            })
        },
@@ -923,21 +943,22 @@
        backBegin () {
            this.dataDeep = 1
            let xDate, yDate, colors
            if (this.tabType == 0) {
                xDate = ['车站所', '沙溪所', '灵溪所', '北门所', '江光所', '水南所', '秦峰所', '茅家岭所', '西市所', '朝阳所']
                yDate = [881, 2211, 6414, 4321, 1232, 881, 2211, 6414, 4321, 1232]
                colors = ['#06B5D7', '#44C0C1', '#71C8B1']
            } else if (this.tabType == 1) {
                xDate = ['湖北', '上海', '北京', '广东', '浙江']
                yDate = [6414, 4231, 2211, 1231, 881]
                colors = ['#ef9faa', '#f7bfc6', '#fedade']
            } else if (this.tabType == 2) {
                xDate = ['日本', '美国', '俄罗斯', '英国', '印度']
                yDate = [881, 1231, 2211, 4321, 6414]
                colors = ['#7d65c0', '#a47db4', '#e0a8c5']
            }
            homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
            this.initPersonEcharts()
            // let xDate, yDate, colors
            // if (this.tabType == 0) {
            //     xDate = ['车站所', '沙溪所', '灵溪所', '北门所', '江光所', '水南所', '秦峰所', '茅家岭所', '西市所', '朝阳所']
            //     yDate = [881, 2211, 6414, 4321, 1232, 881, 2211, 6414, 4321, 1232]
            //     colors = ['#06B5D7', '#44C0C1', '#71C8B1']
            // } else if (this.tabType == 1) {
            //     xDate = ['湖北', '上海', '北京', '广东', '浙江']
            //     yDate = [6414, 4231, 2211, 1231, 881]
            //     colors = ['#ef9faa', '#f7bfc6', '#fedade']
            // } else if (this.tabType == 2) {
            //     xDate = ['日本', '美国', '俄罗斯', '英国', '印度']
            //     yDate = [881, 1231, 2211, 4321, 6414]
            //     colors = ['#7d65c0', '#a47db4', '#e0a8c5']
            // }
            // homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
        },
        getKeyPersonCount (arr) {
@@ -1020,7 +1041,36 @@
            })
        },
        //获取各个派出所的人口数量
        getPoliceStationInfo(){
          getVillagePersonStatisticInfo().then(res=>{
            if (res.data.code == 200){
              this.policeStationPersonInfo = res.data.data
              //异步,因此放进接口方法内部
              this.initPersonEcharts()
              this.clickPeopleChart()
            }
          })
        },
        //获取该派出所下的辖区
        getVillagePersonStatisticInfoByPoliceStationId(name,policeStationId){
          getVillagePersonStatisticInfoByPoliceStationId(name,policeStationId).then(res=>{
            if (res.data.code == 200){
              this.villagePersonStatisticInfoList = res.data.data
              var xDate = [],yDate = [],colors = ['#ccf9d0', '#f9d888', '#f7857e']
              this.villagePersonStatisticInfoList.forEach(e=>{
                  xDate.push(e.name)
                  yDate.push({
                    value:e.num,
                    name:e.name,
                    id:e.id
                  })
              })
              homePersonmyChart.setOption(this.initPersonOptions(xDate, yDate, colors), true)
            }
          })
        }
@@ -1242,4 +1292,4 @@
        stroke-dashoffset: 888;
    }
}
</style>
</style>
src/views/home/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-01-14 11:32:08
 * @LastEditTime: 2023-01-15 15:49:07
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 *
@@ -11,29 +11,17 @@
<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">
@@ -57,51 +45,24 @@
        </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>
@@ -120,49 +81,37 @@
            </div>
        </el-dialog>
        <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>
            </div>
            <div class="item">
                <div>责任区人口:</div>
                <div>10000</div>
            </div>
            <div class="item">
                <div>男女比例:</div>
                <div>0.92:1</div>
            </div>
            <div class="item">
                <div>所在地址:</div>
                <div>XXXXXXX</div>
            </div>
        <el-dialog :title="peopleTitle" :modal="true" :visible.sync="peopleVisible" :before-close="peopleBeforeClose"
            :close-on-click-modal="true" class="area-details-box">
          <el-table
              :data="peopleInfoList"
              style="width: 100%"
              :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
              :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }"
          >
            <el-table-column prop="name" label="责任区名称"></el-table-column>
            <el-table-column prop="policeName" label="负责人"></el-table-column>
            <el-table-column prop="phone" label="联系电话"></el-table-column>
          </el-table>
          <div class="pages" ref="tablePagination">
            <el-pagination background layout="prev, pager, next" :page-size="peoplePage.pageSize"
                           :page-count="peoplePage.count" :current-page="peoplePage.currentPage"
                           @current-change="handlePeopleCurrentChange"></el-pagination>
          </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>
@@ -174,40 +123,23 @@
                        </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-dialog :title="landTitle" :modal="true" :visible.sync="landVisible" :before-close="landBeforeClose"
            :close-on-click-modal="true" class="land-details-box">
            <div class="header">
                <div>
                    负责人:
@@ -218,19 +150,12 @@
                    <input type="text" v-model="callPhone" placeholder="请输入联系电话" />
                </div>
                <el-button type="primary" icon="el-icon-search" @click="searchLandDetail">搜索</el-button>
                <el-button
                    type="primary"
                    icon="el-icon-delete"
                    @click="clearLandDetailSearchValue"
                >清空</el-button>
                <el-button type="primary" icon="el-icon-delete" @click="clearLandDetailSearchValue">清空</el-button>
            </div>
            <el-table
                :data="landDetailArr"
                style="width: 100%"
            <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="name" label="责任区名称" v-if="this.landType == 1"></el-table-column>
                <el-table-column prop="aoiName" label="小区名称" v-if="this.landType == 2"></el-table-column>
                <el-table-column prop="policeName" label="负责人"></el-table-column>
@@ -238,20 +163,11 @@
            </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>
@@ -262,23 +178,11 @@
            </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">
@@ -340,10 +244,7 @@
                </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>
@@ -400,29 +301,14 @@
                </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>
@@ -521,7 +407,7 @@
import axios from "axios"
import { getPanoramaList } from "@/api/panorama"
import { getResidentialQuartersList } from '@/api/dept/index.js'
import {getAreaPage, getResidentialQuartersList} from '@/api/dept/index.js'
import monitoringList from '@/assets/data/monitoring.js'
import leftContainer from './components/leftContainer'
@@ -558,8 +444,15 @@
            phoneDetails: {},
            phoneTitle: '',
            peopleTitle: '',
            peopleId:"",
            phoneVisible: false,
            peopleVisible: false,
            peopleInfoList:[],
            peoplePage:{
              count:0,
              pageSize:5,
              currentPage:1
            },
            houseList: [],
            carList: [],
            cameraList: [],
@@ -874,6 +767,7 @@
                            this.$EventBus.$emit('layerPointAdd', {
                                layerName: 'carLayers',
                                type: "billboard",
                                layerType: 'ClusterLayer',
                                params: {
                                    ...item,
                                    lng: item.longitude,
@@ -1276,11 +1170,29 @@
            this.$refs.RegionSelect.style.left = (bodyWidth - domWidth) / 2 + 'px'
        },
        showpeopledetail (name) {
        showpeopledetail (id,name) {
            this.peopleTitle = name
            this.peopleId = id
            this.getPeopleInfoList()
            this.peopleVisible = true
        },
        getPeopleInfoList(){
          getAreaPage(this.peoplePage.currentPage,this.peoplePage.pageSize,this.peopleId).then(res=>{
            if (res.data.code == 200){
              this.peopleInfoList = res.data.data.records
              this.peoplePage.count = res.data.total
            }
          })
        },
      handlePeopleCurrentChange(currentPage){
          this.peoplePage.currentPage = currentPage
          this.getPeopleInfoList()
      },
        showlanddetail (name, type, id) {
            this.landVisible = true
            this.landTitle = name