Browse Source

page2+page3

master
xuhuajiao 8 months ago
parent
commit
5fee66dd27
  1. BIN
      src/assets/images/line.png
  2. BIN
      src/assets/images/map-bg.png
  3. BIN
      src/assets/images/map-bg2.png
  4. BIN
      src/assets/images/map-hx-big.png
  5. BIN
      src/assets/images/map-hx-big2.png
  6. BIN
      src/assets/images/map-hx-dot.png
  7. BIN
      src/assets/images/map-hx-small.png
  8. BIN
      src/assets/images/map-hx-small2.png
  9. 0
      src/assets/images/map-hx01.png
  10. 0
      src/assets/images/map-hx02.png
  11. BIN
      src/assets/images/map_30.png
  12. BIN
      src/assets/images/title-middle.png
  13. 623
      src/assets/styles/index.scss
  14. 263
      src/components/echart/barEcharts.vue
  15. 65
      src/components/echart/lineChartService.vue
  16. 8
      src/views/index.vue
  17. 311
      src/views/map/index.vue
  18. 68
      src/views/pageThree/index.vue

BIN
src/assets/images/line.png

After

Width: 12  |  Height: 145  |  Size: 2.0 KiB

BIN
src/assets/images/map-bg.png

After

Width: 554  |  Height: 760  |  Size: 443 KiB

BIN
src/assets/images/map-bg2.png

After

Width: 149  |  Height: 291  |  Size: 93 KiB

BIN
src/assets/images/map-hx-big.png

After

Width: 905  |  Height: 723  |  Size: 86 KiB

BIN
src/assets/images/map-hx-big2.png

After

Width: 905  |  Height: 905  |  Size: 56 KiB

BIN
src/assets/images/map-hx-dot.png

After

Width: 1306  |  Height: 1037  |  Size: 38 KiB

BIN
src/assets/images/map-hx-small.png

After

Width: 905  |  Height: 723  |  Size: 49 KiB

BIN
src/assets/images/map-hx-small2.png

After

Width: 905  |  Height: 905  |  Size: 46 KiB

0
src/assets/images/1_03.png → src/assets/images/map-hx01.png

Before

Width: 905  |  Height: 723  |  Size: 97 KiB

After

Width: 905  |  Height: 723  |  Size: 97 KiB

0
src/assets/images/2_03.png → src/assets/images/map-hx02.png

Before

Width: 1306  |  Height: 1037  |  Size: 133 KiB

After

Width: 1306  |  Height: 1037  |  Size: 133 KiB

BIN
src/assets/images/map_30.png

Before

Width: 62  |  Height: 40  |  Size: 3.3 KiB

After

Width: 62  |  Height: 42  |  Size: 3.1 KiB

BIN
src/assets/images/title-middle.png

After

Width: 475  |  Height: 27  |  Size: 13 KiB

623
src/assets/styles/index.scss

