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
3935654b
Commit
3935654b
authored
Mar 27, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:i初始化组卷
parent
82ef7d81
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
725 additions
and
20 deletions
+725
-20
src/domains/basic-domain/constants.ts
+2
-2
src/modules/teach-tool/examination-paper/ExaminationPaperIndex.jsx
+63
-0
src/modules/teach-tool/examination-paper/ExaminationPaperIndex.less
+24
-0
src/modules/teach-tool/examination-paper/NewExaminationPaper.jsx
+128
-0
src/modules/teach-tool/examination-paper/NewExaminationPaper.less
+34
-0
src/modules/teach-tool/examination-paper/components/ExaminationPaperContent.jsx
+346
-0
src/modules/teach-tool/examination-paper/components/ExaminationPaperContent.less
+88
-0
src/modules/teach-tool/question-bank/QuestionBankIndex.jsx
+3
-3
src/modules/teach-tool/question-bank/components/QuestionManageContent.jsx
+5
-5
src/modules/teach-tool/question-bank/modal/QuestionPreviewModal.jsx
+1
-1
src/routes/config/mainRoutes.tsx
+19
-7
src/routes/config/menuList.tsx
+12
-2
No files found.
src/domains/basic-domain/constants.ts
View file @
3935654b
/*
/*
* @Author: 陈剑宇
* @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01
* @Date: 2020-05-07 14:43:01
* @LastEditTime: 2021-03-
19 10:25:06
* @LastEditTime: 2021-03-
27 14:25:54
* @LastEditors: yuananting
* @LastEditors: yuananting
* @Description:
* @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
import
{
MapInterface
}
from
'@/domains/basic-domain/interface'
import
{
MapInterface
}
from
'@/domains/basic-domain/interface'
// 默认是 dev 环境
// 默认是 dev 环境
const
ENV
:
string
=
process
.
env
.
DEPLOY_ENV
||
'
gray
'
;
const
ENV
:
string
=
process
.
env
.
DEPLOY_ENV
||
'
dev
'
;
console
.
log
(
"process.env.DEPLOY_ENV"
,
process
)
console
.
log
(
"process.env.DEPLOY_ENV"
,
process
)
const
BASIC_HOST_MAP
:
MapInterface
=
{
const
BASIC_HOST_MAP
:
MapInterface
=
{
dev
:
'https://dev-heimdall.xiaomai5.com/'
,
dev
:
'https://dev-heimdall.xiaomai5.com/'
,
...
...
src/modules/teach-tool/examination-paper/ExaminationPaperIndex.jsx
0 → 100644
View file @
3935654b
/*
* @Author: yuananting
* @Date: 2021-03-27 14:55:14
* @LastEditors: yuananting
* @LastEditTime: 2021-03-27 15:21:06
* @Description: 助学工具-试卷主页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
Component
}
from
"react"
;
import
"./ExaminationPaperIndex.less"
;
import
CourseCategorySiderTree
from
"../components/CourseCategorySiderTree"
;
import
ExaminationPaperContent
from
"./components/ExaminationPaperContent"
;
class
ExaminationPaperIndex
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
selectedCategoryId
:
""
,
};
}
componentDidMount
()
{}
getCategoryIdFromSider
=
(
selectedCategoryId
)
=>
{
if
(
selectedCategoryId
&&
selectedCategoryId
.
length
>
0
)
{
this
.
setState
({
selectedCategoryId
:
selectedCategoryId
[
0
]
});
}
};
updatedSiderTreeFromList
=
(
currentTotal
,
updatedCategoryId
)
=>
{
this
.
setState
({
currentTotal
,
updatedCategoryId
});
};
render
()
{
return
(
<
div
className=
"examination-paper-index page"
>
<
div
className=
"content-header"
>
试卷
</
div
>
<
div
className=
"box content-body"
>
<
div
style=
{
{
borderRight
:
"0.5px solid #EEEEEE"
,
paddingRight
:
"4px"
}
}
>
<
div
className=
"sider"
>
<
CourseCategorySiderTree
getSelectedCategoryId=
{
this
.
getCategoryIdFromSider
.
bind
(
this
)
}
currentTotal=
{
this
.
state
.
currentTotal
}
updatedCategoryId=
{
this
.
state
.
updatedCategoryId
}
/>
</
div
>
</
div
>
<
div
className=
"content"
>
<
ExaminationPaperContent
updatedSiderTree=
{
this
.
updatedSiderTreeFromList
.
bind
(
this
)
}
selectedCategoryId=
{
this
.
state
.
selectedCategoryId
}
/>
</
div
>
</
div
>
</
div
>
);
}
}
export
default
ExaminationPaperIndex
;
src/modules/teach-tool/examination-paper/ExaminationPaperIndex.less
0 → 100644
View file @
3935654b
/*
* @Author: yuananting
* @Date: 2021-02-21 18:27:43
* @LastEditors: yuananting
* @LastEditTime: 2021-03-27 15:18:26
* @Description: 助学工具-题库-试卷主页面样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
.examination-paper-index {
.content-body {
display: flex;
.site-layout-background {
background: #fff;
}
.sider {
min-width: 244px;
}
.content {
width: 100%;
margin-left: 24px;
height: calc(100vh - 160px);
}
}
}
src/modules/teach-tool/examination-paper/NewExaminationPaper.jsx
0 → 100644
View file @
3935654b
/*
* @Author: yuananting
* @Date: 2021-03-27 16:15:13
* @LastEditors: yuananting
* @LastEditTime: 2021-03-27 18:19:13
* @Description: 助学工具-新建试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
Component
}
from
"react"
;
import
{
Form
,
Button
,
Select
,
Input
,
Space
,
Table
}
from
"antd"
;
import
{
PlusOutlined
}
from
"@ant-design/icons"
;
import
ShowTips
from
"@/components/ShowTips"
;
import
Breadcrumbs
from
"@/components/Breadcrumbs"
;
import
"./NewExaminationPaper.less"
;
const
{
TextArea
}
=
Input
;
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
2
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
22
},
},
};
class
NewExaminationPaper
extends
Component
{
render
()
{
const
columns
=
[
{
title
:
"序号"
,
dataIndex
:
"index"
,
},
{
title
:
"题型"
,
dataIndex
:
"questionType"
,
filters
:
[
{
text
:
"London"
,
value
:
"London"
,
},
{
text
:
"New York"
,
value
:
"New York"
,
},
],
filterMultiple
:
false
,
onFilter
:
(
value
,
record
)
=>
record
.
address
.
indexOf
(
value
)
===
0
,
},
{
title
:
"题目"
,
dataIndex
:
"questionContent"
,
},
];
const
data
=
[
{
key
:
"1"
,
name
:
"John Brown"
,
age
:
32
,
address
:
"New York No. 1 Lake Park"
,
},
{
key
:
"2"
,
name
:
"Jim Green"
,
age
:
42
,
address
:
"London No. 1 Lake Park"
,
},
{
key
:
"3"
,
name
:
"Joe Black"
,
age
:
32
,
address
:
"Sidney No. 1 Lake Park"
,
},
{
key
:
"4"
,
name
:
"Jim Red"
,
age
:
32
,
address
:
"London No. 2 Lake Park"
,
},
];
return
(
<
div
className=
"page new-examination-paper"
>
<
Breadcrumbs
navList=
{
"新建试卷"
}
goBack=
{
()
=>
this
.
handleGoBack
()
}
/>
<
div
className=
"box"
>
<
div
className=
"show-tips"
>
<
ShowTips
message=
"请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企培保有依据国家规定及平台规则进行处理的权利"
/>
</
div
>
<
Form
{
...
formItemLayout
}
style=
{
{
marginTop
:
40
}
}
>
<
h1
style=
{
{
fontSize
:
16
}
}
>
基本信息
</
h1
>
<
Form
.
Item
label=
"试卷名称:"
>
<
Input
maxLength=
{
40
}
placeholder=
"请输入试卷名称(40字以内)"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"试卷分类:"
>
<
Select
placeholder=
"请选择试卷分类"
/>
</
Form
.
Item
>
<
div
style=
{
{
display
:
"flex"
,
justifyContent
:
"space-between"
,
marginTop
:
30
,
}
}
>
<
h1
style=
{
{
fontSize
:
16
}
}
>
题目管理
</
h1
>
<
Space
>
<
Button
icon=
{
<
PlusOutlined
/>
}
>
自选题目
</
Button
>
<
Button
icon=
{
<
PlusOutlined
/>
}
>
系统抽题
</
Button
>
<
Button
icon=
{
<
PlusOutlined
/>
}
>
一人一卷
</
Button
>
</
Space
>
</
div
>
<
Form
.
Item
>
<
Table
columns=
{
columns
}
dataSource=
{
data
}
/>
</
Form
.
Item
>
</
Form
>
</
div
>
<
div
className=
"footer"
>
<
Button
>
取消
</
Button
>
<
Button
>
预览
</
Button
>
<
Button
type=
"primary"
>
保存
</
Button
>
</
div
>
</
div
>
);
}
}
export
default
NewExaminationPaper
;
src/modules/teach-tool/examination-paper/NewExaminationPaper.less
0 → 100644
View file @
3935654b
/*
* @Author: yuananting
* @Date: 2021-02-25 13:52:01
* @LastEditors: yuananting
* @LastEditTime: 2021-03-27 17:22:05
* @Description: 助学工具-新建试卷
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
.new-examination-paper {
position: relative !important;
.box {
margin-bottom: 66px !important;
.ant-tabs {
color: #666666;
}
}
.footer {
position: fixed;
bottom: 0;
height: 58px;
width: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 252px;
background: #fff;
border-top: 1px solid #e8e8e8;
z-index: 999;
.ant-btn {
margin-left: 10px;
}
}
}
src/modules/teach-tool/examination-paper/components/ExaminationPaperContent.jsx
0 → 100644
View file @
3935654b
/*
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-03-27 16:54:25
* @Description: 助学工具-题库-题目管理主页面列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
Component
}
from
"react"
;
import
{
Table
,
Dropdown
,
Row
,
Input
,
Select
,
Tooltip
,
Menu
,
Button
,
Modal
,
message
,
}
from
"antd"
;
import
{
PageControl
}
from
"@/components"
;
import
"./ExaminationPaperContent.less"
;
import
User
from
"@/common/js/user"
;
import
QuestionBankService
from
"@/domains/question-bank-domain/QuestionBankService"
;
import
_
from
"underscore"
;
// import QuestionPreviewModal from "../modal/QuestionPreviewModal";
// import BatchImportQuestionModal from "../modal/BatchImportQuestionModal";
const
{
Search
}
=
Input
;
const
questionTypeList
=
[
{
label
:
"单选题"
,
value
:
"SINGLE_CHOICE"
,
},
{
label
:
"多选题"
,
value
:
"MULTI_CHOICE"
,
},
{
label
:
"判断题"
,
value
:
"JUDGE"
,
},
{
label
:
"填空题"
,
value
:
"GAP_FILLING"
,
},
{
label
:
"不定项选择题"
,
value
:
"INDEFINITE_CHOICE"
,
},
];
class
ExaminationPaperContent
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
query
:
{
current
:
1
,
size
:
10
,
order
:
"UPDATED_DESC"
,
// 排序规则[ ACCURACY_DESC, ACCURACY_ASC, CREATED_DESC, CREATED_ASC, UPDATED_DESC, UPDATED_ASC ]
categoryId
:
null
,
// 当前题库分类Id
questionName
:
null
,
// 题目名称
questionType
:
null
,
// 题目类型
source
:
0
,
tenantId
:
User
.
getStoreId
(),
userId
:
User
.
getStoreUserId
(),
},
questionTypeList
:
[],
// 题型列表
dataSource
:
[],
totalCount
:
0
,
QuestionPreviewModal
:
null
,
// 题目预览模态框
};
}
componentDidMount
()
{
this
.
setState
({
dataSource
:
[
{
examinationName
:
"一二三四五六七八九十"
,
passScore
:
60
,
totalScore
:
100
,
count
:
12
,
relatedCount
:
12
,
},
],
});
}
queryQuestionPageList
=
(
remain
)
=>
{
const
_query
=
this
.
state
.
query
;
if
(
_query
.
categoryId
===
"0"
)
_query
.
categoryId
=
null
;
QuestionBankService
.
queryQuestionPageList
(
_query
).
then
((
res
)
=>
{
const
{
records
=
[],
total
=
0
}
=
res
.
result
;
this
.
setState
({
dataSource
:
records
});
this
.
setState
({
total
},
()
=>
this
.
props
.
updatedSiderTree
(
total
,
this
.
props
.
selectedCategoryId
)
);
});
};
delCategoryConfirm
(
record
)
{
return
Modal
.
confirm
({
title
:
"提示"
,
content
:
"确定要删除此题目吗?"
,
icon
:
(
<
span
className=
"icon iconfont default-confirm-icon"
>

</
span
>
),
okText
:
"删除"
,
cancelText
:
"取消"
,
onOk
:
()
=>
{
this
.
deleteQuestion
(
record
);
},
});
}
deleteQuestion
=
(
record
)
=>
{
let
params
=
{
id
:
record
.
id
,
source
:
0
,
tenantId
:
User
.
getStoreId
(),
userId
:
User
.
getStoreUserId
(),
};
QuestionBankService
.
deleteQuestion
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
message
.
success
(
"删除成功"
);
const
{
query
,
total
}
=
this
.
state
;
const
{
size
,
current
}
=
query
;
const
_query
=
query
;
if
(
total
/
size
<
current
)
{
if
(
total
%
size
===
1
)
{
_query
.
current
=
1
;
}
}
this
.
setState
({
query
:
_query
},
()
=>
this
.
queryQuestionPageList
());
}
});
};
// 预览试卷
previewExaminationPaper
=
()
=>
{};
// 编辑试卷
toEditExaminationPaper
=
()
=>
{};
// 表头设置
parseColumns
=
()
=>
{
const
columns
=
[
{
title
:
"试卷"
,
key
:
"examinationName"
,
dataIndex
:
"examinationName"
,
ellipsis
:
{
showTitle
:
false
,
},
render
:
(
val
,
record
)
=>
{
var
handleVal
=
val
;
handleVal
=
handleVal
.
replace
(
/<
(?!
img|input
)
.*
?
>/g
,
""
);
handleVal
=
handleVal
.
replace
(
/<
\s?
input
[^
>
]
*>/gi
,
"_、"
);
handleVal
=
handleVal
.
replace
(
/<
\s?
img
[^
>
]
*>/gi
,
"【图片】"
);
handleVal
=
handleVal
.
replace
(
/
\&
nbsp
\;
/gi
,
" "
);
return
(
<
Tooltip
overlayClassName=
"tool-list"
title=
{
<
div
style=
{
{
maxWidth
:
700
,
width
:
"auto"
}
}
>
{
handleVal
}
</
div
>
}
placement=
"topLeft"
overlayStyle=
{
{
maxWidth
:
700
}
}
>
{
handleVal
}
</
Tooltip
>
);
},
},
{
title
:
"及格分/总分"
,
key
:
"score"
,
dataIndex
:
"score"
,
width
:
"16%"
,
render
:
(
val
,
record
)
=>
{
return
(
<
span
>
{
record
.
passScore
}
/
{
record
.
totalScore
}
</
span
>
);
},
},
{
title
:
"题目数量"
,
key
:
"count"
,
dataIndex
:
"count"
,
width
:
"14%"
,
},
{
title
:
"关联考试数"
,
key
:
"relatedCount"
,
dataIndex
:
"relatedCount"
,
width
:
"14%"
,
},
{
title
:
"操作"
,
key
:
"operate"
,
dataIndex
:
"operate"
,
width
:
"24%"
,
render
:
(
val
,
record
)
=>
{
return
(
<
div
className=
"record-operate"
>
<
div
className=
"record-operate__item"
onClick=
{
()
=>
this
.
previewQuestion
(
record
.
id
)
}
>
预览
</
div
>
<
span
className=
"record-operate__item split"
>
|
</
span
>
<
div
className=
"record-operate__item"
onClick=
{
()
=>
this
.
toEditQuetion
(
record
.
id
,
record
.
questionTypeEnum
)
}
>
复制
</
div
>
<
span
className=
"record-operate__item split"
>
|
</
span
>
<
Dropdown
overlay=
{
this
.
initDropMenu
(
val
)
}
>
<
div
className=
"record-operate__item"
>
更多
</
div
>
</
Dropdown
>
</
div
>
);
},
},
];
return
columns
;
};
initDropMenu
=
(
item
)
=>
{
return
(
<
Menu
>
<
Menu
.
Item
key=
"0"
>
<
span
>
编辑
</
span
>
</
Menu
.
Item
>
<
Menu
.
Item
key=
"1"
>
<
span
>
删除
</
span
>
</
Menu
.
Item
>
</
Menu
>
);
};
onShowSizeChange
=
(
current
,
size
)
=>
{
if
(
current
==
size
)
{
return
;
}
let
_query
=
this
.
state
.
query
;
_query
.
size
=
size
;
this
.
setState
({
query
:
_query
},
()
=>
this
.
queryQuestionPageList
());
};
// 改变搜索条件
handleChangeQuery
=
(
searchType
,
value
)
=>
{
this
.
setState
(
{
query
:
{
...
this
.
state
.
query
,
[
searchType
]:
value
||
null
,
current
:
1
,
},
},
()
=>
{
if
(
searchType
===
"questionName"
)
return
;
this
.
queryQuestionPageList
();
}
);
};
render
()
{
const
{
dataSource
=
[],
total
,
query
}
=
this
.
state
;
const
{
current
,
size
,
categoryId
,
questionName
,
questionType
}
=
query
;
return
(
<
div
className=
"question-manage-content"
>
<
div
className=
"question-manage-filter"
>
<
Row
type=
"flex"
justify=
"space-between"
align=
"top"
>
<
div
className=
"search-condition"
>
<
div
className=
"search-condition__item"
>
<
span
className=
"search-label"
>
试卷:
</
span
>
<
Search
placeholder=
"搜索试卷名称"
value=
{
questionName
}
style=
{
{
width
:
"calc(100% - 100px)"
}
}
onChange=
{
(
e
)
=>
{
this
.
handleChangeQuery
(
"questionName"
,
e
.
target
.
value
);
}
}
onSearch=
{
()
=>
{
this
.
queryQuestionPageList
();
}
}
enterButton=
{
<
span
className=
"icon iconfont"
>

</
span
>
}
/>
</
div
>
</
div
>
</
Row
>
</
div
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
window
.
RCHistory
.
push
({
pathname
:
`/new-examination-paper`
,
});
}
}
>
新建试卷
</
Button
>
<
div
className=
"question-manage-list"
>
<
Table
rowKey=
{
(
record
)
=>
record
.
id
}
dataSource=
{
dataSource
}
columns=
{
this
.
parseColumns
()
}
pagination=
{
false
}
bordered
onChange=
{
this
.
handleChangeTable
}
/>
{
total
>
0
&&
(
<
div
className=
"box-footer"
>
<
PageControl
current=
{
current
-
1
}
pageSize=
{
size
}
total=
{
total
}
toPage=
{
(
page
)
=>
{
const
_query
=
{
...
query
,
current
:
page
+
1
};
this
.
setState
({
query
:
_query
},
()
=>
this
.
queryQuestionPageList
()
);
}
}
showSizeChanger=
{
true
}
onShowSizeChange=
{
this
.
onShowSizeChange
}
/>
</
div
>
)
}
{
/* {this.state.QuestionPreviewModal} */
}
{
/* {this.state.ImportQuestionModal} */
}
</
div
>
</
div
>
);
}
}
export
default
ExaminationPaperContent
;
src/modules/teach-tool/examination-paper/components/ExaminationPaperContent.less
0 → 100644
View file @
3935654b
/*
* @Author: yuananting
* @Date: 2021-02-25 11:26:28
* @LastEditors: yuananting
* @LastEditTime: 2021-03-25 14:32:01
* @Description: 助学工具-题库-题目管理右侧内容样式
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
.question-manage-content {
.question-manage-filter {
position: relative;
.search-condition {
width: calc(100% - 80px);
display: flex;
align-items: center;
flex-wrap: wrap;
&__item {
width: 30%;
margin-right: 3%;
margin-bottom: 16px;
.search-label {
vertical-align: middle;
display: inline-block;
height: 32px;
line-height: 32px;
}
}
}
.reset-fold-area {
position: absolute;
right: 12px;
.resetBtn {
color: #999999;
font-size: 18px;
margin-right: 8px;
}
.fold-btn {
font-size: 14px;
color: #666666;
line-height: 20px;
.fold-icon {
font-size: 12px;
margin-left: 4px;
}
}
}
}
.data-icon {
cursor: pointer;
}
.question-manage-list {
position: relative;
margin-top: 16px;
.empty-list-tip {
color: #ffb714;
cursor: pointer;
}
.record-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.record-operate {
display: flex;
&__item {
color: #5289fa;
cursor: pointer;
&.split {
margin: 0 8px;
color: #bfbfbf;
}
}
}
}
}
.tool-list {
.ant-tooltip-inner {
max-width: 700px !important;
}
}
.fill-line {
padding: 0 10px;
border-bottom: 1px solid;
}
src/modules/teach-tool/question-bank/QuestionBankIndex.jsx
View file @
3935654b
...
@@ -2,14 +2,14 @@
...
@@ -2,14 +2,14 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-02-21 17:51:01
* @Date: 2021-02-21 17:51:01
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-03-27 1
3:42:42
* @LastEditTime: 2021-03-27 1
4:58:13
* @Description: 助学工具-题库-题库主页面
* @Description: 助学工具-题库-题库主页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
import
React
,
{
Component
}
from
"react"
;
import
React
,
{
Component
}
from
"react"
;
import
"./QuestionBankIndex.less"
;
import
"./QuestionBankIndex.less"
;
import
QuestionBankSider
from
"../components/CourseCategorySiderTree"
;
import
CourseCategorySiderTree
from
"../components/CourseCategorySiderTree"
;
import
QuestionManageContent
from
"./components/QuestionManageContent"
;
import
QuestionManageContent
from
"./components/QuestionManageContent"
;
class
QuestionBankIndex
extends
Component
{
class
QuestionBankIndex
extends
Component
{
...
@@ -41,7 +41,7 @@ class QuestionBankIndex extends Component {
...
@@ -41,7 +41,7 @@ class QuestionBankIndex extends Component {
style=
{
{
borderRight
:
"0.5px solid #EEEEEE"
,
paddingRight
:
"4px"
}
}
style=
{
{
borderRight
:
"0.5px solid #EEEEEE"
,
paddingRight
:
"4px"
}
}
>
>
<
div
className=
"sider"
>
<
div
className=
"sider"
>
<
QuestionBankSider
<
CourseCategorySiderTree
getSelectedCategoryId=
{
this
.
getCategoryIdFromSider
.
bind
(
this
)
}
getSelectedCategoryId=
{
this
.
getCategoryIdFromSider
.
bind
(
this
)
}
currentTotal=
{
this
.
state
.
currentTotal
}
currentTotal=
{
this
.
state
.
currentTotal
}
updatedCategoryId=
{
this
.
state
.
updatedCategoryId
}
updatedCategoryId=
{
this
.
state
.
updatedCategoryId
}
...
...
src/modules/teach-tool/question-bank/components/QuestionManageContent.jsx
View file @
3935654b
...
@@ -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-03-27 1
4:39:31
* @LastEditTime: 2021-03-27 1
5:30:34
* @Description: 助学工具-题库-题目管理主页面列表数据
* @Description: 助学工具-题库-题目管理主页面列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -119,7 +119,7 @@ class QuestionManageContent extends Component {
...
@@ -119,7 +119,7 @@ class QuestionManageContent extends Component {
});
});
};
};
del
Category
Confirm
(
record
)
{
del
Question
Confirm
(
record
)
{
return
Modal
.
confirm
({
return
Modal
.
confirm
({
title
:
"提示"
,
title
:
"提示"
,
content
:
"确定要删除此题目吗?"
,
content
:
"确定要删除此题目吗?"
,
...
@@ -207,7 +207,7 @@ class QuestionManageContent extends Component {
...
@@ -207,7 +207,7 @@ class QuestionManageContent extends Component {
this
.
setState
({
QuestionPreviewModal
:
m
});
this
.
setState
({
QuestionPreviewModal
:
m
});
};
};
toEditQuetion
=
(
id
,
type
)
=>
{
toEditQue
s
tion
=
(
id
,
type
)
=>
{
const
{
categoryId
}
=
this
.
state
.
query
;
const
{
categoryId
}
=
this
.
state
.
query
;
if
(
categoryId
)
{
if
(
categoryId
)
{
window
.
RCHistory
.
push
({
window
.
RCHistory
.
push
({
...
@@ -305,7 +305,7 @@ class QuestionManageContent extends Component {
...
@@ -305,7 +305,7 @@ class QuestionManageContent extends Component {
<
div
<
div
className=
"record-operate__item"
className=
"record-operate__item"
onClick=
{
()
=>
onClick=
{
()
=>
this
.
toEditQuetion
(
record
.
id
,
record
.
questionTypeEnum
)
this
.
toEditQue
s
tion
(
record
.
id
,
record
.
questionTypeEnum
)
}
}
>
>
编辑
编辑
...
@@ -317,7 +317,7 @@ class QuestionManageContent extends Component {
...
@@ -317,7 +317,7 @@ class QuestionManageContent extends Component {
{
isPermiss
&&
(
{
isPermiss
&&
(
<
div
<
div
className=
"record-operate__item"
className=
"record-operate__item"
onClick=
{
()
=>
this
.
del
Category
Confirm
(
record
)
}
onClick=
{
()
=>
this
.
del
Question
Confirm
(
record
)
}
>
>
删除
删除
</
div
>
</
div
>
...
...
src/modules/teach-tool/question-bank/modal/QuestionPreviewModal.jsx
View file @
3935654b
import
React
,
{
Component
}
from
"react"
;
import
React
,
{
Component
}
from
"react"
;
import
{
Modal
,
Divider
}
from
"antd"
;
import
{
Modal
}
from
"antd"
;
import
User
from
"@/common/js/user"
;
import
User
from
"@/common/js/user"
;
import
QuestionBankService
from
"@/domains/question-bank-domain/QuestionBankService"
;
import
QuestionBankService
from
"@/domains/question-bank-domain/QuestionBankService"
;
import
"./QuestionPreviewModal.less"
;
import
"./QuestionPreviewModal.less"
;
...
...
src/routes/config/mainRoutes.tsx
View file @
3935654b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-04-29 10:26:32
* @Date: 2020-04-29 10:26:32
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-03-27 1
1:38:59
* @LastEditTime: 2021-03-27 1
6:54:14
* @Description: 内容线路由配置
* @Description: 内容线路由配置
*/
*/
import
Home
from
'@/modules/home/Home'
;
import
Home
from
'@/modules/home/Home'
;
...
@@ -25,9 +25,11 @@ import PlanPage from '@/modules/plan-manage/PlanPage';
...
@@ -25,9 +25,11 @@ import PlanPage from '@/modules/plan-manage/PlanPage';
import
AddPlanPage
from
'@/modules/plan-manage/AddPlan'
;
import
AddPlanPage
from
'@/modules/plan-manage/AddPlan'
;
import
LearningDataPage
from
'@/modules/plan-manage/LearningData'
;
import
LearningDataPage
from
'@/modules/plan-manage/LearningData'
;
import
StoreInfoPage
from
'@/modules/store-manage/StoreInfo'
;
import
StoreInfoPage
from
'@/modules/store-manage/StoreInfo'
;
import
QuestionBankIndex
from
'@/modules/teach-tool/question-bank/QuestionBankIndex'
;
import
CourseCategoryManage
from
'@/modules/teach-tool/components/CourseCategoryManage'
;
import
CourseCategoryManage
from
'@/modules/teach-tool/components/CourseCategoryManage'
;
import
QuestionBankIndex
from
'@/modules/teach-tool/question-bank/QuestionBankIndex'
;
import
AddNewQuestion
from
'@/modules/teach-tool/question-bank/AddNewQuestion'
;
import
AddNewQuestion
from
'@/modules/teach-tool/question-bank/AddNewQuestion'
;
import
ExaminationPaperIndex
from
'@/modules/teach-tool/examination-paper/ExaminationPaperIndex'
;
import
NewExaminationPaper
from
'@/modules/teach-tool/examination-paper/NewExaminationPaper'
;
const
mainRoutes
=
[
const
mainRoutes
=
[
{
{
...
@@ -101,16 +103,26 @@ const mainRoutes = [
...
@@ -101,16 +103,26 @@ const mainRoutes = [
name
:
'题库'
name
:
'题库'
},
},
{
{
path
:
'/course-category-manage'
,
component
:
CourseCategoryManage
,
name
:
'分类管理'
},
{
path
:
'/create-new-question'
,
path
:
'/create-new-question'
,
component
:
AddNewQuestion
,
component
:
AddNewQuestion
,
name
:
'新增题目'
name
:
'新增题目'
},
},
{
{
path
:
'/examination-paper-index'
,
component
:
ExaminationPaperIndex
,
name
:
'试卷'
},
{
path
:
'/new-examination-paper'
,
component
:
NewExaminationPaper
,
name
:
'新建试卷'
},
{
path
:
'/course-category-manage'
,
component
:
CourseCategoryManage
,
name
:
'分类管理'
},
{
path
:
'/switch-route'
,
path
:
'/switch-route'
,
component
:
SwitchRoute
,
component
:
SwitchRoute
,
name
:
'登录后跳转承载页'
name
:
'登录后跳转承载页'
...
...
src/routes/config/menuList.tsx
View file @
3935654b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-02-21 15:53:31
* @Date: 2021-02-21 15:53:31
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-03-27 1
1:50:31
* @LastEditTime: 2021-03-27 1
5:20:42
* @Description: 描述一下咯
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -62,7 +62,17 @@ export const menuList: any = [
...
@@ -62,7 +62,17 @@ export const menuList: any = [
groupName
:
"题库"
,
groupName
:
"题库"
,
groupCode
:
"QuestionBank"
,
groupCode
:
"QuestionBank"
,
link
:
'/question-bank-index'
link
:
'/question-bank-index'
}
},
{
groupName
:
"试卷"
,
groupCode
:
"QuestionBank"
,
link
:
'/examination-paper-index'
},
{
groupName
:
"考试"
,
groupCode
:
"QuestionBank"
,
link
:
'/examination-manage-index'
},
]
]
},
},
{
{
...
...
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