Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f2baa9db
authored
Mar 05, 2021
by
qiyeqing
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
会话图片和视频处理
1 parent
6b938ed5
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
26 deletions
linkwe-ui/.env.development
linkwe-ui/.env.production
linkwe-ui/package.json
linkwe-ui/src/main.js
linkwe-ui/src/views/conversation/component/chat.vue
linkwe-ui/src/views/conversation/page/employeeTest.vue
linkwe-ui/.env.development
View file @
f2baa9d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
ENV = 'development'
ENV = 'development'
# 仟微管理系统/开发环境
# 仟微管理系统/开发环境
VUE_APP_BASE_API =
'http://146.56.222.200/api
'
VUE_APP_BASE_API =
'http://119.45.28.29:8090
'
# VUE_APP_BASE_API = 'http://n3rpzt.natappfree.cc'
# VUE_APP_BASE_API = 'http://n3rpzt.natappfree.cc'
# 开发环境IP
# 开发环境IP
...
...
linkwe-ui/.env.production
View file @
f2baa9d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
ENV = 'production'
ENV = 'production'
# 仟微管理系统/生产环境api
# 仟微管理系统/生产环境api
VUE_APP_BASE_API = 'http://1
46.56.222.20
0'
VUE_APP_BASE_API = 'http://1
19.45.28.29:809
0'
# 生产环境IP
# 生产环境IP
VUE_APP_BASE_URL = 'http://119.45.28.29:8090'
VUE_APP_BASE_URL = 'http://119.45.28.29:8090'
linkwe-ui/package.json
View file @
f2baa9d
...
@@ -58,10 +58,11 @@
...
@@ -58,10 +58,11 @@
"promise.prototype.finally"
:
"^3.1.2"
,
"promise.prototype.finally"
:
"^3.1.2"
,
"screenfull"
:
"4.2.0"
,
"screenfull"
:
"4.2.0"
,
"sortablejs"
:
"1.8.4"
,
"sortablejs"
:
"1.8.4"
,
"uuid"
:
"^8.3.2"
,
"tui-color-picker"
:
"^2.2.6"
,
"tui-color-picker"
:
"^2.2.6"
,
"tui-image-editor"
:
"^3.11.0"
,
"tui-image-editor"
:
"^3.11.0"
,
"video.js"
:
"^7.10.2"
,
"uuid"
:
"^8.3.2"
,
"video.js"
:
"^7.11.4"
,
"videojs-contrib-hls"
:
"^5.15.0"
,
"vue"
:
"2.6.10"
,
"vue"
:
"2.6.10"
,
"vue-count-to"
:
"1.0.13"
,
"vue-count-to"
:
"1.0.13"
,
"vue-cropper"
:
"0.4.9"
,
"vue-cropper"
:
"0.4.9"
,
...
@@ -69,6 +70,7 @@
...
@@ -69,6 +70,7 @@
"vue-router"
:
"3.0.2"
,
"vue-router"
:
"3.0.2"
,
"vue-splitpane"
:
"1.0.4"
,
"vue-splitpane"
:
"1.0.4"
,
"vue-ueditor-wrap"
:
"^2.4.4"
,
"vue-ueditor-wrap"
:
"^2.4.4"
,
"vue-video-player"
:
"^5.0.2"
,
"vuedraggable"
:
"2.20.0"
,
"vuedraggable"
:
"2.20.0"
,
"vuex"
:
"3.1.0"
"vuex"
:
"3.1.0"
},
},
...
...
linkwe-ui/src/main.js
View file @
f2baa9d
...
@@ -66,7 +66,8 @@ Vue.prototype.msgInfo = function(msg) {
...
@@ -66,7 +66,8 @@ Vue.prototype.msgInfo = function(msg) {
import
{
pickerOptions
}
from
'@/utils/index'
import
{
pickerOptions
}
from
'@/utils/index'
Vue
.
prototype
.
pickerOptions
=
pickerOptions
Vue
.
prototype
.
pickerOptions
=
pickerOptions
import
VideoPlayer
from
'vue-video-player'
Vue
.
use
(
VideoPlayer
);
// 全局组件挂载
// 全局组件挂载
Vue
.
component
(
'Pagination'
,
Pagination
)
Vue
.
component
(
'Pagination'
,
Pagination
)
Vue
.
component
(
'RightToolbar'
,
RightToolbar
)
Vue
.
component
(
'RightToolbar'
,
RightToolbar
)
...
...
linkwe-ui/src/views/conversation/component/chat.vue
View file @
f2baa9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
{{
item
.
text
.
content
}}
{{
item
.
text
.
content
}}
</div>
</div>
<div
v-else-if=
"item.msgtype=='image'"
class=
"msgtypeimg"
>
<div
v-else-if=
"item.msgtype=='image'"
class=
"msgtypeimg"
>
<img
src=
"http://146.56.222.200/api/profile/upload/2021/01/14/544c8259-b3b6-4a49-8a53-b5eeac476384.png
"
>
<img
:src=
"item.image.attachment
"
>
</div>
</div>
<div
v-else-if=
"item.msgtype=='file'"
class=
"msgtypefile"
@
click=
"down(item.file)"
>
<div
v-else-if=
"item.msgtype=='file'"
class=
"msgtypefile"
@
click=
"down(item.file)"
>
...
@@ -36,18 +36,28 @@
...
@@ -36,18 +36,28 @@
</div>
</div>
</li>
</li>
</ul>
</ul>
<el-dialog
:visible
.
sync=
"dia"
:show-close=
'false'
>
<p>
播放
</p>
</el-dialog>
<div
class=
"shabowbox"
v-show=
"dia"
>
<div
class=
"close"
@
click=
"dia=false"
><i
class=
"el-icon-circle-close"
></i></div>
<div
class=
"shabowboxvidoe"
>
<video-player
class=
"video-player vjs-custom-skin"
ref=
"videoPlayer"
id=
"videoPlayer"
:playsinline=
"true"
:options=
"playerOptions"
></video-player>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
'video.js/dist/video-js.css'
import
'vue-video-player/src/custom-theme.css'
import
{
import
{
parseTime
,
parseTime
,
yearMouthDay
,
yearMouthDay
}
from
'@/utils/common.js'
}
from
'@/utils/common.js'
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -59,25 +69,51 @@
...
@@ -59,25 +69,51 @@
data
()
{
data
()
{
return
{
return
{
dia
:
false
dia
:
false
,
playerOptions
:
{
playbackRates
:
[
0.7
,
1.0
,
1.5
,
2.0
],
//播放速度
autoplay
:
false
,
//如果true,浏览器准备好时开始回放。
controls
:
true
,
//控制条
preload
:
'auto'
,
//视频预加载
muted
:
false
,
//默认情况下将会消除任何音频。
loop
:
false
,
//导致视频一结束就重新开始。
language
:
'zh-CN'
,
aspectRatio
:
'16:9'
,
// 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
fluid
:
true
,
// 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
sources
:
[{
type
:
'video/mp4'
,
src
:
'https://v-cdn.zjol.com.cn/280443.mp4'
//你所放置的视频的地址,最好是放在服务器上
}],
poster
:
""
,
//你的封面地址(覆盖在视频上面的图片)
width
:
document
.
documentElement
.
clientWidth
,
height
:
'475'
,
notSupportedMessage
:
'此视频暂无法播放,请稍后再试'
//允许覆盖Video.js无法播放媒体源时显示的默认信息。
}
}
}
},
},
methods
:
{
methods
:
{
play
()
{
play
(
e
)
{
this
.
dia
=
true
this
.
dia
=
true
const
player
=
this
.
$refs
.
videoPlayer
.
player
this
.
playerOptions
[
'sources'
][
0
][
'src'
]
=
e
.
video
.
attachment
;
player
.
play
()
},
},
down
(
e
)
{
down
(
e
)
{
//下载文件
//下载文件
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
*
{
*
{
padding
:
0
;
padding
:
0
;
margin
:
0
;
margin
:
0
;
}
}
#videoPlayer
/
deep
/
.vjs-tech
{
height
:
450px
;}
.shabowbox
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0.4
);
left
:
0
;
top
:
0
;
z-index
:
2000
;}
.shabowboxvidoe
{
position
:
fixed
;
width
:
800px
;
height
:
475px
;
left
:
50%
;
margin-left
:
-400px
;
top
:
50%
;
margin-top
:
-235px
;
;
z-index
:
2001
;
background
:
floralwhite
;}
.close
{
position
:
fixed
;
width
:
50px
;
height
:
50px
;
right
:
10px
;
z-index
:
2012
;
top
:
10px
;
text-align
:
center
;
line-height
:
50px
;
font-size
:
20px
;
color
:
#FFF
;
cursor
:
pointer
;
font-size
:
43px
;}
.takecontent
{
.takecontent
{
text-align
:
left
;
text-align
:
left
;
width
:
100%
;
width
:
100%
;
...
@@ -110,7 +146,12 @@
...
@@ -110,7 +146,12 @@
text-indent
:
10px
;
text-indent
:
10px
;
box-shadow
:
0
1px
4px
0
rgba
(
0
,
0
,
0
,
0.2
),
0
1px
4px
0
rgba
(
0
,
0
,
0
,
0.19
);
box-shadow
:
0
1px
4px
0
rgba
(
0
,
0
,
0
,
0.2
),
0
1px
4px
0
rgba
(
0
,
0
,
0
,
0.19
);
}
}
.card_name
{
line-height
:
80px
;
text-indent
:
10px
;}
.card_name
{
line-height
:
80px
;
text-indent
:
10px
;
}
.msgtypevideo
{
.msgtypevideo
{
margin
:
10px
;
margin
:
10px
;
font-size
:
40px
;
font-size
:
40px
;
...
@@ -123,8 +164,11 @@
...
@@ -123,8 +164,11 @@
width
:
100px
;
width
:
100px
;
height
:
80px
;
height
:
80px
;
margin
:
10px
;
margin
:
10px
;
img{
width
:
100px
;
height
:
80px
;}
img
{
width
:
100px
;
height
:
80px
;
}
}
}
.msgtypecard
{
.msgtypecard
{
...
...
linkwe-ui/src/views/conversation/page/employeeTest.vue
View file @
f2baa9d
...
@@ -319,7 +319,7 @@
...
@@ -319,7 +319,7 @@
return
data
.
name
.
indexOf
(
value
)
!==
-
1
;
return
data
.
name
.
indexOf
(
value
)
!==
-
1
;
},
},
handleNodeClick
(
data
,
add
)
{
handleNodeClick
(
data
,
add
)
{
if
(
!
data
.
gender
)
{
if
(
!
data
.
userId
)
{
let
querys
=
{
let
querys
=
{
pageNum
:
'1'
,
pageNum
:
'1'
,
pageSize
:
'999'
,
pageSize
:
'999'
,
...
@@ -328,15 +328,9 @@
...
@@ -328,15 +328,9 @@
api
.
getList
(
querys
).
then
(({
api
.
getList
(
querys
).
then
(({
rows
rows
})
=>
{
})
=>
{
if
(
add
==
true
)
{
console
.
log
(
this
.
treeData
,
data
,
rows
)
this
.
treeData
[
0
].
children
=
data
.
children
.
concat
(
rows
)
return
}
else
{
const
newChild
=
rows
;
const
newChild
=
rows
;
this
.
$set
(
data
,
'children'
,
[]);
this
.
$set
(
data
,
'children'
,
[]);
data
.
children
=
rows
data
.
children
=
rows
}
})
})
}
else
{
}
else
{
this
.
talkName
=
data
.
name
;
this
.
talkName
=
data
.
name
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment