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
61203172
Commit
61203172
authored
Mar 22, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/yuananting/20210221/question-bank-tools' into dev
parents
f2f75388
647fd86a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
20 deletions
+34
-20
src/modules/teach-tool/QuestionBankIndex.jsx
+4
-2
src/modules/teach-tool/components/QuestionBankSider.jsx
+5
-5
src/modules/teach-tool/components/QuestionManageContent.jsx
+2
-2
src/modules/teach-tool/modal/QuestionPreviewModal.less
+23
-11
No files found.
src/modules/teach-tool/QuestionBankIndex.jsx
View file @
61203172
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @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-
15 14:46:12
* @LastEditTime: 2021-03-
22 14:28:00
* @Description: 助学工具-题库-题库主页面
* @Description: 助学工具-题库-题库主页面
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -30,8 +30,9 @@ class QuestionBankIndex extends Component {
...
@@ -30,8 +30,9 @@ class QuestionBankIndex extends Component {
}
}
};
};
updatedSiderTreeFromList
=
(
currentTotal
)
=>
{
updatedSiderTreeFromList
=
(
currentTotal
,
updatedCategoryId
)
=>
{
this
.
setState
({
currentTotal
});
this
.
setState
({
currentTotal
});
this
.
setState
({
updatedCategoryId
});
};
};
render
()
{
render
()
{
...
@@ -43,6 +44,7 @@ class QuestionBankIndex extends Component {
...
@@ -43,6 +44,7 @@ class QuestionBankIndex extends Component {
<
QuestionBankSider
<
QuestionBankSider
getSelectedCategoryId=
{
this
.
getCategoryIdFromSider
.
bind
(
this
)
}
getSelectedCategoryId=
{
this
.
getCategoryIdFromSider
.
bind
(
this
)
}
currentTotal=
{
this
.
state
.
currentTotal
}
currentTotal=
{
this
.
state
.
currentTotal
}
updatedCategoryId=
{
this
.
state
.
updatedCategoryId
}
/>
/>
</
div
>
</
div
>
<
div
className=
"content"
>
<
div
className=
"content"
>
...
...
src/modules/teach-tool/components/QuestionBankSider.jsx
View file @
61203172
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-02-22 10:59:43
* @Date: 2021-02-22 10:59:43
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-03-22
09:47:50
* @LastEditTime: 2021-03-22
14:28:13
* @Description: 助学工具-题库-题库主页面侧边栏
* @Description: 助学工具-题库-题库主页面侧边栏
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -40,8 +40,8 @@ class QuestionBankSider extends Component {
...
@@ -40,8 +40,8 @@ class QuestionBankSider extends Component {
}
}
shouldComponentUpdate
(
nextProps
,
nextState
)
{
shouldComponentUpdate
(
nextProps
,
nextState
)
{
const
{
currentTotal
}
=
nextProps
;
const
{
currentTotal
,
updatedCategoryId
}
=
nextProps
;
if
(
this
.
props
.
currentTotal
!==
currentTotal
)
{
if
(
this
.
props
.
currentTotal
!==
currentTotal
&&
this
.
props
.
updatedCategoryId
===
updatedCategoryId
)
{
this
.
queryCategoryTree
();
this
.
queryCategoryTree
();
}
}
return
true
;
return
true
;
...
@@ -185,7 +185,7 @@ class QuestionBankSider extends Component {
...
@@ -185,7 +185,7 @@ class QuestionBankSider extends Component {
this
.
queryCategoryTree
(
value
);
this
.
queryCategoryTree
(
value
);
}
}
}
}
/>
/>
<
div
className=
"sider-btn"
>
{
User
.
getUserRole
()
!==
"CloudLecturer"
&&
<
div
className=
"sider-btn"
>
<
Button
<
Button
onClick=
{
()
=>
{
onClick=
{
()
=>
{
window
.
RCHistory
.
push
({
window
.
RCHistory
.
push
({
...
@@ -195,7 +195,7 @@ class QuestionBankSider extends Component {
...
@@ -195,7 +195,7 @@ class QuestionBankSider extends Component {
>
>
分类管理
分类管理
</
Button
>
</
Button
>
</
div
>
</
div
>
}
<
div
className=
"sider-tree"
>
<
div
className=
"sider-tree"
>
<
DirectoryTree
<
DirectoryTree
expandedKeys=
{
expandedKeys
}
expandedKeys=
{
expandedKeys
}
...
...
src/modules/teach-tool/components/QuestionManageContent.jsx
View file @
61203172
...
@@ -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-22
09:44:27
* @LastEditTime: 2021-03-22
14:28:40
* @Description: 助学工具-题库-题目管理主页面列表数据
* @Description: 助学工具-题库-题目管理主页面列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -105,7 +105,7 @@ class QuestionManageContent extends Component {
...
@@ -105,7 +105,7 @@ class QuestionManageContent extends Component {
QuestionBankService
.
queryQuestionPageList
(
_query
).
then
((
res
)
=>
{
QuestionBankService
.
queryQuestionPageList
(
_query
).
then
((
res
)
=>
{
const
{
records
=
[],
total
=
0
}
=
res
.
result
;
const
{
records
=
[],
total
=
0
}
=
res
.
result
;
this
.
setState
({
dataSource
:
records
});
this
.
setState
({
dataSource
:
records
});
this
.
setState
({
total
},
()
=>
this
.
props
.
updatedSiderTree
(
total
));
this
.
setState
({
total
},
()
=>
this
.
props
.
updatedSiderTree
(
total
,
this
.
props
.
selectedCategoryId
));
});
});
};
};
...
...
src/modules/teach-tool/modal/QuestionPreviewModal.less
View file @
61203172
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
.input-box {
.input-box {
margin-bottom: 8px;
margin-bottom: 8px;
* {
* {
display: inline-block;
display: inline-block;
}
}
}
}
.picture-box {
.picture-box {
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
vertical-align: top;
vertical-align: top;
}
}
}
}
.picture-box {
.picture-box {
display: inline-flex;
display: inline-flex;
margin: 12px 12px 0 0;
margin: 12px 12px 0 0;
...
@@ -129,7 +129,7 @@
...
@@ -129,7 +129,7 @@
.gap-content {
.gap-content {
display: inline-block;
display: inline-block;
span {
span {
background: #
F7F8F
9;
background: #
f7f8f
9;
border-radius: 2px;
border-radius: 2px;
padding: 2px 12px;
padding: 2px 12px;
margin-right: 8px;
margin-right: 8px;
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
.desc-input-box {
.desc-input-box {
margin-bottom: 8px;
margin-bottom: 8px;
* {
* {
display: inline-block;
display: inline-block;
}
}
}
}
.desc-picture-box {
.desc-picture-box {
...
@@ -189,13 +189,17 @@
...
@@ -189,13 +189,17 @@
position: relative;
position: relative;
display: inline-block;
display: inline-block;
width: 208px;
width: 208px;
overflow: hidden;
height: calc(208px * 9 / 16);
padding-top: 12px;
position: relative;
background-color: #000;
margin: 0px 12px 12px 0;
margin: 0px 12px 12px 0;
&_content {
&_content {
max-width: 200px;
max-width: 100%;
max-height: 200px;
max-height: 100%;
border-radius: 4px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
&_btn {
&_btn {
width: 32px;
width: 32px;
...
@@ -203,16 +207,24 @@
...
@@ -203,16 +207,24 @@
position: absolute;
position: absolute;
top: 50%;
top: 50%;
left: 50%;
left: 50%;
margin-top: -
8
px;
margin-top: -
16
px;
margin-left: -16px;
margin-left: -16px;
}
}
.icon_arrow {
position: absolute;
top: -12px;
right: -8px;
color: #bfbfbf;
cursor: pointer;
font-size: 16px;
}
}
}
}
}
}
}
}
}
}
}
.question-preview-modal.ant-modal {
.question-preview-modal.ant-modal {
max-height: 60% !important;
max-height: 60% !important;
}
}
.add-fill-line {
.add-fill-line {
padding: 0 10px;
padding: 0 10px;
...
...
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