提交测试,解决判断总权重100%的问题
This commit is contained in:
parent
55941f567a
commit
374fc0420c
@ -395,7 +395,7 @@ export default {
|
|||||||
weight += j.checkWeight
|
weight += j.checkWeight
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
if (weight !== 1) {
|
if (Math.round((weight * 100) * 1000) / 1000 !== 100) {
|
||||||
const noWeightArr = arr.filter(i => i.weight === null)
|
const noWeightArr = arr.filter(i => i.weight === null)
|
||||||
let str = noWeightArr.map(i => i.name).join(',')
|
let str = noWeightArr.map(i => i.name).join(',')
|
||||||
this.$message.error(str + '维度内的权重和必须为100%!')
|
this.$message.error(str + '维度内的权重和必须为100%!')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user