Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-admin-consultation
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-admin-consultation
提交
c17c5bda
提交
c17c5bda
编写于
1月 26, 2021
作者:
huangwensu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
去掉时间查询消息
上级
0784b791
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
56 行增加
和
109 行删除
+56
-109
index.vue
src/views/IM/chain-message/index.vue
+7
-6
detail.vue
src/views/IM/search-message/detail.vue
+46
-100
list.vue
src/views/IM/search-message/list.vue
+3
-3
未找到文件。
src/views/IM/chain-message/index.vue
浏览文件 @
c17c5bda
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<el-input
clearable
v-model=
"searchParam.title"
size=
"mini"
maxlength=
"20"
placeholder=
"请输入群发标题"
style=
"width: 300px;"
></el-input>
<el-input
clearable
v-model=
"searchParam.title"
size=
"mini"
maxlength=
"20"
placeholder=
"请输入群发标题"
style=
"width: 300px;"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"目标用户"
>
<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
<el-upload
class=
"upload-demo"
class=
"upload-demo"
accept=
".xlsx"
accept=
".xlsx"
...
@@ -38,11 +38,11 @@
...
@@ -38,11 +38,11 @@
maxlength="499"
maxlength="499"
show-word-limit
show-word-limit
placeholder="请输入文本信息"
placeholder="请输入文本信息"
style="width:
3
00px;">
</el-input>
style="width:
6
00px;">
</el-input>
</div>
</div>
<div
class=
"file-content"
v-if=
"item.type == 1 || item.type == 2"
>
<div
class=
"file-content"
v-if=
"item.type == 1 || item.type == 2"
>
<p>
文件信息
<i
class=
"el-icon-error"
@
click=
"deleteFile(item,index)"
></i></p>
<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
<el-upload
class=
"upload-demo"
class=
"upload-demo"
action=
"#"
action=
"#"
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
{
doUpload
,
getFilePath
}
from
"@/utils/qiniu-util"
;
import
{
doUpload
,
getFilePath
}
from
"@/utils/qiniu-util"
;
import
{
openLoading
,
closeLoading
,
isEmptyUtils
}
from
"@/utils/utils"
;
import
{
openLoading
,
closeLoading
,
isEmptyUtils
}
from
"@/utils/utils"
;
import
{
getPicaKFAccid
,
getPhomeDemain
}
from
"@/utils"
;
import
*
as
commonUtil
from
"@/utils/utils"
;
import
*
as
commonUtil
from
"@/utils/utils"
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -168,7 +169,6 @@ export default {
...
@@ -168,7 +169,6 @@ export default {
// 添加文件
// 添加文件
addFile
()
{
addFile
()
{
if
(
this
.
searchParam
.
contentModelList
.
length
<
5
)
{
if
(
this
.
searchParam
.
contentModelList
.
length
<
5
)
{
this
.
searchParam
.
contentModelList
.
push
({
this
.
searchParam
.
contentModelList
.
push
({
type
:
1
,
type
:
1
,
info
:
''
,
info
:
''
,
...
@@ -265,7 +265,7 @@ export default {
...
@@ -265,7 +265,7 @@ export default {
if
(
req
.
contentModelList
[
i
].
type
==
3
)
{
if
(
req
.
contentModelList
[
i
].
type
==
3
)
{
this
.
linkList
.
forEach
((
element
,
index
)
=>
{
this
.
linkList
.
forEach
((
element
,
index
)
=>
{
if
(
element
.
title
==
req
.
contentModelList
[
i
].
info
)
{
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 {
...
@@ -277,7 +277,7 @@ export default {
});
});
return
return
}
}
if
(
isEmptyUtils
(
req
.
fileModel
))
{
if
(
isEmptyUtils
(
req
.
fileModel
.
base64
))
{
this
.
$message
({
this
.
$message
({
message
:
'请上传人员名单'
,
message
:
'请上传人员名单'
,
type
:
'warning'
type
:
'warning'
...
@@ -334,6 +334,7 @@ export default {
...
@@ -334,6 +334,7 @@ export default {
margin
:
20px
20px
0
;
margin
:
20px
20px
0
;
padding
:
10px
;
padding
:
10px
;
background
:
#fff
;
background
:
#fff
;
overflow
:
auto
;
.search-title
{
.search-title
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
...
...
src/views/IM/search-message/detail.vue
浏览文件 @
c17c5bda
<
template
>
<
template
>
<!-- v-infinite-scroll="getDeatailData(0)" getHistoryData(0)-->
<div
class=
"search-msg-detail"
>
<div
class=
"search-msg-detail"
>
<bread-crumb
:curmbFirst=
"curmbFirst"
:curmbSecond=
"curmbSecond"
:jumPathThird=
"jumPathThird"
></bread-crumb>
<bread-crumb
:curmbFirst=
"curmbFirst"
:curmbSecond=
"curmbSecond"
:jumPathThird=
"jumPathThird"
></bread-crumb>
<div
class=
"detail-content"
>
<div
class=
"detail-content"
>
...
@@ -62,7 +61,7 @@ export default {
...
@@ -62,7 +61,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
hasSearchDate
:
false
,
//
hasSearchDate: false,
jumPathThird
:
'/search-message-list'
,
jumPathThird
:
'/search-message-list'
,
curmbFirst
:
'消息查询'
,
curmbFirst
:
'消息查询'
,
curmbSecond
:
'消息详情'
,
curmbSecond
:
'消息详情'
,
...
@@ -81,26 +80,28 @@ export default {
...
@@ -81,26 +80,28 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
hasSearchDate
=
this
.
$route
.
query
.
hasSearchDate
;
//
this.hasSearchDate = this.$route.query.hasSearchDate;
this
.
lastMsg
Time
=
this
.
$route
.
query
.
msgTimestamp
;
this
.
history
Time
=
this
.
$route
.
query
.
msgTimestamp
;
this
.
doctorAccId
=
this
.
$route
.
query
.
doctorAccId
;
this
.
doctorAccId
=
this
.
$route
.
query
.
doctorAccId
;
this
.
userAvatar
=
this
.
$route
.
query
.
avatarImageUrl
;
this
.
userAvatar
=
this
.
$route
.
query
.
avatarImageUrl
;
this
.
userName
=
this
.
$route
.
query
.
userName
;
this
.
userName
=
this
.
$route
.
query
.
userName
;
this
.
picakfAccId
=
getPicaKFAccid
();
this
.
picakfAccId
=
getPicaKFAccid
();
},
},
mounted
()
{
mounted
()
{
this
.
getDeatailData
(
1
);
// this.getDeatailData(1);
this
.
getHistoryData
(
1
);
let
_this
=
this
;
let
_this
=
this
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
let
el
=
_this
.
getElmByID
(
'scroll-set'
);
let
el
=
_this
.
getElmByID
(
'scroll-set'
);
// _this.containerHeight = _this.getElmByID('slidebar-container').getBoundingClientRect().height - 15;
// _this.containerHeight = _this.getElmByID('slidebar-container').getBoundingClientRect().height - 15;
_this
.
containerHeight
=
document
.
body
.
clientHeight
-
80
;
_this
.
containerHeight
=
document
.
body
.
clientHeight
-
80
;
_this
.
getElmByID
(
'scroll-set'
).
style
.
height
=
_this
.
containerHeight
-
152
+
"px"
;
_this
.
getElmByID
(
'scroll-set'
).
style
.
height
=
_this
.
containerHeight
-
152
+
"px"
;
if
(
_this
.
hasSearchDate
)
{
// 有查询日期 滚动条最顶部
// if(_this.hasSearchDate) { // 有查询日期 滚动条最顶部
el
.
scrollTop
=
10
;
// el.scrollTop = 10;
}
else
{
// 没有查询日期 滚动条最底部
// }else { // 没有查询日期 滚动条最底部
el
.
scrollTop
=
el
.
scrollHeight
;
// el.scrollTop = el.scrollHeight;
}
// }
el
.
scrollTop
=
el
.
scrollHeight
;
let
flag
=
true
,
timeoutId
=
null
,
downflag
=
true
,
downtimeoutId
=
null
;
let
flag
=
true
,
timeoutId
=
null
,
downflag
=
true
,
downtimeoutId
=
null
;
el
.
addEventListener
(
'scroll'
,
function
()
{
el
.
addEventListener
(
'scroll'
,
function
()
{
let
allH
,
sh
;
let
allH
,
sh
;
...
@@ -116,66 +117,17 @@ export default {
...
@@ -116,66 +117,17 @@ export default {
},
150
)
},
150
)
}
}
}
}
if
((
sh
-
allH
<
1
)
&&
_this
.
hasForwardData
&&
_this
.
hasSearchDate
)
{
// if((sh - allH
<
1
)
&&
_this
.
hasForwardData
)
{
if
(
downflag
)
{
//
if(downflag) {
downflag
=
false
;
//
downflag = false;
downtimeoutId
&&
clearTimeout
(
downtimeoutId
);
//
downtimeoutId && clearTimeout(downtimeoutId);
downtimeoutId
=
setTimeout
(
()
=>
{
//
downtimeoutId = setTimeout( () => {
_this
.
getDeatailData
(
0
);
//
_this.getDeatailData(0);
downflag
=
true
;
//
downflag = true;
},
150
)
//
}, 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( () => {
// _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;
// }, 150)
// }
// }
// })
// }
},
100
);
},
100
);
},
},
methods
:
{
methods
:
{
...
@@ -184,37 +136,31 @@ export default {
...
@@ -184,37 +136,31 @@ export default {
return
document
.
getElementById
(
elmId
);
return
document
.
getElementById
(
elmId
);
},
},
// 获取详情数据以及下拉加载历史数据
// 获取详情数据以及下拉加载历史数据
getDeatailData
(
param
)
{
// 最新的时间在最后面
// getDeatailData(param) { // 最新的时间在最后面
let
url
=
'/im/msg/forward'
;
// let url = '/im/msg/forward';
let
req
=
{
// let req = {
doctorAccId
:
this
.
doctorAccId
,
// doctorAccId: this.doctorAccId,
includeFlag
:
param
,
// 第一次加载是1 上翻历史是0
// includeFlag: param, // 第一次加载是1 上翻历史是0
lastMsgTimestamp
:
this
.
lastMsgTime
,
// lastMsgTimestamp: this.lastMsgTime,
limit
:
20
,
// limit: 20,
patientAccId
:
this
.
picakfAccId
,
// patientAccId: this.picakfAccId,
unionId
:
""
// unionId: ""
}
// }
this
.
POST
(
url
,
req
).
then
((
res
)
=>
{
// this.POST(url, req).then((res) => {
if
(
res
.
code
==
'000000'
)
{
// if(res.code == '000000') {
let
arr
=
[];
// let arr = [];
if
(
res
.
data
.
length
>
0
)
{
// if(res.data.length > 0) {
this
.
hasForwardData
=
true
;
// this.hasForwardData = true;
this
.
historyTime
=
res
.
data
[
0
].
timestamp
;
// this.historyTime = res.data[0].timestamp;
this
.
lastMsgTime
=
res
.
data
[
res
.
data
.
length
-
1
].
timestamp
;
// this.lastMsgTime = res.data[res.data.length - 1].timestamp;
arr
=
this
.
dataconcatHandle
(
res
.
data
);
// arr = this.dataconcatHandle(res.data);
this
.
detailData
.
push
(...
arr
);
// this.detailData.push(...arr);
}
else
{
// }else {
this
.
hasForwardData
=
false
;
// this.hasForwardData = false;
}
// }
// if(this.hasSearchDate) { // 查询条件不包含日期
// }
// this.$nextTick(() => {
// })
// var element = document.querySelector(".scroll-box");
// },
// element.scrollTop = element.scrollHeight;
// });
// }
}
})
},
// 上翻查看最新消息
// 上翻查看最新消息
getHistoryData
(
param
)
{
// 最新的时间在最前面
getHistoryData
(
param
)
{
// 最新的时间在最前面
let
url
=
'/im/msg/history'
;
let
url
=
'/im/msg/history'
;
...
...
src/views/IM/search-message/list.vue
浏览文件 @
c17c5bda
...
@@ -88,7 +88,7 @@ export default {
...
@@ -88,7 +88,7 @@ export default {
totalRows
:
0
,
totalRows
:
0
,
tableData
:
[],
tableData
:
[],
loading
:
false
,
loading
:
false
,
hasSearchDate
:
false
// 查询条件不包含日期
//
hasSearchDate: false // 查询条件不包含日期
};
};
},
},
computed
:
{},
computed
:
{},
...
@@ -131,7 +131,7 @@ export default {
...
@@ -131,7 +131,7 @@ export default {
// 查看消息详情
// 查看消息详情
edit
(
row
)
{
edit
(
row
)
{
if
(
this
.
searchParam
.
chooseDate
)
this
.
hasSearchDate
=
true
;
//
if(this.searchParam.chooseDate) this.hasSearchDate = true;
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
`/search-message-detail`
,
path
:
`/search-message-detail`
,
query
:
{
query
:
{
...
@@ -139,7 +139,7 @@ export default {
...
@@ -139,7 +139,7 @@ export default {
doctorAccId
:
row
.
accId
,
doctorAccId
:
row
.
accId
,
userName
:
row
.
userName
,
userName
:
row
.
userName
,
avatarImageUrl
:
row
.
avatarImageUrl
,
avatarImageUrl
:
row
.
avatarImageUrl
,
hasSearchDate
:
this
.
hasSearchDate
//
hasSearchDate: this.hasSearchDate
}
}
});
});
},
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录