系统管理角色,用户,部门内部分字段长度控制

This commit is contained in:
zhouyuejun
2019-03-12 11:20:20 +08:00
parent 142b7a2d00
commit 948696d907
11 changed files with 435 additions and 432 deletions
+10 -1
View File
@@ -7,6 +7,7 @@ var SECURE = 'wss://';
export class WebsocketService {
public websocket: WebSocket;
public websocketHeartBeat;
constructor() { }
dynamicsMessage() {
@@ -19,7 +20,11 @@ export class WebsocketService {
this.websocket = new WebSocket(url);
return new Observable(ob => {
this.websocket.onopen = () => {
console.log('websocket was connected...')
console.log('websocket was connected...');
this.websocketHeartBeat = setInterval(() => {
let msg = { "topic": "heart-beat", "message": "" };
this.websocket.send(JSON.stringify(msg));
}, 30000);
}
this.websocket.onmessage = (event) => {
ob.next(event.data)
@@ -33,4 +38,8 @@ export class WebsocketService {
}
})
}
clearIntervalHandle() {
clearInterval(this.websocketHeartBeat);
}
}