|
|
@ -59,6 +59,24 @@ export default { |
|
|
const seconds = ('0' + this.date.getSeconds()).slice(-2); |
|
|
const seconds = ('0' + this.date.getSeconds()).slice(-2); |
|
|
this.curtime = `${hours}:${minutes}:${seconds}` |
|
|
this.curtime = `${hours}:${minutes}:${seconds}` |
|
|
this.nowtime = `${year}.${month}.${day} ` + cweeks[wday]; |
|
|
this.nowtime = `${year}.${month}.${day} ` + cweeks[wday]; |
|
|
|
|
|
|
|
|
|
|
|
// 获取实时数据 |
|
|
|
|
|
let that = this; |
|
|
|
|
|
let ws = new WebSocket(publicConfig.WS_URL_ZL); |
|
|
|
|
|
ws.onopen = function() {}; |
|
|
|
|
|
ws.onclose = function(event) { |
|
|
|
|
|
console.log('WebSocket连接已关闭'); |
|
|
|
|
|
}; |
|
|
|
|
|
ws.onmessage = (e)=> { |
|
|
|
|
|
var jstr = JSON.parse(e.data) |
|
|
|
|
|
if(!jstr){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
// 中间数据 |
|
|
|
|
|
that.sumYear_num = jstr.allGroupNum.data.year.noRepeatInNum; |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
updated(){}, |
|
|
updated(){}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
|