WIP: createAllPaths

This commit is contained in:
Cindy Chang
2024-08-19 16:19:12 +08:00
parent 27d11997bd
commit 2de9a2b3e6
4 changed files with 53 additions and 10 deletions

View File

@@ -53,7 +53,7 @@
</template>
<script>
import { onBeforeMount, computed } from 'vue';
import { onBeforeMount, computed, onMounted } from 'vue';
import { storeToRefs } from 'pinia';
import { useRoute } from 'vue-router';
import axios from 'axios';
@@ -63,6 +63,7 @@ import AllMapDataStore from '@/stores/allMapData.js';
import ConformanceStore from '@/stores/conformance.js';
import cytoscapeMap from '@/module/cytoscapeMap.js';
import CytoscapeStore from '@/stores/cytoscapeStore.ts';
import MapPathStore from '@/stores/mapPathStore.ts';
import SidebarView from '@/components/Discover/Map/SidebarView.vue';
import SidebarState from '@/components/Discover/Map/SidebarState.vue';
import SidebarTraces from '@/components/Discover/Map/SidebarTraces.vue';
@@ -111,6 +112,7 @@ export default {
setCurrentGraphId(numberBeforeMapInRoute);
});
return { isLoading, processMap, bpmn, stats, insights, traceId, traces, baseTraces,
baseTraceId, filterTasks, filterStartToEnd, filterEndToStart, filterTimeframe,
filterTrace, logId, baseLogId, createFilterId, temporaryData, isRuleData,
@@ -439,6 +441,7 @@ export default {
},
},
async created() {
const mapPathStore = MapPathStore();
const routeParams = this.$route.params;
const file = this.$route.meta.file;
const isCheckPage = this.$route.name.includes('Check');
@@ -471,10 +474,13 @@ export default {
// 取得 logId 後才 call api
await this.allMapDataStore.getAllMapData();
await this.allMapDataStore.getAllTrace();
// log、filter 檔切換過程中, trace id 不同,將初始 trace id 設定為該檔案的 trace 幣一筆資料的 id。
this.traceId = await this.traces[0]?.id;
this.baseTraceId = await this.baseTraces[0]?.id;
this.createCy(this.mapType);
await mapPathStore.setCytoscape(this.cytoscapeGraph);
await mapPathStore.createAllPaths();
await this.allMapDataStore.getFilterParams();
await this.allMapDataStore.getTraceDetail();