This commit is contained in:
熊成强 2020-11-12 17:56:23 +08:00
parent 9234b220db
commit 8c7d2ebc1f

View File

@ -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) {