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

发送消息

上级 ed65e46f
...@@ -210,7 +210,6 @@ export default { ...@@ -210,7 +210,6 @@ export default {
currentSessionIndex: 0, // 当前会话序号 currentSessionIndex: 0, // 当前会话序号
currentSession: {}, currentSession: {},
currentTaskLogId: "", // 当前会话ID currentTaskLogId: "", // 当前会话ID
currentToAccId: "",
picakfAccId: "", picakfAccId: "",
historyTimestamp: 0, historyTimestamp: 0,
realTimestamp: 0, realTimestamp: 0,
...@@ -269,7 +268,6 @@ export default { ...@@ -269,7 +268,6 @@ export default {
_this = this; _this = this;
this.picakfAccId = getPicaKFAccid(); this.picakfAccId = getPicaKFAccid();
this.tid = this.$route.query.tid || ''; this.tid = this.$route.query.tid || '';
this.kfAvatar = require("../../../assets/image/IM/kf-avatar.png");
this.getFiveContentList(); this.getFiveContentList();
autoCompletionIntervalId && clearInterval(autoCompletionIntervalId); autoCompletionIntervalId && clearInterval(autoCompletionIntervalId);
autoCompletionIntervalId = setInterval(() => { autoCompletionIntervalId = setInterval(() => {
...@@ -360,7 +358,7 @@ export default { ...@@ -360,7 +358,7 @@ export default {
handleSendMsg(params, sendId) { handleSendMsg(params, sendId) {
let text = ""; let text = "";
let msg = Object.assign({}, params); let msg = Object.assign({}, params);
msg.fromAccount = this.currentToAccId; msg.fromAccount = this.tid;
msg.toAccount = this.picakfAccId; msg.toAccount = this.picakfAccId;
// type: 0, // 类型 0文本 1图片 2pdf 3链接 // type: 0, // 类型 0文本 1图片 2pdf 3链接
msg.text = params.info || ""; msg.text = params.info || "";
...@@ -378,11 +376,16 @@ export default { ...@@ -378,11 +376,16 @@ export default {
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
msg.extData = Object.assign({}, params); // 再将发送时的数据 msg.extData = Object.assign({}, params); // 再将发送时的数据
msg.sendId = sendId; msg.sendId = sendId;
msg.sendOrReceive = false; msg.sendOrReceive = true;
msg.avatarImg = this.kfAvatar;
msg.timestampStr = new Date().format("hh:mm"); msg.timestampStr = new Date().format("hh:mm");
msg.realTimestamp = this.realTimestamp; msg.realTimestamp = this.realTimestamp;
msg.taskLogId = this.currentTaskLogId; msg.taskLogId = this.currentTaskLogId;
this.teamMemberList.forEach(item => {
if(this.picakfAccId = item.accId) {
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);
} }
...@@ -755,7 +758,7 @@ export default { ...@@ -755,7 +758,7 @@ export default {
async sendCommonMsg(params) { async sendCommonMsg(params) {
let sendMsgParams = { let sendMsgParams = {
fromAccount: this.picakfAccId, fromAccount: this.picakfAccId,
toAccount: this.currentToAccId, toAccount: this.tid,
fileExt: "", // 文件扩展名称图片或PDF文件) fileExt: "", // 文件扩展名称图片或PDF文件)
fileSize: 0, // 文件大小(图片或PDF文件) fileSize: 0, // 文件大小(图片或PDF文件)
height: 0, // 图片高度(仅图片) height: 0, // 图片高度(仅图片)
...@@ -771,7 +774,7 @@ export default { ...@@ -771,7 +774,7 @@ export default {
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/message/sendMessage", params) await this.POST("/im/team/op/message/send", params)
.then(res => { .then(res => {
if (res.code === "000000") { if (res.code === "000000") {
// 校验结果:1校验通过 2校验不通过 // 校验结果:1校验通过 2校验不通过
......
...@@ -75,10 +75,12 @@ ...@@ -75,10 +75,12 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<el-button type="primary" size="small" @click="timeHandle(scope.row)">预约时间</el-button> <el-button type="primary" size="small" @click="timeHandle(scope.row)">预约时间</el-button>
<!-- <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 type="primary" size="small" @click="endDiagnosis(scope.row)">结束问诊</el-button>
</div> </div>
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
<el-button type="primary" size="small" @click="callAll(scope.row)">呼叫双方</el-button> <el-button type="primary" size="small" @click="callAll(scope.row)">呼叫双方</el-button>
<!-- <el-button type="primary" size="small" @click="callAll(scope.row)">加入沟通</el-button> -->
<el-button type="primary" size="small" @click="sendMessage(scope.row)">发送消息</el-button> <el-button type="primary" size="small" @click="sendMessage(scope.row)">发送消息</el-button>
</div> </div>
</template> </template>
...@@ -294,16 +296,22 @@ export default { ...@@ -294,16 +296,22 @@ export default {
}, },
// 结束问诊 // 结束问诊
endDiagnosis(row) { endDiagnosis(row) {
this.POST(`/diagnose/admin/diagnose/end/${row.diagnoseLogId}`, '').then(res => { this.$confirm('确定结束问诊吗?', '提示', {
if (res.code == "000000") { confirmButtonText: '确定',
this.$message({ cancelButtonText: '取消',
message: '成功结束问诊', type: 'warning'
type: "success" }).then(() => {
}); this.POST(`/diagnose/admin/diagnose/end/${row.diagnoseLogId}`, '').then(res => {
this.searchParam.tab = 1; if (res.code == "000000") {
this.search(); this.$message({
} message: '成功结束问诊',
}); type: "success"
});
this.searchParam.tab = 1;
this.search();
}
});
})
}, },
// 呼叫双方 // 呼叫双方
callAll() { callAll() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册