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
8f7ebc15
Commit
8f7ebc15
authored
Dec 17, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理完成
parent
5a3a9ffe
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
113 deletions
+80
-113
defaultData_dg21_danci.ts
assets/dg21_danci/script/defaultData_dg21_danci.ts
+36
-94
form.component.html
form/src/app/form/form.component.html
+20
-12
form.component.ts
form/src/app/form/form.component.ts
+24
-7
No files found.
assets/dg21_danci/script/defaultData_dg21_danci.ts
View file @
8f7ebc15
export
const
defaultData
=
export
const
defaultData
=
{
{
"
onlineFlg
"
:
false
,
"
title
"
:
""
,
"
questionText
"
:
""
,
"
questionTextAudio
"
:
""
,
"
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
"
:
[
"
questions
"
:
[
{
{
"
questionAudio
"
:
""
,
"
duration
"
:
120
,
"
type
"
:
"
img
"
,
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/751ca480f614575b231814873ef784f5.png
"
,
"
bgItem
"
:
{
"
audio
"
:
""
,
"
text
"
:
""
,
"
right
"
:
false
,
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/b4494456199505bdf990fff96a0c9fb8.jpg
"
,
"
letterList
"
:
[{
"
rect
"
:
{
"
x
"
:
17.111111111111086
,
"
y
"
:
0
,
"
width
"
:
1057.7777777777778
,
"
height
"
:
595
}
"
interference
"
:
false
,
},
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/3656883821fc547da4af0253476ab9be_l.mp3
"
,
"
hotZoneItemArr
"
:
[
"
text
"
:
"
bea
"
,
"
audioName
"
:
"
错误.mp3
"
{
"
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
"
:
"
part3
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
889.89
,
"
y
"
:
-
48.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
},
{
"
interference
"
:
false
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/3656883821fc547da4af0253476ab9be_l.mp3
"
,
"
text
"
:
"
r
"
,
"
audioName
"
:
"
错误.mp3
"
"
index
"
:
3
,
"
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
}
},
{
},
{
"
interference
"
:
true
,
"
audio
"
:
""
,
"
text
"
:
"
f
"
"
index
"
:
4
,
"
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
}
},
{
},
{
"
interference
"
:
true
,
"
audio
"
:
""
,
"
text
"
:
"
n
"
"
index
"
:
5
,
"
text
"
:
"
part6
"
,
"
itemType
"
:
"
text
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
469.89
,
"
y
"
:
-
70.5
,
"
width
"
:
200
,
"
height
"
:
200
}
},
{
},
{
"
interference
"
:
true
,
"
audio
"
:
""
,
"
text
"
:
"
j
"
"
index
"
:
6
,
"
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
}
},
{
},
{
"
interference
"
:
true
,
"
audio
"
:
""
,
"
text
"
:
"
k
"
"
index
"
:
7
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/a5d393ae3c9759211c441f8d3fc69e04.png
"
,
"
itemType
"
:
"
pic
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1.1256510416666667
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
870.89
,
"
y
"
:
294.5
,
"
width
"
:
200
,
"
height
"
:
200
}
}]
}]
},
},
{
{
"
questionAudio
"
:
""
,
"
duration
"
:
120
,
"
type
"
:
"
imgVideo
"
,
"
options
"
:
[],
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/52ba66d9799c67b260bf1c3c635f0c74.png
"
,
"
bgItem
"
:
{
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
false
,
"
letterList
"
:
[{
"
interference
"
:
false
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3
"
,
"
text
"
:
"
b
"
,
"
audioName
"
:
"
正确.mp3
"
},
{
"
interference
"
:
false
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3
"
,
"
text
"
:
"
a
"
,
"
audioName
"
:
"
正确.mp3
"
},
{
"
interference
"
:
false
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3
"
,
"
text
"
:
"
d
"
,
"
audioName
"
:
"
正确.mp3
"
},
{
"
interference
"
:
true
,
"
audio
"
:
""
,
"
text
"
:
"
s
"
},
{
"
interference
"
:
true
,
"
audio
"
:
""
,
"
text
"
:
"
b
"
},
{
"
interference
"
:
true
,
"
audio
"
:
""
,
"
text
"
:
"
g
"
},
{
"
interference
"
:
true
,
"
audio
"
:
""
,
"
text
"
:
"
j
"
}],
"
audioName
"
:
"
正确.mp3
"
"
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
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
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
"
:
50
,
"
fontName
"
:
"
BRLNSR_1
"
,
"
fontColor
"
:
"
#8f3758
"
,
"
fontScale
"
:
0.853125
,
"
imgScale
"
:
1
,
"
mapScale
"
:
0.853125
,
"
rect
"
:
{
"
x
"
:
343.96
,
"
y
"
:
335.5
,
"
width
"
:
200
,
"
height
"
:
200
}
}]
}],
}],
"
bgAudio
"
:
""
,
"
bgAudioName
"
:
""
,
"
audioName
"
:
""
,
"
bgItem
"
:
""
,
"
hotZoneItemArr
"
:
[]
"
titleTxt
"
:
"
test
"
,
"
undefined
"
:
"
create_hy11_paopao.mp3
"
,
"
titleAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/5214110bd03ae60f70e44c2e930f85ca_l.mp3
"
,
"
npcTitle
"
:
"
test
"
,
"
npcAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/5214110bd03ae60f70e44c2e930f85ca_l.mp3
"
,
"
npcAudioName
"
:
"
create_hy11_paopao.mp3
"
,
"
word_count
"
:
"
0
"
,
"
sentence_count
"
:
"
0
"
,
"
zi_count
"
:
"
0
"
,
"
npcAudioText
"
:
"
exit
"
,
"
npcAudioEnd
"
:
"
http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3
"
,
"
npcAudioEndName
"
:
"
正确.mp3
"
}
}
\ No newline at end of file
// {
// "npcAudioText": "退出",
// "npcAudio": "http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2_l.mp3",
// "npcAudioName": "paomo_hy11_plp.mp3",
// "npcAudioEnd": "http://staging-teach.cdn.ireadabc.com/c14938125a52096dc0be9fbbf6638cb2_l.mp3",
// "npcAudioEndName": "paomo_hy11_plp.mp3",
// "onlineFlg": false,
// "title": "",
// "questionText": "",
// "questionTextAudio": "",
// "showKuang": 1,
// "questions": [
// {
// "questionAudio": "",
// "duration": 120,
// "type": "imgVideo",
// "image": "http://staging-teach.cdn.ireadabc.com/e184e067fc931d55fce93c9937a26c51.png",//
// "audio": "http://staging-teach.cdn.ireadabc.com/172fad3743476ac9c668eb8a82d5eca1_l.mp3",
// "text": "",
// "right": false,
// //magical golden stick
// "letterList": [
// {
// "text": "be"
// },
// {
// "text": "e"
// },
// {
// "text": "a"
// },
// {
// "text": "r"
// }
// ]
// },
// {
// "questionAudio": "",
// "duration": 120,
// "type": "imgVideo",
// "image": "http://staging-teach.cdn.ireadabc.com/e921b21c9ac22a623497b79cf849a421.png",
// "audio": "http://staging-teach.cdn.ireadabc.com/172fad3743476ac9c668eb8a82d5eca1_l.mp3",
// "text": "",
// "right": false,
// "letterList": [
// {
// "text": "b"
// },
// {
// "text": "a"
// },
// {
// "text": "d"
// }
// ]
// }
// ],
// "bgAudio": "",
// "bgAudioName": "",
// "audioName": "",
// "npcTitle": "fun",
// }
form/src/app/form/form.component.html
View file @
8f7ebc15
...
@@ -115,11 +115,19 @@
...
@@ -115,11 +115,19 @@
题目{{i+1}}
题目{{i+1}}
</div>
</div>
<div>
<div>
文字字号:
<input
type=
"text"
nz-input
[(
ngModel
)]="
question
.
hotZoneFontObj
.
size
"
(
blur
)="
changeSize
()"
>
</div>
<div>
文字颜色:
<input
type=
"text"
nz-input
[(
ngModel
)]="
question
.
hotZoneFontObj
.
color
"
(
blur
)="
changeSize
()"
>
</div>
</div>
<div
class=
"border-dashed"
style=
"margin: 20px;width: 1200px;"
>
<div
*
ngIf=
"showHotZone"
class=
"border-dashed"
style=
"margin: 20px;width: 1200px;"
>
<h2>
热区配置:
</h2>
<h2>
热区配置:
</h2>
<app-custom-hot-zone
[
bgItem
]="
question
.
bgItem
"
[
hotZoneItemArr
]="
question
.
hotZoneItemArr
"
<app-custom-hot-zone
[
bgItem
]="
question
.
bgItem
"
[
hotZoneItemArr
]="
question
.
hotZoneItemArr
"
(
save
)="
saveHotZone
(
question
,
$
event
)"
>
[
hotZoneFontObj
]="
question
.
hotZoneFontObj
"
(
save
)="
saveHotZone
(
question
,
$
event
)"
>
</app-custom-hot-zone>
</app-custom-hot-zone>
</div>
</div>
...
@@ -140,7 +148,7 @@
...
@@ -140,7 +148,7 @@
<nz-modal
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
null
"
[
nzContent
]="
modalContent
"
[
nzFooter
]="
modalFooter
"
<nz-modal
[(
nzVisible
)]="
isVisible
"
[
nzTitle
]="
null
"
[
nzContent
]="
modalContent
"
[
nzFooter
]="
modalFooter
"
(
nzOnCancel
)="
handleCancel
()"
>
(
nzOnCancel
)="
handleCancel
()"
>
<ng-template
#
modalContent
>
<ng-template
#
modalContent
>
...
@@ -151,5 +159,5 @@
...
@@ -151,5 +159,5 @@
<button
nz-button
nzType=
"default"
(
click
)="
handleCancel
()"
>
取消
</button>
<button
nz-button
nzType=
"default"
(
click
)="
handleCancel
()"
>
取消
</button>
<button
nz-button
nzType=
"primary"
(
click
)="
handleOk
()"
>
确定
</button>
<button
nz-button
nzType=
"primary"
(
click
)="
handleOk
()"
>
确定
</button>
</ng-template>
</ng-template>
</nz-modal>
</nz-modal>
</div>
</div>
\ No newline at end of file
form/src/app/form/form.component.ts
View file @
8f7ebc15
...
@@ -107,7 +107,6 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -107,7 +107,6 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
hotZoneItemArr
:
[],
hotZoneItemArr
:
[],
};
};
constructor
(
public
nzMessageService
:
NzMessageService
,
public
appRef
:
ApplicationRef
,
public
changeDetectorRef
:
ChangeDetectorRef
)
{
constructor
(
public
nzMessageService
:
NzMessageService
,
public
appRef
:
ApplicationRef
,
public
changeDetectorRef
:
ChangeDetectorRef
)
{
super
(
appRef
,
changeDetectorRef
);
super
(
appRef
,
changeDetectorRef
);
}
}
...
@@ -133,6 +132,16 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -133,6 +132,16 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
if
(
this
.
item
.
questions
.
length
==
0
)
{
if
(
this
.
item
.
questions
.
length
==
0
)
{
this
.
addquestion
();
this
.
addquestion
();
}
else
{
this
.
item
.
questions
.
forEach
(
q
=>
{
if
(
!
q
.
hotZoneFontObj
)
{
q
.
hotZoneFontObj
=
{
size
:
50
,
name
:
'
BRLNSR_1
'
,
color
:
'
#8f3758
'
}
}
})
}
}
}
}
...
@@ -179,11 +188,12 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -179,11 +188,12 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
addquestion
()
{
addquestion
()
{
this
.
item
.
questions
.
push
({
this
.
item
.
questions
.
push
({
options
:
[],
options
:
[],
type
:
"
img
"
hotZoneFontObj
:
{
});
size
:
50
,
while
(
this
.
item
.
questions
[
0
].
options
.
length
<
3
)
{
name
:
'
BRLNSR_1
'
,
this
.
addoption
(
0
);
color
:
'
#8f3758
'
}
}
});
this
.
save
();
this
.
save
();
}
}
ngChange
(
i
,
j
)
{
ngChange
(
i
,
j
)
{
...
@@ -203,7 +213,14 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -203,7 +213,14 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
}
}
showHotZone
=
true
changeSize
()
{
this
.
save
();
this
.
showHotZone
=
false
;
setTimeout
(()
=>
{
this
.
showHotZone
=
true
;
},
300
);
}
onDragonBoneSave
(
e
,
item
)
{
onDragonBoneSave
(
e
,
item
)
{
console
.
log
(
e
);
console
.
log
(
e
);
...
...
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