Commit 2f6a7180 authored by 黄奎's avatar 黄奎

页面修改

parent b50c5142
......@@ -58,7 +58,6 @@ export default {
});
}
var dataSet = new mapv.DataSet(data);
console.log(newBaiduArr)
var options = {
// shadowColor: 'rgba(255, 250, 50, 1)',
// shadowBlur: 10,
......
......@@ -43,7 +43,6 @@ export default {
var _this = this;
window.onresize = _this.myChart.resize;
this.myChart.on('click', function(params){
console.log(params)
let name = params.name
if (name === '非正式同行' || name === '正式同行' || name === '激活总数') {
// {location: `${params.data.value[0]}, ${params.data.value[1]}`, key: 'ZzGBZF6L0sgFDLlDohyvYhCnWy4dwksX'}
......@@ -205,7 +204,6 @@ export default {
// handler: function (val, oldVal) {
// if(val!=null && val.length>0)
// {
// console.log("aaa");
// this.chinaConfigure();
// }
......@@ -218,7 +216,6 @@ export default {
// //==this.SourceData[1].length
// if(val!=null && val.length>0)
// {
// console.log("bbb");
// this.chinaConfigure();
// }
......
......@@ -23,7 +23,6 @@ export default {
data:{
handler: function (val, oldVal) {
if (val) {
console.log('inerank..........')
this.init()
}
}
......@@ -104,7 +103,6 @@ export default {
}
]
};
console.log(option);
myChart.setOption(option);
}
}
......
......@@ -4,7 +4,7 @@
<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-if="item.userPhoto" :src="`http://imgfile.oytour.com${item.userPhoto}`" :onerror="defaultImg"/>
<img v-else src='../../assets/img/default_head_img.jpg' />
</div>
<div class="rank-content">
......@@ -85,7 +85,6 @@ export default {
// names += ',' + x.userName
// })
// // this.addTrade(count, names, this.addTradeInfo.enterName)
// console.log(names,count)
// }
let name = this.addTradeInfo.enterName,
......
......@@ -139,7 +139,6 @@ export default {
Vue.prototype.bus=bus
Vue.prototype.alert = function(title,content){
title=!title&&title==''?'系统提示':title
console.log(title)
let obj={
title,
content
......
......@@ -45,7 +45,6 @@ export default {
sendMsg() {
var $this = this;
$this.proxy.invoke("Hello", $this.value).done(msg => {
console.log(msg)
});
},
getMsg() {
......@@ -57,7 +56,6 @@ export default {
$this.online = data;
})
$this.proxy.on("notifySignin", data=>{
console.log('1231231231')
$this.sigin=data
})
}
......
<style>
@import url("../assets/views/index.css");
@import url("../assets/views/index.css");
</style>
<template>
<div class="data-show">
......@@ -9,7 +9,8 @@
<h1>印象之旅销售数据平台</h1>
<!-- <h6>MAGE · Data Services</h6> -->
<div class="time">
{{times.length==2?(times[0].length==1?'0'+times[0]:times[0]):""}}<span style="font-family:pingfang;font-size:40px;color:#666;margin-left:-2px;">:</span>{{times.length==2?(times[1].length==1?'0'+times[1]:times[1]):""}}
{{times.length==2?(times[0].length==1?'0'+times[0]:times[0]):""}}<span
style="font-family:pingfang;font-size:40px;color:#666;margin-left:-2px;">:</span>{{times.length==2?(times[1].length==1?'0'+times[1]:times[1]):""}}
</div>
</div>
<div class="show" v-if='isReady'>
......@@ -96,25 +97,13 @@
</div>
<div class="sell-count-box">
<div class="sell-count">
<number
title="今日销售额"
:count="(data.sales/10000).toFixed(2)"
unit="W"
color="#2a9e9e"
:decimal="true"
iconColor="#2a9e9e"
></number>
<number title="今日销售额" :count="(data.sales/10000).toFixed(2)" unit="W" color="#2a9e9e"
:decimal="true" iconColor="#2a9e9e"></number>
</div>
</div>
<div class="people-count">
<number
title="今日收客数"
:count="data.guestNum.toString()"
unit="人"
color="#2a73fe"
:decimal="false"
iconColor="#2a73fe"
></number>
<number title="今日收客数" :count="data.guestNum.toString()" unit="人" color="#2a73fe"
:decimal="false" iconColor="#2a73fe"></number>
</div>
</div>
<div class="map-box">
......@@ -145,23 +134,25 @@
</div>
</div>
<div class="video_box" :class="movieShow ? 'video_box_show' : ''">
<video v-if="movieShow" @error="videoErr" @ended="nextVideo(true)" style="width:100%;height:100%;" id="video" ref="video" :src="movie[movieNum]" autoplay="autoplay" controls="controls">您的浏览器不支持视频播放</video>
<video v-if="movieShow" @error="videoErr" @ended="nextVideo(true)" style="width:100%;height:100%;"
id="video" ref="video" :src="movie[movieNum]" autoplay="autoplay"
controls="controls">您的浏览器不支持视频播放</video>
</div>
</div>
</template>
<script>
import centerMp from "../components/sellDashboard/map/index";
import tags from "../components/sellDashboard/tagCloub/index";
import number from "../components/sellDashboard/number/index";
import lineRank from "../components/sellDashboard/lineRank";
import lineMemberRank from "../components/sellDashboard/lineMemberRank";
import platformPieRank from "../components/sellDashboard/platformPieRank";
import departHorizontalRank from "../components/sellDashboard/departHorizontalRank";
import sellTopRank from "../components/sellDashboard/sellTopRank";
import newOrder from "../components/sellDashboard/newOrder";
import sellTrade from "../components/sellDashboard/sellTrade";
import centerMp from "../components/sellDashboard/map/index";
import tags from "../components/sellDashboard/tagCloub/index";
import number from "../components/sellDashboard/number/index";
import lineRank from "../components/sellDashboard/lineRank";
import lineMemberRank from "../components/sellDashboard/lineMemberRank";
import platformPieRank from "../components/sellDashboard/platformPieRank";
import departHorizontalRank from "../components/sellDashboard/departHorizontalRank";
import sellTopRank from "../components/sellDashboard/sellTopRank";
import newOrder from "../components/sellDashboard/newOrder";
import sellTrade from "../components/sellDashboard/sellTrade";
export default {
export default {
components: {
centerMp,
tags,
......@@ -182,7 +173,7 @@ export default {
endVideo: '',
data: {},
isReady: false,
times:[],
times: [],
socket: null,
advert: {
forward: 0,
......@@ -195,14 +186,14 @@ export default {
movieTime: 0,
movieTimmer: null,
fiveMinutes: 300,
ServerUrl:"http://47.96.23.199:5002"
};
},
mounted() {
let audio=this.$refs.audio
let _this=this
for (let i = 0; i < 26; i ++){ // 生成视频数据
let audio = this.$refs.audio
let _this = this
for (let i = 0; i < 26; i++) { // 生成视频数据
this.movie.push(`http://192.168.1.254/${i+1}.mp4`)
// this.movie.push(`http://img.oytour.com/video/${i+1}.mp4`)
}
this.nextVideo();
this.mq();
......@@ -211,11 +202,11 @@ export default {
this.addVideo(txt);
});
audio.addEventListener('ended', function () {
console.log(_this.endVideo)
if(_this.endVideo&&_this.endVideo!=''){
audio.src=_this.endVideo
_this.endVideo=''
}else{
console.log("audio", _this.endVideo)
if (_this.endVideo && _this.endVideo != '') {
audio.src = _this.endVideo
_this.endVideo = ''
} else {
_this.mq()
}
}, false);
......@@ -223,16 +214,13 @@ export default {
this.movieTimmer = setInterval(() => {
this.getMovieTimmer()
}, 1000)
// this.getTime()
// setInterval(() => {
// this.getTime()
// }, 1000)
setTimeout(() => {
this.connec();
}, 1000);
},
methods: {
videoErr: function (){
videoErr: function () {
this.movieShow = false
this.movieTime = 0
this.fiveMinutes = 9999999
......@@ -256,102 +244,101 @@ export default {
this.movie.splice(this.movieNum, 1)
}
let maxNum = this.movie.length // 最大随机数
let mathRound = Math.floor(Math.random()*maxNum) // 生成随机数
if (maxNum === 1){ // 如果随机数为1 说明是最后提条数据 重新生成数据
let mathRound = Math.floor(Math.random() * maxNum) // 生成随机数
if (maxNum === 1) { // 如果随机数为1 说明是最后提条数据 重新生成数据
this.movie = []
for (let i = 0; i < 26; i ++){
for (let i = 0; i < 26; i++) {
this.movie.push(`http://192.168.1.254/${i+1}.mp4`)
// this.movie.push(`http://img.oytour.com/video/${i+1}.mp4`)
}
this.nextVideo()
} else {
this.movieNum = mathRound
}
},
connec(){
let _this=this
let url = 'http://47.96.23.199:5002/data_server'
// let url = 'http://192.168.2.215:5000/data_server'
connec() {
let _this = this
let url = this.ServerUrl+"/data_server";
let userInfo = this.getLocalStorage()
// if (userInfo) {
// url +='?id=' + userInfo.ImAccount
// url +='&token=' + userInfo.token
this.socket = this.$socketio.connect(url)
// }
//报名信息
this.socket.on('sign_info', function (msg) {
_this.data.signInfo = msg.data
_this.movieTime = 0
_this.movieShow = false
console.log("sign_info",msg,"_this.movieTime",_this.movieTime,"_this.movieShow",_this.movieShow)
console.log("sign_info", msg, "_this.movieTime", _this.movieTime, "_this.movieShow", _this
.movieShow)
});
//销售排行榜
this.socket.on('emp_sales_rank', function (msg) {
_this.data.empSalesRank = msg.data
console.log("emp_sales_rank",msg)
console.log("emp_sales_rank_销售排行榜", msg)
});
//销售额
this.socket.on('sales', function (msg) {
_this.data.sales=msg.data
_this.data.sales = msg.data;
console.log("sales_销售额", msg)
});
//测试
this.socket.on('server_response', function (msg) {
console.log(msg)
console.log("server_response_测试", msg)
});
//收客数
this.socket.on('guest_num', function (msg) {
_this.data.guestNum=msg.data
console.log('guest_num',msg)
_this.data.guestNum = msg.data
console.log('guest_num_收客数', msg)
});
//平台收客
this.socket.on('platform_guest', function (msg) {
_this.data.platformGuest=msg.data
_this.data.platformGuest = msg.data;
console.log("platform_guest_平台收客", msg.data)
});
//销售部门排名
this.socket.on('sales_department_rank', function (msg) {
_this.data.salesDepartmentRank=msg.data
_this.data.salesDepartmentRank = msg.data
console.log("sales_department_rank_销售部门排名", msg.data)
});
//销售线路排名
this.socket.on('line_guest_rank', function (msg) {
_this.data.lineGuestRank=msg.data
_this.data.lineGuestRank = msg.data;
console.log("line_guest_rank_销售线路排名", msg.data)
});
//营业额走势图
this.socket.on('turnover_trend', function (msg) {
_this.data.turnoverTrend=msg.data
_this.data.turnoverTrend = msg.data
console.log("turnover_trend_营业额走势图", msg.data)
});
//广告
this.socket.on('advert', function (msg) {
_this.advert = msg.data
_this.advert = msg.data;
console.log("advert_广告", msg.data);
});
//热词
this.socket.on('hot_word', function (msg) {
_this.hotWord = msg.data
console.log("hot_word_热词", msg.data);
});
},
getTime(){
getTime() {
var d = new Date();
this.times=[]
let h=d.getHours()
let m=d.getMinutes()
h=h.length==1?`0${h}`:h.toString()
m=m.length==1?`0${m}`:m.toString()
this.times = []
let h = d.getHours()
let m = d.getMinutes()
h = h.length == 1 ? `0${h}` : h.toString()
m = m.length == 1 ? `0${m}` : m.toString()
this.times.push(h)
this.times.push(m)
},
init(){
// this.apipost('')
//let url='http://dataapi.oytour.com/api/user/get_init_data'
let url='http://47.96.23.199:5002/api/user/get_init_data'
let msg={
tdsourcetag:'s_pcqq_aiomsg'
init() {
let url =this.ServerUrl+'/api/user/get_init_data';
let msg = {
tdsourcetag: 's_pcqq_aiomsg'
}
this.apiRequest(url,msg,r=>{
this.data= r.data.data
console.log(this.data)
this.hotWord=this.data.hotWord
this.advert=this.data.advertInfo
this.isReady=true
this.apiRequest(url, msg, r => {
this.data = r.data.data
console.log("get_init_data",this.data)
this.hotWord = this.data.hotWord
this.advert = this.data.advertInfo
this.isReady = true
});
},
//消息队列
......@@ -361,8 +348,8 @@ export default {
this.mq();
} else {
this.playVideo(this.mqData[0].txt);
if(this.mqData[0].endVideo&&this.mqData[0].endVideo!='')
this.endVideo=this.mqData[0].endVideo
if (this.mqData[0].endVideo && this.mqData[0].endVideo != '')
this.endVideo = this.mqData[0].endVideo
this.mqData.splice(0, 1);
}
},
......@@ -398,5 +385,5 @@ export default {
this.mqData.push(obj);
}
}
};
};
</script>
\ No newline at end of file
......@@ -60,7 +60,6 @@ export default {
},
methods: {
login(){
console.log('in..........')
if(this.loginInfo.account==''){
this.alert('登录提醒','请输入你的身份ID')
} else if(this.loginInfo.password==''){
......
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