Commit 0c75da9d by yuananting

fix:试卷排序

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