Browse Source

修改收费top5,加分页

master
j1ack 3 years ago
parent
commit
83dd527872
  1. 70
      package-lock.json
  2. 2
      package.json
  3. 86
      src/App.vue
  4. 22
      src/api/form.js
  5. 1
      src/api/request.js
  6. 84
      src/assets/styles/common.scss
  7. 101
      src/components/Pagination/index.vue
  8. 201
      src/components/dynamicList/index.vue
  9. 3
      src/components/index.js
  10. 10
      src/components/ringPie/index.vue
  11. 20
      src/components/seamless/index.vue
  12. 614
      src/components/seamlessRank/index.vue
  13. 9
      src/main.js
  14. 42
      src/router/index.js
  15. 58
      src/utils/scroll-to.js
  16. 303
      src/views/Brand.vue

70
package-lock.json

@ -1905,6 +1905,11 @@
"integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==",
"dev": true
},
"amfe-flexible": {
"version": "2.2.1",
"resolved": "https://registry.npmmirror.com/amfe-flexible/-/amfe-flexible-2.2.1.tgz",
"integrity": "sha512-L2VfvDzoETBjhRptg5u/IUuzHSuxm22JpSRb404p/TBGeRfwWmmNEbB+TFPIP/sS/+pbM18bCFH9QnMojLuPNw=="
},
"ansi-colors": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz",
@ -2150,6 +2155,14 @@
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
"dev": true
},
"async-validator": {
"version": "1.8.5",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"requires": {
"babel-runtime": "6.x"
}
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz",
@ -2228,6 +2241,11 @@
"resolve": "^1.12.0"
}
},
"babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
},
"babel-loader": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz",
@ -2250,6 +2268,27 @@
"object.assign": "^4.1.0"
}
},
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npmmirror.com/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
},
"dependencies": {
"core-js": {
"version": "2.6.12",
"resolved": "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
}
}
},
"balanced-match": {
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz",
@ -4403,8 +4442,7 @@
"deepmerge": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
"dev": true
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
},
"default-gateway": {
"version": "5.0.5",
@ -4864,6 +4902,19 @@
"integrity": "sha512-i2QrQtHes5fK/F9QGG5XacM5WKEuR322fxTYF9e8O9Gu0mc0WmjjwGpV8c7Htso6Zf2Di18lc3SIPxmMeRFBug==",
"dev": true
},
"element-ui": {
"version": "2.15.9",
"resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.9.tgz",
"integrity": "sha512-dx45nQLt4Hn87/Z9eRr3ex6KFZbxlFAwEU3QoW3wA5EsYftvHTyL9Pq7VnXXD7hu1Eiaup2jcs6kp+/VSFmXuA==",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"normalize-wheel": "^1.0.1",
"resize-observer-polyfill": "^1.5.0",
"throttle-debounce": "^1.0.1"
}
},
"elliptic": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz",
@ -8184,6 +8235,11 @@
"integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==",
"dev": true
},
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz",
@ -10047,6 +10103,11 @@
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
"dev": true
},
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
@ -11417,6 +11478,11 @@
"neo-async": "^2.6.0"
}
},
"throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
},
"through": {
"version": "2.3.8",
"resolved": "http://registry.npm.taobao.org/through/download/through-2.3.8.tgz",

2
package.json

@ -9,10 +9,12 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"amfe-flexible": "^2.2.1",
"axios": "^0.27.2",
"core-js": "^3.6.4",
"dayjs": "^1.11.4",
"echarts": "^5.3.3",
"element-ui": "^2.15.9",
"loading-view-vue": "^1.0.3",
"screenfull": "^5.0.2",
"vue": "^2.6.11",

86
src/App.vue

@ -11,6 +11,92 @@ export default {
</script>
<style lang="scss">
.el-pagination__sizes {
margin: 0 0.125rem 0 0 !important;
font-weight: 400;
color: #606266;
}
.el-pager li {
padding: 0 0.05rem !important;
background: #FFF;
font-size: 0.1625rem !important;
min-width: 0.44375rem !important;
height: 0.35rem !important;
line-height: 0.35rem !important;
box-sizing: border-box;
}
.el-pagination button, .el-pagination span:not([class*=suffix]) {
display: inline-block;
font-size: 0.1625rem !important;
min-width: 0.44375rem !important;
height: 0.35rem !important;
line-height: 0.35rem !important;
vertical-align: top;
box-sizing: border-box;
}
.el-pagination__jump .el-input__inner {
padding: 0 0.0375rem !important;
}
.el-pagination__editor.el-input {
width: 0.625rem !important;
}
.el-pagination .el-select .el-input .el-input__inner {
padding-right: 0.3125rem !important;
border-radius: 3px;
}
.el-pagination__total {
margin-right: 0.125rem !important;
}
.el-input--mini .el-input__inner {
height: 0.35rem !important;
line-height: 0.35rem !important;
}
.el-pagination__jump {
margin-left: 0.3rem !important;
font-weight: 400;
color: #606266;
}
.el-pagination .el-select .el-input {
margin: 0 0.0625rem !important;
}
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li {
margin: 0 0.0625rem !important;
background-color: #f4f4f5;
color: #606266;
min-width: 0.375rem !important;
border-radius: 0.025rem !important;
}
.el-pagination__editor.el-input .el-input__inner {
height: 0.35rem !important;
}
.el-input--mini {
font-size: 0.15rem !important
}
.el-pagination .btn-next, .el-pagination .btn-prev {
background: center center no-repeat #FFF;
background-size: 0.2rem !important;
cursor: pointer;
margin: 0;
color: #303133;
}
.el-pagination {
white-space: nowrap;
padding: 0.025rem 0.0625rem !important;
color: #303133;
font-weight: 700;
}
.pagination-container{
display: flex;
justify-content: right;
padding: .4rem 3.5rem !important;
}
//
.twoPagePag {
bottom: 25px;
left: 20px;
z-index: 999;
}
.kong{
color: #fff;
font-size: .24rem;

22
src/api/form.js

@ -92,3 +92,25 @@ export const BiApi = {
},
}
/**
* 行政区域模块
*/
export const recursionAreasTree = {
// 行政区域树形关系
listInfo: (query) => {
return request({
url: '/pk/area/PkAreas/recursionAreasTree',
method: 'get',
params: query
})
},
// 获取单独省、市、县(区)下拉框
areaDropDown: (query) => {
return request({
url: '/pk/area/PkAreas/areaDropDown',
method: 'get',
params: query
})
}
}

1
src/api/request.js

@ -12,6 +12,7 @@ const service = axios.create({
// 超时
timeout: 30000
})
// request拦截器
service.interceptors.request.use(config => {
// get请求映射params参数

84
src/assets/styles/common.scss

@ -6,7 +6,7 @@
*/
.wrap-container {
position: absolute;
// position: absolute;
overflow: hidden;
display: block;
cursor: default;
@ -29,39 +29,39 @@
border-bottom-width: 0;
}
.sn-container {
position: absolute;
// position: absolute;
width: 500px;
height: 550px;
border: 2px solid rgba(92,255,255,0.1);
background: rgba(10,106,255,0.1) url(../../assets/img/wg.png) repeat 50% 50% !important;
background-blend-mode: screen;
overflow: visible;
&:before {
@extend %sn-container-before;
left: -2px;
border-left-width: 2px;
border-right-width: 0;
}
&:after {
@extend %sn-container-before;
right: -2px;
border-left-width: 0;
border-right-width: 2px;
}
// border: 2px solid rgba(92,255,255,0.1);
// background: rgba(10,106,255,0.1) url(../../assets/img/wg.png) repeat 50% 50% !important;
// background-blend-mode: screen;
// overflow: visible;
// &:before {
// @extend %sn-container-before;
// left: -2px;
// border-left-width: 2px;
// border-right-width: 0;
// }
// &:after {
// @extend %sn-container-before;
// right: -2px;
// border-left-width: 0;
// border-right-width: 2px;
// }
%sn-content-before {
content: "";
position: absolute;
bottom: -2px;
width: 5px;
height: 5px;
border-color: #0a6aff;
border-style: solid;
border-top-width: 0;
border-bottom-width: 2px;
// content: "";
// position: absolute;
// bottom: -2px;
// width: 5px;
// height: 5px;
// border-color: #0a6aff;
// border-style: solid;
// border-top-width: 0;
// border-bottom-width: 2px;
}
.sn-content {
position: absolute;
// position: absolute;
top: 0;
left: 0;
width: 100%;
@ -87,21 +87,23 @@
background: url(../../assets/img/sn-title.png) no-repeat 0% 0%;
}
}
&:before {
@extend %sn-content-before;
left: -2px;
border-left-width: 2px;
border-right-width: 0;
}
&:after {
@extend %sn-content-before;
right: -2px;
border-left-width: 0;
border-right-width: 2px;
}
// &:before {
// @extend %sn-content-before;
// left: -2px;
// border-left-width: 2px;
// border-right-width: 0;
// }
// &:after {
// @extend %sn-content-before;
// right: -2px;
// border-left-width: 0;
// border-right-width: 2px;
// }
.sn-body {
position: absolute;
// position: absolute;
width: 100%;
height: 100%;
top: 40px;
left: 0;
right: 0;

101
src/components/Pagination/index.vue

@ -0,0 +1,101 @@
<template>
<div :class="{'hidden':hidden}" class="pagination-container">
<el-pagination
:background="background"
:current-page.sync="currentPage"
:page-size.sync="pageSize"
:layout="layout"
:page-sizes="pageSizes"
:total="total"
v-bind="$attrs"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import { scrollTo } from '@/utils/scroll-to'
export default {
name: 'Pagination',
props: {
total: {
required: true,
type: Number
},
page: {
type: Number,
default: 1
},
limit: {
type: Number,
default: 20
},
pageSizes: {
type: Array,
default() {
return [5, 20, 50, 100, 200 , 500]
}
},
layout: {
type: String,
default: 'total, sizes, prev, pager, next, jumper'
},
background: {
type: Boolean,
default: true
},
autoScroll: {
type: Boolean,
default: true
},
hidden: {
type: Boolean,
default: false
}
},
computed: {
currentPage: {
get() {
return this.page
},
set(val) {
this.$emit('update:page', val)
}
},
pageSize: {
get() {
return this.limit
},
set(val) {
this.$emit('update:limit', val)
}
}
},
methods: {
handleSizeChange(val) {
this.$emit('pagination', { page: this.currentPage, limit: val })
if (this.autoScroll) {
scrollTo(0, 800)
}
},
handleCurrentChange(val) {
this.$emit('pagination', { page: val, limit: this.pageSize })
if (this.autoScroll) {
scrollTo(0, 800)
}
}
}
}
</script>
<style scoped>
.pagination-container {
background: #fff;
padding: 32px 16px;
}
.pagination-container.hidden {
display: none;
}
</style>

201
src/components/dynamicList/index.vue

@ -1,11 +1,10 @@
<template>
<div class="wrap-container sn-container">
<div class="sn-content">
<div class="sn-title">动态列表</div>
<div class="sn-body">
<div class="wrap-container pd-info">
<div class="sn-container">
<div class="sn-content">
<div class="sn-body">
<div class="pd-info">
<div class="pd-info-center">
<div class="y-center">
<div class="info-1-0 animated infinite rotateF"></div>
@ -19,7 +18,7 @@
<div class="y-number-bg animated infinite rotate"></div>
<div class="y-number-icon"></div>
<div class="y-number-text">
<span>区块链</span>
<span>临时车</span>
<span id="number1" class="odometer odometer-theme-digital">
<div class="odometer-inside">
<span class="odometer-digit">
@ -28,7 +27,8 @@
<span class="odometer-ribbon">
<span class="odometer-ribbon-inner">
<span class="odometer-value">
<countTo :startVal='startVal' :endVal='12356' :duration='6000' separator=""></countTo>
<countTo :startVal='startVal' :endVal='chartData.temporaryCarNum' :duration='6000'
separator=""></countTo>
</span>
</span>
</span>
@ -43,7 +43,7 @@
<div class="y-number-bg animated infinite rotateF"></div>
<div class="y-number-icon"></div>
<div class="y-number-text">
<span>大数据</span>
<span>月卡车</span>
<span id="number2" class="odometer odometer-theme-digital">
<div class="odometer-inside">
<span class="odometer-digit">
@ -52,7 +52,8 @@
<span class="odometer-ribbon">
<span class="odometer-ribbon-inner">
<span class="odometer-value">
<countTo :startVal='startVal' :endVal='65321' :duration='6000' separator=""></countTo>
<countTo :startVal='startVal' :endVal='chartData.yueZuCheNum' :duration='6000'
separator=""></countTo>
</span>
</span>
</span>
@ -67,7 +68,7 @@
<div class="y-number-bg animated infinite rotateF"></div>
<div class="y-number-icon"></div>
<div class="y-number-text">
<span>云计算</span>
<span>免费车</span>
<span id="number3" class="odometer odometer-theme-digital">
<div class="odometer-inside">
<span class="odometer-digit">
@ -76,7 +77,8 @@
<span class="odometer-ribbon">
<span class="odometer-ribbon-inner">
<span class="odometer-value">
<countTo :startVal='startVal' :endVal='8686' :duration='6000' separator=""></countTo>
<countTo :startVal='startVal' :endVal='chartData.freeCarNum' :duration='6000'
separator=""></countTo>
</span>
</span>
</span>
@ -91,7 +93,7 @@
<div class="y-number-bg animated infinite rotate"></div>
<div class="y-number-icon"></div>
<div class="y-number-text">
<span>人工智能</span>
<span>绿牌车</span>
<span id="number4" class="odometer odometer-theme-digital">
<div class="odometer-inside">
<span class="odometer-digit">
@ -100,7 +102,8 @@
<span class="odometer-ribbon">
<span class="odometer-ribbon-inner">
<span class="odometer-value">
<countTo :startVal='startVal' :endVal='258' :duration='6000' separator=""></countTo>
<countTo :startVal='startVal' :endVal='chartData.greenCarNum' :duration='6000'
separator=""></countTo>
</span>
</span>
</span>
@ -112,9 +115,9 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
@ -126,53 +129,75 @@ export default {
components: {
countTo
},
props: {
chartData: {
required: true,
},
},
data() {
return {
startVal: 0
}
},
watch: {
chartData: {
handler: function (val) {
val.freeCarNum = parseInt(val.freeCarNum)
val.greenCarNum = parseInt(val.greenCarNum)
val.temporaryCarNum = parseInt(val.temporaryCarNum)
val.yueZuCheNum = parseInt(val.yueZuCheNum)
},
deep: true
}
},
mounted() {
setTimeout(() => {
}, 800);
},
methods: {
},
beforeDestroy() {
}
};
</script>
<style lang="scss" scoped>
.sn-container {
left: 50px;
top: 2408px;
width: 560px;
height: 400px;
width: 100%;
height: 3rem;
margin-top: .1rem;
.pd-info {
left: 0;
top: 35px;
width: 100%;
height: 80%;
height: 100%;
}
.pd-info-center {
width: 100%;
height: 100%;
.y-center {
position: absolute;
top: 16px;
left: 30px;
width: 234px;
height: 234px;
> [class^=info-1] {
width: 2.1rem;
height: 2.1rem;
left: .5rem;
top: 1.1rem;
>[class^=info-1] {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
top: 0rem;
left: 0rem;
background-repeat: no-repeat;
background-position: center center;
}
.info-1-0 {
background-image: url(../../assets/img/dynamic/info-1-0.png);
-webkit-animation-duration: 20s;
@ -180,6 +205,7 @@ export default {
-o-animation-duration: 20s;
animation-duration: 20s;
}
.info-1-1 {
background-image: url(../../assets/img/dynamic/info-1-1.png);
-webkit-animation-duration: 20s;
@ -191,6 +217,7 @@ export default {
-o-animation-delay: 3s;
animation-delay: 3s;
}
.info-1-2 {
background-image: url(../../assets/img/dynamic/info-1-2.png);
-webkit-animation-duration: 20s;
@ -202,6 +229,7 @@ export default {
-o-animation-delay: 8s;
animation-delay: 8s;
}
.info-1-3 {
background-image: url(../../assets/img/dynamic/info-1-3.png);
-webkit-animation-duration: 10s;
@ -213,6 +241,7 @@ export default {
-o-animation-delay: 5s;
animation-delay: 5s;
}
.info-1-4 {
background-image: url(../../assets/img/dynamic/info-1-4.png);
-webkit-animation-duration: 5s;
@ -224,39 +253,44 @@ export default {
.y-number {
position: absolute;
left: 0;
padding-left: 290px;
left: -0.4rem;
padding-left: 3.7rem;
-webkit-animation-timing-function: cubic-bezier(1, 0, 0.6, 0.6);
-moz-animation-timing-function: cubic-bezier(1, 0, 0.6, 0.6);
-o-animation-timing-function: cubic-bezier(1, 0, 0.6, 0.6);
animation-timing-function: cubic-bezier(1, 0, 0.6, 0.6);
.y-number-bg {
width: 54px;
height: 54px;
width: 0.675rem;
height: 0.675rem;
position: absolute;
top: 5px;
top: 0.0625rem;
-webkit-animation-duration: 5s;
-moz-animation-duration: 5s;
-o-animation-duration: 5s;
animation-duration: 5s;
}
.y-number-icon {
width: 54px;
height: 54px;
width: 0.675rem;
height: 0.675rem;
position: absolute;
top: 5px;
top: 0.0625rem;
}
.y-number-text {
display: inline-block;
color: #0072bc;
font-size: 18px;
padding: 10px 0 0 60px;
> span {
font-size: 0.225rem;
padding: 0.125rem 0 0 0.75rem;
>span {
display: block;
&:nth-child(2) {
font-size: 22px;
font-size: 0.275rem;
color: #00aeef;
line-height: 28px;
line-height: 0.35rem;
padding: 0;
background: transparent;
}
@ -268,9 +302,11 @@ export default {
-moz-animation-delay: 1s;
-o-animation-delay: 1s;
animation-delay: 1s;
background: url(../../assets/img/dynamic/info-line-01.png) no-repeat 180px center;
height: 60px;
top: 15px;
background: url(../../assets/img/dynamic/info-line-01.png) no-repeat 2.25rem center;
height: 0.75rem;
top: .8rem;
background-size: 2rem;
.y-number-bg {
-webkit-animation-delay: 2s;
-moz-animation-delay: 2s;
@ -278,19 +314,23 @@ export default {
animation-delay: 2s;
background: url(../../assets/img/dynamic/info-bg-01.png) no-repeat 50% 50%;
}
.y-number-icon {
background: url(../../assets/img/dynamic/info-icon-1.png) no-repeat 50% 50%;
}
}
&.y-number-2 {
-webkit-animation-delay: 1.25s;
-moz-animation-delay: 1.25s;
-o-animation-delay: 1.25s;
animation-delay: 1.25s;
background: url(../../assets/img/dynamic/info-line-02.png) no-repeat 180px center;
height: 60px;
top: 70px;
padding-left: 350px;
background: url(../../assets/img/dynamic/info-line-02.png) no-repeat 2.25rem center;
height: 0.75rem;
top: 1.6rem;
padding-left: 4.6rem;
background-size: 3rem;
.y-number-bg {
-webkit-animation-delay: 2.5s;
-moz-animation-delay: 2.5s;
@ -298,19 +338,23 @@ export default {
animation-delay: 2.5s;
background: url(../../assets/img/dynamic/info-bg-02.png) no-repeat 50% 50%;
}
.y-number-icon {
background: url(../../assets/img/dynamic/info-icon-2.png) no-repeat 50% 50%;
}
}
&.y-number-3 {
-webkit-animation-delay: 1.5s;
-moz-animation-delay: 1.5s;
-o-animation-delay: 1.5s;
animation-delay: 1.5s;
background: url(../../assets/img/dynamic/info-line-02.png) no-repeat 180px center;
height: 60px;
top: 135px;
padding-left: 350px;
background: url(../../assets/img/dynamic/info-line-02.png) no-repeat 2.25rem center;
height: 0.75rem;
top: 2.4rem;
padding-left: 4.6rem;
background-size: 3rem;
.y-number-bg {
-webkit-animation-delay: 3s;
-moz-animation-delay: 3s;
@ -318,18 +362,22 @@ export default {
animation-delay: 3s;
background: url(../../assets/img/dynamic/info-bg-03.png) no-repeat 50% 50%;
}
.y-number-icon {
background: url(../../assets/img/dynamic/info-icon-3.png) no-repeat 50% 50%;
}
}
&.y-number-4 {
-webkit-animation-delay: 1.75s;
-moz-animation-delay: 1.75s;
-o-animation-delay: 1.75s;
animation-delay: 1.75s;
background: url(../../assets/img/dynamic/info-line-01.png) no-repeat 180px center;
height: 60px;
top: 190px;
background: url(../../assets/img/dynamic/info-line-01.png) no-repeat 2.25rem center;
height: 0.75rem;
top: 3.1rem;
background-size: 2rem;
.y-number-bg {
-webkit-animation-delay: 3.5s;
-moz-animation-delay: 3.5s;
@ -337,6 +385,7 @@ export default {
animation-delay: 3.5s;
background: url(../../assets/img/dynamic/info-bg-04.png) no-repeat 50% 50%;
}
.y-number-icon {
background: url(../../assets/img/dynamic/info-icon-4.png) no-repeat 50% 50%;
}
@ -367,6 +416,7 @@ export default {
-o-animation-fill-mode: both;
animation-fill-mode: both;
}
.animated.infinite {
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
@ -381,6 +431,7 @@ export default {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform-origin: center;
transform-origin: center;
@ -398,6 +449,7 @@ export default {
-moz-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform-origin: center;
-moz-transform-origin: center;
@ -417,6 +469,7 @@ export default {
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform-origin: center;
-o-transform-origin: center;
@ -438,6 +491,7 @@ export default {
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform-origin: center;
-moz-transform-origin: center;
@ -517,14 +571,17 @@ export default {
}
@-webkit-keyframes flashPD {
0%,
90% {
opacity: 1;
}
92%,
98% {
opacity: 0;
}
96%,
100% {
opacity: 1;
@ -532,14 +589,17 @@ export default {
}
@-moz-keyframes flashPD {
0%,
90% {
opacity: 1;
}
92%,
98% {
opacity: 0;
}
96%,
100% {
opacity: 1;
@ -547,14 +607,17 @@ export default {
}
@-o-keyframes flashPD {
0%,
90% {
opacity: 1;
}
92%,
98% {
opacity: 0;
}
96%,
100% {
opacity: 1;
@ -562,14 +625,17 @@ export default {
}
@keyframes flashPD {
0%,
90% {
opacity: 1;
}
92%,
98% {
opacity: 0;
}
96%,
100% {
opacity: 1;
@ -582,19 +648,4 @@ export default {
-o-animation-name: flashPD;
animation-name: flashPD;
}
</style>

3
src/components/index.js

@ -3,6 +3,8 @@ import bgAnimation from './bgAnimation' // 登录界面背景图动画
import modal from './modal' // 自定义全局模态框
import sinan from './sinan' // 司南排名图
import seamless from './seamless' // 新闻无缝滚动
import seamlessRank from './seamlessRank' // 新闻无缝滚动
import pyramid from './pyramid' // 金字塔动画
import scrollArc from './scrollArc' // 滚动弧形线
import szBar from './szBar' // 双轴柱状图
@ -39,6 +41,7 @@ const components = {
modal,
sinan,
seamless,
seamlessRank,
pyramid,
scrollArc,
szBar,

10
src/components/ringPie/index.vue

@ -48,8 +48,12 @@ export default {
this.chartData.parkingPlaceUseNums=0
this.chartData.parkingPlaceTotalNums=1
}
this.dataRate=this.chartData.parkingPlaceUseNums/this.chartData.parkingPlaceTotalNums
this.dataRate=Math.round(this.dataRate*100)
if(!this.chartData.parkingPlaceTurnover){
this.chartData.parkingPlaceTurnover=0
}
// this.dataRate=this.chartData.parkingPlaceUseNums/this.chartData.parkingPlaceTotalNums
// this.dataRate=Math.round(this.dataRate*100)
this.dataRate=this.chartData.parkingPlaceTurnover
this.shenRate=100-this.dataRate
this.getEchart();
}, 800);
@ -58,6 +62,8 @@ export default {
chartData: {
deep: true,
handler: function () {
this.dataRate=this.chartData.parkingPlaceTurnover
this.shenRate=100-this.dataRate
this.getEchart()
}
}

20
src/components/seamless/index.vue

@ -5,7 +5,7 @@
<div class="table-header">
<span style="width: 2rem">时间</span>
<span style="width: 3rem">停车场</span>
<span style="width: 1.2rem">出入口</span>
<span style="width: 1.2rem">通道</span>
<span style="width: 1rem">车辆类型</span>
<span style="width: 1.1rem">车牌号</span>
<span style="width: 0.9rem">收费金额</span>
@ -15,8 +15,12 @@
<div class="line" v-for="(item, index) in listData" :key="index"
:class="item.accessType === '入场' ? 'in' : ''">
<span style="width: 2rem">{{ item.createTime }}</span>
<span style="width: 3rem" class='title'>{{ item.parkName }}</span>
<span style="width: 1.2rem">{{ item.entranceChannel }}</span>
<el-tooltip class="item" effect="dark" :content="item.parkName" placement="top">
<span style="width: 3rem" class='title'>{{ item.parkName }}</span>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="item.entranceChannel" placement="top">
<span style="width: 1.2rem" class='title'>{{ item.entranceChannel }}</span>
</el-tooltip>
<span style="width: 0.9rem">{{ item.carType }}</span>
<span style="width: 1.2rem">{{ item.plateNumber }}</span>
<span style="width: 0.9rem">{{ item.orderRealPaidAmout }}</span>
@ -67,6 +71,12 @@ export default {
</script>
<style lang="scss" scoped>
.title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sn {
position: absolute;
overflow: hidden;
@ -110,6 +120,10 @@ export default {
visibility: visible;
.line {
display: flex;
height: .6rem;
line-height: .6rem;
align-items: center;
&:nth-child(2n) {
background: rgba(14, 75, 255, 0.1);
}

614
src/components/seamlessRank/index.vue

@ -0,0 +1,614 @@
<template>
<div class="sn" :class="show ? 'sn_show' : ''">
<!-- 1 -->
<!-- <div v-if="!show">
<el-collapse @change="handleChange">
<el-collapse-item title="今日收费TOP5" name="1">
<div>
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="0.5rem" >
<el-form-item label="省份" prop="province">
<el-select v-model="queryParams.province" placeholder="请选择省份" clearable size="small"
@change="areaDropDown">
<el-option v-for="(item, i) in provinceOption" :key="i" :label="item.label" :value="item.label">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="城市" prop="city">
<el-select v-model="queryParams.city" placeholder="请选择城市" clearable size="small" @change="areaDropDown">
<el-option v-for="(item, i) in cityOption" :key="i" :label="item.label" :value="item.label">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="区域" prop="county">
<el-select v-model="queryParams.county" placeholder="请选择区域" clearable size="small">
<el-option v-for="(item, i) in countyOption" :key="i" :label="item.label" :value="item.label">
</el-option>
</el-select>
</el-form-item>
<div class="search">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</div>
</el-form>
</div>
</el-collapse-item>
</el-collapse>
<div class="sn-body">
<div class="table-header">
<span style="width: 1rem">排行</span>
<span style="width: 2rem">停车场名称</span>
<span style="width: 2.1rem">收费金额</span>
<span style="width: .8rem">操作</span>
</div>
<vue-seamless-scroll :data="listData2" class="seamless-warp" :class-option="optionSetting">
<div class="line" v-for="(item, index) in listData2" :key="index"
:class="item.accessType === '入场' ? 'in' : ''">
<span class="td" v-if="index == 0" style="width: 1rem"><img src="/img/img3.png" alt=""></span>
<span class="td" v-if="index == 1" style="width: 1rem"><img src="/img/img4.png" alt=""></span>
<span class="td" v-if="index == 2" style="width: 1rem"><img src="/img/img5.png" alt=""></span>
<span class="td" v-if="index == 3" style="width: 1rem"><img src="/img/img6.png" alt=""></span>
<span class="td" v-if="index == 4" style="width: 1rem"><img src="/img/img7.png" alt=""></span>
<el-tooltip class="item" effect="dark" :content="item.parkingInfoName" placement="top">
<span style="width: 2rem" class='title'>{{ item.parkingInfoName }}</span>
</el-tooltip>
<span style="width: 2.1rem">{{ item.totalAmount }}</span>
<span style="width: .8rem" @click="toGo(item, index)">详情</span>
</div>
</vue-seamless-scroll>
</div>
</div> -->
<!-- 2 -->
<div>
<el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item title="今日收费TOP5" name="1">
<div>
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="0.5rem">
<el-form-item label="省份" prop="province">
<el-select v-model="queryParams.province" placeholder="请选择省份" clearable size="small"
@change="areaDropDown">
<el-option v-for="(item, i) in provinceOption" :key="i" :label="item.label" :value="item.label">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="城市" prop="city">
<el-select v-model="queryParams.city" placeholder="请选择城市" clearable size="small" @change="areaDropDown">
<el-option v-for="(item, i) in cityOption" :key="i" :label="item.label" :value="item.label">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="区域" prop="county">
<el-select v-model="queryParams.county" placeholder="请选择区域" clearable size="small">
<el-option v-for="(item, i) in countyOption" :key="i" :label="item.label" :value="item.label">
</el-option>
</el-select>
</el-form-item>
<div class="search">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
<el-button type="warning" icon="el-icon-refresh" size="small" @click="toGo('', '', false)">查看全部
</el-button>
</div>
</el-form>
</div>
</el-collapse-item>
</el-collapse>
<div class="sn-body">
<div class="table-header">
<span style="width: 1rem">排行</span>
<span style="width: 2rem">停车场名称</span>
<span style="width: 2.1rem">收费金额</span>
<span style="width: .8rem">操作</span>
</div>
<div class="seamless-warp" :class="show ? 'sn_scroll' : ''">
<div class="line" v-for="(item, index) in listData2" :key="index"
:class="item.accessType === '入场' ? 'in' : ''">
<span class="td" v-if="index == 0" style="width: 1rem"><img src="/img/img3.png" alt=""></span>
<span class="td" v-if="index == 1" style="width: 1rem"><img src="/img/img4.png" alt=""></span>
<span class="td" v-if="index == 2" style="width: 1rem"><img src="/img/img5.png" alt=""></span>
<span class="td" v-if="index == 3" style="width: 1rem"><img src="/img/img6.png" alt=""></span>
<span class="td" v-if="index == 4" style="width: 1rem"><img src="/img/img7.png" alt=""></span>
<el-tooltip class="item" effect="dark" :content="item.parkingInfoName" placement="top">
<span style="width: 2rem" class='title'>{{ item.parkingInfoName }}</span>
</el-tooltip>
<span style="width: 2.1rem">{{ item.totalAmount }}</span>
<span style="width: .8rem" @click="toGo(item, index, true)">详情</span>
</div>
</div>
</div>
<el-col :span="23" class="twoPagePag">
<pagination v-show="total > 0 && activeNames.length>0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
</el-col>
</div>
</div>
</template>
<script>
import vueSeamlessScroll from 'vue-seamless-scroll'
import { BiApi, recursionAreasTree } from "@/api/form";
export default {
name: "seamlessRank",
props: {
listData2: {
type: Array,
default() {
return []
}
},
authCode: {
type: String,
default() {
return ''
}
},
total: {
default() {
return 0
}
}
},
components: {
vueSeamlessScroll
},
watch: {
'listData2': {
deep: true,
handler: function (newV, oldV) {
console.log('watch中:', newV, oldV)
}
}
},
data() {
return {
activeNames: [],
i: 2,
show: true,
//
provinceOption: [],
//
cityOption: [],
//
countyOption: [],
//
queryParams: {
province: null,
city: null,
county: null,
authCode: null,
pageNum: 1,
pageSize: 5,
},
optionSetting: {
step: 0.5, //
limitMoveNum: this.listData2.length, // this.dataList.length
hoverStop: false, // stop
direction: 0, // 0 1 2 3
autoPlay: true,
openWatch: true, // dom
singleHeight: 0, // (0) direction => 0/1
singleWidth: 0, // (0) direction => 2/3
waitTime: 1000 // (1000ms)
}
}
},
computed: {
},
mounted() {
this.areaDropDown()
},
created() {
},
methods: {
toGo(item, index, type) {
if (type) {
this.activeNames = [];
this.$emit("passfunction", item.pkParkingInfoId)
} else {
//
this.activeNames = [];
this.reset()
this.$emit("passfunction", '')
}
},
handleChange(val) {
this.activeNames = val;
},
reset() {
this.queryParams = {
province: null,
city: null,
county: null,
authCode: null,
pageNum: 1,
pageSize: 5,
}
},
// -
getList() {
this.queryParams.authCode = this.authCode
BiApi.getParkingRanking(this.queryParams).then((res) => {
if (res && res.code === 200) this.$emit('changeMsg', res.rows, Number(res.total), true)
})
},
/** 重置按钮操作 */
resetQuery() {
this.cityOption = [];
this.countyOption = [];
//
this.reset()
this.queryParams.authCode = this.authCode
BiApi.getParkingRanking(this.queryParams).then((res) => {
if (res && res.code === 200) this.$emit('changeMsg', res.rows, Number(res.total), false)
})
},
/** 搜索按钮操作 */
handleQuery() {
this.activeNames = [];
this.getList();
},
//
setProp() {
this.prop = {
lazy: true,
lazyLoad: (node, resolve) => {
let level = 2;
setTimeout(() => {
if (node.level == 0) {
recursionAreasTree
.areaDropDown()
.then((res) => {
// map
const cities = res.map((value) => ({
treeId: value.value,
value: value.label,
label: value.label,
leaf: node.level >= level,
}));
// resolve
resolve(cities);
})
.catch((err) => {
console.log(err);
});
}
if (node.level != 0) {
let obj = {
parentId: node.data.treeId,
};
recursionAreasTree
.areaDropDown(obj)
.then((res) => {
const areas = res.map((value) => ({
treeId: value.value,
value: value.label,
label: value.label,
leaf: node.level >= level,
}));
// console.log(areas);
if (node.level == 2) {
this.areasList = [...areas];
console.log(this.areasList);
}
// resolve
resolve(areas);
})
.catch((err) => {
console.log(err);
});
}
}, 100);
},
};
},
// ()
areaDropDown(e) {
if (this.queryParams.province) {
if (this.queryParams.city) {
e = this.cityOption.filter(item => item.label === e)[0].value
} else {
e = this.provinceOption.filter(item => item.label === e)[0].value
}
}
if (!this.queryParams.province) {
this.queryParams.city = null;
this.queryParams.county = null;
this.cityOption = [];
this.countyOption = [];
} else if (!this.queryParams.city) {
this.queryParams.county = null;
this.countyOption = [];
}
let query = {
parentId: e,
};
recursionAreasTree.areaDropDown(query).then((response) => {
if (!e) {
this.provinceOption = response;
} else if (e % 10000 == 0) {
this.queryParams.city = null;
this.queryParams.county = null;
this.cityOption = response;
} else {
this.queryParams.county = null;
this.countyOption = response;
}
});
},
},
beforeDestroy() {
}
};
</script>
<style lang="scss" scoped>
::-webkit-scrollbar-corner{
display: none !important;
}
.sn_scroll {
// overflow: scroll !important;
}
.twoPagePag {
position: static !important;
}
.pagination-container {
background: none !important;
padding: 0 0 !important;
}
::v-deep .el-pagination__total {
color: #fff !important;
}
::v-deep .el-pagination__jump {
color: #fff !important;
}
.sn_show {
position: relative !important;
z-index: 999 !important;
overflow: visible !important;
}
.sn_show .sn .sn-body {
color: #6FA8FF;
background-color: rgba(13, 36, 100, 0.2);
position: relative;
z-index: 999;
}
.title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.search {
display: flex;
justify-content: left;
margin-left: .5rem;
}
::v-deep .el-input__inner {
background: none;
border-color: #5A7FFF;
color: #fff !important;
}
::v-deep .el-form--inline .el-form-item__label {
color: #fff;
}
::v-deep .el-collapse-item__wrap {
border-bottom: none;
}
::v-deep .el-collapse-item__content {
background-color: #071643;
}
::v-deep .el-form--inline .el-form-item__content {
width: 1.4rem;
}
::v-deep .el-form-item {
margin-bottom: 0;
margin-right: 0 !important;
width: 2rem;
}
::v-deep .el-form--inline .el-form-item__label {
font-size: 0.18rem !important;
text-align: center !important;
padding-right: 0;
}
::v-deep .el-collapse {
border: none;
}
::v-deep .el-collapse-item__header {
box-sizing: border-box;
padding-left: 0.5rem;
height: 0.7rem;
line-height: 0.7rem;
font-size: 0.25rem;
color: #fff;
background: url(../../assets/img/brand/parkIngo.png) no-repeat;
background-size: 9.8rem 0.7rem;
border: none;
}
::v-deep .el-input--small .el-input__inner {
height: 0.4rem;
line-height: 0.4rem;
}
.line {
display: flex;
align-items: center;
height: .41rem;
line-height: .41rem;
}
.td {
color: #fff;
text-align: center;
border: none;
font-size: 0.14rem;
img {
width: 0.4rem;
display: block;
margin: 0 auto;
height: 0.4rem;
// margin-top: .1rem;
}
}
.topBg {
height: 0.7rem;
background: url(/img/img1.png) no-repeat;
background-size: contain;
display: flex;
align-items: center;
padding-left: 0.5rem;
color: #aeceff;
font-size: 0.21rem;
}
.left-top {
height: 3.5rem;
position: relative;
background: url(/img/img2.png) no-repeat;
background-size: cover;
margin-bottom: 0.5rem;
}
.tbody .tr:nth-child(odd) {
background: #06184b;
}
//
.table {
width: 100%;
border-spacing: 0;
border-color: transparent;
.thead {
background: #061131;
width: 100%;
height: 0.575rem;
line-height: 0.575rem;
font-size: 0.2rem;
.td {
color: #6fa8ff;
text-align: center;
border: none;
font-size: 0.2rem;
}
}
.tbody {
width: 100%;
.td {
color: #fff;
text-align: center;
border: none;
font-size: 0.14rem;
img {
width: 0.4rem;
display: block;
margin: 0 auto;
height: 0.4rem;
}
}
.tr {
width: 100%;
height: 0.5rem;
line-height: 0.5rem;
}
}
}
.sn {
// position: absolute;
overflow: hidden;
display: block;
width: 6.3rem;
// height: 3.5rem;
margin-bottom: 0.5rem;
.sn-title {
box-sizing: border-box;
padding-left: 0.5rem;
height: 0.7rem;
line-height: 0.7rem;
font-size: 0.25rem;
color: #fff;
background: url(../../assets/img/brand/parkIngo.png) no-repeat;
background-size: 9.8rem 0.7rem;
}
.sn-body {
color: #6FA8FF;
background-color: rgba($color: #0d2464, $alpha: 0.2);
.table-header {
height: 0.6rem;
line-height: 0.6rem;
span {
font-size: 0.2rem;
text-align: center;
display: inline-block;
}
}
.seamless-warp {
color: #fff;
height: 2.25rem;
overflow: hidden;
visibility: visible;
.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>

9
src/main.js

@ -8,7 +8,7 @@ import Toast from './components/toast'
import axios from 'axios'
import dayjs from 'dayjs'
import Pagination from "@/components/Pagination";
import '@/assets/styles/base.scss'
@ -16,14 +16,17 @@ import '@/assets/styles/common.scss'
import '@/assets/iconfont/iconfont.css'
// import loadingViewerVue from 'loading-view-vue'
// Vue.use(loadingViewerVue)
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);
Vue.use(vueParticles)
Vue.use(Vcomp)
Vue.config.productionTip = false
Vue.prototype.axios = axios
Vue.prototype.dayjs = dayjs
Vue.prototype.$Toast = Toast
// 全局组件挂载
Vue.component('Pagination', Pagination)
router.beforeEach((to, from, next) => {
if (to.meta.title) {
document.title = to.meta.title;

42
src/router/index.js

@ -9,29 +9,29 @@ const routes = [
name: 'Brand',
component: () => import('@/views/Brand.vue'),
meta: {
title: '智慧云停车大数据平台'
title: '乐趴智慧云大数据平台'
}
},
{
path: '/login',
redirect: '/'
},
{
path: '/home',
name: 'Home',
component: () => import('@/views/Home.vue'),
meta: {
title: '酷屏首页统计图'
}
},
{
path: '/login',
name: 'Login',
component: () => import('@/views/Login.vue'),
meta: {
title: '登录界面'
}
},
// {
// path: '/login',
// redirect: '/'
// },
// {
// path: '/home',
// name: 'Home',
// component: () => import('@/views/Home.vue'),
// meta: {
// title: '酷屏首页统计图'
// }
// },
// {
// path: '/login',
// name: 'Login',
// component: () => import('@/views/Login.vue'),
// meta: {
// title: '登录界面'
// }
// },
{
path:'/404',
name:'404',

58
src/utils/scroll-to.js

@ -0,0 +1,58 @@
Math.easeInOutQuad = function(t, b, c, d) {
t /= d / 2
if (t < 1) {
return c / 2 * t * t + b
}
t--
return -c / 2 * (t * (t - 2) - 1) + b
}
// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
var requestAnimFrame = (function() {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) }
})()
/**
* Because it's so fucking difficult to detect the scrolling element, just move them all
* @param {number} amount
*/
function move(amount) {
document.documentElement.scrollTop = amount
document.body.parentNode.scrollTop = amount
document.body.scrollTop = amount
}
function position() {
return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop
}
/**
* @param {number} to
* @param {number} duration
* @param {Function} callback
*/
export function scrollTo(to, duration, callback) {
const start = position()
const change = to - start
const increment = 20
let currentTime = 0
duration = (typeof (duration) === 'undefined') ? 500 : duration
var animateScroll = function() {
// increment the time
currentTime += increment
// find the value with the quadratic in-out easing function
var val = Math.easeInOutQuad(currentTime, start, change, duration)
// move the document.body
move(val)
// do the animation unless its over
if (currentTime < duration) {
requestAnimFrame(animateScroll)
} else {
if (callback && typeof (callback) === 'function') {
// the animation is done so lets callback
callback()
}
}
}
animateScroll()
}

303
src/views/Brand.vue

@ -5,13 +5,43 @@
<div class="text">选择显示车场</div>
<div class="allBtn" @mouseenter="parkingInfoId = null" @mouseleave="parkingInfoId = ''"
@click="parkingInfoId = ''; showBi()">查看全部</div>
<div>
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
<el-form-item label="省份" prop="province">
<el-select v-model="queryParams.province" placeholder="请选择省份" clearable size="medium"
@change="areaDropDown">
<el-option v-for="(item, i) in provinceOption" :key="i" :label="item.label" :value="item.label">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="城市" prop="city">
<el-select v-model="queryParams.city" placeholder="请选择城市" clearable size="medium" @change="areaDropDown">
<el-option v-for="(item, i) in cityOption" :key="i" :label="item.label" :value="item.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="区域" prop="county">
<el-select v-model="queryParams.county" placeholder="请选择区域" clearable size="medium">
<el-option v-for="(item, i) in countyOption" :key="i" :label="item.label" :value="item.label">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="medium" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="medium" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
</div>
<div class="dialog-body">
<div class="dialog-item" :class="parkingInfoId === null ? 'select' : ''" v-for="(item, index) in PkParkingInfo"
:key="index" @click="parkingInfoId = item.value; showBi()">
<span>{{ item.label }}</span>
:key="index" @click="parkingInfoId = item.pkParkingInfoId; showBi()">
<span>{{ item.parkingInfoName }}</span>
</div>
</div>
<el-col :span="23" class="twoPagePag">
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
</el-col>
</div>
<div class="wrap" v-else>
<header>
@ -22,7 +52,7 @@
<span>{{ week }}</span>
</span>
</div>
<h2>智慧云停车大数据平台</h2>
<h2>乐趴智慧云大数据平台</h2>
<div class="screenFull">
<screenfull />
</div>
@ -31,12 +61,11 @@
<section class="mainbox">
<div class="item left">
<!-- <div class="panel">
<h2>业务范围</h2>
<business />
<div class="panel-footer"></div>
</div> -->
<div class="left-top">
<div class="">
<seamlessRank :parkingInfoId="parkingInfoId" :total="total" :listData2="rankData" :authCode="authCode"
@changeMsg="changeMsg" @passfunction="meetfunction" />
</div>
<!-- <div class="left-top">
<div class="topBg">今日收费TOP5</div>
<table class="table">
<thead class="thead">
@ -56,7 +85,7 @@
</tr>
</tbody>
</table>
</div>
</div> -->
<div class="left-top">
<div class="topBg">
@ -70,7 +99,9 @@
<div class="topBg">
收费车辆统计
</div>
<business :chart-data="payDataCar" />
<!-- <business :chart-data="payDataCar" /> -->
<DynamicList :chart-data="payDataCar" />
<div class="panel-footer"></div>
</div>
</div>
@ -120,9 +151,10 @@
</div>
<div class="item">
<p class="p1">周转率</p>
<p class="p2"> <span v-if="useCarCon.parkingPlaceTurnover">{{ parseInt(useCarCon.parkingPlaceTurnover
* 100)
}}%</span>
<p class="p2"> <span v-if="useCarCon.parkingPlaceTurnover">
{{
useCarCon.parkingPlaceTurnover
}}%</span>
<span v-else>0%</span>
</p>
</div>
@ -157,10 +189,12 @@
</template>
<script>
import { BiApi } from "@/api/form";
import { BiApi, recursionAreasTree } from "@/api/form";
import "@/assets/js/flexible";
import "@/assets/js/china";
import countTo from "vue-count-to";
import RotateColorful from "../components/rotateColorful/index.vue";
import DynamicList from "../components/dynamicList/index.vue";
const paramsArr = window.location.href.split('?')
let authCode = ''
if (paramsArr.length > 1) {
@ -172,9 +206,30 @@ export default {
name: "Brand",
components: {
countTo,
RotateColorful,
DynamicList
},
data() {
return {
timerRank: null,
//
total: 0,
authCode: null,
//
provinceOption: [],
//
cityOption: [],
//
countyOption: [],
//
queryParams: {
province: null,
city: null,
county: null,
authCode: null,
pageNum: 1,
pageSize: 20,
},
//
showFlag: false,
//
@ -227,16 +282,24 @@ export default {
created() {
},
mounted() {
const paramsArr = window.location.href.split('?')
if (paramsArr.length > 1) {
this.authCode = paramsArr[1].split('=')[1]; //
}
if (authCode && typeof +authCode === 'number') {
BiApi.getPkParkingInfo({ authCode }).then((res) => {
if (res.length > 0) {
this.PkParkingInfo = res
this.queryParams.authCode = authCode
BiApi.getParkingRanking(this.queryParams).then((res) => {
if (res.rows.length > 0) {
this.PkParkingInfo = res.rows
this.total = Number(res.total);
} else {
this.showFlag = true
this.showBi();
}
})
this.areaDropDown();
} else {
// console.log('', authCode);
alert('授权码为空,请从系统调用页面!')
@ -247,10 +310,154 @@ export default {
}
},
methods: {
meetfunction(val) {
this.parkingInfoId = val
this.showFlag = true;
this.heart();
this.getRank()
setTimeout(() => {
this.getEchart();
}, 800);
},
changeMsg(text, total, type) {
// 10
if (type) {
clearInterval(this.timerRank)
} else {
this.getRank()
}
this.rankData = text;
this.total = Number(total);
// console.log(this.rankData,total)
},
getList() {
this.queryParams.authCode = authCode
BiApi.getParkingRanking(this.queryParams)
.then((response) => {
this.PkParkingInfo = response.rows
this.total = Number(response.total);
});
},
/** 重置按钮操作 */
resetQuery() {
this.cityOption = [];
this.countyOption = [];
//
this.queryParams = {
province: null,
city: null,
county: null,
authCode: null,
pageNum: 1,
pageSize: 20,
}
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
//
setProp() {
this.prop = {
lazy: true,
lazyLoad: (node, resolve) => {
let level = 2;
setTimeout(() => {
if (node.level == 0) {
recursionAreasTree
.areaDropDown()
.then((res) => {
// map
const cities = res.map((value) => ({
treeId: value.value,
value: value.label,
label: value.label,
leaf: node.level >= level,
}));
// resolve
resolve(cities);
})
.catch((err) => {
console.log(err);
});
}
if (node.level != 0) {
let obj = {
parentId: node.data.treeId,
};
recursionAreasTree
.areaDropDown(obj)
.then((res) => {
const areas = res.map((value) => ({
treeId: value.value,
value: value.label,
label: value.label,
leaf: node.level >= level,
}));
console.log(areas);
if (node.level == 2) {
this.areasList = [...areas];
console.log(this.areasList);
}
// resolve
resolve(areas);
})
.catch((err) => {
console.log(err);
});
}
}, 100);
},
};
},
// ()
areaDropDown(e) {
if (this.queryParams.province) {
if (this.queryParams.city) {
e = this.cityOption.filter(item => item.label === e)[0].value
} else {
e = this.provinceOption.filter(item => item.label === e)[0].value
}
}
if (!this.queryParams.province) {
this.queryParams.city = null;
this.queryParams.county = null;
this.cityOption = [];
this.countyOption = [];
} else if (!this.queryParams.city) {
this.queryParams.county = null;
this.countyOption = [];
}
let query = {
parentId: e,
};
recursionAreasTree.areaDropDown(query).then((response) => {
if (!e) {
this.provinceOption = response;
} else if (e % 10000 == 0) {
this.queryParams.city = null;
this.queryParams.county = null;
this.cityOption = response;
} else {
this.queryParams.county = null;
this.countyOption = response;
}
});
},
/**
* 显示大数据画面
*/
showBi() {
//
this.getRank()
this.timerRank = setInterval(() => {
this.getRank()
}, 10000)
// this.$showLoading();
this.showFlag = true;
this.heart();
@ -295,6 +502,14 @@ export default {
this.timer = null;
this.heartTimes = 0;
},
// 便
getRank() {
const publicObj = this.parkingInfoId ? { authCode, parkingInfoId: this.parkingInfoId, pageNum: 1, pageSize: 20, } : { parkingInfoId: null, authCode, pageNum: 1, pageSize: 20 };
// -
BiApi.getParkingRanking(publicObj).then((res) => {
if (res && res.code === 200) this.rankData = res.rows; this.total = Number(res.total)
})
},
getData() {
//
@ -318,10 +533,9 @@ export default {
this.realTimeInOutRecord = res.rows
}
});
// -
BiApi.getParkingRanking(publicObj).then((res) => {
if (res && res.code === 200) this.rankData = res.data
})
// BiApi.getParkingRanking(publicObj).then((res) => {
// if (res && res.code === 200) this.rankData = res.rows; this.total = Number(res.total)
// })
// -
BiApi.paymentStatistics(publicObj).then((res) => {
if (res && res.code === 200) this.payData = res.data
@ -340,6 +554,9 @@ export default {
})
BiApi.useCarStatistics(publicObj).then((res) => {
if (res && res.code === 200) this.useCarCon = res.data
if (this.useCarCon.parkingPlaceTurnover) {
this.useCarCon.parkingPlaceTurnover = parseInt(this.useCarCon.parkingPlaceTurnover * 100 + 0.1)
}
})
BiApi.parkingCarNum(publicObj).then((res) => {
this.geoCoordMap = {
@ -464,7 +681,7 @@ export default {
// : [113.884791, 22.560888],
this.geoCoordMap[res.data[i].useCarNum] = [res.data[i].lngY, res.data[i].latX]
this.XAData.push(
[{ name: "长沙",parkName: '', value: '', lngY:'', latX:''}, { name: res.data[i].useCarNum, parkName: res.data[i].parkName, value: res.data[i].useCarNum , lngY:res.data[i].lngY, latX:res.data[i].latX }]
[{ name: "长沙", province: '', value: '', lngY: '', latX: '' }, { name: res.data[i].useCarNum, province: res.data[i].province, value: res.data[i].useCarNum, lngY: res.data[i].lngY, latX: res.data[i].latX }]
)
}
// console.log(this.geoCoordMap)
@ -568,7 +785,7 @@ export default {
},
},
symbolSize: (val) => {
return 65/8;
return 40 / 8;
},
itemStyle: {
normal: {
@ -598,13 +815,13 @@ export default {
formatter: (params, ticket, callback) => {
// console.log(params)
// console.log(this.XAData)
for(var i=0;i<this.XAData.length;i++){
// console.log(this.XAData[i][1])
if(this.XAData[i][1].lngY == params.value[0] && this.XAData[i][1].latX == params.value[1]){
return "车数量:" + this.XAData[i][1].parkName + " " + params.data.value[2] + "个";
}
for (var i = 0; i < this.XAData.length; i++) {
// console.log(this.XAData[i][1])
if (this.XAData[i][1].lngY == params.value[0] && this.XAData[i][1].latX == params.value[1]) {
return "车数量:" + this.XAData[i][1].province + " " + params.data.value[2] + "个";
}
}
// if (params.seriesType == "effectScatter") {
// return "" + params.data.value[1] + " " + params.data.value[2] + "";
// } else if (params.seriesType == "lines") {
@ -654,7 +871,7 @@ export default {
console.log("click city:", res.name);
dataList.forEach((element) => {
if (element.properties.name == res.name) {
console.log("city code:", element.id);
// console.log("city code:", element.id);
}
});
});
@ -674,6 +891,30 @@ export default {
</script>
<style lang="scss" scoped>
// /deep/ .el-button--primary {
// color: #333;
// background-color: #F1F2F3;
// border-color: #F1F2F3;
// }
/deep/ .el-button--primary:focus,
.el-button--primary:hover {
background: #66b1ff;
border-color: #66b1ff;
color: #FFF;
}
/deep/ .el-form-item {
margin-bottom: 0.1rem;
margin-top: 0.3rem;
margin-right: 0.45rem;
}
/deep/ .el-form--inline .el-form-item__label {
font-size: 0.3rem;
text-align: left;
}
.carFlex {
display: flex;
color: #fff;

Loading…
Cancel
Save