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
提交
e5148557
提交
e5148557
编写于
11月 24, 2021
作者:
xiaoping.di
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'release' into 'develop'
Release See merge request
!233
上级
5f57b15a
35a34e3b
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
83 行增加
和
27 行删除
+83
-27
diagnosis.js
src/api/diagnosis.js
+7
-0
diagnosis-live.vue
src/components/IM/diagnosis-live.vue
+75
-26
diagnosis-list-new.vue
src/views/IM/diagnosis-admin/diagnosis-list-new.vue
+1
-1
未找到文件。
src/api/diagnosis.js
浏览文件 @
e5148557
...
...
@@ -62,6 +62,13 @@ export const messageHistory = async (data) => {
});
};
export
const
getOnlineStatus
=
async
(
roomId
)
=>
{
return
request
({
url
:
`/coupler/trtc/room/online/userList?roomId=
${
roomId
}
`
,
method
:
'get'
,
});
};
export
const
messageSend
=
async
(
data
)
=>
{
return
request
({
url
:
'/im/team/op/message/send'
,
...
...
src/components/IM/diagnosis-live.vue
浏览文件 @
e5148557
...
...
@@ -123,6 +123,7 @@
callDirect
,
usersigTrtc
,
diagnoseEndCall
,
getOnlineStatus
,
}
from
'@/api/diagnosis'
;
export
default
{
...
...
@@ -159,16 +160,13 @@
answerTime
:
0
,
// 接诊医生接入时长
useTime
:
0
,
// 问诊时长
loseTime
:
0
,
// 问诊剩余时长
askTimeFn
:
null
,
answerTimeFn
:
null
,
useTimeFn
:
null
,
loseTimeFn
:
null
,
timerOfStatus
:
null
,
type
:
1
,
// 1: 语音 2: 视频
startTime
:
0
,
endTime
:
0
,
time
:
30
,
// 总时长
memberList
:
[],
tid
:
''
,
// 群id
diagnoseLogId
:
''
,
// 问诊id
isMuted
:
true
,
liveInfoSave
:
{},
...
...
@@ -196,10 +194,11 @@
watch
:
{
currentChat
(
newVal
,
oldVal
)
{
if
(
newVal
!==
oldVal
&&
newVal
.
imTeamId
)
{
const
{
imTeamId
,
diagnoseLogId
}
=
this
.
currentChat
;
this
.
tid
=
imTeamId
;
const
{
diagnoseLogId
}
=
this
.
currentChat
;
this
.
diagnoseLogId
=
diagnoseLogId
;
this
.
init
();
}
else
{
clearInterval
(
this
.
timerOfStatus
);
}
},
},
...
...
@@ -222,6 +221,7 @@
// 获取视频参数
this
.
getViedoParams
();
this
.
getInfo
();
// 获取用户信息列表
this
.
getOnlineStatus
();
// 实时获取用户状态
},
toggleVol
()
{
if
(
this
.
isMuted
)
{
...
...
@@ -239,7 +239,6 @@
if
(
data
.
role
==
2
&&
this
.
userTrtcEntryStatus
!=
2
)
{
return
false
;
}
console
.
log
(
'--this.roomId'
,
this
.
currentChat
,
data
,
this
.
roomId
);
const
params
=
{
imAccId
:
data
.
accId
,
imTeamId
:
this
.
currentChat
.
imTeamId
,
...
...
@@ -304,7 +303,6 @@
.
catch
(()
=>
{
this
.
$message
.
error
(
'未获取到相关信息'
);
this
.
memberList
=
[];
// this.getErr();
});
},
// 获取AppId
...
...
@@ -548,21 +546,6 @@
this
.
muteLocalAudio
();
this
.
rtc
.
leave
();
this
.
clearSession
();
// window.location.href = 'about:blank';
// window.close();
},
// 结束会话
overFn
()
{
this
.
$refs
.
alert
.
init
({
cancleTxt
:
'取消'
,
confirmTxt
:
'我知道了'
,
title
:
'确定要结束会话么?'
,
})
.
then
(()
=>
{
this
.
out
();
})
.
catch
(()
=>
{});
},
out
()
{
diagnoseEndCall
({
...
...
@@ -611,9 +594,6 @@
});
},
clearTime
()
{
clearInterval
(
this
.
askTimeFn
);
clearInterval
(
this
.
answerTimeFn
);
clearInterval
(
this
.
useTimeFn
);
clearInterval
(
this
.
loseTimeFn
);
this
.
isMuted
=
true
;
},
...
...
@@ -629,6 +609,75 @@
checkChrome
()
{
return
getBroswer
().
broswer
==
'Chrome'
;
},
getOnlineStatus
()
{
const
{
roomId
}
=
this
.
currentChat
;
const
that
=
this
;
this
.
timerOfStatus
=
setInterval
(
function
()
{
getOnlineStatus
(
roomId
).
then
((
res
)
=>
{
if
(
!
res
.
data
)
{
return
false
;
}
const
l
=
res
.
data
.
map
((
i
)
=>
{
return
i
.
userId
;
});
// l = [1089725294, 1089728785];
// that.memberList = [
// {
// accId: 'd_3651506947_uat',
// avatarImageUrl: 'https://test-file.yunqueyi.com/File/doctor_default.png',
// id: 1089725294,
// liveUserId: 'd_3651506947_uat_1089725294',
// name: '顾超',
// role: 2,
// status: 3,
// type: 1
// },
// {
// accId: 'd_1909506947_uat',
// avatarImageUrl: 'https://test-file.yunqueyi.com/File/doctor_default.png',
// id: 1089728785,
// liveUserId: 'd_1909506947_uat_1089728785',
// name: '陈影',
// role: 1,
// status: 3,
// type: 1,
// }
// ];
if
(
l
&&
l
.
length
>
0
&&
that
.
memberList
&&
that
.
memberList
.
length
>
0
)
{
that
.
memberList
.
map
((
i
)
=>
{
console
.
log
(
'res==---'
,
l
,
i
.
id
,
l
.
includes
(
i
.
id
));
if
(
l
.
includes
(
i
.
id
))
{
// 在线 更新状态
that
.
addNewMember
(
i
.
liveUserId
);
}
else
{
// 不在线 更新状态
if
(
i
.
role
==
1
&&
that
.
doctorTrtcEntryStatus
!=
3
)
{
that
.
removeMember
(
i
.
liveUserId
);
}
if
(
i
.
role
==
2
&&
that
.
userTrtcEntryStatus
!=
3
)
{
that
.
removeMember
(
i
.
liveUserId
);
}
}
});
}
else
{
if
(
that
.
memberList
&&
that
.
memberList
.
length
>
0
)
{
that
.
memberList
.
map
(
i
=>
{
that
.
removeMember
(
i
.
liveUserId
);
});
}
}
});
},
2000
);
},
},
};
</
script
>
...
...
src/views/IM/diagnosis-admin/diagnosis-list-new.vue
浏览文件 @
e5148557
...
...
@@ -1128,7 +1128,7 @@
this
.
userName
=
row
.
userName
;
this
.
userNamePhone
=
row
.
userMobile
;
this
.
triageDepartment
=
row
.
triageDepartment
;
this
.
departmentId
=
row
.
d
epartmentId
;
this
.
departmentId
=
row
.
triageD
epartmentId
;
this
.
diagnosisTimeVisible
=
true
;
this
.
bizType
=
5
;
// }
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录