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

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
+3 -7
View File
@@ -35,7 +35,6 @@ export class MainComponent implements OnInit {
private websocketService: WebsocketService
) {
this.toastService.getToasts().forEach((config: ToastConfig) => {
console.log(config);
this.toastConfigs.unshift(config);
});
this.toastService.removeToastMainSubject.subscribe((config?: ToastConfig) => {
@@ -53,6 +52,9 @@ export class MainComponent implements OnInit {
if (event.urlAfterRedirects != '/app/main') {
if (this.websocketService.websocket.readyState === 1) {
this.websocketService.websocket.close();
if(this.websocketService.websocketHeartBeat){
this.websocketService.clearIntervalHandle();
}
}
}
}
@@ -129,14 +131,9 @@ export class MainComponent implements OnInit {
// 订阅航班更新
this.websocketService.dynamicsMessage().subscribe(
event => {
setInterval(() => {
let msg = { "topic": "heart-beat", "message": "" };
this.websocketService.websocket.send(JSON.stringify(msg));
}, 30000);
let data = JSON.parse(event as string);
if (data.topic === 'schd') {
let message = JSON.parse(data.message);
// console.log(message);
//是否可以开始处理动态消息
if (this.canHandleDynamicMessage) {
this.dynamicMessageHandle(message);
@@ -145,7 +142,6 @@ export class MainComponent implements OnInit {
}
} else if (data.topic === 'msg') {
let message = JSON.parse(data.message);
// console.log(message);
if (this.canHandleDynamicAlert) {
this.dynamicAlertHandle(message);
} else {