Browse Source

新增实时进出信息页面

master
[liang] 3 years ago
parent
commit
acf5e6ec22
  1. 44
      README.md
  2. BIN
      src/assets/img/brand/parkIngo.png
  3. 382
      src/components/seamless/index.vue
  4. 17
      src/views/Brand.vue
  5. 1
      vue.config.js

44
README.md

@ -1,38 +1,3 @@
# 前言
* 一个基于Vue前端框架和第三方图表库echarts构建的可视化大数据平台,通过vue项目构建、指令的灵活运用、组件封装、组件之间通信,使内部图表组件库可实现自由替换和组合。
* 项目中部分前端库采用外部CDN引入,可以减少打包文件体积,加快页面渲染。
* 可视化数据大屏展示对前端性能要求高,建议使用谷歌浏览器查看或开发,屏幕尺寸为1920px宽和1080px高是最佳效果。
* 目前制作数据可视化大屏,前端比较流行的第三方库有:Echarts(百度),AntV(阿里),Highcharts(国外公司),D3.js(国外公司)。
* 如果感觉还不错的话,老铁们是不是赏个★Star鼓励一哈,后续会持续更新和优化,也期待大家的交流。
[在线效果演示](https://jackchen0120.github.io/vueDataV/)
## 学习教程分上下篇
* [(上)Vue+Echarts构建可视化大数据平台实战项目分享](https://juejin.cn/post/6844904158181457933)
* [(下)Vue+Echarts构建大数据可视化酷炫展示公司品牌实战项目分享](https://juejin.cn/post/6845166890449371149)
# 效果截图
## 登录界面
<img src="https://github.com/jackchen0120/vueDataV/blob/master/public/img/login_0.png" width="900" alt="登录界面" />
<img src="https://github.com/jackchen0120/vueDataV/blob/master/public/img/login_1.png" width="900" alt="登录界面" />
<img src="https://github.com/jackchen0120/vueDataV/blob/master/public/img/login_2.png" width="900" alt="登录界面" />
## 首页酷屏统计图
<img src="https://github.com/jackchen0120/vueDataV/blob/master/public/img/dataV_1.png" width="900" alt="首页酷屏统计图" />
<img src="https://github.com/jackchen0120/vueDataV/blob/master/public/img/dataV_2.png" width="900" alt="首页酷屏统计图" />
<img src="https://github.com/jackchen0120/vueDataV/blob/master/public/img/dataV_3.png" width="900" alt="首页酷屏统计图" />
<img src="https://github.com/jackchen0120/vueDataV/blob/master/public/img/dataV_4.png" width="900" alt="首页酷屏统计图" />
## 公司品牌介绍
<img src="https://github.com/jackchen0120/vueDataV/blob/master/public/img/brand.png" width="900" alt="炫酷展示公司品牌" />
# 项目架构 # 项目架构
``` ```
@ -123,10 +88,8 @@
* 炫酷展示公司品牌 * 炫酷展示公司品牌
# 下载安装依赖 # 下载安装依赖
```
git clone https://github.com/jackchen0120/vueDataV.git npm install
cd vueDataV
npm install 或 yarn
``` ```
## 开发模式 ## 开发模式
@ -140,6 +103,3 @@ npm run serve
npm run build npm run build
``` ```
#### 获取更多项目实战经验及各种源码资源,请关注作者公众号:懒人码农
<img src="https://imgconvert.csdnimg.cn/aHR0cHM6Ly91c2VyLWdvbGQtY2RuLnhpdHUuaW8vMjAyMC81LzEzLzE3MjBlM2U0ZmQ5NDZiZDQ?x-oss-process=image/format,png" width="430" alt="公众号二维码" />

BIN
src/assets/img/brand/parkIngo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

382
src/components/seamless/index.vue

@ -1,201 +1,207 @@
<!--
描述: 新闻无缝滚动
作者: Jack Chen
日期: 2020-04-18
-->
<template> <template>
<div class="wrap-container sn-container"> <div class="sn">
<div class="sn-content"> <div class="sn-title">实时进出信息</div>
<div class="sn-title">新闻无缝滚动</div> <div class="sn-body">
<div class="sn-body"> <div class="table-header">
<div class="wrap-container"> <span style="width: 2rem">时间</span>
<span style="width: 3rem">停车场</span>
<div class="table"> <span style="width: 1rem">出入口</span>
<table border="0" cellpadding="0" cellspacing="0" class="table-header"> <span style="width: 1rem">车辆类型</span>
<tbody> <span style="width: 1.2rem">车牌号</span>
<tr> <span style="width: 0.8rem">收费金额</span>
<td width="60%"> <span style="width: 0.8rem">状态</span>
<span> </span> </div>
</td> <vue-seamless-scroll :data="listData" class="seamless-warp" :class-option="optionSetting">
<td width="20%"> <div class="line" v-for="(item, index) in listData" :key="index"
<span> </span> :class="item.accessType === '入场' ? 'in' : ''">
</td> <span style="width: 2rem">{{ item.createTime }}</span>
<td width="20%"> <span style="width: 3rem" class='title'>{{ item.parkName }}</span>
<span> </span> <span style="width: 1rem">{{ item.entranceChannel }}</span>
</td> <span style="width: 1rem">{{ item.carType }}</span>
</tr> <span style="width: 1.2rem">{{ item.plateNumber }}</span>
</tbody> <span style="width: 0.8rem">{{ item.orderRealPaidAmout }}</span>
</table> <span style="width: 0.8rem">{{ item.accessType }}</span>
</div>
<vue-seamless-scroll :data="listData" class="seamless-warp" :class-option="optionSetting"> </vue-seamless-scroll>
<table border="0" cellpadding="0" cellspacing="0" class="item"> </div>
<tbody> </div>
<tr v-for="(item, index) in listData" :key="index">
<td width="100%" class="title">
<span>{{ item.title }}</span>
</td>
<td width="20%">
<span>{{ item.date }}</span>
</td>
<td width="20%">
<span :class="{colorRed: item.hot > 4999, colorOrange: item.hot < 10}">{{ item.hot }}</span>
</td>
</tr>
</tbody>
</table>
</vue-seamless-scroll>
</div>
</div>
</div>
</div>
</div>
</template> </template>
<script> <script>
import vueSeamlessScroll from 'vue-seamless-scroll' import vueSeamlessScroll from 'vue-seamless-scroll'
export default { export default {
name: "seamless", name: "seamless",
components: { components: {
vueSeamlessScroll vueSeamlessScroll
}, },
data() { data() {
return { return {
listData: [{ rowColor: '/',
title: '钱花哪了?一图带你读懂年轻人的消费观', listData: [{
date: '2020-05-05', "accessType": "出场",
hot: 2306 "carType": "临时车",
}, { "parkName": "深圳宝安体育馆停车场",
title: '“五一”假期前三天国内旅游收入超350亿元', "createTime": "2022-08-03 18:01:59",
date: '2020-05-02', "plateNumber": "粤C3868Z",
hot: 5689 "entranceChannel": "前岗入口",
}, { "orderRealPaidAmout": 0
title: '滴滴、美团、哈啰交战,本地生活会是终局?', },
date: '2020-05-02', {
hot: 9 "accessType": "出场",
}, { "carType": "临时车",
title: '“互联网+文化”逆势上行文娱消费云端真精彩', "parkName": "深圳宝安体育馆停车场",
date: '2020-04-25', "createTime": "2022-08-03 18:01:54",
hot: 288 "plateNumber": "粤C2R537",
}, { "entranceChannel": "后岗入口",
title: '乐观还是悲观?巴菲特是个现实主义者!', "orderRealPaidAmout": 0
date: '2020-04-21', },
hot: 158 {
}, { "accessType": "入场",
title: 'B站的后浪,会把爱优腾拍在沙滩上吗?', "carType": "临时车",
date: '2020-04-20', "parkName": "深圳宝安体育馆停车场",
hot: 889 "createTime": "2022-08-03 18:01:30",
}, { "plateNumber": "粤C11R24",
title: '华为如何做投资的:先给两亿订单一年上市', "entranceChannel": "后岗入口",
date: '2020-04-01', "orderRealPaidAmout": 0.0
hot: 5800 },
}, { {
title: '马斯克:特斯拉股价太高了,我要卖豪宅', "accessType": "出场",
date: '2020-03-25', "carType": "临时车",
hot: 6 "parkName": "深圳宝安体育馆停车场",
}, { "createTime": "2022-08-03 18:00:32",
title: '人民日报海外版:云模式巧解“就业难”', "plateNumber": "粤CSP065",
date: '2020-03-16', "entranceChannel": "前岗入口",
hot: 88 "orderRealPaidAmout": 0
}, { },
title: '刚刚港股"崩了":狂跌近1000点!', {
date: '2020-03-12', "accessType": "入场",
hot: 88 "carType": "临时车",
}, { "parkName": "深圳宝安体育馆停车场",
title: '个人健康信息码国家标准发布', "createTime": "2022-08-03 18:00:19",
date: '2020-02-28', "plateNumber": "浙G16N8Z",
hot: 5 "entranceChannel": "前岗入口",
}, { "orderRealPaidAmout": 0.0
title: '传软银国际裁员约10%两名管理合伙人离职', },
date: '2020-02-15', {
hot: 258 "accessType": "出场",
}, { "carType": "临时车",
title: '27万个岗位:区块链、人工智能等专场招聘', "parkName": "深圳宝安体育馆停车场",
date: '2020-02-10', "createTime": "2022-08-03 17:58:55",
hot: 198 "plateNumber": "粤CYG167",
}, { "entranceChannel": "后岗入口",
title: '一季度电商发展势头迅猛农村电商破1300万家', "orderRealPaidAmout": 0
date: '2020-02-08', },
hot: 19 {
}] "accessType": "入场",
} "carType": "临时车",
}, "parkName": "深圳宝安体育馆停车场",
computed: { "createTime": "2022-08-03 17:58:38",
  optionSetting () { "plateNumber": "粤CYG167",
return { "entranceChannel": "后岗入口",
step: 0.5, // "orderRealPaidAmout": 6.0
limitMoveNum: 2, // this.dataList.length },
hoverStop: true, // stop {
direction: 1, // 0 1 2 3 "accessType": "入场",
// autoPlay: false, "carType": "免费车",
openWatch: true, // dom "parkName": "深圳宝安体育馆停车场",
singleHeight: 0, // (0) direction => 0/1 "createTime": "2022-08-03 17:57:55",
singleWidth: 0, // (0) direction => 2/3 "plateNumber": "粤C5N501",
waitTime: 1000 // (1000ms) "entranceChannel": "前岗入口",
} "orderRealPaidAmout": 0.0
} },
}, ]
mounted() { }
},
}, computed: {
methods: { optionSetting() {
return {
}, step: 0.5, //
beforeDestroy() { limitMoveNum: 2, // this.dataList.length
hoverStop: true, // stop
} direction: 1, // 0 1 2 3
// autoPlay: false,
openWatch: true, // dom
singleHeight: 0, // (0) direction => 0/1
singleWidth: 0, // (0) direction => 2/3
waitTime: 1000 // (1000ms)
}
}
},
mounted() {
},
methods: {
},
beforeDestroy() {
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.sn-container { .sn {
left: 1370px; position: absolute;
top: 110px; overflow: hidden;
%table-style { display: block;
width: 100%; width: 9.8rem;
height: 35px; height: 3.55rem;
table-layout: fixed; left: 7.1rem;
tr { top: 9.5375rem;
td { // top: 3.5375rem;
padding: 10px 5px;
text-align: center; .sn-title {
background-color: transparent; box-sizing: border-box;
white-space: nowrap; padding-left: 0.5rem;
overflow: hidden; height: 0.7rem;
color: #E2E5FF; line-height: 0.7rem;
font-size: 14px; font-size: 0.25rem;
} color: #fff;
} background: url(../../assets/img/brand/parkIngo.png);
} }
.table {
.table-header { .sn-body {
@extend %table-style; color: #6FA8FF;
} background-color: rgba($color: #0d2464, $alpha: 0.2);
.seamless-warp {
height: 400px; .table-header {
overflow: hidden; height: 0.6rem;
visibility: visible; line-height: 0.6rem;
.colorRed {
color: #FF4669; span {
} font-size: 0.2rem;
.colorOrange { text-align: center;
color: #FFC956; display: inline-block;
} }
.item { }
height: auto;
@extend %table-style; .seamless-warp {
tr { color: #EF8C62;
td { height: 400px;
&.title { overflow: hidden;
text-overflow: ellipsis; visibility: visible;
display: inline-block;
} .line {
} &:nth-child(2n) {
} background: rgba(14, 75, 255, 0.1);
} }
}
} span {
height: 0.45rem;
line-height: 0.45rem;
font-size: 0.175rem;
text-align: center;
display: inline-block;
}
}
.in {
color: #1BDB7F;
}
}
}
} }
</style> </style>

17
src/views/Brand.vue

@ -90,8 +90,8 @@
<span>今日交易金额</span> <span>今日交易金额</span>
</div> </div>
<div class="resume-bd"> <div class="resume-bd">
<countTo :startVal='startVal' :endVal='82388888' :duration='1500' separator=""></countTo> <countTo :startVal='startVal' :endVal='8388888' :duration='1500' separator=""></countTo>
<countTo :startVal='startVal' :endVal='65488888' :duration='1500' separator=""></countTo> <countTo :startVal='startVal' :endVal='6488888' :duration='1500' separator=""></countTo>
</div> </div>
</div> </div>
@ -101,6 +101,10 @@
<div class="map2"></div> <div class="map2"></div>
<div class="map3"></div> <div class="map3"></div>
</div> </div>
<div class="parkInfo">
<seamless />
</div>
</div> </div>
<div class="item right"> <div class="item right">
@ -567,7 +571,6 @@ export default {
.wrap { .wrap {
background: url(../assets/img/brand/bg.png) no-repeat #000; background: url(../assets/img/brand/bg.png) no-repeat #000;
background-size: cover; background-size: cover;
line-height: 1.15;
header { header {
position: relative; position: relative;
@ -625,7 +628,7 @@ export default {
.mainbox { .mainbox {
min-width: 1024px; min-width: 1024px;
max-width: 1920px; max-width: 1920px;
padding: 0.47rem 0.125rem 0; padding: 0.125rem 0.125rem 0;
display: flex; display: flex;
.item { .item {
@ -633,7 +636,6 @@ export default {
&.center { &.center {
flex: 5; flex: 5;
margin: 0 0.125rem 0.1rem;
overflow: hidden; overflow: hidden;
.resume { .resume {
@ -663,7 +665,6 @@ export default {
span { span {
margin-top: .25rem; margin-top: .25rem;
// border: .03rem solid rgba(63, 124, 163, 0.7);
box-shadow: 0rem .02rem .08rem rgba(38, 228, 245, 0.7); box-shadow: 0rem .02rem .08rem rgba(38, 228, 245, 0.7);
width: 3.535rem; width: 3.535rem;
text-align: center; text-align: center;
@ -696,14 +697,14 @@ export default {
.map { .map {
position: relative; position: relative;
height: 10.125rem; height: 8.4rem;
.chart { .chart {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 5; z-index: 5;
height: 10.125rem; height: 8.4rem;
width: 100%; width: 100%;
} }

1
vue.config.js

@ -4,6 +4,7 @@ module.exports = {
productionSourceMap: false, // 生产环境是否生成 sourceMap 文件 productionSourceMap: false, // 生产环境是否生成 sourceMap 文件
lintOnSave: false, lintOnSave: false,
devServer: { devServer: {
open: true,
port: 8081, port: 8081,
// proxy: { // proxy: {
// "/api": { // "/api": {

Loading…
Cancel
Save