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
8d3049f2
Commit
8d3049f2
authored
Apr 07, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'feat:添加悬浮提示'
parent
51719bb9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
18 deletions
+46
-18
src/modules/teach-tool/paper-manage/components/PaperList.jsx
+46
-18
No files found.
src/modules/teach-tool/paper-manage/components/PaperList.jsx
View file @
8d3049f2
...
@@ -113,7 +113,7 @@ class PaperList extends Component {
...
@@ -113,7 +113,7 @@ class PaperList extends Component {
// 编辑试卷
// 编辑试卷
editPaper
=
(
record
)
=>
{
editPaper
=
(
record
)
=>
{
const
{
match
}
=
this
.
props
;
const
{
match
}
=
this
.
props
;
if
(
record
.
relatedExam
===
0
)
{
if
(
record
.
relatedExam
===
0
)
{
const
{
categoryId
}
=
this
.
state
.
query
;
const
{
categoryId
}
=
this
.
state
.
query
;
const
{
match
}
=
this
.
props
;
const
{
match
}
=
this
.
props
;
...
@@ -232,18 +232,46 @@ class PaperList extends Component {
...
@@ -232,18 +232,46 @@ class PaperList extends Component {
dataIndex
:
"questionCnt"
,
dataIndex
:
"questionCnt"
,
width
:
this
.
props
.
type
!==
"modal-select"
?
"12%"
:
"20%"
,
width
:
this
.
props
.
type
!==
"modal-select"
?
"12%"
:
"20%"
,
align
:
"right"
,
align
:
"right"
,
render
:
(
val
,
record
)
=>
{
return
(
this
.
props
.
type
!==
"modal-select"
?
<
span
>
{
record
.
questionCnt
}
</
span
>
:
<
Tooltip
overlayClassName=
"tool-list"
title=
{
<
div
>
<
div
className=
"item"
>
单选题:
{
record
.
singleChoiceCnt
||
0
}
个
</
div
>
<
div
className=
"item"
>
多选题:
{
record
.
multiChoiceCnt
||
0
}
个
</
div
>
<
div
className=
"item"
>
判断题:
{
record
.
judgeCnt
||
0
}
个
</
div
>
<
div
className=
"item"
>
填空题:
{
record
.
gapFillingCnt
||
0
}
个
</
div
>
<
div
className=
"item"
>
不定项选择题:
{
record
.
indefiniteChoiceCnt
||
0
}
个
</
div
>
</
div
>
}
placement=
"top"
overlayStyle=
{
{
maxWidth
:
700
}
}
>
<
span
>
{
record
.
questionCnt
}
</
span
>
</
Tooltip
>
);
},
},
},
{
];
if
(
this
.
props
.
type
!==
"modal-select"
)
{
const
isPermiss
=
[
"CloudManager"
,
"StoreManager"
].
includes
(
User
.
getUserRole
());
columns
.
push
({
title
:
"关联考试数"
,
title
:
"关联考试数"
,
key
:
"relatedExam"
,
key
:
"relatedExam"
,
dataIndex
:
"relatedExam"
,
dataIndex
:
"relatedExam"
,
width
:
this
.
props
.
type
!==
"modal-select"
?
"16%"
:
"24%"
,
width
:
this
.
props
.
type
!==
"modal-select"
?
"16%"
:
"24%"
,
align
:
"right"
,
align
:
"right"
,
},
})
];
if
(
this
.
props
.
type
!==
"modal-select"
)
{
const
isPermiss
=
[
"CloudManager"
,
"StoreManager"
].
includes
(
User
.
getUserRole
());
columns
.
push
({
columns
.
push
({
title
:
"操作"
,
title
:
"操作"
,
key
:
"operate"
,
key
:
"operate"
,
...
@@ -355,17 +383,17 @@ class PaperList extends Component {
...
@@ -355,17 +383,17 @@ class PaperList extends Component {
</
div
>
</
div
>
{
this
.
props
.
type
!==
"modal-select"
&&
isPermiss
&&
{
this
.
props
.
type
!==
"modal-select"
&&
isPermiss
&&
categoryId
&&
(
categoryId
&&
(
<
Button
<
Button
type=
"primary"
type=
"primary"
onClick=
{
()
=>
{
onClick=
{
()
=>
{
window
.
RCHistory
.
push
({
window
.
RCHistory
.
push
({
pathname
:
`${match.url}/paper-operate-page?type=new&categoryId=${categoryId}`
,
pathname
:
`${match.url}/paper-operate-page?type=new&categoryId=${categoryId}`
,
});
});
}
}
}
}
>
>
新建试卷
新建试卷
</
Button
>
</
Button
>
)
}
)
}
<
div
className=
"paper-list-content"
>
<
div
className=
"paper-list-content"
>
<
ConfigProvider
renderEmpty=
{
this
.
customizeRenderEmpty
}
>
<
ConfigProvider
renderEmpty=
{
this
.
customizeRenderEmpty
}
>
...
...
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