Commit 1307dcea authored by 李维's avatar 李维

添加连线(专业)题型

parent f693fc6b
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
<nz-option [nzValue]="HOT_ZONE_CHECKBOX" nzLabel="热区选项(多选)"></nz-option> <nz-option [nzValue]="HOT_ZONE_CHECKBOX" nzLabel="热区选项(多选)"></nz-option>
<nz-option [nzValue]="TEXTINPUT" nzLabel="文字输入"></nz-option> <nz-option [nzValue]="TEXTINPUT" nzLabel="文字输入"></nz-option>
<nz-option [nzValue]="CONNECTION" nzLabel="连线组"></nz-option> <nz-option [nzValue]="CONNECTION" nzLabel="连线组"></nz-option>
<nz-option [nzValue]="CONNECTION_PRO" nzLabel="连线(专业)"></nz-option>
<nz-option [nzValue]="RIGHT_OR_WRONG" nzLabel="判断对错"></nz-option> <nz-option [nzValue]="RIGHT_OR_WRONG" nzLabel="判断对错"></nz-option>
<nz-option [nzValue]="CROSSWORD_PUZZLE" nzLabel="纵横字谜"></nz-option> <nz-option [nzValue]="CROSSWORD_PUZZLE" nzLabel="纵横字谜"></nz-option>
<nz-option [nzValue]="SORT_WORDS" nzLabel="单词排序"></nz-option> <nz-option [nzValue]="SORT_WORDS" nzLabel="单词排序"></nz-option>
...@@ -440,6 +441,40 @@ ...@@ -440,6 +441,40 @@
</tr> </tr>
</tbody> </tbody>
</nz-table> </nz-table>
<!-- 连线题 PRO -->
<nz-table *ngIf="it.hotZoneType == CONNECTION_PRO" #contentTable [nzData]="it.contentList" [nzFrontPagination]="false" [nzShowPagination]="false">
<thead>
<tr>
<th nzWidth="100px" nzAlign="center">序号</th>
<th nzWidth="100px" nzAlign="center">分数</th>
<th nzAlign="center">热区起点</th>
<th nzAlign="center">热区终点</th>
<th nzWidth="150px" nzAlign="center">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of contentTable.data; let i = index;">
<td nzWidth="100px" nzAlign="center">{{ i + 1 }}</td>
<td nzWidth="100px" nzAlign="center">
<input type="text" nz-input [(ngModel)]="data.score" (blur)="save()"/>
</td>
<td nzAlign="center">
<nz-select nzShowSearch nzAllowClear [(ngModel)]="data.selectStartHotZoneIndex" style="width: 180px;" (ngModelChange)="save()">
<nz-option *ngFor="let itOption of it.connectionPRO_startArr" [nzValue]="itOption" [nzLabel]="item.hotZoneItemArr[itOption].itemName"></nz-option>
</nz-select>
</td>
<td nzAlign="center">
<nz-select nzShowSearch nzAllowClear [(ngModel)]="data.selectEndHotZoneIndex" style="width: 180px;" (ngModelChange)="save()">
<nz-option *ngFor="let itOption of it.connectionPRO_endArr" [nzValue]="itOption" [nzLabel]="item.hotZoneItemArr[itOption].itemName"></nz-option>
</nz-select>
</td>
<td nzWidth="150px" nzAlign="center">
<a nz-popconfirm nzPopconfirmTitle="删除后不可恢复,确定删除吗?" (nzOnConfirm)="deleteHotZoneConfigItem(it, i)">删除</a>
</td>
</tr>
</tbody>
</nz-table>
<!-- 纵横字谜 --> <!-- 纵横字谜 -->
<nz-table *ngIf="it.hotZoneType == CROSSWORD_PUZZLE" #contentTable [nzData]="it.contentList" [nzFrontPagination]="false" [nzShowPagination]="false"> <nz-table *ngIf="it.hotZoneType == CROSSWORD_PUZZLE" #contentTable [nzData]="it.contentList" [nzFrontPagination]="false" [nzShowPagination]="false">
...@@ -648,13 +683,27 @@ ...@@ -648,13 +683,27 @@
<label nz-checkbox [(ngModel)]="it.painterOnCenter" (ngModelChange)="save()" style="margin-left: 10px;"></label> <label nz-checkbox [(ngModel)]="it.painterOnCenter" (ngModelChange)="save()" style="margin-left: 10px;"></label>
</div> </div>
<div *ngIf="it.hotZoneType != '' && it.hotZoneType != CROSSWORD_PUZZLE && it.hotZoneType != HOT_ZONE_RADIO && it.hotZoneType != HOT_ZONE_CHECKBOX && it.hotZoneType != CONNECTION && it.hotZoneType != CONNECTION_2LEVEL && it.hotZoneType != TEXT_SELECT && it.hotZoneType != MULTIPLE_TEXT_SELECT && it.hotZoneType != RIGHT_OR_WRONG && it.hotZoneType != TEXTINPUT_GROUP" style="margin: 10px 10px;"> <div *ngIf="it.hotZoneType != '' && it.hotZoneType != CROSSWORD_PUZZLE && it.hotZoneType != HOT_ZONE_RADIO && it.hotZoneType != HOT_ZONE_CHECKBOX && it.hotZoneType != CONNECTION && it.hotZoneType != CONNECTION_2LEVEL && it.hotZoneType != CONNECTION_PRO && it.hotZoneType != TEXT_SELECT && it.hotZoneType != MULTIPLE_TEXT_SELECT && it.hotZoneType != RIGHT_OR_WRONG && it.hotZoneType != TEXTINPUT_GROUP" style="margin: 10px 10px;">
<span style="display: inline-block; text-align: right; width: 150px;">关联热区:</span> <span style="display: inline-block; text-align: right; width: 150px;">关联热区:</span>
<nz-select nzShowSearch nzAllowClear [(ngModel)]="it.linkHotZoneIndex" style="width: 300px;" (ngModelChange)="save()"> <nz-select nzShowSearch nzAllowClear [(ngModel)]="it.linkHotZoneIndex" style="width: 300px;" (ngModelChange)="save()">
<nz-option *ngFor="let itOption of item.hotZoneItemArr" [nzValue]="itOption.index" [nzLabel]="itOption.itemName"></nz-option> <nz-option *ngFor="let itOption of item.hotZoneItemArr" [nzValue]="itOption.index" [nzLabel]="itOption.itemName"></nz-option>
</nz-select> </nz-select>
</div> </div>
<div *ngIf="it.hotZoneType == CONNECTION_PRO" style="margin: 10px 10px;">
<span style="display: inline-block; text-align: right; width: 150px;">起点热区:</span>
<nz-select nzShowSearch nzAllowClear [(ngModel)]="it.connectionPRO_startArr" nzMode="multiple" style="width: 300px;" (ngModelChange)="save()">
<nz-option *ngFor="let itOption of item.hotZoneItemArr" [nzValue]="itOption.index" [nzLabel]="itOption.itemName"></nz-option>
</nz-select>
</div>
<div *ngIf="it.hotZoneType == CONNECTION_PRO" style="margin: 10px 10px;">
<span style="display: inline-block; text-align: right; width: 150px;">终点热区:</span>
<nz-select nzShowSearch nzAllowClear [(ngModel)]="it.connectionPRO_endArr" nzMode="multiple" style="width: 300px;" (ngModelChange)="save()">
<nz-option *ngFor="let itOption of item.hotZoneItemArr" [nzValue]="itOption.index" [nzLabel]="itOption.itemName"></nz-option>
</nz-select>
</div>
<div *ngIf="it.hotZoneType == CROSSWORD_PUZZLE || it.hotZoneType == CONNECTION_CHOICE" style="margin: 10px 10px;"> <div *ngIf="it.hotZoneType == CROSSWORD_PUZZLE || it.hotZoneType == CONNECTION_CHOICE" style="margin: 10px 10px;">
<span style="display: inline-block; text-align: right; width: 150px;">已填显示热区:</span> <span style="display: inline-block; text-align: right; width: 150px;">已填显示热区:</span>
<nz-select nzShowSearch nzAllowClear [(ngModel)]="it.linkHotZoneShowIndex" style="width: 300px;" (ngModelChange)="save()"> <nz-select nzShowSearch nzAllowClear [(ngModel)]="it.linkHotZoneShowIndex" style="width: 300px;" (ngModelChange)="save()">
...@@ -662,14 +711,14 @@ ...@@ -662,14 +711,14 @@
</nz-select> </nz-select>
</div> </div>
<div *ngIf="it.hotZoneType == HOT_ZONE_RADIO || it.hotZoneType == HOT_ZONE_CHECKBOX || it.hotZoneType == CONNECTION || it.hotZoneType == CONNECTION_2LEVEL || it.hotZoneType == RIGHT_OR_WRONG || it.hotZoneType == CROSSWORD_PUZZLE || it.hotZoneType == SORT_WORDS || it.hotZoneType == PRONUNCIATION_ASSESSMENT || it.hotZoneType == DRAWING_CHECK || it.hotZoneType == CONNECTION_CHOICE" style="margin: 10px 10px;"> <div *ngIf="it.hotZoneType == HOT_ZONE_RADIO || it.hotZoneType == HOT_ZONE_CHECKBOX || it.hotZoneType == CONNECTION || it.hotZoneType == CONNECTION_2LEVEL || it.hotZoneType == CONNECTION_PRO || it.hotZoneType == RIGHT_OR_WRONG || it.hotZoneType == CROSSWORD_PUZZLE || it.hotZoneType == SORT_WORDS || it.hotZoneType == PRONUNCIATION_ASSESSMENT || it.hotZoneType == DRAWING_CHECK || it.hotZoneType == CONNECTION_CHOICE" style="margin: 10px 10px;">
<span style="display: inline-block; text-align: right; width: 150px;">检查结果显示热区:</span> <span style="display: inline-block; text-align: right; width: 150px;">检查结果显示热区:</span>
<nz-select nzShowSearch nzAllowClear [(ngModel)]="it.linkResultShowHotZoneIndex" style="width: 300px;" (ngModelChange)="save()"> <nz-select nzShowSearch nzAllowClear [(ngModel)]="it.linkResultShowHotZoneIndex" style="width: 300px;" (ngModelChange)="save()">
<nz-option *ngFor="let itOption of item.hotZoneItemArr" [nzValue]="itOption.index" [nzLabel]="itOption.itemName"></nz-option> <nz-option *ngFor="let itOption of item.hotZoneItemArr" [nzValue]="itOption.index" [nzLabel]="itOption.itemName"></nz-option>
</nz-select> </nz-select>
</div> </div>
<div *ngIf="it.hotZoneType != ''&& it.hotZoneType != AUDIO_PLAY && it.hotZoneType != VIDEO_PLAY && it.hotZoneType != DRAWING && it.hotZoneType != HOT_ZONE_CHECKBOX && it.hotZoneType != CONNECTION && it.hotZoneType != CONNECTION_2LEVEL && it.hotZoneType != TEXT_SELECT && it.hotZoneType != MULTIPLE_TEXT_SELECT && it.hotZoneType != RIGHT_OR_WRONG && it.hotZoneType != TEXTINPUT_GROUP" style="margin: 10px 10px;"> <div *ngIf="it.hotZoneType != ''&& it.hotZoneType != AUDIO_PLAY && it.hotZoneType != VIDEO_PLAY && it.hotZoneType != DRAWING && it.hotZoneType != HOT_ZONE_CHECKBOX && it.hotZoneType != CONNECTION && it.hotZoneType != CONNECTION_2LEVEL && it.hotZoneType != CONNECTION_PRO && it.hotZoneType != TEXT_SELECT && it.hotZoneType != MULTIPLE_TEXT_SELECT && it.hotZoneType != RIGHT_OR_WRONG && it.hotZoneType != TEXTINPUT_GROUP" style="margin: 10px 10px;">
<span style="display: inline-block; text-align: right; width: 150px;">分数:</span> <span style="display: inline-block; text-align: right; width: 150px;">分数:</span>
<input type="text" nz-input [(ngModel)]="it.score" (blur)="save()" style="display: inline-block; width: 300px;"> <input type="text" nz-input [(ngModel)]="it.score" (blur)="save()" style="display: inline-block; width: 300px;">
</div> </div>
......
...@@ -60,6 +60,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -60,6 +60,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
DRAWING_CHECK = "15"; DRAWING_CHECK = "15";
CONNECTION_2LEVEL = "16"; CONNECTION_2LEVEL = "16";
MULTIPLE_TEXT_SELECT = "17"; MULTIPLE_TEXT_SELECT = "17";
CONNECTION_PRO = "18";
// 评分体系 // 评分体系
RS_15_5L_FAF = "0"; RS_15_5L_FAF = "0";
...@@ -143,6 +144,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -143,6 +144,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
this.item.hotZoneConfigArr.push({ this.item.hotZoneConfigArr.push({
hotZoneType: "", hotZoneType: "",
linkHotZoneIndex: -1, linkHotZoneIndex: -1,
connectionPRO_startArr: [],
connectionPRO_endtArr: [],
audio_url: "", audio_url: "",
video_url: "", video_url: "",
score: "0", score: "0",
...@@ -491,6 +494,28 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -491,6 +494,28 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
hotZoneIndexErr.push(`内容${hotZoneConfigIndex+1}: 结果显示热区为空`) hotZoneIndexErr.push(`内容${hotZoneConfigIndex+1}: 结果显示热区为空`)
} }
break; break;
case this.CONNECTION_PRO:
hotZoneConfg.contentList.forEach((contentItem, contentIndex) => {
// 分数检查
if(contentItem.score != null && !isNaN(Number(contentItem.score)) && Number(contentItem.score) > 0) {
totalScore += Number(contentItem.score);
} else {
scoreConfigErr.push(`内容${hotZoneConfigIndex+1} - 内容清单${contentIndex+1}: 分数配置为0或者有异常`)
}
// 起点1热区配置检查
if(contentItem.selectStartHotZoneIndex_1 == null || contentItem.selectStartHotZoneIndex_1 == undefined || contentItem.selectStartHotZoneIndex_1 < 0) {
hotZoneIndexErr.push(`内容${hotZoneConfigIndex+1} - 内容清单${contentIndex+1}: 连线起点1热区为空`)
}
// 终点1热区配置检查
if(contentItem.selectEndHotZoneIndex_1 == null || contentItem.selectEndHotZoneIndex_1 == undefined || contentItem.selectEndHotZoneIndex_1 < 0) {
hotZoneIndexErr.push(`内容${hotZoneConfigIndex+1} - 内容清单${contentIndex+1}: 连线终点1热区为空`)
}
});
// 结果显示热区配置检查
if(hotZoneConfg.linkResultShowHotZoneIndex == null || hotZoneConfg.linkResultShowHotZoneIndex == undefined || hotZoneConfg.linkResultShowHotZoneIndex < 0) {
hotZoneIndexErr.push(`内容${hotZoneConfigIndex+1}: 结果显示热区为空`)
}
break;
// 判断对错 // 判断对错
case this.RIGHT_OR_WRONG: case this.RIGHT_OR_WRONG:
hotZoneConfg.contentList.forEach((contentItem, contentIndex) => { hotZoneConfg.contentList.forEach((contentItem, contentIndex) => {
......
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