server_commit

This commit is contained in:
zhaoxinyu
2024-09-18 15:05:17 +08:00
parent 541ee6193a
commit ca104cd831
12 changed files with 251 additions and 89 deletions
@@ -146,7 +146,15 @@ layout("/mobile/platform.html"){
const now = new Date();
// 检查当前时间是否在 startTime 和 endTime 之间
return now >= start && now <= end;
if (now < start && now > end){
vant.Dialog.alert({
title: '温馨提示',
message: '不在测评时间内,暂无法测评',
confirmButtonColor: '#1867b0'
})
return
}
//自评模式
if (o.reviewMode == 1 && !o.canJoin) {
@@ -249,7 +249,7 @@ layout("/mobile/platform.html"){
let resultScore = 0; // 评议分
this.bzList.forEach(v => {
source += Number(v.source)
source += Number(v.score)
resultScore += Number(v.resultScore)
})
const result = (resultScore / source) * 100
@@ -290,16 +290,36 @@ layout("/mobile/platform.html"){
const resp = await $.post('/mobile/wakeshome/review/appraisal/doSubmit', formData)
if (resp.code === 0) {
await this.getCommentById();
window.location.href = '/mobile/wakeshome/review/appraisal/mine'
vant.Toast.success('操作成功')
setTimeout(()=>{
window.location.href = '/mobile/wakeshome/review/appraisal/mine'
},500)
}
})
},
async showAssess() {
this.$refs['addForm'].validate().then(async () => {
let score = 0;
await this.assignment();
// let score = 0;
if (this.commentatorData.assessmentMode === 1) {
await this.assignment();
let source = 0; // 标准分
let resultScore = 0; // 评议分
this.bzList.forEach(v => {
source += Number(v.score)
resultScore += Number(v.resultScore)
})
const result = (resultScore / source) * 100
if (result >= 80) {
this.reviewResult = '满意'
} else if (result >= 60 && result <= 79) {
this.reviewResult = '基本满意'
} else {
this.reviewResult = '不满意'
}
/*this.bzList.forEach(v => {
score += Number(v.resultScore)
})
if (score >= Number(80)) {
@@ -308,12 +328,13 @@ layout("/mobile/platform.html"){
this.reviewResult = '基本满意'
} else {
this.reviewResult = '不满意'
}
console.log(score)
}*/
console.log(source)
console.log(resultScore)
console.log(this.reviewResult)
vant.Dialog.alert({
title: '测评结果',
message: '您的测评分数为【' + score + "】分,测评结果为【" + this.reviewResult + "】",
message: '您的测评分数为【' + resultScore + "】分,测评结果为【" + this.reviewResult + "】",
confirmButtonColor: '#1867b0'
})
} else if (this.commentatorData.assessmentMode === 2) {