Commit 929dfd03 authored by 李维's avatar 李维

添加文字输入组题型

parent 1cb77cb0
...@@ -24,6 +24,7 @@ const RIGHT_OR_WRONG = "8"; ...@@ -24,6 +24,7 @@ const RIGHT_OR_WRONG = "8";
const CROSSWORD_PUZZLE = "9"; const CROSSWORD_PUZZLE = "9";
const SORT_WORDS = "10"; const SORT_WORDS = "10";
const CONNECTION_CHOICE = "11"; const CONNECTION_CHOICE = "11";
const TEXTINPUT_GROUP = "12";
// 评分体系 // 评分体系
const RS_15_5L_FAF = "0"; const RS_15_5L_FAF = "0";
...@@ -561,6 +562,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -561,6 +562,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
validater = this.setConnectionChoice(configItem, isDebug); validater = this.setConnectionChoice(configItem, isDebug);
this.scoreValidater.push(validater); this.scoreValidater.push(validater);
break; break;
// 文字输入区
case TEXTINPUT_GROUP:
validater = this.setTextInputGroup(configItem, isDebug);
this.scoreValidater.push(validater);
break;
} }
}); });
...@@ -1761,7 +1767,6 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1761,7 +1767,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
return validater return validater
} }
// 设置文字输入热区 // 设置文字输入热区
setTextInput(contentData, hotZoneItemData, debugMode=false) { setTextInput(contentData, hotZoneItemData, debugMode=false) {
const resultRect = this.newRectNode(hotZoneItemData, layer_2, debugMode); const resultRect = this.newRectNode(hotZoneItemData, layer_2, debugMode);
...@@ -1875,6 +1880,130 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1875,6 +1880,130 @@ export default class SceneComponent extends MyCocosSceneComponent {
return validater return validater
} }
// 设置文字输入组
setTextInputGroup(contentData, debugMode=false) {
const allInputResults = [];
let validater = () => {
const allMatchedIndex = [];
const results = [];
allInputResults.forEach(resultItem => {
let right = false;
let userInputText = resultItem.detail.currentInputText;
contentData.contentList.forEach((option, index) => {
if(!right) {
let configInputText = option.inputText;
if(option.keyWordMatch) {
// 关键词匹配,只有回答文字中包含全部关键词,就算对
right = this.fuzzyMatchingString(userInputText, configInputText, option.isCaseInsensitive);
} else if(option.openAnswer) {
// 开放型回答 只要有内容就算对
right = userInputText != "";
} else {
// 除特殊配置, 默认进行缩写通配符替换
if(!option.notAdaptContraction) {
userInputText = this.adaptContraction(userInputText);
configInputText = this.adaptContraction(configInputText);
}
if(option.isCaseInsensitive) {
// 不区分大小写
right = userInputText.toLowerCase().trim() == configInputText.toLowerCase().trim();
} else {
// 区分大小写 完全相等
right = userInputText.trim() == configInputText.trim();
}
}
// 检查当前匹配成功的答案 是否有其他选项匹配过
if(allMatchedIndex.indexOf(index) != -1) {
right = false;
}
if(right) {
// 正确 返回分数
allMatchedIndex.push(index); // 将匹配成功的序号放进数组
resultItem.detail.correctText = option.inputText;
resultItem.score = option.score && !isNaN(Number(option.score)) ? Number(option.score) : 0;
results.push(resultItem)
}
}
})
if(!right) {
// 如果遍历了所有答案一轮也没有找到符合的正确答案,则为错误
resultItem.allRight = false;
resultItem.detail.right = false;
results.push(resultItem)
}
})
return results
}
contentData.contentList.forEach((option, index) => {
const hotZoneItemData = this.data.hotZoneItemArr[option.selectHotZoneIndex];
const resultRect = this.newRectNode(hotZoneItemData, layer_2, debugMode);
this.newDecorativeFrame(hotZoneItemData, layer_1, "#FFFFFF", "#6dbef6", debugMode);
const rect = this.newRectNode(hotZoneItemData, layer_4, debugMode);
const result = {
detail: {
contentType: TEXTINPUT_GROUP,
configIndex: contentData.index,
contentIndex: -1,
currentInputText: "",
correctText: "",
right: true
},
configIndex: contentData.index,
rect: resultRect,
allRight: true,
score: 0
}
allInputResults.push(result);
rect.on("click", async () => {
if(this.submitted) {
return;
}
this.currentInputTarget = rect;
const optionList = [];
contentData.contentList.forEach(option => {
optionList.push({
label: option.text,
value: option.text
})
});
// 取得上次输入文字 传到键盘中 作为默认显示 - 清空当前文字节点
let lastText = "";
if(rect.cleanLast) {
lastText = rect.cleanLast()
}
let text = await this.asyncShowKeyboardModal(lastText);
const inputLabel = this.newInputTextNode(text, 0);
inputLabel.x = rect.width / 2;
inputLabel.y = rect.height / 2;
result.detail.currentInputText = text;
// 更新清除方法
rect.cleanLast = () => {
inputLabel.destroy();
return text;
}
// 校验必须在上面更新了校验器之后进行 否则本次选择不会生效
// this.checkCanSubmit();
rect.addChild(inputLabel);
})
});
return validater
}
// 设置单词排序题 // 设置单词排序题
setSortWords(contentData, hotZoneItemData, debugMode=false) { setSortWords(contentData, hotZoneItemData, debugMode=false) {
// 该题型需要配置一个显示正确错误符号的热区 // 该题型需要配置一个显示正确错误符号的热区
......
export const defaultData = {"footer_image_url":"http://teach.cdn.ireadabc.com/665e4c3e6a80563b4c33dd7bbcd18014.jpg","header_image_url":"http://teach.cdn.ireadabc.com/3d34a2df8c2868b266069b8157526cc0.jpg","bgItem":{"url":"http://teach.cdn.ireadabc.com/b900d0ffe103e32fb4b4dd054fc11a5f.jpg","rect":{"x":0,"y":1655.5013888888889,"width":1351,"height":1684.9972222222223}},"hotZoneItemArr":[{"index":0,"itemType":"rect","itemName":"1-2-1bike","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":384.58,"y":280.11,"width":64.89,"height":32.45}},{"index":1,"itemType":"rect","itemName":"1-2-2kite","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":470.56,"y":280.11,"width":59.48,"height":32.45}},{"index":2,"itemType":"rect","itemName":"正确","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":315.36,"y":280.11,"width":32.45,"height":32.45}},{"index":3,"itemType":"rect","itemName":"1-3-1car","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":612.77,"y":280.11,"width":54.08,"height":32.45}},{"index":4,"itemType":"rect","itemName":"1-3-2game","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":686.32,"y":280.11,"width":86.52,"height":32.45}},{"index":5,"itemType":"rect","itemName":"正确","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":548.97,"y":280.11,"width":32.45,"height":32.45}},{"index":6,"itemType":"rect","itemName":"1-4-1doll","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":845.3,"y":280.11,"width":54.08,"height":32.45}},{"index":7,"itemType":"rect","itemName":"1-4-2ball","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":925.33,"y":279.03,"width":64.89,"height":32.45}},{"index":8,"itemType":"rect","itemName":"正确","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":779.33,"y":280.11,"width":32.45,"height":32.45}},{"index":9,"itemType":"rect","itemName":"1-5-1train","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":1075.12,"y":279.03,"width":70.3,"height":32.45}},{"index":10,"itemType":"rect","itemName":"1-5-2puzzle","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":1171.38,"y":280.11,"width":94.09,"height":32.45}},{"index":11,"itemType":"rect","itemName":"正确","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":1010.77,"y":279.03,"width":32.45,"height":32.45}},{"index":12,"itemType":"rect","itemName":"2-2doll","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":389.98,"y":542.92,"width":216.3,"height":32.45}},{"index":13,"itemType":"rect","itemName":"2-3scooter ","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":389.98,"y":640.26,"width":216.3,"height":32.45}},{"index":14,"itemType":"rect","itemName":"2-4eddy bear","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":389.98,"y":737.59,"width":216.3,"height":32.45}},{"index":15,"itemType":"rect","itemName":"2-5bike","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":387.82,"y":834.93,"width":216.3,"height":32.45}},{"index":16,"itemType":"rect","itemName":"2-2连娃娃","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":621.43,"y":544,"width":32.45,"height":32.45}},{"index":17,"itemType":"rect","itemName":"娃娃","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":1031.32,"y":498.58,"width":32.45,"height":32.45}},{"index":18,"itemType":"rect","itemName":"2-3滑板车","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":621.43,"y":641.34,"width":32.45,"height":32.45}},{"index":19,"itemType":"rect","itemName":"滑板车","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":767.43,"y":780.85,"width":32.45,"height":32.45}},{"index":20,"itemType":"rect","itemName":"2-4泰迪熊","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":622.51,"y":739.75,"width":32.45,"height":32.45}},{"index":21,"itemType":"rect","itemName":"泰迪熊","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":794.47,"y":489.93,"width":32.45,"height":32.45}},{"index":22,"itemType":"rect","itemName":"2-5自行车","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":621.43,"y":836.01,"width":32.45,"height":32.45}},{"index":23,"itemType":"rect","itemName":"自行车","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":1029.16,"y":695.41,"width":32.45,"height":32.45}},{"index":24,"itemType":"rect","itemName":"正确","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":38.49,"y":383.94,"width":32.45,"height":32.45}},{"index":25,"itemType":"rect","itemName":"3-2Yes, it is","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":573.84,"y":1089.08,"width":216.3,"height":32.45}},{"index":26,"itemType":"rect","itemName":"3-2正确","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":87.16,"y":1089.08,"width":32.45,"height":32.45}},{"index":27,"itemType":"rect","itemName":"3-3This is my kite.","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":573.84,"y":1149.65,"width":292.01,"height":32.45}},{"index":28,"itemType":"rect","itemName":"3-3正确","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":87.16,"y":1148.57,"width":32.45,"height":32.45}},{"index":29,"itemType":"rect","itemName":"3-4Is this your game?","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":573.84,"y":1206.97,"width":356.9,"height":32.45}},{"index":30,"itemType":"rect","itemName":"3-4正确","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":87.16,"y":1205.89,"width":32.45,"height":32.45}},{"index":31,"itemType":"rect","itemName":"3-5No, it isn’t.","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":573.84,"y":1266.45,"width":216.3,"height":32.45}},{"index":32,"itemType":"rect","itemName":"3-5正确","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":87.16,"y":1264.29,"width":32.45,"height":32.45}},{"index":33,"itemType":"rect","itemName":"4-2isn't","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":652.79,"y":1481.67,"width":140.6,"height":32.45}},{"index":34,"itemType":"rect","itemName":"4-3it isn't","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":627.92,"y":1538.99,"width":302.82,"height":32.45}},{"index":35,"itemType":"rect","itemName":"4-4it is","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.05546875,"imgScale":1,"mapScale":1.05546875,"rect":{"x":627.92,"y":1598.48,"width":302.82,"height":32.45}}],"hotZoneConfigArr":[{"hotZoneType":"3","linkHotZoneIndex":-1,"audio_url":"","score":"1","unselectedStyle":"mask","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"","contentList":[{"uuid":"1c69d1f6-3e7c-4296-8f0e-b06c35e08605","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"selectHotZoneIndex":0},{"uuid":"fffd9d13-0c9d-4851-beea-59ef6d850fa4","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":true,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"selectHotZoneIndex":1}],"linkResultShowHotZoneIndex":2},{"hotZoneType":"3","linkHotZoneIndex":-1,"audio_url":"","score":"1","unselectedStyle":"mask","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"","contentList":[{"uuid":"b62181dd-0c66-429f-864a-948d59398b1e","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":true,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"selectHotZoneIndex":3},{"uuid":"86b205ba-e7f9-4721-8b5b-bb24e90d65cb","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"selectHotZoneIndex":4}],"linkResultShowHotZoneIndex":5},{"hotZoneType":"3","linkHotZoneIndex":-1,"audio_url":"","score":"1","unselectedStyle":"mask","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"","contentList":[{"uuid":"46b7c2dc-0c41-4eb9-b586-ed521727765b","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"selectHotZoneIndex":6},{"uuid":"95e10010-58b0-4ed9-9f97-1a5c36556c17","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":true,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"selectHotZoneIndex":7}],"linkResultShowHotZoneIndex":8},{"hotZoneType":"3","linkHotZoneIndex":-1,"audio_url":"","score":"1","unselectedStyle":"mask","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"","contentList":[{"uuid":"b7cf832c-ace7-48b5-9ede-c025a6389863","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"selectHotZoneIndex":9},{"uuid":"fcc00bc4-e742-4911-9943-af3d7e971300","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":true,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"selectHotZoneIndex":10}],"linkResultShowHotZoneIndex":11},{"hotZoneType":"5","linkHotZoneIndex":12,"audio_url":"","score":"0.5","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"doll","contentList":[]},{"hotZoneType":"5","linkHotZoneIndex":13,"audio_url":"","score":"0.5","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"scooter","contentList":[]},{"hotZoneType":"5","linkHotZoneIndex":14,"audio_url":"","score":"0.5","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"teddy bear","contentList":[]},{"hotZoneType":"5","linkHotZoneIndex":15,"audio_url":"","score":"0.5","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"bike","contentList":[]},{"hotZoneType":"6","linkHotZoneIndex":-1,"audio_url":"","score":"0","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"","contentList":[{"uuid":"3d93efb3-43e9-48f1-b163-40e41c170275","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"0.5","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":16,"selectEndHotZoneIndex":17,"selectEndHotZoneShowIndex":null},{"uuid":"c6ee37e7-539e-424a-9624-0874acbc2f90","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"0.5","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":18,"selectEndHotZoneIndex":19,"selectEndHotZoneShowIndex":null},{"uuid":"cc5c36aa-a1fd-48bb-a51a-0977076cb8f1","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"0.5","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":20,"selectEndHotZoneIndex":21,"selectEndHotZoneShowIndex":null},{"uuid":"363284e0-4e03-460e-a450-3691d295fc76","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"0.5","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":22,"selectEndHotZoneIndex":23,"selectEndHotZoneShowIndex":null}],"linkResultShowHotZoneIndex":24},{"hotZoneType":"10","linkHotZoneIndex":25,"audio_url":"","score":"1","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"","contentList":[{"uuid":"79adbf7c-2fce-47c2-97d9-d028a8cce6fa","text":"it","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"2"},{"uuid":"5c96446c-1fad-4b0e-8151-160ff5276fe2","text":"Yes,","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"1"},{"uuid":"2042166e-40c0-45e3-a76e-23ba9ba844a1","text":"is.","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"3"}],"linkResultShowHotZoneIndex":26},{"hotZoneType":"10","linkHotZoneIndex":27,"audio_url":"","score":"1","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"","contentList":[{"uuid":"413ef9b0-24e0-4f00-b925-314a92cff4cc","text":"my","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"3"},{"uuid":"2b69749f-f748-46dc-9b10-e21174e2f31e","text":"This","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"1"},{"uuid":"e63f95c3-9785-4d43-a29c-5f88db8124ca","text":"kite.","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"4"},{"uuid":"bd0d5099-afdf-4385-9a46-24a7efb2f3bb","text":"is","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"2"}],"linkResultShowHotZoneIndex":28},{"hotZoneType":"10","linkHotZoneIndex":29,"audio_url":"","score":"1","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"","contentList":[{"uuid":"94f670cd-13e5-43d3-bfd2-e10ae97bb37c","text":"your","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"3"},{"uuid":"a4618f17-3cf6-4c37-8675-cbda566793d6","text":"Is","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"1"},{"uuid":"48cb64ae-5962-4c89-94cb-3e66492f59b6","text":"this","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"2"},{"uuid":"545c7fcf-e655-43a9-adde-1af6f37d9642","text":"game?","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"4"}],"linkResultShowHotZoneIndex":30},{"hotZoneType":"10","linkHotZoneIndex":31,"audio_url":"","score":"1","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"","contentList":[{"uuid":"b58ac696-f97c-4b2e-8599-5ed3f8c39eb1","text":"isn't.","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"3"},{"uuid":"3c1a37b4-2b2f-45ce-a149-3892408ec562","text":"it","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"2"},{"uuid":"73e0253f-cc86-46ba-901d-a26d99511a42","text":"No,","optionShowText":"","image_url":"","hotZoneIndex":null,"score":0,"isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"sortIndex":"1"}],"linkResultShowHotZoneIndex":32},{"hotZoneType":"5","linkHotZoneIndex":33,"audio_url":"","score":"1","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"isn't","contentList":[],"adaptContraction":true},{"hotZoneType":"5","linkHotZoneIndex":34,"audio_url":"","score":"1","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"it isn't","contentList":[],"adaptContraction":false,"capitalizedFirstLetter":false,"isCaseInsensitive":true},{"hotZoneType":"5","linkHotZoneIndex":35,"audio_url":"","score":"1","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"it is","contentList":[],"adaptContraction":true}],"scoreConfigArr":[{"linkHotZoneIndex":-1,"linkHotZoneIndexArr":[0,1,2,3,4,5,6,7,8]},{"linkHotZoneIndex":-1,"linkHotZoneIndexArr":[9,10,11,12,13,14,15]}],"alignMode":"left","ratingSystem":"0"} export const defaultData = {"header_image_url":"http://teach.cdn.ireadabc.com/64ef29f4a806e29ecb32fe1db7c98dfb.jpg","footer_image_url":"http://teach.cdn.ireadabc.com/665e4c3e6a80563b4c33dd7bbcd18014.jpg","bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/4425cebcf3aa2eba93f8a485358badf5.jpg","rect":{"x":0,"y":612.1666666666665,"width":1550,"height":3771.666666666667}},"hotZoneItemArr":[{"index":0,"itemType":"rect","itemName":"4-2","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.2109375,"imgScale":1,"mapScale":1.2109375,"rect":{"x":819,"y":1998.83,"width":618,"height":42}},{"index":1,"itemType":"rect","itemName":"4-3","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.2109375,"imgScale":1,"mapScale":1.2109375,"rect":{"x":819,"y":2045.55,"width":618,"height":42}},{"index":2,"itemType":"rect","itemName":"4-4","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.2109375,"imgScale":1,"mapScale":1.2109375,"rect":{"x":819,"y":2092.26,"width":618,"height":42}},{"index":3,"itemType":"rect","itemName":"4-5","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.2109375,"imgScale":1,"mapScale":1.2109375,"rect":{"x":819,"y":2138.98,"width":618,"height":42}},{"index":4,"itemType":"rect","itemName":"4-6","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.2109375,"imgScale":1,"mapScale":1.2109375,"rect":{"x":819,"y":2185.69,"width":618,"height":42}},{"index":5,"itemType":"rect","itemName":"4-7","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.2109375,"imgScale":1,"mapScale":1.2109375,"rect":{"x":819,"y":2232.4,"width":618,"height":42}},{"index":6,"itemType":"rect","itemName":"4-8","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.2109375,"imgScale":1,"mapScale":1.2109375,"rect":{"x":819,"y":2279.12,"width":618,"height":42}},{"index":7,"itemType":"rect","itemName":"4-9","fontSize":50,"fontName":"BRLNSR_1","fontColor":"#8f3758","fontScale":1.2109375,"imgScale":1,"mapScale":1.2109375,"rect":{"x":819,"y":2325.83,"width":618,"height":42}}],"hotZoneConfigArr":[{"hotZoneType":"12","linkHotZoneIndex":-1,"audio_url":"","score":"0","unselectedStyle":"none","selectedStyle":"border","rightOrWrongStyleType":"symbol","inputText":"","keyWordMatch":false,"isCaseInsensitive":true,"openAnswer":false,"useSelectOptionList":false,"keyWordMatchInOrder":false,"capitalizedFirstLetter":false,"notAdaptContraction":false,"selectOptionList":[],"contentList":[{"uuid":"b9480a65-bf53-4fcf-9b27-fb775d2abbe6","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"1","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"selectHotZoneIndex":0,"inputText":"1 | 2 | 3","keyWordMatch":true},{"uuid":"c7c9d9f2-2e0a-43a9-8a80-8def23430e66","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"1","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"inputText":"2","keyWordMatch":false,"keyWordMatchInOrder":false,"isCaseInsensitive":false,"openAnswer":false,"capitalizedFirstLetter":false,"notAdaptContraction":false,"selectHotZoneIndex":1},{"uuid":"79a0666e-ae9b-4c58-a4b5-45d30cab4978","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"1","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"inputText":"3","keyWordMatch":false,"keyWordMatchInOrder":false,"isCaseInsensitive":false,"openAnswer":false,"capitalizedFirstLetter":false,"notAdaptContraction":false,"selectHotZoneIndex":2},{"uuid":"1e4f9710-e7bb-458b-a065-22650c688465","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"1","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"inputText":"4","keyWordMatch":false,"keyWordMatchInOrder":false,"isCaseInsensitive":false,"openAnswer":false,"capitalizedFirstLetter":false,"notAdaptContraction":false,"selectHotZoneIndex":3},{"uuid":"a924e16e-2c8b-4495-b743-450683849529","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"1","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"inputText":"5","keyWordMatch":false,"keyWordMatchInOrder":false,"isCaseInsensitive":false,"openAnswer":false,"capitalizedFirstLetter":false,"notAdaptContraction":false,"selectHotZoneIndex":4},{"uuid":"aff3a858-e189-41a9-86a7-de300326ecd1","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"1","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"inputText":"6","keyWordMatch":false,"keyWordMatchInOrder":false,"isCaseInsensitive":false,"openAnswer":false,"capitalizedFirstLetter":false,"notAdaptContraction":false,"selectHotZoneIndex":5},{"uuid":"1f0dc34e-cf88-47d9-9f53-b9609a390900","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"1","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"inputText":"7","keyWordMatch":false,"keyWordMatchInOrder":false,"isCaseInsensitive":false,"openAnswer":false,"capitalizedFirstLetter":false,"notAdaptContraction":false,"selectHotZoneIndex":6},{"uuid":"a4791aec-2bda-486b-a962-46bebd07641d","text":"","optionShowText":"","image_url":"","hotZoneIndex":null,"score":"1","isCorrect":false,"isCheck":false,"linkedShowText":"","selectStartHotZoneIndex":null,"selectEndHotZoneIndex":null,"selectEndHotZoneShowIndex":null,"inputText":"8","keyWordMatch":false,"keyWordMatchInOrder":false,"isCaseInsensitive":false,"openAnswer":false,"capitalizedFirstLetter":false,"notAdaptContraction":false,"selectHotZoneIndex":7}]}],"scoreConfigArr":[{"linkHotZoneIndex":-1,"linkHotZoneIndexArr":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]}],"alignMode":"left","ratingSystem":null}
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
<nz-option [nzValue]="SORT_WORDS" nzLabel="单词排序"></nz-option> <nz-option [nzValue]="SORT_WORDS" nzLabel="单词排序"></nz-option>
<nz-option [nzValue]="PRONUNCIATION_ASSESSMENT" nzLabel="语音评测"></nz-option> <nz-option [nzValue]="PRONUNCIATION_ASSESSMENT" nzLabel="语音评测"></nz-option>
<nz-option [nzValue]="CONNECTION_CHOICE" nzLabel="连线选择题"></nz-option> <nz-option [nzValue]="CONNECTION_CHOICE" nzLabel="连线选择题"></nz-option>
<nz-option [nzValue]="TEXTINPUT_GROUP" nzLabel="文字输入组"></nz-option>
<nz-option [nzValue]="IMAGE_SELECT" nzLabel="图片选项" nzDisabled></nz-option> <nz-option [nzValue]="IMAGE_SELECT" nzLabel="图片选项" nzDisabled></nz-option>
</nz-select> </nz-select>
<label *ngIf="it.hotZoneType == TEXT_SELECT" nz-checkbox [(ngModel)]="it.useSelectOptionList" (ngModelChange)="handleUserSelectOptionListChange(it)" style="margin-left: 10px;">使用独立选项清单</label> <label *ngIf="it.hotZoneType == TEXT_SELECT" nz-checkbox [(ngModel)]="it.useSelectOptionList" (ngModelChange)="handleUserSelectOptionListChange(it)" style="margin-left: 10px;">使用独立选项清单</label>
...@@ -421,6 +422,45 @@ ...@@ -421,6 +422,45 @@
</tbody> </tbody>
</nz-table> </nz-table>
<!-- 文字输入组 -->
<nz-table *ngIf="it.hotZoneType == TEXTINPUT_GROUP" #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 nzWidth="100px" >热区索引</th>
<th nzWidth="150px" nzAlign="center">操作</th>
</thead>
<tbody>
<tr *ngFor="let data of contentTable.data; let i = index;">
<td nzWidth="100px" nzAlign="center">{{ i + 1 }}</td>
<td nzWidth="100px">
<input type="text" nz-input [(ngModel)]="data.score" (blur)="save()"/>
</td>
<td nzAlign="center">
<input type="text" nz-input [(ngModel)]="data.inputText" (blur)="save()" style="display: inline-block;">
<div>
<label nz-checkbox [(ngModel)]="data.keyWordMatch" (ngModelChange)="save()" style="margin-left: 10px;">关键词匹配</label>
<label nz-checkbox [(ngModel)]="data.keyWordMatchInOrder" (ngModelChange)="save()" style="margin-left: 10px;">有序关键词</label>
<label nz-checkbox [(ngModel)]="data.isCaseInsensitive" (ngModelChange)="save()" style="margin-left: 10px;">不区分大小写</label>
<label nz-checkbox [(ngModel)]="data.openAnswer" (ngModelChange)="save()" style="margin-left: 10px;">开放性答案</label>
<label nz-checkbox [(ngModel)]="data.capitalizedFirstLetter" (ngModelChange)="save()" style="margin-left: 10px;">首字母大写</label>
<label nz-checkbox [(ngModel)]="data.notAdaptContraction" (ngModelChange)="save()" style="margin-left: 10px;">不进行缩写适配</label>
</div>
</td>
<td nzWidth="100px" >
<nz-select nzShowSearch nzAllowClear [(ngModel)]="data.selectHotZoneIndex" style="width: 180px;" (ngModelChange)="save()">
<nz-option *ngFor="let itOption of item.hotZoneItemArr" [nzValue]="itOption.index" [nzLabel]="itOption.itemName"></nz-option>
</nz-select>
</td>
<td nzWidth="10%" nzAlign="center">
<a nz-popconfirm nzPopconfirmTitle="删除后不可恢复,确定删除吗?" (nzOnConfirm)="deleteHotZoneConfigItem(it, i)">删除</a>
</td>
</tr>
</tbody>
</nz-table>
</div> </div>
<div *ngIf="it.hotZoneType == AUDIO_PLAY" style="padding: 20px 0 10px 150px;"> <div *ngIf="it.hotZoneType == AUDIO_PLAY" style="padding: 20px 0 10px 150px;">
<app-audio-recorder <app-audio-recorder
...@@ -468,7 +508,7 @@ ...@@ -468,7 +508,7 @@
<label nz-checkbox [(ngModel)]="it.notAdaptContraction" (ngModelChange)="save()" style="margin-left: 10px;">不进行缩写适配</label> <label nz-checkbox [(ngModel)]="it.notAdaptContraction" (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 != TEXT_SELECT && it.hotZoneType != RIGHT_OR_WRONG" 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 != 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>
...@@ -489,7 +529,7 @@ ...@@ -489,7 +529,7 @@
</nz-select> </nz-select>
</div> </div>
<div *ngIf="it.hotZoneType != ''&& it.hotZoneType != AUDIO_PLAY && it.hotZoneType != HOT_ZONE_CHECKBOX && it.hotZoneType != CONNECTION && it.hotZoneType != TEXT_SELECT && it.hotZoneType != RIGHT_OR_WRONG" style="margin: 10px 10px;"> <div *ngIf="it.hotZoneType != ''&& it.hotZoneType != AUDIO_PLAY && it.hotZoneType != HOT_ZONE_CHECKBOX && it.hotZoneType != CONNECTION && it.hotZoneType != 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>
......
...@@ -54,6 +54,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -54,6 +54,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
CROSSWORD_PUZZLE = "9"; CROSSWORD_PUZZLE = "9";
SORT_WORDS = "10"; SORT_WORDS = "10";
CONNECTION_CHOICE = "11"; CONNECTION_CHOICE = "11";
TEXTINPUT_GROUP = "12";
// 评分体系 // 评分体系
RS_15_5L_FAF = "0"; RS_15_5L_FAF = "0";
...@@ -229,6 +230,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -229,6 +230,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
selectStartHotZoneIndex: null, // 起点热区索引 [连线题] selectStartHotZoneIndex: null, // 起点热区索引 [连线题]
selectEndHotZoneIndex: null, // 终点热区索引 [连线题] selectEndHotZoneIndex: null, // 终点热区索引 [连线题]
selectEndHotZoneShowIndex: null, // 被连接后 需要显示内容的热区 [连线题] selectEndHotZoneShowIndex: null, // 被连接后 需要显示内容的热区 [连线题]
inputText: "", // 输入文字 [文字输入组]
keyWordMatch: false, // 关键词匹配 [文字输入组]
keyWordMatchInOrder: false, // 有序关键词 [文字输入组]
isCaseInsensitive: false, // 大小写不敏感 [文字输入组]
openAnswer: false, // 开放性答案 [文字输入组]
capitalizedFirstLetter: false, // 首字母大写 [文字输入组]
notAdaptContraction: false, // 不进行缩写适配 [文字输入组]
} }
} }
...@@ -491,6 +500,21 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -491,6 +500,21 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
} }
}); });
break; break;
// 文字输入组
case this.TEXTINPUT_GROUP:
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或者有异常`)
}
// 热区配置检查
if(contentItem.selectHotZoneIndex == null || contentItem.selectHotZoneIndex == undefined || contentItem.selectHotZoneIndex < 0) {
hotZoneIndexErr.push(`内容${hotZoneConfigIndex+1} - 内容清单${contentIndex+1}: 关联热区为空`)
}
});
break;
default:; default:;
} }
} }
......
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