Commit 0c75da9d by yuananting

fix:试卷排序

parent b27710c2
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-04-07 15:17:55
* @LastEditTime: 2021-04-09 17:08:57
* @Description: 助学工具-新建试卷-选择题目列表
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -95,7 +95,7 @@ class SelectQuestionList extends Component {
...this.state.query,
categoryId,
current: 1,
order: "UPDATED_DESC", // 排序规则
order: "ACCURACY_DESC", // 排序规则
questionName: null, // 题目名称
questionType: null, // 题目类型
};
......@@ -369,11 +369,11 @@ class SelectQuestionList extends Component {
<span style={{marginRight: 8}}>已选<span style={{color: "#FFB714"}}>{selectQuestionKeys.length}</span></span>
{selectQuestionKeys.length > 0 && (
<span>(
{singleCount > 0 && `单选题${singleCount}题`}
{multiCount > 0 && `、多选题${multiCount}题`}
{judgeCount > 0 && `、判断题${judgeCount}题`}
{gapCount > 0 && `、填空题${gapCount}题`}
{indefiniteCount > 0 && `、不定项选择题${indefiniteCount}题`})
{singleCount > 0 && ` 单选题${singleCount}题 `}
{multiCount > 0 && `多选题${multiCount}题 `}
{judgeCount > 0 && `判断题${judgeCount}题 `}
{gapCount > 0 && `填空题${gapCount}题 `}
{indefiniteCount > 0 && `不定项选择题${indefiniteCount}题 `})
</span>
)}
</div>
......
......@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-27 11:15:03
* @LastEditors: yuananting
* @LastEditTime: 2021-04-07 15:09:31
* @LastEditTime: 2021-04-09 16:55:39
* @Description: 助学工具-试卷-预览试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -73,20 +73,22 @@ class PreviewPaperModal extends Component {
const mediaContent = _.filter(questionStemList, (item) => {
return item.type !== "RICH_TEXT";
});
let content = textContent.length > 0 && textContent[0].content;
if (questionType === "GAP_FILLING") {
content = content.replace(
/_/g,
`<input
let content = "";
if (textContent.length > 0) {
content = textContent[0].content;
if (questionType === "GAP_FILLING") {
content = content.replace(
/_/g,
`<input
class="add-fill-line"
disabled
correctAnswerList=""
id=${window.random_string(16)}
value=" "
/>`
);
content = content.replace(/value="填空"/g, "value=' '");
);
content = content.replace(/value="填空"/g, "value=' '");
}
}
let textDom = (
......@@ -264,7 +266,12 @@ class PreviewPaperModal extends Component {
};
render() {
const { paperInfo, showScanFile, scanFileType, scanFileAddress } = this.state;
const {
paperInfo,
showScanFile,
scanFileType,
scanFileAddress,
} = this.state;
const { paperName, questionList } = paperInfo;
return (
<div>
......
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