Commit 44c8ea1a authored by 罗超's avatar 罗超

初始化项目

parents
Pipeline #2 canceled with stages
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
# muse
数据可视化项目,vue-cli 3.0项目,所以要打开必须升级到3.0
\ No newline at end of file
module.exports = {
presets: [
'@vue/app'
]
}
This diff is collapsed.
{
"name": "athena",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"axios": "^0.18.0",
"echarts": "^4.2.0-rc.1",
"echarts-wordcloud": "^1.1.3",
"element-ui": "^2.4.5",
"html2canvas": "^1.0.0-alpha.12",
"js-md5": "^0.7.3",
"jspdf": "^1.4.1",
"moment": "^2.22.2",
"particleground-light": "^1.0.6",
"register-service-worker": "^1.0.0",
"socket.io-client": "^2.2.0",
"velocity-animate": "^1.5.2",
"vue": "^2.5.17",
"vue-echarts-v3": "^1.0.19",
"vue-lazyload": "^1.2.6",
"vue-router": "^3.0.1",
"vue-socket.io": "^3.0.4",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.4",
"@vue/cli-plugin-pwa": "^3.0.4",
"@vue/cli-service": "^3.0.4",
"echarts": "^4.2.0-rc.2",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"vue-cli-plugin-element": "^1.0.0",
"vue-template-compiler": "^2.5.17"
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
This diff is collapsed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="renderer" content="webkit">
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=z58ZwNa8oYvzEYI6dD8hAS0GFbfKpttP"></script>
<script type="text/javascript" src="http://api.map.baidu.com/library/CurveLine/1.5/src/CurveLine.min.js"></script>
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>数据可视化</title>
</head>
<body>
<noscript>
<strong>We're sorry but athena doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
{
"name": "athena",
"short_name": "athena",
"icons": [
{
"src": "/img/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/img/icons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"start_url": "/index.html",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#4DBA87"
}
User-agent: *
Disallow:
<template>
<div id="app">
<router-view/>
<alert v-if='alertState' :data='alertData' @close='destroy'></alert>
</div>
</template>
<script>
import alert from './components/global/alert/index'
export default {
components: {
alert
//npm install --save echarts echarts-wordcloud particleground-light velocity-animate
},
data () {
return {
top:0,
alertState:false,
alertData:{}
}
},
mounted() {
this.bus.$on('create',(name,data)=>{
this.create(name,data)
})
},
methods: {
//销毁组件,调用此方法请遵从此规则
destroy(name){
this[`${name}State`]=false
},
create(name,data){
this[`${name}State`]=true
this[`${name}Data`]=data
}
}
}
</script>
<style>
@import './assets/global/font.css';
@import '//at.alicdn.com/t/font_988027_pm4p4dmbxwe.css';
@import './assets/global/global.css';
body,html{
padding: 0px;
margin: 0px;
font-family:'微软雅黑',' Microsoft YaHei';
-webkit-font-smoothing: antialiased;
height: 100%;
overflow: hidden;
}
#app{
height: 100%;
}
</style>
This diff is collapsed.
.alert-box{
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(1, 0, 19, .85);
z-index: 9999;
animation: zoomamn .5s linear;
}
@keyframes zoomamn{
from{
opacity: 0.1;
}
to {
opacity: 1;
}
}
.alert-box .alert{
width: 485px;
height: 363px;
/* background: url('../../img/system/dialog.png'); */
position: absolute;
top: calc((100% - 485px) / 2);
left: calc((100% - 363px) / 2);
}
.alert-box .alert .title{
height: 76px;
padding: 27px;
padding-bottom: 0px;
background: url('../../img/system/dialog.png') no-repeat 0 0;
font-size: 20px;
text-align: center;
line-height: 68px;
color: #bbb;
font-family: 'pingfangR';
}
.alert-box .alert .body{
max-height: 230px;
min-height: 30px;
background: url('../../img/system/dialog.png') no-repeat 0 -76px;
padding: 0 27px;
}
.alert-box .alert .body .content{
max-height: 163px;
min-height: 100px;
padding: 20px;
letter-spacing: 2px;
font-size: 14px;
/* font-family: 'pingfang'; */
color: #999;
overflow: hidden;
}
.alert-box .alert .body .btn-box{
height: 50px;
line-height: 50px;
text-align: right;
padding-right: 15px;
margin-top: 17px;
}
.alert-box .alert .foot{
height: 12px;
background: url('../../img/system/dialog.png') no-repeat 0 -306px;
padding: 0 27px 45px 27px;
}
\ No newline at end of file
@font-face{
font-family: 'pingfang';
src:url('../fonts/pingfang.woff2') format('woff');
}
@font-face {
font-family: "PingFangR";
src: url("../fonts/Semibold.eot"); /* IE9 */
src: url("../fonts/Semibold.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("../fonts/Semibold.woff") format("woff"), /* chrome, firefox */
url("../fonts/Semibold.ttf") format("truetype"); /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: "FZDBSJW";
src: url("../fonts/FZDBSJW.woff") format("woff"),
url("../fonts/FZDBSJW.TTF") format("truetype"),
url("../fonts/FZDBSJW.svg") format('svg');
font-style: normal;
font-weight: normal;
}
@font-face{
font-family:'方正大标宋简体';
src:url('../fonts/FZDBSJW.woff') format('woff')
}
@font-face{
font-family:'方正宋三简体';
src:url('../fonts/FZSSJ.ttf') format('truetype')
}
@font-face{
font-family:'苹方';
src:url('../fonts/pingfang.woff2') format('woff');
}
@font-face{
font-family: "苹方粗体";
src: url("../fonts/Semibold.eot"); /* IE9 */
src: url("../fonts/Semibold.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
url("../fonts/Semibold.woff") format("woff"), /* chrome, firefox */
url("../fonts/Semibold.ttf") format("truetype"); /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
font-style: normal;
font-weight: normal;
}
@font-face{
font-family:'DIN';
src:url('../fonts/DIN.TTF') format('truetype');
}
@font-face{
font-family:'Acens';
src:url('../fonts/acens.ttf') format('truetype');
}
@font-face{
font-family:'Helvetica Neue';
src:url('../fonts/HelveticaNeue.ttf') format('truetype');
}
@font-face{
font-family:'CRR35';
src:url('../fonts/CRR35__E.ttf') format('truetype');
}
@font-face{
font-family:'EUROSTILE';
src:url('../fonts/EUROSTILE.TTF') format('truetype');
}
@font-face{
font-family:'DISPLAYFREETFB';
src:url('../fonts/DISPLAY FREE TFB.ttf') format('truetype');
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.btn-default{
text-decoration: none;
background: url(../img/system/nav_gv.png) repeat 0px 0px;
transition-duration: 0.5s;
width: 130px;
height: 43px;
display: inline-block;
text-align: center;
line-height: 43px;
cursor: pointer;
/* float: left; */
/* margin: 10px 2px 10px 2px; */
font: 18px/43px 'PingFang';
color: #066197;
border: none;
outline: none;
/* animation-timing-function:ease-in-out;
animation-name:breathe;
animation-duration:2700ms;
animation-iteration-count:infinite;
animation-direction:alternate; */
}
.btn-default:hover {
background: url(../img/system/nav_gv.png) repeat 0px -43px;
color: #1d7eb8;
box-shadow: 0 0 6px #1d7eb8;
transition-duration: 0.5s;
animation-name:none;
}
@-webkit-keyframes breathe {
0% {
box-shadow: 0 0 1px #24a0ea;
}
100% {
box-shadow:0 1px 8px #1d7eb8;
}
}
\ No newline at end of file
This diff is collapsed.
.data-show{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: #0a0919 url('../img/login/bg.png') 100% 100%;
font-family: 'Helvetica Neue','苹方','微软雅黑';
/* background: #0a0919; */
}
.data-show .box{
background:rgba(1,0,19,0.55);
box-shadow: 0 0 10px rgba(3,25,64,1);
width: calc(100% - 20px);
height: calc(100% - 20px);
margin: 10px;
position: relative;
}
.data-show .box .title{
color: #aaa;
padding-top: .5%;
text-align: center;
/* text-shadow: 0 0px 1px #ccc; */
position: relative;
}
.data-show .box .title h1{
font-weight: 300;
font-size: 36px;
text-align: center;
letter-spacing: 20px;
display: block;
}
.data-show .box .title h6{
font-size: 14px;
background: #120f2c;
color: #5f5d6a;
padding: 2px 5px;
display: inline-block;
letter-spacing: 5px;
font-family: 'CRR35';
position: absolute;
left: 10px;
top: 20px;
}
.data-show .box .title .time{
position: absolute;
right: 10px;
top: 0px;
font-size: 20px;
color: #bbb;
letter-spacing: 3px;
font-family: 'DISPLAYFREETFB'
}
.data-show .box .show{
display: flex;
top: 10%;
bottom: 0px;
left: 0px;
right: 0px;
position: absolute;
}
.data-show .box .show .show-left-content,.data-show .box .show .show-right-content{
width: 20%;
height: 100%;
position: relative;
}
.data-show .box .show .show-center-content{
width: 60%;
border: none;
/* border-top: 1px solid #242031;
border-bottom: 1px solid #242031; */
position: relative;
height: 100%;
}
.data-show .box .l-t{
position: absolute;
border-left: 2px solid #85828b;
border-top: 2px solid #85828b;
top: -2px;
left:-2px;
display: inline-block;
height: 12px;
width: 12px;
}
.data-show .box .r-t{
position: absolute;
border-right: 3px solid #85828b;
border-top: 3px solid #85828b;
top: -2px;
right:-2px;
height: 12px;
width: 12px;
display: inline-block;
}
.data-show .box .l-b{
position: absolute;
border-left: 3px solid #85828b;
border-bottom: 3px solid #85828b;
bottom: -2px;
left:-2px;
height: 12px;
width: 12px;
display: inline-block;
}
.data-show .box .r-b{
position: absolute;
border-right: 3px solid #85828b;
border-bottom: 3px solid #85828b;
bottom: -2px;
right: -2px;
height: 12px;
width: 12px;
display: inline-block;
}
.data-show .box .show .show-center-content .map-box{
position: absolute;
left: 0;
right: 0;
top: 100px;
bottom: 180px;
}
.data-show .box .show .show-center-content .count-box{
top: 0px;
left: 0;
right: 0;
height: 100px;
position: absolute;
display: flex;
z-index: 999;
}
.data-show .box .show .show-center-content .count-box .cloub-tag-box{
height: 100%;
width: 305px;
/* width: 300px; */
}
.data-show .box .show .show-center-content .count-box .sell-count-box{
flex: 1;
}
.data-show .box .show .show-center-content .count-box .sell-count-box .sell-count{
width: 300px;
height: 100%;
margin: 0 auto;
}
.data-show .box .show .show-center-content .count-box .people-count{
width: 200px;
height: 100%;
margin: 0 auto;
}
.data-show .box .show .show-left-content .block{
height: 25%;
overflow: hidden;
margin-left: 30px;
margin-right: 30px;
margin-bottom: 30px;
border-top: 1px solid #242031;
border-bottom: 1px solid #242031;
background: rgba(13, 6, 29, 0.5);
padding:0px;
overflow: unset;
position: relative;
}
.data-show .box .show .show-left-content .block.outbind{
position: absolute;
right: calc(-100% - 30px);
top:120px;
width: 100%;
z-index: 9;
}
.data-show .box .show .show-left-content .block.line{
position: absolute;
right:calc(-300%);
bottom:calc(30% + 38px);
width: 80%;
z-index: 9;
}
.data-show .box .show .show-left-content .block .title{
font-size: 26px;
color: #c0c0c3 !important;
text-align: right;
position: relative;
height: 30px;
text-align: left !important;
margin-bottom: 20px;
margin-left: 5px;
}
.data-show .box .show .show-left-content .block .content{
height: calc(100% - 50px);
width: 100%;
margin-bottom: 20px;
}
.data-show .box .show .show-left-content .block.ad {
height: 16%;
}
.data-show .box .show .show-left-content .block.ad .content{
display: flex;
font-size: 14px;
text-align: center;
color: #85828b;
font-family: 'DISPLAYFREETFB';
margin-top: 36px;
letter-spacing: 2px;
}
.data-show .box .show .show-left-content .block.ad .content .item{
flex: 1;
}
.data-show .box .show .show-left-content .block.ad .num{
font-size: 30px;
color: #bbb;
}
.data-show .box .show .show-left-content .block.plus{
height: 30%;
}
.data-show .box .show .show-left-content .block.mini{
height: 20%;
}
.data-show .box .show .show-left-content .block.long{
position: absolute;
left: 0px;
width: calc(400% - 16%);
bottom: -18px;
}
.data-show .box .show .show-right-content .up{
height: 72%;
margin-left: 60px;
margin-right: 30px;
margin-bottom: 3%;
/* background: #0a0919; */
border-top: 1px solid #242031;
border-bottom: 1px solid #242031;
position: relative;
background: rgba(13, 6, 29, 0.5);
}
.data-show .box .show .show-right-content .l-b,.data-show .box .show .show-right-content .r-b,.data-show .box .show .show-right-content .l-t,.data-show .box .show .show-right-content .r-t{
border-width: 1px;
width: 5px;
height: 5px;
}
.data-show .box .show .show-right-content .l-b,.data-show .box .show .show-right-content .r-b{
bottom: -1px;
}
.data-show .box .show .show-left-content .l-b,.data-show .box .show .show-left-content .r-b,.data-show .box .show .show-left-content .l-t,.data-show .box .show .show-left-content .r-t{
border-width: 1px;
width: 5px;
height: 5px;
}
.data-show .box .show .show-left-content .l-b,.data-show .box .show .show-left-content .r-b{
bottom: -1px;
}
.data-show .box .show .show-right-content .down{
height: 23%;
margin-left: 60px;
margin-right: 30px;
margin-top: 30px;
border-top: 1px solid #242031;
border-bottom: 1px solid #242031;
position: relative;
background: rgba(13, 6, 29, 0.5);
}
.data-show .box .show .circel{
width: 5px;
height: 5px;
border: none;
background: #85828b;
box-shadow: 0 0 20px #2a9e9e;
position: absolute;
z-index: 5;
left: 0;
top: -3px;
border-radius: 100%;
}
.data-show .box .show .go-left {
animation: noise-anim-left 3s infinite linear alternate-reverse;
}
.data-show .box .show .go-right {
bottom: -3px;
top: unset;
right: 0;
left: unset;
animation: noise-anim-right 3s infinite linear alternate-reverse;
}
@keyframes noise-anim-left{
0% {
left: 0px;
}
100% {
left: 100%;
}
}
@keyframes noise-anim-right{
0% {
right: 0px;
}
100% {
right: 100%;
}
}
.data-show .box .show .show-right-content .down .title{
font-size: 18px;
color: #c0c0c3 !important;
text-align: right;
position: relative;
height: 30px;
text-align: left !important;
}
.data-show .box .show .show-right-content .down .content{
height: calc(100% - 50px);
width: 100%;
margin-bottom: 20px;
}
.video_box{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background-color: #000;
}
.video_box.video_box_show{
z-index: 9999;
}
video::-webkit-media-controls{
display:none !important;
}
\ No newline at end of file
.login_page{
position: absolute !important;
top: 0;
left: 0;
right: 0;
/* background: #16a085;url('../img/login/bg.png') repeat center */
background: #010013;
bottom: 0;
}
.login-box {
position: absolute;
top: calc((100% - 420px) / 2);
right: 0px;
width: 400px;
height: 420px;
padding: 20px;
animation: flash 2s linear;
}
@keyframes flash
{
from {
/* right: calc(100% - 400px); */
top: -420px;
opacity: 0;
}
to {
/* right: 0; */
top:calc((100% - 420px) / 2);
opacity: 1;
}
}
.login-box .login-log{
position: absolute;
top: -70px;
width: 100%;
margin-left: 132px;
}
.login-box .login-log img{
width:80px;
}
.login-box .title{
color: #199bc4;
font-size: 22px;
text-align: center;
font-family: 'PingFang';/*CRR35*/
}
.login-box .btn-box {
margin-top:70px;
text-align: center;
box-sizing: content-box;
}
.login-box .line{
position: relative;
margin: 70px 50px 0 50px;
}
.login-box .line .ipt{
height: 30px;
line-height: 30px;
font-size: 14px;
font-family: 'pingfangR';
width: 100%;
background:transparent;
border: none;
outline: none;
color: #1d7eb8;
border-bottom: 1px solid #199bc4;
padding-left: 30px;
}
.login-box .line .iconfont{
color: #1d7eb8;
font-size: 18px;
position: absolute;
left: 2px;
bottom: 8px;
}
.login-box .line .ipt:focus{
border-bottom: 3px solid #199bc4;
}
\ No newline at end of file
<style>
@import url('../../../assets/global/alert/index.css');
</style>
<template>
<div class='alert-box'>
<div class="alert">
<div class="title">{{data.title}}</div>
<div class="body">
<div class="content">
{{data.content}}
</div>
<div class="btn-box">
<button class="btn-default" @click.stop="close">确认</button>
</div>
</div>
<div class="foot"></div>
</div>
</div>
</template>
<script>
export default {
props:{
data:{
type:Object,
default:{
title:'',
content:''
}
},
},
methods: {
close() {
this.$emit('close','alert')
}
}
}
</script>
<style>
.num-roll {
font-size: 48px;
font-family: "DISPLAYFREETFB";
font-weight: 400;
text-align: right;
height: 48px;
display: inline-flex;
position: absolute;
right: 0;
top: 0;
margin-bottom: 5px;
margin-top: 5px;
}
.num-roll .number {
height: 50px;
text-align: right;
margin-right: 0px;
overflow: hidden;
width: 30px;
position: relative;
}
.num-roll .number .v-line {
width: 30px;
position: absolute;
right: 0px;
top: 0px;
}
.num-roll .number .v-line span {
display: block;
margin-bottom: 50px;
}
.num-roll .dian {
width: 16px;
height: 50px;
margin-right: 0px;
font-family: 'pingfang'
}
</style>
<template>
<div class="num-roll" :style="{color:color}">
<template v-for="(item, index) in len">
<div class="number" :ref="'number_'+index" :key="index" v-if="item!='.'">
<div class="v-line" :ref="'line_'+index">
<span v-for="(num, i) in nums" :key="i">{{num}}</span>
</div>
</div>
<div class="dian" :key="index" v-else>.</div>
</template>
</div>
</template>
<script>
require("velocity-animate");
export default {
props: {
money: {
type: String,
default: "0.00"
},
color: {
type: String,
default: "#00dbef"
},
decimal: {
type: Boolean,
default: true
}
},
data() {
return {
nums: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
len: ["0", "0", "0", "0", ".", "0", "0"]
};
},
watch:{
money:{
handler: function (val, oldVal) {
if (val) {
this.changeData(parseFloat(val));
}
}
}
},
mounted() {
if (!this.decimal) {
this.len.splice(4, 3);
}
setTimeout(() => {
this.changeData(parseFloat(this.money));
}, 2000);
// setInterval(() => {
// this.changeData();
// }, 2000 * 30);
},
methods: {
changeData(money) {
let decimalCount = 2;
if (!this.decimal) decimalCount = 0;
this.initLen(money.toFixed(decimalCount));
},
initLen(m) {
try {
for (let i = 0; i < m.length; i++) {
let j = this.len.length - m.length + i;
if (m[i] != this.len[j]) {
let dom = this.$refs["number_" + j][0];
let lineDom = this.$refs["line_" + j][0];
if (m[i] == "1") dom.style.width = "16px";
else dom.style.width = "30px";
Velocity(
lineDom,
{
top: -parseInt(m[i]) * 113 + "px"
},
{
duration: 1000
}
);
this.len[j] = m[i];
}
}
if (this.len.length - m.length > 0) {
for (let i = 0; i < this.len.length - m.length; i++) {
let lineDom = this.$refs["line_" + i][0];
Velocity(
lineDom,
{
top: 100 + "px"
},
{
duration: 2000
}
);
}
}
} catch (error) {}
}
},
updated(){
// this.money = "98"
// setTimeout(()=>{
// this.money = "100"
// },2000)
}
};
</script>
<template>
<div class="typer-content">
<!-- 动态变化的内容-->
<template v-for="(letter,index) in words">
<span class="word cut" :key="index" v-if='letter!=" "'>{{letter}}</span>
<br v-if='letter==" "' :key="index"/>
</template>
<span class="typer-cursor"></span>
<div class="print-company" v-if='showCompany'>
<span class="word cut" :key="index" v-if='letter!=" "'></span>
<span class="word cut" :key="index" v-if='letter!=" "'></span>
</div>
</div>
</template>
<script>
export default {
data () {
return {
words:[], //字母数组push,pop的载体
str:"数据犹如天上繁星, 统计犹如浩瀚星河, 数据统计更像是无垠宇宙, 藉由统计让数据能两点连成线, 由三点变成面, 希望接下来的统计数据, 能助您在事业上完成 点、线、面", //str初始化
letters:[], //str分解后的字母数组
order:1, //表示当前是第几句话
showCompany:false
}
},
watch:{ //监听order值的变化,改变str的内容
order(old,newV){
}
},
mounted(){ //页面初次加载后调用begin()开始动画
this.begin()
},
methods:{
//开始输入的效果动画
begin(){
this.letters=this.str.split("")
for(var i=0;i<this.letters.length;i++){
setTimeout(this.write(i),i*200);
}
},
//开始删除的效果动画
back(){
let L=this.letters.length;
for(var i=0;i<L;i++){
setTimeout(this.wipe(i),i*50);
}
},
//输入字母
write(i){
return ()=>{
let L=this.letters.length;
this.words.push(this.letters[i]);
let that=this;
/*如果输入完毕,在2s后开始删除*/
if(i==L-1){
// setTimeout(function(){
// that.back();
// },2000);
this.showCompany=true
}
}
},
//擦掉(删除)字母
wipe(i){
return ()=>{
this.words.pop(this.letters[i]);
/*如果删除完毕,在300ms后开始输入*/
if(this.words.length==0){
this.order++;
let that=this;
setTimeout(function(){
that.begin();
},300);
}
}
},
},
}
</script>
<style scoped>
.word{
width: 30px;
height: 30px;
display: inline-block;
margin: 12px 0 0px 50px;
}
.print-company{
position: absolute;
bottom: 43px;
left: 0px;
animation: diaoluo .8s linear;
}
.typer-content{
font-size: 30px;
display: block;
flex-direction: row;
letter-spacing: 2px;
position:absolute;
width: 702px;
height: 600px;
writing-mode:vertical-rl;
top: calc((100% - 538px) / 2);
right: calc((100% - 315px) / 2);
position: absolute;
text-align: left;
font-family: 'pingfang';
z-index: 9;
}
.cut{
color: #5f5d6a;
text-shadow: 0 0 37px #199bc4;
}
.typer-cursor{
height: 3px;
width: 30px;
background: #11586f;
animation: flash .8s infinite;
display: inline-block;
margin-top:10px;
}
@keyframes flash
{
from {background: #11586f;}
to {background: #010013;}
}
@keyframes diaoluo
{
from {opacity:.1;}
to {opacity: 1;}
}
</style>
\ No newline at end of file
<template>
<div class="inerank-container">
<div :style="{height:'100%',width:'100%'}" ref="myLineRank"></div>
</div>
</template>
<script>
export default {
props:{
data:{
type:Array,
default:[]
}
},
watch:{
data:{
handler: function (val, oldVal) {
if (val) {
this.init()
}
}
}
},
data() {
return {};
},
mounted() {
this.init();
},
methods: {
init() {
let myChart = this.$echarts.init(this.$refs.myLineRank);
var dataAxis = [];
var data = [];
let tempData=JSON.parse(JSON.stringify(this.data))
tempData.reverse().forEach(x => {
dataAxis.push(x.departmentName+' '+(x.sales/10000).toFixed(2)+'W')
data.push(x.sales)
});
var yMax = 2000;
var dataShadow = [];
for (var i = 0; i < data.length; i++) {
dataShadow.push(yMax);
}
let option = {
title: {
text: "",
subtext: "",
show: false
},
xAxis: {
type: "value",
axisTick: {
show: false
},
axisLine: {
show: false
},
z: 10,
splitLine: {
show:false
}
},
yAxis: {
type: "category",
data: dataAxis,
inside:true,
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
textStyle: {
color: "#aaa",
fontFamily: "pingfang"
},
inside:true,
padding:[-30,0,0,-3]
},
splitLine: {
lineStyle: {
color: "#272938",
type: "dotted"
},
show:false
}
},
grid: {
left: "5",
right: "30",
top: "10",
bottom:'0'
},
series: [
{
// For shadow
type: "bar",
itemStyle: {
normal: { color: "#11172f", barBorderRadius: [4, 4, 4, 4] }
},
barGap: "-100%",
barCategoryGap: "40%",
data: dataShadow,
animation: false,
barWidth: 4
},
{
type: "bar",
itemStyle: {
normal: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "#4e5afd" },
{ offset: 1, color: "#44c4ed" }
]),
barBorderRadius: [4, 4, 4, 4]
},
emphasis: {
color: "#44c4ed"
}
},
barWidth: 4,
data: data,
animationType: "scale",
animationEasing: "elasticOut",
animationDelay: function(idx) {
return Math.random() * 200;
}
}
]
};
myChart.setOption(option);
}
}
};
</script>
<style>
.inerank-container {
height: 100%;
width: 100%;
}
</style>
<template>
<div class="inerank-container">
<div :style="{height:'100%',width:'100%'}" ref="myLineRank"></div>
</div>
</template>
<script>
export default {
data() {
return {};
},
mounted() {
this.init();
},
methods: {
init() {
let myChart = this.$echarts.init(this.$refs.myLineRank);
var dataAxis = [
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19"
];
var data = [220, 182, 191, 234, 290, 330, 310, 100, 30, 60, 650];
var data2 = [130, 202, 101, 500, 10, 220, 310, 98, 17, 52, 360];
var yMax = 500;
var dataShadow = [];
for (var i = 0; i < data.length; i++) {
dataShadow.push(yMax);
}
let option = {
title: {
show: false
},
xAxis: {
data: dataAxis,
axisLabel: {
textStyle: {
color: "#79778a",
fontFamily: "DIN"
},
margin: 10,
interval: 0
},
axisTick: {
show: true
},
axisLine: {
show: false
}
},
yAxis: {
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
textStyle: {
color: "#272938",
fontFamily: "DIN"
}
},
splitLine: {
show: false
},
interval: 350
},
grid: {
left: "30",
right: "0",
top: "10",
bottom: "25"
},
legend: {
tooltip: {
show: true
},
itemWidth:10,
symbol: "none",
textStyle:{
fontSize:'12px',
color:'#272938'
},
selectedMode:false
},
series: [
{
name: "同行登录",
type: "line",
smooth: true,
symbol: "none",
itemStyle: {
normal: {
lineStyle: {
color: "#d32f62",
shadowBlur: 10,
shadowColor: "#d32f62"
}
}
},
data: data
},
{
name: "同行浏览与分享",
type: "line",
smooth: true,
symbol: "none",
itemStyle: {
normal: {
lineStyle: {
color: "#2a9e9e",
shadowBlur: 10,
shadowColor: "#2a9e9e"
}
}
},
data: data2
}
]
};
myChart.setOption(option);
}
}
};
</script>
<style>
.inerank-container {
height: 100%;
width: 100%;
}
</style>
<template>
<div class="inerank-container">
<div :style="{height:'100%',width:'100%'}" ref="myLineRank"></div>
</div>
</template>
<script>
export default {
props:{
data:{
type:Array,
default:[]
}
},
watch:{
data:{
handler: function (val, oldVal) {
if (val) {
this.init()
}
}
}
},
data() {
return {};
},
mounted() {
this.init();
},
methods: {
init() {
let myChart = this.$echarts.init(this.$refs.myLineRank);
var dataAxis = [];
var data = [];
this.data.forEach(x => {
let name=x.lineName.replace(/出境/g,"")
dataAxis.push(name)
data.push(x.guestNum)
});
for (let j = 0; j < dataAxis.length; j++) {
const x = dataAxis[j];
let name = "";
for (let i = 0; i < x.length; i++) {
if (i != x.length - 1) name += x[i] + "\n";
else name += x[i];
}
dataAxis[j] = name;
}
var yMax = 100;
var dataShadow = [];
for (var i = 0; i < data.length; i++) {
dataShadow.push(yMax);
}
let option = {
title: {
text: "",
subtext: "",
show: false
},
xAxis: {
data: dataAxis,
axisLabel: {
textStyle: {
color: "#79778a",
fontFamily:'pingfang'
},
margin:10,
interval:0
},
axisTick: {
show: true
},
axisLine: {
show: false
},
z: 10
},
yAxis: {
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
textStyle: {
color: "#272938"
}
},
splitLine: {
lineStyle:{
color:'#272938',
type :'dotted'
}
}
},
grid: {
left: "30",
right: "0",
top: "10"
},
series: [
{
// For shadow
type: "bar",
itemStyle: {
normal: { color: "#11172f", barBorderRadius: [5, 5, 0, 0] }
},
barGap: "-100%",
barCategoryGap: "40%",
data: dataShadow,
animation: false,
barWidth: 5
},
{
type: "bar",
itemStyle: {
normal: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "#4e5afd" },
{ offset: 1, color: "#44c4ed" }
]),
barBorderRadius: [5, 5, 0, 0]
},
emphasis: {
color: "#44c4ed"
}
},
barWidth: 5,
data: data,
animationType: 'scale',
animationEasing: 'elasticOut',
animationDelay: function (idx) {
return Math.random() * 200;
}
}
]
};
myChart.setOption(option);
}
}
};
</script>
<style>
.inerank-container {
height: 100%;
width: 100%;
}
</style>
<template>
<div class="echarts" :style="{height:'100%',width:'100%'}">
<div :style="{height:'100%',width:'100%'}" ref="myEchart"></div>
<div v-for="(item, index) in points" :key="index" class="jiaoyidian" :style="{left:(item[0]-5)+'px',top:(item[1]-5)+'px'}"></div>
</div>
</template>
<script>
import echarts from "echarts";
// import '../../node_modules/echarts/map/js/world.js'
import "../../../../node_modules/echarts/map/js/china.js"; // 引入中国地图数据
import BMap from 'BMap';
export default {
name: "echarts",
props: ["userJson"],
data() {
return {
chart: null,
position: [-999999, -999999],
points:[],
myChart:{}
};
},
mounted() {
this.bus.$on('addpoint',addTradeInfo=>{
this.addPoint(addTradeInfo)
})
this.chinaConfigure();
},
beforeDestroy() {
if (!this.chart) {
return;
}
this.chart.dispose();
this.chart = null;
},
methods: {
chinaConfigure() {
var myData = [
// { name: "1", value: [121.15, 31.89, 90] },
// { name: "2", value: [109.781327, 39.608266, 70] },
// { name: "3", value: [120.38, 37.35, 42] },
// { name: "4", value: [122.207216, 29.985295, 23] },
// { name: "5", value: [110.245672, 30.7787677, 20] }
];
this.myChart = echarts.init(this.$refs.myEchart); //这里是为了获得容器所在位置
window.onresize = this.myChart.resize;
this.myChart.setOption({
// 进行相关配置
backgroundColor: "transparent",
tooltip: {}, // 鼠标移到图里面的浮动提示框
dataRange: {
min: 0,
max: 100,
calculable: true,
color: ["#ff3333", "orange", "yellow", "lime", "aqua"],
itemWidth: 15, //调整左侧彩条的大小。
itemHeight: 100,
y: "center",
textStyle: {
color: "#fff"
},
show: false
},
grid: {
left: "0",
right: "0",
top: "0",
bottom:'0'
},
geo: {
// 这个是重点配置区
map: "china", // 表示中国地图
roam: false,
label: {
normal: {
show: false, // 是否显示对应地名
textStyle: {
color: "rgba(0,0,0,0.4)"
}
}
},
itemStyle: {
normal: {
areaColor: "#11172f", //地图本身的颜色
borderColor: "#44c4ed", //省份的边框颜色rgb(60,180,207)
borderWidth: 1, //省份的边框宽度
opacity: 0.8, //图形透明度
textStyle: {
show: false
}
},
emphasis: {
areaColor: "rgb(60,180,207)", //高亮时候地图显示的颜色
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowBlur: 20,
borderWidth: 0,
shadowColor: "rgb(60,180,207)"
}
}
},
series: [
{
type: "scatter",
coordinateSystem: "geo", // 对应上方配置
markPoint: this.markPoint
},
{
name: "交易数据", //series名称
type: "scatter", //为散点类型
coordinateSystem: "geo", // series坐标系类型
data: myData,
symbol: "circle",
symbolSize: [10, 10],
animation: true
}
]
});
},
addPoint(param){
console.log(param)
let ad=param.address?param.address:param.city
var myGeo = new BMap.Geocoder();
var that=this
console.log(ad)
myGeo.getPoint(ad, function(point){
if (point) {
var geo = that.myChart.getModel().getComponent('geo').coordinateSystem;
let coord = that.myChart.convertToPixel("geo", [point.lng, point.lat]);
that.points.push(coord);
if(that.points.length>100){
that.points.splice(0,1)
}
}
})
},
}
};
</script>
<style>
.jiaoyidian {
position: absolute;
z-index: 5;
color: #fff;
width: 10px;
height: 10px;
background: #2a73fe;
border-radius: 100%;
box-shadow: 0 0 30px #2a73fe;
animation-timing-function: ease-in-out;
animation-name: breathe;
animation-duration: 5000ms;
animation-iteration-count: infinite;
animation-direction: alternate;
}
.canpingsee {
position: absolute;
z-index: 5;
color: #fff;
width: 10px;
height: 10px;
background: #2a9e9e;
border-radius: 100%;
box-shadow: 0 0 30px #2a9e9e;
animation-timing-function: ease-in-out;
animation-name: breathe;
animation-duration: 5000ms;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@-webkit-keyframes breathe {
0% {
box-shadow: 0 0 20px inherit;
opacity: 0;
}
100% {
box-shadow: 0 1px 30px inherit;
opacity: 1;
width: 10px;
height: 10px;
}
}
</style>
<template>
<div class="order-box">
<ul>
<li v-for="(item, index) in dataList" :key="index">
<span class="name">{{item.enterName}}</span>
报入 {{item.lineName}} · {{item.lineTeamName}}
<span class="num">{{item.guestNum}}</span>
<br>
</li>
</ul>
</div>
</template>
<script>
export default {
props:['data'],
data() {
return {
dataList: [],
};
},watch:{
data:{
handler: function (val, oldVal) {
if (val) {
this.getData(val);
}
}
}
},
mounted() {
// setInterval(() => {
// this.getData();
// }, 15000);
this.dataList = this.data;
},
methods: {
getData(val) {
let obj = val[0]
var num = Math.floor(Math.random() * (1 - 26) + 26);
var money = Math.floor(Math.random() * (9000 - 20000) + 15000);
// let obj = {
// name: "华国豪",
// line: "出境日本线",
// team: "椿山庄假期",
// count: num
// };
let videoObj={
txt:'',
endVideo:''
}
if (obj.guestNum < 10) {
videoObj.txt = `恭喜${obj.enterName},成功收客${obj.guestNum}人,继续加油吧!`;
} else if (obj.guestNum < 20) {
videoObj.txt = `这个厉害!${obj.enterName}收了一个${obj.guestNum}人的大单啊`;
//videoObj.endVideo='http://img.oytour.com/audio/godlike.mp3'
} else {
videoObj.txt = `我的天啊!${obj.enterName}居然收了一个${obj.guestNum}人的大单`;
//videoObj.endVideo='http://img.oytour.com/audio/legendary.mp3'
}
let addTradeInfo = {
money: money,
name: obj.enterName
}
this.bus.$emit("addVideo",videoObj);
this.bus.$emit("addTrade", addTradeInfo);
this.bus.$emit("addpoint",{
city:'成都市',
address:obj.Address
});
this.dataList.splice(0, 0, obj);
}
}
};
</script>
<style>
.order-box {
width: 100%;
height: 100%;
overflow: hidden;
}
.order-box ul {
width: 100%;
}
.order-box ul li {
padding: 12px 0;
margin: 0 12px;
border-top: 1px dashed #242031;
font-size: 12px;
color: #5f5d6a;
overflow: hidden;
}
.order-box ul li.san {
animation: show 2s linear;
}
@keyframes show {
0% {
background: #11172f;
}
25% {
background: transparent;
}
50% {
background: #11172f;
}
75% {
background: transparent;
}
100% {
background: transparent;
}
}
.order-box ul li:first-child {
border-top: none;
}
.order-box ul li .name {
font-size: 14px;
color: #ddd;
margin-right: 12px;
}
.order-box ul li .num {
color: #ddd;
font-family: "DIN";
font-weight: bold;
margin: 0 2px;
font-size: 14px;
}
</style>
<template>
<div class="trade-count-box">
<div class="title">
<i class="iconfont icon-xieshu" :style="{color:iconColor,textShadow: `0 0 30px ${iconColor}`}"></i>
{{title}}
</div>
<div class="content" :style='{borderBottom:"1px solid "+color}'>
<numroll :money='money' :decimal='decimal' :color='color'></numroll>
<div class="endpoint" :style='{background:color}'></div>
<div class="unit" :style='{color:color}'>{{unit}}</div>
</div>
</div>
</template>
<script>
import numroll from "../../global/numroll/index";
export default {
components: {
numroll
},
props: {
count: {
type: String,
default: "0.00"
},
unit: {
type: String,
default: ""
},
color: {
type: String,
default: "#00dbef"
},
iconColor: {
type: String,
default: "#00dbef"
},
title: {
type: String,
default: "#00dbef"
},
decimal:{
type: Boolean,
default: true
}
},
watch:{
count:{
handler: function (val, oldVal) {
if (val) {
this.money=val.toString()
}
}
}
},
data() {
return {
money:'0.00'
}
},
mounted () {
this.money=this.count
}
};
</script>
<style>
.trade-count-box .title {
font-size: 18px;
color: #c0c0c3 !important;
text-align: right;
position: relative;
padding-right: 12px;
box-sizing: border-box;
font-family: "pingfangR";
margin: 5px 0 5px 0;
text-align: right !important;
}
.trade-count-box .title .iconfont {
font-size: 14px;
margin-right: 5px;
text-shadow: 0 0 30px #2a9e9e;
background: transparent;
animation-timing-function: ease-in-out;
animation-name: breathe;
animation-duration: 2000ms;
animation-iteration-count: infinite;
animation-direction: alternate;
color: #2a9e9e;
}
@-webkit-keyframes breathe {
0% {
text-shadow: 0 0 1px inherit;
opacity: 0.1;
}
100% {
text-shadow: 0 1px 30px inherit;
opacity: 1;
}
}
.trade-count-box .content {
padding: 0px 0 25px 0;
border-bottom: 1px solid #2a9e9e;
position: relative;
box-sizing: content-box;
height: 40px;
}
.trade-count-box .content .endpoint {
width: 4px;
height: 4px;
position: absolute;
right: 0px;
bottom: -2px;
background: #2a9e9e;
border-radius: 100%;
color: #2a9e9e;
text-shadow: 0 0 30px #2a9e9e;
font-size: 1px
}
.trade-count-box .content .unit {
position: absolute;
right: -20px;
top: 8px;
color: #2a9e9e;
font-size: 14px;
}
</style>
<template>
<div class="inerank-container">
<div :style="{height:'100%',width:'100%'}" ref="myLineRank"></div>
</div>
</template>
<script>
export default {
props:{
data:{
type:Array,
default:[]
}
},
data() {
return {
};
},
mounted() {
this.init();
},
watch:{
data:{
handler: function (val, oldVal) {
if (val) {
console.log('inerank..........')
this.init()
}
}
}
},
methods: {
init() {
let data=[]
this.data.forEach(x=>{
if(x.ratio>0){
data.push({
value:x.ratio,
name:x.plat
});
}
})
let myChart = this.$echarts.init(this.$refs.myLineRank);
let option = {
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
color: ["#468af5", "#5ec2fb", "#44dac6", "#0174f5"],
grid: {
left: "0",
right: "30px",
top: "0"
},
series: [
{
name: "订单来源",
type: "pie",
radius: [20, 65],
center: ["50%", "50%"],
data: data.sort(function(a, b) {
return a.value - b.value;
}),
roseType: "radius",
label: {
normal: {
textStyle: {
color: "#79778a",
fontFamily: "pingfang",
fontSize: 12,
verticalAlign: "bottom"
},
formatter: "{b}\n{d}%\n\n",
borderWidth: 20,
borderRadius: 4,
padding: [10, -50]
}
},
labelLine: {
normal: {
lineStyle: {
color: "#223f77"
},
smooth: 0.1,
length: 5,
length2: 58
}
},
itemStyle: {
normal: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "#4e5afd" },
{ offset: 1, color: "#44c4ed" }
]),
shadowBlur: 10,
shadowColor: "#4e5afd"
}
},
animationType: "scale",
animationEasing: "elasticOut",
animationDelay: function(idx) {
return Math.random() * 200;
}
}
]
};
console.log(option);
myChart.setOption(option);
}
}
};
</script>
<style>
.inerank-container {
height: 100%;
width: 100%;
}
</style>
<template>
<div class="selltop-rank-box">
<i class="iconfont icon-huangguan"></i>
<ul>
<li v-for="(item, index) in data" :key="index" v-if="index<10">
<div class="head">
<img v-if="item.userPhoto" :src="`http://reborndev.oss-cn-hangzhou.aliyuncs.com${item.userPhoto}`" :onerror="defaultImg"/>
<img v-else src='../../assets/img/default_head_img.jpg' />
</div>
<div class="rank-content">
<div class="rank" v-if="index==0">今日销冠</div>
<div class="rank" v-else>{{index+1}}<i class="iconfont icon-shangjiantou1" :class="{'red':item.rankState==0}"></i></div>
<div class="t">{{item.userName}}</div>
<div class="ranktrade-box">
交易额:{{(parseFloat(item.sales)/10000).toFixed(2)}}W &nbsp; 人头数:{{item.guestNum}}
</div>
</div>
</li>
</ul>
</div>
</template>
<script>
export default {
props:{
data:{
type:Array,
default:[]
}
},
data () {
return {
//data:[]
oldList: [],
defaultImg: 'this.src="' + require('../../assets/img/default_head_img.jpg') + '"',
addTradeInfo: {},
}
},
watch:{
data:{
handler: function (val, oldVal) {
if (oldVal) {
this.oldList = oldVal;
}
if (val) {
this.data = val;
this.addTradeS();
}
}
}
},
mounted() {
// this.data.push({
// name:'华国豪',
// money:'98000',
// moneyFormat:'9.8W',
// peoples:9,
// rankState:1
// })
this.bus.$on('addTrade',addTradeInfo=>{
this.addTradeInfo = addTradeInfo; // 监听报名
// this.addTrade(addTradeInfo)
})
},
methods: {
addTradeS: function () {
// let arr1 = [1,2,3,4,5,6,7]
// let arr2 = [1,3,4,2,5,6,7]
// let oldIndex = null,newIndex = null
// arr1.forEach((x,index)=>{
// if (x === 2) {
// oldIndex = index
// }
// })
// arr2.forEach((x,index)=>{
// if (x === 2) {
// newIndex = index
// }
// })
// if (!oldIndex && newIndex || oldIndex && newIndex && (oldIndex !== newIndex)) {
// let superIndex = oldIndex ? oldIndex : 0
// let superList = arr2.slice(superIndex,newIndex)
// let count = 10 - newIndex
// let names = ''
// superList.forEach(x=>{
// names += ',' + x.userName
// })
// // this.addTrade(count, names, this.addTradeInfo.enterName)
// console.log(names,count)
// }
let name = this.addTradeInfo.enterName,
oldIndex = null,
newIndex = null
this.oldList.forEach((x, index)=>{
if (x.enterName === name) {
oldIndex = index
}
})
this.data.forEach((x, index)=>{
if (x.enterName === name) {
newIndex = index
}
})
if (!oldIndex && newIndex || oldIndex && newIndex && (oldIndex !== newIndex)) {
let superIndex = oldIndex ? oldIndex : 0
let superList = this.data.slice(superIndex,newIndex)
let count = 10 - newIndex
let names = ''
superList.forEach(x=>{
names += ',' + x.userName
})
this.addTrade(count, names, this.addTradeInfo.enterName)
}
},
// addTrade(addTradeInfo){
addTrade(count, names, enterName){
// let t=null
// this.data.forEach((x,i)=>{
// if(x.userName==addTradeInfo.name){
// t=i
// }
// })
// let obj=JSON.parse(JSON.stringify(this.data[t]))
// obj.money=parseFloat(obj.money)+addTradeInfo.money
// let count=obj.rankState==1?10-t:0
// let names=''
// for (let i = t-1; i >= 0; i--) {
// if(obj.money>parseFloat(this.data[i].money)){
// count++;
// names+=','+this.data[i].userName
// }else{
// break;
// }
// }
if(count>0&&names!=''){
let newt=count
let videoObj={
txt:'',
endVideo:''
}
if(newt==9){
videoObj.txt=`恭喜${enterName},成功超越${names},进入今日榜单前十`
}else if(newt<=8 &&newt>2){
videoObj.txt=`恭喜${enterName},成功超越${names},排名上升至第${newt}`
}else if(newt==2||newt==1){
videoObj.txt=`恭喜${enterName}超越了${names},成功进入了今日榜单前三,棒棒哒!`
}else if(newt==0){
videoObj.txt=`今日销冠易主啦!${enterName}成功超越了${names},成为了今日销售冠军`
}
if(count==1){
videoObj.endVideo='http://img.oytour.com/audio/First.mp3'
}else if(count==2){
videoObj.endVideo='http://img.oytour.com/audio/double.mp3'
}else if(count==3){
videoObj.endVideo='http://img.oytour.com/audio/triple.mp3'
}else if(count==4){
videoObj.endVideo='http://img.oytour.com/audio/quatre.mp3'
}else if(count==5){
videoObj.endVideo='http://img.oytour.com/audio/penta.mp3'
}else if(count==6){
videoObj.endVideo='http://img.oytour.com/audio/dominating.mp3'
}else if(count==7){
videoObj.endVideo='http://img.oytour.com/audio/godlike.mp3'
}else if(count==8){
videoObj.endVideo='http://img.oytour.com/audio/legendary.mp3'
}else if(count==9){
videoObj.endVideo='http://img.oytour.com/audio/rampage.mp3'
}else if(count==10){
videoObj.endVideo='http://img.oytour.com/audio/unstopppedable.mp3'
}
this.bus.$emit("addVideo",videoObj);
// this.data.splice(t,1)
// this.data.splice(newt,0,obj)
this.$set(this.data,this.data)
} else {
// this.data[t]=obj
// this.$set(this.data,this.data)
}
}
}
}
</script>
<style>
.selltop-rank-box{
width: 100%;
height: 100%;
overflow: hidden;
}
.selltop-rank-box ul{
width: 100%;
}
.selltop-rank-box ul li{
padding: 12px 0;
margin: 0 12px;
display: flex;
position: relative;
border-top: 1px dashed #242031;
}
.selltop-rank-box .icon-huangguan{
top: -28px;
left: 12px;
font-size: 48px;
color: #fedb25;
position: absolute;
z-index: 9;
}
.selltop-rank-box ul li:first-child{
border-top: none;
}
.selltop-rank-box ul li .head{
width: 40px;
height: 40px;
margin-right: 20px;
position: relative;
}
.selltop-rank-box ul li:first-child .head{
width: 50px;
height: 50px;
margin-right: 20px;
position: relative;
border:3px solid #fedb25;
}
.selltop-rank-box ul li .head img{
width: 100%;
height: 100%;
}
.selltop-rank-box ul li .rank-content{
flex: 1;
height: 40px;
}
.selltop-rank-box ul li .rank-content:first-child{
height: 50px;
}
.selltop-rank-box ul li .rank-content .t{
font-size: 14px;
color: #f1f1f1;
text-shadow: 0 0 44px #f1f1f1;
display: block;
}
.selltop-rank-box ul li:first-child .rank-content .t{
color: #FFF;
text-shadow: 0 0 44px #FFF;
}
.selltop-rank-box ul li:first-child .rank-content .t{
font-size: 22px;
}
.selltop-rank-box ul li .rank-content .ranktrade-box{
height: 30px;
font-size: 12px;
line-height: 30px;
font-family: 'DIN';
display: block;
color: #5f5d6a;
}
.selltop-rank-box ul li .rank-content .rank .iconfont{
font-size: 14px;
margin-left: 5px;
color: green;
display: inline-block;
transform: rotate(180deg);
}
.selltop-rank-box ul li .rank-content .rank .iconfont.red{
color: red;
transform: rotate(0deg);
margin-top: 2px;
}
.selltop-rank-box ul li .rank-content .rank{
position: absolute;
right: 5px;
top: 10px;
font-size: 12px;
color: #5f5d6a;
}
.selltop-rank-box ul li:first-child .rank-content .rank{
font-size: 18px;
color: #fedb25;
}
</style>
<template>
<div class="inerank-container">
<div :style="{height:'100%',width:'100%'}" ref="myLineRank"></div>
</div>
</template>
<script>
export default {
props:{
data:{
type:Array,
default:[]
}
},
watch:{
data:{
handler: function (val, oldVal) {
if (val) {
this.realData=this.realData.concat(val)
this.init()
}
}
}
},
data() {
return {
realData:[]
};
},
mounted() {
this.realData=this.data
this.init()
},
methods: {
init() {
let myChart = this.$echarts.init(this.$refs.myLineRank);
var dataAxis = [];
var date=new Date()
let addTemp=23-date.getHours()
for (let i = addTemp; i > 0; i--) {
dataAxis.push(23-i)
}
for (let i = 0; i <= date.getHours() ; i++) {
dataAxis.push(i)
}
var data = this.formartData(dataAxis)
var yMax = 500;
var dataShadow = [];
for (var i = 0; i < data.length; i++) {
dataShadow.push(yMax);
}
let option = {
title: {
show: false
},
xAxis: {
data: dataAxis,
boundaryGap: false,
axisLabel: {
textStyle: {
color: "#79778a",
fontFamily: "DIN"
},
margin: 10,
interval: 0
},
axisTick: {
show: true
},
axisLine: {
show: false
}
},
yAxis: {
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
textStyle: {
color: "#272938",
fontFamily: "DIN"
}
},
splitLine: {
show: false
},
interval: 500000
},
grid: {
left: "70",
right: "20",
top: "10",
bottom: "25"
},
series: [
{
type: "line",
smooth: true,
symbol: "none",
left:'0',
areaStyle: {
normal: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "#4e5afd" },
{ offset: 1, color: "#44c4ed" }
])
}
},
itemStyle: {
normal: {
lineStyle: {
color: "#4e5afd",
shadowBlur: 10,
shadowColor: "#4e5afd"
}
}
},
data: data
}
]
};
myChart.setOption(option);
},
formartData(dataAxis){
let data=[]
var today=new Date()
var t=today.getTime()-1000*60*60*24
var yesterday=new Date(t)
let date=yesterday
for (let i = 0; i < dataAxis.length; i++) {
if(dataAxis[i]==0) {
date=today
}
let day=date.getDate()
day=day.length==1?`0${day}`:day
let hours=dataAxis[i]
hours=hours.length==1?`0${hours}`:hours
let key=day+' '+hours
let count=0
this.realData.forEach(x=>{
console.log(x.time+' '+key)
if(x.time.indexOf(key)!=-1){
count+=parseFloat(x.unitPrice)
}
})
data.push(count)
}
return data
}
}
};
</script>
<style>
.inerank-container {
height: 100%;
width: 100%;
}
</style>
<template>
<div class="container">
<div class="tags-title">
<i class="iconfont icon-xieshu"></i>24小时热词信息
</div>
<div class="content">
<div v-for="(item, index) in data" :key="index" :style="{background:colors[index]}" class="tag-item">{{item}}</div>
<div class="endpoint"></div>
</div>
<!-- <div
id="myChart"
:style="{marginTop: '-40px',width: '300px', height: '200px', fontFamily:'pingfang'}"
></div>-->
</div>
</template>
<script>
require("echarts-wordcloud");
export default {
props:["hotWord"],
data() {
return {
colors: [
// "#120f2c",
// "#120f2c",
// "#120f2c",
// "#120f2c",
// "#120f2c",
// "#120f2c",
// "#120f2c",
"#11b8cc",
"#2e9f5e",
"#72b10f",
"#c5bc24",
"#cc6d11",
"#6c5bd1",
"#a236d9",
"#ce2287",
"#e36060",
"#ba1d1a"
],
data: []
};
},
watch:{
hotWord:{
handler: function (val, oldVal) {
if (val) {
this.data = val
}
}
}
},
mounted() {
//this.drawLine();
this.data=this.hotWord
},
methods: {
// drawLine() {
// let myChart = this.$echarts.init(document.getElementById("myChart"));
// let _this = this;
// let option = {
// title: {
// text: "24小时交易热词",
// link: "javascript:void",
// fontFamily: "pingFang",
// show: false
// },
// tooltip: {
// show: true
// },
// series: [
// {
// name: "麦子热点统计",
// type: "wordCloud",
// shape: "circle",
// left: "center",
// top: "center",
// width: "70%",
// height: "80%",
// right: null,
// bottom: null,
// sizeRange: [16,16],
// rotationRange: [0, 0],
// rotationStep: 45,
// gridSize: 4,
// drawOutOfBound: false,
// textStyle: {
// normal: {
// fontFamily: "pingfang",
// fontWeight: "300",
// color: function() {
// if (_this.colors.length > 0) {
// let color = _this.colors[0];
// _this.colors.splice(0, 1);
// return color;
// } else {
// return (
// "rgb(" +
// [
// Math.round(Math.random() * 160),
// Math.round(Math.random() * 160),
// Math.round(Math.random() * 160)
// ].join(",") +
// ")"
// );
// }
// }
// },
// emphasis: {
// shadowBlur: 10,
// shadowColor: "#333"
// }
// },
// data: [
// {
// name: "日本",
// value: 6181
// },
// {
// name: "日本无购物",
// value: 4386
// },
// {
// name: "147升级版",
// value: 4055
// },
// {
// name: "新马泰自驾游",
// value: 2467
// },
// {
// name: "奈良梅花鹿公园",
// value: 2244
// }
// ]
// }
// ]
// };
// // 为echarts对象加载数据
// myChart.setOption(option);
// }
}
};
</script>
<style>
.tags-title {
font-size: 18px;
color: #c0c0c3 !important;
margin-top: 5px;
/* border-bottom: 1px solid #0febff; */
text-align: right;
padding-bottom: 5px;
position: relative;
margin-bottom: 5px;
padding-right: 12px;
box-sizing: border-box;
font-family: "pingfangR";
}
.container .content .endpoint {
width: 4px;
height: 4px;
position: absolute;
right: 0px;
bottom: -2px;
background: #d32f62;
border-radius: 100%;
color: #d32f62;
text-shadow: 0 0 30px #d32f62;
font-size: 1px;
}
.tags-title .iconfont {
font-size: 14px;
margin-right: 5px;
text-shadow: 0 0 30px #d32f62;
background: transparent;
animation-timing-function: ease-in-out;
animation-name: breathe;
animation-duration: 2000ms;
animation-iteration-count: infinite;
animation-direction: alternate;
color: #d32f62;
}
.container .content{
height: 63px;
border-bottom: 1px solid #d32f62;
position: relative;
display: flex;
flex-wrap: wrap;
justify-content:flex-end;
}
.container .content .tag-item{
margin-right: 5px;
border-radius: 2px;
color: #ddd;
height: 25px;
line-height: 25px;
margin-bottom: 4px;
padding:0 5px;
}
@-webkit-keyframes breathe {
0% {
text-shadow: 0 0 1px #d32f62;
opacity: 0.1;
}
100% {
text-shadow: 0 1px 30px #d32f62;
opacity: 1;
}
}
</style>
\ No newline at end of file
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './registerServiceWorker'
import './plugins/element.js'
import ElementUI from 'element-ui'
import plug from './plugins/index'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import echarts from 'echarts'
import VueSocketio from 'vue-socket.io';
import socketio from 'socket.io-client';
// Vue.use(VueSocketio,socketio('http://127.0.0.1:5000/data_server'));
// 使用Vue.use()方法就会调用工具方法中的install方法
// Vue.use(VueLazyload, {
// preLoad: 1.3,
// error: '../src/assets/img/banner@3x.png',
// loading: '../src/assets/img/loader.gif',
// attempt: 1
// })
Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(plug)
Vue.http = Vue.prototype.$http = axios
Vue.prototype.$echarts = echarts
Vue.prototype.$VueSocketio = VueSocketio
Vue.prototype.$socketio = socketio
router.beforeEach((to, from, next) => {
if (to.meta.title) {
document.title = to.meta.title
}
next()
})
Vue.prototype.getLocalStorage = function() {
var localStorageData = window.localStorage["userInfo"];
if (localStorageData != undefined) {
return JSON.parse(localStorageData);
} else {
return null;
}
},
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
import Vue from 'vue'
const Bus = new Vue()
export default Bus
\ No newline at end of file
import Vue from 'vue'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(Element)
import Vue from 'vue'
var eventHub = new Vue()
export default eventHub
\ No newline at end of file
import md5 from 'js-md5'
import bus from "./bus";
export default {
data: {
loginUser: {},
apiurl: ''
},
install(Vue, options) {
Vue.prototype.isOnline = function() {
return process.env.NODE_ENV !== 'development';
},
//域名管理对象
Vue.prototype.domainManager = function() {
// var domainUrl = "http://test_reborn.oytour.com";//主域名
//var domainUrl = "http://reborn.oytour.com"; //主域名
var domainUrl = "http://reborn.oytour.com";//主域名
if (this.isOnline()) {
domainUrl = "http://reborn.oytour.com";
}
var obj = {
//主地址
DomainUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post"
};
return obj;
},
//消息成功提示
Vue.prototype.Success = function(msg) {
this.$message({
message: msg,
duration: 2000,
type: "success"
});
},
//错误提示
Vue.prototype.Error = function(msg) {
this.$message({
message: msg,
duration: 2000,
type: "error"
});
},
//一般提示
Vue.prototype.Info = function(msg) {
this.$message({
message: msg,
duration: 2000,
type: "info"
});
},
//警告提示
Vue.prototype.Warning = function(msg) {
this.$message({
message: msg,
duration: 2000,
type: "warning"
});
},
//Confirm
Vue.prototype.Confirm = function(msg, callback) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
if (typeof callback === 'function') {
callback();
}
})
.catch(() => {
this.Info("已取消操作");
});
},
//打开新窗口连接
Vue.prototype.OpenNewUrl = function(URL) {
if (URL != '') {
window.open('http://' + URL, '_blank');
}
}
Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
var apiurl = this.domainManager().PostUrl;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
var token = "";
var key = "";
if (localStorage.user && localStorage.user!='') {
token = JSON.parse(localStorage.user).token;
key = JSON.parse(localStorage.user).SecretKey;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str
}
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.resultCode == 10000 || res.resultCode == 10001) {
this.$router.push({
path: '/login'
})
} else if (res.resultCode == 10005) {
this.$router.go(-1)
} else {
successCall(res)
}
}, faildCall)
}
Vue.prototype.apiRequest = function(path, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
this.$http.post(path, msg, {
headers: {
'Content-Type': 'application/json'
}
})
.then(res => {
successCall(res)
}, faildCall)
}
Vue.prototype.bus=bus
Vue.prototype.alert = function(title,content){
title=!title&&title==''?'系统提示':title
console.log(title)
let obj={
title,
content
}
bus.$emit('create','alert',obj)
}
//验证只能输入2位小数
Vue.prototype.checkPrice = function(item, filed) {
var value = "";
if (typeof item[filed] == "string") {
value = item[filed];
} else {
value = item[filed].toString();
}
value = value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
value = value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的
value = value
.replace(".", "$#$")
.replace(/\./g, "")
.replace("$#$", ".");
value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数
if (value.indexOf(".") < 0 && value != "") {
//以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
value = parseFloat(value);
}
item[filed] = value;
}
//验证只能输入整数
Vue.prototype.checkInteger = function(item, filed) {
var value = "";
if (typeof item[filed] == "string") {
value = item[filed];
} else {
value = item[filed].toString();
}
value = value.replace(this.$commonUtils.Regex.isInteger, "");
item[filed] = value;
}
}
}
\ No newline at end of file
/* eslint-disable no-console */
import { register } from 'register-service-worker'
if (process.env.NODE_ENV === 'production') {
register(`${process.env.BASE_URL}service-worker.js`, {
ready () {
console.log(
'App is being served from cache by a service worker.\n' +
'For more details, visit https://goo.gl/AFskqB'
)
},
cached () {
console.log('Content has been cached for offline use.')
},
updated () {
console.log('New content is available; please refresh.')
},
offline () {
console.log('No internet connection found. App is running in offline mode.')
},
error (error) {
console.error('Error during service worker registration:', error)
}
})
}
import Vue from 'vue'
import Router from 'vue-router'
import login from './views/login'
import index from './views/index'
Vue.use(Router)
export default new Router({
mode: 'hash',
base: process.env.BASE_URL,
routes: [
{
path: '/',
name: 'login',
component: login,
},
{
path: '/index',
name: 'index',
component: index,
meta: {
'title':"MAGE Data Services",
'http-equiv':"X-UA-Compatible",
'content':'IE=Edge,chrome=1'
}
}
// {
// path: '/index',
// name: 'index',
// component: index,
// meta: {
// 'title':"印象之旅~感动与世界同步",
// 'http-equiv':"X-UA-Compatible",
// 'content':'IE=Edge,chrome=1'
// },
// children:[
// {
// path: '/detail/:id',
// name: 'detail',
// component: resolve => require(['@/components/mall/detail'], resolve),
// meta: {
// title: '团队详情-印象之旅~感动与世界同步'
// }
// },
// {
// path: '/detail/:id/:pre',
// name: 'detail',
// component: resolve => require(['@/components/mall/detail'], resolve),
// meta: {
// title: '团队详情-印象之旅~感动与世界同步'
// }
// },
// {
// path: '/detailTwo/:id/',
// name: 'detailTwo',
// component: resolve => require(['@/components/mall/detailTwo'], resolve),
// meta: {
// title: '团队详情-印象之旅~感动与世界同步'
// }
// },
// {
// path: '/detailTwo/:id/:pre',
// name: 'detailTwo',
// component: resolve => require(['@/components/mall/detailTwo'], resolve),
// meta: {
// title: '团队详情-印象之旅~感动与世界同步'
// }
// },
// {
// path: '/heel',
// name: 'heel',
// component: resolve => require(['@/components/mall/heeltour'], resolve),
// meta: {
// title: '跟团游-印象之旅~感动与世界同步'
// }
// },
// {
// path: '/coding',
// name: 'coding',
// component: resolve => require(['@/components/mall/coding'], resolve),
// meta: {
// title: '正在开发中-印象之旅~感动与世界同步'
// }
// },
// {
// path: '/search',
// name: 'search',
// component: resolve => require(['@/components/mall/search'], resolve),
// meta: {
// title: '搜索行程-印象之旅~感动与世界同步'
// }
// },
// {
// path: '/PersonalHome',
// name: 'PersonalHome',
// component: resolve => require(['@/components/PersonalCenter/PersonalHome'], resolve),
// meta: {
// },
// children:[{
// path: '/PsCenter',
// name: 'PsCenter',
// component: resolve => require(['@/components/PersonalCenter/PsCenter'], resolve),
// meta: {
// title: '个人中心'
// }
// },{
// path: '/PsOrder',
// name: 'PsOrder',
// component: resolve => require(['@/components/PersonalCenter/PsOrder'], resolve),
// meta: {
// title: '订单管理'
// }
// },{
// path: '/PsSystem',
// name: 'PsSystem',
// component: resolve => require(['@/components/PersonalCenter/PsSystem'], resolve),
// meta: {
// title: '系统管理'
// }
// },{
// path: '/PsAccBalance',
// name: 'PsAccBalance',
// component: resolve => require(['@/components/PersonalCenter/PsAccBalance'], resolve),
// meta: {
// title: '账户余额'
// }
// },{
// path: '/OrderInvoice',
// name: 'OrderInvoice',
// component: resolve => require(['@/components/PersonalCenter/OrderInvoice'], resolve),
// meta: {
// title: '发票信息'
// }
// }]
// }
// ]
// }
]
})
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
user:{},
site:0,
isLogin:0,
},
mutations: {
updateSite(state, p) {
state.site = p
},
changeLogin(state,data){
state.isLogin = data;
},
updateUser(state,data){
state.user = data
}
},
actions: {
}
})
This diff is collapsed.
<style>
@import url('../assets/views/login.css');
</style>
<template>
<div class="login_page">
<print></print>
<div v-if='isshow' class="login-box" >
<div class="login-log">
<img src="../assets/img/system/logo2.png" />
</div>
<div class="title">『 MAGE 』Data Services</div>
<div class="line">
<i class="iconfont icon-bl27account"></i>
<input type="text" @keyup.enter='login' v-model="loginInfo.account" autocomplete="new-password" placeholder="请输入你的身份ID" class="ipt" />
</div>
<div class="line">
<i class="iconfont icon-password"></i>
<input type="password" @keyup.enter='login' v-model="loginInfo.password" autocomplete="new-password" placeholder="请输入你的ID凭证" class="ipt" />
</div>
<div class="btn-box">
<button class="btn-default" @click="login">立即登录</button>
</div>
</div>
</div>
</template>
<script>
import Particle from 'particleground-light'
import print from '../components/print/index'
export default {
components: {
print
},
data(){
return{
loginInfo:{
account:'',
password:''
},
isshow:false
}
},
created() {
if(localStorage.isFirst &&localStorage.isFirst=='y'){
this.isshow=true
}else{
setTimeout(() => {
this.isshow=true
localStorage.isFirst='y'
}, 83*200);
}
},
mounted () {
new Particle(document.querySelector('.login_page'),{
dotColor: '#031940',
lineColor: '#031940'
})
if(localStorage.user){
localStorage.removeItem('user')
}
},
methods: {
login(){
console.log('in..........')
if(this.loginInfo.account==''){
this.alert('登录提醒','请输入你的身份ID')
} else if(this.loginInfo.password==''){
this.alert('登录提醒','请输入你的ID凭证')
} else {
var msg = {
EmAccount: this.loginInfo.account,
EmPassword: this.loginInfo.password,
Domain: 'yx.oytour.com'
}
this.apipost("admin_get_EmployeeLogin", msg, response => {
var jsonData = response.data;
if (jsonData.resultCode == 1) {
//登录成功
var userData = jsonData.data
localStorage.user=JSON.stringify(userData)
this.$router.push('/index')
} else {
this.loginInfo.password=''
this.alert('登录失败提醒',response.data.message)
}
},err => {});
}
}
}
}
</script>
module.exports = {
configureWebpack: {
resolve: {
alias: {
'assets': '@/assets',
'components': '@/components',
'views': '@/views',
}
},
externals: {
BMap: 'BMap'
}
},
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment