Commit c599ca1b authored by yu's avatar yu

1

parent 645e48be
@import '../style/common_mixin.css';
.model-content {
width: 100%;
height: 100%;
......@@ -35,11 +36,11 @@
.border {
width: 450px;
height: 450px;
/* height: 450px; */
border-radius: 20px;
border-style: dashed;
text-align: center;
float: left;
/* float: left; */
margin-left: 10px;
margin-bottom: 10px;
}
......
......@@ -13,21 +13,21 @@
<div>
<div>
<div class="border">
<div style="width: 100%; align-items:center;">
<div class="item-box" style="width: 50%;height:200px; margin-left: 25%; margin-top: 10%;">
<div class="border" style="padding: 50px 0;">
<div style="width: 600px;">
<div class="item-box" style="width: 50%;height:200px; margin-left: 10px;">
<span>猫咪开始引导音频</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.cat.start"
(audioUploaded)="onAudioUploadSuccess($event, picArr.cat,'start')">
</app-audio-recorder>
</div>
<span>猫咪录音引导音频</span>
<!-- <span>猫咪录音引导音频</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.cat.record"
(audioUploaded)="onAudioUploadSuccess($event, picArr.cat,'record')">
</app-audio-recorder>
</div>
</div> -->
<span>猫咪待机音频</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<app-audio-recorder [audioUrl]="picArr.cat.wait"
......@@ -35,7 +35,7 @@
</app-audio-recorder>
</div>
<span>猫咪结束音频</span>
<div style="display: flex; justify-items: center; padding-top: 10px">
<div style="display: flex; justify-items: center; padding-top: 10px;">
<app-audio-recorder [audioUrl]="picArr.cat.finish"
(audioUploaded)="onAudioUploadSuccess($event, picArr.cat,'finish')">
</app-audio-recorder>
......@@ -46,7 +46,7 @@
</div>
</div>
<div>
<!-- <div>
<div class="border">
<div style="width: 100%; align-items:center;">
<div class="item-box" style="width: 50%;height:200px; margin-left: 25%; margin-top: 10%;">
......@@ -72,7 +72,7 @@
</div>
</div>
</div>
</div> -->
<!-- http://localhost:4200/?type=form
一组游戏
一个图片动画
......@@ -82,11 +82,11 @@
不限制组的数量 -->
</div>
<div *ngFor="let item of picArr.list; let i = index">
<div class="border" style="height:500px;">
<div style="width: 100%; align-items:center;">
<div class="border" style="width:600px;">
<div style="width: 100%;">
<!-- <span style="font-weight: 500; font-size: 27px; color: red; ">选项</span> -->
<div class="item-box" style="width: 50%;height:300px; margin-left: 25%; margin-top: 10%;">
<span>文字</span>
<div class="item-box" style=" margin-left: 10px;">
<!-- <span>文字</span>
<input style="width: 80%; margin-bottom: 0.5vw" type="text" nz-input placeholder="" [(ngModel)]="item.title"
(blur)="saveItem()">
<span>选择标红文字</span>
......@@ -109,7 +109,7 @@
{{s}}
</div>
</div>
</div>
</div> -->
<div style="margin-top: 10px;">
<app-upload-dragon-bone style="width: 100%" (save)="onDragonBoneSave($event,item)"
......@@ -118,7 +118,7 @@
</div>
<span>图片</span>
<app-upload-image-with-preview style="width: 100%" [picUrl]="item.bgImg"
<app-upload-image-with-preview style="width: 300px" [picUrl]="item.bgImg"
(imageUploaded)="onImageUploadSuccessByItem($event, item)">
</app-upload-image-with-preview>
......@@ -128,11 +128,38 @@
</div>
<div *ngFor="let obj of item.titleObj; let o = index" style="margin-top:30px">
<!-- <div style="display: flex; justify-items: center; padding-top: 5px"> -->
<div style="border: 1px solid #333333;padding: 50px;">
<div style="margin:10px">
<input style="width: 200px; margin-bottom: 0.5vw" type="text" nz-input placeholder=""
[(ngModel)]="obj.card" (blur)="saveItem()">
</div>
<div class="item-box" style="width: 50%; margin-left: 25%;
margin-top: 30px;">
<div style="margin:10px">
<app-audio-recorder [audioUrl]="obj.audio" (audioUploaded)="onAudioUploadSuccess($event, obj,'audio')">
</app-audio-recorder>
</div>
<div style="margin:10px">
<span>是否标红</span>
<nz-radio-group [(ngModel)]="obj.color">
<label nz-radio nzValue="1"></label>
<label nz-radio nzValue="0"></label>
</nz-radio-group>
</div>
<button style="margin: 10px;" nz-button nzType="danger" (click)="deleteObj(i,o)">
<span>删除文字</span>
</button>
</div>
</div>
<button style="margin: 10px;" nz-button nzType="success" (click)="addObj(i)">
<span>增加文字</span>
</button>
</div>
<div class="item-box" style="width: 50%; margin-left: 25%; margin-top: 30px;">
<button style="margin-bottom: 10px;" nz-button nzType="danger" (click)="deleteItem(i)">
<span>删除</span>
<span>删除题目</span>
</button>
</div>
</div>
......
......@@ -22,7 +22,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
list: [],
};
_item: any;
KEY = 'hw_006';
KEY = 'hw_op52';
errs = [];
// @Input()
......@@ -93,7 +93,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
function Item() {
this.title = "";
this.titleRed = [];
this.titleObj = {};
this.titleObj = [];
this.bgImg = "";
this.wordAudio = "";
this.imgAni = new AniAssets();
......@@ -107,7 +107,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
item.titleObj = item.title.split("").map((s, idx) => {
return {
card: s,
color: item.titleRed[idx] == 1 ? 0 : 1
color: item.titleRed[idx] == 1 ? 0 : 1,
audio: null,
}
})
this.save();
......@@ -182,6 +183,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.save();
}
//添加一对
addObj(i) {
//最多4个
this.picArr.list[i].titleObj.push({
card: '',
color: 0,
audio: null,
})
this.saveItem();
}
deleteObj(i, o) {
this.picArr.list[i].titleObj.splice(o, 1);
this.save();
}
......
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