提交 60e497c0 编写于 作者: haochangdi's avatar haochangdi

Merge branch 'dev-diagnosis-20210323' of...

Merge branch 'dev-diagnosis-20210323' of http://192.168.110.53/com.pica.cloud.education.frontend/pica-admin-consultation into dev-diagnosis-20210323

# Conflicts:
#	src/views/layout/slidebar.vue
......@@ -25,7 +25,7 @@ export default [{
children: [
{
path: '',
redirect: '/diagnosisList'
redirect: '/diagnosis-list'
},{
path: '/diagnosis-list',
component: diagnosisList
......
......@@ -18,7 +18,7 @@ export const envConfig = {
innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
phomeDemain: 'https://dev-phome.yunqueyi.com',
picakfAccId: 'picakf_dev',
picakfAccId: 'picaop_dev',
},
dev: {
baseUrl: 'https://dev-sc.yunqueyi.com',
......@@ -29,7 +29,7 @@ export const envConfig = {
innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
phomeDemain: 'https://dev-phome.yunqueyi.com',
picakfAccId: 'picakf_dev',
picakfAccId: 'picaop_dev',
},
test: {
baseUrl: 'https://test1-sc.yunqueyi.com',
......@@ -40,7 +40,7 @@ export const envConfig = {
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
phomeDemain: 'https://test1-phome.yunqueyi.com',
picakfAccId: 'picakf_test',
picakfAccId: 'picaop_test',
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com',
......@@ -53,7 +53,7 @@ export const envConfig = {
innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html',
phomeDemain: 'https://uat-phome.yunqueyi.com',
picakfAccId: 'picakf_uat',
picakfAccId: 'picaop_uat',
},
pro: {
baseUrl: 'https://sc.yunqueyi.com',
......@@ -64,6 +64,6 @@ export const envConfig = {
innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html',
phomeDemain: 'https://phome.yunqueyi.com',
picakfAccId: 'picakf',
picakfAccId: 'picaop',
}
}
......@@ -3,6 +3,7 @@ import store from '../store'
// import { getHostnameAndPort } from '../utils'
// axios.defaults.withCredentials = true
// 创建axios实例对象
const service = axios.create({
// baseURL: process.env.BASE_API
timeout: 600000,
......
......@@ -2,15 +2,11 @@
<div class="current-session-wrap">
<section class="component-content screenSet" id="screenSet">
<article
v-show="sessionListData.sessionList.length"
class="center"
v-loadmore="getOldMSGHistory"
>
<section class="c-header">
<div class="c-header-l">
<!-- <img :src="currentSession.avatarImageUrl" alt />
<span class="name">{{doctorInfo.name}}</span>
<span class="time-tip">当前会话时长:{{currentContinueTimes | continueTimesFilter}}</span> -->
<span class="time-tip">问诊医生XX医生的问诊群聊</span>
</div>
</section>
......@@ -18,16 +14,15 @@
<section id="msgContentId" class="msg-content scroll-box">
<article
v-for="(item, index) in messageList"
:key="index"
:style="{'text-align': item.sendOrReceive ? 'right' : 'left'}"
>
<div class="split-line" v-if="item.sessionFlag">本次会话结束</div>
:key="index">
<!-- <div class="split-line" v-if="item.sessionFlag">本次会话结束</div> -->
<!-- sendOrReceive 为true在右边 -->
<div class="msg-item" :class="{'cr': item.sendOrReceive}">
<div class="msg-item-img">
<img :src="item.avatarImg" alt />
</div>
<div class="msg-item-detail">
<span class="mid-time">{{item.timestampStr}}</span>
<div class="msg-item-detail" :class="{'line': item.showType == 10}">
<span class="mid-time">{{item.name}} {{item.timestampStr}}</span>
<div class="send-warpper">
<img
v-if="item.sendOrReceive && item.isShowErrorIcon"
......@@ -53,7 +48,6 @@
alt
/>
</div>
</div>
<div v-if="item.showType == 3" class="mid-pdf" @click="openPDF(item)">
<div class="midp-left">
......@@ -64,22 +58,6 @@
<img src="../../../assets/image/IM/icon-pdf.png" alt />
</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">
{{item.text}}
<span class="link">{{item.suffix}}</span>
......@@ -88,6 +66,43 @@
<img src="../../../assets/image/IM/icon-warning-circle.png" alt />
<span>该消息类型PC端暂不支持</span>
</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 v-if="item.showType == 8" class="time-box">
<div class="title">{{item.title}}</div>
<div class="time">{{item.text.timeStr}}</div>
<div class="time-text">{{item.text.tips}}</div>
</div>
<!-- 音视频与IM的交互 -->
<div v-if="item.showType == 9" class="live-box">
<div class="live-notice">{{item.text}}</div>
</div>
<!-- 问诊结束 -->
<div v-if="item.showType == 10" class="diagnosis-end">
<div class="split-line">{{item.text}}</div>
</div>
<!-- 医生建议模块 -->
<div v-if="item.showType == 11" class="suggession-box">
<div class="title">医生建议</div>
<div class="suggession-text">{{item.content}}</div>
</div>
</div>
</div>
</div>
......@@ -168,14 +183,12 @@
</div>
</template>
<script>
import { mapGetters, mapMutations } from "vuex";
import BreadCrumb from "@/components/breadcrumb.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { openLoading, closeLoading, betaHandle } from "@/utils/utils";
import { getPicaKFAccid, getPhomeDemain } from "@/utils";
const CONTAINER_HEIGHT = 700;
let forwardMsgIntervalId = null,
sessionIntervalId = null,
continueIntervalId = null,
autoCompletionIntervalId = null,
cacheMap = {};
......@@ -200,15 +213,9 @@ export default {
currentSessionIndex: 0, // 当前会话序号
currentSession: {},
currentTaskLogId: "", // 当前会话ID
currentToAccId: "",
picakfAccId: "",
historyTimestamp: 0,
realTimestamp: 0,
doctorInfo: {
name: "",
mobilePhone: "",
isShowCopyBtn: true
},
containerHeight: CONTAINER_HEIGHT,
showSelectDialog: false,
linkForm: {
......@@ -216,8 +223,7 @@ export default {
info: "",
url: ""
},
linkList: [],
// 消息列表 showType 1: 文本; 2: 图片; 3: PDF; 4: 链接; 5: 不支持类型;
linkList: [], // 消息列表 showType 1: 文本; 2: 图片; 3: PDF; 4: 链接; 5: 不支持类型; 6: 语音;7: 病例;
messageList: [],
rules: {
info: [
......@@ -229,11 +235,12 @@ export default {
imgHeight: 0,
imgProportion: 0,
hasNoHistoryData: false,
tid: '',
teamMemberList: []
};
},
computed: {
// ...mapGetters(["isFromAssignTask"]),
canSend() {
return !!this.sendText;
}
......@@ -262,15 +269,9 @@ export default {
created() {
_this = this;
this.picakfAccId = getPicaKFAccid();
this.kfAvatar = require("../../../assets/image/IM/kf-avatar.png");
this.getSessionList();
sessionIntervalId && clearInterval(sessionIntervalId);
sessionIntervalId = setInterval(() => {
this.getSessionList();
}, 3000);
this.picakfAccId = getPicaKFAccid();
this.tid = this.$route.query.tid || '';
this.getFiveContentList();
autoCompletionIntervalId && clearInterval(autoCompletionIntervalId);
autoCompletionIntervalId = setInterval(() => {
this.autoCompletionInterval();
......@@ -284,33 +285,23 @@ export default {
event.preventDefault();
}
};
this.getMembersList(); // 获取群聊成员信息
},
mounted() {
cacheMap = {};
this.$nextTick(() => {
_this.containerHeight = document.body.clientHeight - 80;
_this.getElmByID("screenSet").style.height =
_this.containerHeight - 76 + "px";
// console.log('_this.containerHeight', _this.containerHeight);
// _this.getElmByID("sessionListId").style.height =
// _this.containerHeight - 176 + "px";
// _this.getElmByID("userInfoId").style.height =
// _this.containerHeight - 76 + "px";
_this.getElmByID("msgContentId").style.height =
_this.containerHeight - 211 + "px";
_this.containerHeight = document.body.clientHeight - 80;
_this.getElmByID("screenSet").style.height = _this.containerHeight - 76 + "px";
_this.getElmByID("msgContentId").style.height = _this.containerHeight - 211 + "px";
});
},
methods: {
//
// ...mapMutations(["SET_IS_FROM_ASSIGN_TASK"]),
// 含有敏感信息的消息,自行补全提示文案
// 每30秒监测敏感信息
autoCompletionInterval() {
if (!this.messageList.length) return;
// console.log('in autoCompletionInterval');
// 将带有loading的消息转成失败的
this.messageList.forEach(item => {
if (item.isShowLoadingIcon) {
......@@ -318,8 +309,7 @@ export default {
item.isShowErrorIcon = true;
}
});
let flag = false,
msg;
let flag = false, msg;
for (let i = 0; i < this.messageList.length; i++) {
msg = this.messageList[i];
if (msg.isShowErrorIcon && !msg.isShowErrorMsg) {
......@@ -332,20 +322,25 @@ export default {
}
},
// 查询群组成员列表
getMembersList() {
this.GET("/im/team/member/list", {tid: this.tid}).then(res => {
if (res.code === "000000") {
this.teamMemberList = res.data;
this.getMSGHistory(); // 查询群聊历史消息
}
});
},
// 查询医生和居民的消息 - 向前查找
getMSGForwardForAC(msg) {
let session = this.currentSession;
let params = {
doctorAccId: this.currentToAccId,
includeFlag: 0,
lastClientIdServer: session.lastMsgIdClient,
lastMsgIdServer: session.lastMsgIdServer,
lastMsgTimestamp: msg.realTimestamp,
limit: 50,
patientAccId: this.picakfAccId,
unionId: ""
tid: this.tid
};
this.POST("/im/msg/forward", params).then(res => {
this.POST("/im/team/message/forward", params).then(res => {
if (res.code === "000000") {
this.contactForwardMessage(res.data, false);
}
......@@ -357,15 +352,16 @@ export default {
return document.getElementById(elmId);
},
// 处理发送消息
// 1: 先将消息体直接显示在对话框中
// 2: 设置一个时间戳,以便再次找回
// 3: 保存再次发送的数据
// 4: 设置各种状态(1:isShowErrorIcon; 2:isShowLoadingIcon; 3:isShowErrorMsg)
/* 处理发送消息
1: 先将消息体直接显示在对话框中
2: 设置一个时间戳,以便再次找回
3: 保存再次发送的数据
4: 设置各种状态(1:isShowErrorIcon; 2:isShowLoadingIcon; 3:isShowErrorMsg)
*/
handleSendMsg(params, sendId) {
let text = "";
let msg = Object.assign({}, params);
msg.fromAccount = this.currentToAccId;
msg.fromAccount = this.tid;
msg.toAccount = this.picakfAccId;
// type: 0, // 类型 0文本 1图片 2pdf 3链接
msg.text = params.info || "";
......@@ -382,14 +378,17 @@ export default {
msg.isShowErrorIcon = false;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
msg.extData = Object.assign({}, params); // 再将发送时的数据
msg.sendId = sendId; //
msg.sendOrReceive = true;
msg.avatarImg = this.kfAvatar;
msg.sendId = sendId;
msg.sendOrReceive = true;
msg.timestampStr = new Date().format("hh:mm");
msg.realTimestamp = this.realTimestamp;
msg.taskLogId = this.currentTaskLogId;
console.log("####msg####", msg);
//
this.teamMemberList.forEach(item => {
if(this.picakfAccId = item.accId) {
msg.avatarImg = item.avatarImageUrl; // 运营头像
}
})
if(msg.type == 1) {
this.imgSizeHandleNew(msg, msg.width, msg.height);
}
......@@ -402,20 +401,14 @@ export default {
// 查询医生和居民的消息历史(下拉刷新时调用)
getOldMSGHistory() {
console.log('this.hasNoHistoryData', this.hasNoHistoryData);
if(this.hasNoHistoryData) return;
let session = this.currentSession;
let params = {
doctorAccId: this.currentToAccId,
includeFlag: 0, // 不带本条消息
lastClientIdServer: session.lastMsgIdClient,
lastMsgIdServer: session.lastMsgIdServer,
lastMsgTimestamp: this.historyTimestamp,
limit: 20,
patientAccId: this.picakfAccId,
unionId: ""
tid: this.tid
};
this.POST("/im/msg/history", params).then(res => {
this.POST("/im/team/message/history", params).then(res => {
if (res.code === "000000") {
// 将新消息合并到之前的消息中, 并且重置最后一条消息
if(res.data && res.data.length > 0) {
......@@ -435,16 +428,11 @@ export default {
// 查询医生和居民的消息历史(第一次进来时就调用)
getMSGHistory(session) {
let params = {
doctorAccId: this.currentToAccId,
includeFlag: 1, // 带本条消息
lastClientIdServer: session.lastMsgIdClient,
lastMsgIdServer: session.lastMsgIdServer,
lastMsgTimestamp: session.lastMsgTime,
limit: 20,
patientAccId: this.picakfAccId,
unionId: ""
tid: this.tid
};
this.POST("/im/msg/history", params).then(res => {
this.POST("/im/team/message/history", params).then(res => {
if (res.code === "000000") {
this.convertMessageList(res.data, 1);
} else {
......@@ -459,23 +447,15 @@ export default {
// 查询医生和居民的消息 - 向前查找
// 将获取消息列表插入到当前消息列表的最后
getMSGForward() {
let session = this.currentSession;
let params = {
doctorAccId: this.currentToAccId,
includeFlag: 0,
lastClientIdServer: session.lastMsgIdClient,
lastMsgIdServer: session.lastMsgIdServer,
lastMsgTimestamp: this.realTimestamp,
limit: 20,
patientAccId: this.picakfAccId,
unionId: ""
tid: this.tid
};
this.POST("/im/msg/forward", params).then(res => {
this.POST("/im/team/message/forward", params).then(res => {
if (res.code === "000000") {
this.convertMessageList(res.data, 2);
if (res.data.length) {
this.readAllMsg();
}
} else {
this.$message({
message: res.message,
......@@ -485,12 +465,13 @@ export default {
});
},
// 转换消息格式
// 处理的消息类型只有5种:
// type == TEXT(showType:1)
// type == image 或 picture(showType:2)
// type == custom时,18: PDF文件(showType:3); 19: 链接信息(showType:4); 1 ~ 17: 不支持的消息类型(showType:5);
// directFlag 1: 第一次取数据; 2: 拼接实时消息(push); 3: 拼接历史消息(unshift);
/* 转换消息格式
处理的消息类型只有5种:
type == TEXT(showType:1)
type == image 或 picture(showType:2)
type == custom时,18: PDF文件(showType:3); 19: 链接信息(showType:4); 1 ~ 17: 不支持的消息类型(showType:5);
directFlag 1: 第一次取数据; 2: 拼接实时消息(push); 3: 拼接历史消息(unshift);
*/
convertMessageList(messageList, directFlag = 1) {
messageList.sort((a, b) => {
return a.timestamp - b.timestamp;
......@@ -502,6 +483,7 @@ export default {
showType = 1,
size = 0,
url = "",
title = "",
cMessageList = [];
messageList.forEach((rawMsg, index) => {
text = "";
......@@ -509,43 +491,64 @@ export default {
showType = 1;
size = 0;
url = "";
title = "";
msg = Object.assign({}, rawMsg);
msg.sendOrReceive = rawMsg.fromAccId !== this.currentToAccId;
msg.avatarImg = msg.sendOrReceive
? this.kfAvatar
: this.currentSession.avatarImageUrl;
msg.sendOrReceive = rawMsg.fromAccId === this.picakfAccId; // 判断消息是显示在左边还是右边, true 右
//msg.avatarImg = msg.sendOrReceive ? this.kfAvatar : this.currentSession.avatarImageUrl;
for(let i = 0; i < this.teamMemberList.length; i++) {
if(rawMsg.fromAccId == this.teamMemberList[i].accId) {
msg.avatarImg = this.teamMemberList[i].avatarImageUrl;
msg.name = this.teamMemberList[i].name;
break
}
}
if (msg.type.toLowerCase() == "custom") {
content = JSON.parse(msg.content);
text = content.content;
// 系统消息:消息由于违规未发送成功(可以不处理)
if (content.bizType == -1) {
if (content.bizType == -1) { // 系统消息:消息由于违规未发送成功(可以不处理)
showType = -1;
text = content.content;
} else if (content.bizType == 18) {
} else if (content.bizType == 18) { // PDF
showType = 3;
text = content.name;
size = content.size;
url = content.url;
} else if (content.bizType == 19) {
} else if (content.bizType == 19) { // 链接
showType = 4;
text = content.content;
suffix = content.suffix;
} else {
} else if(content.bizType == 22){ // 病例
showType = 7;
title = content.title;
text = JSON.parse(content.content);
} else if(content.bizType == 23) { // 预约时间
showType = 8;
title = content.title;
text = JSON.parse(content.content);
} else if(content.bizType == 24){ // 音视频与IM交互
showType = 9;
text = content.content;
} else if(content.bizType == 25){ // 本次问诊结束
showType = 10;
text = content.content;
}else {
showType = 5;
}
} else if (
msg.type.toLowerCase() == "image" ||
msg.type.toLowerCase() == "picture"
) {
} else if( msg.type.toLowerCase() == "image" || msg.type.toLowerCase() == "picture") { // 图片
content = JSON.parse(msg.content);
url = content.url;
text = content.name;
showType = 2;
this.imgSizeHandleNew(msg, content.w, content.h);
}else if(msg.type.toLowerCase() == "audio") { // 语音
content = JSON.parse(msg.content);
url = content.url;
showType = 6
} else {
showType = 1;
showType = 1; // 文本
text = msg.content;
}
msg.title = title;
msg.text = text;
msg.showType = showType;
msg.suffix = suffix;
......@@ -567,9 +570,7 @@ export default {
scrollBoxDom.scrollTop = scrollBoxDom.scrollHeight;
});
}, 100);
this.currentContinueTimes =
this.sessionListData.currentTimestamp -
this.currentSession.handleStartTime;
this.currentContinueTimes = this.sessionListData.currentTimestamp - this.currentSession.handleStartTime;
continueIntervalId && clearInterval(continueIntervalId);
continueIntervalId = setInterval(() => {
this.currentContinueTimes += 1000;
......@@ -658,115 +659,6 @@ export default {
window.open(item.url, "__blank");
},
// 获取会话列表
getSessionList() {
this.GET("/im/session/kf/list").then(res => {
if (res.code === "000000") {
this.sessionListData = res.data || {
currentTimestamp: 0,
myTaskCount: 0,
sessionList: [],
waitingTaskCount: 0
};
let sLength = this.sessionListData.sessionList.length;
let cIndex = sLength - 1;
// if (!this.isFromAssignTask) {
// this.SET_IS_FROM_ASSIGN_TASK(false);
// cIndex = 0;
// }
// 第一次进入页面
if (sLength && !this.currentTaskLogId) {
// this.currentSession = this.sessionListData.sessionList[0];
// this.currentSessionIndex = 0;
this.currentSession = this.sessionListData.sessionList[cIndex];
this.currentSessionIndex = cIndex;
this.sendText = cacheMap[this.currentSession.id];
this.currentTaskLogId = this.currentSession.taskLogId;
this.currentToAccId = this.currentSession.toAccId;
this.getDoctorInfo(this.currentToAccId);
this.getMSGHistory(this.currentSession);
this.readAllMsg();
// 如果是点击“再来一个”或“给我一个任务吧”按钮分配的任务,则要滚动到最后
// if (this.isFromAssignTask) {
// this.$nextTick(() => {
// let element = this.getElmByID("sessionListId");
// if (element) {
// element.scrollTop = element.scrollHeight;
// }
// });
// }
}
if (sLength) {
//this.convertSessions(this.sessionListData.sessionList);
this.$forceUpdate();
}
} else {
this.$message({
message: res.message,
type: "error"
});
}
});
},
// 将会话列表的数据进行处理,主要是显示文本(text)字段
// convertSessions(sessions) {
// let convertSessionList = [];
// let text = "",
// cc;
// sessions.forEach((session, index) => {
// if (session.lastMsgType.toLowerCase() == "custom") {
// cc = JSON.parse(session.lastMsgContent);
// text = cc.suffix || cc.content || cc.title || cc.name;
// } else if (
// session.lastMsgType.toLowerCase() == "image" ||
// session.lastMsgType.toLowerCase() == "picture"
// ) {
// text = "[图片]";
// } else {
// text = session.lastMsgContent;
// }
// session.text = text;
// convertSessionList.push(session);
// });
// this.sessionListData.sessionList = convertSessionList;
// },
// 根据云信id获取医生信息
getDoctorInfo(accId) {
this.GET(`/im/account/accid/doctorinfo?accId=${accId}`).then(res => {
if (res.code === "000000") {
this.doctorInfo = res.data || {};
} else {
this.$message({
message: res.message,
type: "error"
});
}
});
},
// 设置全部消息已读
readAllMsg() {
let fromAccount = this.currentToAccId,
toAccount = this.picakfAccId;
let params = {
fromAccount,
toAccount
};
this.POST(`/im/msg/read/all`, params).then(res => {
if (res.code === "000000") {
this.currentSession.unreadCount = 0;
} else {
this.$message({
message: res.message,
type: "error"
});
}
});
},
// 根据字段名及其值,从数组中查找对象
findItemByKeyAndVal(arr, key, value, flag = 0) {
if (flag == 0) {
......@@ -879,7 +771,7 @@ export default {
async sendCommonMsg(params) {
let sendMsgParams = {
fromAccount: this.picakfAccId,
toAccount: this.currentToAccId,
toAccount: this.tid,
fileExt: "", // 文件扩展名称图片或PDF文件)
fileSize: 0, // 文件大小(图片或PDF文件)
height: 0, // 图片高度(仅图片)
......@@ -895,12 +787,10 @@ export default {
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
let sendId = new Date().getTime();
this.handleSendMsg(params, sendId);
// console.log("sendMsgParams", params);
await this.POST("/im/msg/sendMessage", params)
await this.POST("/im/team/op/message/send", params)
.then(res => {
if (res.code === "000000") {
// 校验结果:1校验通过 2校验不通过
// console.log(res.data.checkFlag);
let msg = this.messageList[this.messageList.length - 1];
if (msg.sendId !== sendId) {
msg = this.getMsgBySendId(sendId);
......@@ -961,7 +851,6 @@ export default {
},
beforeDestroy() {
sessionIntervalId && clearInterval(sessionIntervalId);
forwardMsgIntervalId && clearInterval(forwardMsgIntervalId);
autoCompletionIntervalId && clearInterval(autoCompletionIntervalId);
}
......
......@@ -73,12 +73,14 @@
<el-table-column prop="statusStr" label="问诊状态" min-width="80" align="left"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="150">
<template slot-scope="scope">
<!-- 1 初始状态 2待咨询 3 咨询中 4已结束 -->
<div>
<el-button type="primary" size="small" @click="timeHandle(scope.row)">预约时间</el-button>
<el-button type="primary" size="small" @click="endDiagnosis(scope.row)">结束问诊</el-button>
<el-button v-if="scope.row.status != 4" type="primary" size="small" @click="timeHandle(scope.row)">修改时间</el-button>
<el-button v-if="scope.row.status == 3" type="primary" size="small" @click="endDiagnosis(scope.row)">结束</el-button>
</div>
<div style="margin-top: 10px;">
<el-button type="primary" size="small" @click="callAll(scope.row)">呼叫双方</el-button>
<el-button v-if="scope.row.status == 3 && scope.row.imStatus == 1" type="primary" size="small" @click="callAll(scope.row)">呼叫双方</el-button>
<el-button v-if="scope.row.status == 3 && scope.row.imStatus == 2" type="primary" size="small" @click="callAll(scope.row)">加入问诊</el-button>
<el-button type="primary" size="small" @click="sendMessage(scope.row)">发送消息</el-button>
</div>
</template>
......@@ -281,12 +283,17 @@ export default {
this.loading = false;
if (res.code == "000000") {
this.$message({
message: '预约成功',
message: '修改预约时间成功',
type: "success"
});
this.searchParam.tab = 1;
this.timeVisible = false;
this.search();
}else {
this.$message({
message: res.message,
type: "error"
})
}
});
}
......@@ -294,16 +301,27 @@ export default {
},
// 结束问诊
endDiagnosis(row) {
this.POST(`/diagnose/admin/diagnose/end/${row.diagnoseLogId}`, '').then(res => {
if (res.code == "000000") {
this.$message({
message: '成功结束问诊',
type: "success"
});
this.searchParam.tab = 1;
this.search();
}
});
this.$confirm('确定结束问诊吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.POST(`/diagnose/admin/diagnose/end/${row.diagnoseLogId}`, '').then(res => {
if (res.code == "000000") {
this.$message({
message: '成功结束问诊',
type: "success"
});
this.searchParam.tab = 1;
this.search();
}else {
this.$message({
message: res.message,
type: "error"
})
}
});
})
},
// 呼叫双方
callAll() {
......@@ -311,7 +329,7 @@ export default {
},
// 发送消息
sendMessage(row) {
this.$router.push('/diagnosis-im')
this.$router.push({path: '/diagnosis-im', query: {tid: row.imTeamId}})
},
// 选择
selectBtn(row) {
......@@ -323,6 +341,11 @@ export default {
});
this.searchParam.tab = 1;
this.search();
}else {
this.$message({
message: res.message,
type: "error"
})
}
});
this.activeName = 'first';
......
......@@ -300,7 +300,6 @@
color: #B4B4B4;
}
}
}
& > .time-box {
width: 260px;
......@@ -324,9 +323,72 @@
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;
}
& > .live-box {
width: 202px;
height: 44px;
line-height: 44px;
background: #f0f1f2;
border-radius: 8px;
text-align: center;
}
& > .diagnosis-end {
width: 100%;
.split-line {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
margin: 15px 0;
font-size: 14px;
color: #999999;
&::before {
flex: 1;
content: '';
height: 1px;
margin-right: 18px;
background: #f0f1f2;
}
&::after {
flex: 1;
content: '';
height: 1px;
margin-left: 18px;
background: #f0f1f2;
}
}
}
}
}
.msg-item-detail.line {
width: 100%;
}
&.cr {
flex-direction: row-reverse;
.msg-item-img {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册