Commit 22be4c24 by maolipeng

fix:批量设置得分不低于半对得分

parent f946fc86
...@@ -111,6 +111,9 @@ export default function BatchScore(props:BatchScoreProps) { ...@@ -111,6 +111,9 @@ export default function BatchScore(props:BatchScoreProps) {
style={inputNumberStyle} style={inputNumberStyle}
onChange={(v)=> { onChange={(v)=> {
v = Math.round(v) v = Math.round(v)
if (v <= rules[3].portionScore) {
return
}
let _r = [...rules] let _r = [...rules]
_r[3].score = v _r[3].score = v
setRules(_r) setRules(_r)
...@@ -144,6 +147,9 @@ export default function BatchScore(props:BatchScoreProps) { ...@@ -144,6 +147,9 @@ export default function BatchScore(props:BatchScoreProps) {
style={inputNumberStyle} style={inputNumberStyle}
onChange={(v)=> { onChange={(v)=> {
v = Math.round(v) v = Math.round(v)
if (v <= rules[1].portionScore) {
return
}
let _r = [...rules] let _r = [...rules]
_r[1].score = v _r[1].score = v
setRules(_r) setRules(_r)
...@@ -195,6 +201,9 @@ export default function BatchScore(props:BatchScoreProps) { ...@@ -195,6 +201,9 @@ export default function BatchScore(props:BatchScoreProps) {
style={inputNumberStyle} style={inputNumberStyle}
onChange={(v)=> { onChange={(v)=> {
v = Math.round(v) v = Math.round(v)
if (v <= rules[0].portionScore) {
return
}
let _r = [...rules] let _r = [...rules]
_r[0].score = v _r[0].score = v
setRules(_r) setRules(_r)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment