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
Expand all
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
=
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
"
,
"
npcTitle
"
:
"
exit
"
,
"
npcAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3
"
,
"
npcAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/5f4e4c72671607bb35d1ecd1d291f238_l.mp3
"
,
"
npcAudioName
"
:
"
boom_dg28_drag.mp3
"
,
"
npcAudioName
"
:
""
,
"
npcAudioEnd
"
:
"
http://staging-teach.cdn.ireadabc.com/289fe0a6d9893519c3fb5993b86b6fe9_l.mp3
"
,
"
npcAudioEnd
"
:
"
http://staging-teach.cdn.ireadabc.com/85e58ae784dfc381170ddabead16cac6_l.mp3
"
,
"
npcAudioEndName
"
:
"
dragdown_dg28_drag.mp3
"
,
"
npcAudioEndName
"
:
""
,
"
video
"
:
"
http://staging-teach.cdn.ireadabc.com/aca65e37c239f95496a8c39fe1374fc4.mp4
"
,
"
questions
"
:
[
"
questions
"
:
[
{
{
"
options
"
:
[
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/b4494456199505bdf990fff96a0c9fb8.jpg
"
,
{
"
title
"
:
"
this is first question on this world?
"
,
"
audio
"
:
""
,
"
hotZoneItemArr
"
:
[],
"
bgItem
"
:
""
,
"
right
"
:
false
"
keyword
"
:
"
hello,world,good,info
"
,
},
{
"
startAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610_l.mp3
"
,
"
audio
"
:
""
,
"
hotZoneItemArr
"
:
[],
"
bgItem
"
:
""
,
"
right
"
:
false
"
startAudioName
"
:
""
,
},
{
"
rightAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/289fe0a6d9893519c3fb5993b86b6fe9_l.mp3
"
,
"
audio
"
:
""
,
"
hotZoneItemArr
"
:
[],
"
bgItem
"
:
""
,
"
right
"
:
false
"
rightAudioName
"
:
""
,
}
"
errorAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/f96310cbadf910738385ceadbfb088a4_l.mp3
"
,
],
"
errorAudioName
"
:
""
,
"
type
"
:
"
img
"
,
"
audioName
"
:
""
"
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
"
}
},
{
},
{
"
options
"
:
[],
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/f70b6fd256f91a8bc0c4db6a88ad270f.png
"
,
"
type
"
:
"
img
"
,
"
title
"
:
"
i need something
"
,
"
bgItem
"
:
{
"
keyword
"
:
"
Is ok,do,some
"
,
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/9ecda2ef223dfc255a17522110fc7ee2.png
"
,
"
startAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/85e58ae784dfc381170ddabead16cac6_l.mp3
"
,
"
rect
"
:
{
"
startAudioName
"
:
""
,
"
x
"
:
152.03542234332423
,
"
rightAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/f96310cbadf910738385ceadbfb088a4_l.mp3
"
,
"
y
"
:
0
,
"
rightAudioName
"
:
""
,
"
width
"
:
787.9291553133515
,
"
errorAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610_l.mp3
"
,
"
height
"
:
595
"
errorAudioName
"
:
""
,
}
"
audioName
"
:
""
},
"
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
"
}
}],
}],
"
bgItem
"
:
""
,
"
questionText
"
:
""
,
"
audioName
"
:
""
"
hotZoneItemArr
"
:
[]
}
}
form/src/app/form/form.component.html
View file @
ca76b9d7
This diff is collapsed.
Click to expand it.
form/src/app/form/form.component.ts
View file @
ca76b9d7
...
@@ -13,40 +13,27 @@ let replaceAll = function (str, s1, s2) {
...
@@ -13,40 +13,27 @@ let replaceAll = function (str, s1, s2) {
})
})
export
class
FormComponent
extends
ComponentBase
implements
OnInit
,
OnChanges
,
OnDestroy
{
export
class
FormComponent
extends
ComponentBase
implements
OnInit
,
OnChanges
,
OnDestroy
{
// 储存数据用
// 储存数据用
saveKey
=
"
dg2
8_drag
"
;
saveKey
=
"
dg2
9_museum_1
"
;
item
=
{
item
=
{
npcTitle
:
""
,
npcTitle
:
""
,
npcAudio
:
""
,
npcAudio
:
""
,
npcAudioName
:
""
,
npcAudioName
:
""
,
npcAudioEnd
:
""
,
npcAudioEnd
:
""
,
npcAudioEndName
:
""
,
npcAudioEndName
:
""
,
// 开始音频
video
:
''
,
//展示用视频部分
auidoStart
:
""
,
auidoStartName
:
""
,
// 结束音频
auidoEnd
:
""
,
auidoEndName
:
""
,
// 肉饼引导音频
auidoMeet
:
""
,
auidoMeetName
:
""
,
// 蔬菜引导音频
auidoVegetable
:
""
,
auidoVegetableName
:
""
,
// 第一次完成音频
auidoFinish
:
""
,
auidoFinishName
:
""
,
questions
:
[],
questions
:
[],
questionText
:
""
,
questionText
:
""
,
contentMain
:
""
,
contentArr
:
[],
};
};
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
);
}
}
onVideoUploaded
(
e
)
{
this
.
item
.
video
=
e
.
url
this
.
save
();
}
isVisible
=
false
;
isVisible
=
false
;
deleteTitle
=
"
是否删除题目
"
;
deleteTitle
=
"
是否删除题目
"
;
deleteCallback
=
function
()
{
};
deleteCallback
=
function
()
{
};
...
@@ -70,29 +57,29 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -70,29 +57,29 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
}
}
}
}
removeoption
(
i
,
j
)
{
//
removeoption(i, j) {
this
.
openDelete
(
"
确定删除选项?
"
,
()
=>
{
//
this.openDelete("确定删除选项?", () => {
this
.
item
.
questions
[
i
].
options
.
splice
(
j
,
1
);
//
this.item.questions[i].options.splice(j, 1);
this
.
save
();
//
this.save();
})
//
})
}
//
}
copyoption
(
i
,
j
)
{
//
copyoption(i, j) {
let
data
=
this
.
item
.
questions
[
i
].
options
[
j
];
//
let data = this.item.questions[i].options[j];
this
.
item
.
questions
[
i
].
options
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
data
)));
//
this.item.questions[i].options.push(JSON.parse(JSON.stringify(data)));
this
.
save
();
//
this.save();
}
//
}
addoption
(
i
)
{
//
addoption(i) {
this
.
item
.
questions
[
i
].
options
.
push
({
//
this.item.questions[i].options.push({
type
:
"
img
"
,
//
type: "img",
image
:
""
,
// image: "",//展示一个图片
audio
:
""
,
// text: "",// 一个标题文字
text
:
""
,
// audio
: "",
time
:
""
,
//
time: "",
right
:
false
//
right: false
});
//
});
this
.
save
();
//
this.save();
}
//
}
...
@@ -106,27 +93,15 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
...
@@ -106,27 +93,15 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
addQuestion
()
{
addQuestion
()
{
// 题目自带一堆东西不用添加选项部分
// 题目自带一堆东西不用添加选项部分
this
.
item
.
questions
.
push
({
this
.
item
.
questions
.
push
({
title
:
""
,
//大标题
img
:
''
,
//展示用图片
mainType
:
""
,
//题干类型
title
:
''
,
//大标题
mainText
:
""
,
//题干文字
keyword
:
''
,
// 关键字,逗号隔开
mainTextArr
:
[],
//题干文字高亮
startAudio
:
''
,
// 开始音频
mainImage
:
""
,
//题干图片
startAudioName
:
''
,
rightAudio
:
''
,
// 正确音频
meetType
:
""
,
//肉类型
rightAudioName
:
''
,
meetText
:
""
,
//肉文字
errorAudio
:
''
,
// 错误音频
meetTextArr
:
[],
//肉文字高亮
errorAudioName
:
''
,
meetImage
:
""
,
//肉图片
vegetableType
:
""
,
//菜类型
vegetableText
:
""
,
//菜文字
vegetableTextArr
:
[],
//菜文字高亮
vegetableImage
:
""
,
//菜图片
pieType
:
""
,
//菜类型
pieText
:
""
,
//菜文字
pieTextArr
:
[],
//菜文字高亮
pieImage
:
""
,
//菜图片
});
});
this
.
save
();
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