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
ed9cbf2f
Commit
ed9cbf2f
authored
Jul 02, 2021
by
maolipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:去除小数,,,
parent
e65e34ab
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
src/modules/teach-tool/paper-manage/OperatePaper.jsx
+2
-0
src/modules/teach-tool/paper-manage/components/BatchScore.tsx
+16
-0
No files found.
src/modules/teach-tool/paper-manage/OperatePaper.jsx
View file @
ed9cbf2f
...
@@ -698,6 +698,8 @@ class OperatePaper extends Component {
...
@@ -698,6 +698,8 @@ class OperatePaper extends Component {
<
InputNumber
<
InputNumber
min=
{
0
}
min=
{
0
}
max=
{
record
.
score
<=
0
?
0
:
record
.
score
-
1
}
max=
{
record
.
score
<=
0
?
0
:
record
.
score
-
1
}
formatter=
{
value
=>
parseInt
(
value
)
}
parser=
{
value
=>
parseInt
(
value
)
}
value=
{
record
.
portionScore
||
0
}
value=
{
record
.
portionScore
||
0
}
onChange=
{
(
value
)
=>
{
onChange=
{
(
value
)
=>
{
value
=
Math
.
round
(
value
)
value
=
Math
.
round
(
value
)
...
...
src/modules/teach-tool/paper-manage/components/BatchScore.tsx
View file @
ed9cbf2f
...
@@ -90,6 +90,8 @@ export default function BatchScore(props:BatchScoreProps) {
...
@@ -90,6 +90,8 @@ export default function BatchScore(props:BatchScoreProps) {
value=
{
rules
[
4
].
score
}
value=
{
rules
[
4
].
score
}
defaultValue=
{
rules
[
4
].
score
}
defaultValue=
{
rules
[
4
].
score
}
style=
{
inputNumberStyle
}
style=
{
inputNumberStyle
}
formatter=
{
(
value
:
number
|
undefined
)
=>
String
(
value
)
}
parser=
{
(
value
:
string
|
undefined
)
=>
parseInt
(
String
(
value
))
}
onChange=
{
(
v
)
=>
{
onChange=
{
(
v
)
=>
{
v
=
Math
.
round
(
v
)
v
=
Math
.
round
(
v
)
let
_rules
=
[...
rules
]
let
_rules
=
[...
rules
]
...
@@ -109,6 +111,8 @@ export default function BatchScore(props:BatchScoreProps) {
...
@@ -109,6 +111,8 @@ export default function BatchScore(props:BatchScoreProps) {
defaultValue=
{
rules
[
3
].
score
}
defaultValue=
{
rules
[
3
].
score
}
value=
{
rules
[
3
].
score
}
value=
{
rules
[
3
].
score
}
style=
{
inputNumberStyle
}
style=
{
inputNumberStyle
}
formatter=
{
(
value
:
number
|
undefined
)
=>
String
(
value
)
}
parser=
{
(
value
:
string
|
undefined
)
=>
parseInt
(
String
(
value
))
}
onChange=
{
(
v
)
=>
{
onChange=
{
(
v
)
=>
{
v
=
Math
.
round
(
v
)
v
=
Math
.
round
(
v
)
if
(
v
<=
rules
[
3
].
portionScore
)
{
if
(
v
<=
rules
[
3
].
portionScore
)
{
...
@@ -126,6 +130,8 @@ export default function BatchScore(props:BatchScoreProps) {
...
@@ -126,6 +130,8 @@ export default function BatchScore(props:BatchScoreProps) {
defaultValue=
{
rules
[
3
].
portionScore
}
defaultValue=
{
rules
[
3
].
portionScore
}
value=
{
rules
[
3
].
portionScore
}
value=
{
rules
[
3
].
portionScore
}
style=
{
inputNumberStyle
}
style=
{
inputNumberStyle
}
formatter=
{
(
value
:
number
|
undefined
)
=>
String
(
value
)
}
parser=
{
(
value
:
string
|
undefined
)
=>
parseInt
(
String
(
value
))
}
onChange=
{
(
v
)
=>
{
onChange=
{
(
v
)
=>
{
v
=
Math
.
round
(
v
)
v
=
Math
.
round
(
v
)
let
_r
=
[...
rules
]
let
_r
=
[...
rules
]
...
@@ -145,6 +151,8 @@ export default function BatchScore(props:BatchScoreProps) {
...
@@ -145,6 +151,8 @@ export default function BatchScore(props:BatchScoreProps) {
defaultValue=
{
rules
[
1
].
score
}
defaultValue=
{
rules
[
1
].
score
}
value=
{
rules
[
1
].
score
}
value=
{
rules
[
1
].
score
}
style=
{
inputNumberStyle
}
style=
{
inputNumberStyle
}
formatter=
{
(
value
:
number
|
undefined
)
=>
String
(
value
)
}
parser=
{
(
value
:
string
|
undefined
)
=>
parseInt
(
String
(
value
))
}
onChange=
{
(
v
)
=>
{
onChange=
{
(
v
)
=>
{
v
=
Math
.
round
(
v
)
v
=
Math
.
round
(
v
)
if
(
v
<=
rules
[
1
].
portionScore
)
{
if
(
v
<=
rules
[
1
].
portionScore
)
{
...
@@ -162,6 +170,8 @@ export default function BatchScore(props:BatchScoreProps) {
...
@@ -162,6 +170,8 @@ export default function BatchScore(props:BatchScoreProps) {
defaultValue=
{
rules
[
1
].
portionScore
}
defaultValue=
{
rules
[
1
].
portionScore
}
value=
{
rules
[
1
].
portionScore
}
value=
{
rules
[
1
].
portionScore
}
style=
{
inputNumberStyle
}
style=
{
inputNumberStyle
}
formatter=
{
(
value
:
number
|
undefined
)
=>
String
(
value
)
}
parser=
{
(
value
:
string
|
undefined
)
=>
parseInt
(
String
(
value
))
}
onChange=
{
(
v
)
=>
{
onChange=
{
(
v
)
=>
{
v
=
Math
.
round
(
v
)
v
=
Math
.
round
(
v
)
let
_r
=
[...
rules
]
let
_r
=
[...
rules
]
...
@@ -180,6 +190,8 @@ export default function BatchScore(props:BatchScoreProps) {
...
@@ -180,6 +190,8 @@ export default function BatchScore(props:BatchScoreProps) {
defaultValue=
{
rules
[
2
].
score
}
defaultValue=
{
rules
[
2
].
score
}
value=
{
rules
[
2
].
score
}
value=
{
rules
[
2
].
score
}
style=
{
inputNumberStyle
}
style=
{
inputNumberStyle
}
formatter=
{
(
value
:
number
|
undefined
)
=>
String
(
value
)
}
parser=
{
(
value
:
string
|
undefined
)
=>
parseInt
(
String
(
value
))
}
onChange=
{
(
v
)
=>
{
onChange=
{
(
v
)
=>
{
v
=
Math
.
round
(
v
)
v
=
Math
.
round
(
v
)
let
_r
=
[...
rules
]
let
_r
=
[...
rules
]
...
@@ -199,6 +211,8 @@ export default function BatchScore(props:BatchScoreProps) {
...
@@ -199,6 +211,8 @@ export default function BatchScore(props:BatchScoreProps) {
defaultValue=
{
rules
[
0
].
score
}
defaultValue=
{
rules
[
0
].
score
}
value=
{
rules
[
0
].
score
}
value=
{
rules
[
0
].
score
}
style=
{
inputNumberStyle
}
style=
{
inputNumberStyle
}
formatter=
{
(
value
:
number
|
undefined
)
=>
String
(
value
)
}
parser=
{
(
value
:
string
|
undefined
)
=>
parseInt
(
String
(
value
))
}
onChange=
{
(
v
)
=>
{
onChange=
{
(
v
)
=>
{
v
=
Math
.
round
(
v
)
v
=
Math
.
round
(
v
)
if
(
v
<=
rules
[
0
].
portionScore
)
{
if
(
v
<=
rules
[
0
].
portionScore
)
{
...
@@ -215,6 +229,8 @@ export default function BatchScore(props:BatchScoreProps) {
...
@@ -215,6 +229,8 @@ export default function BatchScore(props:BatchScoreProps) {
defaultValue=
{
rules
[
0
].
portionScore
}
defaultValue=
{
rules
[
0
].
portionScore
}
value=
{
rules
[
0
].
portionScore
}
value=
{
rules
[
0
].
portionScore
}
style=
{
inputNumberStyle
}
style=
{
inputNumberStyle
}
formatter=
{
(
value
:
number
|
undefined
)
=>
String
(
value
)
}
parser=
{
(
value
:
string
|
undefined
)
=>
parseInt
(
String
(
value
))
}
onChange=
{
(
v
)
=>
{
onChange=
{
(
v
)
=>
{
v
=
Math
.
round
(
v
)
v
=
Math
.
round
(
v
)
let
_r
=
[...
rules
]
let
_r
=
[...
rules
]
...
...
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