判断题答案优化 #203
|
@ -328,7 +328,7 @@ export const processList = (row, aloneOption=false) => {
|
||||||
// 处理[答案显示] - 1-正常 0-错误
|
// 处理[答案显示] - 1-正常 0-错误
|
||||||
const answer = workAnswerArr
|
const answer = workAnswerArr
|
||||||
.map((item) => {
|
.map((item) => {
|
||||||
return item === '1' ? '正确' : '错误'
|
return DICT_TRUE_OR_FALSE.TRUE.includes(item) ? '正确' : DICT_TRUE_OR_FALSE.FALSE.includes(item)?'错误':item;
|
||||||
})
|
})
|
||||||
.join('、')
|
.join('、')
|
||||||
row[i].workanswerFormat = answer
|
row[i].workanswerFormat = answer
|
||||||
|
@ -341,3 +341,8 @@ export const processList = (row, aloneOption=false) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DICT_TRUE_OR_FALSE = {
|
||||||
|
TRUE: ['正确', '对', '√', '1'],
|
||||||
|
FALSE: ['错误', '错', '×', '0'],
|
||||||
|
};
|
Loading…
Reference in New Issue