Commit 8f7ebc15 authored by Tt's avatar Tt

处理完成

parent 5a3a9ffe
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": [
{
"questionAudio": "", "duration": 120, "type": "img",
"image": "http://staging-teach.cdn.ireadabc.com/751ca480f614575b231814873ef784f5.png",
"audio": "", "text": "", "right": false,
"letterList": [{
"interference": false,
"audio": "http://staging-teach.cdn.ireadabc.com/3656883821fc547da4af0253476ab9be_l.mp3",
"text": "bea", "audioName": "错误.mp3"
}, {
"interference": false, "audio": "http://staging-teach.cdn.ireadabc.com/3656883821fc547da4af0253476ab9be_l.mp3", "text": "r", "audioName": "错误.mp3"
}, {
"interference": true, "audio": "", "text": "f"
}, {
"interference": true, "audio": "", "text": "n"
}, {
"interference": true, "audio": "", "text": "j"
}, {
"interference": true, "audio": "", "text": "k"
}]
"type": "img",
"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": "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 }
}, {
"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 }
}, {
"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 }
}, {
"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 }
}, {
"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 }
}, {
"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",
"image": "http://staging-teach.cdn.ireadabc.com/52ba66d9799c67b260bf1c3c635f0c74.png",
"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"
"options": [], "type": "img",
"bgItem": {
"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": "",
"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"
}
// {
// "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",
// }
"bgItem": "", "hotZoneItemArr": []
}
\ No newline at end of file
......@@ -115,11 +115,19 @@
题目{{i+1}}
</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>
<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>
</div>
......@@ -140,16 +148,16 @@
<nz-modal [(nzVisible)]="isVisible" [nzTitle]="null" [nzContent]="modalContent" [nzFooter]="modalFooter"
(nzOnCancel)="handleCancel()">
<nz-modal [(nzVisible)]="isVisible" [nzTitle]="null" [nzContent]="modalContent" [nzFooter]="modalFooter"
(nzOnCancel)="handleCancel()">
<ng-template #modalContent>
<p>{{deleteTitle}}</p>
</ng-template>
<ng-template #modalContent>
<p>{{deleteTitle}}</p>
</ng-template>
<ng-template #modalFooter>
<button nz-button nzType="default" (click)="handleCancel()">取消</button>
<button nz-button nzType="primary" (click)="handleOk()">确定</button>
</ng-template>
</nz-modal>
<ng-template #modalFooter>
<button nz-button nzType="default" (click)="handleCancel()">取消</button>
<button nz-button nzType="primary" (click)="handleOk()">确定</button>
</ng-template>
</nz-modal>
</div>
\ No newline at end of file
......@@ -99,7 +99,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
npcAudioName: "",
npcAudioEnd: "",
npcAudioEndName: "",
questions: [],
......@@ -107,7 +107,6 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
hotZoneItemArr: [],
};
constructor(public nzMessageService: NzMessageService, public appRef: ApplicationRef, public changeDetectorRef: ChangeDetectorRef) {
super(appRef, changeDetectorRef);
}
......@@ -133,6 +132,16 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
if (this.item.questions.length == 0) {
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
addquestion() {
this.item.questions.push({
options: [],
type: "img"
hotZoneFontObj: {
size: 50,
name: 'BRLNSR_1',
color: '#8f3758'
}
});
while (this.item.questions[0].options.length < 3) {
this.addoption(0);
}
this.save();
}
ngChange(i, j) {
......@@ -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) {
console.log(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