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

返回列表页优化

上级 d3e4135a
......@@ -356,53 +356,6 @@ export default {
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() {
if(this.hasNoHistoryData) return
......@@ -773,6 +726,54 @@ export default {
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) {
let sendMsgParams = {
......@@ -803,20 +804,20 @@ export default {
}
if (res.data.checkFlag == 1) {
this.realTimestamp = res.data.timetag
this.teamMemberList.forEach((item, index) => {
if(params.fromAccount == item.accId) {
msg.name = item.name
}
})
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = false
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = false
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
} else {
msg.signature = res.data.signature
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = true
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
msg.signature = res.data.signature
msg.isShowLoadingIcon = false
msg.isShowErrorIcon = true
msg.isShowErrorMsg = false // 只有在下次拉取新数据时才有可能是为ture
}
this.teamMemberList.forEach((item, index) => {
if(params.fromAccount == item.accId) {
msg.name = item.name
}
})
} else {
this.$message({
message: res.message,
......
......@@ -242,10 +242,16 @@ export default {
'endTime': [
{ required: true, message: '请选择预约结束时间', trigger: 'change'}
]
}
},
liveBack: false
}
},
mounted() {
this.liveBack = this.$route.query.liveBack || false
if(this.liveBack) {
this.activeName = 'first'
}
this.searchParam.tab = 1
this.getDiagnoseTypeList()
this.getDiagnoseList()
this.search()
......
......@@ -110,11 +110,13 @@ export default {
})
.then(() => {
closeLoading(this)
this.$router.go(-1)
this.$router.push({path: '/diagnosis-list', query: {liveBack: true}})
//this.$router.go(-1)
})
.catch((err) => {
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 {
leave() {
this.rtc.leave()
this.clearSession()
this.$router.go(-1)
this.$router.push({path: '/diagnosis-list', query: {liveBack: true}})
//this.$router.go(-1)
},
// 结束会话
overFn() {
......@@ -427,10 +430,12 @@ export default {
title: `获取信息失败,请稍后重试`
})
.then(() => {
this.$router.go(-1)
this.$router.push({path: '/diagnosis-list', query: {liveBack: true}})
//this.$router.go(-1)
})
.catch((err) => {
this.$router.go(-1)
this.$router.push({path: '/diagnosis-list', query: {liveBack: true}})
//this.$router.go(-1)
})
})
},
......
......@@ -77,24 +77,27 @@
margin-bottom: 8px;
}
.send-warpper {
display: flex;
flex-direction: row;
align-items: center;
// display: flex;
// flex-direction: row;
// align-items: center;
& > .icon {
float: left;
width: 20px;
height: 20px;
margin-right: 10px;
margin-top: 10px;
}
.mid-text-wrapper {
display: flex;
flex-direction: row;
align-items: center;
& > img {
width: 18px;
height: 18px;
margin-right: 8px;
cursor: pointer;
}
display: inline-block;
// display: flex;
// flex-direction: row;
// align-items: center;
// & > img {
// width: 18px;
// height: 18px;
// margin-right: 8px;
// cursor: pointer;
// }
}
.mid-text {
padding: 12px 16px;
......@@ -283,6 +286,7 @@
}
&.cr {
flex-direction: row-reverse;
//justify-content: flex-end;
.msg-item-img {
margin-right: 0;
margin-left: 8px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册