|
|
@ -18,7 +18,7 @@ Vue.prototype.$startWebSockets = function () {
|
|
|
|
Vue.prototype.Socket.onopen = () => {
|
|
|
|
Vue.prototype.Socket.onopen = () => {
|
|
|
|
let traceId = guid();
|
|
|
|
let traceId = guid();
|
|
|
|
Vue.prototype.Socket.send(
|
|
|
|
Vue.prototype.Socket.send(
|
|
|
|
`{"traceId":${traceId},traceType:1,"content":{"size": 100}}`
|
|
|
|
`{"traceId":"${traceId}",traceType:1,"content":{"size": 100}}`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
Vue.prototype.Socket.onclose = () => {
|
|
|
|
Vue.prototype.Socket.onclose = () => {
|
|
|
@ -40,7 +40,7 @@ Vue.prototype.$startWebSockets = function () {
|
|
|
|
if (msg.traceType == 1) {
|
|
|
|
if (msg.traceType == 1) {
|
|
|
|
let traceId = guid();
|
|
|
|
let traceId = guid();
|
|
|
|
let sys = msg.content.sessionVOS.find((item) => item.type != 3);
|
|
|
|
let sys = msg.content.sessionVOS.find((item) => item.type != 3);
|
|
|
|
let str = `{"traceId":${traceId},traceType:2,"content":{"sessionId":${sys.id}}}`;
|
|
|
|
let str = `{"traceId":"${traceId}",traceType:2,"content":{"sessionId":${sys.id}}}`;
|
|
|
|
Vue.prototype.Socket.send(str);
|
|
|
|
Vue.prototype.Socket.send(str);
|
|
|
|
this.$store.commit("setUnreadCount", msg.content.totalUnreadCount);
|
|
|
|
this.$store.commit("setUnreadCount", msg.content.totalUnreadCount);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -54,9 +54,13 @@ Vue.prototype.$startWebSockets = function () {
|
|
|
|
if (msg.traceType == 3) {
|
|
|
|
if (msg.traceType == 3) {
|
|
|
|
let traceId = guid();
|
|
|
|
let traceId = guid();
|
|
|
|
Vue.prototype.Socket.send(
|
|
|
|
Vue.prototype.Socket.send(
|
|
|
|
`{"traceId":${traceId},traceType:1,"content":{"size": 100}}`
|
|
|
|
`{"traceId":"${traceId}",traceType:1,"content":{"size": 100}}`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
|
|
|
console.log(this.$store.state)
|
|
|
|
|
|
|
|
},500)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|