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
0e1a2057
Commit
0e1a2057
authored
Mar 18, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:云盘上传文件
parent
83229b62
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
152 additions
and
82 deletions
+152
-82
src/common/constants/punchClock/punchClock.js
+7
-1
src/modules/teach-tool/AddNewQuestion.jsx
+67
-28
src/modules/teach-tool/AddNewQuestion.less
+2
-2
src/modules/teach-tool/QuestionBankIndex.jsx
+1
-1
src/modules/teach-tool/QuestionBankIndex.less
+2
-2
src/modules/teach-tool/QuestionCategoryManage.less
+2
-2
src/modules/teach-tool/components/NewQuestionTab.jsx
+0
-0
src/modules/teach-tool/components/QuestionBankSider.jsx
+1
-1
src/modules/teach-tool/components/QuestionBankSider.less
+2
-2
src/modules/teach-tool/components/QuestionEditor.jsx
+33
-26
src/modules/teach-tool/components/QuestionManageContent.jsx
+13
-13
src/modules/teach-tool/components/model.js
+15
-2
src/modules/teach-tool/modal/BatchImportQuestionModal.jsx
+6
-1
src/modules/teach-tool/modal/NewEditQuestionBankCategory.jsx
+1
-1
No files found.
src/common/constants/punchClock/punchClock.js
View file @
0e1a2057
/*
* @Author: 陈剑宇
* @Date: 2020-10-28 14:27:07
* @LastEditTime: 2021-0
2-28 14:22:13
* @LastEditTime: 2021-0
3-17 20:27:44
* @LastEditors: yuananting
* @Description:
* @FilePath: /xiaomai-web-b/app/common/constants/punchClock/punchClock.js
...
...
@@ -113,6 +113,12 @@ export const FILE_ACCEPT = {
VOICE
:
'audio/x-mpeg,audio/mp3,audio/mpeg,audio/wav,audio/x-m4a'
}
export
const
MEDIA_FILE_ACCEPT
=
{
PICTURE
:
'JPG,JPEG,PNG,BMP,GIF'
,
VIDEO
:
'MP4'
,
VOICE
:
'MP3'
}
export
const
QUESTION_FILE_ACCEPT
=
{
PICTURE
:
'image/jpg,image/jpeg,image/png,image/gif'
,
VIDEO
:
'audio/mp4,video/mp4'
,
...
...
src/modules/teach-tool/AddNewQuestion.jsx
View file @
0e1a2057
...
...
@@ -2,12 +2,12 @@
* @Author: yuananting
* @Date: 2021-02-25 13:46:35
* @LastEditors: yuananting
* @LastEditTime: 2021-03-1
7 10:45:10
* @LastEditTime: 2021-03-1
8 09:32:02
* @Description: 助学工具-题库-题目管理-新增题目
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
Component
}
from
"react"
;
import
{
Tabs
,
Button
,
Tooltip
,
message
}
from
"antd"
;
import
{
Tabs
,
Button
,
Tooltip
,
message
,
Modal
}
from
"antd"
;
import
Breadcrumbs
from
"@/components/Breadcrumbs"
;
import
ShowTips
from
"@/components/ShowTips"
;
import
"./AddNewQuestion.less"
;
...
...
@@ -21,8 +21,16 @@ const { TabPane } = Tabs;
class
AddNewQuestion
extends
Component
{
constructor
(
props
)
{
super
(
props
);
let
activeKey
=
""
if
(
getParameterByName
(
"type"
))
{
activeKey
=
getParameterByName
(
"type"
)
}
else
if
(
getParameterByName
(
"key"
))
{
activeKey
=
getParameterByName
(
"key"
)
}
else
{
activeKey
=
"SINGLE_CHOICE"
}
this
.
state
=
{
activeKey
:
getParameterByName
(
"type"
)
||
"SINGLE_CHOICE"
,
activeKey
:
activeKey
,
// 构建题目基本结构
singleChoiceContent
:
defineQuestionInfo
(
"SINGLE_CHOICE"
),
// 单选题
multiChoiceContent
:
defineQuestionInfo
(
"MULTI_CHOICE"
),
// 多选题
...
...
@@ -69,7 +77,7 @@ class AddNewQuestion extends Component {
});
};
saveCurrentQuestion
=
(
content
)
=>
{
saveCurrentQuestion
=
(
content
,
type
,
next
)
=>
{
content
.
questionStemList
.
map
((
item
,
index
)
=>
{
item
.
sort
=
index
;
return
item
;
...
...
@@ -101,9 +109,16 @@ class AddNewQuestion extends Component {
QuestionBankService
.
editQuestion
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
message
.
success
(
"保存成功"
);
window
.
RCHistory
.
push
({
pathname
:
`/question-bank-index?categoryId=
${
params
.
categoryId
}
`
,
});
if
(
next
===
'add'
)
{
window
.
RCHistory
.
push
({
pathname
:
`/create-new-question?categoryId=
${
params
.
categoryId
}
&key=
${
type
}
`
,
});
}
if
(
next
===
'close'
)
{
window
.
RCHistory
.
push
({
pathname
:
`/question-bank-index?categoryId=
${
params
.
categoryId
}
`
,
});
}
}
});
}
else
{
...
...
@@ -117,15 +132,36 @@ class AddNewQuestion extends Component {
QuestionBankService
.
addQuestion
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
message
.
success
(
"保存成功"
);
window
.
RCHistory
.
push
({
pathname
:
`/question-bank-index?categoryId=
${
params
.
categoryId
}
`
,
});
if
(
next
===
'add'
)
{
window
.
RCHistory
.
push
({
pathname
:
`/create-new-question?categoryId=
${
params
.
categoryId
}
&key=
${
type
}
`
,
});
}
if
(
next
===
'close'
)
{
window
.
RCHistory
.
push
({
pathname
:
`/question-bank-index?categoryId=
${
params
.
categoryId
}
`
,
});
}
}
});
}
};
confirmSaveQuestion
=
()
=>
{
// 取消编辑并返回上一级路由
handleGoBack
=
()
=>
{
Modal
.
confirm
({
title
:
'确定要返回吗?'
,
content
:
'返回后,本次编辑的内容将不被保存'
,
okText
:
'确认返回'
,
cancelText
:
'留在本页'
,
icon
:
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>,
onOk
:
()
=>
{
window
.
RCHistory
.
goBack
();
}
})
}
confirmSaveQuestion
=
(
next
)
=>
{
const
{
singleChoiceContent
,
multiChoiceContent
,
...
...
@@ -136,27 +172,27 @@ class AddNewQuestion extends Component {
switch
(
this
.
state
.
activeKey
)
{
case
"SINGLE_CHOICE"
:
if
(
this
.
singleChoiceRef
.
checkInput
()
===
0
)
{
this
.
saveCurrentQuestion
(
singleChoiceContent
);
this
.
saveCurrentQuestion
(
singleChoiceContent
,
"SINGLE_CHOICE"
,
next
);
}
break
;
case
"MULTI_CHOICE"
:
if
(
this
.
multiChoiceRef
.
checkInput
()
===
0
)
{
this
.
saveCurrentQuestion
(
multiChoiceContent
);
this
.
saveCurrentQuestion
(
multiChoiceContent
,
"MULTI_CHOICE"
,
next
);
}
break
;
case
"JUDGE"
:
if
(
this
.
judgeRef
.
checkInput
()
===
0
)
{
this
.
saveCurrentQuestion
(
judgeContent
);
this
.
saveCurrentQuestion
(
judgeContent
,
"JUDGE"
,
next
);
}
break
;
case
"GAP_FILLING"
:
if
(
this
.
gapRef
.
checkInput
()
===
0
)
{
this
.
saveCurrentQuestion
(
gapFillingConten
t
);
}
//
if (this.gapRef.checkInput() === 0) {
this
.
saveCurrentQuestion
(
gapFillingContent
,
"GAP_FILLING"
,
nex
t
);
//
}
break
;
case
"INDEFINITE_CHOICE"
:
if
(
this
.
indefiniteRef
.
checkInput
()
===
0
)
{
this
.
saveCurrentQuestion
(
indefiniteChoiceContent
);
this
.
saveCurrentQuestion
(
indefiniteChoiceContent
,
"INDEFINITE_CHOICE"
,
next
);
}
break
;
}
...
...
@@ -180,7 +216,7 @@ class AddNewQuestion extends Component {
<
div
className=
"page add-new-question"
>
<
Breadcrumbs
navList=
{
getParameterByName
(
"id"
)
?
"编辑题目"
:
"新增题目"
}
goBack=
{
()
=>
RCHistory
.
g
oBack
()
}
goBack=
{
()
=>
this
.
handleG
oBack
()
}
/>
<
div
className=
"box"
>
<
div
className=
"show-tips"
>
...
...
@@ -198,12 +234,13 @@ class AddNewQuestion extends Component {
key=
"SINGLE_CHOICE"
>
<
NewQuestionTab
questionTypeKey=
"SINGLE_CHOICE"
questionTypeKey=
{
activeKey
}
onRef=
{
(
ref
)
=>
{
this
.
singleChoiceRef
=
ref
;
}
}
questionInfo=
{
singleChoiceContent
}
onSetState=
{
(
newContent
)
=>
{
console
.
log
(
"newContent:"
,
newContent
)
Object
.
assign
(
singleChoiceContent
,
newContent
);
}
}
onLogger=
{
this
.
handleLogger
}
...
...
@@ -214,7 +251,7 @@ class AddNewQuestion extends Component {
key=
"MULTI_CHOICE"
>
<
NewQuestionTab
questionTypeKey=
"MULTI_CHOICE"
questionTypeKey=
{
activeKey
}
onRef=
{
(
ref
)
=>
{
this
.
multiChoiceRef
=
ref
;
}
}
...
...
@@ -230,7 +267,7 @@ class AddNewQuestion extends Component {
key=
"JUDGE"
>
<
NewQuestionTab
questionTypeKey=
"JUDGE"
questionTypeKey=
{
activeKey
}
onRef=
{
(
ref
)
=>
{
this
.
judgeRef
=
ref
;
}
}
...
...
@@ -245,14 +282,14 @@ class AddNewQuestion extends Component {
key=
"GAP_FILLING"
>
<
NewQuestionTab
questionTypeKey=
"GAP_FILLING"
questionTypeKey=
{
activeKey
}
onRef=
{
(
ref
)
=>
{
this
.
gapRef
=
ref
;
}
}
questionInfo=
{
gapFillingContent
}
onSetState=
{
(
newContent
)
=>
{
Object
.
assign
(
gapFillingContent
,
newContent
);
console
.
log
(
"gapFillingContent:"
,
gapFilling
Content
);
console
.
log
(
"gapFillingContent:"
,
new
Content
);
}
}
/>
</
TabPane
>
...
...
@@ -268,7 +305,7 @@ class AddNewQuestion extends Component {
key=
"INDEFINITE_CHOICE"
>
<
NewQuestionTab
questionTypeKey=
"INDEFINITE_CHOICE"
questionTypeKey=
{
activeKey
}
onRef=
{
(
ref
)
=>
{
this
.
indefiniteRef
=
ref
;
}
}
...
...
@@ -282,12 +319,14 @@ class AddNewQuestion extends Component {
</
Tabs
>
</
div
>
<
div
className=
"footer"
>
<
Button
>
取消
</
Button
>
<
Button
>
保存并继续添加
</
Button
>
<
Button
onClick=
{
()
=>
{
this
.
handleGoBack
()
}
}
>
取消
</
Button
>
<
Button
onClick=
{
()
=>
{
this
.
confirmSaveQuestion
(
"add"
);
}
}
>
保存并继续添加
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
this
.
confirmSaveQuestion
();
this
.
confirmSaveQuestion
(
"close"
);
}
}
>
保存
...
...
src/modules/teach-tool/AddNewQuestion.less
View file @
0e1a2057
...
...
@@ -2,11 +2,11 @@
* @Author: yuananting
* @Date: 2021-02-25 13:52:01
* @LastEditors: yuananting
* @LastEditTime: 2021-03-
08 19:07:56
* @LastEditTime: 2021-03-
18 09:32:11
* @Description: 助学工具-题库-题目管理-新增题目样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
.add-new-question {
.add-new-question {
position: relative !important;
.box {
margin-bottom: 66px !important;
...
...
src/modules/teach-tool/QuestionBankIndex.jsx
View file @
0e1a2057
...
...
@@ -33,7 +33,7 @@ class QuestionBankIndex extends Component {
}
};
updatedSiderTreeFromList
=
(
updatedCategoryId
)
=>
{
updatedSiderTreeFromList
=
(
updatedCategoryId
)
=>
{
this
.
setState
({
updatedCategoryId
});
};
...
...
src/modules/teach-tool/QuestionBankIndex.less
View file @
0e1a2057
...
...
@@ -2,11 +2,11 @@
* @Author: yuananting
* @Date: 2021-02-21 18:27:43
* @LastEditors: yuananting
* @LastEditTime: 2021-03-1
1 19:10:4
4
* @LastEditTime: 2021-03-1
8 09:32:2
4
* @Description: 助学工具-题库-题库主页面样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
.question-bank-index {
.question-bank-index {
.content-body {
display: flex;
.site-layout-background {
...
...
src/modules/teach-tool/QuestionCategoryManage.less
View file @
0e1a2057
...
...
@@ -2,11 +2,11 @@
* @Author: yuananting
* @Date: 2021-02-23 19:41:42
* @LastEditors: yuananting
* @LastEditTime: 2021-03-
05 09:34:00
* @LastEditTime: 2021-03-
18 09:32:37
* @Description: 助学工具-题库-题目分类管理样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
.question-category-manage {
.question-category-manage {
position: relative;
.search-condition {
width: 30%;
...
...
src/modules/teach-tool/components/NewQuestionTab.jsx
View file @
0e1a2057
This diff is collapsed.
Click to expand it.
src/modules/teach-tool/components/QuestionBankSider.jsx
View file @
0e1a2057
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-22 10:59:43
* @LastEditors: yuananting
* @LastEditTime: 2021-03-1
5 15:22:13
* @LastEditTime: 2021-03-1
8 09:33:50
* @Description: 助学工具-题库-题库主页面侧边栏
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
src/modules/teach-tool/components/QuestionBankSider.less
View file @
0e1a2057
...
...
@@ -2,11 +2,11 @@
* @Author: yuananting
* @Date: 2021-02-22 12:02:34
* @LastEditors: yuananting
* @LastEditTime: 2021-03-1
1 20:29:44
* @LastEditTime: 2021-03-1
8 09:34:06
* @Description: 助学工具-题库-题库主页面侧边栏样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
.question-bank-sider {
.question-bank-sider {
position: relative;
.sider-title {
height: 22px;
...
...
src/modules/teach-tool/components/QuestionEditor.jsx
View file @
0e1a2057
...
...
@@ -49,9 +49,15 @@ class QuestionEditor extends Component {
this
.
renderEditor
();
}
static
getDerivedStateFromProps
(
nextProps
,
prevState
)
{
return
{
detailInfo
:
nextProps
.
detailInfo
}
}
shouldComponentUpdate
(
nextProps
,
nextState
)
{
const
{
detailInfo
}
=
nextProps
;
if
(
this
.
props
.
detailInfo
!==
detailInfo
)
{
if
(
this
.
state
.
detailInfo
!==
detailInfo
)
{
this
.
setState
({
detailInfo
:
nextProps
.
detailInfo
},
()
=>
{
this
.
renderEditor
();
});
...
...
@@ -127,7 +133,6 @@ class QuestionEditor extends Component {
};
editorRoot
.
customConfig
.
onchange
=
(
html
)
=>
{
console
.
log
(
"触发:+——+++++++"
,
this
.
state
.
blanksList
);
const
{
focusFlag
}
=
this
.
state
;
const
textLength
=
editorRoot
.
txt
.
text
().
replace
(
/
\&
nbsp
\;
/gi
,
" "
)
.
length
;
...
...
@@ -174,27 +179,27 @@ class QuestionEditor extends Component {
editorRoot
.
create
();
this
.
editorRoot
=
editorRoot
;
if
(
detailInfo
.
content
)
{
const
contentHtml
=
/^
\<
p/
.
test
(
detailInfo
.
content
)
?
detailInfo
.
content
:
`<p>
${
detailInfo
.
content
}
</p>`
;
editorRoot
.
txt
.
html
(
detailInfo
.
content
);
const
textLength
=
editorRoot
.
txt
.
text
().
replace
(
/
\&
nbsp
\;
/gi
,
" "
)
.
length
;
const
imgLength
=
contentHtml
.
match
(
/<img/g
)
?
contentHtml
.
match
(
/<img/g
).
length
*
2
:
0
;
const
contentLength
=
imgLength
+
textLength
;
this
.
setState
(
{
contentLength
,
visiblePlacehold
:
contentLength
===
0
&&
!
this
.
state
.
focusFlag
,
},
()
=>
{
onChange
&&
onChange
(
contentHtml
,
this
.
state
.
contentLength
);
}
);
}
// if (detailInfo &&
detailInfo.content) {
const
contentHtml
=
/^
\<
p/
.
test
(
detailInfo
.
content
)
?
detailInfo
.
content
:
`<p>
${
detailInfo
.
content
}
</p>`
;
editorRoot
.
txt
.
html
(
detailInfo
.
content
);
const
textLength
=
editorRoot
.
txt
.
text
().
replace
(
/
\&
nbsp
\;
/gi
,
" "
)
.
length
;
const
imgLength
=
contentHtml
.
match
(
/<img/g
)
?
contentHtml
.
match
(
/<img/g
).
length
*
2
:
0
;
const
contentLength
=
imgLength
+
textLength
;
this
.
setState
(
{
contentLength
,
visiblePlacehold
:
contentLength
===
0
&&
!
this
.
state
.
focusFlag
,
},
()
=>
{
onChange
&&
onChange
(
contentHtml
,
this
.
state
.
contentLength
);
}
);
//
}
bindChangeContent
&&
bindChangeContent
(
this
.
handleChangeContent
);
}
...
...
@@ -207,6 +212,9 @@ class QuestionEditor extends Component {
var
_blanksList
=
[];
_blanksList
=
document
.
getElementsByClassName
(
"add-fill-line"
);
this
.
setState
({
blanksList
:
_blanksList
});
this
.
setState
({
visiblePlacehold
:
false
,
});
// this.props.changeBlankCount(_blanksList);
};
...
...
@@ -288,9 +296,8 @@ class QuestionEditor extends Component {
</
div
>
)
}
<
div
className=
{
`editor-limit-tip${
contentLength > limitLength ? " mt6" : ""
}`
}
className=
{
`editor-limit-tip${contentLength > limitLength ? " mt6" : ""
}`
}
style=
{
{
height
:
contentLength
>
limitLength
?
20
:
0
}
}
>
最多只能输入1000字
...
...
src/modules/teach-tool/components/QuestionManageContent.jsx
View file @
0e1a2057
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-03-1
7 12:43:5
3
* @LastEditTime: 2021-03-1
8 09:35:0
3
* @Description: 助学工具-题库-题目管理主页面列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -84,7 +84,7 @@ class QuestionManageContent extends Component {
};
}
componentDidMount
()
{}
componentDidMount
()
{
}
shouldComponentUpdate
(
nextProps
,
nextState
)
{
const
{
selectedCategoryId
}
=
nextProps
;
...
...
@@ -211,6 +211,8 @@ class QuestionManageContent extends Component {
// 表头设置
parseColumns
=
()
=>
{
const
isPermiss
=
[
"CloudManager"
,
"StoreManager"
].
includes
(
User
.
getUserRole
());
console
.
log
(
isPermiss
,
User
.
getUserRole
())
const
columns
=
[
{
title
:
"题目"
,
...
...
@@ -273,22 +275,22 @@ class QuestionManageContent extends Component {
>
预览
</
div
>
<
span
className=
"record-operate__item split"
>
|
</
span
>
<
div
{
isPermiss
&&
<
span
className=
"record-operate__item split"
>
|
</
span
>
}
{
isPermiss
&&
<
div
className=
"record-operate__item"
onClick=
{
()
=>
this
.
toEditQuetion
(
record
.
id
,
record
.
questionTypeEnum
)
}
>
编辑
</
div
>
<
span
className=
"record-operate__item split"
>
|
</
span
>
<
div
</
div
>
}
{
isPermiss
&&
<
span
className=
"record-operate__item split"
>
|
</
span
>
}
{
isPermiss
&&
<
div
className=
"record-operate__item"
onClick=
{
()
=>
this
.
delCategoryConfirm
(
record
)
}
>
删除
</
div
>
</
div
>
}
</
div
>
);
},
...
...
@@ -311,9 +313,7 @@ class QuestionManageContent extends Component {
<
span
className=
"empty-list-tip"
onClick=
{
()
=>
{
window
.
RCHistory
.
push
({
pathname
:
"/create-question-bank"
,
});
this
.
handleCreateQuestionBank
()
}
}
>
新建一个
...
...
@@ -356,7 +356,7 @@ class QuestionManageContent extends Component {
const
ImportQuestionModal
=
(
<
BatchImportQuestionModal
close=
{
()
=>
{
this
.
setState
({
ImportQuestionModal
:
null
});
this
.
setState
({
ImportQuestionModal
:
null
}
,
()
=>
{
this
.
queryQuestionPageList
();
this
.
props
.
updatedSiderTree
(
this
.
props
.
selectedCategoryId
)
}
);
}
}
categoryId=
{
categoryId
}
/>
...
...
@@ -430,7 +430,7 @@ class QuestionManageContent extends Component {
</
div
>
</
Row
>
</
div
>
{
!
[
"0"
,
null
].
includes
(
categoryId
)
&&
(
{
([
"CloudManager"
,
"StoreManager"
].
includes
(
User
.
getUserRole
())
&&
!
[
"0"
,
null
].
includes
(
categoryId
)
)
&&
(
<
Space
size=
"large"
>
<
Button
type=
"primary"
onClick=
{
this
.
handleCreateQuestionBank
}
>
新建题目
...
...
src/modules/teach-tool/components/model.js
View file @
0e1a2057
/*
* @Author: chenjianyu
* @Date: 2020-09-12 17:00:44
* @LastEditTime: 2021-03-1
5 13:00:10
* @LastEditTime: 2021-03-1
8 09:33:26
* @LastEditors: yuananting
* @Description: 答题模式模板
* @Copyright © 2020 杭州杰竞科技有限公司 版权所有
...
...
@@ -54,7 +54,7 @@ export function defineQuestionInfo(questionType) {
type
:
"RICH_TEXT"
,
// 内容项形式(0:富文本 1:文字 2:图片 3:语音 4:视频 5文件 6.课件)
}
],
// 题干
optionList
:
[],
// 非填空题选项
optionList
:
questionType
===
"JUDGE"
?
[]
:
[],
// 非填空题选项
gapFillingAnswerList
:
[
{
correctAnswerList
:
[]
...
...
@@ -84,6 +84,19 @@ export function defineOptionInfo() {
}
}
export
function
defineJudgeOptionInfo
(
content
)
{
return
{
isCorrectAnswer
:
0
,
// 是否为正确答案选项
questionOptionContentList
:
[
// 选项内容
{
contentType
:
"QUESTION_OPTION"
,
// 内容类型(默认选项)
content
,
// 内容
type
:
"RICH_TEXT"
,
}
]
}
}
export
function
defineOptionData
(
content
=
''
)
{
return
{
itemContentVOList
:
[{
...
...
src/modules/teach-tool/modal/BatchImportQuestionModal.jsx
View file @
0e1a2057
...
...
@@ -101,6 +101,7 @@ class BatchImportQuestionModal extends Component {
return
(
<
div
>
<
Modal
closable=
{
status
!==
"uploading"
}
className=
"import-score-modal"
title=
"导入题目信息"
visible=
{
true
}
...
...
@@ -218,7 +219,11 @@ class BatchImportQuestionModal extends Component {
<
Button
type=
"primary"
className=
"down-btn"
// onClick=
{}
onClick=
{
()
=>
{
this
.
setState
({
status
:
"init"
})
this
.
setState
({
uploadFile
:
null
})
this
.
setState
({
showSelectFileModal
:
true
})
}
}
>
重新上传文件
</
Button
>
...
...
src/modules/teach-tool/modal/NewEditQuestionBankCategory.jsx
View file @
0e1a2057
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-02-22 17:51:28
* @LastEditors: yuananting
* @LastEditTime: 2021-03-1
5 09:56
:59
* @LastEditTime: 2021-03-1
8 09:32
:59
* @Description: 助学工具-题库-题库新建或编辑题库分类模态框
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
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