Commit 7cd01494 authored by limingzhe's avatar limingzhe

fix: 表单修改

parent ec8f0cf6
......@@ -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) {
......
......@@ -91,12 +91,27 @@
<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>
<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()"
......
......@@ -36,21 +36,33 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
uploadData = {};
bytes = 1024;
root_group_arr = [];
myContent = `
注释:
(最多可添加两个大组)
文本-1: 第一组大标题
图片-1: 第一组大图
整体设置:
(只添加一个大组)
文本-1: 结束按钮文本
音频-1: 开始引导音频
音频-2: 结束引导音频
内容数据:
(有几道题添加几个大组)
组-1:第一题
文本-1: 第一组中间泡泡的文字
图片-1: 第一组中间泡泡的图片
子项组-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);
}
/**
* 储存数据
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment