feat(ai): 添加产品问答管理功能的题目详情展示
- 在AdminQuestionInfoVo中新增题目标题、答案、正确答案和答案解析字段
- 更新AiProductQuestionMapper.xml查询语句以返回完整的题目信息
- 在前端页面中添加正确答案格式化模板和表格列定义
- 扩展详情弹窗为全屏显示以更好展示题目内容
| | |
| | | |
| | | private String id; |
| | | |
| | | private String title; |
| | | |
| | | private String answer; |
| | | |
| | | private Integer correctAnswer; |
| | | |
| | | private String answerAnalysis; |
| | | |
| | | } |
| | |
| | | <mapper namespace="cc.mrbird.febs.ai.mapper.AiProductQuestionMapper"> |
| | | |
| | | <select id="selectJobChildPage" resultType="cc.mrbird.febs.ai.res.AdminQuestionInfoVo"> |
| | | select a.id |
| | | select |
| | | a.product_question_id id, |
| | | a.title, |
| | | a.answer, |
| | | a.correct_answer, |
| | | a.answer_analysis |
| | | from ai_product_question_item a |
| | | where a.job_id = #{record.id} |
| | | ORDER BY a.title DESC |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="correctAnswerFormat"> |
| | | {{# if(d.correctAnswer == 1) { }} |
| | | <span>是</span> |
| | | {{# } else { }} |
| | | <span></span> |
| | | {{# } }} |
| | | </script> |
| | | <script data-th-inline="javascript" type="text/javascript"> |
| | | layui.use(['jquery', 'form', 'table', 'febs'], function () { |
| | | var $ = layui.jquery, |
| | |
| | | url: ctx + 'admin/productQuestion/jobChild?jobId=' + jobId, |
| | | cols: [[ |
| | | {field: 'id', title: 'ID', minWidth: 150, align: 'center'}, |
| | | {field: 'title', title: '题目', minWidth: 150, align: 'center'}, |
| | | {field: 'answer', title: '答案', minWidth: 150, align: 'center'}, |
| | | {templet:"#correctAnswerFormat", title: '是否正确', minWidth: 140,align:'center'}, |
| | | {field: 'answerAnalysis', title: '答案解析', edit:'text', width:500} |
| | | // 添加更多列定义... |
| | | ]] |
| | | }); |
| | |
| | | console.log("触发事件-ID:", data.id) |
| | | febs.modal.open( '详情', 'modules/ai/productQuestion/jobInfoList/' + data.id, { |
| | | maxmin: true, |
| | | area: ['100%', '100%'], |
| | | }); |
| | | } |
| | | }); |