Router: change /Discover to /Discover/map/type/filterId

This commit is contained in:
chiayin
2023-06-16 17:13:59 +08:00
parent 07b35fcce0
commit af1f8f3016
20 changed files with 121 additions and 57 deletions
+29
View File
@@ -0,0 +1,29 @@
<template>
<StatusBar></StatusBar>
<h1>Conformance</h1>
</template>
<script>
import { storeToRefs } from 'pinia';
import LoadingStore from '@/stores/loading.js';
import StatusBar from '@/components/Discover/Conformance/StatusBar.vue';
export default {
setup() {
const loadingStore = LoadingStore();
const { isLoading } = storeToRefs(loadingStore);
return { isLoading }
},
components: {
StatusBar,
},
async created() {
let logId;
if(this.$route.params.type === 'log') logId = this.$route.params.fileId;
console.log(logId);
// this.isLoading = true;
this.isLoading = false;
},
}
</script>
@@ -58,10 +58,10 @@ import { storeToRefs } from 'pinia';
import LoadingStore from '@/stores/loading.js';
import AllMapDataStore from '@/stores/allMapData.js';
import cytoscapeMap from '@/module/cytoscapeMap.js';
import SidebarView from '@/components/Discover/SidebarView.vue';
import SidebarState from '@/components/Discover/SidebarState.vue';
import SidebarTraces from '@/components/Discover/SidebarTraces.vue';
import SidebarFilter from '@/components/Discover/SidebarFilter.vue';
import SidebarView from '@/components/Discover/Map/SidebarView.vue';
import SidebarState from '@/components/Discover/Map/SidebarState.vue';
import SidebarTraces from '@/components/Discover/Map/SidebarTraces.vue';
import SidebarFilter from '@/components/Discover/Map/SidebarFilter.vue';
export default {
setup() {
@@ -293,11 +293,13 @@ export default {
},
},
async created() {
// Log DiscoverLog , Filter DiscoverFilter
if(this.$route.name === 'DiscoverLog'){
this.logId = this.$route.params.logId;
}else if(this.$route.name === 'DiscoverFilter') {
this.createFilterId = this.$route.params.filterId;
// loading
this.isLoading = true;
// Log Map Log , Filter Map Filter
if(this.$route.params.type === 'log'){
this.logId = this.$route.params.fileId;
}else if(this.$route.params.type === 'filter') {
this.createFilterId = this.$route.params.fileId;
// logID Funnel
await this.allMapDataStore.fetchFunnel(this.createFilterId);
this.isRuleData = await Array.from(this.temporaryData);
@@ -310,8 +312,7 @@ export default {
this.createCy(this.mapType);
await this.allMapDataStore.getFilterParams();
this.isLoading = true;
await new Promise(resolve => setTimeout(resolve, 1000));
// loading
this.isLoading = false;
},
}