Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-admin-consultation
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-admin-consultation
提交
47898252
提交
47898252
编写于
1月 28, 2021
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化日志等
上级
1164bd69
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
5 行增加
和
20 行删除
+5
-20
index.vue
src/views/IM/current-session/index.vue
+5
-20
未找到文件。
src/views/IM/current-session/index.vue
浏览文件 @
47898252
...
...
@@ -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
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录