diff --git a/src/pages/examine/modal/index.tsx b/src/pages/examine/modal/index.tsx index a78aa1d..f7848ba 100644 --- a/src/pages/examine/modal/index.tsx +++ b/src/pages/examine/modal/index.tsx @@ -93,10 +93,12 @@ const examineModal: React.FC<{ currentUser: any }> = (props) => { let options: string = '' if (item.question.options && item.question.options.length > 0) { item.question.options.forEach((subItem: any, subIndex: number) => { - options += `${subIndex > 0 ? ',' : ''}选项${subIndex + 1}:${subItem.text}` + options += `${subItem.text};` + // ${subIndex > 0 ? ',' : ''} 选项${subIndex + 1}: }) } - questionStr += `${index > 0 ? ',' : ''}问题${index + 1}:${item.question.title},${options}` + questionStr += `${index > 0 ? ',' : ''}问题:${item.question.title}。${options}` + // ${index + 1} }) } return questionStr || '' diff --git a/src/pages/examine/record/components/recordDetail.tsx b/src/pages/examine/record/components/recordDetail.tsx index 0c8be7b..527ca35 100644 --- a/src/pages/examine/record/components/recordDetail.tsx +++ b/src/pages/examine/record/components/recordDetail.tsx @@ -65,10 +65,11 @@ const RecordDetail = ({ parentRow, show, detailType, currentUser, onRef, showErr dataIndex: "title", hideInTable: detailType === 'modal', render: (_, record) => { + let questionType: string = record?.question.type.split('_')[0] let str: string = '' if (record.choiceResponse && record?.choiceResponse.length > 0) { record.choiceResponse.forEach((item: any, index: number) => { - str += `${index > 0 ? ',' : ''}答案${index + 1}:${item}` + str += `${item.text ? item.text : item};` }) } return str || "" @@ -395,7 +396,8 @@ const RecordDetail = ({ parentRow, show, detailType, currentUser, onRef, showErr let resultStr = ''; if (record.choiceResponse && record.choiceResponse.length > 0) { record.choiceResponse.forEach((item: any, index: number) => { - resultStr += `${index > 0 ? ',' : ''}结果${index + 1}:${item}`; + resultStr += `${item.text ? item.text : item}`; + // ${index > 0 ? ',' : ''}结果${index + 1}: }); } printContent += `