Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1f1dc90c
authored
Jul 13, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://gitlab.corp.qinqinxiaobao.com:9880/uniplat/customer-service
parents
15b87e11
1afba5a5
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
55 additions
and
56 deletions
chat-list.vue
chat-room.vue
chat.vue
components/file-icon.vue
components/image-preview.vue
components/message.vue
components/video-preview.vue
components/who-read-list.vue
create-chat.vue
hybrid-input/index.vue
message-list.vue
chat-list.vue
View file @
1f1dc90c
...
...
@@ -207,7 +207,7 @@ export default class ChatList extends Vue {
}
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.chat-list-con
{
.title
{
padding-left
:
20px
;
...
...
chat-room.vue
View file @
1f1dc90c
...
...
@@ -178,7 +178,7 @@ export default class ChatRoom extends Vue {
}
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.room-title
{
font-size
:
16px
;
padding
:
0
20px
;
...
...
@@ -270,7 +270,7 @@ export default class ChatRoom extends Vue {
}
}
.chat-area
{
$
input-height
:
130px
;
--
input-height
:
130px
;
.chat-messages
{
height
:
calc
(
100%
-
130px
+
1px
);
...
...
@@ -278,7 +278,7 @@ export default class ChatRoom extends Vue {
}
.chat-input
{
height
:
$
input-height
;
height
:
var
(
--input-height
)
;
}
}
.order-info-con
{
...
...
chat.vue
View file @
1f1dc90c
...
...
@@ -46,7 +46,7 @@ export default class Chat extends Vue {
}
}
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.chat-dialog-con
{
/deep/
.el-dialog__header
{
display
:
none
;
...
...
components/file-icon.vue
View file @
1f1dc90c
...
...
@@ -3,15 +3,14 @@
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Model
,
Vue
}
from
"vue-property-decorator"
;
import
{
Component
,
Model
,
Vue
}
from
"vue-property-decorator"
;
import
{
FileType
,
getSvg
}
from
"./file-controller"
;
@
Component
({
components
:
{}
})
export
default
class
FileIcon
extends
Vue
{
@
Model
(
"update"
)
private
value
!
:
FileType
private
value
!
:
FileType
;
private
get
audio
()
{
return
this
.
value
===
FileType
.
Audio
;
...
...
@@ -67,7 +66,7 @@ export default class FileIcon extends Vue {
}
</
script
>
<
style
lang=
"
scss"
>
<
style
lang=
"
less"
scoped
>
.file-icon
{
margin-left
:
10px
;
...
...
components/image-preview.vue
View file @
1f1dc90c
...
...
@@ -36,10 +36,10 @@ import { Component, Model, Prop, Vue } from "vue-property-decorator";
@
Component
({
components
:
{}
})
export
default
class
ImagePreview
extends
Vue
{
@
Model
(
"update"
)
private
value
!
:
boolean
private
value
!
:
boolean
;
@
Prop
()
private
file
!
:
{
name
:
string
;
url
:
string
}
private
file
!
:
{
name
:
string
;
url
:
string
};
private
style
:
{
"max-height"
:
number
|
string
;
...
...
@@ -47,12 +47,11 @@ export default class ImagePreview extends Vue {
}
=
{
"max-height"
:
"300px"
,
"max-width"
:
"600px"
,
}
};
private
close
()
{
setTimeout
(
()
=>
(
this
.
style
=
{
"max-height"
:
"300px"
,
"max-width"
:
"600px"
}),
()
=>
(
this
.
style
=
{
"max-height"
:
"300px"
,
"max-width"
:
"600px"
}),
300
);
this
.
$emit
(
"update"
,
false
);
...
...
@@ -71,7 +70,7 @@ export default class ImagePreview extends Vue {
}
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.preview-title
{
font-size
:
18px
;
color
:
#333
;
...
...
components/message.vue
View file @
1f1dc90c
...
...
@@ -430,7 +430,7 @@ export default class Message extends Vue {
}
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.message-con
{
margin
:
20px
0
;
...
...
components/video-preview.vue
View file @
1f1dc90c
...
...
@@ -37,18 +37,25 @@
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Model
,
Prop
,
Ref
,
Vue
,
Watch
}
from
"vue-property-decorator"
;
import
{
Component
,
Model
,
Prop
,
Ref
,
Vue
,
Watch
,
}
from
"vue-property-decorator"
;
@
Component
({
components
:
{}
})
export
default
class
VideoPreview
extends
Vue
{
@
Model
(
"update"
)
private
value
!
:
boolean
private
value
!
:
boolean
;
@
Prop
()
private
file
!
:
{
name
:
string
;
url
:
string
}
private
file
!
:
{
name
:
string
;
url
:
string
};
@
Ref
(
"video"
)
private
video
!
:
HTMLVideoElement
private
video
!
:
HTMLVideoElement
;
private
style
:
{
"max-height"
:
number
|
string
;
...
...
@@ -56,12 +63,11 @@ export default class VideoPreview extends Vue {
}
=
{
"max-height"
:
"800px"
,
"max-width"
:
"800px"
,
}
};
private
close
()
{
setTimeout
(
()
=>
(
this
.
style
=
{
"max-height"
:
"300px"
,
"max-width"
:
"600px"
}),
()
=>
(
this
.
style
=
{
"max-height"
:
"300px"
,
"max-width"
:
"600px"
}),
300
);
this
.
$emit
(
"update"
,
false
);
...
...
@@ -90,7 +96,7 @@ export default class VideoPreview extends Vue {
}
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.preview-title
{
font-size
:
18px
;
color
:
#333
;
...
...
components/who-read-list.vue
View file @
1f1dc90c
...
...
@@ -138,7 +138,7 @@ export default class WhoReadList extends Vue {
}
}
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.who-read-list
{
::before
{
content
:
""
;
...
...
create-chat.vue
View file @
1f1dc90c
...
...
@@ -88,4 +88,4 @@ export default class ChatCreator extends Vue {
}
}
</
script
>
<
style
lang=
"
sc
ss"
scoped
></
style
>
<
style
lang=
"
le
ss"
scoped
></
style
>
hybrid-input/index.vue
View file @
1f1dc90c
...
...
@@ -512,7 +512,7 @@ export default class Input extends Vue {
}
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.input-wrap
{
position
:
relative
;
padding-left
:
20px
;
...
...
message-list.vue
View file @
1f1dc90c
...
...
@@ -14,9 +14,7 @@
<div
:key=
"item.id"
class=
"message-template"
>
<div
v-if=
"
item.id > 0 &&
messageTimestampDictionary[item.id] &&
item.msg
item.id > 0 && messageTimestampDictionary[item.id] && item.msg
"
class=
"text-center text-hint timestamp"
>
...
...
@@ -35,10 +33,7 @@
</el-scrollbar>
<image-preview
v-model=
"preview"
:file=
"imagePreview"
></image-preview>
<video-preview
v-model=
"previewVideo"
:file=
"videoPreview"
></video-preview>
<video-preview
v-model=
"previewVideo"
:file=
"videoPreview"
></video-preview>
</div>
</template>
...
...
@@ -57,34 +52,34 @@ import { ChatStore, chatStore } from "@/customer-service/store/model";
@
Component
({
components
:
{
message
,
ImagePreview
,
VideoPreview
}
})
export
default
class
MessageList
extends
Vue
{
@
chatStore
.
Getter
(
ChatStore
.
STATE_CHAT_MSG_HISTORY
)
private
readonly
historyMessage
!
:
ChatStore
.
STATE_CHAT_MSG_HISTORY
private
readonly
historyMessage
!
:
ChatStore
.
STATE_CHAT_MSG_HISTORY
;
@
chatStore
.
Getter
(
ChatStore
.
STATE_CHAT_SENDING_MESSAGES
)
private
readonly
sendingMessages
!
:
ChatStore
.
STATE_CHAT_SENDING_MESSAGES
private
readonly
sendingMessages
!
:
ChatStore
.
STATE_CHAT_SENDING_MESSAGES
;
@
chatStore
.
State
(
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
)
private
readonly
chatId
!
:
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
private
readonly
chatId
!
:
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
;
@
chatStore
.
State
(
ChatStore
.
STATE_CURRENT_CHAT_INITING
)
private
readonly
chatIniting
!
:
ChatStore
.
STATE_CURRENT_CHAT_INITING
private
readonly
chatIniting
!
:
ChatStore
.
STATE_CURRENT_CHAT_INITING
;
@
chatStore
.
Action
(
ChatStore
.
ACTION_GET_CHAT_MESSAGES_BEFORE_SPECIFIC_ID
)
private
readonly
getLastPageMsg
!
:
ChatStore
.
ACTION_GET_CHAT_MESSAGES_BEFORE_SPECIFIC_ID
private
readonly
getLastPageMsg
!
:
ChatStore
.
ACTION_GET_CHAT_MESSAGES_BEFORE_SPECIFIC_ID
;
@
chatStore
.
Action
(
ChatStore
.
ACTION_GET_CHAT_MESSAGES_AFTER_SPECIFIC_ID
)
private
readonly
getNextPageMsg
!
:
ChatStore
.
ACTION_GET_CHAT_MESSAGES_AFTER_SPECIFIC_ID
private
readonly
getNextPageMsg
!
:
ChatStore
.
ACTION_GET_CHAT_MESSAGES_AFTER_SPECIFIC_ID
;
@
chatStore
.
Action
(
ChatStore
.
ACTION_CLEAR_CURRENT_CHAT_DATA
)
private
readonly
clearChatId
!
:
ChatStore
.
ACTION_CLEAR_CURRENT_CHAT_DATA
private
readonly
clearChatId
!
:
ChatStore
.
ACTION_CLEAR_CURRENT_CHAT_DATA
;
@
chatStore
.
Mutation
(
ChatStore
.
MUTATION_SAVE_FUNC_SCROLL_TO_BOTTOM
)
private
readonly
saveScrollToBottomFunc
!
:
ChatStore
.
MUTATION_SAVE_FUNC_SCROLL_TO_BOTTOM
private
readonly
saveScrollToBottomFunc
!
:
ChatStore
.
MUTATION_SAVE_FUNC_SCROLL_TO_BOTTOM
;
@
chatStore
.
Mutation
(
ChatStore
.
MUTATION_CLEAR_FUNC_SCROLL_TO_BOTTOM
)
private
readonly
clearScrollToBottomFunc
!
:
ChatStore
.
MUTATION_CLEAR_FUNC_SCROLL_TO_BOTTOM
private
readonly
clearScrollToBottomFunc
!
:
ChatStore
.
MUTATION_CLEAR_FUNC_SCROLL_TO_BOTTOM
;
@
Prop
({
default
:
"circle"
})
private
shape
!
:
string
private
shape
!
:
string
;
private
get
messages
()
{
if
(
this
.
historyMessage
)
{
...
...
@@ -104,20 +99,20 @@ export default class MessageList extends Vue {
}
// 添加时间戳的最大间隔消息数
private
readonly
timeLimit
=
48
private
readonly
timeLimit
=
48
;
private
scroll2EndWhenMessageLoaded
=
false
private
scroll2EndWhenMessageLoaded
=
false
;
private
preview
=
false
private
imagePreview
=
{}
private
preview
=
false
;
private
imagePreview
=
{};
private
previewVideo
=
false
private
videoPreview
=
{}
private
previewVideo
=
false
;
private
videoPreview
=
{};
@
Ref
(
"message-scrollbar"
)
private
scollbarElement
!
:
Vue
&
{
update
:
()
=>
void
;
}
};
private
get
scollWrapper
():
HTMLElement
|
null
{
return
this
.
scollbarElement
?.
$el
?.
firstChild
as
HTMLElement
;
...
...
@@ -168,9 +163,9 @@ export default class MessageList extends Vue {
return
dic
;
}
private
loading
=
false
private
loadingOld
=
false
private
loadingNew
=
false
private
loading
=
false
;
private
loadingOld
=
false
;
private
loadingNew
=
false
;
public
created
()
{
this
.
handleScrollWrapper
();
...
...
@@ -234,7 +229,7 @@ export default class MessageList extends Vue {
this
.
loadingNew
=
false
;
}
private
handleScroll
!
:
()
=>
void
private
handleScroll
!
:
()
=>
void
;
private
handleScrollWrapper
()
{
let
oldScrollTop
=
0
;
this
.
handleScroll
=
()
=>
{
...
...
@@ -353,7 +348,7 @@ export default class MessageList extends Vue {
}
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.message-list
{
padding
:
0
20px
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment