Issues #44: done.

This commit is contained in:
chiayin
2023-09-11 09:53:45 +08:00
parent 81b1bd905b
commit c2592a6bc4

View File

@@ -3,7 +3,8 @@
<div v-show="isCoverPlate" class="w-[calc(100vw_-_300px)] h-screen-main fixed bottom-0 right-0 bg-gradient-to-tr from-neutral-500/50 to-neutral-900/50 z-[1]"> <div v-show="isCoverPlate" class="w-[calc(100vw_-_300px)] h-screen-main fixed bottom-0 right-0 bg-gradient-to-tr from-neutral-500/50 to-neutral-900/50 z-[1]">
</div> </div>
<!-- title --> <!-- title -->
<p class="h2 text-base">Conformance Checking Results<span class="material-symbols-outlined text-base align-middle ml-2" v-tooltip.bottom="tooltip.results" type="text">info</span></p> {{ conformanceTempReportData }}
<p class="h2 text-base">Conformance Checking Results ({{ data.total }})<span class="material-symbols-outlined text-base align-middle ml-2" v-tooltip.bottom="tooltip.results" type="text">info</span></p>
<!-- total group --> <!-- total group -->
<ul class=" text-neutral-10 text-sm flex gap-2 py-2"> <ul class=" text-neutral-10 text-sm flex gap-2 py-2">
<li class=" bg-cfm-primary rounded-full px-4 py-1 space-x-2"> <li class=" bg-cfm-primary rounded-full px-4 py-1 space-x-2">
@@ -190,6 +191,7 @@ export default {
data() { data() {
return { return {
data: { data: {
total: '--',
counts: { counts: {
conforming: '--', conforming: '--',
not_conforming: '--', not_conforming: '--',
@@ -310,6 +312,7 @@ export default {
* @param {object} data new watch's value * @param {object} data new watch's value
*/ */
setConformanceTempReportData(data){ setConformanceTempReportData(data){
let total = getNumberLabel(Object.values(data.counts).reduce((acc, val) => acc + val, 0));
let sum = data.counts.conforming + data.counts.not_conforming; let sum = data.counts.conforming + data.counts.not_conforming;
let rate = ((data.counts.conforming / sum) * 100).toFixed(1); let rate = ((data.counts.conforming / sum) * 100).toFixed(1);
let isNullTime = value => value === null ? null : getNumberLabel((value / 86400).toFixed(1)); let isNullTime = value => value === null ? null : getNumberLabel((value / 86400).toFixed(1));
@@ -336,6 +339,7 @@ export default {
let isNullIsssue = value => value === null ? null : setIssueData(value); let isNullIsssue = value => value === null ? null : setIssueData(value);
let result = { let result = {
total: `Total ${total}`,
counts: { counts: {
conforming: getNumberLabel(data.counts.conforming), conforming: getNumberLabel(data.counts.conforming),
not_conforming: getNumberLabel(data.counts.not_conforming), not_conforming: getNumberLabel(data.counts.not_conforming),