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
提交
bae4b941
提交
bae4b941
编写于
4月 13, 2021
作者:
huangwensu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加默认修改时间
上级
405ed6ca
变更
2
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
61 行增加
和
54 行删除
+61
-54
diagnosis-im.vue
src/views/IM/diagnosis-admin/diagnosis-im.vue
+59
-54
diagnosis-list.vue
src/views/IM/diagnosis-admin/diagnosis-list.vue
+2
-0
未找到文件。
src/views/IM/diagnosis-admin/diagnosis-im.vue
浏览文件 @
bae4b941
...
@@ -390,35 +390,35 @@ export default {
...
@@ -390,35 +390,35 @@ export default {
this
.
teamMemberList
.
forEach
(
item
=>
{
this
.
teamMemberList
.
forEach
(
item
=>
{
if
(
this
.
picakfAccId
=
item
.
accId
)
{
if
(
this
.
picakfAccId
=
item
.
accId
)
{
msg
.
avatarImg
=
item
.
avatarImageUrl
;
// 运营头像
msg
.
avatarImg
=
item
.
avatarImageUrl
// 运营头像
}
}
})
})
if
(
msg
.
type
==
1
)
{
if
(
msg
.
type
==
1
)
{
this
.
imgSizeHandleNew
(
msg
,
msg
.
width
,
msg
.
height
)
;
this
.
imgSizeHandleNew
(
msg
,
msg
.
width
,
msg
.
height
)
}
}
this
.
messageList
.
push
(
msg
)
;
this
.
messageList
.
push
(
msg
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
var
element
=
document
.
querySelector
(
".scroll-box"
)
;
var
element
=
document
.
querySelector
(
".scroll-box"
)
element
.
scrollTop
=
element
.
scrollHeight
;
element
.
scrollTop
=
element
.
scrollHeight
});
});
},
},
// 查询医生和居民的消息历史(下拉刷新时调用)
// 查询医生和居民的消息历史(下拉刷新时调用)
getOldMSGHistory
()
{
getOldMSGHistory
()
{
if
(
this
.
hasNoHistoryData
)
return
;
if
(
this
.
hasNoHistoryData
)
return
let
params
=
{
let
params
=
{
includeFlag
:
0
,
// 不带本条消息
includeFlag
:
0
,
// 不带本条消息
lastMsgTimestamp
:
this
.
historyTimestamp
,
lastMsgTimestamp
:
this
.
historyTimestamp
,
limit
:
20
,
limit
:
20
,
tid
:
this
.
tid
tid
:
this
.
tid
}
;
}
this
.
POST
(
"/im/team/message/history"
,
params
).
then
(
res
=>
{
this
.
POST
(
"/im/team/message/history"
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
if
(
res
.
code
===
"000000"
)
{
// 将新消息合并到之前的消息中, 并且重置最后一条消息
// 将新消息合并到之前的消息中, 并且重置最后一条消息
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
this
.
convertMessageList
(
res
.
data
,
3
)
;
this
.
convertMessageList
(
res
.
data
,
3
)
}
else
{
}
else
{
this
.
hasNoHistoryData
=
true
;
this
.
hasNoHistoryData
=
true
}
}
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
...
@@ -438,7 +438,7 @@ export default {
...
@@ -438,7 +438,7 @@ export default {
};
};
this
.
POST
(
"/im/team/message/history"
,
params
).
then
(
res
=>
{
this
.
POST
(
"/im/team/message/history"
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
if
(
res
.
code
===
"000000"
)
{
this
.
convertMessageList
(
res
.
data
,
1
)
;
this
.
convertMessageList
(
res
.
data
,
1
)
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
...
@@ -459,7 +459,7 @@ export default {
...
@@ -459,7 +459,7 @@ export default {
};
};
this
.
POST
(
"/im/team/message/forward"
,
params
).
then
(
res
=>
{
this
.
POST
(
"/im/team/message/forward"
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
if
(
res
.
code
===
"000000"
)
{
this
.
convertMessageList
(
res
.
data
,
2
)
;
this
.
convertMessageList
(
res
.
data
,
2
)
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
...
@@ -479,7 +479,7 @@ export default {
...
@@ -479,7 +479,7 @@ export default {
convertMessageList
(
messageList
,
directFlag
=
1
)
{
convertMessageList
(
messageList
,
directFlag
=
1
)
{
messageList
.
sort
((
a
,
b
)
=>
{
messageList
.
sort
((
a
,
b
)
=>
{
return
a
.
timestamp
-
b
.
timestamp
;
return
a
.
timestamp
-
b
.
timestamp
;
})
;
})
let
msg
=
null
,
let
msg
=
null
,
content
=
null
,
content
=
null
,
text
=
""
,
text
=
""
,
...
@@ -567,51 +567,51 @@ export default {
...
@@ -567,51 +567,51 @@ export default {
});
});
if
(
directFlag
===
1
)
{
if
(
directFlag
===
1
)
{
this
.
messageList
=
[]
;
this
.
messageList
=
[]
this
.
$forceUpdate
()
;
this
.
$forceUpdate
()
forwardMsgIntervalId
&&
clearInterval
(
forwardMsgIntervalId
)
;
forwardMsgIntervalId
&&
clearInterval
(
forwardMsgIntervalId
)
this
.
messageList
=
cMessageList
;
this
.
messageList
=
cMessageList
this
.
$forceUpdate
()
;
this
.
$forceUpdate
()
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
scrollBoxDom
=
document
.
querySelector
(
".scroll-box"
)
;
const
scrollBoxDom
=
document
.
querySelector
(
".scroll-box"
)
scrollBoxDom
.
scrollTop
=
scrollBoxDom
.
scrollHeight
;
scrollBoxDom
.
scrollTop
=
scrollBoxDom
.
scrollHeight
});
});
},
100
);
},
100
);
this
.
currentContinueTimes
=
this
.
sessionListData
.
currentTimestamp
-
this
.
currentSession
.
handleStartTime
;
this
.
currentContinueTimes
=
this
.
sessionListData
.
currentTimestamp
-
this
.
currentSession
.
handleStartTime
continueIntervalId
&&
clearInterval
(
continueIntervalId
)
;
continueIntervalId
&&
clearInterval
(
continueIntervalId
)
continueIntervalId
=
setInterval
(()
=>
{
continueIntervalId
=
setInterval
(()
=>
{
this
.
currentContinueTimes
+=
1000
;
this
.
currentContinueTimes
+=
1000
},
1000
);
},
1000
);
// 最新消息,要合并CUSTOM类型中,bizType是-1的数据(系统消息)
// 最新消息,要合并CUSTOM类型中,bizType是-1的数据(系统消息)
}
else
if
(
directFlag
===
2
)
{
}
else
if
(
directFlag
===
2
)
{
this
.
contactForwardMessage
(
cMessageList
)
;
this
.
contactForwardMessage
(
cMessageList
)
}
else
{
}
else
{
if
(
cMessageList
.
length
)
{
if
(
cMessageList
.
length
)
{
this
.
messageList
.
unshift
(...
cMessageList
)
;
this
.
messageList
.
unshift
(...
cMessageList
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
scrollBoxDom
=
document
.
querySelector
(
".scroll-box"
)
;
const
scrollBoxDom
=
document
.
querySelector
(
".scroll-box"
)
scrollBoxDom
.
scrollTop
=
1000
;
scrollBoxDom
.
scrollTop
=
1000
});
});
}
}
}
}
// 重新设置历史与实时的时间戳
// 重新设置历史与实时的时间戳
if
(
this
.
messageList
.
length
)
{
if
(
this
.
messageList
.
length
)
{
this
.
historyTimestamp
=
this
.
messageList
[
0
].
timestamp
;
this
.
historyTimestamp
=
this
.
messageList
[
0
].
timestamp
let
timestamp
=
this
.
messageList
[
this
.
messageList
.
length
-
1
].
timestamp
;
let
timestamp
=
this
.
messageList
[
this
.
messageList
.
length
-
1
].
timestamp
if
(
timestamp
)
{
if
(
timestamp
)
{
this
.
realTimestamp
=
timestamp
;
this
.
realTimestamp
=
timestamp
}
}
}
}
// 自己发送消息时,暂时不刷新消息
// 自己发送消息时,暂时不刷新消息
if
(
directFlag
==
1
)
{
if
(
directFlag
==
1
)
{
forwardMsgIntervalId
=
setInterval
(()
=>
{
forwardMsgIntervalId
=
setInterval
(()
=>
{
this
.
getMSGForward
()
;
this
.
getMSGForward
()
},
3000
)
;
},
3000
)
}
}
this
.
$forceUpdate
()
;
this
.
$forceUpdate
()
},
},
// 接接数据
// 接接数据
...
@@ -787,12 +787,12 @@ export default {
...
@@ -787,12 +787,12 @@ export default {
remark
:
""
,
// 其他信息(链接中的前缀文案)
remark
:
""
,
// 其他信息(链接中的前缀文案)
type
:
0
,
// 类型 0文本 1图片 2pdf 3链接
type
:
0
,
// 类型 0文本 1图片 2pdf 3链接
url
:
""
// url地址(图片、pdf,链接)
url
:
""
// url地址(图片、pdf,链接)
}
;
}
params
=
Object
.
assign
(
sendMsgParams
,
params
)
;
params
=
Object
.
assign
(
sendMsgParams
,
params
)
// 将获取新数据的定时器关闭
// 将获取新数据的定时器关闭
forwardMsgIntervalId
&&
clearInterval
(
forwardMsgIntervalId
)
;
forwardMsgIntervalId
&&
clearInterval
(
forwardMsgIntervalId
)
let
sendId
=
new
Date
().
getTime
()
;
let
sendId
=
new
Date
().
getTime
()
this
.
handleSendMsg
(
params
,
sendId
)
;
this
.
handleSendMsg
(
params
,
sendId
)
await
this
.
POST
(
"/im/team/op/message/send"
,
params
)
await
this
.
POST
(
"/im/team/op/message/send"
,
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
if
(
res
.
code
===
"000000"
)
{
...
@@ -802,15 +802,20 @@ export default {
...
@@ -802,15 +802,20 @@ export default {
msg
=
this
.
getMsgBySendId
(
sendId
);
msg
=
this
.
getMsgBySendId
(
sendId
);
}
}
if
(
res
.
data
.
checkFlag
==
1
)
{
if
(
res
.
data
.
checkFlag
==
1
)
{
this
.
realTimestamp
=
res
.
data
.
timetag
;
this
.
realTimestamp
=
res
.
data
.
timetag
msg
.
isShowLoadingIcon
=
false
;
this
.
teamMemberList
.
forEach
((
item
,
index
)
=>
{
msg
.
isShowErrorIcon
=
false
;
if
(
params
.
fromAccount
==
item
.
accId
)
{
msg
.
isShowErrorMsg
=
false
;
// 只有在下次拉取新数据时才有可能是为ture
msg
.
name
=
item
.
name
}
})
msg
.
isShowLoadingIcon
=
false
msg
.
isShowErrorIcon
=
false
msg
.
isShowErrorMsg
=
false
// 只有在下次拉取新数据时才有可能是为ture
}
else
{
}
else
{
msg
.
signature
=
res
.
data
.
signature
;
msg
.
signature
=
res
.
data
.
signature
msg
.
isShowLoadingIcon
=
false
;
msg
.
isShowLoadingIcon
=
false
msg
.
isShowErrorIcon
=
true
;
msg
.
isShowErrorIcon
=
true
msg
.
isShowErrorMsg
=
false
;
// 只有在下次拉取新数据时才有可能是为ture
msg
.
isShowErrorMsg
=
false
// 只有在下次拉取新数据时才有可能是为ture
}
}
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
...
@@ -820,20 +825,20 @@ export default {
...
@@ -820,20 +825,20 @@ export default {
}
}
})
})
.
catch
(
error
=>
{
.
catch
(
error
=>
{
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
)
}
}
msg
.
isShowLoadingIcon
=
false
;
msg
.
isShowLoadingIcon
=
false
msg
.
isShowErrorIcon
=
true
;
msg
.
isShowErrorIcon
=
true
msg
.
isShowErrorMsg
=
false
;
// 只有在下次拉取新数据时才有可能是为ture
msg
.
isShowErrorMsg
=
false
// 只有在下次拉取新数据时才有可能是为ture
msg
.
canRepeatSend
=
true
;
msg
.
canRepeatSend
=
true
});
});
this
.
$forceUpdate
()
;
this
.
$forceUpdate
()
// 重新开启定时器
// 重新开启定时器
forwardMsgIntervalId
=
setInterval
(()
=>
{
forwardMsgIntervalId
=
setInterval
(()
=>
{
this
.
getMSGForward
()
;
this
.
getMSGForward
()
},
3000
)
;
},
3000
)
},
},
// 根据sendId,查找到对应的消息
// 根据sendId,查找到对应的消息
...
...
src/views/IM/diagnosis-admin/diagnosis-list.vue
浏览文件 @
bae4b941
...
@@ -285,6 +285,8 @@ export default {
...
@@ -285,6 +285,8 @@ export default {
timeHandle
(
row
)
{
timeHandle
(
row
)
{
this
.
timeVisible
=
true
this
.
timeVisible
=
true
this
.
timeForm
.
diagnoseLogId
=
row
.
diagnoseLogId
this
.
timeForm
.
diagnoseLogId
=
row
.
diagnoseLogId
this
.
timeForm
.
beginTime
=
row
.
appointBeginTime
this
.
timeForm
.
endTime
=
row
.
appointEndTime
},
},
confirmTime
()
{
confirmTime
()
{
this
.
$refs
.
timeForm
.
validate
((
valid
)
=>
{
this
.
$refs
.
timeForm
.
validate
((
valid
)
=>
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录