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

返回列表页优化

上级 d3e4135a
...@@ -356,53 +356,6 @@ export default { ...@@ -356,53 +356,6 @@ export default {
return document.getElementById(elmId); return document.getElementById(elmId);
}, },
/* 处理发送消息
1: 先将消息体直接显示在对话框中
2: 设置一个时间戳,以便再次找回
3: 保存再次发送的数据
4: 设置各种状态(1:isShowErrorIcon; 2:isShowLoadingIcon; 3:isShowErrorMsg)
*/
handleSendMsg(params, sendId) {
let text = "";
let msg = Object.assign({}, params);
msg.fromAccount = this.tid;
msg.toAccount = this.picakfAccId;
// type: 0, // 类型 0文本 1图片 2pdf 3链接
msg.text = params.info || "";
msg.suffix = params.remark || "";
if (msg.type == 3) {
msg.suffix = params.info;
msg.text = params.remark || "";
}
msg.size = params.fileSize;
msg.url = params.url;
msg.showType = params.type - 0 + 1;
msg.sessionFlag = false;
msg.isShowLoadingIcon = true;
msg.isShowErrorIcon = false;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
msg.extData = Object.assign({}, params); // 再将发送时的数据
msg.sendId = sendId;
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)
}
this.messageList.push(msg)
this.$nextTick(() => {
var element = document.querySelector(".scroll-box")
element.scrollTop = element.scrollHeight
});
},
// 查询医生和居民的消息历史(下拉刷新时调用) // 查询医生和居民的消息历史(下拉刷新时调用)
getOldMSGHistory() { getOldMSGHistory() {
if(this.hasNoHistoryData) return if(this.hasNoHistoryData) return
...@@ -773,6 +726,54 @@ export default { ...@@ -773,6 +726,54 @@ export default {
this.sendText = ""; this.sendText = "";
}, },
/* 处理发送消息
1: 先将消息体直接显示在对话框中
2: 设置一个时间戳,以便再次找回
3: 保存再次发送的数据
4: 设置各种状态(1:isShowErrorIcon; 2:isShowLoadingIcon; 3:isShowErrorMsg)
*/
handleSendMsg(params, sendId) {
let text = "";
let msg = Object.assign({}, params);
msg.fromAccount = this.tid;
msg.toAccount = this.picakfAccId;
// type: 0, // 类型 0文本 1图片 2pdf 3链接
msg.text = params.info || "";
msg.suffix = params.remark || "";
if (msg.type == 3) {
msg.suffix = params.info;
msg.text = params.remark || "";
}
msg.size = params.fileSize;
msg.url = params.url;
msg.showType = params.type - 0 + 1;
msg.sessionFlag = false;
msg.isShowLoadingIcon = true;
msg.isShowErrorIcon = false;
msg.isShowErrorMsg = false; // 只有在下次拉取新数据时才有可能是为ture
msg.extData = Object.assign({}, params); // 再将发送时的数据
msg.sendId = sendId;
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)
}
this.messageList.push(msg)
this.$nextTick(() => {
var element = document.querySelector(".scroll-box")
element.scrollTop = element.scrollHeight
});
},
// 发送通用消息 // 发送通用消息
async sendCommonMsg(params) { async sendCommonMsg(params) {
let sendMsgParams = { let sendMsgParams = {
...@@ -803,20 +804,20 @@ export default { ...@@ -803,20 +804,20 @@ export default {
} }
if (res.data.checkFlag == 1) { if (res.data.checkFlag == 1) {
this.realTimestamp = res.data.timetag this.realTimestamp = res.data.timetag
this.teamMemberList.forEach((item, index) => { msg.isShowLoadingIcon = false
if(params.fromAccount == item.accId) { msg.isShowErrorIcon = false
msg.name = item.name msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
}
})
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = false
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
} else { } else {
msg.signature = res.data.signature msg.signature = res.data.signature
msg.isShowLoadingIcon = false msg.isShowLoadingIcon = false
msg.isShowErrorIcon = true msg.isShowErrorIcon = true
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
} }
this.teamMemberList.forEach((item, index) => {
if(params.fromAccount == item.accId) {
msg.name = item.name
}
})
} else { } else {
this.$message({ this.$message({
message: res.message, message: res.message,
......
...@@ -242,10 +242,16 @@ export default { ...@@ -242,10 +242,16 @@ export default {
'endTime': [ 'endTime': [
{ required: true, message: '请选择预约结束时间', trigger: 'change'} { required: true, message: '请选择预约结束时间', trigger: 'change'}
] ]
} },
liveBack: false
} }
}, },
mounted() { mounted() {
this.liveBack = this.$route.query.liveBack || false
if(this.liveBack) {
this.activeName = 'first'
}
this.searchParam.tab = 1
this.getDiagnoseTypeList() this.getDiagnoseTypeList()
this.getDiagnoseList() this.getDiagnoseList()
this.search() this.search()
......
...@@ -110,11 +110,13 @@ export default { ...@@ -110,11 +110,13 @@ export default {
}) })
.then(() => { .then(() => {
closeLoading(this) closeLoading(this)
this.$router.go(-1) this.$router.push({path: '/diagnosis-list', query: {liveBack: true}})
//this.$router.go(-1)
}) })
.catch((err) => { .catch((err) => {
closeLoading(this) closeLoading(this)
this.$router.go(-1) this.$router.push({path: '/diagnosis-list', query: {liveBack: true}})
//this.$router.go(-1)
}) })
}) })
} }
...@@ -375,7 +377,8 @@ export default { ...@@ -375,7 +377,8 @@ export default {
leave() { leave() {
this.rtc.leave() this.rtc.leave()
this.clearSession() this.clearSession()
this.$router.go(-1) this.$router.push({path: '/diagnosis-list', query: {liveBack: true}})
//this.$router.go(-1)
}, },
// 结束会话 // 结束会话
overFn() { overFn() {
...@@ -427,10 +430,12 @@ export default { ...@@ -427,10 +430,12 @@ export default {
title: `获取信息失败,请稍后重试` title: `获取信息失败,请稍后重试`
}) })
.then(() => { .then(() => {
this.$router.go(-1) this.$router.push({path: '/diagnosis-list', query: {liveBack: true}})
//this.$router.go(-1)
}) })
.catch((err) => { .catch((err) => {
this.$router.go(-1) this.$router.push({path: '/diagnosis-list', query: {liveBack: true}})
//this.$router.go(-1)
}) })
}) })
}, },
......
...@@ -77,24 +77,27 @@ ...@@ -77,24 +77,27 @@
margin-bottom: 8px; margin-bottom: 8px;
} }
.send-warpper { .send-warpper {
display: flex; // display: flex;
flex-direction: row; // flex-direction: row;
align-items: center; // align-items: center;
& > .icon { & > .icon {
float: left;
width: 20px; width: 20px;
height: 20px; height: 20px;
margin-right: 10px; margin-right: 10px;
margin-top: 10px;
} }
.mid-text-wrapper { .mid-text-wrapper {
display: flex; display: inline-block;
flex-direction: row; // display: flex;
align-items: center; // flex-direction: row;
& > img { // align-items: center;
width: 18px; // & > img {
height: 18px; // width: 18px;
margin-right: 8px; // height: 18px;
cursor: pointer; // margin-right: 8px;
} // cursor: pointer;
// }
} }
.mid-text { .mid-text {
padding: 12px 16px; padding: 12px 16px;
...@@ -283,6 +286,7 @@ ...@@ -283,6 +286,7 @@
} }
&.cr { &.cr {
flex-direction: row-reverse; flex-direction: row-reverse;
//justify-content: flex-end;
.msg-item-img { .msg-item-img {
margin-right: 0; margin-right: 0;
margin-left: 8px; margin-left: 8px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册