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
提交
2ac9f319
提交
2ac9f319
编写于
8月 08, 2021
作者:
lyf
浏览文件
操作
浏览文件
下载
差异文件
合并更改
上级
59a90d73
9cd49bae
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
31 行增加
和
17 行删除
+31
-17
diagnosis-live.vue
src/components/IM/diagnosis-live.vue
+1
-4
inquirylist.vue
src/components/common/inquirylist.vue
+1
-2
socket.js
src/store/module/socket.js
+23
-5
RtcClient.js
src/utils/RtcClient.js
+3
-5
workbench.vue
src/views/IM/diagnosis-admin/workbench.vue
+1
-1
slidebar.vue
src/views/layout/slidebar.vue
+2
-0
未找到文件。
src/components/IM/diagnosis-live.vue
浏览文件 @
2ac9f319
...
...
@@ -84,11 +84,9 @@ export default {
watch
:
{
currentChat
(
newVal
,
oldVal
)
{
if
(
newVal
!==
oldVal
&&
newVal
.
imTeamId
){
const
{
imTeamId
,
diagnoseLogId
,
doctorTrtcEntryStatus
,
userTrtcEntryStatus
}
=
this
.
currentChat
;
const
{
imTeamId
,
diagnoseLogId
,}
=
this
.
currentChat
;
this
.
tid
=
imTeamId
;
this
.
diagnoseLogId
=
diagnoseLogId
;
// this.doctorTrtcEntryStatus = doctorTrtcEntryStatus;
// this.userTrtcEntryStatus = userTrtcEntryStatus;
this
.
init
();
}
}
...
...
@@ -316,7 +314,6 @@ export default {
.
then
(()
=>
{
Promise
.
all
([
this
.
rtc
.
join
()]).
then
((
res
)
=>
{
this
.
ispending
();
this
.
muteLocalAudio
();
let
t
=
setTimeout
(()
=>
{
closeLoading
(
this
);
this
.
muteLocalAudio
();
...
...
src/components/common/inquirylist.vue
浏览文件 @
2ac9f319
...
...
@@ -82,7 +82,7 @@
</div>
</div>
<div
class=
"line-btn"
@
click=
"openChat"
>
<span
v-if=
"userCallKfStatus == 1"
>
正在呼叫医助,进入诊室
</span>
<span
v-if=
"userCallKfStatus == 1
||doctorCallKfStatus==1
"
>
正在呼叫医助,进入诊室
</span>
<span
v-else
>
进入诊室
</span>
</div>
</div>
...
...
@@ -541,7 +541,6 @@ export default {
.call-status
{
width
:
45px
;
height
:
46px
;
img
{
cursor
:
pointer
;
width
:
45px
;
...
...
src/store/module/socket.js
浏览文件 @
2ac9f319
// ES6 import
import
store
from
'../'
;
import
storejs
from
'storejs'
;
import
io
from
'socket.io-client'
;
let
socketTimer
=
null
;
export
default
{
namespaced
:
true
,
state
:
{
socketClient
:
null
socketClient
:
null
,
},
actions
:
{
initSocket
({
commit
,
rootState
},
payload
)
{
const
socket
=
io
.
connect
(
payload
.
url
,
{
query
:
{
loginUserNum
:
`diagnose_list_socket_
${
payload
.
userId
}
`
// loginUserNum: `diagnose_list_socket_888`
}
});
commit
(
'SET_SOCKET'
,
socket
);
...
...
@@ -29,14 +30,19 @@ export default {
if
(
!
state
.
socketClient
){
return
false
;
}
state
.
socketClient
.
on
(
"connect
ion
"
,
(
socket
)
=>
{
state
.
socketClient
.
on
(
"connect"
,
(
socket
)
=>
{
console
.
log
(
'socket 链接成功'
,
socket
);
console
.
log
(
'socketTimer---'
,
socketTimer
);
if
(
socketTimer
){
clearInterval
(
socketTimer
);
}
});
state
.
socketClient
.
on
(
"connect_error"
,
(
err
)
=>
{
console
.
log
(
'socket connect_error'
,
err
);
});
state
.
socketClient
.
on
(
"disconnect"
,
(
socket
)
=>
{
console
.
log
(
'socket disconnect'
,
socket
);
console
.
log
(
'socket disconnect----'
,
socket
);
store
.
commit
(
'socket/RECONNECT_SOCKET'
);
});
state
.
socketClient
.
on
(
"diagnose_push_event"
,
(
socket
)
=>
{
console
.
log
(
'diagnose_push_event---'
,
socket
);
...
...
@@ -76,11 +82,16 @@ export default {
let
doms
=
document
.
getElementsByClassName
(
'el-notification'
)
if
(
doms
.
length
>=
5
)
return
const
h
=
_VM
.
$createElement
;
const
t
=
payload
.
department
?
`问诊单
${
payload
.
diagnoseLogId
}
(
${
payload
.
department
}
)`
:
`问诊单
${
payload
.
diagnoseLogId
}
`
// userCallKfStatus 医助呼叫
// doctorCallKfStatus 医生呼叫
let
name
=
payload
.
userCallKfStatus
==
1
?
payload
.
userName
:
payload
.
doctorName
const
cn
=
_VM
.
$notify
({
title
:
t
,
message
:
h
(
"p"
,
[
h
(
"i"
,
{
style
:
`color: teal;`
},
`
${
payload
.
userName
}
正在呼叫你`
),
h
(
"i"
,
{
style
:
`color: teal;`
},
`
${
name
}
正在呼叫你`
),
h
(
"el-button"
,
{
...
...
@@ -110,6 +121,13 @@ export default {
duration
:
5000
,
position
:
'top-right'
,
})
},
RECONNECT_SOCKET
:
(
state
,
payload
)
=>
{
socketTimer
=
setInterval
(
function
(){
const
i
=
storejs
.
get
(
'initSocketInfo'
);
console
.
log
(
'----initSocketInfo'
,
i
);
store
.
dispatch
(
'socket/initSocket'
,
i
)
},
2000
);
}
},
};
src/utils/RtcClient.js
浏览文件 @
2ac9f319
...
...
@@ -198,8 +198,6 @@ class RtcClient {
//对于本地流,调用该方法会触发远端 Client.on('unmute-audio') 事件。
//音频轨道默认是开启的,若你调用 muteAudio() 后可用该方法重新启用音频。
unmuteLocalAudio
()
{
const
a
=
this
.
localStream_
.
getAudioTrack
();
console
.
log
(
'---a'
,
a
);
this
.
localStream_
.
unmuteAudio
();
}
...
...
@@ -251,7 +249,7 @@ class RtcClient {
this
.
client_
.
on
(
'peer-leave'
,
evt
=>
{
const
userId
=
evt
.
userId
;
console
.
log
(
'有远程同伴离开房间:'
+
userId
);
this
.
remove
(
userId
)
this
.
remove
UserList
(
userId
)
});
...
...
@@ -345,7 +343,7 @@ class RtcClient {
this
.
remoteStreams_
=
this
.
remoteStreams_
.
filter
(
stream
=>
{
return
stream
.
getId
()
!==
id
;
});
this
.
remove
(
uid
)
this
.
remove
UserList
(
uid
)
});
// 流更新
...
...
@@ -401,7 +399,7 @@ class RtcClient {
}
// 移除视频数组
remove
(
userId
)
{
remove
UserList
(
userId
)
{
for
(
let
i
=
0
;
i
<
this
.
viewslist
.
length
;
i
++
)
{
if
(
this
.
viewslist
[
i
]
&&
this
.
viewslist
[
i
].
userId
==
userId
)
{
this
.
viewslist
[
i
]
=
null
...
...
src/views/IM/diagnosis-admin/workbench.vue
浏览文件 @
2ac9f319
...
...
@@ -267,7 +267,7 @@ export default {
}
.workbench-container
{
min-width
:
12
5
0px
;
min-width
:
12
0
0px
;
.select-content
{
padding
:
0
20px
;
background
:
#fff
;
...
...
src/views/layout/slidebar.vue
浏览文件 @
2ac9f319
...
...
@@ -32,6 +32,7 @@
</template>
<
script
>
import
{
getInnerLoginUrl
}
from
"../../utils"
;
import
storejs
from
'storejs'
;
const
BUILD_ENV
=
process
.
env
.
BUILD_ENV
;
let
vm
=
null
;
export
default
{
...
...
@@ -81,6 +82,7 @@ export default {
userID
:
userId
};
const
u
=
this
.
getSocketUrl
(
BUILD_ENV
);
storejs
.
set
(
'initSocketInfo'
,
{
url
:
u
,
userId
:
userId
});
this
.
$store
.
dispatch
(
'socket/initSocket'
,{
url
:
u
,
userId
:
userId
})
vueMenuDtos
.
map
(
item
=>
{
if
(
item
.
index
.
indexOf
(
'administrators'
)
>
-
1
){
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录