@ -1,25 +1,27 @@
#screen-container {
width: 100%;
height: 100vh;
// padding: 0 0.175rem;
font-size: .3125rem;
line-height: .4375rem;
color: #fff;
overflow: hidden;
background: url('~@/assets/images/bg.png') no-repeat top center #02061a;
background-size: cover;
}
.map-wrapper{
.page-wrapper{
width: 100%;
height: 100vh;
background: url('~@/assets/images/mapBg.png') no-repeat top left; position: absolute;
left:0; top: 0;
background-size: cover; display: flex; justify-content: space-around; padding-top: 1.25rem;
position: absolute;
top: 0;
left: 0;
background: #001244;
padding-top: 1.5625rem;
overflow: hidden;
}
.loading {
position: fixed;
top: 1.25rem;
top: 0;
width: 100%;
height: 100%;
display: flex;
@ -159,6 +161,7 @@
height: .6rem;
background: url('~@/assets/images/bottom-bg.png') no-repeat top left;
background-size: cover;
z-index: 999;
}
// pageOne
@ -462,246 +465,372 @@
}
}
// 地图页
.map-wrapper{
width: 100%;
height: 100vh;
background: url('~@/assets/images/mapBg.png') no-repeat top left;
position: absolute;
left: 0;
top: 0;
background-size: cover;
.map-content{
display: flex;
justify-content: space-around;
padding: 1.275rem .5rem .625rem .5rem;
height: 100vh;
.database-title{
width: 100%;
height: .3375rem;
padding-left: .35rem;
margin-top: 0;
line-height: 0;
background: url('~@/assets/images/title-middle.png') no-repeat left top;
background-size: cover;
font-weight: bold;
}
}
}
// .number-scroll {
// position: relative;
// color: #4a90e2;
// font-size: 36px;
// height: 40px;
// display: inline-flex;
// align-items: center;
// justify-content: center;
// }
// 主题内部部分
// .screen-main{
// display: flex;
// justify-content: space-between;
// height: calc(100% - 91px);
// margin: 0.0625rem 0 0.5rem 0;
// padding: 0 0.325rem;
// overflow: hidden;
// .screen-left,
// .screen-right{
// width: 6.375rem;
// }
// .screen-middle{
// flex: 1;
// display: flex;
// flex-direction: column;
// justify-content: space-between;
// margin: 0 0.5rem;
// }
// .screen-item{
// margin-top: 0.25rem;
// }
// .common-title{
// width: 100%;
// height: 0.475rem;
// line-height: 0.475rem;
// padding-left: 0.525rem;
// font-size: 0.325rem;
// background: url('~@/assets/images/title.png') no-repeat center center;
// background-size: cover;
// font-family: 'YouSheBiaoTiHei';
// letter-spacing: 0.1rem;
// }
// .module-content{
// border: 1px solid #2C75E0;
// box-shadow: inset 0px 0px 38px 1px rgba(44,117,224,0.5);
// }
// .small-module{
// height: 3.75rem;
// }
// .medium-module{
// height: 4.125rem;
// }
// .big-module{
// height: 6.8125rem;
// // margin:0.1625rem 0;
// }
// //排行榜-推荐 - list
// .lending-ranking{
// .module-content{
// padding: 0 0.25rem;
// overflow: hidden;
// }
// }
// .book-list-item{
// display: flex;
// justify-content: space-between;
// align-items: center;
// padding: 0.1rem 0.25rem;
// .book-img{
// width: 0.825rem;
// height: 1.075rem;
// margin-right: 0.35rem;
// background: url('~@/assets/images/default-img.png') no-repeat center center;
// background-size: contain;
// display: flex;
// align-items: center;
// overflow: hidden;
// img{
// display: block;
// width: 100%;
// // height: 100%;
// }
// }
// .book-info{
// flex: 1;
// margin-right: 0.35rem;
// h4{
// font-size: 0.25rem;
// font-weight: normal;
// }
// p{
// font-size: 0.2rem;
// }
// }
// .ranking-num{
// display: flex;
// justify-content: space-between;
// align-items: center;
// .icon{
// width: 0.5625rem;
// height: 0.5625rem;
// margin-right: 0.175rem;
// }
// }
// }
// // 进出馆人数
// .accessToLib-container{
// display: flex;
// justify-content: space-between;
// text-align: center;
// align-items: center;
// margin: 0.375rem 0 .25rem 0;
// .accessToLib-item{
// width: 2.75rem;
// .panel-num{
// display: block;
// height: 0.85rem;
// margin-top: 0.125rem;
// line-height: 0.85rem;
// font-size: 0.325rem;
// font-weight: bold;
// text-align: center;
// color: #1AC9FF;
// background: url('~@/assets/images/num-img.png') no-repeat center center;
// background-size: cover;
// }
// }
// }
// // 视频
// .video-box{
// width: 100%;
// height: 5.2125rem;
// }
// // 阅读之星
// .read-star{
// flex: 1;
// .common-title{
// background: url('~@/assets/images/title-big.png') no-repeat center center;
// background-size: cover;
// }
// .module-content{
// padding: .25rem;
// overflow: hidden;
// .readstart-item{
// display: flex;
// justify-content: space-between;
// align-items: center;
// height: 0.5rem;
// padding: 0 0.25rem;
// font-size: 0.2rem;
// margin-bottom: 0.125rem;
// background: linear-gradient(90deg, #0C2157 0%, rgba(44,117,224,0) 51%, #0C2157 100%);
// .icon-star-1{
// width: 0.35rem;
// height: 0.3rem;
// margin-left: -0.05rem;
// margin-right: 0.2rem;
// }
// .icon-star-2{
// width: 0.375rem;
// height: 0.3rem;
// margin-left: -0.0625rem;
// margin-right: 0.2rem;
// }
// .icon-star-3{
// width: 0.275rem;
// height: 0.3rem;
// margin-right: 0.25rem;
// }
// .star-num{
// display: block;
// width: 0.25rem;
// height: 0.25rem;
// margin-right: 0.25rem;
// font-size: 0.2rem;
// line-height: 0.25rem;
// text-align: center;
// border-radius: 50%;
// color: #1AC9FF;
// border: 1px solid #1AC9FF;
// }
// .star-info{
// flex: 1;
// margin-right: 0.25rem;
// }
// &.star1-bg{
// background: url('~@/assets/images/star-1.png') no-repeat left top;
// background-size: contain;
// }
// &.star2-bg{
// background: url('~@/assets/images/star-2.png') no-repeat left top;
// background-size: contain;
// }
// &.star3-bg{
// background: url('~@/assets/images/star-3.png') no-repeat left top;
// background-size: contain;
// }
// }
.lib-info{
width: 5.9375rem;
background-color: rgba(10, 26, 66, 0.6);
.lib-content{
padding: .375rem .35rem 0 .4rem;
}
.lib-cont01{
display: flex;
justify-content: space-between;
margin-top: .325rem;
}
.lib-cont-item {
li{
position: relative;
display: flex;
justify-content: flex-start;
align-items: center;
width: 2.5rem;
height: 1.05rem;
font-size: .225rem;
background: linear-gradient(-180deg, rgba(40, 74, 142, 0.4),rgba(0,0,0,0));
border-radius: 4px;
&::before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 2rem;
height: .025rem;
background: linear-gradient(
to right,
rgba(0,0,0,0) 0%,
rgba(142, 176, 239,0.2) 20%,
rgba(142, 176, 239,0.5) 40%,
rgba(142, 176, 239,0.6) 50%,
rgba(142, 176, 239,0.5) 60%,
rgba(142, 176, 239,0.2) 80%,
rgba(0,0,0,0) 100%
);
}
img{
display: block;
width: .725rem;
height: .65rem;
margin-right: .125rem;
}
p{
color: #B5C1D1;
line-height: 0.45rem;
span{
display: block;
&:last-child{
font-size: .3rem;
color: #fff;
font-weight: bold;
text-shadow:
0 0 10px rgba(18,104,245, 0.24),
0 0 20px rgba(18,104,245, 0.24),
0 0 30px rgba(18,104,245, 0.24),
0 0 40px rgba(18,104,245, 0.24),
0 0 50px rgba(18,104,245, 0.24),
0 0 60px rgba(18,104,245, 0.24),
0 0 70px rgba(18,104,245, 0.24),
0 0 80px rgba(18,104,245, 0.24),
0 0 90px rgba(18,104,245, 0.24),
0 0 100px rgba(18,104,245, 0.24);
i{
color: #B5C1D1;
font-size: .2rem;
font-weight: normal;
padding-left: .075rem;
font-style: normal;
}
}
}
}
}
}
.lib-cont02{
position: relative;
margin: .1625rem 0 .1rem 0;
&::after{
content: "";
position: absolute;
right: 1px;
bottom: 0;
width: .775rem;
height: .5rem;
background: url('~@/assets/images/map_30.png') no-repeat left top;
background-size: cover;
opacity: .5;
}
li{
width: 100%;
p{
display: flex;
justify-content: space-between;
line-height: 1.05rem;
align-items: center;
span{
&:last-child{
width: 2.375rem;
text-align: right;
}
}
}
}
}
.lib-text{
width: 100%;
height: calc(100vh - 8.625rem);
font-size: .225rem;
line-height: .35rem;
background: linear-gradient(-180deg, rgba(40, 74, 142, 0.4),rgba(0,0,0,0));
border-radius: 4px;
padding: .25rem .2875rem 0 .2875rem;
color: #ADC7FF;
overflow: hidden;
overflow-y: scroll;
}
}
.map-hx-bg{
width: 16.325rem;
height: 11.3125rem;
background: url('~@/assets/images/map-hx-dot.png') no-repeat top left;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-45%,-50%);
}
.map-hx-small{
width: 11.3125rem;
height: 9.15rem;
border-radius: 50%;
overflow: hidden;
background: url('~@/assets/images/map-hx-small.png') no-repeat center center;
background-size: cover;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-58%,-45%);
}
.map-hx-big{
width: 12.5rem;
height: 12.5rem;
border-radius: 50%;
overflow: hidden;
background: url('~@/assets/images/map-hx-big2.png') no-repeat center center;
background-size: cover;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-58%,-40%);
animation: rotateTrack 40s infinite linear;
}
@keyframes rotateTrack {
0% {
transform: translate(-58%,-50%) rotateX(40deg) rotateZ(0);
}
100% {
transform: translate(-58%,-50%) rotateX(40deg) rotateZ(360deg);
}
}
// }
// }
.read-num{
width: 5.9375rem;
// height: 10.45rem;
background-color: rgba(10, 26, 66, .6);
.online{
height: 1.6875rem;
background: url('~@/assets/images/map_03.png') no-repeat left top;
background-size: 1.9rem 1.525rem;
margin: .25rem 0 .4rem 0;
padding: 0 .15rem 0 2.25rem;
font-size: .25rem;
color: #C8DFFF;
// line-height: .5rem;
p{
padding-top: .25rem;
}
.num{
span{
font-size: .6rem;
font-weight: 500;
font-style: italic;
color: #fff;
text-shadow:
0 0 10px rgba(18,104,245, 0.24),
0 0 20px rgba(18,104,245, 0.24),
0 0 30px rgba(18,104,245, 0.24),
0 0 40px rgba(18,104,245, 0.24),
0 0 50px rgba(18,104,245, 0.24),
0 0 60px rgba(18,104,245, 0.24),
0 0 70px rgba(18,104,245, 0.24),
0 0 80px rgba(18,104,245, 0.24),
0 0 90px rgba(18,104,245, 0.24),
0 0 100px rgba(18,104,245, 0.24);
}
i{
font-size: .4125rem;
font-weight: normal;
font-style: normal;
color: rgba(154,197,255,.4);
padding-left: .125rem;
}
}
}
.lending-ranking{
padding: 0 .2625rem 0 .425rem;
h5{
font-size: .225rem;
color: #79B8FF;
margin-bottom: .25rem;
}
.ranking-cont{
// height: calc(100vh - 6.875rem);
background: linear-gradient(-90deg, rgba(66,139,221,0.1), rgba(66,139,221,0));
border: 1px solid rgba(83, 196, 255, .2);
padding-bottom: .375rem;
}
.ranking-title{
display: flex;
justify-content: space-around;
text-align: center;
align-items: center;
font-size: .15rem;
color: #79B8FF;
background: linear-gradient(90deg, rgba(66,139,221,0.2), rgba(66,139,221,0));
li {
&:last-child{
width: 1.375rem;
}
}
}
.ranking-list{
li{
display: flex;
justify-content: space-around;
font-size: .175rem;
color: #eef6ff;
line-height: .375rem;
padding-top: .125rem;
text-align: center;
div{
&:last-child{
font-weight: bold;
}
i{
padding-left: .125rem;
font-style: normal;
font-weight: normal;
color: #b6d4f7;
}
}
.ranking-progress .el-progress{
width: 1.725rem;
margin: 0 auto;
.el-progress-bar__outer {
background-color: #054076;
}
}
.ranking-num1{
background: url('~@/assets/images/ranking01.png') no-repeat center center;
background-size: .225rem .3125rem;
}
.ranking-num2{
background: url('~@/assets/images/ranking02.png') no-repeat center center;
background-size: .225rem .3125rem;
}
.ranking-num3{
background: url('~@/assets/images/ranking03.png') no-repeat center center;
background-size: .225rem .3125rem;
}
}
}
}
}
.tooltip-main{
position: relative;
min-width: 3rem;
.tooltip-line{
width: .15rem;
height: 0;
background: url('~@/assets/images/line.png') no-repeat top left;
position: absolute;
left: -0.25rem;
bottom: -0.625rem;
transform-origin: bottom center;
animation: growBar 1s forwards;
}
}
.tooltip-content{
opacity: 0;
line-height: .4125rem;
border: 1px solid #D1793D;
background-color: rgba(0,31,87,0.8);
animation: slideInFromLeft 1s forwards;
animation-delay:1s;
.title{
width: 100%;
padding: .05rem .1875rem;
font-weight: bold;
font-size: .225rem;
background: linear-gradient(90deg, rgba(255, 116, 32, 1), rgba(255,255,255,0.22));
}
.place{
padding: .125rem .1875rem;
font-size: 0.2rem;
color: rgba(197, 209, 232, 1);
}
}
@keyframes growBar {
0% {height: 0;}
100% {height: 1.8125rem;}
}
@keyframes slideInFromLeft {
0% {width: 0; opacity: 0;}
100% {width: 100%; opacity: 1;}
}
// // 通知公告
// .notice{
// .module-content{
// display: flex;
// justify-content: space-between;
// width: 100%;
// padding: 0.25rem 0.375rem 0.5rem 0.375rem;
// .notice-icon-gif{
// display: block;
// width: 2.375rem;
// height: 2.875rem;
// background: url('~@/assets/images/notice.gif') no-repeat left top;
// background-size: contain;
// margin-right: 0.15rem;
// }
// .seamless-warp{
// width: calc(100vw);
// height: 3.1rem;
// overflow: hidden;
// .notice-txt {
// animation: myMove 20s linear infinite;
// animation-fill-mode: forwards;
// }
// @keyframes myMove {
// 0% {
// transform: translateY(2rem);
// }
// 100% {
// transform: translateY(-6rem);
// }
// }
// }
// }
// }
// }
// 第三页 统计表
.page-three{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 0 .525rem 0 .45rem;
.three-item{
width: 11.25rem;
margin-bottom: .575rem;
background-color: #01103D;
}
.three01,.three02{
height: 5.25rem;
}
.three03,.three04{
height: 4.7rem;
margin-bottom: 0;
}
.database-title{
width: 6.0375rem;
}
}

