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
1afba5a5
authored
Jul 13, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
scss to less
parent
86932012
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
245 additions
and
241 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 @
1afba5a5
...
@@ -207,7 +207,7 @@ export default class ChatList extends Vue {
...
@@ -207,7 +207,7 @@ export default class ChatList extends Vue {
}
}
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.chat-list-con
{
.chat-list-con
{
.title
{
.title
{
padding-left
:
20px
;
padding-left
:
20px
;
...
...
chat-room.vue
View file @
1afba5a5
...
@@ -178,7 +178,7 @@ export default class ChatRoom extends Vue {
...
@@ -178,7 +178,7 @@ export default class ChatRoom extends Vue {
}
}
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.room-title
{
.room-title
{
font-size
:
16px
;
font-size
:
16px
;
padding
:
0
20px
;
padding
:
0
20px
;
...
@@ -270,7 +270,7 @@ export default class ChatRoom extends Vue {
...
@@ -270,7 +270,7 @@ export default class ChatRoom extends Vue {
}
}
}
}
.chat-area
{
.chat-area
{
$
input-height
:
130px
;
--
input-height
:
130px
;
.chat-messages
{
.chat-messages
{
height
:
calc
(
100%
-
130px
+
1px
);
height
:
calc
(
100%
-
130px
+
1px
);
...
@@ -278,7 +278,7 @@ export default class ChatRoom extends Vue {
...
@@ -278,7 +278,7 @@ export default class ChatRoom extends Vue {
}
}
.chat-input
{
.chat-input
{
height
:
$
input-height
;
height
:
var
(
--input-height
)
;
}
}
}
}
.order-info-con
{
.order-info-con
{
...
...
chat.vue
View file @
1afba5a5
...
@@ -46,7 +46,7 @@ export default class Chat extends Vue {
...
@@ -46,7 +46,7 @@ export default class Chat extends Vue {
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.chat-dialog-con
{
.chat-dialog-con
{
/deep/
.el-dialog__header
{
/deep/
.el-dialog__header
{
display
:
none
;
display
:
none
;
...
...
components/file-icon.vue
View file @
1afba5a5
<
template
>
<
template
>
<span
class=
"file-icon"
:title=
"value"
v-html=
"html"
></span>
<span
class=
"file-icon"
:title=
"value"
v-html=
"html"
></span>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
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"
;
import
{
FileType
,
getSvg
}
from
"./file-controller"
;
@
Component
({
components
:
{}
})
@
Component
({
components
:
{}
})
export
default
class
FileIcon
extends
Vue
{
export
default
class
FileIcon
extends
Vue
{
@
Model
(
"update"
)
@
Model
(
"update"
)
private
value
!
:
FileType
private
value
!
:
FileType
;
private
get
audio
()
{
private
get
audio
()
{
return
this
.
value
===
FileType
.
Audio
;
return
this
.
value
===
FileType
.
Audio
;
}
}
private
get
excel
()
{
private
get
excel
()
{
return
this
.
value
===
FileType
.
Excel
;
return
this
.
value
===
FileType
.
Excel
;
}
}
private
get
image
()
{
private
get
image
()
{
return
this
.
value
===
FileType
.
Image
;
return
this
.
value
===
FileType
.
Image
;
}
}
private
get
others
()
{
private
get
others
()
{
return
this
.
value
===
FileType
.
Others
;
return
this
.
value
===
FileType
.
Others
;
}
}
private
get
pdf
()
{
private
get
pdf
()
{
return
this
.
value
===
FileType
.
Pdf
;
return
this
.
value
===
FileType
.
Pdf
;
}
}
private
get
ppt
()
{
private
get
ppt
()
{
return
this
.
value
===
FileType
.
Ppt
;
return
this
.
value
===
FileType
.
Ppt
;
}
}
private
get
rp
()
{
private
get
rp
()
{
return
this
.
value
===
FileType
.
Rp
;
return
this
.
value
===
FileType
.
Rp
;
}
}
private
get
txt
()
{
private
get
txt
()
{
return
this
.
value
===
FileType
.
Txt
;
return
this
.
value
===
FileType
.
Txt
;
}
}
private
get
video
()
{
private
get
video
()
{
return
this
.
value
===
FileType
.
Video
;
return
this
.
value
===
FileType
.
Video
;
}
}
private
get
word
()
{
private
get
word
()
{
return
this
.
value
===
FileType
.
Word
;
return
this
.
value
===
FileType
.
Word
;
}
}
private
get
xmid
()
{
private
get
xmid
()
{
return
this
.
value
===
FileType
.
Xmind
;
return
this
.
value
===
FileType
.
Xmind
;
}
}
private
get
zip
()
{
private
get
zip
()
{
return
this
.
value
===
FileType
.
Zip
;
return
this
.
value
===
FileType
.
Zip
;
}
}
private
get
html
()
{
private
get
html
()
{
return
getSvg
(
this
.
value
);
return
getSvg
(
this
.
value
);
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"
scss"
>
<
style
lang=
"
less"
scoped
>
.file-icon
{
.file-icon
{
margin-left
:
10px
;
margin-left
:
10px
;
svg
{
svg
{
max-width
:
36px
;
max-width
:
36px
;
max-height
:
36px
;
max-height
:
36px
;
}
}
}
}
</
style
>
</
style
>
components/image-preview.vue
View file @
1afba5a5
<
template
>
<
template
>
<el-dialog
<el-dialog
:modal=
"false"
:modal=
"false"
:before-close=
"close"
:before-close=
"close"
:visible=
"value"
:visible=
"value"
custom-class=
"hide-header show-close padding-0 width-auto"
custom-class=
"hide-header show-close padding-0 width-auto"
>
>
<div
class=
"d-flex flex-column"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"preview-title text-center"
>
图片预览
</div>
<div
class=
"preview-title text-center"
>
图片预览
</div>
<div
class=
"d-flex justify-content-center"
style=
"min-width: 300px"
>
<div
class=
"d-flex justify-content-center"
style=
"min-width: 300px"
>
<img
v-if=
"file"
:src=
"file.url"
:style=
"style"
/>
<img
v-if=
"file"
:src=
"file.url"
:style=
"style"
/>
</div>
</div>
<div
class=
"d-flex justify-content-center actions"
>
<div
class=
"d-flex justify-content-center actions"
>
<span
<span
class=
"d-flex align-items-center justify-content-center"
class=
"d-flex align-items-center justify-content-center"
@
click=
"set2Default"
@
click=
"set2Default"
>
1:1
</span
>
1:1
</span
>
>
<a
<a
class=
"d-flex align-items-center justify-content-center"
class=
"d-flex align-items-center justify-content-center"
:href=
"file.url | downloadUrl(getAttachment)"
:href=
"file.url | downloadUrl(getAttachment)"
:download=
"getAttachment"
:download=
"getAttachment"
>
>
<i
class=
"el-icon-download"
></i>
<i
class=
"el-icon-download"
></i>
</a>
</a>
</div>
</div>
</div>
</div>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
...
@@ -35,73 +35,72 @@ import { Component, Model, Prop, Vue } from "vue-property-decorator";
...
@@ -35,73 +35,72 @@ import { Component, Model, Prop, Vue } from "vue-property-decorator";
@
Component
({
components
:
{}
})
@
Component
({
components
:
{}
})
export
default
class
ImagePreview
extends
Vue
{
export
default
class
ImagePreview
extends
Vue
{
@
Model
(
"update"
)
@
Model
(
"update"
)
private
value
!
:
boolean
private
value
!
:
boolean
;
@
Prop
()
@
Prop
()
private
file
!
:
{
name
:
string
;
url
:
string
}
private
file
!
:
{
name
:
string
;
url
:
string
};
private
style
:
{
private
style
:
{
"max-height"
:
number
|
string
;
"max-height"
:
number
|
string
;
"max-width"
:
number
|
string
;
"max-width"
:
number
|
string
;
}
=
{
}
=
{
"max-height"
:
"300px"
,
"max-height"
:
"300px"
,
"max-width"
:
"600px"
,
"max-width"
:
"600px"
,
}
};
private
close
()
{
private
close
()
{
setTimeout
(
setTimeout
(
()
=>
()
=>
(
this
.
style
=
{
"max-height"
:
"300px"
,
"max-width"
:
"600px"
}),
(
this
.
style
=
{
"max-height"
:
"300px"
,
"max-width"
:
"600px"
}),
300
300
);
);
this
.
$emit
(
"update"
,
false
);
this
.
$emit
(
"update"
,
false
);
}
}
private
set2Default
()
{
private
set2Default
()
{
this
.
style
=
{
"max-height"
:
"1600px"
,
"max-width"
:
"1600px"
};
this
.
style
=
{
"max-height"
:
"1600px"
,
"max-width"
:
"1600px"
};
}
}
private
get
getAttachment
()
{
private
get
getAttachment
()
{
if
(
this
.
file
)
{
if
(
this
.
file
)
{
return
this
.
file
.
name
;
return
this
.
file
.
name
;
}
return
"文件下载"
;
}
}
return
"文件下载"
;
}
}
}
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.preview-title
{
.preview-title
{
font-size
:
18px
;
font-size
:
18px
;
color
:
#333
;
color
:
#333
;
margin-bottom
:
15px
;
margin-bottom
:
15px
;
}
}
.actions
{
.actions
{
margin
:
15px
0
;
margin
:
15px
0
;
>
span,
>
span,
a
{
a
{
width
:
30px
;
width
:
30px
;
height
:
30px
;
height
:
30px
;
background-color
:
#7a7b7d
;
background-color
:
#7a7b7d
;
color
:
#fff
;
color
:
#fff
;
border-radius
:
50%
;
border-radius
:
50%
;
cursor
:
pointer
;
cursor
:
pointer
;
i
{
i
{
color
:
#fff
;
color
:
#fff
;
font-size
:
20px
;
font-size
:
20px
;
}
&
+
span
{
margin-left
:
15px
;
}
}
}
>
a
{
&
+
span
{
margin-left
:
15px
;
margin-left
:
15px
;
}
}
}
>
a
{
margin-left
:
15px
;
}
}
}
</
style
>
</
style
>
components/message.vue
View file @
1afba5a5
...
@@ -430,7 +430,7 @@ export default class Message extends Vue {
...
@@ -430,7 +430,7 @@ export default class Message extends Vue {
}
}
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.message-con
{
.message-con
{
margin
:
20px
0
;
margin
:
20px
0
;
...
...
components/video-preview.vue
View file @
1afba5a5
<
template
>
<
template
>
<el-dialog
<el-dialog
:modal=
"false"
:modal=
"false"
:before-close=
"close"
:before-close=
"close"
:visible=
"value"
:visible=
"value"
custom-class=
"hide-header show-close padding-0 width-auto"
custom-class=
"hide-header show-close padding-0 width-auto"
>
>
<div
class=
"d-flex flex-column"
>
<div
class=
"d-flex flex-column"
>
<div
class=
"preview-title text-center"
>
视频预览
</div>
<div
class=
"preview-title text-center"
>
视频预览
</div>
<div
class=
"d-flex justify-content-center"
style=
"min-width: 300px"
>
<div
class=
"d-flex justify-content-center"
style=
"min-width: 300px"
>
<video
<video
ref=
"video"
ref=
"video"
v-if=
"file"
v-if=
"file"
:src=
"file.url"
:src=
"file.url"
controls
controls
:style=
"style"
:style=
"style"
></video>
></video>
</div>
</div>
<div
class=
"d-flex justify-content-center actions"
>
<div
class=
"d-flex justify-content-center actions"
>
<span
<span
class=
"d-flex align-items-center justify-content-center"
class=
"d-flex align-items-center justify-content-center"
@
click=
"set2Default"
@
click=
"set2Default"
>
1:1
</span
>
1:1
</span
>
>
<a
<a
class=
"d-flex align-items-center justify-content-center"
class=
"d-flex align-items-center justify-content-center"
:href=
"file.url | downloadUrl(getAttachment)"
:href=
"file.url | downloadUrl(getAttachment)"
:download=
"getAttachment"
:download=
"getAttachment"
>
>
<i
class=
"el-icon-download"
></i>
<i
class=
"el-icon-download"
></i>
</a>
</a>
</div>
</div>
</div>
</div>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
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
:
{}
})
@
Component
({
components
:
{}
})
export
default
class
VideoPreview
extends
Vue
{
export
default
class
VideoPreview
extends
Vue
{
@
Model
(
"update"
)
@
Model
(
"update"
)
private
value
!
:
boolean
private
value
!
:
boolean
;
@
Prop
()
@
Prop
()
private
file
!
:
{
name
:
string
;
url
:
string
}
private
file
!
:
{
name
:
string
;
url
:
string
};
@
Ref
(
"video"
)
@
Ref
(
"video"
)
private
video
!
:
HTMLVideoElement
private
video
!
:
HTMLVideoElement
;
private
style
:
{
private
style
:
{
"max-height"
:
number
|
string
;
"max-height"
:
number
|
string
;
"max-width"
:
number
|
string
;
"max-width"
:
number
|
string
;
}
=
{
}
=
{
"max-height"
:
"800px"
,
"max-height"
:
"800px"
,
"max-width"
:
"800px"
,
"max-width"
:
"800px"
,
};
private
close
()
{
setTimeout
(
()
=>
(
this
.
style
=
{
"max-height"
:
"300px"
,
"max-width"
:
"600px"
}),
300
);
this
.
$emit
(
"update"
,
false
);
}
private
set2Default
()
{
this
.
style
=
{
"max-height"
:
"1600px"
,
"max-width"
:
"1600px"
};
}
private
get
getAttachment
()
{
if
(
this
.
file
)
{
return
this
.
file
.
name
;
}
}
return
"视频下载"
;
private
close
()
{
}
setTimeout
(
()
=>
@
Watch
(
"value"
)
(
this
.
style
=
{
"max-height"
:
"300px"
,
"max-width"
:
"600px"
}),
private
onOpen
()
{
300
if
(
this
.
value
)
{
);
this
.
video
?.
load
();
this
.
$emit
(
"update"
,
false
);
setTimeout
(()
=>
this
.
video
?.
play
(),
100
);
}
}
else
{
this
.
video
?.
pause
();
private
set2Default
()
{
this
.
style
=
{
"max-height"
:
"1600px"
,
"max-width"
:
"1600px"
};
}
private
get
getAttachment
()
{
if
(
this
.
file
)
{
return
this
.
file
.
name
;
}
return
"视频下载"
;
}
@
Watch
(
"value"
)
private
onOpen
()
{
if
(
this
.
value
)
{
this
.
video
?.
load
();
setTimeout
(()
=>
this
.
video
?.
play
(),
100
);
}
else
{
this
.
video
?.
pause
();
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.preview-title
{
.preview-title
{
font-size
:
18px
;
font-size
:
18px
;
color
:
#333
;
color
:
#333
;
margin-bottom
:
15px
;
margin-bottom
:
15px
;
}
}
.actions
{
.actions
{
margin
:
15px
0
;
margin
:
15px
0
;
>
span,
>
span,
a
{
a
{
width
:
30px
;
width
:
30px
;
height
:
30px
;
height
:
30px
;
background-color
:
#7a7b7d
;
background-color
:
#7a7b7d
;
color
:
#fff
;
color
:
#fff
;
border-radius
:
50%
;
border-radius
:
50%
;
cursor
:
pointer
;
cursor
:
pointer
;
i
{
i
{
color
:
#fff
;
color
:
#fff
;
font-size
:
20px
;
font-size
:
20px
;
}
&
+
span
{
margin-left
:
15px
;
}
}
}
>
a
{
&
+
span
{
margin-left
:
15px
;
margin-left
:
15px
;
}
}
}
>
a
{
margin-left
:
15px
;
}
}
}
</
style
>
</
style
>
components/who-read-list.vue
View file @
1afba5a5
...
@@ -138,7 +138,7 @@ export default class WhoReadList extends Vue {
...
@@ -138,7 +138,7 @@ export default class WhoReadList extends Vue {
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.who-read-list
{
.who-read-list
{
::before
{
::before
{
content
:
""
;
content
:
""
;
...
...
create-chat.vue
View file @
1afba5a5
...
@@ -88,4 +88,4 @@ export default class ChatCreator extends Vue {
...
@@ -88,4 +88,4 @@ export default class ChatCreator extends Vue {
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
></
style
>
<
style
lang=
"
le
ss"
scoped
></
style
>
hybrid-input/index.vue
View file @
1afba5a5
...
@@ -512,7 +512,7 @@ export default class Input extends Vue {
...
@@ -512,7 +512,7 @@ export default class Input extends Vue {
}
}
</
script
>
</
script
>
<
style
lang=
"
sc
ss"
scoped
>
<
style
lang=
"
le
ss"
scoped
>
.input-wrap
{
.input-wrap
{
position
:
relative
;
position
:
relative
;
padding-left
:
20px
;
padding-left
:
20px
;
...
...
message-list.vue
View file @
1afba5a5
This diff is collapsed.
Click to expand it.
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