Browse Source

效果更改

master
xuhuajiao 7 months ago
parent
commit
eef2ab68d4
  1. 1
      package.json
  2. BIN
      src/assets/fonts/DingTalk_JinBuTi_Regular.ttf
  3. 7
      src/assets/fonts/fonts.css
  4. BIN
      src/assets/images/database-middle.png
  5. BIN
      src/assets/images/header-bg.png
  6. BIN
      src/assets/images/header-bg2.png
  7. BIN
      src/assets/images/header_03.png
  8. BIN
      src/assets/images/header_05.png
  9. BIN
      src/assets/images/header_07.png
  10. BIN
      src/assets/images/header_13.png
  11. BIN
      src/assets/images/header_13_b.png
  12. BIN
      src/assets/images/map-bg.png
  13. BIN
      src/assets/images/page4_02.png
  14. BIN
      src/assets/images/page4_03.png
  15. BIN
      src/assets/images/page4_06.png
  16. BIN
      src/assets/images/poster.png
  17. 116
      src/assets/styles/ball-running-animate.css
  18. 4
      src/assets/styles/font-some.css
  19. 547
      src/assets/styles/index.scss
  20. 35
      src/components/echart/barEcharts.vue
  21. 37
      src/components/echart/lineChartService.vue
  22. 8
      src/router/index.js
  23. 136
      src/views/accessToLibrary/index.vue
  24. 33
      src/views/header/index.vue
  25. 107
      src/views/index.vue
  26. 102
      src/views/lengingRanking/index.vue
  27. 91
      src/views/map/index.vue
  28. 181
      src/views/newBookRecommend/index.vue
  29. 73
      src/views/notice/index.vue
  30. 210
      src/views/pageFour/index.vue
  31. 289
      src/views/pageFour/module/video.vue
  32. 0
      src/views/pageOne/data.json
  33. 63
      src/views/pageOne/index.vue
  34. 27
      src/views/pageThree/index.vue
  35. 38
      src/views/pageThree/module/todayCircle.vue
  36. 21
      src/views/pageThree/module/yearCircle.vue
  37. 74
      src/views/readStar/index.vue
  38. 51
      src/views/todayBorrowed/index.vue
  39. 91
      src/views/totalLending/index.vue
  40. 64
      src/views/video/index.vue

1
package.json

@ -35,6 +35,7 @@
"eslint-plugin-vue": "^6.1.2",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"videojs-contrib-hls": "^5.15.0",
"vue-awesome-swiper": "^3.1.3",
"vue-template-compiler": "^2.6.11"
},

BIN
src/assets/fonts/DingTalk_JinBuTi_Regular.ttf

7
src/assets/fonts/fonts.css

@ -10,4 +10,11 @@
src: url('YouSheBiaoTiHei.ttf');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "DingTalk_JinBuTi_Regular";
src: url('DingTalk_JinBuTi_Regular.ttf');
font-weight: normal;
font-style: normal;
}

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

After

Width: 466  |  Height: 512  |  Size: 418 KiB

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

Before

Width: 1446  |  Height: 100  |  Size: 85 KiB

After

Width: 1451  |  Height: 85  |  Size: 72 KiB

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

After

Width: 1446  |  Height: 100  |  Size: 85 KiB

BIN
src/assets/images/header_03.png

After

Width: 11  |  Height: 6  |  Size: 1.1 KiB

BIN
src/assets/images/header_05.png

After

Width: 11  |  Height: 6  |  Size: 1.1 KiB

BIN
src/assets/images/header_07.png

After

Width: 11  |  Height: 6  |  Size: 1.1 KiB

BIN
src/assets/images/header_13.png

After

Width: 64  |  Height: 5  |  Size: 1.3 KiB

BIN
src/assets/images/header_13_b.png

After

Width: 196  |  Height: 6  |  Size: 1.5 KiB

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

Before

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

BIN
src/assets/images/page4_02.png

After

Width: 1265  |  Height: 3  |  Size: 1.1 KiB

BIN
src/assets/images/page4_03.png

After

Width: 1330  |  Height: 871  |  Size: 28 KiB

BIN
src/assets/images/page4_06.png

After

Width: 467  |  Height: 170  |  Size: 53 KiB

BIN
src/assets/images/poster.png

After

Width: 1261  |  Height: 710  |  Size: 525 KiB

116
src/assets/styles/ball-running-animate.css