263
src/components/echart/barEcharts.vue

@ -0,0 +1,263 @@
<template>
<!-- 近七日借阅统计 -->
<div id="main1" :style="{height:height,width:width}" />
</template>
<script>
import echarts from 'echarts'
import resize from '@/utils/resizeMixins.js'
export default {
name: 'BarEcharts',
mixins: [resize],
props: {
storageData: {
type: Object,
require: true,
default: function() {
return {}
}
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '100%'
}
},
data() {
return {
chart: null
}
},
watch: {
'storageData': {
handler(val) {
setTimeout(() => {
this.drawChart()
}, 100)
},
immediate: true,
deep: true
}
},
mounted() {
this.drawChart()
},
methods: {
drawChart() {
const app = {}
const chartDom = document.getElementById('main1')
this.chart = echarts.init(chartDom)
let option = null
const posList = [
'left',
'right',
'top',
'bottom',
'inside',
'insideTop',
'insideLeft',
'insideRight',
'insideBottom',
'insideTopLeft',
'insideTopRight',
'insideBottomLeft',
'insideBottomRight'
]
app.configParameters = {
rotate: {
min: -90,
max: 90
},
align: {
options: {
left: 'left',
center: 'center',
right: 'right'
}
},
verticalAlign: {
options: {
top: 'top',
middle: 'middle',
bottom: 'bottom'
}
},
position: {
options: posList.reduce(function(map, pos) {
map[pos] = pos
return map
}, {})
},
distance: {
min: 0,
max: 100
}
}
app.config = {
rotate: 90,
align: 'left',
verticalAlign: 'middle',
position: 'insideBottom',
distance: 15,
onChange: function() {
const labelOption = {
rotate: app.config.rotate,
align: app.config.align,
verticalAlign: app.config.verticalAlign,
position: app.config.position,
distance: app.config.distance
}
this.chart.setOption({
series: [
{
label: labelOption
},
{
label: labelOption
}
]
})
}
}
const labelOption = {
show: false,
position: app.config.position,
distance: app.config.distance,
align: app.config.align,
verticalAlign: app.config.verticalAlign,
rotate: app.config.rotate,
formatter: '{c} {name|{a}}',
fontSize: 16,
rich: {
name: {}
}
}
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: { //
right: 20,
top: 10,
icon: 'rect',
itemHeight: 6,
itemWidth: 11,
textStyle: {
color: '#fff'
},
data: [
{
name: '借出',
icon: 'rect',
textStyle: {
color: '#41A3FF'
}
},
{
name: '归还',
icon: 'rect',
textStyle: {
color: '#FFD050'
}
}
]
},
grid: {
left: '3%',
right: '3%',
bottom: '8%',
top: '17%',
containLabel: true
},
xAxis: [{
type: 'category',
axisTick: { show: false },
data: this.storageData.storageMonths,
axisLine: { // 线
lineStyle: {
color: '#113D72'
}
},
axisLabel: { // x
show: true,
textStyle: {
color: '#fff'
},
formatter: this.storageData.storageMonths.map(function(item) {
return item
})
},
splitLine: { // 线
lineStyle: {
color: '#113D72',
type: 'solid'
}
}
}],
yAxis: [{
min: 0,
max: 100,
interval: 25,
type: 'value',
axisLine: { // 线
show: false
},
axisLabel: { //
show: true,
textStyle: {
color: '#fff'
}
},
axisTick: { // 线
show: false
},
splitLine: { // 线
lineStyle: {
color: 'rgba(66, 139, 221, 0.2)',
type: 'solid'
}
}
}],
series: [
{
name: '借出',
type: 'bar',
barWidth: 14, //
barGap: '30%',
label: labelOption,
emphasis: {
focus: 'series'
},
data: this.storageData.outStorageData,
color: '#41A3FF'
},
{
name: '归还',
type: 'bar',
barWidth: 14, //
label: labelOption,
emphasis: {
focus: 'series'
},
data: this.storageData.inStorageData,
color: '#F9BE1D'
}
]
}
option && this.chart.setOption(option)
}
}
}
</script>
<style lang="scss" scoped>
</style>

