Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg29_museum
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
dg29_museum
Commits
ca76b9d7
Commit
ca76b9d7
authored
Dec 20, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表单完成
parent
9233bd21
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
438 deletions
+105
-438
.DS_Store
.DS_Store
+0
-0
defaultData_dg18_tianci.ts
assets/dg18_tianci/script/defaultData_dg18_tianci.ts
+26
-89
form.component.html
form/src/app/form/form.component.html
+40
-285
form.component.ts
form/src/app/form/form.component.ts
+39
-64
No files found.
.DS_Store
View file @
ca76b9d7
No preview for this file type
assets/dg18_tianci/script/defaultData_dg18_tianci.ts
View file @
ca76b9d7
export
const
defaultData
=
{
"
npcTitle
"
:
"
exit
"
,
"
npcAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3
"
,
"
npcAudioName
"
:
"
boom_dg28_drag.mp3
"
,
"
npcAudioEnd
"
:
"
http://staging-teach.cdn.ireadabc.com/289fe0a6d9893519c3fb5993b86b6fe9_l.mp3
"
,
"
npcAudioEndName
"
:
"
dragdown_dg28_drag.mp3
"
,
"
questions
"
:
[{
"
options
"
:
[{
"
audio
"
:
""
,
"
hotZoneItemArr
"
:
[],
"
bgItem
"
:
""
,
"
right
"
:
false
},
{
"
audio
"
:
""
,
"
hotZoneItemArr
"
:
[],
"
bgItem
"
:
""
,
"
right
"
:
false
},
{
"
audio
"
:
""
,
"
hotZoneItemArr
"
:
[],
"
bgItem
"
:
""
,
"
right
"
:
false
}],
"
type
"
:
"
img
"
,
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/f627ed930909e43e823cd79ed90aaea3.png
"
,
"
rect
"
:
{
"
x
"
:
90.8694029850746
,
"
y
"
:
0
,
"
width
"
:
910.2611940298508
,
"
height
"
:
595
}
},
"
hotZoneItemArr
"
:
[
{
"
index
"
:
0
,
"
text
"
:
"
part1
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
261.13
,
"
y
"
:
44.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
"
index
"
:
1
,
"
text
"
:
"
part2
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
512.13
,
"
y
"
:
45.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
"
index
"
:
2
,
"
text
"
:
"
part3
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
355.13
,
"
y
"
:
151.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
"
index
"
:
3
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/be8ec5cee7a3074440478b00a4a84f5e.png
"
,
"
itemType
"
:
"
pic
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
0.44287909836065575
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
23.13
,
"
y
"
:
44.5
,
"
width
"
:
200
,
"
height
"
:
200
}
}],
"
hotZoneFontObj
"
:
{
"
size
"
:
50
,
"
name
"
:
"
BRLNSR_1
"
,
"
color
"
:
"
#8f3758
"
}
},
{
"
options
"
:
[],
"
type
"
:
"
img
"
,
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/8b565a3db344386ab9cde226cc1411f2.jpg
"
,
"
rect
"
:
{
"
x
"
:
72.15060240963851
,
"
y
"
:
0
,
"
width
"
:
947.698795180723
,
"
height
"
:
595
}
},
"
hotZoneItemArr
"
:
[{
"
index
"
:
0
,
"
text
"
:
"
download
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
"
40
"
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#FF0000
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
122.84
,
"
y
"
:
71.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
"
index
"
:
1
,
"
text
"
:
"
app
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
"
40
"
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#FF0000
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
176.84
,
"
y
"
:
270.5
,
"
width
"
:
200
,
"
height
"
:
200
}
}],
"
hotZoneFontObj
"
:
{
"
size
"
:
"
40
"
,
"
name
"
:
"
BRLNSR_1
"
,
"
color
"
:
"
#FF0000
"
}
}],
"
bgItem
"
:
""
,
"
hotZoneItemArr
"
:
[]
}
const
b
=
{
"
npcTitle
"
:
"
exit
"
,
"
npcAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3
"
,
"
npcAudioName
"
:
"
boom_dg28_drag.mp3
"
,
"
npcAudioEnd
"
:
"
http://staging-teach.cdn.ireadabc.com/289fe0a6d9893519c3fb5993b86b6fe9_l.mp3
"
,
"
npcAudioEndName
"
:
"
dragdown_dg28_drag.mp3
"
,
"
npcAudioName
"
:
""
,
"
npcAudioEnd
"
:
"
http://staging-teach.cdn.ireadabc.com/85e58ae784dfc381170ddabead16cac6_l.mp3
"
,
"
npcAudioEndName
"
:
""
,
"
video
"
:
"
http://staging-teach.cdn.ireadabc.com/aca65e37c239f95496a8c39fe1374fc4.mp4
"
,
"
questions
"
:
[
{
"
options
"
:
[
{
"
audio
"
:
""
,
"
hotZoneItemArr
"
:
[],
"
bgItem
"
:
""
,
"
right
"
:
false
},
{
"
audio
"
:
""
,
"
hotZoneItemArr
"
:
[],
"
bgItem
"
:
""
,
"
right
"
:
false
},
{
"
audio
"
:
""
,
"
hotZoneItemArr
"
:
[],
"
bgItem
"
:
""
,
"
right
"
:
false
}
],
"
type
"
:
"
img
"
,
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/b4494456199505bdf990fff96a0c9fb8.jpg
"
,
"
rect
"
:
{
"
x
"
:
17.111111111111086
,
"
y
"
:
0
,
"
width
"
:
1057.7777777777778
,
"
height
"
:
595
}
},
"
hotZoneItemArr
"
:
[
{
"
index
"
:
0
,
"
text
"
:
"
part1
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
435.89
,
"
y
"
:
190.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
"
index
"
:
1
,
"
text
"
:
"
part2
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
-
19.11
,
"
y
"
:
-
59.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
"
index
"
:
2
,
"
text
"
:
"
part4
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
-
27.11
,
"
y
"
:
452.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
"
index
"
:
3
,
"
text
"
:
"
part5
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
883.89
,
"
y
"
:
460.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
"
index
"
:
4
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/be8ec5cee7a3074440478b00a4a84f5e.png
"
,
"
itemType
"
:
"
pic
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
0.44287909836065575
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
6.89
,
"
y
"
:
79.5
,
"
width
"
:
200
,
"
height
"
:
200
}
}],
"
hotZoneFontObj
"
:
{
"
size
"
:
50
,
"
name
"
:
"
BRLNSR_1
"
,
"
color
"
:
"
#8f3758
"
}
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/b4494456199505bdf990fff96a0c9fb8.jpg
"
,
"
title
"
:
"
this is first question on this world?
"
,
"
keyword
"
:
"
hello,world,good,info
"
,
"
startAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610_l.mp3
"
,
"
startAudioName
"
:
""
,
"
rightAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/289fe0a6d9893519c3fb5993b86b6fe9_l.mp3
"
,
"
rightAudioName
"
:
""
,
"
errorAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/f96310cbadf910738385ceadbfb088a4_l.mp3
"
,
"
errorAudioName
"
:
""
,
"
audioName
"
:
""
},
{
"
options
"
:
[],
"
type
"
:
"
img
"
,
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/9ecda2ef223dfc255a17522110fc7ee2.png
"
,
"
rect
"
:
{
"
x
"
:
152.03542234332423
,
"
y
"
:
0
,
"
width
"
:
787.9291553133515
,
"
height
"
:
595
}
},
"
hotZoneItemArr
"
:
[
{
"
index
"
:
0
,
"
text
"
:
"
test1
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
"
40
"
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#FF0000
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
166.96
,
"
y
"
:
0.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
"
index
"
:
1
,
"
text
"
:
"
test2
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
"
40
"
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#FF0000
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
343.96
,
"
y
"
:
335.5
,
"
width
"
:
200
,
"
height
"
:
200
}
}],
"
hotZoneFontObj
"
:
{
"
size
"
:
"
40
"
,
"
name
"
:
"
BRLNSR_1
"
,
"
color
"
:
"
#FF0000
"
}
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/f70b6fd256f91a8bc0c4db6a88ad270f.png
"
,
"
title
"
:
"
i need something
"
,
"
keyword
"
:
"
Is ok,do,some
"
,
"
startAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/85e58ae784dfc381170ddabead16cac6_l.mp3
"
,
"
startAudioName
"
:
""
,
"
rightAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/f96310cbadf910738385ceadbfb088a4_l.mp3
"
,
"
rightAudioName
"
:
""
,
"
errorAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610_l.mp3
"
,
"
errorAudioName
"
:
""
,
"
audioName
"
:
""
}],
"
bgItem
"
:
""
,
"
hotZoneItemArr
"
:
[]
"
questionText
"
:
""
,
"
audioName
"
:
""
}
form/src/app/form/form.component.html
View file @
ca76b9d7
...
...
@@ -110,96 +110,8 @@
</div>
</div>
<div
name=
"开始音频"
>
<span
style=
"font-size: 20px;"
>
开始音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
item
.
auidoStart
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
auidoStart
')"
>
</app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ item.auidoStartName}}
</span>
</div>
</div>
</div>
<div
name=
"结束音频"
>
<span
style=
"font-size: 20px;"
>
结束音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
item
.
auidoEnd
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
auidoEnd
')"
>
</app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ item.auidoEndName}}
</span>
</div>
</div>
</div>
<div
name=
"肉饼引导音频"
>
<span
style=
"font-size: 20px;"
>
肉饼引导音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
item
.
auidoMeet
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
auidoMeet
')"
>
</app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ item.auidoMeetName}}
</span>
</div>
</div>
</div>
<div
name=
"蔬菜引导音频"
>
<span
style=
"font-size: 20px;"
>
蔬菜引导音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
item
.
auidoVegetable
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
auidoVegetable
')"
>
</app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ item.auidoVegetableName}}
</span>
</div>
</div>
</div>
<div
name=
"第一次完成音频"
>
<span
style=
"font-size: 20px;"
>
第一次完成音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
item
.
auidoFinish
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
auidoFinish
')"
>
</app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ item.auidoFinishName}}
</span>
</div>
</div>
</div>
<!-- 切换开关
<span style="margin-right: 20px;font-size: 18px;font-weight: bold;">提示开关 </span>
<nz-radio-group [ngModel]="item.tipSwitch" (ngModelChange)="customRadioChange($event, item,'tipSwitch')"
style="font-size: 20px;display: flex; align-items: center; justify-content: left; flex-wrap: wrap;">
<label nz-radio nzValue="1">开</label>
<label nz-radio nzValue="0">关</label>
</nz-radio-group> -->
<!-- 龙骨 <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="width:300px">
<app-upload-image-with-preview [picUrl]="item.tipBg"
(imageUploaded)="onImageUploadSuccess($event,'tipBg', item)"></app-upload-image-with-preview>
</div> -->
<span
style=
"font-size: 20px;"
>
视频:
</span>
<app-upload-video
[
videoUrl
]="
item
.
video
"
(
videoUploaded
)="
onVideoUploaded
($
event
)"
></app-upload-video>
</div>
...
...
@@ -218,226 +130,69 @@
</div>
</div>
<div
name=
"题干部分"
class=
"border-solid"
style=
"margin-top: 20px;"
>
<div
class=
"word-type-option-title"
>
题干类型:
</div>
<div
style=
"margin-top: 5px;"
>
<nz-radio-group
[(
ngModel
)]="
question
.
mainType
"
(
ngModelChange
)="
save
()"
>
<label
nz-radio
nzValue=
"empty"
>
<span
[
style
]="{
color:question
.
mainType=
='empty'
?
'#
169BD5
'
:
'#
000
'}"
>
无
</span>
</label>
<label
nz-radio
nzValue=
"img"
>
<span
[
style
]="{
color:question
.
mainType=
='img'
?
'#
169BD5
'
:
'#
000
'}"
>
图片
</span>
</label>
<label
nz-radio
nzValue=
"text"
>
<span
[
style
]="{
color:question
.
mainType=
='text'
?
'#
169BD5
'
:
'#
000
'}"
>
文字
</span>
</label>
<label
nz-radio
nzValue=
"img_text"
>
<span
[
style
]="{
color:question
.
mainType=
='img_text'
?
'#
169BD5
'
:
'#
000
'}"
>
文字+图片
</span>
</label>
</nz-radio-group>
</div>
<div>
<div
class=
"option-img"
>
<div
*
ngIf=
"question.mainType=='img' || question.mainType =='img_text'"
style=
"width: 200px;"
>
<span
style=
"font-size: 20px;"
>
图片:
</span>
<app-upload-image-with-preview
[
picUrl
]="
question
.
mainImage
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,
'
mainImage
',
question
)"
>
</app-upload-image-with-preview>
</div>
</div>
<div
class=
"option-text"
>
<div
*
ngIf=
"question.mainType=='text' || question.mainType =='img_text'"
style=
"width: 1000px"
>
<span
style=
"font-size: 20px;"
>
文本:
</span>
<div
class=
"border-dashed"
style=
"width: 900px;"
>
<h2>
空格分隔选词:
</h2>
<textarea
rows=
"4"
nz-input
[(
ngModel
)]="
question
.
mainText
"
(
blur
)="
changeMain
(
i
,'
main
')"
></textarea>
</div>
<div
class=
"border-dashed"
style=
"width: 900px;"
>
<h2>
点击文本设置高亮:
</h2>
<span
*
ngFor=
"let cont of question.mainTextArr; let i = index"
style=
"margin-bottom: 5px; "
>
<span
*
ngIf=
"cont.block"
class=
"option-title-line"
(
click
)="
onBlock
(
cont
,
false
)"
[
innerHtml
]="
cont
.
text
"
></span>
<span
*
ngIf=
"!cont.block"
class=
"option-title"
(
click
)="
onBlock
(
cont
,
true
)"
[
innerHtml
]="
cont
.
text
"
></span>
</span>
</div>
</div>
<div
name=
"题目图片"
style=
"width: 200px;"
>
<span
style=
"font-size: 20px;"
>
题目图片
</span>
<app-upload-image-with-preview
[
picUrl
]="
question
.
img
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,
'
img
',
question
)"
>
</app-upload-image-with-preview>
</div>
</div>
</div>
<div
name=
"题目关键字"
>
<div
style=
"width: 600px"
>
<span
style=
"font-size: 20px;"
>
题目关键字/句(逗号隔开)
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
question
.
keyword
"
(
blur
)="
save
()"
>
</div>
</div>
<div
name=
"肉饼部分"
class=
"border-solid"
style=
"margin-top: 20px;"
>
<div
class=
"word-type-option-title"
>
肉饼类型:
</div>
<div
style=
"margin-top: 5px;"
>
<nz-radio-group
[(
ngModel
)]="
question
.
meetType
"
(
ngModelChange
)="
save
()"
>
<label
nz-radio
nzValue=
"img"
>
<span
[
style
]="{
color:question
.
meetType=
='img'
?
'#
169BD5
'
:
'#
000
'}"
>
图片
</span>
</label>
<label
nz-radio
nzValue=
"text"
>
<span
[
style
]="{
color:question
.
meetType=
='text'
?
'#
169BD5
'
:
'#
000
'}"
>
文字
</span>
</label>
</nz-radio-group>
</div>
<div>
<div
class=
"option-img"
>
<div
*
ngIf=
"question.meetType=='img' || question.meetType =='img_text'"
style=
"width: 200px;"
>
<span
style=
"font-size: 20px;"
>
图片:
</span>
<app-upload-image-with-preview
[
picUrl
]="
question
.
meetImage
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,
'
meetImage
',
question
)"
>
</app-upload-image-with-preview>
</div>
<div
name=
"题目开始音频"
>
<span
style=
"font-size: 20px;"
>
题目开始音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
question
.
startAudio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
startAudio
',
question
,'
startAudioName
')"
>
</app-audio-recorder>
</div>
<div
class=
"option-text"
>
<div
*
ngIf=
"question.meetType=='text' || question.meetType =='img_text'"
style=
"width: 1000px"
>
<span
style=
"font-size: 20px;"
>
文本:
</span>
<div
class=
"border-dashed"
style=
"width: 900px;"
>
<h2>
空格分隔选词:
</h2>
<textarea
rows=
"4"
nz-input
[(
ngModel
)]="
question
.
meetText
"
(
blur
)="
changeMain
(
i
,'
meet
')"
></textarea>
</div>
<div
class=
"border-dashed"
style=
"width: 900px;"
>
<h2>
点击文本设置高亮:
</h2>
<span
*
ngFor=
"let cont of question.meetTextArr; let i = index"
style=
"margin-bottom: 5px; "
>
<span
*
ngIf=
"cont.block"
class=
"option-title-line"
(
click
)="
onBlock
(
cont
,
false
)"
[
innerHtml
]="
cont
.
text
"
></span>
<span
*
ngIf=
"!cont.block"
class=
"option-title"
(
click
)="
onBlock
(
cont
,
true
)"
[
innerHtml
]="
cont
.
text
"
></span>
</span>
</div>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ question.startAudioName}}
</span>
</div>
</div>
</div>
<div
name=
"蔬菜部分"
class=
"border-solid"
style=
"margin-top: 20px;"
>
<div
class=
"word-type-option-title"
>
蔬菜类型:
</div>
<div
style=
"margin-top: 5px;"
>
<nz-radio-group
[(
ngModel
)]="
question
.
vegetableType
"
(
ngModelChange
)="
save
()"
>
<label
nz-radio
nzValue=
"img"
>
<span
[
style
]="{
color:question
.
vegetableType=
='img'
?
'#
169BD5
'
:
'#
000
'}"
>
图片
</span>
</label>
<label
nz-radio
nzValue=
"text"
>
<span
[
style
]="{
color:question
.
vegetableType=
='text'
?
'#
169BD5
'
:
'#
000
'}"
>
文字
</span>
</label>
</nz-radio-group>
</div>
<div>
<div
class=
"option-img"
>
<div
*
ngIf=
"question.vegetableType=='img' || question.vegetableType =='img_text'"
style=
"width: 200px;"
>
<span
style=
"font-size: 20px;"
>
图片:
</span>
<app-upload-image-with-preview
[
picUrl
]="
question
.
vegetableImage
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,
'
vegetableImage
',
question
)"
>
</app-upload-image-with-preview>
</div>
<div
name=
"题目正确音频"
>
<span
style=
"font-size: 20px;"
>
题目正确音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
question
.
rightAudio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
rightAudio
',
question
,'
rightAudioName
')"
>
</app-audio-recorder>
</div>
<div
class=
"option-text"
>
<div
*
ngIf=
"question.vegetableType=='text' || question.vegetableType =='img_text'"
style=
"width: 1000px"
>
<span
style=
"font-size: 20px;"
>
文本:
</span>
<div
class=
"border-dashed"
style=
"width: 900px;"
>
<h2>
空格分隔选词:
</h2>
<textarea
rows=
"4"
nz-input
[(
ngModel
)]="
question
.
vegetableText
"
(
blur
)="
changeMain
(
i
,'
vegetable
')"
></textarea>
</div>
<div
class=
"border-dashed"
style=
"width: 900px;"
>
<h2>
点击文本设置高亮:
</h2>
<span
*
ngFor=
"let cont of question.vegetableTextArr; let i = index"
style=
"margin-bottom: 5px; "
>
<span
*
ngIf=
"cont.block"
class=
"option-title-line"
(
click
)="
onBlock
(
cont
,
false
)"
[
innerHtml
]="
cont
.
text
"
></span>
<span
*
ngIf=
"!cont.block"
class=
"option-title"
(
click
)="
onBlock
(
cont
,
true
)"
[
innerHtml
]="
cont
.
text
"
></span>
</span>
</div>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ question.rightAudioName}}
</span>
</div>
</div>
</div>
<div
name=
"面饼部分"
class=
"border-solid"
style=
"margin-top: 20px;"
>
<div
class=
"word-type-option-title"
>
面饼类型:
</div>
<div
style=
"margin-top: 5px;"
>
<nz-radio-group
[(
ngModel
)]="
question
.
pieType
"
(
ngModelChange
)="
save
()"
>
<label
nz-radio
nzValue=
"img"
>
<span
[
style
]="{
color:question
.
pieType=
='img'
?
'#
169BD5
'
:
'#
000
'}"
>
图片
</span>
</label>
<label
nz-radio
nzValue=
"text"
>
<span
[
style
]="{
color:question
.
pieType=
='text'
?
'#
169BD5
'
:
'#
000
'}"
>
文字
</span>
</label>
<label
nz-radio
nzValue=
"img_text"
>
<span
[
style
]="{
color:question
.
pieType=
='img_text'
?
'#
169BD5
'
:
'#
000
'}"
>
文字+图片
</span>
</label>
</nz-radio-group>
</div>
<div>
<div
class=
"option-img"
>
<div
*
ngIf=
"question.pieType=='img' || question.pieType =='img_text'"
style=
"width: 200px;"
>
<span
style=
"font-size: 20px;"
>
图片:
</span>
<app-upload-image-with-preview
[
picUrl
]="
question
.
pieImage
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,
'
pieImage
',
question
)"
>
</app-upload-image-with-preview>
</div>
<div
name=
"题目错误音频"
>
<span
style=
"font-size: 20px;"
>
题目错误音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
question
.
errorAudio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
errorAudio
',
question
,'
errorAudioName
')"
>
</app-audio-recorder>
</div>
<div
class=
"option-text"
>
<div
*
ngIf=
"question.pieType=='text' || question.pieType =='img_text'"
style=
"width: 1000px"
>
<span
style=
"font-size: 20px;"
>
文本:
</span>
<div
class=
"border-dashed"
style=
"width: 900px;"
>
<h2>
空格分隔选词:
</h2>
<textarea
rows=
"4"
nz-input
[(
ngModel
)]="
question
.
pieText
"
(
blur
)="
changeMain
(
i
,'
pie
')"
></textarea>
</div>
<div
class=
"border-dashed"
style=
"width: 900px;"
>
<h2>
点击文本设置高亮:
</h2>
<span
*
ngFor=
"let cont of question.pieTextArr; let i = index"
style=
"margin-bottom: 5px; "
>
<span
*
ngIf=
"cont.block"
class=
"option-title-line"
(
click
)="
onBlock
(
cont
,
false
)"
[
innerHtml
]="
cont
.
text
"
></span>
<span
*
ngIf=
"!cont.block"
class=
"option-title"
(
click
)="
onBlock
(
cont
,
true
)"
[
innerHtml
]="
cont
.
text
"
></span>
</span>
</div>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ question.errorAudioName}}
</span>
</div>
</div>
</div>
</div>
<div
style=
"margin-left: 10px;"
>
...
...
form/src/app/form/form.component.ts
View file @
ca76b9d7
...
...
@@ -13,40 +13,27 @@ let replaceAll = function (str, s1, s2) {
})
export
class
FormComponent
extends
ComponentBase
implements
OnInit
,
OnChanges
,
OnDestroy
{
// 储存数据用
saveKey
=
"
dg2
8_drag
"
;
saveKey
=
"
dg2
9_museum_1
"
;
item
=
{
npcTitle
:
""
,
npcAudio
:
""
,
npcAudioName
:
""
,
npcAudioEnd
:
""
,
npcAudioEndName
:
""
,
// 开始音频
auidoStart
:
""
,
auidoStartName
:
""
,
// 结束音频
auidoEnd
:
""
,
auidoEndName
:
""
,
// 肉饼引导音频
auidoMeet
:
""
,
auidoMeetName
:
""
,
// 蔬菜引导音频
auidoVegetable
:
""
,
auidoVegetableName
:
""
,
// 第一次完成音频
auidoFinish
:
""
,
auidoFinishName
:
""
,
video
:
''
,
//展示用视频部分
questions
:
[],
questionText
:
""
,
contentMain
:
""
,
contentArr
:
[],
};
constructor
(
public
nzMessageService
:
NzMessageService
,
public
appRef
:
ApplicationRef
,
public
changeDetectorRef
:
ChangeDetectorRef
)
{
super
(
appRef
,
changeDetectorRef
);
}
onVideoUploaded
(
e
)
{
this
.
item
.
video
=
e
.
url
this
.
save
();
}
isVisible
=
false
;
deleteTitle
=
"
是否删除题目
"
;
deleteCallback
=
function
()
{
};
...
...
@@ -70,29 +57,29 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
}
}
removeoption
(
i
,
j
)
{
this
.
openDelete
(
"
确定删除选项?
"
,
()
=>
{
this
.
item
.
questions
[
i
].
options
.
splice
(
j
,
1
);
this
.
save
();
})
}
copyoption
(
i
,
j
)
{
let
data
=
this
.
item
.
questions
[
i
].
options
[
j
];
this
.
item
.
questions
[
i
].
options
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
data
)));
this
.
save
();
}
addoption
(
i
)
{
this
.
item
.
questions
[
i
].
options
.
push
({
type
:
"
img
"
,
image
:
""
,
audio
:
""
,
text
:
""
,
time
:
""
,
right
:
false
});
this
.
save
();
}
//
removeoption(i, j) {
//
this.openDelete("确定删除选项?", () => {
//
this.item.questions[i].options.splice(j, 1);
//
this.save();
//
})
//
}
//
copyoption(i, j) {
//
let data = this.item.questions[i].options[j];
//
this.item.questions[i].options.push(JSON.parse(JSON.stringify(data)));
//
this.save();
//
}
//
addoption(i) {
//
this.item.questions[i].options.push({
//
type: "img",
// image: "",//展示一个图片
// text: "",// 一个标题文字
// audio
: "",
//
time: "",
//
right: false
//
});
//
this.save();
//
}
...
...
@@ -106,27 +93,15 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
addQuestion
()
{
// 题目自带一堆东西不用添加选项部分
this
.
item
.
questions
.
push
({
title
:
""
,
//大标题
mainType
:
""
,
//题干类型
mainText
:
""
,
//题干文字
mainTextArr
:
[],
//题干文字高亮
mainImage
:
""
,
//题干图片
meetType
:
""
,
//肉类型
meetText
:
""
,
//肉文字
meetTextArr
:
[],
//肉文字高亮
meetImage
:
""
,
//肉图片
vegetableType
:
""
,
//菜类型
vegetableText
:
""
,
//菜文字
vegetableTextArr
:
[],
//菜文字高亮
vegetableImage
:
""
,
//菜图片
pieType
:
""
,
//菜类型
pieText
:
""
,
//菜文字
pieTextArr
:
[],
//菜文字高亮
pieImage
:
""
,
//菜图片
img
:
''
,
//展示用图片
title
:
''
,
//大标题
keyword
:
''
,
// 关键字,逗号隔开
startAudio
:
''
,
// 开始音频
startAudioName
:
''
,
rightAudio
:
''
,
// 正确音频
rightAudioName
:
''
,
errorAudio
:
''
,
// 错误音频
errorAudioName
:
''
,
});
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