Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DG23
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
DG23
Commits
7cd01494
Commit
7cd01494
authored
Nov 21, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 表单修改
parent
ec8f0cf6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
33 deletions
+70
-33
form-group.component.ts
form/src/app/common/form-group/form-group.component.ts
+0
-17
form.component.html
form/src/app/form/form.component.html
+21
-6
form.component.ts
form/src/app/form/form.component.ts
+49
-10
No files found.
form/src/app/common/form-group/form-group.component.ts
View file @
7cd01494
...
...
@@ -16,19 +16,6 @@ export class FormGroupComponent implements OnDestroy, OnChanges {
@
Input
()
isChildren
=
false
;
uploading
=
false
;
progress
=
0
;
@
Input
()
btnName
=
'
配置龙骨动画
'
;
@
Input
()
animaNames
=
[];
@
Input
()
skeJsonData
=
{};
@
Input
()
texJsonData
=
{};
@
Input
()
texPngData
=
{};
@
Output
()
save
=
new
EventEmitter
();
...
...
@@ -46,11 +33,7 @@ export class FormGroupComponent implements OnDestroy, OnChanges {
uploadUrl
;
uploadData
;
animaPanelVisible
=
false
;
isSkeJsonLoading
=
false
;
isTexJsonLoading
=
false
;
isTexPngLoading
=
false
;
constructor
(
private
appRef
:
ApplicationRef
,
private
nzMessageService
:
NzMessageService
)
{
...
...
form/src/app/form/form.component.html
View file @
7cd01494
...
...
@@ -90,13 +90,28 @@
<div
style=
"margin-bottom: 10px;"
>
<h1>
整体设置:
</h1>
<app-form-group
[
group_arr
]="
item
.
global_setting
||
[]"
(
uploadDirector
)="
uploadDirectorFinishGlobal
($
event
)"
(
save
)="
saveFormGroupGlobal
($
event
)"
>
</app-form-group>
</div>
<app-form-group
[
group_arr
]="
item
.
group_arr
||
[]"
(
uploadDirector
)="
uploadDirectorFinish
($
event
)"
(
save
)="
saveFormGroup
($
event
)"
>
</app-form-group>
<div
style=
"margin-top: 50px;"
>
<h1>
内容数据:
</h1>
<app-form-group
[
group_arr
]="
item
.
group_arr
||
[]"
(
uploadDirector
)="
uploadDirectorFinish
($
event
)"
(
save
)="
saveFormGroup
($
event
)"
>
</app-form-group>
</div>
<!-- <div style="margin-top: 30px;">
<button nz-button nzType="dashed" (click)="addGroupBtnClick()"
...
...
form/src/app/form/form.component.ts
View file @
7cd01494
...
...
@@ -36,21 +36,33 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
uploadData
=
{};
bytes
=
1024
;
root_group_arr
=
[];
myContent
=
`
注释:
(最多可添加两个大组)
文本-1: 第一组大标题
图片-1: 第一组大图
子项组-1: 所有的小泡泡集合
-> 文本-1: 第一个小泡泡文本
-> 图片-1: 第一个小泡泡图片
整体设置:
(只添加一个大组)
文本-1: 结束按钮文本
音频-1: 开始引导音频
音频-2: 结束引导音频
内容数据:
(有几道题添加几个大组)
组-1:第一题
文本-1: 第一组中间泡泡的文字
图片-1: 第一组中间泡泡的图片
子项组-1: 左右瓶子的图片和文字 (可能只有一个瓶子)
-> 文本-1: 左边瓶子文本
-> 图片-1: 左边瓶子图片
-> 文本-2: 右边瓶子文本
-> 图片-2: 右边瓶子图片
... (以此类推)
-> 文本-2: 第二个小泡泡文本
-> 图片-2: 第二个小泡泡图片
... (以此类推)
`
constructor
(
private
appRef
:
ApplicationRef
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
...
...
@@ -109,6 +121,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
this
.
item
.
group_arr
=
[];
}
if
(
!
this
.
item
.
global_setting
)
{
this
.
item
.
global_setting
=
[];
}
}
...
...
@@ -165,6 +180,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
}
async
uploadDirectorFinish
(
e
)
{
console
.
log
(
"
in uploadDirectorFinish data:
"
,
e
);
const
textArr
=
this
.
getTextArr
(
e
,
'
1
'
);
...
...
@@ -384,6 +402,27 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
}
saveFormGroupGlobal
(
e
)
{
console
.
log
(
"
root e:
"
,
e
);
this
.
item
.
global_setting
=
e
;
this
.
save
();
}
async
uploadDirectorFinishGlobal
(
e
)
{
console
.
log
(
"
in uploadDirectorFinishRoot data:
"
,
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