Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM4-13
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
YM4-13
Commits
9f0d2290
Commit
9f0d2290
authored
Oct 28, 2020
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix
parent
a5182118
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
custom-hot-zone.component.ts
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
+15
-1
form.component.html
src/app/form/form.component.html
+3
-3
form.component.ts
src/app/form/form.component.ts
+9
-2
No files found.
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
View file @
9f0d2290
...
...
@@ -156,6 +156,20 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
}
}
setAudioByUID
(
audio_url
,
uid
)
{
let
mached
=
false
;
this
.
hotZoneArr
.
forEach
(
element
=>
{
if
(
element
.
uid
==
uid
)
{
console
.
log
(
uid
,
element
)
element
.
audio_url
=
audio_url
;
mached
=
true
;
}
});
if
(
mached
)
{
this
.
autoSave
()
}
}
refreshImage
(
img
)
{
this
.
hideAllLineDash
();
img
.
picItem
=
this
.
getPicItem
(
img
);
...
...
@@ -203,7 +217,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
}
else
{
item
.
uid
=
uuid
.
v4
()
item
.
initFont
(
this
.
fontSize
,
this
.
fontName
,
this
.
fontColor
)
item
.
init
(
this
.
defaultItemBG
,
"
Text
"
,
"
Text
"
,
()
=>
{
item
.
init
(
this
.
defaultItemBG
,
""
,
"
Text
"
,
()
=>
{
item
.
x
=
this
.
canvasWidth
/
2
-
this
.
itemWidth
/
2
;
item
.
y
=
this
.
canvasHeight
/
2
-
20
;
},
()
=>
this
.
autoSave
());
...
...
src/app/form/form.component.html
View file @
9f0d2290
...
...
@@ -65,7 +65,7 @@
音频
</div>
<div
style=
"float: left;"
>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
it
.
media
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio_url
',
it
.
media
)"
>
</app-audio-recorder>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
it
.
media
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio_url
',
it
.
media
,
it
.
uid
)"
>
</app-audio-recorder>
</div>
</nz-form-control>
<nz-form-control
[
nzSpan
]="
8
"
>
...
...
@@ -214,7 +214,7 @@
音频
</div>
<div
style=
"float: left;"
>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
it
.
media
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio_url
',
it
.
media
)"
>
</app-audio-recorder>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
it
.
media
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio_url
',
it
.
media
,
it
.
uid
)"
>
</app-audio-recorder>
</div>
</nz-form-control>
<nz-form-control
[
nzSpan
]="
8
"
>
...
...
@@ -363,7 +363,7 @@
音频
</div>
<div
style=
"float: left;"
>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
it
.
media
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio_url
',
it
.
media
)"
>
</app-audio-recorder>
<app-audio-recorder
id=
"index_audio_1"
[
audioUrl
]="
it
.
media
.
audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio_url
',
it
.
media
,
it
.
uid
)"
>
</app-audio-recorder>
</div>
</nz-form-control>
<nz-form-control
[
nzSpan
]="
8
"
>
...
...
src/app/form/form.component.ts
View file @
9f0d2290
...
...
@@ -308,12 +308,19 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
save
();
}
onAudioUploadSuccess
(
e
,
key
,
item
?)
{
onAudioUploadSuccess
(
e
,
key
,
item
?
,
uid
?
)
{
if
(
item
)
{
item
[
key
]
=
e
.
url
;
item
[
key
]
=
e
.
url
;
if
(
uid
)
{
this
.
hotZooLeftEL
.
setAudioByUID
(
e
.
url
,
uid
)
this
.
hotZooMiddleEL
.
setAudioByUID
(
e
.
url
,
uid
)
this
.
hotZooRightEL
.
setAudioByUID
(
e
.
url
,
uid
)
}
}
else
{
this
[
key
]
=
e
.
url
;
}
this
.
save
();
}
...
...
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