优化
This commit is contained in:
parent
e8959630df
commit
fb9a298d94
@ -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;">
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user