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

去掉时间查询消息

上级 0784b791
......@@ -9,7 +9,7 @@
<el-input clearable v-model="searchParam.title" size="mini" maxlength="20" placeholder="请输入群发标题" style="width: 300px;"></el-input>
</el-form-item>
<el-form-item label="目标用户">
<el-input clearable v-model="excelfileName" size="mini" placeholder="请上传目标用户" style="width: 300px;"></el-input>
<el-input clearable v-model="excelfileName" readonly size="mini" placeholder="请上传目标用户" style="width: 300px;"></el-input>
<el-upload
class="upload-demo"
accept=".xlsx"
......@@ -38,11 +38,11 @@
maxlength="499"
show-word-limit
placeholder="请输入文本信息"
style="width: 300px;"></el-input>
style="width: 600px;"></el-input>
</div>
<div class="file-content" v-if="item.type == 1 || item.type == 2">
<p>文件信息<i class="el-icon-error" @click="deleteFile(item,index)"></i></p>
<el-input v-model="item.info" size="mini" placeholder="请上传文件信息" style="width: 300px;"></el-input>
<el-input v-model="item.info" readonly size="mini" placeholder="请上传文件信息" style="width: 300px;"></el-input>
<el-upload
class="upload-demo"
action="#"
......@@ -89,6 +89,7 @@
import BreadCrumb from "@/components/breadcrumb.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { openLoading, closeLoading, isEmptyUtils } from "@/utils/utils";
import { getPicaKFAccid, getPhomeDemain } from "@/utils";
import * as commonUtil from "@/utils/utils";
export default {
components: {
......@@ -168,7 +169,6 @@ export default {
// 添加文件
addFile() {
if(this.searchParam.contentModelList.length < 5) {
this.searchParam.contentModelList.push({
type: 1,
info: '',
......@@ -265,7 +265,7 @@ export default {
if(req.contentModelList[i].type == 3) {
this.linkList.forEach((element, index) => {
if(element.title == req.contentModelList[i].info) {
req.contentModelList[i].url = element.linkUrl;
req.contentModelList[i].url = getPhomeDemain() + `/template_v2/?id=${element.id}`;
}
});
}
......@@ -277,7 +277,7 @@ export default {
});
return
}
if(isEmptyUtils(req.fileModel)) {
if(isEmptyUtils(req.fileModel.base64)) {
this.$message({
message: '请上传人员名单',
type: 'warning'
......@@ -334,6 +334,7 @@ export default {
margin: 20px 20px 0;
padding: 10px;
background: #fff;
overflow: auto;
.search-title {
display: flex;
flex-direction: row;
......
<template>
<!-- v-infinite-scroll="getDeatailData(0)" getHistoryData(0)-->
<div class="search-msg-detail">
<bread-crumb :curmbFirst="curmbFirst" :curmbSecond="curmbSecond" :jumPathThird="jumPathThird"></bread-crumb>
<div class="detail-content">
......@@ -62,7 +61,7 @@ export default {
},
data() {
return {
hasSearchDate: false,
// hasSearchDate: false,
jumPathThird: '/search-message-list',
curmbFirst:'消息查询',
curmbSecond:'消息详情',
......@@ -81,26 +80,28 @@ export default {
};
},
created() {
this.hasSearchDate = this.$route.query.hasSearchDate;
this.lastMsgTime = this.$route.query.msgTimestamp;
// this.hasSearchDate = this.$route.query.hasSearchDate;
this.historyTime = this.$route.query.msgTimestamp;
this.doctorAccId = this.$route.query.doctorAccId;
this.userAvatar = this.$route.query.avatarImageUrl;
this.userName = this.$route.query.userName;
this.picakfAccId = getPicaKFAccid();
},
mounted() {
this.getDeatailData(1);
// this.getDeatailData(1);
this.getHistoryData(1);
let _this = this;
setTimeout(() => {
let el = _this.getElmByID('scroll-set');
// _this.containerHeight = _this.getElmByID('slidebar-container').getBoundingClientRect().height - 15;
_this.containerHeight = document.body.clientHeight - 80;
_this.getElmByID('scroll-set').style.height = _this.containerHeight - 152 + "px";
if(_this.hasSearchDate) { // 有查询日期 滚动条最顶部
el.scrollTop = 10;
}else { // 没有查询日期 滚动条最底部
// if(_this.hasSearchDate) { // 有查询日期 滚动条最顶部
// el.scrollTop = 10;
// }else { // 没有查询日期 滚动条最底部
// el.scrollTop = el.scrollHeight;
// }
el.scrollTop = el.scrollHeight;
}
let flag = true, timeoutId = null, downflag = true, downtimeoutId = null;
el.addEventListener('scroll', function() {
let allH, sh;
......@@ -116,66 +117,17 @@ export default {
}, 150)
}
}
if((sh - allH < 1) && _this.hasForwardData && _this.hasSearchDate) {
if(downflag) {
downflag = false;
downtimeoutId && clearTimeout(downtimeoutId);
downtimeoutId = setTimeout( () => {
_this.getDeatailData(0);
downflag = true;
}, 150)
}
}
})
// if(_this.hasSearchDate) { // 有查询日期 滚动条最顶部
// el.scrollTop = 10;
// let flag = true, timeoutId = null;
// el.addEventListener('scroll', function() {
// let allH, sh;
// allH = el.scrollTop + el.clientHeight;
// sh = el.scrollHeight;
// if(el.scrollTop < 1 && _this.hasHistoryData) {
// if(flag) {
// flag = false;
// timeoutId && clearTimeout(timeoutId);
// timeoutId = setTimeout( () => {
// _this.getHistoryData(0);
// flag = true;
// }, 150)
// }
// }
// if((sh - allH < 1) && _this.hasForwardData) {
// if(flag) {
// flag = false;
// timeoutId && clearTimeout(timeoutId);
// timeoutId = setTimeout( () => {
// if(downflag) {
// downflag = false;
// downtimeoutId && clearTimeout(downtimeoutId);
// downtimeoutId = setTimeout( () => {
// _this.getDeatailData(0);
// flag = true;
// }, 150)
// }
// }
// })
// }else { // 没有查询日期 滚动条最底部
// el.scrollTop = el.scrollHeight;
// let flag = true, timeoutId = null;
// el.addEventListener('scroll', function() {
// if(el.scrollTop < 1 && _this.hasHistoryData) {
// if(flag) {
// flag = false;
// timeoutId && clearTimeout(timeoutId);
// timeoutId = setTimeout( () => {
// _this.getHistoryData(0);
// flag = true;
// downflag = true;
// }, 150)
// }
// }
// })
// }
})
},100);
},
methods: {
......@@ -184,37 +136,31 @@ export default {
return document.getElementById(elmId);
},
// 获取详情数据以及下拉加载历史数据
getDeatailData(param) { // 最新的时间在最后面
let url = '/im/msg/forward';
let req = {
doctorAccId: this.doctorAccId,
includeFlag: param, // 第一次加载是1 上翻历史是0
lastMsgTimestamp: this.lastMsgTime,
limit: 20,
patientAccId: this.picakfAccId,
unionId: ""
}
this.POST(url, req).then((res) => {
if(res.code == '000000') {
let arr = [];
if(res.data.length > 0) {
this.hasForwardData = true;
this.historyTime = res.data[0].timestamp;
this.lastMsgTime = res.data[res.data.length - 1].timestamp;
arr = this.dataconcatHandle(res.data);
this.detailData.push(...arr);
}else {
this.hasForwardData = false;
}
// if(this.hasSearchDate) { // 查询条件不包含日期
// this.$nextTick(() => {
// var element = document.querySelector(".scroll-box");
// element.scrollTop = element.scrollHeight;
// });
// getDeatailData(param) { // 最新的时间在最后面
// let url = '/im/msg/forward';
// let req = {
// doctorAccId: this.doctorAccId,
// includeFlag: param, // 第一次加载是1 上翻历史是0
// lastMsgTimestamp: this.lastMsgTime,
// limit: 20,
// patientAccId: this.picakfAccId,
// unionId: ""
// }
}
})
},
// this.POST(url, req).then((res) => {
// if(res.code == '000000') {
// let arr = [];
// if(res.data.length > 0) {
// this.hasForwardData = true;
// this.historyTime = res.data[0].timestamp;
// this.lastMsgTime = res.data[res.data.length - 1].timestamp;
// arr = this.dataconcatHandle(res.data);
// this.detailData.push(...arr);
// }else {
// this.hasForwardData = false;
// }
// }
// })
// },
// 上翻查看最新消息
getHistoryData(param) { // 最新的时间在最前面
let url = '/im/msg/history';
......
......@@ -88,7 +88,7 @@ export default {
totalRows: 0,
tableData: [],
loading: false,
hasSearchDate: false // 查询条件不包含日期
// hasSearchDate: false // 查询条件不包含日期
};
},
computed: {},
......@@ -131,7 +131,7 @@ export default {
// 查看消息详情
edit(row) {
if(this.searchParam.chooseDate) this.hasSearchDate = true;
// if(this.searchParam.chooseDate) this.hasSearchDate = true;
this.$router.push({
path: `/search-message-detail`,
query: {
......@@ -139,7 +139,7 @@ export default {
doctorAccId: row.accId,
userName: row.userName,
avatarImageUrl: row.avatarImageUrl,
hasSearchDate: this.hasSearchDate
// hasSearchDate: this.hasSearchDate
}
});
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册