commit
This commit is contained in:
@@ -245,26 +245,33 @@ layout("/mobile/platform.html"){
|
|||||||
let evaluatedPersonType=null;
|
let evaluatedPersonType=null;
|
||||||
|
|
||||||
if (this.commentatorData.assessmentMode === 1) {
|
if (this.commentatorData.assessmentMode === 1) {
|
||||||
let score = 0;
|
let source = 0; // 标准分
|
||||||
|
let resultScore = 0; // 评议分
|
||||||
|
|
||||||
this.bzList.forEach(v => {
|
this.bzList.forEach(v => {
|
||||||
score += Number(v.resultScore)
|
source += Number(v.source)
|
||||||
|
resultScore += Number(v.resultScore)
|
||||||
})
|
})
|
||||||
if (score >= Number(80)) {
|
const result = (resultScore / source) * 100
|
||||||
|
|
||||||
|
if (result >= 80) {
|
||||||
this.reviewResult = '满意'
|
this.reviewResult = '满意'
|
||||||
} else if (score >= Number(60) && score <= Number(79)) {
|
} else if (result >= 60 && result <= 79) {
|
||||||
this.reviewResult = '基本满意'
|
this.reviewResult = '基本满意'
|
||||||
} else {
|
} else {
|
||||||
this.reviewResult = '不满意'
|
this.reviewResult = '不满意'
|
||||||
}
|
}
|
||||||
} else if (this.commentatorData.assessmentMode === 2) {
|
} else if (this.commentatorData.assessmentMode === 2) {
|
||||||
const result = this.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意')
|
const result = this.bzList.filter(v => v.resultScore === '满意' || v.resultScore === '基本满意')
|
||||||
if (result.length >= 8) {
|
const satisfactionPercentage = (result.length / this.bzList.length) * 100;
|
||||||
|
if (satisfactionPercentage >= 80) {
|
||||||
this.reviewResult = '满意'
|
this.reviewResult = '满意'
|
||||||
} else if (result.length >= 6 && result.length <= 7) {
|
} else if (satisfactionPercentage >= 60 && satisfactionPercentage <= 79) {
|
||||||
this.reviewResult = '基本满意'
|
this.reviewResult = '基本满意'
|
||||||
} else {
|
} else {
|
||||||
this.reviewResult = '不满意'
|
this.reviewResult = '不满意'
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = this.userList.find(v=> v.id === this.president)
|
const user = this.userList.find(v=> v.id === this.president)
|
||||||
evaluatedPersonName = user.username
|
evaluatedPersonName = user.username
|
||||||
evaluatedPersonType = user.evaluatedPersonType
|
evaluatedPersonType = user.evaluatedPersonType
|
||||||
|
|||||||
@@ -138,6 +138,10 @@ layout("/layouts/platform.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
doEdit() {
|
doEdit() {
|
||||||
|
if (this.formData.applyTime && this.formData.applyTime.length > 0) {
|
||||||
|
this.formData.startTime = this.formData.applyTime[0]
|
||||||
|
this.formData.endTime = this.formData.applyTime[1]
|
||||||
|
}
|
||||||
$.post(loc() + "/doEdit", {kh_zb: JSON.stringify(this.formData)}, (res) => {
|
$.post(loc() + "/doEdit", {kh_zb: JSON.stringify(this.formData)}, (res) => {
|
||||||
const {code, data, msg} = res
|
const {code, data, msg} = res
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user