Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP51
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
OP51
Commits
c599ca1b
Commit
c599ca1b
authored
Jul 11, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
645e48be
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
22 deletions
+65
-22
form.component.css
form/src/app/form/form.component.css
+3
-2
form.component.html
form/src/app/form/form.component.html
+44
-17
form.component.ts
form/src/app/form/form.component.ts
+18
-3
No files found.
form/src/app/form/form.component.css
View file @
c599ca1b
@import
'../style/common_mixin.css'
;
.model-content
{
width
:
100%
;
height
:
100%
;
...
...
@@ -35,11 +36,11 @@
.border
{
width
:
450px
;
height
:
450px
;
/* height: 450px; */
border-radius
:
20px
;
border-style
:
dashed
;
text-align
:
center
;
float
:
left
;
/* float: left; */
margin-left
:
10px
;
margin-bottom
:
10px
;
}
...
...
form/src/app/form/form.component.html
View file @
c599ca1b
...
...
@@ -13,21 +13,21 @@
<div>
<div>
<div
class=
"border"
>
<div
style=
"width:
100%; align-items:center
;"
>
<div
class=
"item-box"
style=
"width: 50%;height:200px; margin-left:
25%; margin-top: 10%
;"
>
<div
class=
"border"
style=
"padding: 50px 0;"
>
<div
style=
"width:
600px
;"
>
<div
class=
"item-box"
style=
"width: 50%;height:200px; margin-left:
10px
;"
>
<span>
猫咪开始引导音频
</span>
<div
style=
"display: flex; justify-items: center; padding-top: 10px"
>
<app-audio-recorder
[
audioUrl
]="
picArr
.
cat
.
start
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
picArr
.
cat
,'
start
')"
>
</app-audio-recorder>
</div>
<span>
猫咪录音引导音频
</span>
<
!-- <
span>猫咪录音引导音频</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.cat.record"
(audioUploaded)="onAudioUploadSuccess($event, picArr.cat,'record')">
</app-audio-recorder>
</div>
</div>
-->
<span>
猫咪待机音频
</span>
<div
style=
"display: flex; justify-items: center; padding-top: 10px"
>
<app-audio-recorder
[
audioUrl
]="
picArr
.
cat
.
wait
"
...
...
@@ -35,7 +35,7 @@
</app-audio-recorder>
</div>
<span>
猫咪结束音频
</span>
<div
style=
"display: flex; justify-items: center; padding-top: 10px"
>
<div
style=
"display: flex; justify-items: center; padding-top: 10px
;
"
>
<app-audio-recorder
[
audioUrl
]="
picArr
.
cat
.
finish
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
picArr
.
cat
,'
finish
')"
>
</app-audio-recorder>
...
...
@@ -46,7 +46,7 @@
</div>
</div>
<div>
<
!-- <
div>
<div class="border">
<div style="width: 100%; align-items:center;">
<div class="item-box" style="width: 50%;height:200px; margin-left: 25%; margin-top: 10%;">
...
...
@@ -72,7 +72,7 @@
</div>
</div>
</div>
</div>
-->
<!-- http://localhost:4200/?type=form
一组游戏
一个图片动画
...
...
@@ -82,11 +82,11 @@
不限制组的数量 -->
</div>
<div
*
ngFor=
"let item of picArr.list; let i = index"
>
<div
class=
"border"
style=
"
height:5
00px;"
>
<div
style=
"width: 100%;
align-items:center;
"
>
<div
class=
"border"
style=
"
width:6
00px;"
>
<div
style=
"width: 100%;"
>
<!-- <span style="font-weight: 500; font-size: 27px; color: red; ">选项</span> -->
<div
class=
"item-box"
style=
"
width: 50%;height:300px; margin-left: 25%; margin-top: 10%
;"
>
<span>
文字
</span>
<div
class=
"item-box"
style=
"
margin-left: 10px
;"
>
<
!-- <
span>文字</span>
<input style="width: 80%; margin-bottom: 0.5vw" type="text" nz-input placeholder="" [(ngModel)]="item.title"
(blur)="saveItem()">
<span>选择标红文字</span>
...
...
@@ -109,7 +109,7 @@
{{s}}
</div>
</div>
</div>
</div>
-->
<div
style=
"margin-top: 10px;"
>
<app-upload-dragon-bone
style=
"width: 100%"
(
save
)="
onDragonBoneSave
($
event
,
item
)"
...
...
@@ -118,7 +118,7 @@
</div>
<span>
图片
</span>
<app-upload-image-with-preview
style=
"width:
100%
"
[
picUrl
]="
item
.
bgImg
"
<app-upload-image-with-preview
style=
"width:
300px
"
[
picUrl
]="
item
.
bgImg
"
(
imageUploaded
)="
onImageUploadSuccessByItem
($
event
,
item
)"
>
</app-upload-image-with-preview>
...
...
@@ -128,11 +128,38 @@
</div>
<div
*
ngFor=
"let obj of item.titleObj; let o = index"
style=
"margin-top:30px"
>
<!-- <div style="display: flex; justify-items: center; padding-top: 5px"> -->
<div
style=
"border: 1px solid #333333;padding: 50px;"
>
<div
style=
"margin:10px"
>
<input
style=
"width: 200px; margin-bottom: 0.5vw"
type=
"text"
nz-input
placeholder=
""
[(
ngModel
)]="
obj
.
card
"
(
blur
)="
saveItem
()"
>
</div>
<div
style=
"margin:10px"
>
<app-audio-recorder
[
audioUrl
]="
obj
.
audio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
obj
,'
audio
')"
>
</app-audio-recorder>
</div>
<div
style=
"margin:10px"
>
<span>
是否标红
</span>
<nz-radio-group
[(
ngModel
)]="
obj
.
color
"
>
<label
nz-radio
nzValue=
"1"
>
是
</label>
<label
nz-radio
nzValue=
"0"
>
否
</label>
</nz-radio-group>
</div>
<button
style=
"margin: 10px;"
nz-button
nzType=
"danger"
(
click
)="
deleteObj
(
i
,
o
)"
>
<span>
删除文字
</span>
</button>
</div>
</div>
<button
style=
"margin: 10px;"
nz-button
nzType=
"success"
(
click
)="
addObj
(
i
)"
>
<span>
增加文字
</span>
</button>
</div>
<div
class=
"item-box"
style=
"width: 50%; margin-left: 25%;
margin-top: 30px;"
>
<div
class=
"item-box"
style=
"width: 50%; margin-left: 25%; margin-top: 30px;"
>
<button
style=
"margin-bottom: 10px;"
nz-button
nzType=
"danger"
(
click
)="
deleteItem
(
i
)"
>
<span>
删除
</span>
<span>
删除
题目
</span>
</button>
</div>
</div>
...
...
form/src/app/form/form.component.ts
View file @
c599ca1b
...
...
@@ -22,7 +22,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
list
:
[],
};
_item
:
any
;
KEY
=
'
hw_
006
'
;
KEY
=
'
hw_
op52
'
;
errs
=
[];
// @Input()
...
...
@@ -93,7 +93,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
function
Item
()
{
this
.
title
=
""
;
this
.
titleRed
=
[];
this
.
titleObj
=
{}
;
this
.
titleObj
=
[]
;
this
.
bgImg
=
""
;
this
.
wordAudio
=
""
;
this
.
imgAni
=
new
AniAssets
();
...
...
@@ -107,7 +107,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
item
.
titleObj
=
item
.
title
.
split
(
""
).
map
((
s
,
idx
)
=>
{
return
{
card
:
s
,
color
:
item
.
titleRed
[
idx
]
==
1
?
0
:
1
color
:
item
.
titleRed
[
idx
]
==
1
?
0
:
1
,
audio
:
null
,
}
})
this
.
save
();
...
...
@@ -182,6 +183,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this
.
save
();
}
//添加一对
addObj
(
i
)
{
//最多4个
this
.
picArr
.
list
[
i
].
titleObj
.
push
({
card
:
''
,
color
:
0
,
audio
:
null
,
})
this
.
saveItem
();
}
deleteObj
(
i
,
o
)
{
this
.
picArr
.
list
[
i
].
titleObj
.
splice
(
o
,
1
);
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