Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ngt7_fish
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
ngt7_fish
Commits
b57939a8
Commit
b57939a8
authored
Oct 23, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
form修改
parent
e678008c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
3 deletions
+60
-3
defaultData.ts
assets/ngt7_fish/script/defaultData.ts
+17
-0
ComponentBase.ts
form/src/app/form/ComponentBase.ts
+6
-2
form.component.html
form/src/app/form/form.component.html
+24
-1
form.component.ts
form/src/app/form/form.component.ts
+13
-0
No files found.
assets/ngt7_fish/script/defaultData.ts
View file @
b57939a8
export
const
defaultData
=
{
export
const
defaultData
=
{
"
audioName
"
:
""
,
"
imgAni
"
:
{
"
ske
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/4ec3da85d888ad3c5c57e10fca728499.json
"
,
"
name
"
:
"
鱼1_ske.json
"
},
"
tex
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/2c52380a3f3cdd3f5d38870bee2c9ffd.json
"
,
"
name
"
:
"
鱼1_tex.json
"
},
"
png
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/3ca112e3bb312d5e9b7182bbb97c616d.png
"
,
"
name
"
:
"
鱼1_tex.png
"
}
},
"
startAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/67421bf397cf214254db34427b4f53da_l.mp3
"
,
"
title
"
:
"
分类钓鱼
"
,
"
questions
"
:
"
questions
"
:
[
[
{
{
...
...
form/src/app/form/ComponentBase.ts
View file @
b57939a8
...
@@ -67,12 +67,16 @@ export class ComponentBase {
...
@@ -67,12 +67,16 @@ export class ComponentBase {
* 储存音频数据
* 储存音频数据
* @param e
* @param e
*/
*/
onAudioUploadSuccess
(
e
,
key
,
it
=
this
.
item
)
{
onAudioUploadSuccess
(
e
,
key
,
it
=
this
.
item
,
audioName
=
null
)
{
let
url
=
e
.
url
;
let
url
=
e
.
url
;
let
sp
=
url
.
split
(
"
.mp3
"
);
let
sp
=
url
.
split
(
"
.mp3
"
);
let
u
=
sp
[
0
]
+
"
_l.mp3
"
;
let
u
=
sp
[
0
]
+
"
_l.mp3
"
;
it
[
key
]
=
u
;
it
[
key
]
=
u
;
it
[
key
+
"
Name
"
]
=
e
.
name
||
""
;
if
(
audioName
)
{
it
[
audioName
]
=
e
.
audioName
||
""
;
}
else
{
it
[
key
+
"
Name
"
]
=
e
.
name
||
""
;
}
this
.
save
();
this
.
save
();
}
}
...
...
form/src/app/form/form.component.html
View file @
b57939a8
...
@@ -74,6 +74,29 @@
...
@@ -74,6 +74,29 @@
</style>
</style>
<div
class=
"model-content"
>
<div
class=
"model-content"
>
<div
style=
"padding: 10px;background-color: #fff;"
>
<!-- 标题区 -->
<div
class=
"border-dashed"
style=
"margin: 20px;width: 1000px;"
>
<span
style=
"font-size: 20px;"
>
标题文字:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
title
"
(
blur
)="
save
()"
>
<span
style=
"font-size: 20px;"
>
提示动画:
</span>
<app-upload-dragon-bone
style=
"width: 100%"
(
save
)="
onDragonBoneSave
($
event
,
item
)"
[
skeJsonData
]="
item
.
imgAni
.
ske
"
[
texJsonData
]="
item
.
imgAni
.
tex
"
[
texPngData
]="
item
.
imgAni
.
png
"
>
</app-upload-dragon-bone>
<span
style=
"font-size: 20px;"
>
开始音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
item
.
startAudio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
startAudio
',
item
,'
audioName
')"
></app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ item.audioName}}
</span>
</div>
</div>
</div>
</div>
<div
style=
"padding: 10px;background-color: #fff;"
>
<div
style=
"padding: 10px;background-color: #fff;"
>
<div
style=
"margin: 20px;width: 1000px;"
>
<div
style=
"margin: 20px;width: 1000px;"
>
...
@@ -190,7 +213,7 @@
...
@@ -190,7 +213,7 @@
</div>
</div>
</div>
</div>
<!--
<!--
<button class="btn-blue" style="margin-top:10px;width: 1000px; height: 50px;" nz-button nzType="default" nzDanger
<button class="btn-blue" style="margin-top:10px;width: 1000px; height: 50px;" nz-button nzType="default" nzDanger
(click)="addquestion()">+增加题目</button> -->
(click)="addquestion()">+增加题目</button> -->
</div>
</div>
...
...
form/src/app/form/form.component.ts
View file @
b57939a8
...
@@ -12,6 +12,14 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -12,6 +12,14 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
saveKey
=
"
ngt07_fish
"
;
saveKey
=
"
ngt07_fish
"
;
item
=
{
item
=
{
title
:
'
分类钓鱼
'
,
imgAni
:
{
ske
:
{},
tex
:
{},
png
:
{}
},
startAudio
:
""
,
audioName
:
''
,
questions
:
[
questions
:
[
{
{
title
:
'
左侧船
'
,
title
:
'
左侧船
'
,
...
@@ -76,6 +84,11 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -76,6 +84,11 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
}
}
onDragonBoneSave
(
e
,
item
)
{
console
.
log
(
e
);
this
.
save
();
}
ngChange
(
i
,
j
)
{
ngChange
(
i
,
j
)
{
this
.
save
();
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