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

优化日志等

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