提交 47898252 编写于 作者: guangjun.yang's avatar guangjun.yang

优化日志等

上级 1164bd69
......@@ -328,11 +328,12 @@ export default {
},
mounted() {
cacheMap = {};
this.$nextTick(() => {
_this.containerHeight = document.body.clientHeight - 80;
_this.getElmByID('screenSet').style.height =
_this.containerHeight - 152 + "px";
console.log('_this.containerHeight', _this.containerHeight);
// console.log('_this.containerHeight', _this.containerHeight);
_this.getElmByID("sessionListId").style.height = _this.containerHeight - 252 + 'px';
_this.getElmByID("msgContentId").style.height = _this.containerHeight - 287 + 'px';
});
......@@ -346,7 +347,7 @@ export default {
// 每30秒监测敏感信息
autoCompletionInterval() {
if(!this.messageList) return;
console.log('in autoCompletionInterval');
// console.log('in autoCompletionInterval');
// 将带有loading的消息转成失败的
this.messageList.forEach( item => {
if(item.isShowLoadingIcon) {
......@@ -447,7 +448,6 @@ export default {
};
this.POST("/im/msg/history", params).then(res => {
if (res.code === "000000") {
console.log("res", res);
// 将新消息合并到之前的消息中, 并且重置最后一条消息
this.convertMessageList(res.data, 3);
} else {
......@@ -519,11 +519,6 @@ export default {
// type == custom时,18: PDF文件(showType:3); 19: 链接信息(showType:4); 1 ~ 17: 不支持的消息类型(showType:5);
// directFlag 1: 第一次取数据; 2: 拼接实时消息(push); 3: 拼接历史消息(unshift);
convertMessageList(messageList, directFlag = 1) {
console.log(
"@@@@@@messageList, directFlag@@@@@",
messageList,
directFlag
);
messageList.sort((a, b) => {
return a.timestamp - b.timestamp;
});
......@@ -586,8 +581,6 @@ export default {
cMessageList.push(msg);
});
console.log("$$$$$$$converted, cMessageList$$$$$$$", cMessageList);
if (directFlag === 1) {
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
this.messageList = cMessageList;
......@@ -631,7 +624,6 @@ export default {
}, 3000);
}
this.$forceUpdate();
console.log("this.messageList", this.messageList);
},
// 接接数据
......@@ -685,7 +677,6 @@ export default {
selectSession(session, index) {
// 点击当前的,不再重新请求数据
if (this.currentTaskLogId == session.taskLogId) return;
console.log("selectSession");
this.currentTaskLogId = session.taskLogId;
this.currentToAccId = session.toAccId;
this.currentSession = session;
......@@ -726,7 +717,6 @@ export default {
getSessionList() {
this.GET("/im/session/kf/list").then(res => {
if (res.code === "000000") {
console.log("in getSessionList", res);
this.sessionListData = res.data || {
currentTimestamp: 0,
myTaskCount: 0,
......@@ -765,7 +755,6 @@ export default {
if (sLength) {
this.convertSessions(this.sessionListData.sessionList);
this.$forceUpdate();
console.log("this.currentSession", this.currentSession);
}
} else {
this.$message({
......@@ -820,7 +809,6 @@ export default {
};
this.POST(`/im/session/kf/closeOneTask`, params).then(res => {
if (res.code === "000000") {
console.log("in closeOneTask", res);
if (res.data == 1) {
this.currentTaskLogId = "";
this.getSessionList();
......@@ -873,7 +861,6 @@ export default {
"/contents/admin/template/queryTemplate?publishFlag=5&pageNo=1&pageSize=99999"
).then(res => {
if (res.code === "000000") {
console.log("in getFiveContentList", res);
this.linkList = res.data.templateList || [];
} else {
this.$message({
......@@ -983,11 +970,11 @@ export default {
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
let sendId = new Date().getTime();
this.handleSendMsg(params, sendId);
console.log("sendMsgParams", params);
// console.log("sendMsgParams", params);
await this.POST("/im/msg/sendMessage", params).then(res => {
if (res.code === "000000") {
// 校验结果:1校验通过 2校验不通过
console.log(res.data.checkFlag);
// console.log(res.data.checkFlag);
let msg = this.messageList[this.messageList.length - 1];
if(msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId);
......@@ -1053,11 +1040,9 @@ export default {
beforeDestroy() {
console.log("in beforeDestroy", forwardMsgIntervalId);
sessionIntervalId && clearInterval(sessionIntervalId);
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
autoCompletionIntervalId && clearInterval(autoCompletionIntervalId);
console.log("in beforeDestroy", forwardMsgIntervalId);
}
};
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册