Issue #31: Done.

This commit is contained in:
chiayin
2023-10-04 13:46:51 +08:00
parent 803782d5a9
commit ddd8df9daa
3 changed files with 21 additions and 11 deletions

View File

@@ -19,7 +19,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(trace, key) in traceList" :key="key" class=" cursor-pointer hover:text-primary" @click="switchCaseData(trace.id)">
<tr v-for="(trace, key) in traceList" :key="key" class=" cursor-pointer hover:text-primary" @click="switchCaseData(trace.id, trace.base_count)">
<td class="p-2">#{{ trace.id }}</td>
<td class="p-2 w-24">
<div class="h-4 w-full bg-neutral-300 rounded-sm overflow-hidden">
@@ -55,8 +55,8 @@
<script>
import cytoscapeMapTrace from '@/module/cytoscapeMapTrace.js';
import { storeToRefs } from 'pinia';
import AllMapDataStore from '@/stores/allMapData.js';
import numberLabel from '@/module/numberLabel.js';
export default {
props: {
@@ -89,7 +89,8 @@ export default {
return {
id: trace.id,
value: this.progressWidth(Number(((trace.count / sum) * 100).toFixed(1))),
count: trace.count,
count: numberLabel(trace.count),
base_count: trace.count,
ratio: this.getPercentLabel(trace.count / sum),
};
}).sort((x, y) => x.id - y.id);
@@ -116,9 +117,9 @@ export default {
* switch case data
* @param {number} id
*/
async switchCaseData(id) {
async switchCaseData(id, count) {
this.showTraceId = id;
this.$emit('switch-Trace-Id', this.showTraceId);
this.$emit('switch-Trace-Id', {id: this.showTraceId, count: count});
},
/**
* 將 trace element nodes 資料彙整