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
提交
e8d3dea7
提交
e8d3dea7
编写于
1月 20, 2021
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
样式及bug修改
上级
8969437d
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
128 行增加
和
68 行删除
+128
-68
user-info.vue
src/components/IM/user-info.vue
+1
-1
common.scss
src/style/common.scss
+26
-12
index.scss
src/views/IM/current-session/index.scss
+6
-0
index.vue
src/views/IM/current-session/index.vue
+76
-50
list.vue
src/views/IM/waiting-session/list.vue
+19
-5
未找到文件。
src/components/IM/user-info.vue
浏览文件 @
e8d3dea7
...
...
@@ -40,7 +40,7 @@
<div
class=
"icon"
>
<img
src=
"../../assets/image/IM/icon-org.png"
alt
/>
</div>
<span
class=
"desc"
>
{{
userInfo
.
hospitalName
}}
</span>
<span
class=
"desc"
>
{{
userInfo
.
hospitalName
?
userInfo
.
hospitalName
:
'无机构'
}}
</span>
</article>
</section>
<section
class=
"qt-wrapper"
>
...
...
src/style/common.scss
浏览文件 @
e8d3dea7
...
...
@@ -234,16 +234,30 @@ html,body{
}
.current-session-wrap
{
.c-bottom
.el-input__inner
{
height
:
44px
;
line-height
:
44px
;
padding-right
:
100px
;
}
.el-input.is-active
.el-input__inner
,
.el-input__inner
:focus
{
border-color
:
#eff5f7
;
}
.link-form
.el-form-item
{
margin-bottom
:
15px
;
}
// .c-bottom .el-input__inner {
// height: 44px;
// line-height: 44px;
// padding-right: 100px;
// }
// .el-input.is-active .el-input__inner,
// .el-input__inner:focus {
// border-color: #eff5f7;
// }
// .link-form .el-form-item {
// margin-bottom: 15px;
// }
.c-bottom
.el-textarea__inner
{
height
:
44px
;
line-height
:
22px
;
padding-right
:
100px
;
resize
:
none
;
}
.el-input.is-active
.el-textarea__inner
,
.el-textarea__inner
:focus
{
border-color
:
#eff5f7
;
}
.link-form
.el-form-item
{
margin-bottom
:
15px
;
}
}
\ No newline at end of file
src/views/IM/current-session/index.scss
浏览文件 @
e8d3dea7
...
...
@@ -255,10 +255,16 @@
}
}
.c-bottom
{
position
:
relative
;
top
:
0
;
left
:
0
;
display
:
flex
;
flex-direction
:
row
;
margin
:
16px
12px
16px
25px
;
.cb-icon-wrapper
{
position
:
absolute
;
top
:
0
;
right
:
70px
;
display
:
flex
;
align-items
:
center
;
height
:
44px
;
...
...
src/views/IM/current-session/index.vue
浏览文件 @
e8d3dea7
...
...
@@ -11,7 +11,7 @@
<ul
class=
"session-list"
:style=
"
{'height': containerHeight + 'px'}">
<li
class=
"item"
:class=
"
{'current': currentTaskLogId == session.
i
d}"
:class=
"
{'current': currentTaskLogId == session.
taskLogI
d}"
v-for="(session, index) in sessionListData.sessionList"
:key="index"
@click="selectSession(session, index)"
...
...
@@ -28,7 +28,7 @@
<span>
{{
session
.
text
}}
</span>
<!--
<span>
{{
session
.
lastMsgContent
}}
</span>
-->
<span
v-show=
"session.status !=3 && currentTaskLogId != session.
i
d && session.unreadCount"
v-show=
"session.status !=3 && currentTaskLogId != session.
taskLogI
d && session.unreadCount"
class=
"num"
>
{{
session
.
unreadCount
}}
</span>
<img
...
...
@@ -93,20 +93,19 @@
</article>
</section>
<section
class=
"c-bottom"
>
<el-input
placeholder=
"请输入内容"
v-model=
"sendText"
>
<div
slot=
"suffix"
class=
"cb-icon-wrapper"
>
<el-upload
class=
"bg-uploader"
action=
"#"
accept=
".jpg, .png, .pdf"
:show-file-list=
"false"
:before-upload=
"beforeUploadFile"
>
<img
src=
"../../../assets/image/IM/icon-folder-open.png"
alt
/>
</el-upload>
<img
src=
"../../../assets/image/IM/icon-link.png"
@
click=
"preSendLinkMsg"
alt
/>
</div>
</el-input>
<el-input
type=
"textarea"
placeholder=
"请输入内容"
v-model=
"sendText"
></el-input>
<div
class=
"cb-icon-wrapper"
>
<el-upload
class=
"bg-uploader"
action=
"#"
accept=
".jpg, .png, .pdf"
:show-file-list=
"false"
:before-upload=
"beforeUploadFile"
>
<img
src=
"../../../assets/image/IM/icon-folder-open.png"
alt
/>
</el-upload>
<img
src=
"../../../assets/image/IM/icon-link.png"
@
click=
"preSendLinkMsg"
alt
/>
</div>
<div
class=
"send-btn"
:class=
"
{'active': canSend}" @click="sendTextMsg">
<img
v-show=
"canSend"
src=
"../../../assets/image/IM/send-yes.png"
alt
/>
<img
v-show=
"!canSend"
src=
"../../../assets/image/IM/send-no.png"
alt
/>
...
...
@@ -166,6 +165,7 @@
</div>
</
template
>
<
script
>
// import { mapGetters } from 'vuex';
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
{
doUpload
,
getFilePath
}
from
"@/utils/qiniu-util"
;
import
{
validateWord
}
from
"@/utils/validate.js"
;
...
...
@@ -176,8 +176,11 @@ import UserInfo from "@/components/IM/user-info.vue";
const
CONTAINER_HEIGHT
=
700
;
let
forwardMsgIntervalId
=
null
;
let
sessionIntervalId
=
null
;
let
currentTimestamp
=
0
;
let
currentContinueTimes
=
0
;
let
continueIntervalId
=
null
;
let
vm
=
null
;
let
_this
=
null
;
export
default
{
components
:
{
BreadCrumb
,
...
...
@@ -187,6 +190,7 @@ export default {
return
{
curmbFirst
:
"云鹊客服"
,
curmbSecond
:
"当前会话"
,
// currentTimestamp: 0,
sendText
:
""
,
sessionListData
:
{
myTaskCount
:
0
,
...
...
@@ -223,36 +227,47 @@ export default {
},
computed
:
{
// ...mapGetters(['stickerCacheMap']),
canSend
()
{
return
!!
this
.
sendText
;
}
},
created
()
{
_this
=
this
;
this
.
picakfAccId
=
getPicaKFAccid
();
this
.
kfAvatar
=
require
(
"../../../assets/image/IM/kf-avatar.png"
);
this
.
getSessionList
();
sessionIntervalId
&&
clearInterval
(
sessionIntervalId
);
sessionIntervalId
=
setInterval
(
()
=>
{
sessionIntervalId
=
setInterval
(()
=>
{
this
.
getSessionList
();
},
10000
)
},
10000
)
;
this
.
getFiveContentList
();
document
.
onkeydown
=
function
(
ev
)
{
var
event
=
ev
||
event
;
if
(
event
.
keyCode
==
13
)
{
_this
.
sendTextMsg
();
event
.
preventDefault
();
}
};
},
mounted
:
function
()
{
let
_this
=
this
;
(
function
(
window
)
{
var
_element
=
document
.
querySelector
(
".scroll-box"
),
_refreshText
=
document
.
querySelector
(
".refreshText"
),
_startPos
=
0
,
_transitionHeight
=
0
,
_isMousedown
=
false
;
_isMousedown
=
false
,
_canRefresh
=
false
;
_element
.
addEventListener
(
"mousedown"
,
function
(
e
)
{
var
event
=
e
||
window
.
event
;
_isMousedown
=
true
;
_canRefresh
=
false
;
console
.
log
(
"##########"
,
event
);
console
.
log
(
"初始位置:"
,
event
.
pageX
);
_startPos
=
event
.
pageX
;
...
...
@@ -272,6 +287,7 @@ export default {
console
.
log
(
"当前位置:"
,
event
.
pageX
);
_transitionHeight
=
event
.
pageX
-
_startPos
;
if
(
_transitionHeight
>
0
&&
_transitionHeight
<
40
)
{
_canRefresh
=
true
;
// _refreshText.innerText = "下拉刷新";
_refreshText
.
innerText
=
""
;
_element
.
style
.
transform
=
...
...
@@ -293,8 +309,10 @@ export default {
_element
.
style
.
transform
=
"translateY(0px)"
;
// _refreshText.innerText = "更新中";
_refreshText
.
innerText
=
""
;
// todo...
_this
.
getOldMSGHistory
();
if
(
_canRefresh
)
{
_canRefresh
=
false
;
_this
.
getOldMSGHistory
();
}
},
false
);
...
...
@@ -328,7 +346,7 @@ export default {
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
"
warning
"
type
:
"
error
"
});
}
});
...
...
@@ -352,7 +370,7 @@ export default {
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
"
warning
"
type
:
"
error
"
});
}
});
...
...
@@ -379,7 +397,7 @@ export default {
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
"
warning
"
type
:
"
error
"
});
}
});
...
...
@@ -449,6 +467,10 @@ export default {
if
(
directFlag
===
1
)
{
this
.
messageList
=
cMessageList
;
this
.
$nextTick
(
()
=>
{
const
scrollBoxDom
=
document
.
querySelector
(
'.scroll-box'
)
scrollBoxDom
.
scrollTop
=
200000
;
});
}
else
if
(
directFlag
===
2
)
{
this
.
messageList
.
push
(...
cMessageList
);
}
else
{
...
...
@@ -463,24 +485,25 @@ export default {
].
timestamp
;
}
if
(
directFlag
==
1
)
{
if
(
directFlag
==
1
)
{
forwardMsgIntervalId
&&
clearInterval
(
forwardMsgIntervalId
);
forwardMsgIntervalId
=
setInterval
(()
=>
{
this
.
getMSGForward
();
},
10000
);
},
10000
);
}
console
.
log
(
"this.messageList"
,
this
.
messageList
);
},
// 选择一个会话
selectSession
(
session
,
index
)
{
// 点击当前的,不再重新请求数据
if
(
this
.
currentTaskLogId
==
session
.
taskLogId
)
return
;
console
.
log
(
"selectSession"
);
this
.
currentTaskLogId
=
session
.
i
d
;
this
.
currentTaskLogId
=
session
.
taskLogI
d
;
this
.
currentToAccId
=
session
.
toAccId
;
this
.
currentSession
=
session
;
this
.
currentSessionIndex
=
index
;
// 获取当前消息列表(最新的历史消息)
// TODO
this
.
getMSGHistory
(
this
.
currentSession
);
// 获取医生信息
this
.
getDoctorInfo
(
this
.
currentToAccId
);
...
...
@@ -499,11 +522,12 @@ export default {
fetchOneTask
()
{
this
.
GET
(
"/im/session/kf/fetchOneTask"
).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
this
.
currentTaskLogId
=
""
;
this
.
getSessionList
();
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
"
warning
"
type
:
"
error
"
});
}
});
...
...
@@ -521,10 +545,12 @@ export default {
};
let
sLength
=
this
.
sessionListData
.
sessionList
.
length
;
// 第一次进入页面
if
(
!
this
.
currentTaskLogId
)
{
this
.
currentSession
=
this
.
sessionListData
.
sessionList
[
0
];
this
.
currentSessionIndex
=
0
;
this
.
currentTaskLogId
=
this
.
currentSession
.
id
;
if
(
sLength
&&
!
this
.
currentTaskLogId
)
{
// this.currentSession = this.sessionListData.sessionList[0];
// this.currentSessionIndex = 0;
this
.
currentSession
=
this
.
sessionListData
.
sessionList
[
sLength
-
1
];
this
.
currentSessionIndex
=
sLength
-
1
;
this
.
currentTaskLogId
=
this
.
currentSession
.
taskLogId
;
this
.
currentToAccId
=
this
.
currentSession
.
toAccId
;
this
.
getDoctorInfo
(
this
.
currentToAccId
);
this
.
getMSGHistory
(
this
.
currentSession
);
...
...
@@ -537,7 +563,7 @@ export default {
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
"
warning
"
type
:
"
error
"
});
}
});
...
...
@@ -585,7 +611,7 @@ export default {
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
"
warning
"
type
:
"
error
"
});
}
});
...
...
@@ -599,13 +625,14 @@ export default {
this
.
POST
(
`/im/session/kf/closeOneTask`
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
console
.
log
(
"in closeOneTask"
,
res
);
if
(
res
.
data
==
1
)
{
if
(
res
.
data
==
1
)
{
this
.
currentTaskLogId
=
""
;
this
.
getSessionList
();
}
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
"
warning
"
type
:
"
error
"
});
}
});
...
...
@@ -614,7 +641,7 @@ export default {
// 设置全部消息已读
readAllMsg
()
{
let
fromAccount
=
this
.
currentToAccId
,
toAccount
=
this
.
picakfAccId
;
toAccount
=
this
.
picakfAccId
;
let
params
=
{
fromAccount
,
toAccount
...
...
@@ -632,7 +659,7 @@ export default {
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
"
warning
"
type
:
"
error
"
});
}
});
...
...
@@ -662,7 +689,7 @@ export default {
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
"
warning
"
type
:
"
error
"
});
}
});
...
...
@@ -670,10 +697,9 @@ export default {
// 上传文件
beforeUploadFile
(
file
)
{
let
vm
=
this
;
console
.
log
(
"file"
,
file
);
doUpload
(
vm
,
_this
,
file
,
getFilePath
(
file
,
null
),
"preview4"
,
...
...
@@ -696,13 +722,13 @@ export default {
let
image
=
new
Image
();
image
.
src
=
params
.
url
;
image
.
onload
=
function
()
{
let
_
this
=
this
;
params
.
width
=
_
this
.
width
;
params
.
height
=
_
this
.
height
;
vm
.
sendCommonMsg
(
params
);
let
_
img
=
this
;
params
.
width
=
_
img
.
width
;
params
.
height
=
_
img
.
height
;
_this
.
sendCommonMsg
(
params
);
};
}
else
{
vm
.
sendCommonMsg
(
params
);
_this
.
sendCommonMsg
(
params
);
}
});
},
...
...
@@ -762,7 +788,7 @@ export default {
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
"
warning
"
type
:
"
error
"
});
}
});
...
...
src/views/IM/waiting-session/list.vue
浏览文件 @
e8d3dea7
...
...
@@ -3,13 +3,17 @@
<bread-crumb
:curmbFirst=
"curmbFirst"
:curmbSecond=
"curmbSecond"
></bread-crumb>
<div
class=
"component-content screenSet"
id=
"screenSet"
>
<div
class=
"search-title"
>
<p>
当前共有
<span
class=
"num"
>
{{
t
ableData
.
length
}}
位
</span>
用户正在等待
</p>
<p>
当前共有
<span
class=
"num"
>
{{
t
otal
}}
位
</span>
用户正在等待
</p>
<el-button
type=
"primary"
size=
"small"
@
click=
"getNextSession()"
>
给我一个任务吧
</el-button>
</div>
<el-table
:data=
"tableData"
style=
"width: 100%"
v-loading=
"loading"
>
<el-table-column
prop=
"userName"
label=
"用户名"
min-width=
"50"
align=
"center"
></el-table-column>
<el-table-column
prop=
"waitTime"
label=
"等待时间"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"idType"
label=
"用户类型"
min-width=
"50"
align=
"center"
></el-table-column>
<el-table-column
prop=
"idType"
label=
"用户类型"
min-width=
"50"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
idType
|
typeFilter
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"certStatus"
label=
"认证状况"
min-width=
"100"
align=
"center"
></el-table-column>
<el-table-column
prop=
"hospitalName"
label=
"所属机构"
min-width=
"50"
align=
"center"
></el-table-column>
<div
slot=
"empty"
>
...
...
@@ -40,13 +44,22 @@ export default {
curmbFirst
:
"云鹊客服"
,
curmbSecond
:
"等待会话"
,
tableData
:
[],
total
:
0
,
loading
:
false
,
};
},
computed
:
{
},
filters
:
{
typeFilter
(
index
)
{
let
str
=
""
;
if
(
index
==
1
)
{
str
=
"医生"
;
}
else
if
(
index
==
2
)
{
str
=
"居民"
;
}
return
str
;
}
},
created
()
{
this
.
getListData
();
...
...
@@ -67,10 +80,11 @@ export default {
this
.
loading
=
false
;
if
(
res
.
code
===
'000000'
)
{
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
total
=
res
.
data
.
total
;
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
'
warning
'
type
:
'
error
'
});
}
})
...
...
@@ -84,7 +98,7 @@ export default {
}
else
{
this
.
$message
({
message
:
res
.
message
,
type
:
'
warning
'
type
:
'
error
'
});
}
})
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录