shuishen
2022-09-28 529e472521903d5a831941868e3e74ad4e6ece90
Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
2 files modified
76 ■■■■ changed files
src/views/activity/index.vue 4 ●●●● patch | view | raw | blame | history
src/views/home/index.vue 72 ●●●● patch | view | raw | blame | history
src/views/activity/index.vue
@@ -420,8 +420,6 @@
    },
    mounted () {
        this.$nextTick(() => {
            this.activityList.forEach(item => {
                this.$EventBus.$emit('layerPointAdd', {
                    layerName: 'activityLayers',
@@ -471,7 +469,6 @@
        },
        treeNodeClick () {
            console.log(1111223)
            let color = global.DC.Namespace.Cesium.Color.fromBytes(
                102, 176, 255,
                100
@@ -482,7 +479,6 @@
                material: color,
                width: 2
            })
            console.log(223232)
        },
        goAbDetail (item, index) {
src/views/home/index.vue
@@ -18,15 +18,15 @@
                </div>
                <div class="sub-tab">
                    <div class="tab">
                    <div class="tab" :class="{on:tabType==0}" @click="tabType=0">
                        <div class="num">164.57万人</div>
                        <div class="type">户籍人口</div>
                    </div>
                    <div class="tab on">
                    <div class="tab" :class="{on:tabType==1}" @click="tabType=1">
                        <div class="num">17.52万人</div>
                        <div class="type">流动人口</div>
                    </div>
                    <div class="tab">
                    <div class="tab" :class="{on:tabType==2}" @click="tabType=2">
                        <div class="num">91995人</div>
                        <div class="type">境外人口</div>
                    </div>
@@ -40,11 +40,11 @@
                </div>
                <div class="sub-tab">
                    <div class="tab">
                    <div class="tab" :class="{on:tabTypeTwo==0}" @click="tabTypeTwo=0">
                        <div class="num">1822603户</div>
                        <div class="num">实有房屋</div>
                    </div>
                    <div class="tab on">
                    <div class="tab" :class="{on:tabTypeTwo==1}" @click="tabTypeTwo=1">
                        <div class="num">634个</div>
                        <div class="num">关注场所</div>
                    </div>
@@ -233,6 +233,8 @@
    data () {
        return {
            navType: 0,
            tabType: 0,
            tabTypeTwo: 0,
            houseLayerShow: true,
            carLayerShow: false,
            phoneLayerShow: false,
@@ -413,8 +415,6 @@
        this.houseList = houseList
    },
    mounted () {
        this.initPersonEcharts()
        this.initLandEcharts()
        this.initEquipmentEcharts()
        this.initEventChangeEcharts()
        this.initEventCountEcharts()
@@ -550,6 +550,8 @@
        })
    },
    updated () {
        this.initPersonEcharts(this.tabType)
        this.initLandEcharts(this.tabTypeTwo)
    },
    methods: {
        policeStationSelect (item, index) {
@@ -645,18 +647,37 @@
            this.navType = e.target.dataset.type
        },
        initPersonEcharts () {
        initPersonEcharts (type) {
            var chartDom = document.getElementById('PersonEcharts')
            var myChart = this.$echarts.init(chartDom)
            var option
            var xDate = []
            var yDate = []
            var xDate0 = ['车站派出所', '沙溪派出所', '灵溪派出所', '北门派出所', '江光派出所']
            var yDate0 = [881, 2211, 6414, 4321, 1232]
            var xDate1 = ['湖北', '上海', '北京', '广东', '浙江']
            var yDate1 = [6414, 4231, 2211, 1231, 881]
            var xDate2 = ['日本', '美国', '俄罗斯', '英国', '印度']
            var yDate2 = [881, 1231, 2211, 4321, 6414]
            if (type == 0) {
                xDate = xDate0
                yDate = yDate0
            } else if (type == 1) {
                xDate = xDate1
                yDate = yDate1
            } else {
                xDate = xDate2
                yDate = yDate2
            }
            option = {
                xAxis: {
                    type: 'category',
                    data: ['湖北', '上海', '北京', '广东', '浙江'],
                    data: xDate,
                    axisLabel: {
                        color: "#fff"
                        color: "#fff",
                        interval: 0
                    },
                    axisLine: {
                        lineStyle: {
@@ -675,7 +696,7 @@
                },
                series: [
                    {
                        data: [6414, 4231, 2211, 1231, 881],
                        data: yDate,
                        type: 'bar',
                        itemStyle: {
                            normal: {
@@ -705,9 +726,27 @@
            })
        },
        initLandEcharts () {
        initLandEcharts (type) {
            var chartDom = document.getElementById('LandEcharts')
            var myChart = this.$echarts.init(chartDom)
            var xDate = []
            var y1Date = []
            var y2Date = []
            var xDate0 = ['商业房屋', '居民住宅', '公共用房', '文化场所', '政府建筑']
            var y1Date0 = [88188, 1222211, 464104, 43201, 12302]
            var y2Date0 = [{ 'value': 1222211, 'realValue': 88188 }, { 'value': 1222211, 'realValue': 1222211 }, { 'value': 1222211, 'realValue': 464104 }, { 'value': 1222211, 'realValue': 43201 }, { 'value': 1222211, 'realValue': 12302 }]
            var xDate1 = ['公共场所', '学校教培', '机动车维修', '娱乐场所', '寄递业']
            var y1Date1 = [54, 77, 97, 141, 191]
            var y2Date1 = [{ 'value': 191, 'realValue': 54 }, { 'value': 191, 'realValue': 77 }, { 'value': 191, 'realValue': 97 }, { 'value': 191, 'realValue': 141 }, { 'value': 191, 'realValue': 191 }]
            if (type == 0) {
                xDate = xDate0
                y1Date = y1Date0
                y2Date = y2Date0
            } else {
                xDate = xDate1
                y1Date = y1Date1
                y2Date = y2Date1
            }
            var option
            option = {
@@ -730,7 +769,7 @@
                },
                yAxis: {
                    type: 'category',
                    data: ['公共场所', '学校教培', '机动车维修', '娱乐场所', '寄递业'],
                    data: xDate,
                    axisLine: {
                        show: false
                    },
@@ -743,19 +782,19 @@
                },
                series: [
                    {
                        data: [54, 77, 97, 141, 191],
                        data: y1Date,
                        type: 'bar',
                        zlevel: 2,
                    },
                    {
                        data: [{ 'value': 191, 'realValue': 54 }, { 'value': 191, 'realValue': 77 }, { 'value': 191, 'realValue': 97 }, { 'value': 191, 'realValue': 141 }, { 'value': 191, 'realValue': 191 }],
                        data: y2Date,
                        type: 'bar',
                        barGap: '-100%',
                        label: {
                            show: true,
                            color: '#fff',
                            position: 'right', // 标签右对齐
                            distance: 5,// 标签距离柱条的距离
                            distance: 0,// 标签距离柱条的距离
                            formatter: params => {
                                return params.data.realValue + '个'
                            }
@@ -1245,6 +1284,7 @@
                    flex: 1;
                    background: rgba(29, 38, 105, 1);
                    border: 1px solid rgba(20, 50, 123, 1);
                    cursor: pointer;
                    & > div {
                        height: 26px;