65
src/components/echart/lineChartService.vue

@ -60,9 +60,9 @@ export default {
this.setOptions(this.chartData)
},
setOptions({ returnData, borrowedData } = {}) {
const time = ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00', '24:00']
const time = ['08:00', '10:00', '12:00', '14:00', '16:00', '18:00']
this.chart.setOption({
backgroundColor: '#010326',
backgroundColor: '#01103D',
tooltip: {
trigger: 'axis',
axisPointer: {
@ -76,13 +76,28 @@ export default {
top: '4%',
right: '4%',
icon: 'rect',
itemHeight: 4,
itemWidth: 26,
itemHeight: 6,
itemWidth: 11,
textStyle: {
fontSize: '16px',
color: '#339CFF'
},
data: ['借出', '归还']
data: [
{
name: '借出',
icon: 'rect',
textStyle: {
color: '#41A3FF'
}
},
{
name: '归还',
icon: 'rect',
textStyle: {
color: '#FFD050'
}
}
]
},
grid: {
left: '2%',
@ -96,21 +111,25 @@ export default {
return item
}),
axisLabel: {
interval: 5,
show: true,
formatter: function(value, idx) {
return value
},
color: '#fff'
color: '#79B8FF'
},
axisLine: {
show: false,
lineStyle: {
width: '1',
color: '#113D72',
type: 'solid'
}
},
axisTick: {
show: false
},
splitLine: {
show: true,
show: false,
lineStyle: {
color: '#333'
}
@ -126,12 +145,12 @@ export default {
interval: 250,
axisLabel: {
textStyle: {
color: '#fff'
color: '#79B8FF'
}
},
// 线
axisLine: {
show: true,
show: false,
lineStyle: {
color: '#113D72',
width: '1',
@ -146,8 +165,8 @@ export default {
splitLine: {
show: true,
lineStyle: {
color: '#113D72',
type: 'dashed',
color: 'rgba(66, 139, 221, 0.2)',
type: 'solid',
//
opacity: 1,
width: 1
@ -159,12 +178,15 @@ export default {
{
name: '归还',
type: 'line',
smooth: 0.6,
stack: 'Total',
lineStyle: {
width: 1,
color: '#18B08F'
width: 3,
color: '#FFD14F'
},
showSymbol: false,
itemStyle: {
color: '#FFD14F'
},
areaStyle: {
opacity: 0.6,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@ -175,7 +197,7 @@ export default {
},
{
offset: 1,
color: 'rgba(23, 175, 142, 1)'
color: '#FFD14F'
}
])
},
@ -184,10 +206,13 @@ export default {
{
name: '借出',
type: 'line',
smooth: 0.4,
stack: 'Total',
itemStyle: {
color: '#41A3FF'
},
lineStyle: {
width: 1,
color: '#FE8042'
width: 3,
color: '#41A3FF'
},
showSymbol: false,
areaStyle: {
@ -199,7 +224,7 @@ export default {
},
{
offset: 1,
color: 'rgba(254, 128, 66, 1)'
color: '#41A3FF'
}
])
},

8
src/views/index.vue

@ -19,7 +19,7 @@
:height="height"
:fullscreen="fullscreen"
/>
<div v-if="active === 3">第三屏</div>
<PageThree v-if="active === 3" />
<div v-if="active === 4">第四屏</div>
</section>
<div class="bottom-bg" />
@ -30,16 +30,18 @@
import Header from '@/views/header/index.vue'
import PageOne from '@/views/pageOne/index.vue'
import Map from '@/views/map/index.vue'
import PageThree from '@/views/pageThree/index.vue'
export default {
name: 'Home',
components: {
Header,
PageOne,
Map
Map,
PageThree
},
data() {
return {
active: 2,
active: 3,
isLoading: false,
fullscreen: false,
height: '',

311
src/views/map/index.vue

@ -1,8 +1,9 @@
<template>
<div class="map-wrapper">
<div class="map-content">
<div class="lib-info">
<div class="lib-title">{{ libCurrent && libCurrent.name }}</div>
图片切换{{ currentIndex+1 }}
<div class="database-title">{{ libCurrent && libCurrent.name }}</div>
<div class="lib-content">
<swiper v-if="swiperOption" :key="swiperKey" ref="mySwiper" class="swiperLib" :options="swiperOption">
<swiper-slide v-for="(item,index) in displayedImages" :key="index">
<div class="book-img" style="width: 100%; height: 3rem;">
@ -10,20 +11,69 @@
</div>
</swiper-slide>
<!-- 标页码 -->
<div slot="pagination" class="swiper-pagination" />
<!-- <div slot="pagination" class="swiper-pagination" /> -->
</swiper>
<div class="lib-content">
<span>藏书量4787</span>
<span>办证量74</span>
<span>占地面积40平方米</span>
<p>关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知</p>
<ul class="lib-cont-item lib-cont01">
<li>
<img src="@/assets/images/map_18.png" alt="">
<p>
<span>藏书量</span>
<span>4787<i></i></span>
</p>
</li>
<li>
<img src="@/assets/images/map_20.png" alt="">
<p>
<span>办证量</span>
<span>74<i></i></span>
</p>
</li>
</ul>
<ul class="lib-cont-item lib-cont02">
<li>
<img src="@/assets/images/map_28.png" alt="">
<p>
<span>占地面积</span>
<span>40<i>平方米</i></span>
</p>
</li>
</ul>
<div class="lib-text">关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通通通关于关于的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通通通关于关于</div>
</div>
</div>
<div ref="chart" style="flex: 1; margin:0 .125rem; z-index: 9999;" />
<div class="map-hx-bg">
<div class="map-hx-small" />
<div class="map-hx-big" />
</div>
<div ref="chart" class="content" style="width: 800px;" />
<div class="read-num">
<div class="lib-title">{{ libCurrent && libCurrent.name }}</div>
<h6>读者数量</h6>
<h6>借阅TOP10</h6>
<div class="database-title">读者统计</div>
<div class="online">
<p>当前在馆人数</p>
<p class="num"><span>156</span><i></i></p>
</div>
<div class="lending-ranking">
<h5>借阅Top10</h5>
<div class="ranking-cont">
<ul class="ranking-title">
<li style="width: 0.725rem;">排名</li>
<li style="width: 0.8125rem;">姓名</li>
<li style="flex:1;" />
<li style="width: 1.375rem;">借阅次数</li>
</ul>
<ul class="ranking-list">
<li v-for="(item,index) in rankingWithPercentage" :key="index">
<div style="width: 0.725rem; color: #79B8FF;" :class="[{'ranking-num1':index===0},{'ranking-num2':index===1},{'ranking-num3':index===2}]">{{ index>=3 ? index+1 : null }}</div>
<div style="width: 0.8125rem;">{{ item.name }}</div>
<div class="ranking-progress" style="flex:1; margin-left: 0.125rem; align-self: center;">
<el-progress :percentage="item.percentage" :stroke-width="8" :show-text="false" color="#009afb" />
</div>
<div style="width: 1.375rem;">{{ item.num }}<i></i></div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</template>
@ -35,6 +85,7 @@ import libJsonData from '@/assets/json/lib.json'
import { debounce } from 'lodash' // js,
import { swiper, swiperSlide } from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
export default {
components: {
swiper, swiperSlide
@ -75,7 +126,21 @@ export default {
currentIndex: 0,
displayedImages: [],
swiperOption: null,
seriesData: []
seriesData: [],
mapImg: require('../../assets/images/map-bg2.png'),
rankingData: [
{ id: 1, num: 718, name: '胡图图' },
{ id: 2, num: 447, name: '张三三' },
{ id: 3, num: 261, name: '李晓明' },
{ id: 4, num: 242, name: '胡图图' },
{ id: 5, num: 165, name: '胡图图' },
{ id: 6, num: 140, name: '胡图图' },
{ id: 7, num: 120, name: '胡图图' },
{ id: 8, num: 100, name: '胡图图' },
{ id: 9, num: 70, name: '胡图图' },
{ id: 10, num: 60, name: '胡图图' }
],
rankingWithPercentage: []
}
},
computed: {
@ -93,15 +158,32 @@ export default {
mounted() {
this.count = 0
this.initChart() //
setTimeout(() => {
this.updateChart() //
this.mouseMove() //
// this.mouseMove() //
window.addEventListener('resize', debounce(this.resize, 2000)) // 使
}, 300)
this.rankingDataComputed()
},
methods: {
rankingDataComputed() {
const firstPlaceNum = this.rankingData[0].num
this.rankingWithPercentage = this.rankingData.map(item => {
const percentage = (item.num / firstPlaceNum) * 100
return { ...item, percentage }
})
console.log(this.rankingWithPercentage)
},
initChart() {
this.$echarts.registerMap('qiyang', mapJson) // map
this.myChart = this.$echarts.init(this.$refs.chart) // echarts
var mapImg = document.createElement('img')
mapImg.style.height = mapImg.height = mapImg.width = mapImg.style.width = '1px'
mapImg.src = require('../../assets/images/map-bg2.png')
var XAData = [
[{ name: '陶铸图书馆' }, { name: '陶铸图书馆', value: '陶铸' }],
[{ name: '陶铸图书馆' }, { name: '龙山街道分馆', value: '龙山街道' }],
@ -150,14 +232,16 @@ export default {
{
name: item[0],
type: 'effectScatter',
symbolSize: [8, 4],
symbol: 'image://' + require('@/assets/images/map_10.png'),
symbolSize: [26, 20],
coordinateSystem: 'geo',
zlevel: 2,
zlevel: 3,
selectedMode: false,
rippleEffect: {
brushType: 'stroke',
color: '#9ffcff',
period: 9,
scale: 3
// brushType: 'stroke',
color: 'transparent'
// period: 12
// scale: 4
},
label: {
normal: {
@ -168,7 +252,8 @@ export default {
},
itemStyle: {
normal: {
color: '#fff'
color: 'transparent',
areaColor: 'transparent'
},
emphasis: {
areaColor: '#2B91B7'
@ -242,24 +327,30 @@ export default {
// {a}<br/>
//
tooltip: {
show: true,
trigger: 'item',
enterable: 'click',
triggerOn: 'click',
hideDelay: 100,
showContent: true, //
alwaysShowContent: true, //
// hideDelay: 100, //
enterable: 'mousemove|click',
padding: [0, 0, 0, 0],
backgroundColor: null,
position: function(point, params, dom, rect, size) {
console.log('point', point)
console.log('params', params)
console.log('dom', dom)
console.log('rect', rect)
console.log('size', size)
return [point[0] - 100, point[1] - 100]
return [point[0] + 15, point[1] - 144]
},
formatter: (params, ticket, callback) => {
if (params.seriesType === 'effectScatter') {
return `<div style="padding:5px; ">
<div class=title>${params.data.name}</div>
<div>地址${params.data.place}</div>
return `<div class='tooltip-main' >
<div class='tooltip-line'></div>
<div class='tooltip-content'>
<div class='title'>${params.data.name}</div>
<div class='place'>地址${params.data.place}</div>
</div>
</div>`
} else if (params.seriesType === 'lines') {
return (
@ -309,54 +400,115 @@ export default {
map: 'qiyang',
aspectScale: 1,
zoom: 1.1,
top: '8%', //* ********************
top: '6%', //
left: '11%',
roam: false,
z: 5, //* *****************cssz-index53
roam: false, //
z: 6, // cssz-index53
itemStyle: {
areaColor: {
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [{
offset: 0, color: 'rgba(0,0,0,.1)'
}, {
offset: 0.8, color: 'rgba(59,143,248,.6)'
}],
global: false
},
borderColor: '#9ffcff',
borderWidth: 1
},
emphasis: {
itemStyle: {
areaColor: {
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [{
offset: 0, color: 'rgba(0,0,0,.1)'
}, {
offset: 0.8, color: 'rgba(59,143,248,.6)'
}],
global: false
} //
}
},
label: {
emphasis: {
show: false,
color: '#fff'
}
},
tooltip: {
show: true
}
},
{
map: 'qiyang',
aspectScale: 1,
zoom: 1.1,
top: '6%', //
left: '11%',
roam: false, //
z: 5, // cssz-index53
itemStyle: {
areaColor: 'rgba(17,57,118,1)', //* *******
areaColor: {
type: 'pattern',
image: mapImg,
repeat: 'repeat'
}, //
borderColor: '#9ffcff',
borderWidth: 4,
borderWidth: 5,
shadowColor: '#4cd4eb',
shadowOffsetX: 0,
shadowOffsetY: 4,
shadowBlur: 10,
shadowOffsetY: 0,
shadowBlur: 0,
emphasis: { //
areaColor: 'rgba(17,57,118,1)'
areaColor: {
type: 'pattern',
image: mapImg,
repeat: 'repeat'
}
}
},
emphasis: {
disabled: true,
areaColor: '#01215c'
},
label: {
emphasis: {
show: true,
show: false,
color: '#fff'
}
},
tooltip: {
show: true
show: false
}
},
{
map: 'qiyang',
aspectScale: 1,
zoom: 1.1,
top: '9%', //
left: '9%',
roam: false,
top: '7%', //
left: '10%',
roam: false, //
z: 4, //
itemStyle: {
areaColor: '#05498f', //
borderColor: '#195175',
borderColor: '#0296cf',
borderWidth: 2,
shadowColor: '#0f4c74',
shadowColor: '#0296cf',
shadowOffsetX: 0,
shadowOffsetY: 4,
shadowBlur: 10,
shadowOffsetY: 0,
shadowBlur: 0,
emphasis: { //
areaColor: 'rgba(7,107,151,1)'
disabled: true,
areaColor: '#05498f'
}
},
tooltip: {
@ -367,20 +519,20 @@ export default {
map: 'qiyang',
aspectScale: 1,
zoom: 1.1,
top: '10%', //
left: '11%',
top: '9%', //
left: '9%',
roam: false,
z: 3, //
itemStyle: {
areaColor: 'rgba(16,69,110,1)', //
borderColor: '#195175',
areaColor: 'rgba(3,106,183,.5)', //
borderColor: '#025792',
borderWidth: 2,
shadowColor: '#0f4c74',
shadowColor: '#025792',
shadowOffsetX: 0,
shadowOffsetY: 4,
shadowBlur: 10,
shadowOffsetY: 0,
shadowBlur: 0,
emphasis: { //
areaColor: 'rgba(16,69,110,1)'
areaColor: 'rgba(3,106,183,.5)'
}
},
tooltip: {
@ -392,19 +544,19 @@ export default {
aspectScale: 1,
zoom: 1.1,
top: '11%', //
left: '11%',
left: '8%',
roam: false,
z: 2, //
itemStyle: {
areaColor: 'rgba(0,0,0,1)', //
areaColor: 'rgba(3,106,183,.2)', //
borderColor: '#195175',
borderWidth: 2,
borderWidth: 1,
shadowColor: '#0f4c74',
shadowOffsetX: 0,
shadowOffsetY: 4,
shadowBlur: 10,
emphasis: { //
areaColor: 'rgba(0,0,0,1)'
areaColor: 'rgba(3,106,183,.2)'
}
},
tooltip: {
@ -416,7 +568,7 @@ export default {
aspectScale: 1,
zoom: 1.1,
top: '12%', //
left: '11%',
left: '10%',
roam: false,
z: 1, //
itemStyle: {
@ -438,7 +590,9 @@ export default {
],
series: series
}
setTimeout(() => {
this.myChart.setOption(initOption)
}, 200)
},
updateChart() {
//
@ -480,7 +634,6 @@ export default {
// ]
// }
console.log('this.series', this.seriesData)
this.len = this.seriesData[0].data.length //
// this.myChart.setOption(updateOption)
this.libIndex = this.count % this.len
@ -494,8 +647,8 @@ export default {
this.myChart.on('mouseover', (params) => {
clearInterval(this.timeTicket)
this.myChart.dispatchAction({
type: 'downplay',
seriesIndex: 0
type: 'downplay'
// seriesIndex: 0
})
this.myChart.dispatchAction({
type: 'highlight',
@ -537,7 +690,6 @@ export default {
this.myChart.resize()
},
updatePageWithData() {
console.log('update')
//
const displayCountOptions = [1, 2, 3, 5]
const displayCount = displayCountOptions[Math.floor(Math.random() * displayCountOptions.length)]
@ -551,14 +703,12 @@ export default {
if (this.displayedImages.length === 1) {
setTimeout(() => {
console.log('111')
this.count++
this.libIndex = this.count % this.len
this.libCurrent = this.libInfoData[this.libIndex]
console.log('this.libCurrent', this.libCurrent)
this.updatePageWithData()
this.autohover()
}, 3000)
}, 5000)
}
},
initSwiper() {
@ -582,7 +732,7 @@ export default {
// keyboard: true, //
// mousewheelControl: true, //
autoplay: {
delay: 3000, // ms
delay: 5000, // ms
stopOnLastSlide: false, // slide
disableOnInteraction: false // swiperautoplay
// reverseDirection: false, //
@ -603,7 +753,6 @@ export default {
// } else {
// _self.$refs.mySwiper.swiper.autoplay.stop()
// }
console.log(' this.activeIndex', this.activeIndex)
_self.currentIndex = this.activeIndex
if (_self.currentIndex === _self.displayedImages.length - 1) {
setTimeout(() => {
@ -617,7 +766,7 @@ export default {
_self.updatePageWithData()
_self.autohover()
_self.currentIndex = 0
}, 3000)
}, 5000)
}
}
}
@ -630,28 +779,6 @@ export default {
<style lang="scss">
@import "~@/assets/styles/index.scss";
.lib-info{
// position: absolute;
// left: 1rem;
// top: 2rem;
width: 400px;
border: 1px solid #fff;
.lib-content{
font-size: .2rem;
}
}
.lib-title{
line-height: .45rem;
text-align: center;
}
.read-num{
// position: absolute;
// right: 1rem;
// top: 2rem;
width: 200px;
height: 600px;
border: 1px solid #fff;
}
</style>
<!--
{

68
src/views/pageThree/index.vue

@ -0,0 +1,68 @@
<template>
<div class="page-wrapper ">
<div class="page-three">
<div class="three-item three01">
<div class="database-title">本年累计借阅数量</div>
</div>
<div class="three-item three02">
<div class="database-title">今日借阅数量</div>
</div>
<div class="three-item three03">
<div class="database-title">今日借阅趋势</div>
<div class="chart-wrapper" style="height: calc(100%);">
<LineChartService :chart-data="chartData" />
</div>
</div>
<div class="three-item three04">
<div class="database-title">近7日借阅统计</div>
<div class="chart-wrapper" style="height: calc(100%);">
<BarEcharts :storage-data="storageData" />
</div>
</div>
</div>
</div>
</template>
<script>
import LineChartService from '@/components/echart/lineChartService'
import BarEcharts from '@/components/echart/barEcharts'
export default {
components: {
LineChartService,
BarEcharts
},
data() {
return {
chartData: {
returnData: [220, 132, 10, 134, 90, 230],
borrowedData: [20, 182, 191, 234, 290, 330]
},
storageData: {
storageMonths: ['05-13', '05-14', '05-15', '05-16', '05-17', '05-18', '05-19'],
inStorageData: [220, 132, 10, 134, 90, 230, 80],
outStorageData: [20, 182, 191, 234, 290, 330, 30]
}
}
},
computed: {
},
created() {
},
beforeDestroy() {
clearTimeout(this.timer2)
},
mounted() {
},
methods: {
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
@import "~@/assets/styles/font-some.css";
</style>
Loading…
Cancel
Save