From 7d1848277e425c0eec54188bddea1203d5f6a31f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Czouyf=E2=80=9D?= <80906036@qq.com> Date: Mon, 6 Jan 2025 16:18:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=A2=98=E7=AD=94=E6=A1=88?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/hooks/useProcessList.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/hooks/useProcessList.js b/src/renderer/src/hooks/useProcessList.js index c9f1e07..a3dcd8b 100644 --- a/src/renderer/src/hooks/useProcessList.js +++ b/src/renderer/src/hooks/useProcessList.js @@ -328,7 +328,7 @@ export const processList = (row, aloneOption=false) => { // 处理[答案显示] - 1-正常 0-错误 const answer = workAnswerArr .map((item) => { - return item === '1' ? '正确' : '错误' + return DICT_TRUE_OR_FALSE.TRUE.includes(item) ? '正确' : DICT_TRUE_OR_FALSE.FALSE.includes(item)?'错误':item; }) .join('、') row[i].workanswerFormat = answer @@ -341,3 +341,8 @@ export const processList = (row, aloneOption=false) => { } } } + +const DICT_TRUE_OR_FALSE = { + TRUE: ['正确', '对', '√', '1'], + FALSE: ['错误', '错', '×', '0'], +}; \ No newline at end of file -- 2.44.0.windows.1