guanqb
2023-05-08 a8c6dfabddb4156f0334fb4e21cc2e2affb12e1d
首页颜色、图例数量显示、楼栋位置
2 files modified
25 ■■■■ changed files
src/views/home/components/leftContainer.vue 15 ●●●●● patch | view | raw | blame | history
src/views/house/index.vue 10 ●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue
@@ -164,7 +164,7 @@
const myLandColors = ['#4150d8', '#28bf7e', '#ed7c2f', '#f2a93b', '#f9cf36', '#4a5bdc', '#4cd698', '#f4914e', '#fcb75b', '#ffe180', '#b6c2ff', '#96edc1']
const peopleColor1 = '#53eefe'
const peopleColor2 = '#8b25c1'
const peopleColor2 = '#f26390'
export default {
    inject: ['userInfo'],
@@ -537,6 +537,19 @@
                        data: ['户籍人口', '实有人口'],
                        textStyle: {
                            color: '#fff'
                        },
                        formatter: function (name) {
                            var data = []
                            if (name == '户籍人口') {
                                data = options.series[0].data
                            } else {
                                data = options.series[1].data
                            }
                            var total = 0
                            for (var i = 0; i < data.length; i++) {
                                total += data[i].value
                            }
                            return `${name} (${total}人)`
                        }
                    },
                    series: [
src/views/house/index.vue
@@ -1397,11 +1397,17 @@
                    const homeCenter = this.$turf.centroid(this.$turf.polygon([polygon])).geometry.coordinates
                    // this.$EventBus.$emit("toPosition", {
                    //     siteJd: Number(homeCenter[0]) + 0.00006,
                    //     siteWd: Number(homeCenter[1]) - 0.00030,
                    //     siteGd: item.properties.szhfr + 240,
                    //     sitePitch: -80,
                    // })
                    this.$EventBus.$emit("toPosition", {
                        siteJd: Number(homeCenter[0]) + 0.00006,
                        siteWd: Number(homeCenter[1]) - 0.00030,
                        siteGd: item.properties.szhfr + 240,
                        sitePitch: -80,
                        siteGd: item.properties.szhfr + 40,
                        sitePitch: -45,
                    })
                    this.$EventBus.$emit("clearHouse3D")
                    this.$EventBus.$emit("showThreeDimensions", {