Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
national_museum_vod
Project
Project
Details
Activity
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
qzhxx
national_museum_vod
Commits
9eae1314
Commit
9eae1314
authored
4 years ago
by
qzhxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
00b93a3e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
129 deletions
+26
-129
index.html
index.html
+1
-1
uploadAudio.vue
src/page/content/components/uploadVue/uploadAudio.vue
+8
-1
uploadDatum.vue
src/page/content/components/uploadVue/uploadDatum.vue
+6
-0
uploadFile copy.vue
src/page/content/components/uploadVue/uploadFile copy.vue
+0
-124
uploadFolder.vue
src/page/content/components/uploadVue/uploadFolder.vue
+2
-0
details.vue
src/page/content/display/content/details.vue
+3
-2
index.vue
src/page/content/display/content/index.vue
+6
-1
No files found.
index.html
View file @
9eae1314
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<title>
中国国家博物馆
建党百年展点播院线
服务平台
</title>
<title>
中国国家博物馆
历史图鉴学习教育
服务平台
</title>
</head>
<body>
<div
id=
"app"
></div>
...
...
This diff is collapsed.
Click to expand it.
src/page/content/components/uploadVue/uploadAudio.vue
View file @
9eae1314
<
template
>
<div>
<!--
{{
fileList
}}
-->
<el-upload
ref=
"upload"
accept=
".mp3,.aac,.wma,.rm,.flac,.ogg,"
...
...
@@ -9,6 +10,7 @@
action
:auto-upload=
"false"
:before-upload=
"beforeAvatarUpload"
:on-remove=
"handleRemove"
>
<i
class=
"el-icon-plus fileUpload"
></i>
...
...
@@ -35,9 +37,14 @@ export default {
};
},
mounted
(){
console
.
log
(
"uploadAudio"
,
this
.
fileList
)
//
console.log("uploadAudio",this.fileList)
},
methods
:
{
handleRemove
(
file
,
fileList
)
{
// console.log(fileList,fileList.map(item=>item.id),'1111')
// return this.$confirm(`确定移除 ${ file.name }?`);
this
.
$emit
(
'audioList'
,
fileList
.
map
(
item
=>
item
.
id
))
},
submitUpload
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
...
...
This diff is collapsed.
Click to expand it.
src/page/content/components/uploadVue/uploadDatum.vue
View file @
9eae1314
...
...
@@ -9,6 +9,7 @@
action
:auto-upload=
"false"
:before-upload=
"beforeAvatarUpload"
:on-remove=
"handleRemove"
>
<i
class=
"el-icon-plus fileUpload"
></i>
</el-upload>
...
...
@@ -42,6 +43,11 @@ export default {
mounted
(){
},
methods
:
{
handleRemove
(
file
,
fileList
)
{
// console.log(fileList,fileList.map(item=>item.id),'1111')
// return this.$confirm(`确定移除 ${ file.name }?`);
this
.
$emit
(
'datumList'
,
fileList
.
map
(
item
=>
item
.
id
))
},
submitUpload
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
...
...
This diff is collapsed.
Click to expand it.
src/page/content/components/uploadVue/uploadFile copy.vue
deleted
100644 → 0
View file @
00b93a3e
<
template
>
<div>
<el-upload
ref=
"upload"
accept=
".mp4,.flv,.mpeg,.mpg"
:multiple=
"true"
:http-request=
"uploadFile"
:file-list=
"fileList"
action
:auto-upload=
"false"
:before-upload=
"beforeAvatarUpload"
>
<i
class=
"el-icon-plus fileUpload"
></i>
</el-upload>
<el-button
style=
"margin-left: 10px;"
size=
"small"
type=
"success"
v-loading=
"loading"
@
click=
"submitUpload"
>
上传到服务器
</el-button>
</div>
</
template
>
<
script
>
export
default
{
props
:{
fileList
:{
type
:
Array
,
default
:[]
},
},
data
()
{
return
{
fullscreenLoading
:
false
,
loading
:
false
,
filedata
:[],
fileArr
:
[],
fileList
:[],
// fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}]
};
},
methods
:
{
openFullScreen2
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'上传中,请稍候。。。'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.7)'
});
},
submitUpload
()
{
// 导入
// this.openFullScreen2()
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'上传中,请稍候。。。'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.7)'
});
// this.loading = true
let
tempData
=
this
.
filedata
this
.
filedata
=
new
FormData
()
// 用FormData存放上传文件
this
.
$refs
.
upload
.
submit
()
// 会循环调用uploadFile方法,多个文件调用多次
let
_this
=
this
;
_this
.
$https
(
{
method
:
"post"
,
url
:
"file/video/content/upload"
,
authType
:
this
.
backToken
},
this
.
filedata
)
.
then
(
res
=>
{
let
resData
=
res
.
data
;
console
.
log
(
res
)
// this.loading = false
if
(
resData
.
resultCode
==
"200"
)
{
loading
.
close
();
_this
.
$message
.
success
(
'上传成功!'
)
const
data
=
resData
.
data
.
fileList
;
let
newArray
=
data
.
map
((
item
)
=>
item
.
id
);
let
editArray
=
[]
if
(
this
.
fileList
.
length
){
editArray
=
this
.
fileList
.
map
(
item
=>
item
.
id
)
}
this
.
$emit
(
"videoList"
,
[...
newArray
,...
editArray
]);
}
else
{
_this
.
$message
.
error
(
resData
.
msg
||
resData
.
message
);
}
})
.
catch
(
err
=>
{
console
.
log
(
err
);
_this
.
$message
.
error
(
err
.
msg
||
err
.
message
);
});
},
uploadFile
(
file
)
{
this
.
filedata
.
append
(
'file'
,
file
.
file
)
},
beforeAvatarUpload
(
file
)
{
const
isLt10G
=
file
.
size
/
1024
/
1024
/
1024
<
10
;
if
(
!
isLt10G
)
{
this
.
$message
.
error
(
"上传文件大小不能超过 10GB!"
);
}
return
isLt10G
;
}
}
};
</
script
>
<
style
>
.el-upload
.fileUpload
{
width
:
148px
;
height
:
148px
;
line-height
:
148px
!important
;
margin
:
0
auto
;
border
:
1px
dashed
#c0ccda
;
font-size
:
24px
;
font
:
#ccc
;
}
</
style
>
This diff is collapsed.
Click to expand it.
src/page/content/components/uploadVue/uploadFolder.vue
View file @
9eae1314
...
...
@@ -58,6 +58,8 @@ export default {
const
children
=
this
.
files
;
const
index
=
children
.
findIndex
(
d
=>
d
.
name
===
data
.
name
);
children
.
splice
(
index
,
1
);
console
.
log
(
this
.
files
,
'111'
)
this
.
$emit
(
"videoList"
,
this
.
files
.
map
(
item
=>
item
.
id
));
},
getFiles
:
function
(
event
)
{
console
.
log
(
event
);
...
...
This diff is collapsed.
Click to expand it.
src/page/content/display/content/details.vue
View file @
9eae1314
...
...
@@ -101,11 +101,12 @@
<el-form-item
label=
"展板音频"
>
<div
v-if=
"contentData.audioList.length"
>
<span
class=
"
file-box
"
class=
""
v-for=
"(s, i) in contentData.audioList"
:key=
"i"
>
<audio
style=
"float:left;"
controls
width=
"100%"
height=
"100%"
...
...
@@ -113,7 +114,7 @@
>
<source
:src=
"s.fileUrl"
/>
</audio>
<span>
{{
s
.
fileName
}}
</span>
<span
style=
"float:left;display:inline-block;margin:10px 0px 20px 20px;"
>
{{
s
.
fileName
}}
</span>
</span>
</div>
<div
v-else
>
暂无数据
</div>
...
...
This diff is collapsed.
Click to expand it.
src/page/content/display/content/index.vue
View file @
9eae1314
...
...
@@ -272,8 +272,13 @@ export default {
})
.
then
(
res
=>
{
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
});
if
(
res
.
data
.
resultCode
===
"200"
){
this
.
$message
({
type
:
"success"
,
message
:
"删除视频申请已提交,待审核!"
});
_this
.
onSearch
();
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
res
.
data
.
message
});
}
},
error
=>
{
this
.
$message
({
...
...
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