From 2150a4ac79e358382cee574e6193d1f514504815 Mon Sep 17 00:00:00 2001 From: Cindy Chang Date: Mon, 29 Jul 2024 10:58:53 +0800 Subject: [PATCH] sonar medium --- .../Conformance/ConformanceSidebar/ConformanceShowBar.vue | 6 ------ src/components/Discover/Conformance/MoreModal.vue | 6 ++---- src/components/Discover/Map/Filter/ActAndSeq.vue | 4 ++-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/components/Discover/Conformance/ConformanceSidebar/ConformanceShowBar.vue b/src/components/Discover/Conformance/ConformanceSidebar/ConformanceShowBar.vue index d5173e0..bf6c726 100644 --- a/src/components/Discover/Conformance/ConformanceSidebar/ConformanceShowBar.vue +++ b/src/components/Discover/Conformance/ConformanceSidebar/ConformanceShowBar.vue @@ -388,15 +388,11 @@ export default { this.task = this.isSubmitShowDataWtEte.task; this.isStartSelected = this.isSubmitShowDataWtEte.isStartSelected; this.isEndSelected = this.isSubmitShowDataWtEte.isEndSelected; - // this.taskStart = this.isSubmitShowDataWtEte.taskStart; - // this.taskEnd = this.isSubmitShowDataWtEte.taskEnd; break; case 'Partial': this.task = this.isSubmitShowDataWtP.task; this.isStartSelected = this.isSubmitShowDataWtP.isStartSelected; this.isEndSelected = this.isSubmitShowDataWtP.isEndSelected; - // this.taskStart = this.isSubmitShowDataWtP.taskStart; - // this.taskEnd = this.isSubmitShowDataWtP.taskEnd; break; default: break; @@ -406,8 +402,6 @@ export default { this.task = this.isSubmitShowDataCt.task; this.isStartSelected = this.isSubmitShowDataCt.isStartSelected; this.isEndSelected = this.isSubmitShowDataCt.isEndSelected; - // this.taskStart = this.isSubmitShowDataCt.taskStart; - // this.taskEnd = this.isSubmitShowDataCt.taskEnd; break; default: break; diff --git a/src/components/Discover/Conformance/MoreModal.vue b/src/components/Discover/Conformance/MoreModal.vue index 9cfef96..be6a7e9 100644 --- a/src/components/Discover/Conformance/MoreModal.vue +++ b/src/components/Discover/Conformance/MoreModal.vue @@ -286,7 +286,8 @@ export default { @apply sticky top-0 left-0 z-10 bg-neutral-10 } :deep(.p-datatable .p-datatable-thead > tr > th) { - @apply !border-y-0 border-neutral-500 bg-neutral-100 after:absolute after:left-0 after:w-full after:h-full after:block after:top-0 after:border-b after:border-t after:border-neutral-500 + @apply !border-y-0 border-neutral-500 bg-neutral-100 after:absolute after:left-0 after:w-full after:h-full after:block after:top-0 after:border-b after:border-t after:border-neutral-500; + white-space: nowrap; } :deep(.p-datatable .p-datatable-tbody > tr > td) { @apply border-neutral-500 !border-t-0 text-center @@ -295,9 +296,6 @@ export default { :deep(.p-column-header-content) { @apply justify-center } -:deep(.p-datatable .p-datatable-thead > tr > th) { - white-space: nowrap; -} :deep(.p-datatable.p-datatable-gridlines .p-datatable-tbody > tr > td) { min-width: 72px; max-width: 184px; diff --git a/src/components/Discover/Map/Filter/ActAndSeq.vue b/src/components/Discover/Map/Filter/ActAndSeq.vue index 92e1e4b..d231f1e 100644 --- a/src/components/Discover/Map/Filter/ActAndSeq.vue +++ b/src/components/Discover/Map/Filter/ActAndSeq.vue @@ -86,8 +86,8 @@ export default { data: function() { // Activity List 要排序 this.filteredData = this.filteredData.sort((x, y) => { - y.occurrences - x.occurrences - if(y.occurrences === x.occurrences) sortNumEngZhtwForFilter(x.label, y.label); + const diff = y.occurrences - x.occurrences; + return diff !== 0 ? diff : sortNumEngZhtwForFilter(x.label, y.label); }); return this.filteredData; }