คำนวนคะแนนรวม

This commit is contained in:
Kittapath 2023-04-28 12:23:37 +07:00
parent e3379e7b28
commit 61d1fe1102

View file

@ -71,7 +71,7 @@
examResultinscore
}}</span>
</div>
<div class="col-xs-6 col-sm-5 text-grey-7">นหมดอายญชสอบแขงข</div>
<div class="col-xs-6 col-sm-5 text-grey-7">นหมดอายญชสอบดเลอก</div>
<div class="col-xs-6 col-sm-7 q-pr-xs">
{{ score_expired == null ? '' : date2Thai(score_expired) }}
</div>
@ -151,14 +151,24 @@ const fetchStatus = async () => {
scoreB.value = data.pointB
scoreCFull.value = data.pointTotalC
scoreC.value = data.pointC
scoreSumFull.value =
data.pointTotalB == null || data.pointTotalC == null
? null
: parseInt(data.pointTotalB) + parseInt(data.pointTotalC)
scoreSum.value =
data.pointB == null || data.pointC == null
? null
: parseInt(data.pointB) + parseInt(data.pointC)
if (data.pointB != null && data.pointC != null) {
scoreSum.value = parseInt(data.pointB) + parseInt(data.pointC)
} else if (data.pointC != null) {
scoreSum.value = parseInt(data.pointC)
} else if (data.pointB != null) {
scoreSum.value = parseInt(data.pointB)
} else {
scoreSum.value = null
}
if (data.pointTotalB != null && data.pointTotalC != null) {
scoreSumFull.value = parseInt(data.pointTotalB) + parseInt(data.pointTotalC)
} else if (data.pointTotalC != null) {
scoreSumFull.value = parseInt(data.pointTotalC)
} else if (data.pointTotalB != null) {
scoreSumFull.value = parseInt(data.pointTotalB)
} else {
scoreSumFull.value = null
}
scoreC.value = data.pointC
examResultinscore.value = data.pass
avatar.value = data.avatar