Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄媛媛
ElectricitySheep
Commits
f56b6376
Commit
f56b6376
authored
Sep 01, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
6922b66c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
526 additions
and
466 deletions
+526
-466
materialMan.vue
src/components/CommodityMan/materialMan.vue
+32
-2
index.js
src/plug/index.js
+494
-464
No files found.
src/components/CommodityMan/materialMan.vue
View file @
f56b6376
...
...
@@ -117,8 +117,10 @@
:content=
"item.Name"
placement=
"top-start"
>
<div
@
click=
"PageSelect(item,index)"
:class=
"item.Selected ? 'selected' :''"
class=
"el-tooltip item material-item "
>
<img
:src=
"getIconLink(item.Path)+'?x-oss-process=video/snapshot,t_9,f_jpg,w_299,h_0,m_fast'"
class=
"material-img"
style=
"width: 140px; height: 140px;"
>
<div
class=
"material-video-info"
><i
class=
"el-icon-video-play"
></i>
<span>
{{
Time
(
item
.
VideoTime
)
}}
</span></div>
<div
flex=
"dir:left"
style=
"margin-top: 5px;"
>
...
...
@@ -178,6 +180,10 @@
<el-button
size=
"small"
type=
"primary"
@
click=
"pagesubmitForm('addpageMsg')"
>
确 定
</el-button>
</span>
</el-dialog>
<video
width=
"320"
height=
"240"
controls
id=
"upvideo"
style=
"display:none"
>
</video>
<img
:src=
"testImg"
style=
"width:120px;height:60px;border:1px solid red;"
/>
<canvas
id=
'mycanvas'
></canvas>
</div>
</template>
<
script
>
...
...
@@ -243,7 +249,7 @@
checkList
:
[],
checkAllList
:
[],
checkAll
:
false
,
testImg
:
""
}
},
created
()
{
...
...
@@ -251,9 +257,33 @@
this
.
GetPageList
();
},
mounted
()
{
this
.
findvideocover
(
"http://192.168.2.214:8130/Upload/Video/20200901114120428.mp4"
)
},
methods
:
{
//获取视频封面
findvideocover
(
videoUrl
)
{
let
_this
=
this
;
this
.
$nextTick
(()
=>
{
let
video
=
document
.
getElementById
(
"upvideo"
);
let
source
=
document
.
createElement
(
"source"
);
source
.
src
=
videoUrl
;
source
.
type
=
"video/mp4"
;
video
.
appendChild
(
source
);
video
.
addEventListener
(
"loadeddata"
,
function
()
{
var
canvas
=
document
.
createElement
(
"canvas"
);
canvas
.
width
=
"320"
;
canvas
.
height
=
"320"
;
canvas
.
getContext
(
"2d"
)
.
drawImage
(
video
,
0
,
0
,
canvas
.
width
,
canvas
.
width
);
console
.
log
(
"video"
,
video
);
var
img
=
document
.
createElement
(
"img"
);
let
imgsrc
=
canvas
.
toDataURL
(
"image/png"
);
_this
.
testImg
=
imgsrc
});
});
},
Time
(
value
)
{
var
theTime
=
parseInt
(
value
);
// 秒
var
middle
=
0
;
// 分
...
...
src/plug/index.js
View file @
f56b6376
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