Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
93766da8
Commit
93766da8
authored
Mar 27, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:题库模板结构修改
parent
1d242593
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
125 additions
and
137 deletions
+125
-137
src/modules/teach-tool/components/CourseCategoryManage.jsx
+17
-17
src/modules/teach-tool/components/CourseCategoryManage.less
+3
-3
src/modules/teach-tool/components/CourseCategorySiderTree.jsx
+7
-11
src/modules/teach-tool/components/CourseCategorySiderTree.less
+3
-3
src/modules/teach-tool/modal/NewEditCourseCategoryModal.jsx
+4
-5
src/modules/teach-tool/question-bank/AddNewQuestion.jsx
+0
-0
src/modules/teach-tool/question-bank/AddNewQuestion.less
+0
-0
src/modules/teach-tool/question-bank/QuestionBankIndex.jsx
+6
-5
src/modules/teach-tool/question-bank/QuestionBankIndex.less
+0
-0
src/modules/teach-tool/question-bank/components/NewQuestionTab.jsx
+68
-67
src/modules/teach-tool/question-bank/components/NewQuestionTab.less
+0
-0
src/modules/teach-tool/question-bank/components/QuestionEditor.jsx
+0
-0
src/modules/teach-tool/question-bank/components/QuestionEditor.less
+0
-0
src/modules/teach-tool/question-bank/components/QuestionManageContent.jsx
+0
-0
src/modules/teach-tool/question-bank/components/QuestionManageContent.less
+0
-0
src/modules/teach-tool/question-bank/components/XMAudio.jsx
+0
-10
src/modules/teach-tool/question-bank/components/XMAudio.less
+0
-0
src/modules/teach-tool/question-bank/components/XMRecord.jsx
+0
-0
src/modules/teach-tool/question-bank/components/XMRecord.less
+0
-0
src/modules/teach-tool/question-bank/components/audioRecord.js
+0
-0
src/modules/teach-tool/question-bank/components/model.js
+2
-2
src/modules/teach-tool/question-bank/modal/BatchImportQuestionModal.jsx
+6
-4
src/modules/teach-tool/question-bank/modal/BatchImportQuestionModal.less
+1
-2
src/modules/teach-tool/question-bank/modal/QuestionPreviewModal.jsx
+0
-0
src/modules/teach-tool/question-bank/modal/QuestionPreviewModal.less
+0
-0
src/routes/config/mainRoutes.tsx
+6
-6
src/routes/config/menuList.tsx
+2
-2
No files found.
src/modules/teach-tool/
Question
CategoryManage.jsx
→
src/modules/teach-tool/
components/Course
CategoryManage.jsx
View file @
93766da8
...
...
@@ -2,14 +2,14 @@
* @Author: yuananting
* @Date: 2021-02-23 18:28:50
* @LastEditors: yuananting
* @LastEditTime: 2021-03-2
4 17:18:20
* @Description: 助学工具-题库-
主页面
分类管理
* @LastEditTime: 2021-03-2
7 13:49:14
* @Description: 助学工具-题库-
课程
分类管理
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
Component
}
from
"react"
;
import
Breadcrumbs
from
"@/components/Breadcrumbs"
;
import
"./
Question
CategoryManage.less"
;
import
NewEdit
QuestionBankCategory
from
"./modal/NewEditQuestionBankCategory
"
;
import
"./
Course
CategoryManage.less"
;
import
NewEdit
CourseCategoryModal
from
"../modal/NewEditCourseCategoryModal
"
;
import
QuestionBankService
from
"@/domains/question-bank-domain/QuestionBankService"
;
import
User
from
"@/common/js/user"
;
import
{
...
...
@@ -26,11 +26,11 @@ import ShowTips from "@/components/ShowTips";
const
{
DirectoryTree
}
=
Tree
;
const
{
Search
}
=
Input
;
const
{
confirm
}
=
Modal
;
class
Question
CategoryManage
extends
Component
{
class
Course
CategoryManage
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
NewEdit
QuestionBankCategory
:
null
,
//新增或编辑分类模态框
NewEdit
CourseCategoryModal
:
null
,
//新增或编辑分类模态框
treeData
:
[],
treeMap
:
{},
selectedKeys
:
[
"0"
],
...
...
@@ -134,7 +134,7 @@ class QuestionCategoryManage extends Component {
};
// 新增或编辑分类
newEdit
Question
Category
=
(
categoryType
,
addLevelType
,
type
,
node
)
=>
{
newEdit
Course
Category
=
(
categoryType
,
addLevelType
,
type
,
node
)
=>
{
let
title
=
""
;
let
label
=
""
;
switch
(
categoryType
)
{
...
...
@@ -156,7 +156,7 @@ class QuestionCategoryManage extends Component {
break
;
}
const
m
=
(
<
NewEdit
QuestionBankCategory
<
NewEdit
CourseCategoryModal
node=
{
node
}
addLevelType=
{
addLevelType
}
type=
{
type
}
...
...
@@ -166,12 +166,12 @@ class QuestionCategoryManage extends Component {
close=
{
()
=>
{
this
.
queryCategoryTree
(
"change"
);
this
.
setState
({
NewEdit
QuestionBankCategory
:
null
,
NewEdit
CourseCategoryModal
:
null
,
});
}
}
/>
);
this
.
setState
({
NewEdit
QuestionBankCategory
:
m
});
this
.
setState
({
NewEdit
CourseCategoryModal
:
m
});
};
initDropMenu
=
(
item
)
=>
{
...
...
@@ -184,7 +184,7 @@ class QuestionCategoryManage extends Component {
item
.
categoryLevel
===
0
?
"editEqualLevelCategory"
:
"editChildLevelCategory"
;
this
.
newEdit
Question
Category
(
categoryType
,
"equal"
,
"edit"
,
item
);
this
.
newEdit
Course
Category
(
categoryType
,
"equal"
,
"edit"
,
item
);
}
}
>
重命名
...
...
@@ -456,7 +456,7 @@ class QuestionCategoryManage extends Component {
message
.
info
(
"最多只能添加30个分类"
);
return
;
}
this
.
newEdit
Question
Category
(
this
.
newEdit
Course
Category
(
"newEqualLevelCategory"
,
"equal"
,
"new"
,
...
...
@@ -479,7 +479,7 @@ class QuestionCategoryManage extends Component {
message
.
info
(
"最多只能添加30个子分类"
);
return
;
}
this
.
newEdit
Question
Category
(
this
.
newEdit
Course
Category
(
"newChildLevelCategory"
,
"child"
,
"new"
,
...
...
@@ -581,7 +581,7 @@ class QuestionCategoryManage extends Component {
autoExpandParent
,
}
=
this
.
state
;
return
(
<
div
className=
"page
question
-category-manage"
>
<
div
className=
"page
course
-category-manage"
>
{
getParameterByName
(
"from"
)
===
"aid"
?
(
<
Breadcrumbs
navList=
"课程分类"
...
...
@@ -612,7 +612,7 @@ class QuestionCategoryManage extends Component {
message
.
info
(
"最多只能添加30个分类"
);
return
;
}
this
.
newEdit
Question
Category
(
this
.
newEdit
Course
Category
(
"newEqualLevelCategory"
,
"equal"
,
"new"
...
...
@@ -641,10 +641,10 @@ class QuestionCategoryManage extends Component {
></
DirectoryTree
>
</
div
>
</
div
>
{
this
.
state
.
NewEdit
QuestionBankCategory
}
{
this
.
state
.
NewEdit
CourseCategoryModal
}
</
div
>
);
}
}
export
default
Question
CategoryManage
;
export
default
Course
CategoryManage
;
src/modules/teach-tool/
Question
CategoryManage.less
→
src/modules/teach-tool/
components/Course
CategoryManage.less
View file @
93766da8
...
...
@@ -2,11 +2,11 @@
* @Author: yuananting
* @Date: 2021-02-23 19:41:42
* @LastEditors: yuananting
* @LastEditTime: 2021-03-2
4 17:16:43
* @Description: 助学工具-题库-
题目
分类管理样式
* @LastEditTime: 2021-03-2
7 13:49:00
* @Description: 助学工具-题库-
课程
分类管理样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
.
question
-category-manage {
.
course
-category-manage {
position: relative;
.search-condition {
width: 30%;
...
...
src/modules/teach-tool/components/
QuestionBankSider
.jsx
→
src/modules/teach-tool/components/
CourseCategorySiderTree
.jsx
View file @
93766da8
...
...
@@ -2,20 +2,20 @@
* @Author: yuananting
* @Date: 2021-02-22 10:59:43
* @LastEditors: yuananting
* @LastEditTime: 2021-03-2
4 14:50:08
* @Description: 助学工具-题库-
题库主页面
侧边栏
* @LastEditTime: 2021-03-2
7 13:51:43
* @Description: 助学工具-题库-
课程分类
侧边栏
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
Component
}
from
"react"
;
import
{
Input
,
Button
,
Tree
}
from
"antd"
;
import
"./
QuestionBankSider
.less"
;
import
"./
CourseCategorySiderTree
.less"
;
import
User
from
"@/common/js/user"
;
import
QuestionBankService
from
"@/domains/question-bank-domain/QuestionBankService"
;
const
{
Search
}
=
Input
;
const
{
DirectoryTree
}
=
Tree
;
class
QuestionBankSider
extends
Component
{
class
CourseCategorySiderTree
extends
Component
{
constructor
(
props
)
{
super
(
props
);
const
categoryId
=
getParameterByName
(
"categoryId"
);
...
...
@@ -26,8 +26,6 @@ class QuestionBankSider extends Component {
:
[
categoryId
]
:
[
"0"
],
searchValue
:
null
,
NewEditQuestionBankCategory
:
null
,
//新增或编辑分类模态框
ImportCourseCategory
:
null
,
// 引用课程分类模态框
treeData
:
this
.
props
.
treeData
||
[],
autoExpandParent
:
false
,
};
...
...
@@ -195,7 +193,7 @@ class QuestionBankSider extends Component {
autoExpandParent
,
}
=
this
.
state
;
return
(
<
div
className=
"
question-bank
-sider"
>
<
div
className=
"
category-tree
-sider"
>
<
div
className=
"sider-title"
>
题目分类
</
div
>
<
Search
className=
"sider-search"
...
...
@@ -210,7 +208,7 @@ class QuestionBankSider extends Component {
<
Button
onClick=
{
()
=>
{
window
.
RCHistory
.
push
({
pathname
:
"/
question
-category-manage?from=aid"
,
pathname
:
"/
course
-category-manage?from=aid"
,
});
}
}
>
...
...
@@ -229,11 +227,9 @@ class QuestionBankSider extends Component {
treeData=
{
treeData
}
/>
</
div
>
{
this
.
state
.
NewEditQuestionBankCategory
}
{
this
.
state
.
ImportCourseCategory
}
</
div
>
);
}
}
export
default
QuestionBankSider
;
export
default
CourseCategorySiderTree
;
src/modules/teach-tool/components/
QuestionBankSider
.less
→
src/modules/teach-tool/components/
CourseCategorySiderTree
.less
View file @
93766da8
...
...
@@ -2,11 +2,11 @@
* @Author: yuananting
* @Date: 2021-02-22 12:02:34
* @LastEditors: yuananting
* @LastEditTime: 2021-03-2
4 15:57:12
* @Description: 助学工具-题库-
题库主页面
侧边栏样式
* @LastEditTime: 2021-03-2
7 13:52:19
* @Description: 助学工具-题库-
课程分类
侧边栏样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
.
question-bank
-sider {
.
category-tree
-sider {
position: relative;
.sider-title {
height: 22px;
...
...
src/modules/teach-tool/modal/NewEdit
QuestionBankCategory
.jsx
→
src/modules/teach-tool/modal/NewEdit
CourseCategoryModal
.jsx
View file @
93766da8
...
...
@@ -2,15 +2,15 @@
* @Author: yuananting
* @Date: 2021-02-22 17:51:28
* @LastEditors: yuananting
* @LastEditTime: 2021-03-2
4 15:02:53
* @Description: 助学工具-题库-
题库新建或编辑题库
分类模态框
* @LastEditTime: 2021-03-2
7 14:08:47
* @Description: 助学工具-题库-
新建编辑课程
分类模态框
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
Component
}
from
"react"
;
import
{
Modal
,
Form
,
Input
,
message
}
from
"antd"
;
import
User
from
"@/common/js/user"
;
import
QuestionBankService
from
"@/domains/question-bank-domain/QuestionBankService"
;
class
NewEdit
QuestionBankCategory
extends
Component
{
class
NewEdit
CourseCategoryModal
extends
Component
{
formRef
=
React
.
createRef
();
constructor
(
props
)
{
super
(
props
);
...
...
@@ -22,7 +22,6 @@ class NewEditQuestionBankCategory extends Component {
}
componentDidMount
()
{
// document.getElementById("categoryName").setAttribute("style", "autocomplete","off")
this
.
queryCategoryTree
();
}
...
...
@@ -196,4 +195,4 @@ class NewEditQuestionBankCategory extends Component {
);
}
}
export
default
NewEdit
QuestionBankCategory
;
export
default
NewEdit
CourseCategoryModal
;
src/modules/teach-tool/AddNewQuestion.jsx
→
src/modules/teach-tool/
question-bank/
AddNewQuestion.jsx
View file @
93766da8
File moved
src/modules/teach-tool/AddNewQuestion.less
→
src/modules/teach-tool/
question-bank/
AddNewQuestion.less
View file @
93766da8
File moved
src/modules/teach-tool/QuestionBankIndex.jsx
→
src/modules/teach-tool/
question-bank/
QuestionBankIndex.jsx
View file @
93766da8
...
...
@@ -2,14 +2,14 @@
* @Author: yuananting
* @Date: 2021-02-21 17:51:01
* @LastEditors: yuananting
* @LastEditTime: 2021-03-2
4 13:55:56
* @LastEditTime: 2021-03-2
7 13:42:42
* @Description: 助学工具-题库-题库主页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
Component
}
from
"react"
;
import
"./QuestionBankIndex.less"
;
import
QuestionBankSider
from
".
/components/QuestionBankSider
"
;
import
QuestionBankSider
from
".
./components/CourseCategorySiderTree
"
;
import
QuestionManageContent
from
"./components/QuestionManageContent"
;
class
QuestionBankIndex
extends
Component
{
...
...
@@ -29,8 +29,7 @@ class QuestionBankIndex extends Component {
};
updatedSiderTreeFromList
=
(
currentTotal
,
updatedCategoryId
)
=>
{
this
.
setState
({
currentTotal
});
this
.
setState
({
updatedCategoryId
});
this
.
setState
({
currentTotal
,
updatedCategoryId
});
};
render
()
{
...
...
@@ -38,7 +37,9 @@ class QuestionBankIndex extends Component {
<
div
className=
"question-bank-index page"
>
<
div
className=
"content-header"
>
题目
</
div
>
<
div
className=
"box content-body"
>
<
div
style=
{
{
borderRight
:
"0.5px solid #EEEEEE"
,
paddingRight
:
"4px"
}
}
>
<
div
style=
{
{
borderRight
:
"0.5px solid #EEEEEE"
,
paddingRight
:
"4px"
}
}
>
<
div
className=
"sider"
>
<
QuestionBankSider
getSelectedCategoryId=
{
this
.
getCategoryIdFromSider
.
bind
(
this
)
}
...
...
src/modules/teach-tool/QuestionBankIndex.less
→
src/modules/teach-tool/
question-bank/
QuestionBankIndex.less
View file @
93766da8
File moved
src/modules/teach-tool/components/NewQuestionTab.jsx
→
src/modules/teach-tool/
question-bank/
components/NewQuestionTab.jsx
View file @
93766da8
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 14:34:29
* @LastEditors: yuananting
* @LastEditTime: 2021-03-2
5 19:52:09
* @LastEditTime: 2021-03-2
7 14:02:44
* @Description: 助学工具-题库-题目管理-新建题目Tab
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -73,8 +73,10 @@ class NewQuestionTab extends Component {
// 选择题(单选 多选 不定项)-插入4条默认选项
for
(
var
i
=
0
;
i
<
4
;
i
++
)
{
this
.
handleAddOption
();
this
.
setState
({
[
`optionsValidate_
${
i
}
`
]:
"success"
});
this
.
setState
({
[
`optionsText_
${
i
}
`
]:
""
});
this
.
setState
({
[
`optionsValidate_
${
i
}
`
]:
"success"
,
[
`optionsText_
${
i
}
`
]:
""
,
});
}
}
}
else
if
(
this
.
props
.
questionTypeKey
===
"JUDGE"
)
{
...
...
@@ -105,16 +107,18 @@ class NewQuestionTab extends Component {
shouldComponentUpdate
(
nextProps
,
nextState
)
{
const
{
questionInfo
}
=
nextProps
;
if
(
this
.
props
.
questionInfo
!==
questionInfo
)
{
this
.
setState
({
gapFillingAnswer
:
JSON
.
parse
(
JSON
.
stringify
(
questionInfo
.
gapFillingAnswerList
)
),
});
this
.
setState
(
{
gapFillingAnswer
:
JSON
.
parse
(
JSON
.
stringify
(
questionInfo
.
gapFillingAnswerList
)
),
stemContent
:
JSON
.
parse
(
JSON
.
stringify
(
questionInfo
.
questionStemList
)
),
chooseOptions
:
JSON
.
parse
(
JSON
.
stringify
(
questionInfo
.
optionList
)),
questionAnswerDesc
:
JSON
.
parse
(
JSON
.
stringify
(
questionInfo
.
questionAnswerDescList
)
),
},
()
=>
{
const
con
=
questionInfo
.
questionStemList
[
0
].
content
;
...
...
@@ -126,15 +130,7 @@ class NewQuestionTab extends Component {
});
this
.
setState
({
blanksList
:
_blanksList
||
[]
});
}
);
// 题干内容
this
.
setState
({
chooseOptions
:
JSON
.
parse
(
JSON
.
stringify
(
questionInfo
.
optionList
)),
});
// 单选多选不定项-选项列表
this
.
setState
({
questionAnswerDesc
:
JSON
.
parse
(
JSON
.
stringify
(
questionInfo
.
questionAnswerDescList
)
),
});
// 答案解析
);
this
.
_onSetState
();
}
return
true
;
...
...
@@ -175,8 +171,8 @@ class NewQuestionTab extends Component {
stem
=
stem
.
replace
(
/
\s
+/g
,
""
);
if
(
this
.
props
.
questionTypeKey
===
"GAP_FILLING"
)
{
if
(
this
.
state
.
blanksList
.
length
===
0
||
stem
.
length
===
0
)
{
this
.
setState
({
stemValidate
:
"error"
});
this
.
setState
({
stemValidate
:
"error"
,
stemText
:
(
<
div
style=
{
{
marginTop
:
8
,
minWidth
:
"523px"
}
}
>
请输入正确格式,示例:党章规定,凡事有
...
...
@@ -193,17 +189,14 @@ class NewQuestionTab extends Component {
});
validateError
++
;
}
else
{
this
.
setState
({
stemValidate
:
"success"
});
this
.
setState
({
stemText
:
""
});
this
.
setState
({
stemValidate
:
"success"
,
stemText
:
""
});
}
}
else
{
if
(
stem
.
length
===
0
)
{
this
.
setState
({
stemValidate
:
"error"
});
this
.
setState
({
stemText
:
"请输入题干"
});
this
.
setState
({
stemValidate
:
"error"
,
stemText
:
"请输入题干"
});
validateError
++
;
}
else
{
this
.
setState
({
stemValidate
:
"success"
});
this
.
setState
({
stemText
:
""
});
this
.
setState
({
stemValidate
:
"success"
,
stemText
:
""
});
}
}
// 选项校验
...
...
@@ -212,12 +205,16 @@ class NewQuestionTab extends Component {
if
(
this
.
props
.
questionTypeKey
===
"GAP_FILLING"
)
{
this
.
state
.
gapFillingAnswer
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
correctAnswerList
.
length
===
0
)
{
this
.
setState
({
[
`optionsValidate_
${
index
}
`
]:
"error"
});
this
.
setState
({
[
`optionsText_
${
index
}
`
]:
"请输入答案"
});
this
.
setState
({
[
`optionsValidate_
${
index
}
`
]:
"error"
,
[
`optionsText_
${
index
}
`
]:
"请输入答案"
,
});
validateError
++
;
}
else
{
this
.
setState
({
[
`optionsValidate_
${
index
}
`
]:
"success"
});
this
.
setState
({
[
`optionsText_
${
index
}
`
]:
""
});
this
.
setState
({
[
`optionsValidate_
${
index
}
`
]:
"success"
,
[
`optionsText_
${
index
}
`
]:
""
,
});
}
});
}
else
{
...
...
@@ -235,12 +232,16 @@ class NewQuestionTab extends Component {
optionContent
[
0
].
type
===
"RICH_TEXT"
&&
optionInput
.
length
===
0
)
{
this
.
setState
({
[
`optionsValidate_
${
index
}
`
]:
"error"
});
this
.
setState
({
[
`optionsText_
${
index
}
`
]:
"请输入选项"
});
this
.
setState
({
[
`optionsValidate_
${
index
}
`
]:
"error"
,
[
`optionsText_
${
index
}
`
]:
"请输入选项"
,
});
validateError
++
;
}
else
{
this
.
setState
({
[
`optionsValidate_
${
index
}
`
]:
"success"
});
this
.
setState
({
[
`optionsText_
${
index
}
`
]:
""
});
this
.
setState
({
[
`optionsValidate_
${
index
}
`
]:
"success"
,
[
`optionsText_
${
index
}
`
]:
""
,
});
}
});
var
chooseIcon
=
[];
...
...
@@ -254,11 +255,8 @@ class NewQuestionTab extends Component {
chooseIcon
=
document
.
getElementsByClassName
(
"ant-checkbox-inner"
);
}
if
(
optionUnChecked
===
chooseOptions
.
length
)
{
this
.
setState
({
radioValidate
:
"error"
});
chooseIcon
.
forEach
((
item
)
=>
{
item
.
setAttribute
(
"style"
,
"border:1px solid #ff4d4f;"
);
});
this
.
setState
({
radioValidate
:
"error"
,
radioText
:
(
<
span
>
正确答案
...
...
@@ -267,10 +265,12 @@ class NewQuestionTab extends Component {
</
span
>
),
});
chooseIcon
.
forEach
((
item
)
=>
{
item
.
setAttribute
(
"style"
,
"border:1px solid #ff4d4f;"
);
});
validateError
++
;
}
else
{
this
.
setState
({
radioValidate
:
"success"
});
this
.
setState
({
radioText
:
""
});
this
.
setState
({
radioValidate
:
"success"
,
radioText
:
""
});
chooseIcon
.
forEach
((
item
)
=>
{
item
.
removeAttribute
(
"style"
);
});
...
...
@@ -279,8 +279,7 @@ class NewQuestionTab extends Component {
this
.
props
.
questionTypeKey
===
"MULTI_CHOICE"
&&
this
.
state
.
chooseOptions
.
length
-
optionUnChecked
===
1
)
{
this
.
setState
({
radioValidate
:
"error"
});
this
.
setState
({
radioText
:
"最少选两个"
});
this
.
setState
({
radioValidate
:
"error"
,
radioText
:
"最少选两个"
});
chooseIcon
.
forEach
((
item
)
=>
{
item
.
setAttribute
(
"style"
,
"border:1px solid #ff4d4f;"
);
});
...
...
@@ -485,8 +484,6 @@ class NewQuestionTab extends Component {
// 录音
this
.
setState
({
showRecord
:
true
,
});
this
.
setState
({
onAudioFinish
:
function
()
{
change
();
},
...
...
@@ -582,27 +579,31 @@ class NewQuestionTab extends Component {
changeBlankCount
=
(
data
,
idx
)
=>
{
let
_gap
=
this
.
state
.
gapFillingAnswer
;
if
(
data
.
length
<=
idx
)
{
_gap
.
splice
(
idx
,
1
)
;
if
(
data
.
length
===
0
)
{
_gap
=
[]
;
}
else
{
data
.
forEach
((
item
,
index
)
=>
{
if
(
index
===
idx
)
{
if
(
_gap
.
length
<
data
.
length
)
{
_gap
.
splice
(
idx
,
0
,
{
correctAnswerList
:
[]
});
}
else
if
(
_gap
.
length
>
data
.
length
)
{
_gap
.
splice
(
idx
,
1
);
}
else
{
_gap
.
splice
(
idx
,
1
,
{
correctAnswerList
:
[]
});
if
(
data
.
length
<=
idx
)
{
_gap
.
splice
(
idx
,
1
);
}
else
{
data
.
forEach
((
item
,
index
)
=>
{
if
(
index
===
idx
)
{
if
(
_gap
.
length
<
data
.
length
)
{
_gap
.
splice
(
idx
,
0
,
{
correctAnswerList
:
[]
});
}
else
if
(
_gap
.
length
>
data
.
length
)
{
_gap
.
splice
(
idx
,
1
);
}
else
{
_gap
.
splice
(
idx
,
1
,
{
correctAnswerList
:
[]
});
}
}
}
if
(
!
item
.
correctAnswerList
)
{
item
.
correctAnswerList
=
[];
}
item
.
inputVisible
=
false
;
item
.
errorHold
=
false
;
item
.
editInput
=
false
;
return
item
;
}
);
if
(
!
item
.
correctAnswerList
)
{
item
.
correctAnswerList
=
[];
}
item
.
inputVisible
=
false
;
item
.
errorHold
=
false
;
item
.
editInput
=
false
;
return
item
;
})
;
}
}
this
.
setState
(
...
...
@@ -644,10 +645,10 @@ class NewQuestionTab extends Component {
}
});
this
.
setState
({
gapFillingAnswer
:
_gapFillingAnswer
},
()
=>
this
.
_onSetState
()
this
.
setState
(
{
gapFillingAnswer
:
_gapFillingAnswer
,
blanksList
:
_blanksList
},
()
=>
this
.
_onSetState
()
);
this
.
setState
({
blanksList
:
_blanksList
});
};
handleTagClose
=
(
optionItem
,
removedTag
,
removedIndex
)
=>
{
...
...
@@ -663,10 +664,10 @@ class NewQuestionTab extends Component {
);
}
});
this
.
setState
({
gapFillingAnswer
:
_gapFillingAnswer
},
()
=>
this
.
_onSetState
()
this
.
setState
(
{
gapFillingAnswer
:
_gapFillingAnswer
,
blanksList
:
_blanksList
},
()
=>
this
.
_onSetState
()
);
this
.
setState
({
blanksList
:
_blanksList
});
};
// 输入框关闭
...
...
src/modules/teach-tool/components/NewQuestionTab.less
→
src/modules/teach-tool/
question-bank/
components/NewQuestionTab.less
View file @
93766da8
File moved
src/modules/teach-tool/components/QuestionEditor.jsx
→
src/modules/teach-tool/
question-bank/
components/QuestionEditor.jsx
View file @
93766da8
File moved
src/modules/teach-tool/components/QuestionEditor.less
→
src/modules/teach-tool/
question-bank/
components/QuestionEditor.less
View file @
93766da8
File moved
src/modules/teach-tool/components/QuestionManageContent.jsx
→
src/modules/teach-tool/
question-bank/
components/QuestionManageContent.jsx
View file @
93766da8
File moved
src/modules/teach-tool/components/QuestionManageContent.less
→
src/modules/teach-tool/
question-bank/
components/QuestionManageContent.less
View file @
93766da8
File moved
src/modules/teach-tool/components/XMAudio.jsx
→
src/modules/teach-tool/
question-bank/
components/XMAudio.jsx
View file @
93766da8
...
...
@@ -8,16 +8,6 @@
import
React
,
{
useState
,
useEffect
,
useRef
}
from
"react"
;
import
"./XMAudio.less"
;
import
VideoUpload
from
"@/core/upload"
;
import
{
string
}
from
"prop-types"
;
// interface XMAudioProps {
// style?: any;
// index?: any;
// size?: number | string;
// url?: any;
// forbidParse?:boolean;
// getDuration?: (value: number) => void;
// }
let
timerInterval
;
...
...
src/modules/teach-tool/components/XMAudio.less
→
src/modules/teach-tool/
question-bank/
components/XMAudio.less
View file @
93766da8
File moved
src/modules/teach-tool/components/XMRecord.jsx
→
src/modules/teach-tool/
question-bank/
components/XMRecord.jsx
View file @
93766da8
File moved
src/modules/teach-tool/components/XMRecord.less
→
src/modules/teach-tool/
question-bank/
components/XMRecord.less
View file @
93766da8
File moved
src/modules/teach-tool/components/audioRecord.js
→
src/modules/teach-tool/
question-bank/
components/audioRecord.js
View file @
93766da8
File moved
src/modules/teach-tool/components/model.js
→
src/modules/teach-tool/
question-bank/
components/model.js
View file @
93766da8
/*
* @Author: chenjianyu
* @Date: 2020-09-12 17:00:44
* @LastEditTime: 2021-03-
18 17:23:09
* @LastEditors:
sunbingq
ing
* @LastEditTime: 2021-03-
27 14:02:17
* @LastEditors:
yuanant
ing
* @Description: 答题模式模板
* @Copyright © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
src/modules/teach-tool/modal/BatchImportQuestionModal.jsx
→
src/modules/teach-tool/
question-bank/
modal/BatchImportQuestionModal.jsx
View file @
93766da8
...
...
@@ -6,7 +6,7 @@
*/
import
React
,
{
Component
}
from
"react"
;
import
{
Modal
,
Button
,
Upload
,
message
,
Spin
,
Progress
}
from
"antd"
;
import
{
Modal
,
Button
,
message
,
Spin
}
from
"antd"
;
import
"./BatchImportQuestionModal.less"
;
import
SelectPrepareFileModal
from
"@/modules/prepare-lesson/modal/SelectPrepareFileModal"
;
import
User
from
"@/common/js/user"
;
...
...
@@ -222,9 +222,11 @@ class BatchImportQuestionModal extends Component {
type=
"primary"
className=
"down-btn"
onClick=
{
()
=>
{
this
.
setState
({
status
:
"init"
});
this
.
setState
({
uploadFile
:
null
});
this
.
setState
({
showSelectFileModal
:
true
});
this
.
setState
({
status
:
"init"
,
uploadFile
:
null
,
showSelectFileModal
:
true
,
});
}
}
>
重新上传文件
...
...
src/modules/teach-tool/modal/BatchImportQuestionModal.less
→
src/modules/teach-tool/
question-bank/
modal/BatchImportQuestionModal.less
View file @
93766da8
@import '../../../core/mixins.less';
@import '@/core/mixins.less';
.import-score-modal {
.step-section {
margin-bottom: 24px;
...
...
src/modules/teach-tool/modal/QuestionPreviewModal.jsx
→
src/modules/teach-tool/
question-bank/
modal/QuestionPreviewModal.jsx
View file @
93766da8
File moved
src/modules/teach-tool/modal/QuestionPreviewModal.less
→
src/modules/teach-tool/
question-bank/
modal/QuestionPreviewModal.less
View file @
93766da8
File moved
src/routes/config/mainRoutes.tsx
View file @
93766da8
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-04-29 10:26:32
* @LastEditors: yuananting
* @LastEditTime: 2021-03-
18 11:30:15
* @LastEditTime: 2021-03-
27 11:38:59
* @Description: 内容线路由配置
*/
import
Home
from
'@/modules/home/Home'
;
...
...
@@ -25,9 +25,9 @@ import PlanPage from '@/modules/plan-manage/PlanPage';
import
AddPlanPage
from
'@/modules/plan-manage/AddPlan'
;
import
LearningDataPage
from
'@/modules/plan-manage/LearningData'
;
import
StoreInfoPage
from
'@/modules/store-manage/StoreInfo'
;
import
QuestionBankIndex
from
'@/modules/teach-tool/QuestionBankIndex'
;
import
QuestionCategoryManage
from
'@/modules/teach-tool/Question
CategoryManage'
;
import
AddNewQuestion
from
'@/modules/teach-tool/AddNewQuestion'
;
import
QuestionBankIndex
from
'@/modules/teach-tool/
question-bank/
QuestionBankIndex'
;
import
CourseCategoryManage
from
'@/modules/teach-tool/components/Course
CategoryManage'
;
import
AddNewQuestion
from
'@/modules/teach-tool/
question-bank/
AddNewQuestion'
;
const
mainRoutes
=
[
{
...
...
@@ -101,8 +101,8 @@ const mainRoutes = [
name
:
'题库'
},
{
path
:
'/
question
-category-manage'
,
component
:
Question
CategoryManage
,
path
:
'/
course
-category-manage'
,
component
:
Course
CategoryManage
,
name
:
'分类管理'
},
{
...
...
src/routes/config/menuList.tsx
View file @
93766da8
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-21 15:53:31
* @LastEditors: yuananting
* @LastEditTime: 2021-03-
19 15:31:56
* @LastEditTime: 2021-03-
27 11:50:31
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -93,7 +93,7 @@ export const menuList: any = [
{
groupName
:
"课程分类"
,
groupCode
:
"CourseCategory"
,
link
:
'/
question
-category-manage'
link
:
'/
course
-category-manage'
},
{
groupName
:
"店铺装修"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment