基于vue的可视化大屏开发

简介

业界解决方案

百度的 sugar 可视化解决方案

https://sugar.baidu.com/home

阿里datav

https://data.aliyun.com/visual/datav

腾讯云图

https://cloud.tencent.com/product/yuntu

尺寸

现在一般的大屏设计基本都是16:9 或者是 32:9的尺寸

设计稿

设计稿给出来的图也基本是16:9的图,1920*1080

自适应尺寸

按照设计稿来说1920*1080切图展示是没有问题的,但是一个还是需要兜底方案的,就是需要兼容其他尺寸的页面,所以需要一个自适应的方案

scale + margin 方案

就是dashboard 大屏的页面 设置 style="width: 1920px;height: 1080px;"
属性,然后通过 scale 缩放 来自适应。
外层通过 margin: 0 xxpx 实现居中展示。

<div class="wrapper">
    <div class="container">
        <div class="dashboard-bg-image"></div>
        <div :style="marginStyle">
            <div style="position: relative;">
                <div class="dashboard-container" style="width: 1920px;height: 1080px;" :style="transformStyle">
                    <top-title :title.sync="title"></top-title>
                    <!-- left -->
                    <dashboard1></dashboard1>
                    <!-- right -->
                    <dashboard2></dashboard2>
                    <!-- right -->
                    <dashboard3></dashboard3>
                    <!-- right -->
                    <dashboard4></dashboard4>
                </div>
            </div>
        </div>
    </div>
</div> 
.wrapper {
    height: 100%;
    width: 100%;
    position: relative;
}

.container {
    background-color: rgb(3, 12, 59);
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}


.dashboard-bg-image {
    width: 100%;
    height: 100%;
    position: absolute;
    background: url('../assets/bg2.jpg');
}

.dashboard-container {
    position: relative;
    user-select: none;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, .5);
    transition: all .3s linear;
    overflow: hidden;
}

github

https://github.com/bosscheng/big-dashboard

https://bosscheng.github.io/big-dashboard/

  • 10
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值