Nesta Bentum 4 лет назад
Родитель
Сommit
75e7d76c58
1 измененных файлов с 19 добавлено и 17 удалено
  1. 19 17
      report-viewer/src/components/MatchTable.vue

+ 19 - 17
report-viewer/src/components/MatchTable.vue

@@ -13,20 +13,24 @@
         <th>File 2</th>
         <th>File 2</th>
         <th>Tokens</th>
         <th>Tokens</th>
       </tr>
       </tr>
-      <tr v-for="( match, index ) in matches"
-          :key="String(index).concat(match.startInFirst).concat(match.startInSecond)"
-          :style="{ background : match.color }"
-          @click="$emit('matchSelected', $event, match)">
+      <tr
+        v-for="(match, index) in matches"
+        :key="
+          String(index).concat(match.startInFirst).concat(match.startInSecond)
+        "
+        :style="{ background: match.color }"
+        @click="$emit('matchSelected', $event, match)"
+      >
         <td>
         <td>
           <div class="td-content">
           <div class="td-content">
             <p>{{ match.firstFile }}</p>
             <p>{{ match.firstFile }}</p>
-            <p>({{ match.startInFirst }} - {{ match.endInFirst }})</p>
+            <p>({{ match.startInFirst + 1 }} - {{ match.endInFirst + 1 }})</p>
           </div>
           </div>
         </td>
         </td>
         <td>
         <td>
           <div class="td-content">
           <div class="td-content">
             <p>{{ match.secondFile }}</p>
             <p>{{ match.secondFile }}</p>
-            <p>({{ match.startInSecond }} - {{ match.endInSecond }})</p>
+            <p>({{ match.startInSecond + 1 }} - {{ match.endInSecond + 1 }})</p>
           </div>
           </div>
         </td>
         </td>
         <td>{{ match.tokens }}</td>
         <td>{{ match.tokens }}</td>
@@ -36,7 +40,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import {defineComponent} from "vue";
+import { defineComponent } from "vue";
 
 
 export default defineComponent({
 export default defineComponent({
   name: "MatchTable",
   name: "MatchTable",
@@ -46,25 +50,25 @@ export default defineComponent({
      * type: Array<Match>
      * type: Array<Match>
      */
      */
     matches: {
     matches: {
-      type: Array
+      type: Array,
     },
     },
     /**
     /**
      * ID of first submission
      * ID of first submission
      */
      */
     id1: {
     id1: {
-      type: String
+      type: String,
     },
     },
     /**
     /**
      * ID of second submission
      * ID of second submission
      */
      */
     id2: {
     id2: {
-      type: String
-    }
+      type: String,
+    },
   },
   },
   setup() {
   setup() {
-    return {}
-  }
-})
+    return {};
+  },
+});
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
@@ -97,13 +101,11 @@ table {
 th {
 th {
   color: var(--on-primary-color);
   color: var(--on-primary-color);
   text-align: center;
   text-align: center;
-
 }
 }
 
 
 td {
 td {
   font-size: small;
   font-size: small;
   text-align: center;
   text-align: center;
   padding: 2%;
   padding: 2%;
-
 }
 }
-</style>
+</style>