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

发送消息

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