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
de92f985
Commit
de92f985
authored
Apr 02, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:编辑预览接口联调
parent
8bde2114
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
11 deletions
+49
-11
src/data-source/aidTool/request-apis.ts
+6
-1
src/domains/aid-tool-domain/AidToolService.ts
+26
-2
src/modules/teach-tool/examination-paper/NewExaminationPaper.jsx
+0
-0
src/modules/teach-tool/examination-paper/modal/PaperPreviewModal.jsx
+2
-4
src/modules/teach-tool/examination-paper/modal/SelectQuestionModal.jsx
+15
-4
No files found.
src/data-source/aidTool/request-apis.ts
View file @
de92f985
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-03 15:13:12
* @LastEditors: yuananting
* @LastEditTime: 2021-04-0
1 15:36:48
* @LastEditTime: 2021-04-0
2 14:12:49
* @Description: 助学工具接口
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -71,4 +71,8 @@ export function queryPaperDetail(params: object) {
export
function
viewPaper
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/viewPaper"
,
params
);
}
export
function
editPaper
(
params
:
object
)
{
return
Service
.
Hades
(
"public/hades/editPaper"
,
params
);
}
\ No newline at end of file
src/domains/aid-tool-domain/AidToolService.ts
View file @
de92f985
...
...
@@ -2,11 +2,29 @@
* @Author: yuananting
* @Date: 2021-03-11 11:34:37
* @LastEditors: yuananting
* @LastEditTime: 2021-04-0
1 20:09:12
* @LastEditTime: 2021-04-0
2 14:14:06
* @Description: 助学工具接口
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
{
queryCategoryTree
,
addCategory
,
delCategory
,
editCategory
,
editCategoryTree
,
addQuestion
,
queryQuestionPageList
,
deleteQuestion
,
queryQuestionDetails
,
editQuestion
,
batchImport
,
createPaper
,
queryPaperPageList
,
deletePaper
,
queryPaperDetail
,
viewPaper
}
from
'@/data-source/aidTool/request-apis'
;
import
{
queryCategoryTree
,
addCategory
,
delCategory
,
editCategory
,
editCategoryTree
,
addQuestion
,
queryQuestionPageList
,
deleteQuestion
,
queryQuestionDetails
,
editQuestion
,
batchImport
,
createPaper
,
queryPaperPageList
,
deletePaper
,
queryPaperDetail
,
viewPaper
,
editPaper
}
from
'@/data-source/aidTool/request-apis'
;
export
default
class
AidToolService
{
// 获取题目分类树
static
queryCategoryTree
(
params
:
any
)
{
...
...
@@ -87,4 +105,9 @@ export default class AidToolService {
static
viewPaper
(
params
:
any
)
{
return
viewPaper
(
params
);
}
// 编辑试卷
static
editPaper
(
params
:
any
)
{
return
editPaper
(
params
);
}
}
\ No newline at end of file
src/modules/teach-tool/examination-paper/NewExaminationPaper.jsx
View file @
de92f985
This diff is collapsed.
Click to expand it.
src/modules/teach-tool/examination-paper/modal/PaperPreviewModal.jsx
View file @
de92f985
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-27 11:15:03
* @LastEditors: yuananting
* @LastEditTime: 2021-04-02 1
2:42:42
* @LastEditTime: 2021-04-02 1
5:07:17
* @Description: 助学工具-试卷-预览试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -145,7 +145,6 @@ class PaperPreviewModal extends Component {
if
(
questionType
===
"GAP_FILLING"
)
{
{
_
.
map
(
gapFillingAnswerList
,
(
gapItem
,
gapIndex
)
=>
{
console
.
log
(
"gapFillingAnswerList"
,
gapFillingAnswerList
)
const
{
correctAnswerList
}
=
gapItem
;
return
(
<
div
>
...
...
@@ -157,7 +156,6 @@ class PaperPreviewModal extends Component {
);
});
}
// this.renderGapFillingAnswer(gapFillingAnswerList)
}
else
{
const
correctAnswerOption
=
_
.
filter
(
optionList
,
...
...
@@ -171,7 +169,7 @@ class PaperPreviewModal extends Component {
return
(
<
div
className=
"answer-line__item"
>
<
span
>
正确答案
</
span
>
<
span
>
【
{
correctOptionSort
.
join
(
"、"
)
}
】
</
span
>
{
/* <span>【{correctOptionSort.join("、")}】</span> */
}
</
div
>
);
}
...
...
src/modules/teach-tool/examination-paper/modal/SelectQuestionModal.jsx
View file @
de92f985
...
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Date: 2021-03-29 10:52:26
* @LastEditors: yuananting
* @LastEditTime: 2021-04-0
1 14:01:0
6
* @LastEditTime: 2021-04-0
2 19:41:2
6
* @Description: 助学工具-新建试卷-选择题目弹窗
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -21,6 +21,16 @@ class SelectQuestionModal extends Component {
};
}
componentDidMount
()
{
this
.
listRef
.
current
.
state
.
selectQuestionKeys
=
this
.
props
.
getSelectedQuestion
.
map
(
(
item
)
=>
{
item
.
id
=
item
.
questionId
;
item
.
questionTypeEnum
=
item
.
questionType
;
return
item
;
}
);
}
getCategoryIdFromSider
=
(
selectedCategoryId
)
=>
{
if
(
selectedCategoryId
&&
selectedCategoryId
.
length
>
0
)
{
this
.
setState
({
selectedCategoryId
:
selectedCategoryId
[
0
]
});
...
...
@@ -37,14 +47,15 @@ class SelectQuestionModal extends Component {
onOk=
{
()
=>
{
this
.
props
.
setSelectedQuestion
(
this
.
listRef
.
current
.
state
.
selectQuestionKeys
.
map
((
item
)
=>
{
item
.
questionType
=
item
.
questionTypeEnum
;
item
.
score
=
2
;
item
.
questionId
=
item
.
id
||
item
.
questionId
;
item
.
questionType
=
item
.
questionTypeEnum
||
item
.
questionType
;
item
.
score
=
item
.
score
||
2
;
if
(
[
"MULTI_CHOICE"
,
"GAP_FILLING"
,
"INDEFINITE_CHOICE"
].
includes
(
item
.
questionTypeEnum
)
)
{
item
.
portionScore
=
0
;
item
.
portionScore
=
item
.
portionScore
||
0
;
}
return
item
;
})
...
...
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