This commit is contained in:
xiongchengqiang 2020-12-17 19:02:29 +08:00
parent e8959630df
commit fb9a298d94
2 changed files with 22 additions and 6 deletions

View File

@ -93,7 +93,7 @@
业务指标权重{{handleGetWeight(i)}}% <span v-if="i.weight !== null">/{{Math.round((i.weight * 100)*1000)/1000}}%</span> 业务指标权重{{handleGetWeight(i)}}% <span v-if="i.weight !== null">/{{Math.round((i.weight * 100)*1000)/1000}}%</span>
</div> </div>
<div> <div>
所有指标总权重: <span style="color:#EE6723;">{{ handleGetWeight1()}}%</span> 所有指标总权重: <span style="color:#EE6723;">{{ handleGetWeight1()}}%/100%</span>
</div> </div>
</div> </div>
<div style=" padding: 10px;"> <div style=" padding: 10px;">

View File

@ -351,28 +351,44 @@ export default {
}, },
handleGetScorlList (list) { handleGetScorlList (list) {
if (!list) list = [] if (!list) list = []
return list.filter(i => i.acquireScore !== null || (i.approvalId === this.userInfo.userId && this.tableInfo.score)) return list.filter(i => i.isEdit || (i.approvalId === this.userInfo.userId && this.tableInfo.score))
}, },
handleScore (item) { handleScore (item) {
return this.scoreList.filter(i => i.score === item).length > 0 ? this.scoreList.filter(i => i.score === item)[0].name : 0 return this.scoreList.filter(i => i.score === item).length > 0 ? this.scoreList.filter(i => i.score === item)[0].name : 0
}, },
async handleGetNext () { async handleGetNext () {
this.loadingTi = true // this.loadingTi = true
const obj = { status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分' } const obj = { status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分' }
const params = Object.assign({}, { resultRecordId: this.$route.query.id || '' }, obj) const params = Object.assign({}, { resultRecordId: this.$route.query.id || '' }, obj)
if (!this.tableInfo.result) {
let isScore = true
this.obj.recortModelDtos.map(i => {
i.detailDtos.map(j => {
const obj = j.scoreDtos.find(k => k.approvalId === this.userInfo.userId)
if (obj.acquireScore) {
obj.isEdit = 1
} else {
isScore = false
}
})
})
if (!isScore) {
return this.$message({
message: '有未评分指标',
type: 'info'
})
}
}
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
this.loadingTi = false this.loadingTi = false
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)
return
} }
this.obj.commentId = res.commentId this.obj.commentId = res.commentId
let res1 = await apiSaveDetail(Object.assign({}, this.obj, this.score)) let res1 = await apiSaveDetail(Object.assign({}, this.obj, this.score))
if (res1.code !== 200) { if (res1.code !== 200) {
this.$message.error(res1.msg) this.$message.error(res1.msg)
this.loadingTi = false this.loadingTi = false
return
} }
this.$message({ this.$message({
message: res.msg, message: res.msg,