Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea-resources-web
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
张伯涛
tea-resources-web
Commits
873c66c0
Commit
873c66c0
authored
Jun 05, 2024
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限制mp4
parent
57eb1bd4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
courseCatalogues.vue
...s/courseInformation/courseManagement/courseCatalogues.vue
+13
-13
No files found.
src/views/courseInformation/courseManagement/courseCatalogues.vue
View file @
873c66c0
...
...
@@ -258,8 +258,8 @@
<!-- 资源按钮组 -->
<div
style=
"display:inline-block;float:right"
>
<span
v-show=
"!hasChild(itemChild)"
>
<i
v-show=
"itemChild.videoUrl !== '' && itemChild.videoUrl !== null "
class=
"chapter-icon videoBtn"
title=
"视频"
@
click=
"openUploadDialog('视频维护',itemChild,0,'只能上传以.mp4格式
/.rmvb格式/.avi
结尾的文件')"
/>
<!-- 视频 -->
<i
v-show=
"itemChild.videoUrl==='' || itemChild.videoUrl === null"
class=
"chapter-icon videoBtnNo"
title=
"视频未上传"
@
click=
"openUploadDialog('视频上传',itemChild,0,'只能上传以.mp4格式
/.rmvb格式/.avi
结尾的文件')"
/>
<!-- 视频未添加 -->
<i
v-show=
"itemChild.videoUrl !== '' && itemChild.videoUrl !== null "
class=
"chapter-icon videoBtn"
title=
"视频"
@
click=
"openUploadDialog('视频维护',itemChild,0,'只能上传以.mp4格式结尾的文件')"
/>
<!-- 视频 -->
<i
v-show=
"itemChild.videoUrl==='' || itemChild.videoUrl === null"
class=
"chapter-icon videoBtnNo"
title=
"视频未上传"
@
click=
"openUploadDialog('视频上传',itemChild,0,'只能上传以.mp4格式结尾的文件')"
/>
<!-- 视频未添加 -->
</span>
<!--
<span
v-show=
"processRes(4,itemChild.isTest)"
>
-->
<!--
<i
v-show=
"itemChild.pdfUrl!==''"
class=
"chapter-icon pdfBtn"
title=
"PDF"
@
click=
"openUploadDialog('PDF维护',itemChild,1,'只能上传以.pdf结尾的文件')"
/>
<
!
–
PDF
–>
-->
...
...
@@ -302,8 +302,8 @@
<div
style=
"display:inline-block;float:right"
>
<!--
<span
v-show=
"processRes(2,subItem.isTest)"
>
-->
<span>
<i
v-show=
"subItem.videoUrl!=='' && subItem.videoUrl!== null"
class=
"chapter-icon videoBtn"
title=
"视频"
@
click=
"openUploadDialog('视频维护',subItem,0,'只能上传以.mp4格式
/.rmvb格式/.avi
结尾的文件')"
/>
<!-- 视频 -->
<i
v-show=
"subItem.videoUrl==='' || subItem.videoUrl=== null"
class=
"chapter-icon videoBtnNo"
title=
"视频未上传"
@
click=
"openUploadDialog('视频上传',subItem,0,'只能上传以.mp4格式
/.rmvb格式/.avi
结尾的文件')"
/>
<!-- 视频未添加 -->
<i
v-show=
"subItem.videoUrl!=='' && subItem.videoUrl!== null"
class=
"chapter-icon videoBtn"
title=
"视频"
@
click=
"openUploadDialog('视频维护',subItem,0,'只能上传以.mp4格式结尾的文件')"
/>
<!-- 视频 -->
<i
v-show=
"subItem.videoUrl==='' || subItem.videoUrl=== null"
class=
"chapter-icon videoBtnNo"
title=
"视频未上传"
@
click=
"openUploadDialog('视频上传',subItem,0,'只能上传以.mp4格式结尾的文件')"
/>
<!-- 视频未添加 -->
</span>
<!--
<span
v-show=
"processRes(4,subItem.isTest)"
>
-->
<!--
<span>
-->
...
...
@@ -559,13 +559,13 @@ export default {
methods
:
{
beforeVideoUpload
(
file
)
{
console
.
log
(
'KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK'
)
const
allowedExtensions
=
[
'
avi'
,
'mp4'
,
'rmvb'
];
const
extension
=
file
.
name
.
slice
((
file
.
name
.
lastIndexOf
(
'.'
)
-
1
>>>
0
)
+
2
).
toLowerCase
()
;
const
allowedExtensions
=
[
'
mp4'
]
const
extension
=
file
.
name
.
slice
((
file
.
name
.
lastIndexOf
(
'.'
)
-
1
>>>
0
)
+
2
).
toLowerCase
()
if
(
!
allowedExtensions
.
includes
(
extension
))
{
this
.
$message
.
error
(
'只能上传
avi, mp4, rmvb 格式的视频文件!'
);
return
false
;
this
.
$message
.
error
(
'只能上传
mp4格式的视频文件!'
)
return
false
}
return
true
;
return
true
},
/** 试听操作*/
handleChangeIsAudition
(
item
,
pItem
)
{
...
...
@@ -1806,10 +1806,10 @@ export default {
const
fileSuf
=
file
.
name
.
split
(
'.'
).
splice
(
-
1
)[
0
]
switch
(
type
)
{
case
0
:
if
(
fileSuf
!==
'mp4'
&&
fileSuf
!==
'rmvb'
&&
fileSuf
!==
'avi'
)
{
if
(
fileSuf
!==
'mp4'
)
{
_this
.
$notify
({
title
:
'提示'
,
message
:
'视频只能上传以.mp4格式
/.rmvb格式/.avi
结尾的文件'
,
message
:
'视频只能上传以.mp4格式结尾的文件'
,
type
:
'warning'
})
}
else
{
...
...
@@ -1817,7 +1817,7 @@ export default {
if
(
this
.
firstUpload
===
false
)
{
// setTimeout(() => {
console
.
log
(
'this.saveItem'
,
this
.
saveItem
)
this
.
openUploadDialog
(
'视频维护'
,
this
.
saveItem
,
0
,
'只能上传以.mp4格式
/.rmvb格式/.avi
结尾的文件'
,
this
.
getUploadVideoPdfUrl
)
this
.
openUploadDialog
(
'视频维护'
,
this
.
saveItem
,
0
,
'只能上传以.mp4格式结尾的文件'
,
this
.
getUploadVideoPdfUrl
)
// }, 1000)
}
}
...
...
@@ -1946,7 +1946,7 @@ export default {
type
:
'success'
})
if
(
type
===
0
)
{
this
.
openUploadDialog
(
'视频维护'
,
this
.
saveItem
,
type
,
'只能上传以.mp4格式
/.rmvb格式/.avi
结尾的文件'
,
res
.
data
.
videoUrl
)
this
.
openUploadDialog
(
'视频维护'
,
this
.
saveItem
,
type
,
'只能上传以.mp4格式结尾的文件'
,
res
.
data
.
videoUrl
)
}
else
{
this
.
openUploadDialog
(
'PDF维护'
,
this
.
saveItem
,
type
,
'只能上传以.pdf结尾的文件'
,
res
.
data
.
pdfUrl
)
}
...
...
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