youhua
This commit is contained in:
parent
9234b220db
commit
8c7d2ebc1f
@ -83,15 +83,15 @@ export default {
|
||||
}
|
||||
const arr = this.processInfo.ScoreInfo.chartDetails.recordSimpleDtos
|
||||
if (arr.length > 0) {
|
||||
if (arr.some(i => i.weight === 0)) {
|
||||
if (arr.some(i => Number(i.weight) === 0)) {
|
||||
return this.$message.error('权重设置不能为0!')
|
||||
}
|
||||
let sco = arr.reduce((result, item) => {
|
||||
result += Number(item.weight)
|
||||
return result
|
||||
}, 0)
|
||||
if (sco > 1) {
|
||||
return this.$message.error('权重评分总和不得大于100!')
|
||||
if (sco !== 1) {
|
||||
return this.$message.error('权重评分总和必须为100!')
|
||||
}
|
||||
}
|
||||
if (this.$route.query.copy) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user