Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jj_video_practice
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
jj_video_practice
Commits
da662a60
Commit
da662a60
authored
Dec 19, 2025
by
kingweight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整 视频上传组件
parent
d0c9452a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
32 deletions
+16
-32
upload-video.component.html
src/app/common/upload-video/upload-video.component.html
+1
-1
form.component.html
src/app/form/form.component.html
+8
-19
form.component.ts
src/app/form/form.component.ts
+7
-12
No files found.
src/app/common/upload-video/upload-video.component.html
View file @
da662a60
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<div
class=
"i-bg"
[
style
.
width
]="
progress
+'%'"
></div>
<div
class=
"i-bg"
[
style
.
width
]="
progress
+'%'"
></div>
<div
class=
"i-text"
>
<div
class=
"i-text"
>
<fa-icon
icon=
"cloud-upload-alt"
></fa-icon>
<fa-icon
icon=
"cloud-upload-alt"
></fa-icon>
Uploading
...
上传中,请耐心等待
...
</div>
</div>
</div>
</div>
<div
class=
"p-upload-check-bg"
*
ngIf=
"checking"
>
<div
class=
"p-upload-check-bg"
*
ngIf=
"checking"
>
...
...
src/app/form/form.component.html
View file @
da662a60
<div
style=
"margin: 30px;"
>
<div
style=
"margin: 30px;"
>
<div
style=
"margin: 30px; display: flex; align-items: center; "
>
<h3>
单元名称:
</h3>
<textarea
nz-input
[(
ngModel
)]="
item
.
title
"
(
blur
)="
save
()"
style=
" width: 350px; min-height: 60px;"
></textarea>
</div>
<div
style=
"margin: 30px; display: flex; align-items: center; "
>
<h3>
视频互动课名称:
</h3>
<textarea
nz-input
[(
ngModel
)]="
item
.
video_title
"
(
blur
)="
save
()"
style=
" width: 350px; min-height: 60px;"
></textarea>
</div>
<div
class=
"model-content"
>
<div
class=
"model-content"
>
<!-- <div
<!-- <div
...
@@ -24,26 +14,25 @@
...
@@ -24,26 +14,25 @@
align=
'center'
>
align=
'center'
>
<div
style=
"width: 100px; background-color: white; transform: translateY(-30px);"
>
视频
</div>
<div
style=
"width: 100px; background-color: white; transform: translateY(-30px);"
>
视频
</div>
<div
style=
"margin:
3
0px; display: flex; align-items: center; "
>
<div
style=
"margin:
2
0px; display: flex; align-items: center; "
>
<h3>
单元名称:
</h3>
<h3
style=
"width: 120px;"
>
单元名称:
</h3>
<textarea
nz-input
[(
ngModel
)]="
item
.
title
"
(
blur
)="
save
()"
style=
" width:
350px
; min-height: 60px;"
></textarea>
<textarea
nz-input
[(
ngModel
)]="
item
.
title
"
(
blur
)="
save
()"
style=
" width:
100%
; min-height: 60px;"
></textarea>
</div>
</div>
<div
style=
"margin:
3
0px; display: flex; align-items: center; "
>
<div
style=
"margin:
2
0px; display: flex; align-items: center; "
>
<h3>
视频互动课名称:
</h3>
<h3>
视频互动课名称:
</h3>
<textarea
nz-input
[(
ngModel
)]="
item
.
video_title
"
(
blur
)="
save
()"
style=
" width: 3
5
0px; min-height: 60px;"
></textarea>
<textarea
nz-input
[(
ngModel
)]="
item
.
video_title
"
(
blur
)="
save
()"
style=
" width: 3
2
0px; min-height: 60px;"
></textarea>
</div>
</div>
<br>
<br>
<app-upload-image-with-preview
style=
"width: 80%;"
[
picUrl
]="
item
.
cover
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
)"
>
<app-upload-image-with-preview
style=
"width: 80%;"
[
picUrl
]="
item
.
cover
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
)"
>
</app-upload-image-with-preview>
</app-upload-image-with-preview>
<app-upload-video
[
videoUrl
]="
item
.
video_url
.
replace
('.
mp4
',
'
_h
.
mp4
')"
[
showUploadBtn
]="
true
"
(
videoUploaded
)="
onVideoUploaded
($
event
)"
(
onCapture
)="
handleOnCapture
($
event
)"
(
parentRef
)="
onParentRef
($
event
)"
></app-upload-video>
<app-upload-video
[
videoUrl
]="
item
.
video_url
.
replace
('.
mp4
',
'
_h
.
mp4
')"
[
showUploadBtn
]="
true
"
(
videoUploaded
)="
onVideoUploaded
($
event
)"
(
onCapture
)="
handleOnCapture
($
event
)"
(
parentRef
)="
onParentRef
($
event
)"
></app-upload-video>
<div
style=
"padding: 5px 0;"
align=
'center'
>
<div
style=
"padding: 5px 0;"
align=
'center'
>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
video_url
"
(
blur
)="
save
()"
>
<h3>
视频地址
</h3>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
video_url
"
disabled
(
blur
)="
save
()"
>
</div>
</div>
<
button
style=
"margin-top: 10px; "
(
click
)="
onRemoveData
()"
>
删除视频
</button
>
<
!-- <button style="margin-top: 10px; " (click)="onRemoveVideo()">删除视频</button> --
>
</div>
</div>
<button
style=
"width: 30% ;min-width: 300px;height: 170px; margin-top: 20px; margin-left:2.5%;"
(
click
)="
onAddData
()"
>
添加视频
</button>
</div>
</div>
</div>
</div>
...
...
src/app/form/form.component.ts
View file @
da662a60
...
@@ -716,14 +716,6 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -716,14 +716,6 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
*/
*/
save
()
{
save
()
{
// if (this.tempItem) {
// this.item.tempItem = this.tempItem;
// }
// if (this.customTypeGroupArr) {
// this.item.customTypeGroupArr = this.customTypeGroupArr;
// }
(
<
any
>
window
).
courseware
.
setData
(
this
.
item
,
null
,
this
.
saveKey
);
(
<
any
>
window
).
courseware
.
setData
(
this
.
item
,
null
,
this
.
saveKey
);
this
.
refresh
();
this
.
refresh
();
...
@@ -767,11 +759,13 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -767,11 +759,13 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
}
}
/**
/**
* 删除
卡片
* 删除
视频
*/
*/
onRemoveData
()
{
onRemoveVideo
()
{
// 清除视频URL和封面,使用户可以重新上传视频
this
.
item
.
video_url
=
""
;
this
.
item
.
cover
=
""
;
this
.
save
();
}
}
/** 添加卡片 */
/** 添加卡片 */
...
@@ -787,6 +781,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -787,6 +781,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
onParentRef
(
e
)
{
onParentRef
(
e
)
{
const
item
=
this
.
item
;
const
item
=
this
.
item
;
if
(
!
item
.
file
)
return
;
const
uploadXHRArgs
:
UploadXHRArgs
=
{
const
uploadXHRArgs
:
UploadXHRArgs
=
{
file
:
item
.
file
,
file
:
item
.
file
,
name
:
'
file
'
,
name
:
'
file
'
,
...
...
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