|
|
|
@ -109,7 +109,7 @@ |
|
|
|
<!-- 場館實時 --> |
|
|
|
<div class="pcg_item" v-for="item in ssjgNumDatas" :key="item.groupId"> |
|
|
|
<span class="pcpos">{{item.groupName}}</span> |
|
|
|
<p class="pcval">{{ item.allEnter }}</p> |
|
|
|
<p class="pcval" :id="item.groupId">{{ item.allEnter }}</p> |
|
|
|
<span class="pcrate" |
|
|
|
:class="[{ pcrate2: parseInt(item.proportion) >= 80 && parseInt(item.proportion) < 90 }, { pcrate3: parseInt(item.proportion) >= 90 }]">{{ |
|
|
|
item.proportion }}</span> |
|
|
|
@ -125,7 +125,7 @@ import * as echarts from 'echarts'; |
|
|
|
import * as btApi from '../api/home' |
|
|
|
|
|
|
|
// 数字变化效果 |
|
|
|
import { numGrow,ecMaxVal ,rtsocket} from '@/utils/comm'; |
|
|
|
import { numGrow,ecMaxVal} from '@/utils/comm'; |
|
|
|
|
|
|
|
// 引入api |
|
|
|
import * as homeApi from '@/api/home' |
|
|
|
@ -185,7 +185,11 @@ export default { |
|
|
|
this.getGcgNumDatas() |
|
|
|
//统计日月年进馆总数 |
|
|
|
this.getStat(); |
|
|
|
this.getInfoDatas(); |
|
|
|
// 设置定时 |
|
|
|
setInterval(()=>{ |
|
|
|
this.getInfoDatas(); |
|
|
|
},3000) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
// 方法 |
|
|
|
@ -669,14 +673,11 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取实时数据 |
|
|
|
async getInfoDatas() { |
|
|
|
getInfoDatas() { |
|
|
|
// interface |
|
|
|
// homeApi.allInfoDatas().then(res => { |
|
|
|
// get allTimeData |
|
|
|
// console.log("from api") |
|
|
|
// console.log(res.data.returnData) |
|
|
|
// this.ssjgNumDatas = res.data.returnData |
|
|
|
// }); |
|
|
|
homeApi.allGcgNumDatas().then(res=>{ |
|
|
|
this.ssjgNumDatas = res.data.returnData |
|
|
|
}) |
|
|
|
// websocket |
|
|
|
const param ={ |
|
|
|
type:'realTimeData', |
|
|
|
@ -690,6 +691,10 @@ export default { |
|
|
|
var jstr = JSON.parse(e.data) |
|
|
|
func1(jstr) |
|
|
|
}; |
|
|
|
// |
|
|
|
ws.onclose=function(e){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let func2=function(jstr){ |
|
|
|
const darr = jstr.data; |
|
|
|
|