Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_09
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_Game_09
Commits
6e65fe8f
Commit
6e65fe8f
authored
Aug 22, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
749b445b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
99 deletions
+22
-99
package-lock.json
form/package-lock.json
+5
-0
package.json
form/package.json
+2
-1
form.component.html
form/src/app/form/form.component.html
+8
-67
form.component.ts
form/src/app/form/form.component.ts
+7
-31
No files found.
form/package-lock.json
View file @
6e65fe8f
...
...
@@ -13379,6 +13379,11 @@
"decamelize"
:
"^1.2.0"
}
},
"yarn"
:
{
"version"
:
"1.22.19"
,
"resolved"
:
"https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz"
,
"integrity"
:
"sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ=="
},
"yauzl"
:
{
"version"
:
"2.10.0"
,
"resolved"
:
"https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz"
,
...
...
form/package.json
View file @
6e65fe8f
...
...
@@ -28,10 +28,11 @@
"ali-oss"
:
"^6.5.1"
,
"compressing"
:
"^1.5.0"
,
"ng-zorro-antd"
:
"^8.5.2"
,
"rxjs"
:
"~6.5.4"
,
"node-sass"
:
"^4.0.0"
,
"rxjs"
:
"~6.5.4"
,
"spark-md5"
:
"^3.0.0"
,
"tslib"
:
"^1.10.0"
,
"yarn"
:
"^1.22.19"
,
"zone.js"
:
"~0.10.2"
},
"devDependencies"
:
{
...
...
form/src/app/form/form.component.html
View file @
6e65fe8f
...
...
@@ -73,64 +73,29 @@
}
</style>
<div
class=
"model-content"
>
<div
style=
"margin: 20px;width: 1000px;"
class=
"border-solid"
>
<span
style=
"font-size: 20px;"
>
标题:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
title
"
(
blur
)="
save
()"
>
<span
style=
"font-size: 20px;"
>
npc音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
item
.
npcAudio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
npcAudio
',
item
)"
>
</app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ item.npcAudioName }}
</span>
</div>
</div>
</div>
<!-- 题目区 -->
<div
style=
"margin: 20px;width: 1000px;"
>
<div
*
ngFor=
"let question of item.
question
s; let i = index"
>
<div
*
ngFor=
"let question of item.
page
s; let i = index"
>
<div
style=
"display: flex;margin-top: 20px;"
>
<div
class=
"border-solid"
style=
"min-width: 1000px;"
>
<div
class=
"word-type-title"
>
题目{{i+1}}
</div>
<div
style=
"margin-top: 20px;"
>
<div
class=
"word-type-option-title"
>
是否录音:
</div>
<div
style=
"margin-top: 5px;"
>
<nz-radio-group
[(
ngModel
)]="
question
.
isrecord
"
(
ngModelChange
)="
ngChange
()"
>
<label
nz-radio
[
nzValue
]="
0
"
>
<span>
无录音
</span>
</label>
<label
nz-radio
[
nzValue
]="
1
"
>
<span>
需录音
</span>
</label>
</nz-radio-group>
</div>
</div>
<div
class=
"option-text"
>
<div
class=
"word-input-title"
>
<span>
题目文字1
:
</span>
<span>
文字
:
</span>
</div>
<textarea
style=
"font-size: 16px;"
rows=
"2"
nz-input
[(
ngModel
)]="
question
.
text
"
(
blur
)="
save
()"
></textarea>
<div
class=
"word-input-title"
>
<span>
题目文字2:
</span>
</div>
<textarea
style=
"font-size: 16px;"
rows=
"2"
nz-input
[(
ngModel
)]="
question
.
text2
"
(
blur
)="
save
()"
></textarea>
</div>
<div
class=
"option-audio"
>
<div
class=
"word-input-title"
>
题目音频1
:
音频
:
</div>
<div
style=
"display: flex"
>
<div>
<app-audio-recorder
[
audioUrl
]="
question
.
audio
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio
',
question
)"
></app-audio-recorder>
<app-audio-recorder
[
audioUrl
]="
question
.
audio
_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio
_url
',
question
)"
></app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
...
...
@@ -139,37 +104,13 @@
</div>
</div>
</div>
<div
class=
"option-audio"
>
<div
class=
"word-input-title"
>
题目音频2:
</div>
<div
style=
"display: flex"
>
<div>
<app-audio-recorder
[
audioUrl
]="
question
.
audio2
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audio2
',
question
)"
></app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ question.audio2Name}}
</span>
</div>
</div>
</div>
<div>
<span
style=
"font-size: 20px;"
>
图片1:
</span>
<div
style=
"width:300px"
>
<app-upload-image-with-preview
[
picUrl
]="
question
.
image
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,'
image
',
question
)"
></app-upload-image-with-preview>
</div>
</div>
<div>
<span
style=
"font-size: 20px;"
>
图片
2
:
</span>
<span
style=
"font-size: 20px;"
>
图片:
</span>
<div
style=
"width:300px"
>
<app-upload-image-with-preview
[
picUrl
]="
question
.
image2
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,'
image2
',
question
)"
></app-upload-image-with-preview>
<app-upload-image-with-preview
[
picUrl
]="
question
.
pic_url
"
(
imageUploaded
)="
onImageUploadSuccess
($
event
,'
pic_url
',
question
)"
></app-upload-image-with-preview>
</div>
</div>
</div>
<div
style=
"margin:0 20px"
>
<button
class=
"btn-red"
nz-button
nzType=
"default"
nzDanger
(
click
)="
removeQuestion
(
i
)"
>
删除题目
</button>
...
...
form/src/app/form/form.component.ts
View file @
6e65fe8f
...
...
@@ -14,24 +14,9 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
saveKey
=
"
read
"
;
// 储存对象
item
:
any
=
{
score
:
0
,
title
:
''
,
npcAudio
:
''
,
npcAudioName
:
''
,
returnType
:
'
0
'
,
questionText
:
""
,
questionType
:
"
read
"
,
questionTextAudio
:
""
,
questions
:
[],
pages
:
[]
};
// item: any = {
// title: '幸运大转盘',
// questionText: "亲爱的小玩家,游戏马上就要开始啦!请动动手指转动转盘,当转盘停止,注意观察指针指向的魔法图片,并大声说出魔法咒语,魔法咒语正确,你就可以获得一张魔法卡牌。 游戏结束后,根据获得的魔法卡牌数量,你将获得相应的能量石奖励!开始挑战吧!",
// questionTextAudio: "http://staging-teach.cdn.ireadabc.com/18ebee93b3eabcd55649a01366431af7.mp3",
// questions: [],
// };
isVisible
=
false
;
deleteTitle
=
"
是否删除题目
"
;
deleteCallback
=
function
()
{
};
...
...
@@ -49,32 +34,23 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
}
addQuestion
()
{
this
.
item
.
questions
.
push
({
type
:
'
img
'
,
isrecord
:
0
,
audio
:
''
,
audio2
:
''
,
this
.
item
.
pages
.
push
({
pic_url
:
''
,
audio_url
:
''
,
text
:
''
,
text2
:
''
,
image
:
''
,
image2
:
''
,
time
:
null
,
// word: '',
audioName
:
""
,
audio2Name
:
""
,
});
this
.
save
();
}
removeQuestion
(
idx
)
{
this
.
openDelete
(
"
确定删除题目?
"
,
()
=>
{
this
.
item
.
question
s
.
splice
(
idx
,
1
);
this
.
item
.
page
s
.
splice
(
idx
,
1
);
this
.
save
();
})
}
copyQuestion
(
idx
)
{
let
data
=
this
.
item
.
question
s
[
idx
]
this
.
item
.
question
s
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
data
)));
let
data
=
this
.
item
.
page
s
[
idx
]
this
.
item
.
page
s
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
data
)));
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