提交 ed65e46f 编写于 作者: huangwensu's avatar huangwensu

添加语音和病例类型

上级 69d7e404
...@@ -3,6 +3,7 @@ import store from '../store' ...@@ -3,6 +3,7 @@ import store from '../store'
// import { getHostnameAndPort } from '../utils' // import { getHostnameAndPort } from '../utils'
// axios.defaults.withCredentials = true // axios.defaults.withCredentials = true
// 创建axios实例对象
const service = axios.create({ const service = axios.create({
// baseURL: process.env.BASE_API // baseURL: process.env.BASE_API
timeout: 600000, timeout: 600000,
......
...@@ -39,6 +39,21 @@ ...@@ -39,6 +39,21 @@
<div v-if="item.showType == 1" class="mid-text-wrapper" style="max-width: 520px;"> <div v-if="item.showType == 1" class="mid-text-wrapper" style="max-width: 520px;">
<div class="mid-text">{{item.text}}</div> <div class="mid-text">{{item.text}}</div>
</div> </div>
<!-- 预约时间模块 -->
<!-- <div v-if="item.showType == 1" class="time-box">
<div class="title">电话/视频问诊时间已确定</div>
<div class="time">已预约 2021-03-20 下午 3:00-3:30</div>
<div class="time-text">因PCR反应模板仅为DNA,因此在进行PCR反应钱,应将新型冠状病毒核酸逆转录为DNA。</div>
</div> -->
<!-- 医生建议模块 -->
<!-- <div v-if="item.showType == 1" class="suggession-box">
<div class="title">医生建议</div>
<div class="suggession-text">无糖饮食,参加体育锻炼,不适随诊</div>
</div> -->
<!-- 音视频与IM的交互 -->
<!-- <div v-if="item.showType == 1" class="live-box">
<div class="mid-text">{{item.text}}</div>
</div> -->
<div v-if="item.showType == 2" class="mid-img" v-viewer> <div v-if="item.showType == 2" class="mid-img" v-viewer>
<div class="img-box"> <div class="img-box">
<img <img
...@@ -59,22 +74,6 @@ ...@@ -59,22 +74,6 @@
<img src="../../../assets/image/IM/icon-pdf.png" alt /> <img src="../../../assets/image/IM/icon-pdf.png" alt />
</div> </div>
</div> </div>
<!-- <div v-if="item.showType == 3" class="diagnosis-box">
<div class="title">朱德承医生向朱家医生发起的问诊</div>
<div class="dia-text">
<span class="label">患者:</span>
<span>王大锤 男 40岁</span>
</div>
<div class="dia-text">
<span class="label">病情描述:</span>
<span>因PCR反应模板仅为DNA,因此在进行PCR反应钱,应将新型冠状病毒核酸逆转录为DNA。</span>
</div>
</div> -->
<!-- <div v-if="item.showType == 3" class="time-box">
<div class="title">电话/视频问诊时间已确定</div>
<div class="time">已预约 2021-03-20 下午 3:00-3:30</div>
<div class="time-text">因PCR反应模板仅为DNA,因此在进行PCR反应钱,应将新型冠状病毒核酸逆转录为DNA。</div>
</div> -->
<div v-if="item.showType == 4" class="mid-text"> <div v-if="item.showType == 4" class="mid-text">
{{item.text}} {{item.text}}
<span class="link">{{item.suffix}}</span> <span class="link">{{item.suffix}}</span>
...@@ -83,6 +82,24 @@ ...@@ -83,6 +82,24 @@
<img src="../../../assets/image/IM/icon-warning-circle.png" alt /> <img src="../../../assets/image/IM/icon-warning-circle.png" alt />
<span>该消息类型PC端暂不支持</span> <span>该消息类型PC端暂不支持</span>
</div> </div>
<!-- 语音消息 -->
<div v-if="item.showType == 6" class="audio-box">
<audio controls>
<source :src="item.url" type="audio/mpeg">
</audio>
</div>
<!-- 问诊开始与病例模块 -->
<div v-if="item.showType == 7" class="diagnosis-box">
<div class="title">{{item.title}}</div>
<div class="dia-text">
<span class="label">患者:</span>
<span>{{item.text.patientName}} {{item.text.sex == 1 ? '男' : '女'}} {{item.text.age}}</span>
</div>
<div class="dia-text">
<span class="label">病情描述:</span>
<span>{{item.text.illnessDetail}}</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -204,7 +221,7 @@ export default { ...@@ -204,7 +221,7 @@ export default {
info: "", info: "",
url: "" url: ""
}, },
linkList: [], // 消息列表 showType 1: 文本; 2: 图片; 3: PDF; 4: 链接; 5: 不支持类型; linkList: [], // 消息列表 showType 1: 文本; 2: 图片; 3: PDF; 4: 链接; 5: 不支持类型; 6: 语音;7: 病例;
messageList: [], messageList: [],
rules: { rules: {
info: [ info: [
...@@ -267,6 +284,7 @@ export default { ...@@ -267,6 +284,7 @@ export default {
event.preventDefault(); event.preventDefault();
} }
}; };
this.getMembersList(); // 获取群聊成员信息
}, },
mounted() { mounted() {
...@@ -276,8 +294,6 @@ export default { ...@@ -276,8 +294,6 @@ export default {
_this.getElmByID("screenSet").style.height = _this.containerHeight - 76 + "px"; _this.getElmByID("screenSet").style.height = _this.containerHeight - 76 + "px";
_this.getElmByID("msgContentId").style.height = _this.containerHeight - 211 + "px"; _this.getElmByID("msgContentId").style.height = _this.containerHeight - 211 + "px";
}); });
this.getMembersList(); // 获取群聊成员信息
this.getMSGHistory(); // 查询群聊历史消息
}, },
methods: { methods: {
...@@ -310,6 +326,7 @@ export default { ...@@ -310,6 +326,7 @@ export default {
this.GET("/im/team/member/list", {tid: this.tid}).then(res => { this.GET("/im/team/member/list", {tid: this.tid}).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.teamMemberList = res.data; this.teamMemberList = res.data;
this.getMSGHistory(); // 查询群聊历史消息
} }
}); });
}, },
...@@ -460,6 +477,7 @@ export default { ...@@ -460,6 +477,7 @@ export default {
showType = 1, showType = 1,
size = 0, size = 0,
url = "", url = "",
title = "",
cMessageList = []; cMessageList = [];
messageList.forEach((rawMsg, index) => { messageList.forEach((rawMsg, index) => {
text = ""; text = "";
...@@ -467,6 +485,7 @@ export default { ...@@ -467,6 +485,7 @@ export default {
showType = 1; showType = 1;
size = 0; size = 0;
url = ""; url = "";
title = "";
msg = Object.assign({}, rawMsg); msg = Object.assign({}, rawMsg);
msg.sendOrReceive = rawMsg.fromAccId === this.picakfAccId; // 判断消息是显示在左边还是右边, true 右 msg.sendOrReceive = rawMsg.fromAccId === this.picakfAccId; // 判断消息是显示在左边还是右边, true 右
//msg.avatarImg = msg.sendOrReceive ? this.kfAvatar : this.currentSession.avatarImageUrl; //msg.avatarImg = msg.sendOrReceive ? this.kfAvatar : this.currentSession.avatarImageUrl;
...@@ -492,7 +511,11 @@ export default { ...@@ -492,7 +511,11 @@ export default {
showType = 4; showType = 4;
text = content.content; text = content.content;
suffix = content.suffix; suffix = content.suffix;
} else { } else if(content.bizType == 22){ // 病例
showType = 7;
title = content.title;
text = JSON.parse(content.content);
}else {
showType = 5; showType = 5;
} }
} else if( msg.type.toLowerCase() == "image" || msg.type.toLowerCase() == "picture") { // 图片 } else if( msg.type.toLowerCase() == "image" || msg.type.toLowerCase() == "picture") { // 图片
...@@ -501,10 +524,15 @@ export default { ...@@ -501,10 +524,15 @@ export default {
text = content.name; text = content.name;
showType = 2; showType = 2;
this.imgSizeHandleNew(msg, content.w, content.h); this.imgSizeHandleNew(msg, content.w, content.h);
}else if(msg.type.toLowerCase() == "audio") { // 语音
content = JSON.parse(msg.content);
url = content.url;
showType = 6
} else { } else {
showType = 1; // 文本 showType = 1; // 文本
text = msg.content; text = msg.content;
} }
msg.title = title;
msg.text = text; msg.text = text;
msg.showType = showType; msg.showType = showType;
msg.suffix = suffix; msg.suffix = suffix;
......
...@@ -300,7 +300,6 @@ ...@@ -300,7 +300,6 @@
color: #B4B4B4; color: #B4B4B4;
} }
} }
} }
& > .time-box { & > .time-box {
width: 260px; width: 260px;
...@@ -324,6 +323,33 @@ ...@@ -324,6 +323,33 @@
color: #7C7C7C; color: #7C7C7C;
} }
} }
& > .suggession-box {
width: 260px;
text-align: left;
padding: 10px 15px;
background: #f0f1f2;
border-radius: 8px;
min-height: 80px;
.title {
padding-bottom: 10px;
font-size: 14px;
font-weight: 700;
}
.suggession-text {
font-size: 12px;
color: #7C7C7C;
.label {
color: #B4B4B4;
}
}
}
& > .audio-box audio {
width: 242px;
height: 44px;
background: #EBF5FC;
border-radius: 20px;
}
} }
} }
......
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
JSON.stringify(vueMenuDtos) JSON.stringify(vueMenuDtos)
); );
// 做当前路由无权限时处理 // 做当前路由无权限时处理
this.checkAuth(this.$route.path.split("/")[1], vueMenuDtos); //this.checkAuth(this.$route.path.split("/")[1], vueMenuDtos);
} }
}); });
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册