Commit ca76b9d7 authored by Tt's avatar Tt

表单完成

parent 9233bd21
No preview for this file type
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", "img": "http://staging-teach.cdn.ireadabc.com/f70b6fd256f91a8bc0c4db6a88ad270f.png",
"rect": { "title": "i need something",
"x": 17.111111111111086, "keyword": "Is ok,do,some",
"y": 0, "startAudio": "http://staging-teach.cdn.ireadabc.com/85e58ae784dfc381170ddabead16cac6_l.mp3",
"width": 1057.7777777777778, "startAudioName": "",
"height": 595 "rightAudio": "http://staging-teach.cdn.ireadabc.com/f96310cbadf910738385ceadbfb088a4_l.mp3",
} "rightAudioName": "",
}, "errorAudio": "http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610_l.mp3",
"hotZoneItemArr": [ "errorAudioName": "",
{ "audioName": ""
"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": { "questionText": "", "audioName": ""
"size": 50,
"name": "BRLNSR_1",
"color": "#8f3758"
}
}, {
"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": "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": "",
"hotZoneItemArr": []
} }
...@@ -110,96 +110,8 @@ ...@@ -110,96 +110,8 @@
</div> </div>
</div> </div>
<span style="font-size: 20px;">视频: </span>
<app-upload-video [videoUrl]="item.video" (videoUploaded)="onVideoUploaded($event)"></app-upload-video>
<div name="开始音频">
<span style="font-size: 20px;">开始音频: </span>
<div style="display:flex ;">
<div>
<app-audio-recorder [audioUrl]="item.auidoStart"
(audioUploaded)="onAudioUploadSuccess($event, 'auidoStart')">
</app-audio-recorder>
</div>
<div style="margin: 5px">
<span>{{ item.auidoStartName}}</span>
</div>
</div>
</div>
<div name="结束音频">
<span style="font-size: 20px;">结束音频: </span>
<div style="display:flex ;">
<div>
<app-audio-recorder [audioUrl]="item.auidoEnd" (audioUploaded)="onAudioUploadSuccess($event, 'auidoEnd')">
</app-audio-recorder>
</div>
<div style="margin: 5px">
<span>{{ item.auidoEndName}}</span>
</div>
</div>
</div>
<div name="肉饼引导音频">
<span style="font-size: 20px;">肉饼引导音频: </span>
<div style="display:flex ;">
<div>
<app-audio-recorder [audioUrl]="item.auidoMeet" (audioUploaded)="onAudioUploadSuccess($event, 'auidoMeet')">
</app-audio-recorder>
</div>
<div style="margin: 5px">
<span>{{ item.auidoMeetName}}</span>
</div>
</div>
</div>
<div name="蔬菜引导音频">
<span style="font-size: 20px;">蔬菜引导音频: </span>
<div style="display:flex ;">
<div>
<app-audio-recorder [audioUrl]="item.auidoVegetable"
(audioUploaded)="onAudioUploadSuccess($event, 'auidoVegetable')">
</app-audio-recorder>
</div>
<div style="margin: 5px">
<span>{{ item.auidoVegetableName}}</span>
</div>
</div>
</div>
<div name="第一次完成音频">
<span style="font-size: 20px;">第一次完成音频: </span>
<div style="display:flex ;">
<div>
<app-audio-recorder [audioUrl]="item.auidoFinish"
(audioUploaded)="onAudioUploadSuccess($event, 'auidoFinish')">
</app-audio-recorder>
</div>
<div style="margin: 5px">
<span>{{ item.auidoFinishName}}</span>
</div>
</div>
</div>
<!-- 切换开关
<span style="margin-right: 20px;font-size: 18px;font-weight: bold;">提示开关 </span>
<nz-radio-group [ngModel]="item.tipSwitch" (ngModelChange)="customRadioChange($event, item,'tipSwitch')"
style="font-size: 20px;display: flex; align-items: center; justify-content: left; flex-wrap: wrap;">
<label nz-radio nzValue="1">开</label>
<label nz-radio nzValue="0">关</label>
</nz-radio-group> -->
<!-- 龙骨 <span style="font-size: 20px;">提示动画: </span>
<app-upload-dragon-bone style="width: 100%" (save)="onDragonBoneSave($event,item)"
[skeJsonData]="item.imgAni.ske" [texJsonData]="item.imgAni.tex" [texPngData]="item.imgAni.png">
</app-upload-dragon-bone> -->
<!--图片
<span style="font-size: 20px;">提示背景: </span>
<div style="width:300px">
<app-upload-image-with-preview [picUrl]="item.tipBg"
(imageUploaded)="onImageUploadSuccess($event,'tipBg', item)"></app-upload-image-with-preview>
</div> -->
</div> </div>
...@@ -218,226 +130,69 @@ ...@@ -218,226 +130,69 @@
</div> </div>
</div> </div>
<div name="题干部分" class="border-solid" style="margin-top: 20px;">
<div class="word-type-option-title">
题干类型:
</div>
<div style="margin-top: 5px;">
<nz-radio-group [(ngModel)]="question.mainType" (ngModelChange)="save()">
<label nz-radio nzValue="empty">
<span [style]="{color:question.mainType=='empty' ? '#169BD5':'#000'}"></span>
</label>
<label nz-radio nzValue="img">
<span [style]="{color:question.mainType=='img' ? '#169BD5':'#000'}">图片</span>
</label>
<label nz-radio nzValue="text">
<span [style]="{color:question.mainType=='text' ? '#169BD5':'#000'}">文字</span>
</label>
<label nz-radio nzValue="img_text">
<span [style]="{color:question.mainType=='img_text' ? '#169BD5':'#000'}">文字+图片</span>
</label>
</nz-radio-group>
</div>
<div>
<div class="option-img">
<div *ngIf="question.mainType=='img' || question.mainType =='img_text'" style="width: 200px;">
<span style="font-size: 20px;">图片:</span>
<app-upload-image-with-preview [picUrl]="question.mainImage"
(imageUploaded)="onImageUploadSuccess($event, 'mainImage',question)">
</app-upload-image-with-preview>
</div>
</div>
<div class="option-text">
<div *ngIf="question.mainType=='text' || question.mainType =='img_text'" style="width: 1000px">
<span style="font-size: 20px;">文本:</span>
<div class="border-dashed" style="width: 900px;">
<h2>空格分隔选词:</h2>
<textarea rows="4" nz-input [(ngModel)]="question.mainText" (blur)="changeMain(i,'main')"></textarea>
</div>
<div class="border-dashed" style="width: 900px;"> <div name="题目图片" style="width: 200px;">
<h2>点击文本设置高亮:</h2> <span style="font-size: 20px;">题目图片</span>
<span *ngFor="let cont of question.mainTextArr; let i = index" style="margin-bottom: 5px; "> <app-upload-image-with-preview [picUrl]="question.img"
<span *ngIf="cont.block" class="option-title-line" (click)="onBlock(cont,false)" (imageUploaded)="onImageUploadSuccess($event, 'img',question)">
[innerHtml]="cont.text"></span> </app-upload-image-with-preview>
<span *ngIf="!cont.block" class="option-title" (click)="onBlock(cont,true)"
[innerHtml]="cont.text"></span>
</span>
</div>
</div> </div>
<div name="题目关键字">
<div style="width: 600px">
<span style="font-size: 20px;">题目关键字/句(逗号隔开)</span>
<input type="text" nz-input [(ngModel)]="question.keyword" (blur)="save()">
</div> </div>
</div> </div>
</div>
<div name="肉饼部分" class="border-solid" style="margin-top: 20px;">
<div class="word-type-option-title"> <div name="题目开始音频">
肉饼类型: <span style="font-size: 20px;">题目开始音频: </span>
</div> <div style="display:flex ;">
<div style="margin-top: 5px;">
<nz-radio-group [(ngModel)]="question.meetType" (ngModelChange)="save()">
<label nz-radio nzValue="img">
<span [style]="{color:question.meetType=='img' ? '#169BD5':'#000'}">图片</span>
</label>
<label nz-radio nzValue="text">
<span [style]="{color:question.meetType=='text' ? '#169BD5':'#000'}">文字</span>
</label>
</nz-radio-group>
</div>
<div> <div>
<div class="option-img"> <app-audio-recorder [audioUrl]="question.startAudio"
<div *ngIf="question.meetType=='img' || question.meetType =='img_text'" style="width: 200px;"> (audioUploaded)="onAudioUploadSuccess($event, 'startAudio',question,'startAudioName')">
<span style="font-size: 20px;">图片:</span> </app-audio-recorder>
<app-upload-image-with-preview [picUrl]="question.meetImage"
(imageUploaded)="onImageUploadSuccess($event, 'meetImage',question)">
</app-upload-image-with-preview>
</div>
</div>
<div class="option-text">
<div *ngIf="question.meetType=='text' || question.meetType =='img_text'" style="width: 1000px">
<span style="font-size: 20px;">文本:</span>
<div class="border-dashed" style="width: 900px;">
<h2>空格分隔选词:</h2>
<textarea rows="4" nz-input [(ngModel)]="question.meetText"
(blur)="changeMain(i,'meet')"></textarea>
</div>
<div class="border-dashed" style="width: 900px;">
<h2>点击文本设置高亮:</h2>
<span *ngFor="let cont of question.meetTextArr; let i = index" style="margin-bottom: 5px; ">
<span *ngIf="cont.block" class="option-title-line" (click)="onBlock(cont,false)"
[innerHtml]="cont.text"></span>
<span *ngIf="!cont.block" class="option-title" (click)="onBlock(cont,true)"
[innerHtml]="cont.text"></span>
</span>
</div>
</div> </div>
<div style="margin: 5px">
<span>{{ question.startAudioName}}</span>
</div> </div>
</div> </div>
</div> </div>
<div name="蔬菜部分" class="border-solid" style="margin-top: 20px;"> <div name="题目正确音频">
<span style="font-size: 20px;">题目正确音频: </span>
<div class="word-type-option-title"> <div style="display:flex ;">
蔬菜类型:
</div>
<div style="margin-top: 5px;">
<nz-radio-group [(ngModel)]="question.vegetableType" (ngModelChange)="save()">
<label nz-radio nzValue="img">
<span [style]="{color:question.vegetableType=='img' ? '#169BD5':'#000'}">图片</span>
</label>
<label nz-radio nzValue="text">
<span [style]="{color:question.vegetableType=='text' ? '#169BD5':'#000'}">文字</span>
</label>
</nz-radio-group>
</div>
<div> <div>
<div class="option-img"> <app-audio-recorder [audioUrl]="question.rightAudio"
<div *ngIf="question.vegetableType=='img' || question.vegetableType =='img_text'" (audioUploaded)="onAudioUploadSuccess($event, 'rightAudio',question,'rightAudioName')">
style="width: 200px;"> </app-audio-recorder>
<span style="font-size: 20px;">图片:</span>
<app-upload-image-with-preview [picUrl]="question.vegetableImage"
(imageUploaded)="onImageUploadSuccess($event, 'vegetableImage',question)">
</app-upload-image-with-preview>
</div>
</div>
<div class="option-text">
<div *ngIf="question.vegetableType=='text' || question.vegetableType =='img_text'"
style="width: 1000px">
<span style="font-size: 20px;">文本:</span>
<div class="border-dashed" style="width: 900px;">
<h2>空格分隔选词:</h2>
<textarea rows="4" nz-input [(ngModel)]="question.vegetableText"
(blur)="changeMain(i,'vegetable')"></textarea>
</div>
<div class="border-dashed" style="width: 900px;">
<h2>点击文本设置高亮:</h2>
<span *ngFor="let cont of question.vegetableTextArr; let i = index" style="margin-bottom: 5px; ">
<span *ngIf="cont.block" class="option-title-line" (click)="onBlock(cont,false)"
[innerHtml]="cont.text"></span>
<span *ngIf="!cont.block" class="option-title" (click)="onBlock(cont,true)"
[innerHtml]="cont.text"></span>
</span>
</div>
</div> </div>
<div style="margin: 5px">
<span>{{ question.rightAudioName}}</span>
</div> </div>
</div> </div>
</div> </div>
<div name="面饼部分" class="border-solid" style="margin-top: 20px;"> <div name="题目错误音频">
<span style="font-size: 20px;">题目错误音频: </span>
<div class="word-type-option-title"> <div style="display:flex ;">
面饼类型:
</div>
<div style="margin-top: 5px;">
<nz-radio-group [(ngModel)]="question.pieType" (ngModelChange)="save()">
<label nz-radio nzValue="img">
<span [style]="{color:question.pieType=='img' ? '#169BD5':'#000'}">图片</span>
</label>
<label nz-radio nzValue="text">
<span [style]="{color:question.pieType=='text' ? '#169BD5':'#000'}">文字</span>
</label>
<label nz-radio nzValue="img_text">
<span [style]="{color:question.pieType=='img_text' ? '#169BD5':'#000'}">文字+图片</span>
</label>
</nz-radio-group>
</div>
<div> <div>
<div class="option-img"> <app-audio-recorder [audioUrl]="question.errorAudio"
<div *ngIf="question.pieType=='img' || question.pieType =='img_text'" style="width: 200px;"> (audioUploaded)="onAudioUploadSuccess($event, 'errorAudio',question,'errorAudioName')">
<span style="font-size: 20px;">图片:</span> </app-audio-recorder>
<app-upload-image-with-preview [picUrl]="question.pieImage"
(imageUploaded)="onImageUploadSuccess($event, 'pieImage',question)">
</app-upload-image-with-preview>
</div>
</div>
<div class="option-text">
<div *ngIf="question.pieType=='text' || question.pieType =='img_text'" style="width: 1000px">
<span style="font-size: 20px;">文本:</span>
<div class="border-dashed" style="width: 900px;">
<h2>空格分隔选词:</h2>
<textarea rows="4" nz-input [(ngModel)]="question.pieText"
(blur)="changeMain(i,'pie')"></textarea>
</div>
<div class="border-dashed" style="width: 900px;">
<h2>点击文本设置高亮:</h2>
<span *ngFor="let cont of question.pieTextArr; let i = index" style="margin-bottom: 5px; ">
<span *ngIf="cont.block" class="option-title-line" (click)="onBlock(cont,false)"
[innerHtml]="cont.text"></span>
<span *ngIf="!cont.block" class="option-title" (click)="onBlock(cont,true)"
[innerHtml]="cont.text"></span>
</span>
</div>
</div> </div>
<div style="margin: 5px">
<span>{{ question.errorAudioName}}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div style="margin-left: 10px;"> <div style="margin-left: 10px;">
......
...@@ -13,7 +13,7 @@ let replaceAll = function (str, s1, s2) { ...@@ -13,7 +13,7 @@ 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 = "dg28_drag"; saveKey = "dg29_museum_1";
item = { item = {
npcTitle: "", npcTitle: "",
npcAudio: "", npcAudio: "",
...@@ -21,32 +21,19 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O ...@@ -21,32 +21,19 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
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();
} }
......
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