This commit is contained in:
熊成强 2020-11-04 14:40:49 +08:00
parent 07f4c8c64a
commit 938b453361
2 changed files with 12 additions and 2 deletions

View File

@ -235,12 +235,14 @@ export default {
}
},
handleIsEmit (n) {
console.log('n: ', n)
n.map(i => {
i.roleIds = ''
i.roleDtos.map(j => {
if (j.type !== 1 && j.checked) i.roleIds += j.roleId + ','
})
i.roleIds = i.roleIds.substring(0, i.roleIds.length - 1)
i.label = '权重评分:' + i.weight1 + '%'
})
console.log('n: ', n)
this.$emit('update:info', this.list)

View File

@ -71,8 +71,6 @@ export default {
},
async handSaveBasisc () {
console.log('this.templateForm: ', this.processInfo)
if (!this.basisForm.name) {
return this.$message.error('请输入考评组名称')
}
@ -82,6 +80,16 @@ export default {
if (this.templateForm.modelItems.length === 0) {
return this.$message.error('请填写考核维度')
}
const arr = this.processInfo.ScoreInfo.chartDetails.recordSimpleDtos
if (arr.length > 0) {
let sco = arr.reduce((result, item) => {
result += Number(item.weight)
return result
}, 0)
if (sco > 1) {
return this.$message.error('权重评分总和不得大于100')
}
}
this.loadings = true
try {
let res1 = await apiCheckStaff(Object.assign({}, this.basisForm, {confirm: 1}))