Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg18_tianci
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
dg18_tianci
Commits
5a3a9ffe
Commit
5a3a9ffe
authored
Dec 17, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础拷贝
parent
4b676644
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
89 deletions
+43
-89
.DS_Store
.DS_Store
+0
-0
ComponentBase.ts
form/src/app/form/ComponentBase.ts
+1
-1
form.component.html
form/src/app/form/form.component.html
+37
-49
form.component.ts
form/src/app/form/form.component.ts
+5
-39
No files found.
.DS_Store
View file @
5a3a9ffe
No preview for this file type
form/src/app/form/ComponentBase.ts
View file @
5a3a9ffe
...
...
@@ -9,7 +9,7 @@ export class ComponentBase {
ngOnChanges
()
{
}
ngOnDestroy
()
{
}
constructor
(
p
rivate
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
}
constructor
(
p
ublic
appRef
:
ApplicationRef
,
public
changeDetectorRef
:
ChangeDetectorRef
)
{
}
ngOnInit
()
{
// 获取存储的数据
(
<
any
>
window
).
courseware
.
getData
((
data
)
=>
{
...
...
form/src/app/form/form.component.html
View file @
5a3a9ffe
...
...
@@ -76,9 +76,11 @@
<div
style=
"padding: 10px;background-color: #fff;"
>
<div
class=
"border-dashed"
style=
"margin: 20px;width: 1300px;"
>
<span
style=
"font-size: 20px;"
>
标题:
</span>
<span
style=
"font-size: 20px;"
>
小迪标题:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
npcTitle
"
(
blur
)="
save
()"
>
<span
style=
"font-size: 20px;"
>
npc
音频:
</span>
<span
style=
"font-size: 20px;"
>
小迪开始
音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
item
.
npcAudio
"
...
...
@@ -89,20 +91,22 @@
<span>
{{ item.npcAudioName}}
</span>
</div>
</div>
<span
style=
"font-size: 20px;"
>
小迪结束音频:
</span>
<div
style=
"display:flex ;"
>
<div>
<app-audio-recorder
[
audioUrl
]="
item
.
npcAudioEnd
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
npcAudioEnd
',
item
,'
npcAudioEndName
')"
>
</app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ item.npcAudioEndName}}
</span>
</div>
</div>
<span
style=
"font-size: 20px;"
>
掌握单词数:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
word_count
"
(
blur
)="
save
()"
>
<span
style=
"font-size: 20px;"
>
掌握短语数:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
sentence_count
"
(
blur
)="
save
()"
>
<span
style=
"font-size: 20px;"
>
掌握字数:
</span>
<input
type=
"text"
nz-input
[(
ngModel
)]="
item
.
zi_count
"
(
blur
)="
save
()"
>
</div>
<div
style=
"margin: 20px;width: 1300px;"
>
<div
*
ngFor=
"let question of item.questions; let i = index"
>
<div
style=
"display: flex;margin-top: 20px;"
>
...
...
@@ -111,29 +115,12 @@
题目{{i+1}}
</div>
<div
class=
"option-audio"
>
<div
class=
"word-input-title"
>
结束音频:
</div>
<div
style=
"display: flex"
>
<div>
<app-audio-recorder
[
audioUrl
]="
question
.
audioUrl
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
'
audioUrl
',
question
,'
audioName
')"
>
</app-audio-recorder>
</div>
<div
style=
"margin: 5px"
>
<span>
{{ question.audioName}}
</span>
</div>
</div>
<div
class=
"border-dashed"
style=
"margin: 20px;width: 1200px;"
>
<h2>
热区配置:
</h2>
<app-custom-hot-zone
[
bgItem
]="
question
.
bgItem
"
[
hotZoneItemArr
]="
question
.
hotZoneItemArr
"
[
customTypeGroupArr
]="
customTypeGroupArr
"
(
save
)="
saveHotZone
(
question
,
$
event
)"
>
</app-custom-hot-zone>
</div>
<div
class=
"border-dashed"
style=
"margin: 20px;width: 1200px;"
>
<h2>
热区配置:
</h2>
<app-custom-hot-zone
[
bgItem
]="
question
.
bgItem
"
[
hotZoneItemArr
]="
question
.
hotZoneItemArr
"
(
save
)="
saveHotZone
(
question
,
$
event
)"
>
</app-custom-hot-zone>
</div>
</div>
...
...
@@ -142,26 +129,27 @@
</div>
</div>
<div
style=
"margin-top: 20px;"
>
<button
class=
"btn-blue"
style=
"width: 1300px; height: 50px;"
nz-button
nzType=
"default"
nzDanger
(
click
)="
addquestion
()"
>
+增加题目
</button>
</div>
</div>
<div
style=
"margin-top: 20px;"
>
<button
class=
"btn-blue"
style=
"width: 1300px; height: 50px;"
nz-button
nzType=
"default"
nzDanger
(
click
)="
addquestion
()"
>
+增加题目
</button>
</div>
</div>
</div>
<nz-modal
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
null
"
[
nzContent
]="
modalContent
"
[
nzFooter
]="
modalFooter
"
(
nzOnCancel
)="
handleCancel
()"
>
<ng-template
#
modalContent
>
<p>
{{deleteTitle}}
</p>
</ng-template>
<ng-template
#
modalFooter
>
<button
nz-button
nzType=
"default"
(
click
)="
handleCancel
()"
>
取消
</button>
<button
nz-button
nzType=
"primary"
(
click
)="
handleOk
()"
>
确定
</button>
</ng-template>
</nz-modal>
<nz-modal
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
null
"
[
nzContent
]="
modalContent
"
[
nzFooter
]="
modalFooter
"
(
nzOnCancel
)="
handleCancel
()"
>
<ng-template
#
modalContent
>
<p>
{{deleteTitle}}
</p>
</ng-template>
<ng-template
#
modalFooter
>
<button
nz-button
nzType=
"default"
(
click
)="
handleCancel
()"
>
取消
</button>
<button
nz-button
nzType=
"primary"
(
click
)="
handleOk
()"
>
确定
</button>
</ng-template>
</nz-modal>
</div>
\ No newline at end of file
form/src/app/form/form.component.ts
View file @
5a3a9ffe
...
...
@@ -10,7 +10,7 @@ import { NzMessageService } from 'ng-zorro-antd';
})
export
class
FormComponent
extends
ComponentBase
implements
OnInit
,
OnChanges
,
OnDestroy
{
// 储存数据用
saveKey
=
"
hy05_pintu
"
;
saveKey
=
"
dg18_tianci
"
;
// 1.猫动画可替换。
// 2.文本内容可替换。//字体随内容缩小。
...
...
@@ -96,44 +96,16 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
item
=
{
npcTitle
:
""
,
npcAudio
:
""
,
npcAudioName
:
''
,
tipSwitch
:
1
,
//提示功能开关
tipType
:
"
page
"
,
tipBg
:
''
,
tipPage
:
[{
title
:
''
,
audio
:
''
}],
title
:
""
,
audio
:
""
,
audioName
:
""
,
image
:
''
,
jumpIdx
:
''
,
// endImgAni: {
// ske: {},
// tex: {},
// png: {}
// },
// endImgTitle: "",
points
:
""
,
questionScore
:
0
,
//分数
npcAudioName
:
""
,
npcAudioEnd
:
""
,
npcAudioEndName
:
""
,
questions
:
[],
bgItem
:
''
,
hotZoneItemArr
:
[],
word_count
:
'
0
'
,
sentence_count
:
'
0
'
,
zi_count
:
'
0
'
,
questionText
:
""
,
};
constructor
(
public
nzMessageService
:
NzMessageService
,
public
appRef
:
ApplicationRef
,
public
changeDetectorRef
:
ChangeDetectorRef
)
{
...
...
@@ -157,10 +129,6 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
init
():
void
{
if
(
!
this
.
item
.
npcTitle
)
this
.
item
.
npcTitle
=
''
;
if
(
!
this
.
item
.
npcAudio
)
this
.
item
.
npcAudio
=
''
;
if
(
!
this
.
item
.
npcAudioName
)
this
.
item
.
npcAudioName
=
''
;
if
(
!
this
.
item
.
word_count
)
this
.
item
.
word_count
=
'
0
'
;
if
(
!
this
.
item
.
sentence_count
)
this
.
item
.
sentence_count
=
'
0
'
;
if
(
!
this
.
item
.
zi_count
)
this
.
item
.
zi_count
=
'
0
'
;
console
.
log
(
new
MetaFormCreator
().
create
());
if
(
this
.
item
.
questions
.
length
==
0
)
{
...
...
@@ -191,11 +159,9 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
}
removePage
(
idx
)
{
this
.
item
.
tipPage
.
splice
(
idx
,
1
);
this
.
save
();
}
addPage
()
{
this
.
item
.
tipPage
.
push
({
title
:
""
,
audio
:
""
})
this
.
save
();
}
customRadioChange
(
e
,
item
,
key
)
{
...
...
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