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