@ -1,116 +0,0 @@
.ball-running-dots {
position: absolute;
top: 0.2rem;
}
.left-dots {
left: 136px;
}
.right-dots {
right: 200px;
}
.ball-running-dots > div {
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.ball-running-dots {
display: block;
font-size: 0;
color: #316fd9;
}
.ball-running-dots > div {
display: inline-block;
float: none;
background-color: currentColor;
border: 0 solid currentColor;
}
.ball-running-dots {
width: 16px;
height: 16px;
}
.ball-running-dots > div {
position: absolute;
margin-left: 30px;
border-radius: 100%;
}
.left-dots > div {
animation: ball-running-dots-animate 2s linear infinite;
}
.right-dots > div {
animation: ball-running-dots-animate2 2s linear infinite;
}
.ball-running-dots > div:nth-child(1) {
animation-delay: 0s;
}
.ball-running-dots > div:nth-child(2) {
animation-delay: -0.8s;
}
.ball-running-dots > div:nth-child(3) {
animation-delay: -1.2s;
}
.ball-running-dots > div:nth-child(4) {
animation-delay: -1.6s;
}
@keyframes ball-running-dots-animate {
0%{
width: 100%;
height: 100%;
transform: translateY(0) translateX(-500%) scale(-.1);
opacity: 0.5;
}
80% {
transform: translateY(0) translateX(0);
}
85% {
width: 100%;
height: 100%;
transform: translateY(-125%) translateX(0);
}
90% {
width: 200%;
height: 75%;
}
95% {
width: 100%;
height: 100%;
transform: translateY(-100%) translateX(-500%);
}
100% {
width: 100%;
height: 100%;
transform: translateY(0) translateX(-500%);
opacity: 1;
}
}
@keyframes ball-running-dots-animate2 {
0%{
width: 100%;
height: 100%;
transform: translateY(0) translateX(500%) scale(-.1);
opacity: 0.5;
}
80% {
transform: translateY(0) translateX(0);
}
85% {
width: 100%;
height: 100%;
transform: translateY(-125%) translateX(0);
}
90% {
width: 200%;
height: 75%;
}
95% {
width: 100%;
height: 100%;
transform: translateY(-100%) translateX(500%);
}
100% {
width: 100%;
height: 100%;
transform: translateY(0) translateX(500%);
opacity: 1;
}
}

4
src/assets/styles/font-some.css

@ -35,11 +35,11 @@
font-weight: bold;
z-index: 99999;
color: #fff;
background: -webkit-linear-gradient(90deg, rgba(14,197,236,1) 20%,rgba(239,252,254,1) 70%);
/* background: -webkit-linear-gradient(90deg, rgba(14,197,236,1) 20%,rgba(239,252,254,1) 70%);
background: linear-gradient(90deg, rgba(14,197,236,1) 20%,rgba(239,252,254,1) 70%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-text-fill-color: transparent; */
text-shadow: 0 2px 8px rgba(5,28,55,0.42);
}
.number-item:last-child {

547
src/assets/styles/index.scss

@ -1,3 +1,4 @@
#screen-container {
width: 100%;
height: 100vh;
@ -6,6 +7,7 @@
color: #fff;
overflow: hidden;
background: url('~@/assets/images/bg.png') no-repeat top center #02061a;
font-family: 'DingTalk_JinBuTi_Regular';
}
.page-wrapper{
@ -18,7 +20,9 @@
padding-top: 1.5625rem;
overflow: hidden;
}
.page-four-wrapper{
background: #000629;
}
.loading {
position: fixed;
top: 0;
@ -35,8 +39,8 @@
.header-container {
position: relative;
width: 100%;
height: 1.25rem;
font-size: .375rem;
// height: 1.25rem;
height: 1.0625rem;
color: #fff;
z-index: 9999;
// &::before,
@ -57,8 +61,11 @@
// }
.header-title {
position: relative;
width: 19.5875rem;
height: 1.25rem;
font-family: 'Microsoft YaHei';
// width: 19.5875rem;
// height: 1.25rem;
width: 18.1375rem;
height: 1.0625rem;
margin: 0 auto;
background: url('~@/assets/images/header-bg.png') no-repeat top left;
background-size: cover;
@ -75,14 +82,120 @@
color: transparent;
text-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
}
.header-bottom{
position: absolute;
left: 50%;
bottom: 0;
width: 2.45rem;
height: .075rem;
background: url('~@/assets/images/header_13_b.png') no-repeat top left;
background-size: contain;
transform: translateX(-47%);
overflow: hidden;
.bottom-block{
position: absolute;
// left: 50%;
bottom: 0;
width: .8rem;
height: .0625rem;
background: url('~@/assets/images/header_13.png') no-repeat top left;
background-size: contain;
transform: translateX(-50%) rotate(180deg);
animation: runblock 3s infinite;
}
}
}
@keyframes runblock{
0%{
left: calc(.375rem);
}
50%{
left: calc(100% - .375rem);
}
100%{
left: calc(.375rem);
}
}
.dot-container {
display: flex;
justify-content: space-around;
width: .75rem;
}
.dot {
width: .1375rem;
height: .075rem;
margin-right: .075rem;
animation: blink 1s infinite;
}
.left-dots{
position: absolute;
left: 2.25rem;
top: .0625rem;
.dot:nth-child(1) {
background: url('~@/assets/images/header_03.png') no-repeat top left;
background-size: contain;
}
.dot:nth-child(2) {
background: url('~@/assets/images/header_05.png') no-repeat top left;
background-size: contain;
}
.dot:nth-child(3) {
background: url('~@/assets/images/header_07.png') no-repeat top left;
background-size: contain;
}
.dot:nth-child(3) {
animation-delay: 0.4s;
}
}
.right-dots{
position: absolute;
right: 2rem;
top: .0625rem;
.dot:nth-child(1) {
background: url('~@/assets/images/header_07.png') no-repeat top left;
background-size: contain;
}
.dot:nth-child(2) {
background: url('~@/assets/images/header_05.png') no-repeat top left;
background-size: contain;
}
.dot:nth-child(3) {
background: url('~@/assets/images/header_03.png') no-repeat top left;
background-size: contain;
}
.dot:nth-child(1) {
animation-delay: 0.4s;
}
}
.dot:nth-child(2) {
animation-delay: 0.2s;
}
@keyframes blink {
0% {
opacity: 0.2;
}
20% {
opacity: 1;
}
100% {
opacity: 0.2;
}
}
.header-text {
position: absolute;
}
.header-weather {
top: .1875rem;
width: 3.125rem;
right: -.2rem;
top: .3125rem;
width: 2.5rem;
right: 0.25rem;
overflow: hidden;
}
.header-date {
@ -92,6 +205,7 @@
justify-content: flex-start;
align-items: center;
.time {
width: 130px;
font-size: .375rem;
font-weight: bold;
line-height: .375rem;
@ -170,6 +284,7 @@
justify-content: space-between;
height: 6.25rem;
margin-top: .1875rem;
// font-family: 'SourceHanSansSC-Normal';
.database-left,
.database-right {
width: 5.7875rem;
@ -183,9 +298,6 @@
display: flex;
justify-content: center;
align-items: center;
& img{
display: block;
}
.middle-item{
position: absolute;
width: 1.975rem;
@ -229,6 +341,178 @@
}
}
.database-box {
position: relative;
transform-style: preserve-3d;
animation: hovering 2s infinite alternate-reverse ease-in-out;
}
.logo {
display: block;
// margin-top: 50px;
// margin-left: 50px;
width: 5.825rem;
height: 6.4125rem;
position: relative;
}
.logo:after {
position: absolute;
top: 0;
left: 0;
content: "";
width: 5.825rem;
height: 6.4125rem;
background: url('~@/assets/images/database-middle.png') no-repeat center center;
background-size: contain;
// margin-left: -25px;
// transform: scale(0.9);
transition: 5s ease-out;
}
.logo:hover:after {
transform: scale(1);
}
.ring {
pointer-events: none;
width: 5.825rem;
height: 5.825rem;
position: absolute;
top: 0;
left: 0;
transform-style: preserve-3d;
}
.ring .particle {
content: "";
position: absolute;
top: 0;
left: 0;
border: 10px solid;
width: 5.825rem;
height: 5.825rem;
border-radius: 50%;
border-top: 0;
border-left: 0;
border-bottom: 0;
box-shadow: 0 0 1px 0px currentColor;
transform-style: preserve-3d;
}
.ring .particle:after {
position: absolute;
top: 100%;
left: 50%;
display: block;
content: "";
width: 5px;
height: 5px;
background: currentColor;
border-radius: 50%;
box-shadow: 0 0 5px 0px white;
}
.ring1 {
color: rgba(44, 198, 255,1);
animation: rotateAnimate1 16s infinite reverse linear;
}
.ring1 .particle {
-webkit-animation: rotateAnimate1 6s infinite linear;
animation: rotateAnimate1 6s infinite linear;
}
.ring2 {
color: rgba(255, 255, 255,1);
animation: rotateAnimate1 16s infinite reverse linear;
}
.ring2 .particle {
// margin-top: 15px;
// margin-left: 15px;
width: 5.575rem;
height: 5.575rem;
-webkit-animation: rotateAnimate2 6s infinite linear;
animation: rotateAnimate2 6s infinite linear;
}
.ring2 .particle:after {
top: 0%;
}
.ring3 {
color: rgba(14, 93, 182, 1);
animation: rotateAnimate1 16s infinite reverse linear;
}
.ring3 .particle {
// margin-top: 30px;
// margin-left: 30px;
width: 5.575rem;
height: 5.575rem;
-webkit-animation: rotateAnimate3 6s infinite linear;
animation: rotateAnimate3 6s infinite linear;
}
@-webkit-keyframes rotateAnimate1 {
0% {
transform: rotateX(45deg) rotateZ(0deg);
}
100% {
transform: rotateX(45deg) rotateZ(360deg);
}
}
@keyframes rotateAnimate1 {
0% {
transform: rotateX(45deg) rotateZ(0deg);
}
100% {
transform: rotateX(45deg) rotateZ(360deg);
}
}
@-webkit-keyframes rotateAnimate2 {
0% {
transform: rotateY(45deg) rotateX(-45deg) rotateZ(0deg);
}
100% {
transform: rotateY(45deg) rotateX(-45deg) rotateZ(-360deg);
}
}
@keyframes rotateAnimate2 {
0% {
transform: rotateY(45deg) rotateX(-45deg) rotateZ(0deg);
}
100% {
transform: rotateY(45deg) rotateX(-45deg) rotateZ(-360deg);
}
}
@-webkit-keyframes rotateAnimate3 {
0% {
transform: rotateY(-45deg) rotateX(-45deg) rotateZ(180deg);
}
100% {
transform: rotateY(-45deg) rotateX(-45deg) rotateZ(540deg);
}
}
@keyframes rotateAnimate3 {
0% {
transform: rotateY(-45deg) rotateX(-45deg) rotateZ(180deg);
}
100% {
transform: rotateY(-45deg) rotateX(-45deg) rotateZ(540deg);
}
}
@-webkit-keyframes hovering {
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(0, -10px, 0);
}
}
@keyframes hovering {
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(0, -10px, 0);
}
}
.small-module{
height: .4rem;
overflow: hidden;
@ -251,18 +535,18 @@
justify-content: space-between;
align-items: center;
flex-wrap: nowrap;
padding: .625rem .4rem 0 .125rem;
padding: .625rem .275rem 0 .125rem;
.allTotal{
width: 2.5rem;
width: 48%;
height: 1.1rem;
padding-left: 1.2125rem;
padding-left: 1.125rem;
background: url('~@/assets/images/database-icon1.png') no-repeat left top;
background-size: 100% 100%;
}
.currentNum{
width: 2.5rem;
width: 48%;
height: 1.1rem;
padding-left: 1.2125rem;
padding-left: 1.125rem;
background: url('~@/assets/images/database-icon2.png') no-repeat left top;
background-size: 100% 100%;
}
@ -271,7 +555,7 @@
display: inline-block;
width: .275rem;
height: 100%;
line-height: .175rem;
line-height: 0.15rem;
overflow: hidden;
writing-mode: vertical-lr;
text-orientation: upright;
@ -280,11 +564,11 @@
text-align: center;
transition: transform 0.6s ease-in-out;
color: #fff;
background: -webkit-linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
background: linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
// background: -webkit-linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
// background: linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
// -webkit-background-clip: text;
// background-clip: text;
// -webkit-text-fill-color: transparent;
text-shadow: 0 2px 8px rgba(5,28,55,0.42);
}
}
@ -301,9 +585,9 @@
justify-content: flex-start;
}
.flop-figure {
width: .275rem;
width: 26px;
i {
font-size: .275rem;
font-size: .3rem;
font-weight: bold;
}
}
@ -313,11 +597,11 @@
left: 0;
font-size: .275rem;
color: #fff;
background: -webkit-linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
background: linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
// background: -webkit-linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
// background: linear-gradient(90deg, rgba(14,197,236,1) 10%,rgba(239,252,254,1) 100%);
// -webkit-background-clip: text;
// background-clip: text;
// -webkit-text-fill-color: transparent;
text-shadow: 0 2px 8px rgba(5,28,55,0.42);
}
}
@ -330,25 +614,21 @@
}
}
.flop-item-name{
font-size: .1875rem;
font-size: .225rem;
}
}
// 左边进度条
.pageOne-left-progress{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 0 .475rem 0 .35rem;
padding: 0 .375rem 0 .5rem;
li{
position: relative;
width: 2.2rem;
font-size: .175rem;
padding-left: .2875rem;
font-size: .225rem;
padding-left: .1625rem;
margin-top: .7rem;
p{
position: relative;
@ -367,7 +647,7 @@
position: absolute;
right: 0;
top: 0;
font-size: .25rem;
font-size: .3rem;
font-weight: bold;
color: #fff;
background: -webkit-linear-gradient(to bottom, #fff 40%, #69A4D6 60%);
@ -420,7 +700,6 @@
}
}
// pageOne 底部图书
.pageOne-book{
background-color: #031437;
@ -475,6 +754,7 @@
left: 0;
top: 0;
background-size: cover;
font-family: 'DingTalk_JinBuTi_Regular';
.map-content{
display: flex;
justify-content: space-around;
@ -544,6 +824,7 @@
line-height: 0.45rem;
span{
display: block;
&:last-child{
font-size: .3rem;
color: #fff;
@ -560,7 +841,7 @@
0 0 90px rgba(18,104,245, 0.24),
0 0 100px rgba(18,104,245, 0.24);
i{
color: #B5C1D1;
color: rgba(154, 197, 255, 0.4);
font-size: .2rem;
font-weight: normal;
padding-left: .075rem;
@ -601,17 +882,23 @@
}
}
}
.lib-text{
width: 100%;
.scroll-container{
position: relative;
width: calc(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;
padding: .25rem 0 0 .2875rem;
overflow: hidden;
overflow-y: scroll;
// border: 1px solid red;
}
.lib-text{
position: absolute;
// transition: top 1s linear;
margin-right: .175rem;
font-size: 18px;
line-height: .35rem;
color: #ADC7FF;
}
}
.map-hx-bg{
@ -638,10 +925,10 @@
.map-hx-big{
width: 12.5rem;
height: 12.5rem;
border-radius: 50%;
// border-radius: 50%;
overflow: hidden;
background: url('~@/assets/images/map-hx-big2.png') no-repeat center center;
background-size: cover;
background-size: contain;
position: fixed;
left: 50%;
top: 50%;
@ -659,7 +946,6 @@
.read-num{
width: 5.9375rem;
// height: 10.45rem;
background-color: rgba(10, 26, 66, .6);
.online{
height: 1.6875rem;
@ -669,11 +955,11 @@
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;
@ -710,7 +996,6 @@
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;
@ -720,8 +1005,9 @@
justify-content: space-around;
text-align: center;
align-items: center;
font-size: .15rem;
font-size: .225rem;
color: #79B8FF;
line-height: .5rem;
background: linear-gradient(90deg, rgba(66,139,221,0.2), rgba(66,139,221,0));
li {
&:last-child{
@ -733,7 +1019,7 @@
li{
display: flex;
justify-content: space-around;
font-size: .175rem;
font-size: .225rem;
color: #eef6ff;
line-height: .375rem;
padding-top: .125rem;
@ -772,26 +1058,30 @@
}
}
.tooltip-main{
font-family: 'DingTalk_JinBuTi_Regular';
position: relative;
min-width: 3rem;
// min-width: 3rem;
width: 4rem;
// text-wrap: wrap;
.tooltip-line{
width: .15rem;
height: 0;
background: url('~@/assets/images/line.png') no-repeat top left;
position: absolute;
left: -0.25rem;
bottom: -0.625rem;
left: -0.225rem;
bottom: -0.25rem;
transform-origin: bottom center;
animation: growBar 1s forwards;
}
}
.tooltip-content{
height: 1.8125rem;
opacity: 0;
line-height: .4125rem;
line-height: .35rem;
border: 1px solid #D1793D;
background-color: rgba(0,31,87,0.8);
animation: slideInFromLeft 1s forwards;
animation-delay:1s;
animation-delay: 2s;
.title{
width: 100%;
padding: .05rem .1875rem;
@ -800,9 +1090,10 @@
background: linear-gradient(90deg, rgba(255, 116, 32, 1), rgba(255,255,255,0.22));
}
.place{
text-wrap: wrap;
padding: .125rem .1875rem;
font-size: 0.2rem;
color: rgba(197, 209, 232, 1);
color: #fff;
}
}
@keyframes growBar {
@ -820,6 +1111,7 @@
justify-content: space-between;
flex-wrap: wrap;
padding: 0 .525rem 0 .45rem;
font-family: 'DingTalk_JinBuTi_Regular';
.three-item{
width: 11.25rem;
margin-bottom: .575rem;
@ -833,25 +1125,29 @@
margin-bottom: 0;
}
.database-title{
width: 6.0375rem;
// width: 6.0375rem;
height: .6rem;
font-weight: bold;
background: url('~@/assets/images/title-big.png') no-repeat -0.2rem top;
background-size: cover;
}
.three-lending{
display: flex;
justify-content: space-between;
padding: .1875rem .3125rem 0 .4125rem;
h5{
font-size: .2rem;
font-size: .225rem;
color: #47A6FF;
}
.three-lending-left{
.totalItem{
.pageLeft-flop-box{
position: relative;
height: .9125rem;
height: 73px;
margin: .2875rem 0 .4rem 0;
overflow: hidden;
& div:first-child {
height: .9125rem;
height: 70px;
overflow: hidden;
display: flex;
align-items: center;
@ -860,10 +1156,11 @@
.flop-figure {
position: relative;
display: inline-block;
width: .675rem;
width: 56px;
height: 100%;
line-height: .625rem;
padding: .125rem 0;
line-height: 44px;
letter-spacing: 20px;
padding: 8px 0;
overflow: hidden;
writing-mode: vertical-lr;
text-orientation: upright;
@ -875,7 +1172,7 @@
font-size: .6rem;
font-weight: 600;
position: absolute;
text-align: center;
// text-align: center;
transition: transform 0.6s ease-in-out;
color: #BFE0FF;
}
@ -910,4 +1207,118 @@
}
}
}
}
// page4
.page-four{
display: flex;
justify-content: space-between;
padding: 0 .4rem 0 .55rem;
font-family: 'DingTalk_JinBuTi_Regular';
}
.four-video{
width: 16.625rem;
height: 10.875rem;
padding: 0 .375rem;
background: url('~@/assets/images/page4_03.png') no-repeat top left;
background-size: cover;
overflow: hidden;
h4{
height: .9rem;
line-height: 1.05rem;
font-size: .325rem;
font-weight: bold;
color: #DFFDFE;
background: url('~@/assets/images/page4_02.png') no-repeat bottom left;
background-size: 100% .0375rem;
}
}
.four-right{
width: 5.9375rem;
display: flex;
flex-wrap: wrap;
flex-direction: column;
justify-content: space-between;
align-items: center;
.database-title{
font-weight: bold;
}
}
.four-notice,
.four-ranking{
width: 5.9375rem;
background-color: #011244;
}
.four-notice{
height: 3rem;
.seamless-warp{
position: relative;
width: calc(100%);
height: 2.25rem;
margin-top: .125rem;
overflow: hidden;
.notice-text{
position: absolute;
padding: .4125rem .375rem;
font-size: .225rem;
color: #ADC7FF;
line-height: .375rem;
// height: 1.625rem;
text-indent: 2em;
font-weight: bold;
// animation: myMove 20s linear infinite;
// animation-fill-mode: forwards;
span{
display: block;
text-align: right;
color: #7D93C2;
font-size: .2rem;
}
}
@keyframes myMove {
0% {
transform: translateY(2rem);
}
100% {
transform: translateY(-3rem);
}
}
}
}
.four-ranking{
height: 4.85rem;
&.lending-ranking{
padding: 0;
}
.ranking-cont{
margin: .25rem .375rem 0 .3125rem;
.ranking-list{
padding-top: .125rem;
}
}
}
.four-contact{
display: flex;
justify-content: center;
align-items: center;
width: 5.9375rem;
height: 2.125rem;
background: url('~@/assets/images/page4_06.png') no-repeat top left;
background-size: contain;
.wechat-img{
width: 1.35rem;
height: 1.35rem;
background: url('~@/assets/images/wechat-img2.png') no-repeat left top;
background-size: contain;
margin-right: .475rem;
text-align: center;
line-height: 1.35rem;
}
span{
display: block;
font-size: .25rem;
color: #4DDBFF;
text-align: center;
}
}

35
src/components/echart/barEcharts.vue

@ -29,7 +29,8 @@ export default {
},
data() {
return {
chart: null
chart: null,
option: null
}
},
watch: {
@ -45,8 +46,22 @@ export default {
},
mounted() {
this.drawChart()
this.resetPieChartData()
},
methods: {
//
resetPieChartData() {
clearInterval(this.timeRePie)
this.timeRePie = setInterval(() => {
// debugger;
if (!this.chart) {
return
}
// chart
this.chart.clear()
this.chart.setOption(this.option) // echarts
}, 8000)
},
drawChart() {
const app = {}
const chartDom = document.getElementById('main1')
@ -176,21 +191,24 @@ export default {
itemHeight: 6,
itemWidth: 11,
textStyle: {
color: '#fff'
color: '#fff',
fontSize: 18
},
data: [
{
name: '借出',
icon: 'rect',
textStyle: {
color: '#41A3FF'
color: '#41A3FF',
fontFamily: 'DingTalk_JinBuTi_Regular'
}
},
{
name: '归还',
icon: 'rect',
textStyle: {
color: '#FFD050'
color: '#FFD050',
fontFamily: 'DingTalk_JinBuTi_Regular'
}
}
]
@ -214,7 +232,9 @@ export default {
axisLabel: { // x
show: true,
textStyle: {
color: '#fff'
color: '#79B8FF',
fontSize: 16,
fontFamily: 'DingTalk_JinBuTi_Regular'
}
},
splitLine: { // 线
@ -236,7 +256,9 @@ export default {
axisLabel: { //
show: true,
textStyle: {
color: '#fff'
color: '#79B8FF',
fontSize: 16,
fontFamily: 'DingTalk_JinBuTi_Regular'
}
},
axisTick: { // 线
@ -275,6 +297,7 @@ export default {
}
]
}
this.option = option
option && this.chart.setOption(option)
}
}

37
src/components/echart/lineChartService.vue

@ -22,12 +22,13 @@ export default {
},
height: {
type: String,
default: 'calc(100% - 20px)'
default: '100%'
}
},
data() {
return {
chart: null
chart: null,
option: null
}
},
watch: {
@ -45,6 +46,7 @@ export default {
this.$nextTick(() => {
this.initChart()
})
this.resetPieChartData()
},
beforeDestroy() {
if (!this.chart) {
@ -54,6 +56,19 @@ export default {
this.chart = null
},
methods: {
//
resetPieChartData() {
clearInterval(this.timeRePie)
this.timeRePie = setInterval(() => {
// debugger;
if (!this.chart) {
return
}
// chart
this.chart.clear()
this.initChart()
}, 8000)
},
initChart() {
const dom = document.getElementById('main2')
this.chart = echarts.init(dom, 'dark')
@ -79,22 +94,24 @@ export default {
itemHeight: 6,
itemWidth: 11,
textStyle: {
fontSize: '16px',
color: '#339CFF'
color: '#339CFF',
fontSize: 18
},
data: [
{
name: '借出',
icon: 'rect',
textStyle: {
color: '#41A3FF'
color: '#41A3FF',
fontFamily: 'DingTalk_JinBuTi_Regular'
}
},
{
name: '归还',
icon: 'rect',
textStyle: {
color: '#FFD050'
color: '#FFD050',
fontFamily: 'DingTalk_JinBuTi_Regular'
}
}
]
@ -115,7 +132,9 @@ export default {
formatter: function(value, idx) {
return value
},
color: '#79B8FF'
color: '#79B8FF',
fontSize: 16,
fontFamily: 'DingTalk_JinBuTi_Regular'
},
axisLine: {
show: false,
@ -145,7 +164,9 @@ export default {
interval: 250,
axisLabel: {
textStyle: {
color: '#79B8FF'
color: '#79B8FF',
fontSize: 16,
fontFamily: 'DingTalk_JinBuTi_Regular'
}
},
// 线

8
src/router/index.js

@ -11,14 +11,6 @@ const routes = [
meta: {
title: '智慧大屏'
}
},
{
path: '/map',
name: 'map',
component: () => import('../views/map/index.vue'),
meta: {
title: '智慧大屏'
}
}
]

136
src/views/accessToLibrary/index.vue

@ -1,136 +0,0 @@
<template>
<div class="accessToLib-container">
<div class="accessToLib-item">
<span>总进馆人数</span>
<count-to :start-val="0" :end-val="totalNum" :duration="3200" class="panel-num" />
</div>
<div v-if="!isSelfService" class="accessToLib-item">
<span>月进馆人数</span>
<count-to :start-val="0" :end-val="monthNum" :duration="3200" class="panel-num" />
</div>
<div class="accessToLib-item">
<span>今日进馆人数</span>
<count-to :start-val="0" :end-val="dayNum" :duration="3200" class="panel-num" />
</div>
<div v-if="isSelfService" class="accessToLib-item">
<span>今日出馆人数</span>
<count-to :start-val="0" :end-val="dayOutNum" :duration="3200" class="panel-num" />
</div>
</div>
</template>
<script>
import { FetchInitIntoNum } from '@/api/library'
import CountTo from 'vue-count-to'
export default {
name: 'AccessToLibrary',
components: {
CountTo
},
props: {
isSelfService: {
type: Boolean,
default: function() {
return false
}
}
},
data() {
return {
timer: null,
dayNum: 0,
dayOutNum: 0,
monthNum: 0,
totalNum: 0,
otherDoorOther: null
}
},
created() {
//
this.getInitIntoNum()
},
mounted() {
// 15
this.timer = setInterval(() => {
this.getInitIntoNum()
}, 15000)
},
beforeDestroy() {
//
this.$once('hook:beforeDestroy', () => {
clearInterval(this.timer)
})
},
methods: {
getInitIntoNum() {
// this.otherDoorOther = window.location.href.split('?')[1]?.split('=')[1]
const currentURL = window.location.href
console.log(currentURL)
if (currentURL.indexOf('?') !== -1) {
const query = currentURL.split('?')[1]
console.log(query)
console.log(query.indexOf('startTime'))
if (query.indexOf('startTime') !== -1 || query.indexOf('endTime') !== -1) {
const paramsUrl = query.split('&')
console.log(paramsUrl)
let startTimeIndex = -1
for (let i = 0; i < paramsUrl.length; i++) {
const [key] = paramsUrl[i].split('=')
if (key === 'startTime' || key === 'endTime') {
startTimeIndex = i
break
}
}
// startTime
const filteredParams = startTimeIndex >= 0 ? paramsUrl.slice(0, startTimeIndex) : params
const newQueryString = filteredParams.join('&')
this.otherDoorOther = newQueryString.split('=')[1]
} else {
this.otherDoorOther = query.split('=')[1]
}
} else {
this.otherDoorOther = null
}
const startTime = this.$route.query.startTime
const endTime = this.$route.query.endTime
if (this.otherDoorOther && this.otherDoorOther !== '' && this.otherDoorOther.indexOf('&')) {
this.otherDoorOther = this.otherDoorOther.replace(/\&/g, '、')
} else {
this.otherDoorOther = null
}
let params
if (!this.isSelfService) {
params = {
doorCodes: this.otherDoorOther,
startTime: startTime,
endTime: endTime
}
} else {
params = {
doorCodes: 'D001',
startTime: startTime,
endTime: endTime
}
}
FetchInitIntoNum(params).then((res) => {
if (res.errCode === 0) {
this.dayNum = res.data.dayPeopleNum
this.monthNum = res.data.monthPeopleNum
this.totalNum = res.data.historyPeopleNum
this.dayOutNum = res.data.dayOutNUm
} else {
this.$message.error('接口错误')
}
})
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
</style>

33
src/views/header/index.vue

@ -9,29 +9,24 @@
</div>
<div class="header-title">
<h2>{{ headerTitle }}</h2>
<!-- <div class="line1">
<span class="top-line1" />
</div> -->
<!-- <div class="ball-running-dots left-dots">
<div />
<div />
<div />
<div />
<div class="header-bottom">
<span class="bottom-block" />
</div>
<div class="dot-container left-dots">
<div class="dot" />
<div class="dot" />
<div class="dot" />
</div>
<div class="dot-container right-dots">
<div class="dot" />
<div class="dot" />
<div class="dot" />
</div>
<div class="ball-running-dots right-dots">
<div />
<div />
<div />
<div />
</div> -->
<!-- <div class="line2">
<span class="top-line2" />
</div> -->
</div>
<div class="header-text header-weather">
<!-- 天气api: https://www.tianqi.com/plugin -->
<!-- <iframe id="weather" width="400" scrolling="no" height="30" frameborder="0" allowtransparency="true" src="https://i.tianqi.com?c=code&id=34&color=%23FFFFFF&icon=1&py=wuhan&site=18" /> -->
<iframe width="250" scrolling="no" height="25" frameborder="0" allowtransparency="true" src="https://i.tianqi.com?c=code&id=26&color=%23FFFFFF&icon=1&py=qiyang&site=12" />
<iframe height="50" frameborder="0" scrolling="no" hspace="0" src="https://i.tianqi.com/?c=code&a=getcode&id=52&icon=1&color=%23FFFFFF&py=qiyang&site=14" />
</div>
</div>
</template>
@ -77,5 +72,5 @@ export default {
<style lang="scss">
@import "~@/assets/styles/index.scss";
@import "~@/assets/styles/ball-running-animate.css";
// @import "~@/assets/styles/ball-running-animate.css";
</style>

107
src/views/index.vue

@ -4,23 +4,21 @@
<dv-loading>Loading...</dv-loading>
</div>
<Header :header-title="headerTitle" />
<div style="position: fixed; right: .175rem; top:.175rem; font-size:.175rem; background: rgba(82,146,255,0.2);border: 1px solid #5292FF; padding: 0 .075rem; line-height: .3125rem; z-index: 999;">{{ active +' / '+ pageData.length }}</div>
<div style="position: fixed; right: .175rem; top:.3125rem; font-size:.175rem; background: rgba(82,146,255,0.2);border: 1px solid #5292FF; padding: 0 .075rem; line-height: .3125rem; z-index: 999;">{{ active +' / '+ pageData.length }}</div>
<section ref="sectionRef">
<keep-alive>
<PageOne
v-if="active === 1"
ref="user"
:height="height"
:fullscreen="fullscreen"
/>
</keep-alive>
<Map
v-if="active === 2"
:height="height"
:fullscreen="fullscreen"
/>
<PageThree v-if="active === 3" />
<div v-if="active === 4">第四屏</div>
<PageFour v-if="active === 4" />
</section>
<div class="bottom-bg" />
</div>
@ -31,19 +29,20 @@ 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'
import PageFour from '@/views/pageFour/index.vue'
export default {
name: 'Home',
components: {
Header,
PageOne,
Map,
PageThree
PageThree,
PageFour
},
data() {
return {
active: 1,
active: 4,
isLoading: false,
fullscreen: false,
height: '',
headerTitle: '祁阳陶铸图书馆智慧大屏馆情数据总览',
pageData: [
@ -61,9 +60,13 @@ export default {
}
],
swiperOption: null,
pageIndex: 0,
timer: null,
timer2: null
timer2: null,
leftTimer: null,
middleTimer: null,
deviceTimer: null,
todayTimer: null,
yearTimer: null
}
},
computed: {
@ -77,33 +80,49 @@ export default {
},
beforeDestroy() {
clearInterval(this.timer2)
window.removeEventListener('resize', this.setElementHeight)
// window.removeEventListener('resize', this.setElementHeight)
},
mounted() {
this.showLoading()
this.setElementHeight()
window.addEventListener('resize', this.setElementHeight)
// this.setElementHeight()
// window.addEventListener('resize', this.setElementHeight)
this.$once('hook:beforeDestroy', () => {
clearInterval(this.timer2)
window.removeEventListener('resize', this.setElementHeight)
// window.removeEventListener('resize', this.setElementHeight)
})
this.autoPagination()
},
methods: {
autoPagination() {
clearInterval(this.timer2)
this.timer2 = setInterval(() => {
setTimeout(() => {
if (this.active >= this.pageData.length) {
this.active = 1
} else {
this.active++
}
autoPagination(active) {
console.log('active', active)
if (active === 1 || active === 3) {
clearInterval(this.timer2)
this.timer2 = setInterval(() => {
setTimeout(() => {
// if (this.active >= this.pageData.length) {
// this.active = 1
// } else {
// this.active = active + 1
// }
this.active = active + 1
// this.showLoading()
}, 0)
}, 6000)
}, 0)
}, 10000)
} else {
console.log('this.active', this.active)
this.active = active + 1
}
this.$once('hook:beforeDestroy', () => {
clearInterval(this.timer2)
clearInterval(this.leftTimer)
clearInterval(this.middleTimer)
clearInterval(this.deviceTimer)
clearInterval(this.todayTimer)
clearInterval(this.yearTimer)
this.middleTimer = null
this.leftTimer = null
this.deviceTimer = null
this.todayTimer = null
this.yearTimer = null
})
},
showLoading() {
@ -128,7 +147,6 @@ export default {
},
//
setNumberTransform(item) {
console.log(`.${item.id} i`)
const numberItems = document.querySelectorAll(`.${item.id} i`)
// const numberItems = this.$refs[`${item.id}`]
const numberArr = item.valueArr.filter(item => !isNaN(item))
@ -143,7 +161,6 @@ export default {
})
}, 15)
},
//
initInterval(targetList, time) {
const { setNumberTransform } = this
@ -158,34 +175,28 @@ export default {
},
//
timedRefresh(targetList, type) {
let leftTimer
let middleTimer
let deviceTimer
let todayTimer
let yearTimer
if (type === 'middle') {
middleTimer = this.initInterval2(targetList, 8000)
this.middleTimer = this.initInterval2(targetList, 8000)
} else if (type === 'left') {
leftTimer = this.initInterval(targetList, 10000)
this.leftTimer = this.initInterval(targetList, 10000)
} else if (type === 'device') {
deviceTimer = this.initInterval(targetList, 8000)
this.deviceTimer = this.initInterval(targetList, 8000)
} else if (type === 'todayTotal') {
todayTimer = this.initInterval(targetList, 8000)
this.todayTimer = this.initInterval(targetList, 8000)
} else if (type === 'yearTotal') {
yearTimer = this.initInterval(targetList, 10000)
this.yearTimer = this.initInterval(targetList, 10000)
}
this.$once('hook:beforeDestroy', () => {
clearInterval(leftTimer)
clearInterval(middleTimer)
clearInterval(deviceTimer)
clearInterval(todayTimer)
clearInterval(yearTimer)
middleTimer = null
leftTimer = null
deviceTimer = null
todayTimer = null
yearTimer = null
clearInterval(this.leftTimer)
clearInterval(this.middleTimer)
clearInterval(this.deviceTimer)
clearInterval(this.todayTimer)
clearInterval(this.yearTimer)
this.middleTimer = null
this.leftTimer = null
this.deviceTimer = null
this.todayTimer = null
this.yearTimer = null
})
},
setNumberTransform2(item) {

102
src/views/lengingRanking/index.vue

@ -1,102 +0,0 @@
<template>
<!-- 借阅排行榜 -->
<div class="screen-item lending-ranking">
<div class="common-title">借阅排行榜</div>
<vue-seamless-scroll
ref="listData"
:data="rankingList"
:class-option="defaultOption"
class="big-module module-content"
>
<div
v-for="(item, index) in rankingList"
:key="index"
class="book-list-item"
>
<div class="book-img">
<img :src="item.cover" :onerror="defaultImg">
</div>
<div class="book-info">
<h4 class="title-item">{{ item.bookName }}</h4>
<p>{{ item.author }}</p>
</div>
<div class="ranking-num">
<svg v-if="index === 0" class="icon" aria-hidden="true">
<use xlink:href="#icon-a-no1" />
</svg>
<svg v-if="index === 1" class="icon" aria-hidden="true">
<use xlink:href="#icon-a-no21" />
</svg>
<svg v-if="index === 2" class="icon" aria-hidden="true">
<use xlink:href="#icon-a-no3" />
</svg>
<p>NO.{{ index + 1 }}</p>
</div>
</div>
</vue-seamless-scroll>
</div>
</template>
<script>
import { FetchBorrowRank, FetchCoverByISBN } from '@/api/library'
export default {
name: 'LengingRanking',
data() {
return {
defaultImg: 'this.src="' + require('@/assets/images/default-img.png') + '"',
rankingList: []
}
},
computed: {
defaultOption() {
return {
step: 1.1, //
hoverStop: false, // stop
singleHeight: 102, // (0) direction => 0/1
openWatch: true,
waitTime: 2000 // (1000ms)
}
}
},
created() {
this.getBorrowRank()
},
mounted() {
},
methods: {
getBorrowRank() {
FetchBorrowRank().then((res) => {
if (res.errCode === 0) {
this.rankingList = res.data
this.rankingList.forEach(item => {
this.getCoverByISBN(item.isbn.replace(/\-/g, ''), item)
})
} else {
this.$message.error('接口错误')
}
})
},
getCoverByISBN(isbn, item) {
const params = {
isbn: isbn
}
FetchCoverByISBN(params).then((res) => {
console.log('RES', res)
if (res) {
// item.cover = window.URL.createObjectURL(res)
item.cover = res
} else {
item.cover = ''
}
console.log(item.cover)
this.$refs.listData.reset()
})
}
}
}
</script>
<style lang="scss">
@import '~@/assets/styles/index.scss';
</style>

91
src/views/map/index.vue

@ -11,7 +11,7 @@
</div>
</swiper-slide>
<!-- 标页码 -->
<!-- <div slot="pagination" class="swiper-pagination" /> -->
<div slot="pagination" class="swiper-pagination" />
</swiper>
<ul class="lib-cont-item lib-cont01">
<li>
@ -25,7 +25,7 @@
<img src="@/assets/images/map_20.png" alt="">
<p>
<span>办证量</span>
<span>74<i></i></span>
<span>74<i></i></span>
</p>
</li>
</ul>
@ -38,7 +38,9 @@
</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 class="scroll-container">
<div ref="marquee" class="lib-text" :style="{ top: position + 'px' }">关于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的通知关于XXX的通知关于XXX的通知关于XXX的通关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通知关于XXX的通</div>
</div>
</div>
</div>
<div ref="chart" style="flex: 1; margin:0 .125rem; z-index: 9999;" />
@ -49,7 +51,7 @@
<div class="read-num">
<div class="database-title">读者统计</div>
<div class="online">
<p>当前在馆人数</p>
<p>累计办证人数</p>
<p class="num"><span>156</span><i></i></p>
</div>
<div class="lending-ranking">
@ -87,6 +89,7 @@ import { swiper, swiperSlide } from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
export default {
name: 'Map',
components: {
swiper, swiperSlide
},
@ -140,7 +143,10 @@ export default {
{ id: 9, num: 70, name: '胡1' },
{ id: 10, num: 60, name: '胡图图' }
],
rankingWithPercentage: []
rankingWithPercentage: [],
timer: null,
position: 0,
speed: 2 //
}
},
computed: {
@ -151,6 +157,7 @@ export default {
beforeDestroy() {
clearTimeout(this.timeTicket)
window.removeEventListener('resize', this.resize)
this.stopScrolling()
},
created() {
this.libInfoData = libJsonData
@ -164,8 +171,39 @@ export default {
window.addEventListener('resize', debounce(this.resize, 2000)) // 使
}, 300)
this.rankingDataComputed()
this.startScrolling()
},
methods: {
escapeHtml(str) {
var arrEntities = {
'lt': '<',
'gt': '>',
'nbsp': ' ',
'amp': '&',
'quot': '"'
}
return str.replace(/&(lt|gt|nbsp|amp|quot|pre);/ig, function(all, t) {
return arrEntities[t]
})
},
startScrolling() {
this.timer = setInterval(() => {
this.position -= this.speed
//
const containerHeight = document.getElementsByClassName('scroll-container')[0].offsetHeight
const contentHeight = this.$refs.marquee.offsetHeight
if (contentHeight <= containerHeight) {
this.position = 20
} else if (Math.abs(this.position) >= contentHeight) {
this.position = containerHeight
}
}, 40)
},
stopScrolling() {
if (this.timer) {
clearInterval(this.timer)
}
},
rankingDataComputed() {
const firstPlaceNum = this.rankingData[0].num
this.rankingWithPercentage = this.rankingData.map(item => {
@ -182,8 +220,6 @@ export default {
const percentage = (item.num / firstPlaceNum) * 100
return { ...item, percentage }
})
console.log(this.rankingWithPercentage)
},
initChart() {
this.$echarts.registerMap('qiyang', mapJson) // map
@ -194,10 +230,10 @@ export default {
mapImg.src = require('../../assets/images/map-bg2.png')
var XAData = [
[{ name: '陶铸图书馆' }, { name: '陶铸图书馆', value: '陶铸' }],
[{ name: '陶铸图书馆' }, { name: '龙山街道分馆', value: '龙山街道' }],
[{ name: '陶铸图书馆' }, { name: '黎家坪分馆', value: '黎家坪' }],
[{ name: '陶铸图书馆' }, { name: '大村甸分馆', value: '大村甸' }],
[{ name: '陶铸图书馆' }, { name: '陶铸图书馆', value: '陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸陶铸' }],
[{ name: '陶铸图书馆' }, { name: '龙山街道分馆', value: '龙山街道龙山街道龙山街道龙山街道龙山街道龙山街道' }],
[{ name: '陶铸图书馆' }, { name: '黎家坪分馆', value: '龙山街道龙山街道龙山街道龙山街道龙山街道龙山街道' }],
[{ name: '陶铸图书馆' }, { name: '大村甸分馆', value: '龙山街道龙山街道龙山街道龙山街道龙山街道' }],
[{ name: '陶铸图书馆' }, { name: '邵家岭自助馆', value: '邵家岭' }],
[{ name: '陶铸图书馆' }, { name: '下马渡分馆', value: '下马渡' }],
[{ name: '陶铸图书馆' }, { name: '复兴路自助馆', value: '复兴路' }],
@ -345,12 +381,12 @@ export default {
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] + 15, point[1] - 144]
// console.log('point', point)
// console.log('params', params)
// console.log('dom', dom)
// console.log('rect', rect)
// console.log('size', size)
return [point[0] + 14, point[1] - 164]
},
formatter: (params, ticket, callback) => {
if (params.seriesType === 'effectScatter') {
@ -472,7 +508,7 @@ export default {
repeat: 'repeat'
}, //
borderColor: '#9ffcff',
borderWidth: 5,
borderWidth: 3,
shadowColor: '#4cd4eb',
shadowOffsetX: 0,
shadowOffsetY: 0,
@ -613,7 +649,6 @@ export default {
// adcode: item.properties.adcode
// }
// })
//
// const scatterData = libJsonData
// const scatterData = mapData.map((item) => {
@ -628,7 +663,6 @@ export default {
// // adcode: item.adcode,
// }
// })
// const updateOption = {
// series: [
// {
@ -644,9 +678,12 @@ export default {
// }
this.len = this.seriesData[0].data.length //
console.log('this.len', this.seriesData[0].data)
// this.myChart.setOption(updateOption)
this.libIndex = this.count % this.len
this.libCurrent = this.libInfoData[this.libIndex]
console.log('this.libIndex', this.libIndex)
console.log('this.libCurrent', this.libCurrent)
this.initSwiper()
this.updatePageWithData()
this.autohover()
@ -707,7 +744,7 @@ export default {
const shuffledLibImg = this.libImg.slice().sort(() => Math.random() - 0.5) //
this.displayedImages = shuffledLibImg.slice(0, displayCount)
this.currentIndex = 0
this.currentIndex = 20
this.swiperKey += 1
if (this.displayedImages.length === 1) {
@ -715,6 +752,8 @@ export default {
this.count++
this.libIndex = this.count % this.len
this.libCurrent = this.libInfoData[this.libIndex]
console.log('updatePageWithData-libIndex', this.libIndex)
console.log('updatePageWithData-libCurrent', this.libCurrent)
this.updatePageWithData()
this.autohover()
}, 5000)
@ -756,22 +795,20 @@ export default {
},
on: {
slideChangeTransitionEnd() {
// if (_self.isPage2) {
// _self.$refs.mySwiper.swiper.update()
// _self.$refs.mySwiper.swiper.autoplay.start()
// } else {
// _self.$refs.mySwiper.swiper.autoplay.stop()
// }
_self.currentIndex = this.activeIndex
if (_self.currentIndex === _self.displayedImages.length - 1) {
setTimeout(() => {
if (_self.count === _self.libInfoData.length - 1) {
_self.count = 0
_self.$parent.autoPagination(2)
} else {
_self.count++
}
_self.libIndex = _self.count % _self.len
_self.libCurrent = _self.libInfoData[_self.libIndex]
console.log('_self.count', _self.count)
console.log('_self.libIndex', _self.libIndex)
console.log('_self.libCurrent', _self.libCurrent)
_self.updatePageWithData()
_self.autohover()
_self.currentIndex = 0

181
src/views/newBookRecommend/index.vue

@ -1,181 +0,0 @@
<template>
<!-- 新书推荐 -->
<div class="screen-item lending-ranking">
<div class="common-title">图书推荐</div>
<div ref="newbook" class="big-module module-content">
<swiper v-if="rankingList.length > 1" ref="swiperThumbs" class="swiper gallery-thumbs directive" :options="swiperOptionThumbs">
<swiper-slide v-for="(item,index) in rankingList" :key="index" class="slide-1">
<div class="newbook-list-item">
<div class="book-img">
<img :src="item.cover" :onerror="defaultImg">
</div>
<div class="book-info">
<h4 class="title-item">{{ item.nbName }}</h4>
<p>{{ item.nbAuthor }}</p>
</div>
<!-- <div class="ranking-num">
<svg v-if="index === 0" class="icon" aria-hidden="true">
<use xlink:href="#icon-a-no1" />
</svg>
<svg v-if="index === 1" class="icon" aria-hidden="true">
<use xlink:href="#icon-a-no21" />
</svg>
<svg v-if="index === 2" class="icon" aria-hidden="true">
<use xlink:href="#icon-a-no3" />
</svg>
<p>NO.{{ index+1 }}</p>
</div> -->
</div>
</swiper-slide>
</swiper>
</div>
</div>
</template>
<script>
import { FetchNewBookRecommend, FetchCoverByISBN } from '@/api/library'
import { swiper, swiperSlide } from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
// import data from './data.json'
export default {
name: 'NewBookRecommend',
components: {
swiper,
swiperSlide
},
data() {
return {
defaultImg: 'this.src="' + require('@/assets/images/default-img.png') + '"',
rankingList: [],
swiperOptionThumbs: {
loopedSlides: 6,
direction: 'vertical',
slidesPerView: 6,
slidesPerGroup: 6,
slidesPerColumn: 2,
autoplay: true
// centeredSlides: true,
// autoScrollOffset: true
}
}
},
computed: {
swiper() {
return this.$refs.swiperThumbs.swiper
}
},
created() {
},
mounted() {
// this.rankingList = data
this.getNewBookRecommend()
},
methods: {
getNewBookRecommend() {
const params = {
libcode: this.libcode,
pageNo: 1,
pageSize: 100
}
FetchNewBookRecommend(params).then(res => {
if (res.errCode === 0) {
let data = []
data = res.data.newbookList
data.forEach(item => {
this.getCoverByISBN(item.isbn.replace(/\-/g, ''), item)
})
} else {
this.$message.error('接口错误')
}
})
},
getCoverByISBN(isbn, item) {
const params = {
isbn: isbn
}
FetchCoverByISBN(params).then((res) => {
console.log(res)
// item.cover = window.URL.createObjectURL(res)
if (res) {
// item.cover = window.URL.createObjectURL(res)
item.cover = res
} else {
item.cover = ''
}
this.rankingList.push(item)
})
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
// .screen-main .lending-ranking .module-content{
// padding: 0 .25rem !important;
// }
.swiper-container{
overflow: hidden;
}
.swiper {
width: 100%;
height: 6rem !important;
margin: .4rem 0;
overflow: hidden;
.swiper-wrapper{
// display: flex;
// flex-wrap: wrap;
// flex-direction: row !important;
// justify-content: flex-start;
}
&.gallery-thumbs {
// margin: 0.4rem 0;
}
&.gallery-thumbs .swiper-slide {
width: calc(100% / 3);
height: 2.8rem !important;
// padding: .1rem 0 0 0;
margin-top: 0.1rem;
margin-bottom: 0.1rem;
}
// &.gallery-thumbs .swiper-slide-active {
// // background-color: #09194B;
// }
}
.newbook-list-item{
.book-img{
width: 1.325rem;
height: 1.775rem;
background: url('~@/assets/images/default-img.png') no-repeat center center;
background-size: contain;
display: flex;
align-items: center;
overflow: hidden;
margin: 0 auto 0.25rem auto;
img{
display: block;
width: 100%;
// height: 100%;
}
}
.book-info{
h4{
font-size: 0.25rem;
line-height: .3rem;
font-weight: normal;
}
p{
font-size: 0.2rem;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
</style>

73
src/views/notice/index.vue

@ -1,73 +0,0 @@
<template>
<!-- 通知公告 -->
<div class="screen-item notice">
<div class="common-title">通知公告</div>
<div class="small-module module-content">
<span class="notice-icon-gif" />
<div class="seamless-warp">
<div class="notice-txt" v-html="content" />
</div>
<!-- <vue-seamless-scroll :data="noticeData" :class-option="defaultOption" class="seamless-warp">
<p v-for="(item,index) in noticeData" :key="index"> {{ item.des }}</p>
</vue-seamless-scroll> -->
</div>
</div>
</template>
<script>
import { FetchInitNotice } from '@/api/library'
export default {
name: 'Notice',
data() {
return {
noticeData: [],
content: ''
}
},
computed: {
defaultOption() {
return {
step: 0.3, //
limitMoveNum: 1, //
hoverStop: false, // stop
direction: 1, // 0 1 2 3
openWatch: true // dom
}
}
},
created() {
},
mounted() {
this.getInitNotice()
},
methods: {
//
escapeHtml(str) {
var arrEntities = {
'lt': '<',
'gt': '>',
'nbsp': ' ',
'amp': '&',
'quot': '"'
}
return str.replace(/&(lt|gt|nbsp|amp|quot|pre);/ig, function(all, t) {
return arrEntities[t]
})
},
getInitNotice() {
FetchInitNotice().then((res) => {
if (res.errCode === 0) {
this.content = this.escapeHtml(res.data)
} else {
this.$message.error('接口错误')
}
})
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
</style>

210
src/views/pageFour/index.vue

@ -0,0 +1,210 @@
<template>
<div class="page-wrapper page-four-wrapper">
<div class="page-four">
<div class="four-video">
<h4>{{ slideData[videoIndex].title }}</h4>
<el-carousel
ref="carousel"
height="710px"
indicator-position="none"
:autoplay="false"
:autoplay-hover-pause="true"
@change="carouselChange"
>
<div v-if="slideData && slideData.length > 0">
<el-carousel-item v-for="(item, index) in slideData" :key="index">
<video
ref="videos"
class="tsgz-video"
width="100%"
height="100%"
controls="controls"
:src="item.videoSrc"
:poster="poster"
autoplay
type="video/mp4"
muted
@ended="playNextVideo(index)"
>
您的浏览器不支持 video 标签
</video>
</el-carousel-item>
</div>
<el-empty
v-else
description="暂无视频"
style="height: 710px"
:image-size="40"
image=""
/>
</el-carousel>
</div>
<div class="four-right">
<div class="four-notice">
<div class="database-title">重要通知</div>
<!-- <div class="notice-text">
<p>本馆于2019年12月12日闭馆一天请大家安排好入馆时间,谢谢!本馆于2019年12月12日闭馆一天请大家安排好入馆时间,谢谢!</p>
<span>管理员 2020/08/12</span>
</div> -->
<div class="seamless-warp">
<div ref="marquee" class="notice-text" :style="{ top: position + 'px' }" v-html="content" />
</div>
</div>
<div class="four-ranking lending-ranking">
<div class="database-title">图书借阅排行榜</div>
<div class="ranking-cont">
<ul class="ranking-title">
<li style="width: 0.725rem;">排名</li>
<li style="width: 1.5rem; text-align: left;">图书馆名称</li>
<li style="flex:1;" />
<li style="width: 1.25rem; padding-right: .25rem; text-align: right;">借阅数量</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: 1.5rem; text-align: left;">{{ item.name }}</div>
<div class="ranking-progress" style="flex:1; align-self: center;">
<el-progress :percentage="item.percentage" :stroke-width="8" :show-text="false" color="#009afb" />
</div>
<div style="width: 1.25rem; padding-right: .25rem; text-align: right;">{{ item.num }}<i style="padding-left:.0625rem;"></i></div>
</li>
</ul>
</div>
</div>
<div class="four-contact">
<div class="wechat-img">
二维码
</div>
<span>扫一扫关注我们</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'PageFour',
data() {
return {
content: '本馆于2019年12月12日闭馆一天,请大家安排好入馆时间,谢谢!本馆于2019年12月12日闭馆一天,请大家安排好入馆时间,谢谢!',
poster: require('@/assets/images/poster.png'),
videoIndex: 0,
slideData: [
{
title: '第一个视频',
videoSrc: require('@/assets/video/Atlas跑酷的成功与失败|2021【Boston Dynamics】.mp4')
// videos: [{ video: require('@/assets/video/Atlas2021Boston Dynamics.mp4') }]
},
{
title: '第二个视频',
videoSrc: require('@/assets/video/1608277325000.mp4')
// videos: [{ video: require('@/assets/video/1608277325000.mp4') }]
},
{
title: '第三个视频',
videoSrc: require('@/assets/video/20220414085212.mp4')
// videos: [{ video: require('@/assets/video/20220414085212.mp4') }]
}
],
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: '资源环境学院' }
],
rankingWithPercentage: [],
timer: null,
position: 0,
speed: 2 //
}
},
computed: {
},
beforeDestroy() {
this.stopScrolling()
},
created() {
},
mounted() {
this.rankingDataComputed()
this.startScrolling()
},
methods: {
//
startScrolling() {
this.timer = setInterval(() => {
this.position -= this.speed
//
const containerHeight = document.getElementsByClassName('seamless-warp')[0].offsetHeight
const contentHeight = this.$refs.marquee.offsetHeight
if (contentHeight <= containerHeight) {
this.position = 20
} else if (Math.abs(this.position) >= contentHeight) {
this.position = containerHeight
}
}, 40)
},
stopScrolling() {
if (this.timer) {
clearInterval(this.timer)
}
},
carouselChange(index) {
const videos = this.$refs.videos
this.videoIndex = index
videos.forEach((video) => {
video.currentTime = 0 //
video.pause() //
})
videos[index].play()
},
playNextVideo(index) {
const videos = this.$refs.videos
let nextIndex = index
this.videoIndex = nextIndex
if (index < this.slideData.length - 1) {
nextIndex = nextIndex + 1
} else {
nextIndex = 0
}
const carousel = this.$refs.carousel
carousel.setActiveItem(nextIndex)
const nextVideo = videos[nextIndex]
videos.forEach((video) => {
video.pause()
video.currentTime = 0
})
console.log('this.videoIndex.length ', this.videoIndex)
console.log('this.slideData.length ', this.slideData.length)
if (this.videoIndex === this.slideData.length - 1) {
this.$parent.autoPagination(0)
}
setTimeout(() => {
nextVideo.play()
}, 1000)
},
rankingDataComputed() {
const firstPlaceNum = this.rankingData[0].num
this.rankingWithPercentage = this.rankingData.map(item => {
const percentage = (item.num / firstPlaceNum) * 100
return { ...item, percentage }
})
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
.el-carousel{
margin-top: 0.475rem;
}
video {
width: 100%;
height: 100%;
}
</style>

289
src/views/pageFour/module/video.vue

@ -0,0 +1,289 @@
<template>
<div id="carousel">
<h4>{{ slideData[beginValue].title }}</h4>
<div
ref="carousel"
class="carousel"
:style="{ height: height + 'px' }"
>
<transition-group tag="ul" class="slide clearfix" :name="transitionName">
<li
v-for="(item, index) in slideData"
v-show="index == beginValue"
:key="index"
:style="{ height: height + 'px' }"
style="display: flex"
>
<!-- 播放视频 -->
<div v-for="(v, e) in item.videos" :key="e" class="videos">
<video
ref="videoPlay"
muted=""
:src="v.video"
controls="controls"
:autoplay="autoPlay"
loop="loop"
style="width: 100%; height: 100%"
@timeupdate="handleTimeUpdate"
/>
</div>
<!-- <div class="up" @click="up"> &lt; </div>
<div class="next" @click="next"> &gt;</div> -->
</li>
</transition-group>
</div>
</div>
</template>
<script>
import 'videojs-contrib-hls'
export default {
name: 'Carousel',
props: {
height: {
type: Number,
default: 710
},
dot: {
type: Boolean,
default: true
},
arrow: {
type: Boolean,
default: true
},
interval: {
type: Number,
default: 5000
},
begin: {
type: Number,
default: 0
},
slideData: {
type: Array,
default: function() {
return []
}
}
},
data() {
return {
setInterval: '',
beginValue: 0,
transitionName: 'slide',
mytime_02: true,
videoDuration: 0,
currentTime: 0
}
},
beforeDestroy() {
// ,
clearInterval(this.setInterval)
},
mounted() {
// var box = this.$refs.carousel; //
// box.addEventListener("mouseover", () => {
// this.mouseOver();
// });
// box.addEventListener("mouseout", () => {
// this.mouseOut();
// });
this.beginValue = this.begin
this.play()
},
methods: {
handleTimeUpdate(e) {
this.currentTime = parseInt(e.target.currentTime)
this.videoDuration = Math.floor(e.target.duration)
if (!this.mytime_02) {
return
} //
this.mytime_02 = false
setTimeout(() => {
console.log('currentTime', this.currentTime)
console.log('e.target.duration', this.videoDuration)
if (this.currentTime === this.videoDuration) {
this.next()
}
this.mytime_02 = true //
}, 1000)
},
//
change(key) {
if (key > this.slideData.length - 1) {
key = 0
}
if (key < 0) {
key = this.slideData.length - 1
}
this.beginValue = key
},
autoPlay() {
this.transitionName = 'slide'
this.beginValue++
console.log('this.beginValue', this.beginValue)
if (this.beginValue >= this.slideData.length) {
this.beginValue = 0
return
}
},
play() {
// this.setInterval = setInterval(this.autoPlay, this.interval);
this.autoPlay
},
mouseOver() {
//
// console.log('over')
// clearInterval(this.setInterval);
},
mouseOut() {
//
// console.log('out')
// this.play();
},
up() {
//
--this.beginValue
this.transitionName = 'slideBack'
this.change(this.beginValue)
},
next() {
console.log('next', this.beginValue)
//
++this.beginValue
console.log('next2', this.beginValue)
this.transitionName = 'slide'
this.change(this.beginValue)
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
.slide {
position: relative;
margin: 0;
padding: 0;
overflow: hidden;
width: 100%;
height: 8.875rem;
margin-top: 0.475rem;
}
.slide li {
list-style: none;
position: absolute;
width: 100%;
height: 8.875rem;
}
.slide li img {
height: 8.875rem;
cursor: pointer;
}
.slide li .title {
position: absolute;
left: 0;
bottom: 0;
padding: 10px 20px;
width: 100%;
background: rgba(0, 0, 0, 0.35);
color: #fff;
font-size: larger;
text-align: center;
}
.videos {
width: 100%;
height: 100%;
}
.videos:nth-child(1) {
margin-right: 0.2rem;
}
.slideDot {
position: absolute;
z-index: 999;
bottom: 0.2rem;
right: 1.85rem;
}
.slideDot span {
display: inline-block;
width: 0.07rem;
height: 0.07rem;
background: rgba(255, 255, 255, 0.65);
margin-left: 0.05rem;
}
.slideDot span.active {
background: rgba(255, 255, 255, 1);
}
.up,
.next {
position: absolute;
left: 0;
top: 50%;
margin-top: 0;
cursor: pointer;
font-size: 50px;
width: 80px;
height: 80px;
background-repeat: no-repeat;
background-position: 50% 50%;
}
.up {
left: 0.25rem;
}
.next {
left: auto;
right: 0.25rem;
}
/* .up:hover {
background-color: rgba(0, 0, 0, 0.3);
} */
/* .next:hover {
background-color: rgba(0, 0, 0, 0.3);
} */
/*进入过渡生效时的状态*/
.slide-enter-active {
transform: translateX(0);
transition: all 1s ease;
}
/*进入开始状态*/
.slide-enter {
transform: translateX(-100%);
}
/*离开过渡生效时的状态*/
.slide-leave-active {
transform: translateX(100%);
transition: all 1s ease;
}
/*离开过渡的开始状态*/
.slide-leave {
transform: translateX(0);
}
/*进入过渡生效时的状态*/
.slideBack-enter-active {
transform: translateX(0);
transition: all 1s ease;
}
/*进入开始状态*/
.slideBack-enter {
transform: translateX(100%);
}
/*离开过渡生效时的状态*/
.slideBack-leave-active {
transform: translateX(-100%);
transition: all 1s ease;
}
/*离开过渡的开始状态*/
.slideBack-leave {
transform: translateX(0);
}
</style>

0
src/views/newBookRecommend/data.json → src/views/pageOne/data.json

63
src/views/pageOne/index.vue

@ -32,7 +32,18 @@
</div>
<!-- 中间大数据 -->
<div class="database-middle">
<img src="~@/assets/images/database-img1.png" alt="">
<div class="database-box">
<a class="logo" href="#" />
<div class="ring ring1">
<div class="particle" />
</div>
<div class="ring ring2">
<div class="particle" />
</div>
<div class="ring ring3">
<div class="particle" />
</div>
</div>
<div v-for="(item,index) in middleData" :key="index" :class="['middle-item', {'totalBook': item.id === 'totalBook'}, {'fansNum': item.id === 'fansNum'}, {'lendingNum': item.id === 'lendingNum'}, {'cardNum': item.id === 'cardNum'}]">
<p>{{ item.name }}</p>
<div class="small-module">
@ -49,10 +60,12 @@
<!-- 热门搜索 -->
<div class="database-right">
<h3 class="database-title">热门搜索</h3>
<div id="tagcloud1" class="tagcloud">
<p v-for="(item,index) in hotTagData" :key="index" :class="'color' + ((index % 4) + 1)">
<span>{{ item }}</span>
</p>
<div class="tagcloud-main">
<div id="tagcloud1" class="tagcloud">
<p v-for="(item,index) in hotTagData" :key="index" :class="'color' + ((index % 4) + 1)">
<span>{{ item }}</span>
</p>
</div>
</div>
</div>
</div>
@ -106,10 +119,9 @@
</template>
<script>
import data from '@/views/newBookRecommend/data.json'
import data from './data.json'
export default {
components: {
},
name: 'PageOne',
data() {
return {
list: [],
@ -137,7 +149,7 @@ export default {
type: 4
}
],
hotTagData: ['呼啸山庄', '大卫·科波菲尔', '百年孤独', '孙子兵法', '傲慢与偏见', '钢铁是怎样炼成的', '世界上下五千年', '明朝那些事', '呼啸山庄', '大卫·科波菲尔', '百年孤独', '孙子兵法', '傲慢与偏见', '钢铁是怎样炼成的', '世界上下五千年', '明朝那些事'],
hotTagData: ['呼啸山庄', '大卫·科波菲尔', '百年孤独', '孙子兵法', '傲慢与偏见', '钢铁是怎样炼成的', '世界上下五千年', '明朝那些事', '呼啸山庄', '大卫·科波菲尔', '百年孤独', '孙子兵法', '傲慢与偏见', '钢铁是怎样炼成的', '世界上下五千年', '明朝那些事', '呼啸山庄', '大卫·科波菲尔', '百年孤独', '孙子兵法', '傲慢与偏见', '钢铁是怎样炼成的', '世界上下五千年', '明朝那些事', '呼啸山庄', '大卫·科波菲尔', '百年孤独', '孙子兵法', '傲慢与偏见', '钢铁是怎样炼成的', '世界上下五千年', '明朝那些事'],
colors: ['color1', 'color2', 'color3', 'color4'], //
middleData: []
}
@ -145,7 +157,7 @@ export default {
computed: {
defaultOption() {
return {
step: 1.5, //
step: 0.5, //
limitMoveNum: 4, // this.dataList.length
hoverStop: true, // stop
direction: 2, // 0 1 2 3
@ -157,7 +169,7 @@ export default {
},
default2Option() {
return {
step: 1.5, //
step: 0.5, //
limitMoveNum: 4, // this.dataList.length
hoverStop: true, // stop
direction: 3, // 0 1 2 3
@ -187,12 +199,8 @@ export default {
beforeDestroy() {
clearTimeout(this.timer2)
},
mounted() {
//
setTimeout(() => {
this.initDataPreview()
this.ininMiddleData()
}, 700)
async mounted() {
this.initPageOne()
this.tagAnimation()
},
methods: {
@ -216,15 +224,23 @@ export default {
tagCloud({
selector: '#tagcloud1', // id class
fontsize: 22, // , 16px
radius: 340, // /, 60px60[60][60, 60]
mspeed: 'normal', // , : slow, normal(), fast
radius: 440, // /, 60px60[60][60, 60]
mspeed: 'slow', // , : slow, normal(), fast
ispeed: 'normal', // , : slow, normal(), fast
direction: 45, // , (360): 0top, 90left, 135right-bottom()...
direction: 135, // , (360): 0top, 90left, 135right-bottom()...
keep: false, // , : false, true() ,
multicolour: false // true(),false
})
},
initDataPreview() {
async initPageOne() {
//
await this.initDataPreview()
await this.ininMiddleData()
setTimeout(() => {
this.$parent.autoPagination(1)
}, 700)
},
async initDataPreview() {
//
const previewData = {
'code': 0,
@ -252,7 +268,7 @@ export default {
this.$parent.timedRefresh(this.leftData, 'left')
}, 1000)
},
ininMiddleData() {
async ininMiddleData() {
const previewData = {
'code': 0,
'data': {
@ -299,9 +315,8 @@ export default {
@import "~@/assets/styles/index.scss";
@import "~@/assets/styles/font-some.css";
.tagcloud {
width: 5rem;
width: 10rem;
height: 5rem;
margin: 0 0 0 .325rem;
overflow: hidden;
p{
padding: .0625rem;

27
src/views/pageThree/index.vue

@ -29,7 +29,7 @@
<div class="ranking-cont">
<ul class="ranking-title">
<li style="width: 0.725rem;">排名</li>
<li style="width: 1.5rem; text-align: left;">学院名称</li>
<li style="width: 1.5rem; text-align: left;">图书馆名称</li>
<li style="flex:1;" />
<li style="width: 1.25rem; padding-right: .25rem; text-align: right;">借阅数量</li>
</ul>
@ -75,7 +75,7 @@
<div class="ranking-cont">
<ul class="ranking-title">
<li style="width: 0.725rem;">排名</li>
<li style="width: 1.5rem; text-align: left;">学院名称</li>
<li style="width: 1.5rem; text-align: left;">图书馆名称</li>
<li style="flex:1;" />
<li style="width: 1.25rem; padding-right: .25rem; text-align: right;">借阅数量</li>
</ul>
@ -93,15 +93,15 @@
</div>
</div>
</div>
<div class="three-item three03">
<div class="three-item three03">
<div class="database-title">今日借阅趋势</div>
<div class="chart-wrapper" style="height: calc(100%);">
<div class="chart-wrapper" style="height: calc(100% - 35px);">
<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%);">
<div class="chart-wrapper" style="height: calc(100% - 20px);">
<BarEcharts :storage-data="storageData" />
</div>
</div>
@ -115,6 +115,7 @@ import BarEcharts from '@/components/echart/barEcharts'
import YearCircle from './module/yearCircle'
import TodayCircle from './module/todayCircle'
export default {
name: 'PageThree',
components: {
LineChartService,
BarEcharts,
@ -160,13 +161,19 @@ export default {
return { ...item, percentage }
})
},
paddingNum(num, length) {
for (var len = (num + '').length; len < length; len = num.length) {
num = '0' + num
}
return num
},
initDataPreview() {
//
const previewData = {
'code': 0,
'data': {
'allYearNumCount': 35877,
'allUserOpenNumCount': 2200
'allYearNumCount': 325877,
'allUserOpenNumCount': 220
},
'message': 'success'
}
@ -176,8 +183,8 @@ export default {
this.todayTotal.push({
id: 'todayTotal',
name: '今日累计借阅',
value: this.$parent.formatter(previewData.data.allUserOpenNumCount),
valueArr: this.$parent.formatter(previewData.data.allUserOpenNumCount).split('')
value: this.$parent.formatter(this.paddingNum(previewData.data.allUserOpenNumCount, 5)),
valueArr: this.$parent.formatter(this.paddingNum(previewData.data.allUserOpenNumCount, 5)).split('')
})
this.yearTotal.push({
id: 'yearTotal',
@ -185,9 +192,11 @@ export default {
value: this.$parent.formatter(previewData.data.allYearNumCount),
valueArr: this.$parent.formatter(previewData.data.allYearNumCount).split('')
})
setTimeout(() => {
this.$parent.timedRefresh(this.todayTotal, 'todayTotal')
this.$parent.timedRefresh(this.yearTotal, 'yearTotal')
this.$parent.autoPagination(3)
}, 1000)
}
}

38
src/views/pageThree/module/todayCircle.vue

@ -48,8 +48,13 @@ export default {
var centerImg = require('@/assets/images/circle-bg.png')
const option = {
tooltip: {
show: false,
trigger: 'item',
position: 'bottom'
position: 'bottom',
textStyle: {
color: '#EEF6FF',
fontSize: '18'
}
// backgroundColor: 'rgba(74, 144, 226, 0.84)',
// formatter: (params) => {
// return `<div>${params.seriesName} <br> ${params.data.name}${this.$parent.formatter(params.data.value)} (${params.percent}%)</div>`
@ -80,15 +85,17 @@ export default {
textStyle: {
rich: {
name: {
fontSize: 14,
fontSize: 18,
color: '#EEF6FF',
padding: [20, 0, 20, 4]
padding: [20, 0, 20, 4],
fontFamily: 'DingTalk_JinBuTi_Regular'
},
num: {
fontSize: 16,
fontSize: 20,
fontWeight: 600,
padding: [20, 0, 20, 15],
color: '#4C90FF'
color: '#4C90FF',
fontFamily: 'DingTalk_JinBuTi_Regular'
}
}
}
@ -132,6 +139,7 @@ export default {
left: '-50%',
radius: ['60%', '70%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
@ -159,6 +167,7 @@ export default {
fontSize: 24,
fontWeight: 600,
color: '#317FFF',
fontFamily: 'DingTalk_JinBuTi_Regular',
// color: {
// type: 'linear',
// x: 0,
@ -180,8 +189,9 @@ export default {
lineHeight: 34
},
b: {
fontSize: 14,
color: '#fff'
fontSize: 18,
color: '#fff',
fontFamily: 'DingTalk_JinBuTi_Regular'
}
}
}
@ -192,6 +202,20 @@ export default {
]
}
myChart.setOption(option)
// //
// var step = 0
// setInterval(function() {
// // 1
// myChart.setOption({
// graphic: {
// id: 'logo',
// style: {
// transform: 'rotate(' + (step++ % 360) + 'deg)' //
// }
// }
// })
// }, 1000)
this.$LoopShowTooltip(myChart, option, { loopSeries: true, interval: 4000 })
}
}

21
src/views/pageThree/module/yearCircle.vue

@ -48,8 +48,13 @@ export default {
var centerImg = require('@/assets/images/circle-bg.png')
const option = {
tooltip: {
show: false,
trigger: 'item',
position: 'bottom'
position: 'bottom',
textStyle: {
color: '#EEF6FF',
fontSize: '18'
}
// backgroundColor: 'rgba(74, 144, 226, 0.84)',
// formatter: (params) => {
// return `<div>${params.seriesName} <br> ${params.data.name}${this.$parent.formatter(params.data.value)} (${params.percent}%)</div>`
@ -80,15 +85,17 @@ export default {
textStyle: {
rich: {
name: {
fontSize: 14,
fontSize: 18,
color: '#EEF6FF',
fontFamily: 'DingTalk_JinBuTi_Regular',
padding: [20, 0, 20, 4]
},
num: {
fontSize: 16,
fontSize: 20,
fontWeight: 600,
padding: [20, 0, 20, 15],
color: '#4C90FF'
color: '#4C90FF',
fontFamily: 'DingTalk_JinBuTi_Regular'
}
}
}
@ -159,6 +166,7 @@ export default {
fontSize: 24,
fontWeight: 600,
color: '#317FFF',
fontFamily: 'DingTalk_JinBuTi_Regular',
// color: {
// type: 'linear',
// x: 0,
@ -180,8 +188,9 @@ export default {
lineHeight: 34
},
b: {
fontSize: 14,
color: '#fff'
fontSize: 18,
color: '#fff',
fontFamily: 'DingTalk_JinBuTi_Regular'
}
}
}

74
src/views/readStar/index.vue

@ -1,74 +0,0 @@
<template>
<!-- 新书推荐 -->
<div class="screen-item read-star">
<div class="common-title">阅读之星</div>
<div ref="starList" class="medium-module module-content">
<div v-for="(item,index) in readstarList" :key="index" :class="['readstart-item', {'star1-bg':index === 0}, {'star2-bg':index === 1}, {'star3-bg':index === 2}]">
<svg v-if="index === 0" class="icon icon-star-1" aria-hidden="true">
<use xlink:href="#icon-a-1" />
</svg>
<svg v-else-if="index === 1" class="icon icon-star-2" aria-hidden="true">
<use xlink:href="#icon-a-21" />
</svg>
<svg v-else-if="index === 2" class="icon icon-star-3" aria-hidden="true">
<use xlink:href="#icon-a-3" />
</svg>
<span v-else class="star-num">{{ index+1 }}</span>
<p class="star-info title-item"> 读者{{ item.readerName }}上周借阅图书{{ item.borrowNum }}</p>
<p class="star-date">{{ mondayDate }}</p>
</div>
</div>
</div>
</template>
<script>
import { FetchBorrowStar } from '@/api/library'
import { parseTime } from '@/utils/index.js'
export default {
name: 'ReadStar',
data() {
return {
readstarList: [],
mondayDate: null
}
},
created() {
},
mounted() {
this.getBorrowStar()
},
methods: {
// list
getBorrowStar() {
FetchBorrowStar().then(res => {
if (res.errCode === 0) {
console.log(res)
this.readstarList = res.data
this.getMondayTime()
} else {
this.$message.error('接口错误')
}
})
},
//
getMondayTime() {
const today = new Date()
const year = today.getFullYear()
const month = today.getMonth() + 1
const day = today.getDate()
const newDate = new Date(year + '-' + month + '-' + day + ' 00:00:00')
const nowTime = newDate.getTime()
const weekDay = newDate.getDay()
const oneDayTime = 24 * 60 * 60 * 1000
const mondayTime = (1 - weekDay) * oneDayTime + nowTime
this.mondayDate = parseTime(mondayTime, '{y}-{m}-{d}')
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
</style>

51
src/views/todayBorrowed/index.vue

@ -1,51 +0,0 @@
<template>
<!-- 今日图书借还 -->
<div class="screen-item total-lending">
<div class="common-title">今日图书借还</div>
<div class="small-module module-content">
<div class="chart-wrapper" style="height: calc(100%);">
<LineChartService :chart-data="chartData" />
</div>
</div>
</div>
</template>
<script>
import LineChartService from '@/components/echart/lineChartService'
import { FetchHalfYearBRNum } from '@/api/library'
export default {
name: 'TodayBorrowed',
components: {
LineChartService
},
data() {
return {
chartData: {
returnData: [],
borrowedData: []
}
}
},
created() {
},
mounted() {
this.getHalfYearBRNum()
},
methods: {
getHalfYearBRNum() {
FetchHalfYearBRNum().then(res => {
if (res.errCode === 0) {
this.chartData.borrowedData = res.data.borrow
this.chartData.returnData = res.data.return
} else {
this.$message.error('接口错误')
}
})
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
</style>

91
src/views/totalLending/index.vue

@ -1,91 +0,0 @@
<template>
<!-- 总借阅量 -->
<div class="screen-item total-lending">
<div class="common-title">总借阅量</div>
<div class="small-module module-content">
<div class="chartNum">
<div id="TNum" class="box-items">
<li v-for="(item,index) in chartNum" :key="index" class="number-item">
<span><i ref="numberItem" class="item">0123456789</i></span>
</li>
</div>
</div>
<div class="chart-wrapper" style="height: calc(100% - 68px);">
<LineChart :chart-data="chartData" />
</div>
</div>
</div>
</template>
<script>
import LineChart from '@/components/echart/lineChart'
import { FetchHalfYearBorrowNum } from '@/api/library'
export default {
name: 'TotalLending',
components: {
LineChart
},
data() {
return {
totalLendData: null,
chartNum: ['0', '0', '0', '0', '0', '0', '0', '0', '0'],
chartData: {
totalLendMonth: [],
totalLendData: []
}
}
},
created() {
this.getHalfYearBorrowNum()
},
mounted() {
},
methods: {
getHalfYearBorrowNum() {
const params = {
ip: null
}
FetchHalfYearBorrowNum(params).then(res => {
if (res.errCode === 0) {
this.totalLendData = res.data.total
this.chartData.totalLendMonth = res.data.list.map(item => {
return item.date
})
this.chartData.totalLendData = res.data.list.map(item => {
return item.total
})
this.toOrderNum(this.totalLendData)
this.setNumberTransform()
} else {
this.$message.error('接口错误')
}
})
},
toOrderNum(num) {
num = num.toString()
if (num.length < 9) {
num = '0' + num
this.toOrderNum(num)
} else if (num.length === 9) {
this.chartNum = num.split('')
} else {
console.log('借阅数据总数显示异常')
}
},
setNumberTransform() {
var numberItems = document.getElementsByClassName('item')
const numberArr = this.chartNum.filter(item => !isNaN(item))
for (var index = 0; index < numberItems.length; index++) {
const elem = numberItems[index]
elem.style.transform = 'translate(-50%, -' + numberArr[index] * 10 + '%)'
}
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
@import "~@/assets/styles/font-some.css";
</style>

64
src/views/video/index.vue

@ -1,64 +0,0 @@
<template>
<div class="video-box">
<video v-if="srcList[0].endsWith('.mp4')" width="100%" height="100%" controls loop autoplay muted :poster="poster">
<source :src="srcList[0]" type="video/mp4">
</video>
<el-carousel v-if="!srcList[0].endsWith('.mp4')" :interval="6000">
<el-carousel-item v-for="src in srcList" :key="src">
<img width="100%" height="100%" :src="src">
</el-carousel-item>
</el-carousel>
</div>
</template>
<script>
import { FetchShowFileList } from '@/api/library'
export default {
name: 'Video',
components: {
},
data() {
return {
poster: 'https://qiniu.aiyxlib.com/1658104787005.jpg',
srcList: ['']
}
},
created() {
this.getShowFile()
},
mounted() {
},
methods: {
getShowFile() {
const params = {
libcode: '1201'
}
// this.src = 'D://uploadFile/9f904de6-0f5e-498e-8e5d-b7e14ea15496.mp4'.replace('D://', 'http://127.0.0.1:8888/')
FetchShowFileList(params).then(res => {
if (res.errCode === 0) {
// this.src = res.data[0].filePath.replace('D://', 'http://172.16.0.23:8888/')
this.srcList = res.data.map(x => x.filePath.replace('D://', 'http://172.22.0.23:8888/'))
// this.srcList = res.data.map(x => x.filePath.replace('D://uploadFile', 'http://localhost:8080/static/'))
// console.log(22222, this.srcList)
// this.src = 'D://uploadFile/11503339-b829-4357-8379-d2b49106431f.mp4'.replace('D://', 'http://127.0.0.1:8888/')
// this.src = 'http://127.0.0.1:8888/uploadFile/9f904de6-0f5e-498e-8e5d-b7e14ea15496.mp4'
} else {
this.$message.error('接口错误')
}
})
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
.el-carousel__container {
position: relative;
height: 100%;
}
.el-carousel.el-carousel--horizontal {
height: 100%;
}
</style>
Loading…
Cancel
Save