Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sass-admin
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
hqzhdj_app
sass-admin
Commits
883f1a63
Commit
883f1a63
authored
Sep 26, 2025
by
chengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
e259ecb8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
43 deletions
+71
-43
src/pages/SystemManagement/Information/index.jsx
+12
-3
src/pages/TrainingTools/exam/exam/createExam/AddQuestion.jsx
+34
-31
src/pages/TrainingTools/exam/exam/index.jsx
+25
-9
No files found.
src/pages/SystemManagement/Information/index.jsx
View file @
883f1a63
...
...
@@ -12,6 +12,7 @@ import {
Table
,
Button
,
message
,
Popconfirm
}
from
"antd"
;
import
Head
from
"./head"
;
import
AddEditForm
from
"./addEditForm"
;
...
...
@@ -718,7 +719,7 @@ class Information extends React.Component {
message
.
warning
(
"新闻类文章必须上传logo"
);
return
;
}
if
(
!
values
.
type
[
1
]
)
{
if
(
!
values
.
type
[
1
])
{
message
.
warning
(
"所属栏位子级未选择"
);
return
;
}
...
...
@@ -763,7 +764,7 @@ class Information extends React.Component {
message
.
warning
(
"新闻类文章必须上传logo"
);
return
;
}
if
(
!
values
.
type
[
1
]
)
{
if
(
!
values
.
type
[
1
]
)
{
message
.
warning
(
"所属栏位子级未选择"
);
return
;
}
...
...
@@ -1107,12 +1108,20 @@ class Information extends React.Component {
>
编辑
</
a
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"确定"
cancelText=
"取消"
onConfirm=
{
()
=>
this
.
delete
(
record
.
id
)
}
>
{
/*4月10号临时发布 后台没有发布生产接口 前端只能隐藏*/
}
<
a
className=
{
Styles
.
marr10
}
onClick=
{
()
=>
this
.
delete
(
record
.
id
)
}
href=
"#"
>
删除
</
a
>
</
Popconfirm
>
</
div
>
)
}
</
div
>
...
...
src/pages/TrainingTools/exam/exam/createExam/AddQuestion.jsx
View file @
883f1a63
...
...
@@ -2,21 +2,14 @@ import React, { Component } from "react";
import
{
Button
,
Table
,
Icon
,
Steps
,
Select
,
Input
,
InputNumber
,
Modal
,
Form
,
Tabs
,
Upload
,
Radio
,
DatePicker
,
message
,
Transfer
,
Tag
,
Tooltip
,
Popconfirm
}
from
"antd"
;
import
func
from
"@/util/commonFunc.js"
;
...
...
@@ -257,19 +250,19 @@ class AddQuestion extends Component {
title
:
"序号"
,
dataIndex
:
"code"
,
key
:
"code"
,
width
:
"
16.
5%"
,
width
:
"5%"
,
},
{
title
:
"题干"
,
dataIndex
:
"topic"
,
key
:
"topic"
,
width
:
"
16.5
%"
,
width
:
"
30
%"
,
},
{
title
:
"分数"
,
dataIndex
:
"score"
,
key
:
"score"
,
width
:
"
16.5
%"
,
width
:
"
20
%"
,
render
:
(
text
,
record
,
index
)
=>
(
<
InputNumber
key=
{
this
.
state
.
randoming
+
index
}
...
...
@@ -277,7 +270,7 @@ class AddQuestion extends Component {
step=
{
0.1
}
formatter=
{
limitDecimals
}
parser=
{
limitDecimals
}
style=
{
{
width
:
6
0
,
margin
:
0
}
}
style=
{
{
width
:
12
0
,
margin
:
0
}
}
defaultValue=
{
text
.
score
?
text
.
score
:
0
}
onBlur=
{
e
=>
this
.
changeScore
(
e
,
text
.
id
)
}
/>
...
...
@@ -287,13 +280,13 @@ class AddQuestion extends Component {
title
:
"类型"
,
dataIndex
:
"type"
,
key
:
"type"
,
width
:
"1
6.5
%"
,
width
:
"1
0
%"
,
},
{
title
:
"排序"
,
dataIndex
:
"rank"
,
key
:
"rank"
,
width
:
"1
6.
5%"
,
width
:
"15%"
,
render
:
(
text
,
record
)
=>
(
<
div
className=
"operation"
>
<
a
...
...
@@ -303,6 +296,7 @@ class AddQuestion extends Component {
上移
</
a
>
<
a
style=
{
{
marginLeft
:
'10px'
}
}
href=
"javascript:void(0)"
onClick=
{
()
=>
self
.
downMove
(
text
,
record
)
}
>
...
...
@@ -315,15 +309,22 @@ class AddQuestion extends Component {
title
:
"操作"
,
key
:
"action"
,
dataIndex
:
"action"
,
width
:
"1
6.
5%"
,
width
:
"15%"
,
render
:
(
text
,
record
,
index
)
=>
(
<
div
className=
"operation"
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"确定"
cancelText=
"取消"
onConfirm=
{
()
=>
self
.
deleteQuestion
(
text
.
id
,
index
)
}
>
{
/*4月10号临时发布 后台没有发布生产接口 前端只能隐藏*/
}
<
a
href=
"javascript:void(0)"
onClick=
{
()
=>
self
.
deleteQuestion
(
text
.
id
,
index
)
}
href=
"#"
>
删除
</
a
>
</
Popconfirm
>
</
div
>
),
},
...
...
@@ -333,7 +334,7 @@ class AddQuestion extends Component {
title
:
"序号"
,
dataIndex
:
"code"
,
key
:
"code"
,
width
:
"
25
%"
,
width
:
"
10
%"
,
},
{
title
:
"题干"
,
...
...
@@ -420,7 +421,7 @@ class AddQuestion extends Component {
if
(
this
.
id
)
{
this
.
props
.
getExamInfo
(
this
.
id
,
()
=>
{
_this
.
initState
(
_this
.
props
.
examInfo
);
if
(
_this
.
props
.
examInfo
.
makeStrategy
===
2
&&
_this
.
props
.
examInfo
.
libraryId
&&
_this
.
props
.
examInfo
.
libraryId
!=
"0"
)
{
if
(
_this
.
props
.
examInfo
.
makeStrategy
===
2
&&
_this
.
props
.
examInfo
.
libraryId
&&
_this
.
props
.
examInfo
.
libraryId
!=
"0"
)
{
_this
.
props
.
getLibraryCount
(
{
examId
:
examID
,
libraryId
:
_this
.
props
.
examInfo
.
libraryId
},
res
=>
{
...
...
@@ -458,8 +459,8 @@ class AddQuestion extends Component {
id
:
_this
.
props
.
examInfo
.
libraryId
,
}
:
null
,
selectedRowId
:
_this
.
props
.
examInfo
&&
_this
.
props
.
examInfo
.
libraryId
!=
"0"
&&
[
_this
.
props
.
examInfo
.
libraryId
,
selectedRowId
:
_this
.
props
.
examInfo
&&
_this
.
props
.
examInfo
.
libraryId
!=
"0"
&&
[
_this
.
props
.
examInfo
.
libraryId
,
],
optionRank
:
1
,
random
:
""
,
...
...
@@ -561,7 +562,7 @@ class AddQuestion extends Component {
this
.
setState
({
selectedRowrecord
:
selectedRows
[
0
],
selectedRowId
:
selectedRowKeys
,
selectedrecord
:
{
id
:
selectedRowKeys
[
0
].
id
,
name
:
selectedRowKeys
[
0
].
name
},
selectedrecord
:
{
id
:
selectedRowKeys
[
0
].
id
,
name
:
selectedRowKeys
[
0
].
name
},
});
};
...
...
@@ -614,8 +615,8 @@ class AddQuestion extends Component {
handleCancelBank
=
()
=>
{
this
.
setState
({
visible
:
false
,
selectedrecord
:
null
,
selectedRowKeys2
:[],
selectedrecord
:
null
,
selectedRowKeys2
:
[],
});
};
//添加题库确定按钮
...
...
@@ -952,7 +953,7 @@ class AddQuestion extends Component {
stemKey
:
""
,
typeKey
:
0
,
// selectedrecord:null, 该字段为页面上已选择的题库,如果此时清空会导致删除已选的必考题的时候不能实时刷新必考题列表
selectedRowKeys2
:[],
selectedRowKeys2
:
[],
});
}
}
else
{
...
...
@@ -966,8 +967,8 @@ class AddQuestion extends Component {
libraryKey
:
""
,
stemKey
:
""
,
typeKey
:
0
,
selectedrecord
:
null
,
selectedRowKeys2
:[],
selectedrecord
:
null
,
selectedRowKeys2
:
[],
});
}
}
...
...
@@ -1119,7 +1120,7 @@ class AddQuestion extends Component {
getExamPreview
(
examID
,
()
=>
{
const
{
examPreview
}
=
_this
.
props
;
if
(
questionWay
!=
1
)
{
if
(
selectedrecord
&&
selectedrecord
.
id
)
{
if
(
selectedrecord
&&
selectedrecord
.
id
)
{
getLibraryCount
({
examId
:
examID
,
libraryId
:
selectedrecord
.
id
});
}
}
...
...
@@ -1335,7 +1336,7 @@ class AddQuestion extends Component {
id
:
this
.
props
.
examID
,
// id: "987204670085234688"
};
importQuestions
(
json
,
function
()
{
importQuestions
(
json
,
function
()
{
message
.
success
(
"导入成功"
);
});
}
...
...
@@ -1442,7 +1443,7 @@ class AddQuestion extends Component {
onChange
(
current
,
pageSize
)
{
getQuestionBankList
({
pageindex
:
current
,
pagesize
:
20
});
},
size
:
"small"
size
:
"small"
};
pagination
.
total
=
questionTotal
;
pagination
.
showTotal
=
total
=>
`总共:
${
total
}
`
;
...
...
@@ -1922,7 +1923,9 @@ class AddQuestion extends Component {
</
Modal
>
</
div
>
)
}
{
this
.
props
.
questionWay
!=
1
&&
(
<
h3
style=
{
{
marginTop
:
40
}
}
>
试题排序
</
h3
>
)
}
<
Form
onSubmit=
{
this
.
rankSubmit
}
>
{
this
.
props
.
questionWay
!=
1
&&
(
<
FormItem
{
...
formItemLayout
}
label=
"出题策略"
>
...
...
@@ -1960,7 +1963,7 @@ class AddQuestion extends Component {
"/"
+
func
.
siteCode
+
"/index/tool/test/test-management/edit"
,
search
:
`?id=${this.props.examID}`
,
search
:
`?id=${this.props.examID}`
,
state
:
{
id
:
this
.
props
.
examID
},
}
}
>
...
...
src/pages/TrainingTools/exam/exam/index.jsx
View file @
883f1a63
...
...
@@ -8,6 +8,7 @@ import {
Divider
,
message
,
Spin
,
Popconfirm
}
from
"antd"
;
import
Breadcrumb
from
"@/common/Breadcrumb"
;
import
func
from
"@/util/commonFunc.js"
;
...
...
@@ -138,7 +139,7 @@ class Exam extends Component {
"/"
+
func
.
siteCode
+
`/index/tool/test/test-management/look`
,
search
:
`?id=${text.id}`
,
search
:
`?id=${text.id}`
,
state
:
{
id
:
text
.
id
},
}
}
>
...
...
@@ -220,7 +221,7 @@ class Exam extends Component {
"/"
+
func
.
siteCode
+
`/index/tool/test/test-management/edit`
,
search
:
`?id=${text.id}`
,
search
:
`?id=${text.id}`
,
state
:
{
id
:
text
.
id
},
}
}
>
...
...
@@ -242,13 +243,21 @@ class Exam extends Component {
>
复制
</
a
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"确定"
cancelText=
"取消"
onConfirm=
{
()
=>
this
.
deleteExam
(
text
.
id
)
}
>
{
/*4月10号临时发布 后台没有发布生产接口 前端只能隐藏*/
}
<
a
href=
"javascript:void(0)"
onClick=
{
()
=>
this
.
deleteExam
(
text
.
id
)
}
style=
{
{
marginLeft
:
10
}
}
>
删除
</
a
>
</
Popconfirm
>
{
text
.
visibleRange
===
2
?
<
Divider
type=
"vertical"
/>
:
null
}
</
div
>
),
...
...
@@ -313,7 +322,7 @@ class Exam extends Component {
"/"
+
func
.
siteCode
+
`/index/tool/test/test-management/edit`
,
search
:
`?id=${text.id}`
,
search
:
`?id=${text.id}`
,
state
:
{
id
:
text
.
id
},
}
}
>
...
...
@@ -328,13 +337,20 @@ class Exam extends Component {
>
上架
</
a
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"确定"
cancelText=
"取消"
onConfirm=
{
()
=>
this
.
deleteExam
(
text
.
id
)
}
>
{
/*4月10号临时发布 后台没有发布生产接口 前端只能隐藏*/
}
<
a
style=
{
{
marginRight
:
16
,
marginLeft
:
10
}
}
href=
"javascript:void(0)"
onClick=
{
()
=>
this
.
deleteExam
(
text
.
id
)
}
style=
{
{
marginLeft
:
10
}
}
href=
"#"
>
删除
</
a
>
</
Popconfirm
>
{
text
.
visibleRange
===
2
?
<
Divider
type=
"vertical"
/>
:
null
}
</
div
>
),
...
...
@@ -476,7 +492,7 @@ class Exam extends Component {
{
pagesize
,
},
function
()
{
function
()
{
this
.
setState
({
page
:
1
,
});
...
...
@@ -544,7 +560,7 @@ class Exam extends Component {
<
Spin
/>
)
:
(
<
div
className=
"list"
>
<
Breadcrumb
title=
"考试管理"
/>
<
Breadcrumb
title=
"考试管理"
/>
<
div
className=
"list-btn"
>
<
div
>
<
Input
...
...
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