VUE大屏数据面板

​​​
基于VUE写的数据看板,有九个模块,分别为:订单总量(柱状图),生产概况(数字面板),企业宣传(轮播图),产品质量分析(饼状图),客户分布(地图且有标点信息),客户订单排行(上下滚动),企业利润分析(柱折线图),合格率分析(横柱状图),测试分析(双折线图)。项目打开npm install;npm run dev即可使用。数据可以动态赋予,本项目暂用的静态数据。

项目链接 https://download.csdn.net/download/qq_30258721/85762901
在这里插入图片描述
在这里插入图片描述

<template>
    <div ref="geoEcharts" class="geo-echart"></div>
</template>

<script>
import axios from 'axios'
const HTTP_GEOJSON = 'https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json';// 地图数据

export default {
  name: 'HelloWorld',
  data() {
    return {
      
    }
  },
  props: {
    geoData :{
      type: Array,
    },
    geoRegion :{
      type: Object,
    },
  },
  mounted(){
    this.initGeoEcharts(); // 客户分布模块
  },
  methods: {
    initGeoEcharts() {
      axios.get(HTTP_GEOJSON).then(res => {
         this.echarts.registerMap('china', res.data)
          this.$nextTick(() => {
            const map = this.echarts.init(this.$refs.geoEcharts, null, {renderer:'svg'})
            const option = {
              // 悬浮窗
              tooltip: {
                trigger: 'item',
                backgroundColor: '#0C134B',
                borderColor: '#007BE6',
                textStyle: { // 提示框浮层的文本样式。
                  color: '#fff',
                  fontStyle: 'normal',
                  fontWeight: 'normal',
                },
                formatter: function(params) {
                  return `
                    <div style="font-size: 16px; color: #10FBFF;">${params.name}</div>
                    <div>客户数量:${params.value[2]}<br>近半年产值:${params.value[3]}<br>总产值: ${params.value[4]}</div>
                  `
                },
                confine: true
              },
              // 图例
              visualMap: {
                min: 800,
                max: 100000,
                top: 100,
                left: 20,
                text: ['High', 'Low'],
                realtime: false,
                calculable: true,
                inRange: {
                    color: ['lightskyblue', 'yellow', 'orangered']
                },
                textStyle: {
                    color: this.FONT_COLOR,
                },
              },
              geo: {
                map: 'china',
                zoom: 1,
                roam: 'move',
                nameMap: this.geoRegion,
                label: {
                  show: true,
                  color: 'white',
                  position: "inside",
                  fontSize: 8,
                  rotate: 45
                },
                itemStyle: {  // 所有地图的区域颜色
                  areaColor: 'rgba(0,60,153,0.8)',
                  borderColor: '#02c0ff'
                },
                emphasis: {
                  itemStyle: {
                    areaColor: 'rgba(0,60,153,0.5)',
                    shadowColor: 'rgba(0,0,0,0.8)',
                    shadowBlur: 5,
                    shadowOffsetY: 5
                  }
                },
              },  
              // 数据
              series: {
                  type: 'scatter',
                  coordinateSystem: 'geo',
                  data: this.geoData,
                  SymbolSize: 4
                }
            }
            map.setOption(option)
          })
      })
    },
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
@import "../assets/css/style.css";
</style>

  • 2
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

攻城狮炭烤策划

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值